Tag Archives: Computing

The W Effect

This is probably the meanest article title I’ve ever written, as the “W” refers to a person, someone that I used to work with ((In fact I had a number of choices, and that’s the point. However this, as you’ll see, is an extreme case and is the first I remember.)). The critical phrase went something like this:

“How hard can it be? It’s only a button!”

Those two, tiny sentences hide a lot. Let me explain.

I’m mainly technical. I have been in the industry for over ten years now, did a computer science degree and spent many hours when I should have been revising for my German GCSE programming my Sinclair Spectrum. This means that when someone says “It’s only a button” I instinctively cringe. I may not know the details but I’ve seen enough “simple” buttons with days worth of work behind them that I’ve learned to be cautious.

Of course, not only technical skills are required for most modern applications. Even a relatively small iPhone utility, such as Yummy, needed some time in front of Adobe Illustrator for the icon. Needless to say, that time wasn’t mine.

I am a keen photographer and I have read The Non-Designer’s Design Book but when it comes to art and design I leave the implementation to other people.

Naturally I have opinions. I may, as a “customer,” have constraints. It has to be a particular size or colour, the shape must evoke a certain feeling or imagery. I probably even have a budget. I instinctively like or dislike designs.

But what I don’t profess to know is the design process or how long it should take, and that’s the problem with the “how hard can it be” quote from above.

“W” was from another discipline, couldn’t imagine what might be hard technically and made a commitment to the client based on that hunch. Unfortunately while their part would only take a few hours, it turned out that there were several weeks of technical work to make that button operate.

Of course I don’t want to come down too hard on “W,” as this is both a fairly extreme case and something that we all do to some extent. Things that we don’t understand almost always seem easier than they are in reality. The trick, insofar as there is one, is acknowledge that it does happen and consult with someone who does understand it before making commitments.

Attitude

Here’s an exchange that occurred just the other day: colleague A asked colleague B for some help in PowerPoint. B says, “It’s easy, I’ll show you how to do it.” A immediately objects: “I don’t want to know how to do it, can you just do it for me?”

The dialogue continued for a while, with A not happy to have to learn something new and B not happy to become A‘s lackey.

The traditional twist in a story like this is to say that in fact I was Colleague B. Only I wasn’t. And no, I wasn’t A either. But the whole conversation put my teeth on edge.

This is a supposedly smart and experienced guy but he shows a complete unwillingness to both learn something new and to be self-sufficient.

This is whatever is the complete opposite of a winning combination is called.

I have regularly come across both traits in my working life. Most often you get the Java programmer who is only interested in Java. These are usually career programmers, people who are in the industry because it pays the bills and little more. There is nothing wrong with that of course. Do people ever get passionate about accountancy? Actually, probably some do, but my point is that to most it’s a job.

However that kind of outlook is limiting. Lapsing into cliché for a second: When all you have is a hammer, everything looks like a nail. This isn’t a problem most of the time. Usually getting the job done is enough. But for the really interesting problems a little Lisp or functional programming or the dining philosophers can make all the difference.

My colleague didn’t even want to learn more about PowerPoint which, given his position, pretty much should have been his job.

But an unwillingness to learn new stuff would have been fine had he been able to work unaided. Unfortunately he needed pretty much constant support. Everything from PowerPoint to making a cup of tea required someone else’s help. Naturally, it wasn’t an inability to make tea rather he was unwilling to do so.

The key here is that it’s not about ability. In your first few weeks in a job there are going to be lots of things that you need to ask about, lots of things that you need help with. But what I really hate to see is an unwillingness to learn, a lack of intellectual curiosity and no desire to be self-sufficient.

Growing Up in Public

What do Britney Spears and Yummy, my iPhone Delicious.com client, have in common? If you had asked me a few months ago I would have said nothing but I’d have been wrong. No, they both have had to grow up in public.

For a version 1.0 product, Yummy seemed solid to me. It was fast, coped will all my bookmarks and had the ability to add, edit and delete entries. I didn’t think that this would remain as a unique feature for as long as it has, but hey, that’s a bonus.

Within a few days I had exceeded what I had expected to sell and received positive feedback on the iTunes store. But not long after that I also received my first bug report.

This turned out to be an odd one. It crashed early on while starting up and downloading all the bookmarks for the first time. My first guess — incorrect as it turned out — was that it was running out of memory. It took some investigation with the help of a very kind end-user to discover that… Delicious allows technically invalid URLs. By that I mean both that they don’t follow web standards and, worse, that it’s not even possible to open them in Mobile Safari.

I don’t feel so bad about not spotting that one during testing, although I should have put in more error handling to spot various “impossible” events and make sure that it didn’t crash. The reason I mention it is to give an idea of the kind of things that happen in “real life.”

But my biggest mistake has been assuming that I am a typical user of Delicious. I thought a few hundred bookmarks was a lot but I now realise that I was wrong. I have some users with over a thousand bookmarks and have read about another with nearly ten times that ((I confess to being a little sceptical about some claims. At some points it becomes a bit of a pissing competition.)).

The exact number of bookmarks that you can store depends on a number of variables, such as the length of the URL, title and notes, the number of tags, the iPhone operating system ((Upgrading from version 2.0 to 2.1 tipped at least one user over the edge, and many developers do not get previews of new versions.)) and a bunch of other details outside my control. Looking at the reviews on iTunes I believe a few people had more than whatever that limit is. Unfortunately the error handling was lacking, resulting in Yummy crashing rather than an inconvenient but understandable error message ((I’ve not got to the bottom of this one yet. It seems that, sometimes, you can only spot a bad memory allocation by noting that an otherwise mandatory field is missing.)).

Version 1.0.2 was actually a big release in terms of the amount of code changed, if not in terms of visible functionality (which is why it was such a small change in the version number). Under the hood, though, I dramatically increased the number of bookmarks that Yummy could handle. However it was starting to become clear that the internal architecture was holding me back. Further increasing the number of usable bookmarks would be hard, if not impossible, without seriously degrading performance and some new features that I wanted to add would end up in a nasty tangle of unmaintainable code.

I decided to take a step back and fix the structure of the code. For much of the time since the last formal release, Yummy has been, metaphorically speaking, in pieces on the floor. Most of those pieces have now been polished and reassembled, and it’s now working well enough that I have replaced the copy of 1.0.2 that I have been using day-to-day on my own iPhone with the development version.

This is a long way of saying that there is a new version coming. There will be a number of great new features but many of the big changes are behind the scenes. I sincerely hope that you don’t notice them.

C++

Introduction

I don’t want to start off on the wrong foot again, but I’m afraid I might have to. If you read my discussion of the C programming language you may imagine that I’d like C++. After all, C++ fixes some of C’s idiosyncrasies, adds object orientation and a whole host of new features.

You’d be wrong though. In many ways I consider C++ to be a step backwards from its parent and this piece will hopefully explain why.

The big things in life

Identifying the main thing wrong with C++ is easy when you start making a list of features. I don’t mean a list trying to identify things it does badly, but a genuine feature list, stuff like object orientation, exceptions, strong-ish typing, multiple inheritance… Well I’ve only just started, but there’s a huge list.

And that is the problem. C++ has tried to incorporate just about every interesting software engineering development that has been made over the last twenty-five years. In some ways that’s a very good thing: it allows programmers to build code in the most appropriate way which ever that way might be.

The problem is that there’s more than one way to skin any particular cat. While just about any approach is fine on a small program, one with a single developer, when you have a team writing code if there’s no consistency in approach you get the situation where no-one is able to understand the whole. There is no one head big enough.

While There’s More Than One Way To Do It is a great motto for Perl, as a language it has a very different objective. Most Perl programs are ‘hacks,’ small programs designed to solve a particular problem. C++ is a hard-core software engineering language; large teams of developers are common. The same approach used for small programs just doesn’t work for bigger systems. I can build a thousand line program at the keyboard, but a ten million line system? Anyone that thinks they can are deluding themselves. Even on the off-chance that they aren’t, other people need to understand it too. No-one is ever around for ever and no-one is indispensable (except in the case of bad management, but that’s a different story).

Counter Arguments

People often cite C++’s similarity to C as a major plus. If you’ve already learned C, then C++ is easy, right? Just a few extra commands, use “class” instead of “struct” and you’re well away. Except some of the worst C++ code I’ve ever seen has come from people who think like that. Using “//” to start your comments rather than “/*” doesn’t make you a C++ programmer!

There are, however, some benefits for C programmers using C++ compilers. They tend to be less forgiving of bad code, they often give better diagnostics and error messages. But so do Java and C#, only more so. And the jump from C to Java is probably easier than moving from C to C++.

Conclusion

If we think right back to to the beginning of the development of programming languages, we remember that they were designed to simplify things; they were designed so that you could think about the problem rather than what the machine would do.

For the audience that they were aimed at, many of the earlier languages did just that. Fortran allowed scientists to write programs (in fact it’s still being used). Cobol put a greater focus on the business than had ever been the case.

And this is where C++ falls down. Its audience is software engineers, people who write very large and complex applications. Yet its complexity actually hinders development. With a large team, “write-only” code, programs that no-one can understand once they have been constructed, become not just possible but almost guaranteed. There are so many ways of doing the same thing, so many ways to shoot yourself in the foot, that the odds of it being both bug-free and maintainable are almost zero.

C++ does have its plus points, though. It is an excellent language to show how smart you are. If you can understand the entire language and write huge, complex and error-free programs in your sleep, you are clearly much more clever than I am.

Myself, I prefer to fight the problem rather than the development language.

Eight Best Computer Books

It’s been over five years since I last told you about my favourite computer and programming related books (don’t believe the date on that article. It’s been edited lightly a couple of times since I first posted it).

Having said that, some things have not changed. The vast majority of books on the shelves of your local retailer are very specific. Publishers seem to eschew broad, generally useful texts in preference for yet another beginners guide to Microsoft Word or C++ (or, more likely, Visual C++ 2005 Special Easter Edition SP2). I do not understand this. Sure, there’s a genuine need for “how to” books for specific technologies but is it not more useful to learn how to solve problems in general rather than how to solve a particular problem with a particular product?

Worse, most are not even particularly well written. Deadlines are so strict that authors have to write quickly rather than accurately or well. Ultimately the drive to be the first publisher with the definitive guide on Word 2007 (August Edition) trumps all. One that galls me is that most programming language books assume that you are learning to program from scratch. Is C++ really likely to be your first language? I think not.

The other continuing trend is the size of them. Is it necessary for every book to be a thousand pages long and be stuffed with screen-shots? None of my favourites are like this.

As with the last list, I have not just focused on your typical “computer science” text, if anything I have shied away from them. Hopefully if you go pick up a copy of all these books you’ll find them all to be both useful and entertaining to read.

Additionally, I find most of them to be books that are worth returning to, if not as a reference guide then as something that increased experience make each read make more sense.

So, let’s get to the point. What are my favourite computer books, and why?

  1. Code Complete. If you’re writing or designing software you need this book. As I said last time, it ‘is one of those books that does the job so well it has no obvious competition. It describes the complete coding process right from low level design through to unit testing and, while most people would have been very prescriptive, McConnell outlines the pros and cons of each approach.’ Now on its second edition, it is still, as far as I know, without peer.
  2. The Mythical Man Month. People never seem to learn. Managers still seem to add more staff to already late projects. Brookes said all this, and a lot more, in this book way back in the seventies.
  3. Accidental Empires. Robert X Cringely’s history of the early PC industry is a fascinating and entertainingly written anecdote-fest. He claims neither to be complete nor objective, yet seems to cover all the bases. Since most people these days deal predominantly with x86 architecture machines I think everyone should know the heritage and how we got from Bletchley Park to an iMac. (But without the iMac as it was written years before Apple returned to form.)
  4. Professional Software Development. When I first bought this I was a little annoyed. It’s actually the second edition of McConnell’s ‘After the Goldrush,’ just coming with a different name! I’m not sure that I would have bought it had I known, but I would have missed out. This is the only book of the eight here that talks about the industry as a whole, and how we should move away from the typical, and surprisingly common, “code and fix” development. He talks about certifications; architects; heavyweight methodologies; personality types; and a whole lot more. I can’t say that I agree with every last sentence, but it’s well worth reading just to get a perspective.
  5. Peopleware. It’s amazing to think that it took until the 1980’s before the human elements of writing software were seriously considered. Even now most Computer Science seems to concentrate on the more technical aspects. This book was probably the first to discuss the “human factors” of software development and is still the best that I’ve read.
  6. Programming Perl ((This link is to the third edition. I currently only have the second.)). I include this book at least partially because I wanted to show that it was possible to have a densely technical book that was also well thought out and entertaining. The structure is superb and I can’t think of any other programming tomes that have made me laugh out loud.
  7. In the beginning was the command line… ((You can also download it from Neal Stephenson’s website.)) I think that this is an interesting book for two reasons. Firstly it describes the reason why Unix is as it is better than any other. Secondly, it explains the various major operating systems (and some minor or — now — non-existent ones) in approachable analogies rather than dense jargon.
  8. Conceptual Blockbusting. There are few other professions where your output is almost entirely brainpower. A computer program is really little more than a slightly less ephemeral rendition of pure thought. So if you can’t think your way out of a particular problem you’re in trouble! This book makes you more aware of your own intellectual processes and outlines different ways of approaching problems. Invaluable.

As you may have noticed, many of these books are the same as last time! Does this indicate that I’ve been reading less? A little perhaps, but I’d like to think that it’s because by picking books not related to specific versions of particular technologies I’m increasing my odds of finding the classics.

What do you think? Any other good choices that I missed?

Competitive Threat

As many readers know by now I am in the late stages of developing and releasing an iPhone application. This is the first time I’ve ever really been involved in the launch of a consumer product and while there’s nothing here that is likely to surprise any marketing guru’s, I’m finding it an interesting process.

I talked about pricing previously, but today I want to talk about the competition.

I downloaded the SDK ((Software Development Kit, the program you use to write other software.)) shortly after the original announcement. The first version was fairly primitive, with little to no support for the drag-and-drop style of development used for parts of Mac OS X programs. I played around a bit, compiled a few demo applications but didn’t really get very far. Too hard, I though.

The beta’s came and I started having ideas for programs that I might want. Initially I thought they were too easy for a professional developer and certainly something that other people would be working on.

Turns out that I was wrong. Not only were most of the applications available on launch day very simple — tip calculators, currency converters — but no-one had thought to implement my idea.

Partly as an “itch to scratch” and partly because I had no competition, I set to work. This time rather than doodling around I had a goal. Well, a vague goal. My first attempts were too ambitious for my limited experience of the SDK and didn’t go very far.

I really gained some traction when I switched to my current scheme. All was going well until a couple of weeks ago when I saw a headline announcing my first competitor.

My first reaction was panic.

My second reaction was also panic.

It was a big deal. I’d got used to having no competition, to dictating myself exactly what features it needed to have and to thinking entirely in abstract terms about pricing. Reality intruding was hard.

I eventually calmed down enough to download a copy. Fortunately reality wasn’t nearly as bad as the simple idea of a competitor. Although unfinished, my application was already more sophisticated. It worked in a slightly different way but mine had more features, more closely conformed to Apple’s user interface guidelines and provided better feedback to users.

It did mean that I had to refine my thinking about pricing. But most importantly I had to start considering when to release it. Should I trim a few features so I could release it early? Or keep going, be a bit later but have something unique? In the end I just decided to keep going. Another “me too” product wouldn’t have managed to overcome their first-mover advantage, but extra features might.

If there’s a lesson here it’s that making the best product you can is a better use of your time than examining the competition. Happy users is the key to success and improving your software is the best way to achieve that.