Wednesday, May 16, 2007 - 10:09

The Jigsaw Model of Software Development

Last night I came up with (what I think is) a pretty good analogy for coding. Coding is like a putting together a jigsaw puzzle.

Putting that last bit of code in place that makes the whole system work is just like fitting that last jigsaw puzzle piece in place - you get the same kind of feeling, whether it's a 'wow, cool' or a warm and fuzzy feeling. The difference is that when coding, you're not so much trying to find the piece that fits as making it.

Now, there are two ways to make a piece that fits. You can look at the specs to figure out what shape the piece should be, or you could look at the surrounding pieces and figure out what shape would fit in with them. When you're coding on a single person project, it's fairly easy - you know what the pieces should look like, and if one piece you spent hours on doesn't quite fit, you can change some of the surrounding pieces a little to make it fit. When you're coding on a project with lots of other people, it's more difficult. They might not have created their pieces yet, so you can't use those to create the shape of your piece; you have to use the specs. And you can't really tweak their pieces to make yours fit.

Of course, it's even more difficult when the specs aren't very detailed. Then you only have a vague idea of the necessary shape, and the developer coding the neighbouring piece may have a different interpretation.

It's even more difficult when you don't know the system. Then you're trying to do a puzzle without being able to see the neighbouring pieces, and without seeing the picture on the box.

And if you're really unlucky, you're sometimes not even sure which part of the puzzle you're supposed to be working on, and which part of the puzzle you're actually working on.

Modularity helps, though. If you can build up a chunk of the puzzle, then fit your entire chunk into place, you have fewer unknown neighbouring pieces to worry about. If you have to add two pieces here and a piece there, and you have only a vauge idea of what shape they should be, and the neighbouring pieces aren't in place yet (or they are, but you can't see them properly- i.e. they haven't been explained to you), it's extremely difficult.

Low coupling helps too. Sometimes your piece has to merge so much into another piece that it's more like one piece was torn in half, than two separate pieces.

You also have to consider the picture on the box, not just the shape of the pieces. Think of the picture being the coding style - how do you handle exceptions? Do you cache objects locally? Do you use factories, or do you just 'new' objects? All these things contribute to the picture, and while you may have the right shape, your piece needs to fit into the picture as well. And if you can't see the box lid, and the other pieces haven't been created yet or are obscured by bits of paper of lying on top of them, it can be extremely difficult to get the shape and the picture right.

So. Coding by yourself is like doing a small jigsaw puzzle - difficult at times, but possible. Coding a system with other developers can be like doing a little jigsaw puzzle that fits into a larger one - you get to complete a piece, and together you all make something that none of you could have done alone; or it can be like doing a jigsaw puzzle where you don't know what shape your pieces should be, you can't see the surrounding pieces, you don't know what colour and patterns your pieces should have on top, and you can't see the box lid.

Labels:

Friday, May 11, 2007 - 11:57

Good Service, Bad Service

I haven't been blogging much lately - but that's mostly because I tend to blog about things that either really bug me or make me happy. Which would be fine, but there tend to be more bugging things than good things, and I don't want to be complaining all the time :-)

Especially when it's things that only affect me in a 'no man is an island' kind of way. Copyright issues, Telkom, eNatis, that kind of thing. But there are a few things that have been irritated me on a personal level, and so I might as well vent and get it out of my system.

Firstly - what is the use of estate agents that only work during work hours? I'm looking at townhouses to rent, but the agent with all the good properties won't show them after 5pm or over the weekend. Which is pathetic - most people work during the day, all day, every day.

Secondly - and I've mentioned this one before - companies (in the UK) that will take money from your bank account, but will only refund by cheque. I'm trying to negotiate with Tiscali at the moment, but I suspect it will, again, end up being a refund cheque. It may work in the UK; it doesn't work if you've left the country; and it specifically doesn't work if you now live in South Africa. And as an aside - British Gas still haven't replied to any of my queries or complaints, and the Energy Ombudsman won't even consider stepping until 3 months has gone past with no reply. Again, pathetic.

And my last complaint for the day - Satrix. This is an ETF/index tracker investment fund in SA, and the nice thing is that you can invest directly and don't have to go via a broker (thus avoiding brokerage fees). I'm sure the investment side is great; they've been posting really good returns. But the admin side is, again, pathetic. Really unprofessional and disorganised. They lost my application form; they lost my internet access application form. They have different fax numbers on the form and on their website. Their website looks like it was designed by some who thought they were being really clever, but were just being an idiot by being totally non-standard. Queries get answered by multiple people. Queries get answered incorrectly (I was told my internet account had been activated, and it took 3 or 4 days of errors to be told it hadn't been activated). A letter I received in the post from them had a phone number written on the back, scribbled out. The grammar used by the customer service agents is barely primary school level: "I have tried to allocate it on our systems but was not successful. it seems that your forms had been missed place and no submitted through." Notice the allocate instead of locate, missed place instead of misplaced, and no submitted instead of not submitted. And "We apologies for the inconvenience." So I just hope their money management is better than their customer management!

On the good side, and just to prove that I don't only complain, I bought a new car a few weeks ago and I was very impressed. It's a Kia Picanto, in Diamond Blue (I'll post a picture sometime), and the whole experience was remarkably simple. I thought it might be a problem to get the model I wanted in the colour I wanted, but luckily one was just arriving by ship when I started talking to the dealer. The salesman (from Kia Cape Town - the other branches aren't as good) was pleasant, friendly, knew what he was talking about, and wasn't at all pushy. They delivered the car to my house, and every now and then phone up to see if everything's going okay (which it is - the only problem is the licencing, and that's the government's problem, not theirs). Really, they were brilliant and I wouldn't hesitate to recommend them to anyone who wants to buy a Kia. The car itself is also great, although I haven't driven for a year, and not much before that, so I need to practice a bit before I'm comfortable driving to work :-)

Labels:

Friday, May 04, 2007 - 11:21

Merging MSN and GoogleTalk

So now that I'm working at a company that actually allows me to run MSN again, I had to decide if I wanted to run MSN, GoogleTalk, or both.

The thing is that some friends are on GoogleTalk, and some are on MSN - but I don't really want to have two different windows to monitor. And I like the GoogleTalk interface; I did consider installing Psi, or something like that, but the interface is pretty important. So I did a quick search on the net, and found a way to trick GoogleTalk into loading my MSN contacts :-)

It's really easy - basically, you set up Psi using your GoogleTalk account, then connect to a server that supports MSN. Load your MSN contacts, and then log out of Psi; and the next time you log into GoogleTalk, you'll see all your MSN contacts as well as your normal contacts! It supports personal messages and images, although you might have rename the MSN contacts to something a bit more aesthetically pleasing.

For more detailed instructions, go here.

Labels: