Saturday, May 12, 2012

Who gets the time — man, or machine?

I just stumbled over an interesting observation from an old time (about an even older era):
Mathematicians were so conscious of efficiency considerations that they could not imagine wasting any extra computer time for something a programmer could do by himself.[1]

Today, it's the other way round. The situation has changed, and so have the instincts of programmers. The primary task today (in mainstream programming) is to transform a domain requirement into a system's behavior, and that requires thinking on a higher level than algorithms and computations. Those things are assumed to be implemented already (both correctly and efficiently) in compilers and standard libraries. Smallish details of the code are taken over by tools: syntactic correctness is checked by compilers, type checks are done either statically or at runtime by compilers or runtime environments, semantic properties of code passages are verified by unit tests and code contracts.

What all these have in common is that they can be executed in milliseconds by a stupid machine. It's not necessary for the programmer to keep details about the execution flow, data vectors and so on in mind all the time, verifying them every so often silently in the head or empirically in the debugger. This is a waste of time, energy, and attention. Such details are specified and encoded once and then verified periodically in an automated manner. So the motto for programmers today is the exact converse of what Knuth and Trabb Pardo observed about the past: programmers nowadays are becoming once again conscious of efficiency considerations, and thus more hesitant to waste any brainpower for something a computer can do by itself.

If you think about it, that is how it should be. What Knuth describes is an anomaly, a unusual phenomenon. Historically, whenever people started to use some kind of technology, be it the wheel or the steam engine, the goal was to get rid of tasks and chores, not to take them on. Machines are tools, not gods. They shouldn't get the best of your time and abilities, but they're precisely there to take over everything else so that the higher powers of mind are freed from stupid, repetitive work and can be dedicated to pursuing higher-level goals — of which no machine has any understanding (at least, so far).

[1] From Donald E. Knuth and Luis Trabb Pardo, "The Early Development of Programming Languages", in: A History of Computing in the Twentieth Century. Ed. by J. Howlett, N. Metropolis, and Gian-Carlo Rota, New York: Academic Press 1980, 197–274. Didn't look it up myself, quoted from another article.

No comments:

Post a Comment