Tag Archives: Programming

Professionalism

A few years ago I was subcontracted to one of the large consultancies. I was taking over from someone who was, supposedly, quite senior and the task at hand, I was told, was very hard. I should take copious notes as she wouldn’t necessarily be around afterwards to help me. Making a mistake or missing out any one step could be disastrous to the whole process. If I did everything properly each new installation would take about a week.

This turned out not to be entirely correct.

After sitting through over a week of her spelling out each and every step in excruciating detail — much of which I don’t think she really understood — I spent three days writing a shell script to automate over ninety percent of the process. I don’t mean a quick, shoddy hack either. I spent the time to gold-plate it. It was a work of art. I set it up so that you only needed to copy the one file and allowed for the user forgetting to switch FTP into binary mode ((I basically appended a tar’d and uuencoded file to the end of the shell script which it knew how to extract and decode.)).

In the end, my three days of work reduced the week long process to about an hour, and most of that was waiting for the file to transfer over the network.

I say all this not to show off. I think any engineer would have thought to do this. I note the extra refinements so you realise that it could have been done in much less than three days had I not wanted to practice my Unix-fu.

Result: I was heavily criticised for not following the proscribed process. I pointed out that my new scheme was quicker, easier and less error-prone. They countered that I had been unprofessional to begin a “development project without authorisation.”

What does “professionalism” mean to you?

Sometimes, I think, it’s used as an excuse to do or not do something in a particular way. “That’s not professional” is kind of a cop-out. In this case I can only assume that the real reason was that they wanted to bill a week of my time to the client for each installation. Of course they couldn’t say that.

Since then, every time I hear the phrase “that’s not professional” I try to drill down and find the real, underlying reason. I’m hoping that one of these days I won’t be disappointed with what I find. It hasn’t happened yet.

My delicious.com bookmarks for February 12th through February 14th

  • Scientists Agree: It's in His Kiss – "Over 90 percent of human society engages in what, if you get right down to it, seems like a very strange thing to do: putting faces together and trading spit." Seems like a very appropriate thing to discuss on Valentine's Day…
  • Anti-Bootlegging Measures and the iPhone App Store – There's a lot of talk about cracked iPhone apps at the moment and the measures that developers are taking. The interesting and surprising thing here is how effective a polite message is, at least in the case of a Mac app.
  • 1234567890 Day – Finally, an event worth celebrating…

My delicious.com bookmarks for January 28th through February 3rd

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.

What Price?

This originally started as a question on Apple’s support boards:

With the current AppStore model (which seems to be a money machine for developers) I do not understand why anyone would give away their applications. At least charge $0.99 and get something back for your hard work.

So, why do you give away your apps?

With the caveat that I have not actually submitted anything yet…

My motivation in writing an application was entirely for the pleasure of doing it. If I never do anything with it once it’s “finished” my goals have been achieved. So my only objective in pushing it to the AppStore is for other people to get some benefit from using it too. There is little incremental cost in doing so and zero cost means that it gets the widest possible distribution.

There are also disadvantages to charging for it. Firstly, by paying something for software users expect more. They want support and bug fixes and enhancements. Maybe they want those same things with free software but there’s less obligation. Also as a non-US citizen there are complications in getting paid the full amount due.

That’s not to say that I won’t charge for it. At the very least I would like to be able to cover my costs. By which I mean the iPhone Developer Program fee, the $99 they charge you for the privilege of deploying your own software on your own phone.

But there are complications in pricing any iPhone program.

The first obstacle is that pricing has not stabilised yet. Disregarding the loss-leaders such as the NYT reader and the Facebook program, there is still a wide variation in cost. Consider something as trivial as a tip calculator. I only had a quick look, but I found half a dozen and they ranged from free to £1.19 with most at the 59p level. I found significant variations in costs for pretty much every category I looked in.

Now the app that I’m writing is a good deal more sophisticated than a tip calculator. My initial assumption was that people would be loathe to pay for it but if others can sell a tip calculator — something you can do using the built-in calculator program — for £1.19 and still garner good reviews then surely I am undercutting myself?

But it’s also easy to price too high. As Daniel Jalkut said, “We hope to hit ‘pretty much on target’ from the start, to avoid embarrassment and second-guessing. If you price too low, you?ll have a hard time imposing a major increase.”

Another popular option is to have a paid-for version and a more limited, free version. The problem I have with that is you have to decide which features would be worth paying for without making the free version so limited that people just bin straight away. I’m not sure that there is an obvious dividing line with my application. Plus I like the simplicity of having a single version. I think it makes the “message” easier to explain — think the single version Mac OS X versus the half-dozen versions of Windows Vista — and, as an added bonus, is much easier for me to administer. I don’t have an economics background, but Joel Spolsky tells me that this is called segmentation.

There also seem to be a few cases where people are offering advert supported free versions. This is not a solution that I am entertaining. As a user I object to precious screen real-estate being taken up by an advert. As a developer I object to the extra work, uncertain income stream and the likelihood of introducing new bugs in a non-critical area of code.

In summary: the more I think about this, the more I get confused.

My del.icio.us bookmarks for July 15th through July 16th

  • Ars Book Review: "Patent Failure" – Interesting book review about the effect of patents on an industry. Apparently cost more money than they make in anything but chemical and pharmaceuticals.
  • Lucky to be a Programmer – I don't program as much as I used to but this explains why I love to when I get the chance.
  • WordPress 2.6 – Usual drill. I've upgraded to the latest version of WordPress, the underlying software of ZX81.org.uk. If you see anything wrong please let me know!
  • 20 Amazing Facts About  Voting in the USA – Still in any doubt that computerised voting machines are a bad idea for free and fair elections?