San Francisco, 1976: I got my first computer! It was a high-class Cromemco, in a kit, and had a lightning fast Z80 processor that ran at (gasp) 3 megahertz, and a full 64K of memory.
I had a buddy who knew computers in and out — he wrote code for our satellites to determine whether a field in russia had wheat or alfalfa — and he put the kit together for me, cause I didn’t know how to solder back then. (He’s rich and retired long since, because he went to work for a new startup called Cisco, and they gave stock options; but that’s another story.)
He also gave me a book about beginning to program in Basic.
It showed a simple technique called ‘successive refinement.’ If you are a programmer then you know this technique but for non-programmers here, it’s really simple. And mongo useful.
Here’s how it works …
You first state what the program is to do, in one sentence:
“Manage a mailing list”
Then you refine that, as precisely as possible, still in ordinary words —
“manage a mailing list
input of an address
finding an address
editing an address
sorting the addresses
printout of the addresses
printing addresses on envelopes
printing addresses on labels
And then in similar manner you break these down. Pretty soon you discover that stating what it’s to do starts to look like code, eg:
“bubblesort( addresslistname, ascending )”
After a while it’s all code, and it will have these virtues —
(a) It’s structure will seem logical to a human
(b) therefore it’s easier to debug and later modify
(c) you tend to avoid can-of-worms code that goes everywhere
Now, and here’s my point, what’s really lovely is that this approach will work fairly well for most any project of any kind.
Successive refinement.
With this, you can become … refined. Cool.
Go Thee Forth and Prosper!
Leave a Reply