Architects draw detailed plans before a brick is laid or a nail is hammered. Programmers and software engineers don’t. Can this be why houses seldom collapse and programs often crash? The basic idea is that more precise planning leads to better coding. But few programmers write even a rough sketch of what their programs will do before they start coding. Blueprints help us think clearly about what we’re building. Before writing a piece of code, we should write a blueprint. A blueprint for software is called a specification (“spec”).
He made this point in a Wired Opinion piece early last year, stressing that developers don’t construct buildings without blueprints and neither should programmers.
“You should write the instruction manual before you write programs,” Lamport said. “If you can’t explain clearly what this thing does and how to use it, then the user won’t be able to figure it out and you’ll be producing pretty lousy programs.”