Изменить стиль страницы

My other life as a computer geek was excitingly active and remunerative. As I taught myself about code, I discovered yet another culture on the newsgroups of Usenet and in meetings of the Houston Area League of PC Users (HAL-PC), “the world’s largest PC user group.” Programmers had their own lingo, their own hierarchies of value and respect, their own mythology. Many of these new norms were being created online. By the turn of the twenty-first century, Scott Rosenberg notes, programmers were writing

personally, intently, and voluminously, pouring out their inspirations and frustrations, their insights and tips and fears and dreams, on Web sites and in blogs. It is a process that began in the earliest days of the Internet, on mailing lists and in newsgroup postings … Not all of this writing is consequential, and not all programmers read it. Yet it is changing the field — creating, if not a canon of the great works of software, at least an informal literature around the day-today practice of programming. The Web itself has become a distributed version of that vending-machine-lined common room … an informal and essential place for coders to share their knowledge and kibitz. It is also an open forum in which they continue to ponder, debate, and redefine the nature of the work they do.1

One of the urtexts in this shared folklore of computing is “The Story of Mel, a Real Programmer.” It first appeared on a Usenet discussion board in May 1983, as a riposte to a recently published article “devoted to the *macho* side of programming [which] made the bald and unvarnished statement: Real Programmers write in FORTRAN.”2 Our Usenet storyteller here, like any chronicler of the days of yore, wants to set the quiche-eating, FORTRAN-writing young ’uns straight. He begins:

Maybe [real programmers] do [use FORTRAN] now, in this decadent era of Lite beer, hand calculators, and “user-friendly” software but back in the Good Old Days, when the term “software” sounded funny and Real Computers were made out of drums and vacuum tubes, Real Programmers wrote in machine code. Not FORTRAN. Not RATFOR. Not, even, assembly language. Machine Code. Raw, unadorned, inscrutable hexadecimal numbers. Directly.3

This post was originally written in straightforward prose by Ed Nather, an astronomer, but some anonymous coder responded to its rhythms and elegiac tone and converted it into free verse, and so it has existed on the Web ever since:

Lest a whole new generation of programmers

grow up in ignorance of this glorious past,

I feel duty-bound to describe,

as best I can through the generation gap,

how a Real Programmer wrote code.

I’ll call him Mel,

because that was his name.4

Mel, the eponymous protagonist of this epic, is the kind of programmer who is already a rarity in 1983: he understands the machine so well that he can program in machine code. The conveniences afforded by high-level languages like FORTRAN and its successors — which now all seem primitive — have by 1983 already so cushioned the practitioners of computing from the metal, from the mechanics of what they do, that they are hard-pressed to debug Mel’s code. Mel’s understanding of his hardware seems uncanny, mystical, a remnant from a bygone heroic epoch:

Mel never wrote time-delay loops, either,

even when the balky Flexowriter

required a delay between output characters to work right.

He just located instructions on the drum

so each successive one was just *past* the read head

when it was needed;

the drum had to execute another complete revolution

to find the next instruction.

He coined an unforgettable term for this procedure.

Although “optimum” is an absolute term,

like “unique,” it became common verbal practice

to make it relative:

“not quite optimum” or “less optimum”

or “not very optimum.”

Mel called the maximum time-delay locations

the “most pessimum.”

I have often felt that programming is an art form,

whose real value can only be appreciated

by another versed in the same arcane art;

there are lovely gems and brilliant coups

hidden from human view and admiration, sometimes forever,

by the very nature of the process.

You can learn a lot about an individual

just by reading through his code,

even in hexadecimal.

Mel was, I think, an unsung genius.5

Within the division of Microsoft that produces programming tools, a Mel-like programmer is represented by the persona “Einstein,” who is an “expert on both low level bit-twiddling and high-level object oriented architectures.”6 There is also another persona named “Elvis,” a “professional application developer.”7 As described by Eric Lippert, former senior software engineer at Microsoft, both Einstein and Elvis “got their jobs by studying computer science and going into development as a career.”8 And then there is the persona “Mort,” who is “an expert on frobnicating [tweaking, adjusting] widgets, [who] one day realizes that his widget-tracking spreadsheets could benefit from a little [Visual Basic for Applications] magic, so he picks up enough VBA to get by.”9

The vast majority of programmers in the world today are Morts. Despite my intermittent, fumbling attempts at studying data structures and algorithms — the bricks and mortar of computer science — I most definitely remain on the Mort end of the scale. The ever-receding minority of Mels and Einsteins has observed this democratization of the computer with mixed feelings: on the one hand, the legendary early hackers at MIT and Apple are revered precisely because they took on the bureaucratic priesthood that protected the mainframes, defeated its defenses, and made computing available to all; on the other, the millions of Morts who have benefited from the computer revolution produce awful, bloated, buggy software because they don’t know how the machine really works, and, what’s worse, most Morts don’t want to know. “Mort is a very local programmer — he wants to make a few changes to one subroutine and be done,” writes Lippert.

Mort does not want to understand how an entire system works in order to tinker with it. And my goodness, Mort hates reading documentation … Mort’s primary job is to frobnicate widgets — code is just a means to that end — so every second spent making the code more elegant takes him away from his primary job.10

Mort lacks “mechanical sympathy,” that quality possessed by the best race-car drivers, who understand their machines so well that they flow in harmony with them.

To the Morts of the world, and even to the Elvii, Mel the Real Programmer’s programming is inscrutable and his mystique dazzling. The narrator of our epic is asked to investigate and change the behavior of a program that Mel has written. He reads through Mel’s code, and is baffled by an “innocent loop” which doesn’t have a test within it — as is usual — to break the loop. Code loops always contain a conditional test of the form “if numberOfLoops > 4 then break”; without such a construct you are trapped in an endless circling repetition. “Common sense said that it had to be a closed loop, / where the program would circle, forever, endlessly.”11 But Mel’s program doesn’t get stuck in the loop, it flows through, it works. It takes the narrator two weeks to comprehend Mel’s uncanny melding of code and machine, which uses the test-less loop and a programmer-forced malfunction in the system’s memory to position the next program instruction in the right location; such is the force of this revelation that “when the light went on it nearly blinded me.” After such knowledge, reverence is the only proper emotion; the narrator tells his Big Boss that he can’t fix the error because he can’t find it.