Friday, 24 September 2010

Heck is other people's code

It's been a couple of weeks since my last post, so whilst Bill Bruford's Earthworks captures my aural attention, I will vent a little about one of the main hassles that can beset a jobbing programmer - received code.

I am currently engaged in 3 projects (yay! I have some work!), two of which are longer standing than my recent redundancy. But all three are causing me grief in one way or another...

In most lines of work, one can generally pick up where another has left off. One will mumble and grumble about certain things that have been done before, or be pleasantly surprised by other bits of what is found. A clerk might despair of their previous incumbent's filing incompetence; a solicitor may be pleased to see the last person to touch a case made a note about an often overlooked piece of law; handymen will often have little praise for the last person to lay hands on the items that they have been called to 'fix.'

Software is little different from any other discipline in this respect. When one starts a new project, or returns to work on something that one hasn't touched for a long time (even six months can be a long time in programming), there can be many "err.. Qu'est-ce qui se passe?" moments (I'll refrain from the more common exclamations..). Equally there can be a number of 'oh, that's pretty neat' epiphanies, but they are generally fewer and farther between.

So I have three projects. The latest I have received generally seems of a reasonable standard, and certainly does what's its supposed to (it's code for two products which have been on the market for some time); however, getting the thing to compile on the various platforms for which it's specified has been a challenge, and one I have not been able to get through without some very gratefully received help. Most places I have worked, the received code will at least have the decency to be able to construct itself if you tell it where to look for its component parts. Alas this one has been an uphill struggle; it's almost there, but not totally done yet, hence taking a break to reflect here just to regain some clarity.

The other two projects are conversion projects of work I have previously undertaken (MIDI Madness and a vocal plugin written for the NTrack software studio). Both pieces of kit work well and are 'in the wild', but the respective clients asked me to make them available for the Apple Macintosh [a 'mac' for those unaware of the history ;-)]. This has meant a complete ground-up rewrite for one, and a switch of libraries for another. Dealing with my own code is alright, here and there I notice things and wonder what I was thinking, (let's call it a 'QQSP' moment, or maybe just 'QSP' for brevity); but getting it to grips with yet another person's (or company's) idea of how something should 'work' and how I can stitch something that was perfectly solid onto can be.. well, a long and quite windy road. The odd thing is that at the end of the day, both these projects will just do what they did before!

Right, well, back to it...

No comments:

Post a Comment