Murphy’s Law says that anything that can go wrong will go wrong. Programmers did not invent it, but they have tested it more thoroughly than anyone. Here is our version of the classic list, retold for people who ship software.

On programs
- Software that people actually use will need changing. Software nobody uses will need documenting.
- The usefulness of a report is inversely proportional to the number of pages it prints.
- A program grows until it fills all available memory, then asks for more.
- Code becomes more complex until it is just beyond the skills of whoever has to maintain it.
- By the time a program is finished, it is out of date.
On bugs
- Every program that does anything interesting has at least one bug.
- Corollary: if you cannot find a bug, the program is not doing anything interesting.
- Corollary: the bug will show itself the week after its author leaves the company.
- Changing one part of a working program breaks another part that has nothing to do with it.
- The quietest bugs do the most damage, usually by corrupting data and getting someone else’s problem blamed for it.
- A program that has been “fully debugged” crashes on the one day the backups did not run.
- Bugs you can detect are a finite set. Bugs you cannot detect are not.
On people
- When the hardware fails, the software gets blamed. When the software fails, the hardware gets blamed. Both teams are partly right.
- Adding developers to a late project makes it later. Fred Brooks wrote this down in 1975, and managers have been rediscovering it ever since.
- Let programmers write code in plain English and you will learn that programmers cannot write plain English.
If any of these feel familiar, the cure is the boring one: tests, code review and backups you have actually restored from. Murphy still wins sometimes, but at least you will see him coming.