4 ms·
One way in which it is comparable is you make up the program as you go along. You do have some sense of what you are about to write. But it's not that clear. Y
by mcartyem 14y ago
One way in which it is comparable is you make up the program as you go along.
You do have some sense of what you are about to write. But it's not that clear. You are not exactly sure what the program will turn out to be until you sit down to start writing. Like writing, rampant thoughts pull you in multiple directions until one seduces you into following it.
It's surprising how seemingly irrelevant factors affect the program. A recent conversation with a non-programmer, a change in the weather, where you are sitting, or music are enough to set you off in a different direction. If a sense of design isn't precisely what shapes a program, a programmer would do well to pretend that it is.
The counterpoint to the binary search analogy is that there are infinite ways to avoid writing a program that needs a binary search and write a different program instead.