← Field notes koodalanne

Field note 04

Why debugging resembles fixing punctures

Find the hiss before you patch.

Rider crouched, fixing a bike with a toolbox.

You get a flat.

You could immediately replace the tube.

You could also pump it up and listen.

Pssssss.

There it is.

Debugging is often like that.

Something is broken.

The temptation is to change the thing that looks broken.

Sometimes that works.

Sometimes you've just put a very nice patch on the wrong hole.

I prefer finding the hiss first.

Where did the unexpected thing actually begin?

What changed?

What assumption stopped being true?

Once you find the source, the fix is usually much less exciting than the investigation.

Which is fine.

A good puncture repair isn't supposed to be exciting.

You just want to get back on the bike.

And preferably not hear

pssssss

five kilometres later.