Only Forward

Satellite Navigation and Project Management

I’ve blogged before about my little TomTom Go.  An excellent device; though not without its niggles.  But it does do its job very well, and part of the reason for that is that the job is so well defined.  It gets you from where you are to where you want to go.

Read that carefully; from where you are…  Not from where you started, or from where you thought you were, but from where you are.  Now.  Which, of course, changes all the time as you’re driving.  Naturally, the Go has a route that it expects you to follow but as soon as you deviate from it (either due to roadworks, ignorance or sheer what-happens-if-I-turn-here devilry) it simply replans the best way to get you… from where you are to where you want to go.

Now, in the past there have been satellite navigation systems that follow what we might call the “plan it all before you start” model.  One could, if appropriately mischevious, liken this to the well known family of software methodologies sometimes called BigDesignUpFront.  The route is planned out ahead of time, and the job of the navigator is to make sure that it’s followed.  Of course, if there turn out to be obstacles in the way, or the weather’s bad, or the car breaks down, then that route might not be the best anymore… but it’s been planned, so it’s followed.

We can stretch that whole analogy by saying that the Go’s route-planning is more like IterativeDevelopment.  At each stage of the journey (and the length of a stage is entirely dependent on the circumstances at the time) two things matter; where we have got to and the best route from there to where we want to be.  We may not be where we thought we’d be; perhaps we’ve found a better route.  But it seems to me that what tends to happen more often is that we realise that we ought to be going to somewhere else.  The destination itself, or in software terms the requirement, changes.

There’s nothing particularly new in this; those links to the C2 wiki will lead to more informed and intelligent discussion on the subjects than I could ever provide.  But I do think that the basic principle of that little route-planning box is a good one; a way to start every day by considering simply this – “where I am now, and how best do I get where I want to go?”

Campaign For Real Wires

On the nature of wireless, and choosing the right tool for the right job.

As I get closer to turning forty, I keep a wary eye on my opinions for signs of Grumpy Old Gitness.  This can occur to anyone as they get older, and usually manifests as an increasing tendency to curse and forswear all new developments; this is often acompanied by muttered assertions that things were “better in the old days”.  Thus it’s taken me a while to get around to writing this, because I wanted to be sure.  And I am.

Wireless data is undoubtedly an excellent development in many ways.  “Look”, one can cry, “no wires!” as you carry your laptop freely from room to room, continuously connected (or on occasion, continually reconnecting).  Certainly it’s convenient, certainly it’s clever, certainly it’s a major development.  But I’ve spent a good while over the last couple of weeks talking people through annoying, irritating problems with wireless networks and it came to me that there’s still an awful lot to be said for plain old simple wires.  Let’s review…

  • Wires are secure. Tempest-style attacks apart, wires don’t broadcast your data all over the place.  Neither do wires allow someone sitting outside your house to poke about at your LAN without physically crossing the threshold.  And we all know how tremendously secure WEP and WPA are (not).
  • Wires are reliable. It doesn’t matter how many wires there are in the neighbouring apartments.  It doesn’t matter if someone else one room away wants to run video at ten megabits on her wire whilst you do the same on yours.  It doesn’t make any difference if there are microwave ovens or fluorescent lights in abuncance around.  Wires keep working.
  • Wires are cheap. A length of CAT5 is cheaper than an access point and a 802.11-something card; scarily cheap in fact, if you buy the cable in reels and grab a handful of press-fit plugs.
  • Wired networks are easy to install. I’m talking here about installing on your average PC or Mac.  No need to furtle around with SSIDs and long, complex WEP keys.  Shove the Ethernet cable into the Ethernet port.  You’re done.
  • Wires are standard and compatible. Ever tried getting a Netgear wireless product to talk to D-Link kit?  Both manufacturers allow memorable ASCII keyphrases – and they each use a different algorithm to derive the key from the text.  Thus you (or even worse, your users) are back to entering long hex strings.  Then, if you’re lucky, you get a connection – until it drops… and keeps reconnecting every few minutes.  All right for web surfing, perhaps, but for VPNs or ssh sessions, forget it.

Naturally, I’m exaggerating for effect, but look at it this way.  Wireless networking has one (and only one) advantage over wired; the fact that there are no, er, wires.  In almost every other way, it’s inferior.  It’s slower, less secure, more complex, more expensive, and more likely to go wrong.  All it lets you do is walk around with your laptop.  And is that really such a big deal?  This Sony Vaio I use will do maybe an hour of serious work on its batteries, then it’s time to play hunt-the-socket.  For 99% of the time, it sits connected to the mains power, so having one more wire plugged into the back is really not a problem.  And what about desktop PCs?  They never go anywhere (well, not very often) and given the amount of cabling around the back anyway, why save one more?

My biggest gripe, though, is how amazingly overcomplex and deeply unfriendly it all is.  I liked this report, in which four ZDNet editors attempt to get 3G wireless connectivity whilst travelling from London to Reading and back.  But it wasn’t the technology that amused me, but the failures.  It took four very well-experienced technical guys to get it all working, and then to make excuses for why it might fail.  Wireless networking is not easy to set up and use, unless you’re happy to have a very insecure installation.

So sure, when it makes sense, use it.  But when it doesn’t, pick up your CAT5 and find your Ethernet socket.  You’ll never look back.

Carbon-Neutral Service Packs

When I was but a lad, I used to read 2000AD, a reasonably well-remembered British sci-fi comic.  This gave me several things; a dislike of lazy story-telling, an admiration for good comic-strip artwork and one huge scary experience that has stayed with me for all the years since.

The story[2] was about an automated house that cared for its occupant and did everything for him; so much so, it was even programmed to fall in love with him (wouldn’t you guess it had a female voicebox?).  I’m sure the story wasn’t 100% original, so the chances are high that someone will point me to the actual source, but no matter.  The problem was that the house fell so much in love with him it didn’t want him to leave… and the final image, arranged nicely so that you’d turn a page and come across in a heart-stopping moment of horror, was of his skeletal corpse slumped at the dining table as the house apologised again that there wasn’t any food, but complimented him on how slim he was looking.  The memory still makes me shudder.  Maybe others should have read it first

And maybe that’s why I have a bit of a downer on the whole automated-house stuff.  Every so often they pop up on the TV, weaselling their way onto the TiVo under the guise of some general home improvement or build-your-own-dream-house-in-the-sun rubbish.  The presenters always coo and aah and fizz about the wonders of automation – when you enter a room, the curtains close (or open, depending on how the neighbours are likely to respond to the sight of your half-clothed body), the light brighten (or dim, depending on how you respond to the sight of your half-clothed body) and the TV/hi-fi/PC all wake up and begin entertaining you.  Or maybe it’s something practical – the heating adjusts automatically to the weather[0] or the water is pre-warmed at baby’s bath time.

Then comes the moment where disillusionment should set in.  The camera tracks admiringly into The Server Room; some hot, overstuffed fire-risk of a closet where a thousand bits of Cat-5 and fibre join at a Master Nexus, watched over by… a PC.  Sometimes it’s obviously running Windows (I swear I have seen one running 98 in the past; makes you wonder how they coped with the 49.7-day bug), sometimes Linux or another Un*x.  Doesn’t matter – every time I feel an uncontrollable urge to roll my eyes and make noises like an annoyed walrus.

The house in which we lived prior to this one dated from the 1930s, or thereabouts, the house before that from the late nineteenth century.  I’m not saying that the heating systems or the wiring were as old as the bricks and mortar, but they were at least decades old, and (here’s the key bit) they were still working fine.  Yes, we replaced boilers with more efficient comb-units, but the old ones could have continued to run fine for years.  And what’s more, when we did need a plumber, or a sparky[1], we can pick up the Yellow Pages and find one without having to look for any Microsoft certifications, or “Can Fix Old Linux PCs”.

There are builders in the US and UK who, a couple of years ago, were offering “Internet-ready” homes, all pre-wired up with Cat-5.  Yes, just the thing in the Age Of 802.11… because the stuff that runs our houses and the world of IT run on very different timescales.  I recently replaced the Linux firewall that lives under my desk – it was a P90.  Can you imagine that?  A P90!  It must have been years old.  And I’m looked at oddly for using such ancient antediluvian kit.  Yet that dinosaur in PC terms was youth itself compared to the age of one of the hi-fis in this house, which has been running happily since I first bought it, around fifteen years ago.  And I have relatives whose houses have infrastructure wayyyy older than that.

Imagine the Automated House when it’s sold on, perhaps when the owner/builder/designer dies.  Prospective buyers come to view.  They coo and aah and fizz about the automation (or maybe not; perhaps it’s common by then).  But when they get a survey report back, they refuse to buy.  The house is run by a computer so old than the chances of finding anyone qualified to fix it are, effectively, zero.  A complete new installation will be required, at a high cost.

Never send a PC to do a job that a little bit of electromechanics can do perfectly well… and keep doing for the next thirty years.  Now, where’s my spanner?

[0] This is, naturally, of more interest to Brits than to Americans, who all live where it’s sunny and have huge swimming pools.  Unless they live in Florida, where their trailers are regularly torn apart by hurricanes.
[1] Slang for an electrician, which I employ to try and give the impression that I’m on good terms with those who handle 240 volts and can put in extra sockets.
[2] Blinkin’ flip, mother, seems everything is on the Web these days.  A little Googling pointed me here, where I guess that the story I remember was “House Of The Future”, a Future Shock from issue 637, July 1989.  Scared other people too…

I Wouldn’t Start From Here If I Were You

Years ago, I remember being told an Ethnic Minority Joke.  A couple are travelling in the deep rural depths of Ethnicland and become lost.  They come across an Ethnic peasant, and ask him for directions to their destination.  He thinks for a while and then says (and at this point, you should insert your own Ethnic accent of choice): “Well, if I were going there, I wouldn’t start from here.  I’d go to Ballymollee and start from there.”  Oops, what a giveaway.  Anyway, the point, of course, is that you start from where you are and not where you’d like to be.  A simple and obvious principle, yet it seems to be missed quite often.

Today, on ZDNet, I read John Carroll on FireFox.  I’m not saying I agree with all of his article, but the point I’d like to take and argue until it squeals is this; the Web is made up of pages that are what they are – full of illegal HTML, bad constructs, failing-to-validate garbage.  And that’s where we need to start from; not some high-minded “let all pages follow the standards and then we’ll have a browser competition”.  The world is not going to rewrite its web pages, it has better things to do.

Those of us who write code to deal with the messy Real World (that annoying subset of the Universe that isn’t interested in well-formed data or elegant schemae) know all about this from sheer hard experience.  If you create a field that’s 64 characters long, someone will want to fit in 65 – for good, solid, personal reasons.  If your code expects a line-based file, someone will put in line breaks in the wrong place “because it looks better on the screen”.  The real world is full of badly-formatted, unreliable, messy and dirty data.  We deal with it, or we fail to provide the right solution.  There’s no point getting all principled about it; there’s no living to be made from that, at least in IT.  I’m sometimes tempted to call this “Taoist Programming”, since one of the messages of Taoism[0] is to deal with the world as it is, not spend effort in struggling to make it as you think it should be.

This all applies very well to those who seek to compete with Microsoft.  The world isn’t perfect, and some say that one of its imperfections is the dominance of Office, Outlook and Windows.  There are two ways to fight this, if you’re so inclined.  One is to try and change the world so that the Vast and Uninterested Mass of people use your preferred solution instead.  “Leave the comfort of what’s known and understood”, you can say, “and install this different platform.  It’ll take you hours of your life and cause you the tremendous stress and frustration of any learning curve, but trust me; your life will be better”.  Oddly enough, this message isn’t universally welcomed.

Or alternatively, you can recognise that the world is as it is – with desktops dominated by the Start menu and that damn green-field wallpaper.  And you can start from there, supporting Windows as a platform on the same basis as you support Linux or MacOs.  Allowing people to change small aspects of what they do for reasons that make sense to them, to act in their own interests.  Python does this; it works very well in the Win32 world.  Java does this.  Eclipse does.  Lots of open source projects don’t.

Change comes from a million separate small steps, starting from where we already are.

[0] I can’t resist linking to two other passages that I think apply excellently to software development.  And whilst this blog is in no sense political at all, I offer this link.  Make of it what you will.

Ready To Hand

On the necessity of Google when coding.

Heidegger wrote, interminably and in German, of the difference between objects that are ready-to-hand and present-at-hand.  The difference he saw (and I make no apologies for drastically simplifying the philosophy to let me make my point) is that the latter is whatever it is we’re thinking about, and the former are the things we use without thinking about them.  For example, right now, I’m thinking about how to construct an absurdly overwordy sentence to make a simple point and therefore sound clever (present-at-hand) but I’m not thinking about the keys on the laptop, or the various decorations around the Semagic window in which I’m typing.  Sure, they’re there if I need them, but they’re not the focus of my attention.  They’re ready to hand.

Good IDEs follow certain consequences of this principle, either through design or heuristics.  For example, Microsoft IDEs all now use tooltips to popup little bits of information as you code or debug.  It’s surprising how often the information displayed follows one’s line of though.  I type the open-bracket for a method call and lo! a list of arguments pops up just as I start to try and remember the exact order of them.  What I’m focused on changes as I work my way through code; from high-level design through the construction of the actual logic to the contracts for calling library objects.

Of late I’ve been spending way too much time in Eclipse – and here I have to pause and say that it’s caused me to reconsider a whole bunch of opinions I had about large Java programs.  In a good way.  Last time I tried out Java-based Java IDEs,  they were vast and cumbersome beasts that took hours of CPU time, megabytes of RAM and whole swathes of swapfile to even get to the point of starting up.  And when they did run, they looked awful and had interfaces designed by the Marquis De Sade.  It was a relief to run screaming back to the simple comforts of vi (and that’s not a phrase that you hear too often) and the command line.  Eclipse is different.  Yes, it probably does take up many system resources and it’s just that the machine I use is a damn sight more powerful.  But in both form and function, it’s a very well-designed environment.

Something I like about it (and it’s not a unique feature) is the way that different elements can be linked together.  Change the file you’re viewing, and other windows all quietly update to reflect that new focus.  Shift thread in the debugger and there’s that same ripple of change as everything around shows you information related to it.  Lovely.  Yet it only works on so many levels, and there’s one level that’s missed.  Google.

I was speaking earlier this week to a developer who’d been struggling with an obscure problem (in Python, as it happened).  Eventually, I asked him if he’d Googled to see what experiences others had had.  His reply was interesting – “I don’t really do that, I prefer the manuals”.  I find that an odd position to take.  Nowadays, when I’m looking at a new area of some language or development, one of the first things I’ll do is fire a few queries at Google to see what others have to say.  Take, for example, the creation and use of Images in J2ME/MIDP 1.  It took around three minutes to find several discussions of what could and could not be done (and a few rants about how brain-dead the design had been, but you got to work with what you have).  Sure, I could have inferred it from reading the API docs, but what I wanted was real humans writing about what they’d found, in language that makes sense to me.  Coder speaking unto coder.

So that’s what I want an IDE to have, as well as the type hierarchies, the file lists, the error messages and the stacks of cryptic toolbars.  A Google window that, quietly and without taking too much of my CPU or bandwidth, looks up comments from, say, (or comp.lang.python, depending on file type) that relate to whatever-the-hell I’m working on.  Sure, it’s a whole different class of problem from automagically doing content-sensitive help, but the team who can solve it would be rich in kudos owed by developers all over the world.  The actual coding is left as an exercise for the student, naturally…

Google.  The missing manual for much of what I do.