July 21, 2019
MarkBernstein.org
 

The Problem With Software: Why Smart Engineers Write Bad Code

by Adam Barr

This book works to explain why software doesn't work better — why software makes mistakes and why it remains vulnerable to attack. I’ll take up the book’s argument in a later post. First, I want to set the scene: software is hard because the world is complicated. Even the easiest things turn out to be very tricky when you examine them closely.

Suppose you’re writing a program one day, and you need to store people’s names. That’s easy enough, right?

Patrick McKenzie wrote a classic note on Falsehoods Programmers Believe About Names, because it turns out that “Patrick McKenzie” is a really tricky name to write in Japanese. (If you’re a global enterprise, you’d better be prepared to cope with names in Japanese, Urdu, and Klingon.) Here’s the classic Falsehoods Programmers Believe About Time; you’d be amazed at how many of these have actually arisen when working on Tinderbox. On GitHub, there’s even a curated list of lists of falsehoods.

Lots of these falsehoods are obvious once you see them, but they’re seldom obvious when you’re starting out — especially when you're just recording these names as one easy step toward solving a really difficult problem. So, you're focussing on getting really fast response times or compacting the index into a really tiny amount of memory or on the transitive closure of the social graph, not on esoterica about names. And if you did think deeply about the esoterica, you’d never get anything done in the first place.

It’s a mad, mad world.