A question of style

daniel mocsny dmocsny at uceng.UC.EDU
Thu Dec 7 03:33:14 AEST 1989


In article <1765 at l.cc.purdue.edu>, cik at l.cc.purdue.edu (Herman Rubin) writes:
> In article <447 at lectroid.sw.stratus.com>, jmann at bigbootay (Jim Mann) writes:
> > But "most programmers don't do it" IS a good reason to avoid a 
> > contruct if other programmers have to maintain your code. 
> 
> Just as "most teachers can't teach it" is a good reason not to include
> important material in a course?

This is an example of everlasting conflict between Universality and
Virtuosity. When a single human is able to produce a completely
self-contained intellectual construct, then that human enjoys great
latitude for virtuosity. For example, great artists, musicians,
surgeons, athletes, and yes, teachers, are often mostly free to
exercise their abilities to their limits. The major drawback to
virtuosity, of course, is that it rarely out-lives whoever happens
to possess it.

When a single human is unable to deliver a completely self-contained
work, then that human must necessarily compromise her/his creative
freedom to satisfy the needs of all the other people who will
subsequently add value to it. This is rarely truer than with computer
software, where virtually every code of widespread consequence must be
readily understandable to many people. However, I believe the creative
programmer need not find this excessively burdensome. Rather, it
should be just another creative challenge---how to write code that not
only performs efficiently, but also illumines the human reader. A
masterpiece of code should both run well and have its meaning
virtually jump out and grab the next guy.

Nonetheless, the needs of computers and people are wildly different.
Probably only a few elite programmers can simultaneously realize
efficiency and clarity. A possibly more sensible approach would be to
build tools that translate machine-efficient code into something
easier for humans to understand. A documentation compiler, so to
speak. For example, a smart pager program could display someone
else's code to you, while other windows verbosely expanding cryptic
constructs into something readable, showing the original author's
comments, etc. While we're at it, we could throw in hypertext-style
references to applicable literature references, code-fragment
animators, etc.

Dan Mocsny
dmocsny at uceng.uc.edu



More information about the Comp.lang.c mailing list