Skip to: Site menu | Main content

Blog > Writing Ubuntu Hacks is like creating threads with GOTOs

>> Writing Ubuntu Hacks is like creating threads with GOTOs

Thu, Mar 16th 10:20am 2006: Writing Writing Ubuntu Hacks is like creating threads with GOTOs

Scary, it's only a matter of hours now before Ubuntu Hacks gets passed from first-stage editorial review to the production phase. And there's sooo much more to do! It's amazing how much I've learnt in the process because even with topics I thought I already knew well I've had to do a bunch of research into all sorts of corner cases and background information that I've never had to care about before.

Each hack should be a concise sequence of steps or events, but in the real world when you're trying to make something work there are a huge number of ways that things can go astray. When I document a process I try as hard as possible to write "do A, then B, then C, then D" but to be comprehensive it often has to be "do A, and if you get result X do B, otherwise check the frobnotz and set up G, and when that works proceed to B but if it doesn't you may also need to do H, which may fail if you're on PPC because it needs the Q library, so..."

Of course that's the stuff we deal with as programmers every day so it's frustrating not being able to express it efficiently. It could trivially be represented in a flowchart, but prose is just not an effective way to convey parallel or optional sequences of events. It's like trying to write threaded code in a language that makes you control program flow with GOTOs.

But we're nearly done, and it'll be fantastic to finally see the end result. I'm told there's a Rough Cuts sneak preview listed on the Ubuntu Hacks page now but I haven't even seen it myself yet. Too busy finishing things off to stop and smell the roses!