Occam's Razor

...not one of these... it's a different thing.
Programmers don't seem to be given tools to diagnose problems, whereas physicians do - Occam's razor, differential diagnosis.

A doctor uses mental tools such as Occam's Razor and Differential Diagnosis to justify a particular prognosis or diagnostic route. These tools provide a quick and relatively   simple framework for making quick decisions from the available information.

Occam's razor is given as:
entia non sunt multiplicanda praeter necessitatem
entities should not be multiplied beyond necessity

Differential Diagnosis

This is the most useful thing you can learn while eating curry, drinking beer and watching TV.

Seen House? Know what the differential is?

It's where someone works out what the problem is just be the presence of some information. This is differential diagnosis.

One thing at a time

Be scientific, not idiotic.

You need to be able to measure your tests, even if the measure is as corse as "it worked" versus "it didn't". To be able to do this, you need to know what changed and what you expect, so you need to change a controlled number of things and you need to expect something.

Make it Fail

This is a technique with two major uses.

Prove the problem and prove you're making a difference.

In reverse order...

Logs

Logs are fucking great.

They are like seeing what's going on in peoples' minds, what they're up to and how all the shit you built it behaving.

But most people don't look at them.

Oh, but some logs are shit. They really are terrible, and cannot be used.

So there are 2 skills you need: excellent log-reading skills, and excellent log-writing skills. We'll cover the reading skills first, because you'll sympathise with the readers of bad logs and better understand how to read good ones.

History

How did we get into this mess?

The history of the system will tell you a lot about the state of it.

There are two types of state change:

  • the data within the system
  • the behaviour of the system

As these 2 interact, they produce a hellish combination of results. Data changes over time and if the behaviour of the system fiddles with that data, you end with a confusing array of behaviour and data.

Error Messages

And what exactly do we learn from this?
A generation has grow up with either the blue screen of death or the whirly beach ball of death. A minority with unix error messages.