eric@snark.thyrsus.com (Eric S. Raymond) (03/23/91)
Submitted-by: jargon@thyrsus.com Archive-name: jargon/part18 ---- Cut Here and feed the following to sh ---- #!/bin/sh # this is jargon.18 (part 18 of jargon) # do not concatenate these parts, unpack them in order with /bin/sh # file jargon.ascii continued # if test ! -r _shar_seq_.tmp; then echo 'Please unpack part 1 first!' exit 1 fi (read Scheck if test "$Scheck" != 18; then echo Please unpack part "$Scheck" next! exit 1 else exit 0 fi ) < _shar_seq_.tmp || exit 1 if test -f _shar_wnt_.tmp; then sed 's/^X//' << 'SHAR_EOF' >> 'jargon.ascii' && Xnew instructions for three of the stunts on the duplicated blanks. XFinally, they broke in once more, replacing the stolen master plans Xand substituting the stack of diddled instruction sheets for the Xoriginal set. X XThe result was that three of the pictures were totally different. XInstead of spelling "WASHINGTON", the word "CALTECH" was flashed. XAnother stunt showed the word "HUSKIES", the Washington nickname, Xbut spelled it backwards. And what was supposed to have been a Xpicture of a husky instead showed a beaver. (Both Caltech and MIT use Xthe beaver as a mascot. Beavers are nature's engineers.) X XAfter the game, the Washington faculty athletic representative said, X"Some thought it ingenious; others were indignant." The Washington Xstudent body president remarked, "No hard feelings, but at the time Xit was unbelievable. We were amazed." X XThis is now considered a classic hack, particularly because revising Xthe direction sheets constituted a form of programming. X XAnother classic hack: X XSome MIT students once illicitly used a quantity of thermite to weld a Xtrolley car to its tracks. The hack was actually not dangerous, as Xthey did this at night to a parked trolley. It took the transit Xpeople quite a while to figure out what was wrong with the trolley, Xand even longer to figure out how to fix it. They ended up putting Xjacks under the trolley and cutting the section of track on either Xside of the wheel with oxyacetylene torches. Then they unbolted the Xwheel, welded in a new piece of track, bolted on a new wheel, and Xremoved the jacks. The hackers sneaked in the next night and stole Xthe fused track and wheel! X XThe pranksters' plunder was later used as the trophy at the First Annual XAll-Tech Sing. They carted it in on a very heavy duty dolly up the Xfreight elevator of the Student Center. Six feet of rail and a trolley Xwheel is a *lot* of steel. X XA rather similar hack, perpetrated by a fraternity at CMU, cost their Xcampus its trolley service. X XThough these displayed some cleverness, the side-effect of expensive Xproperty damage was definitely an esthetic minus. The best hacks are Xharmless ones. X XAnd another: X XOne winter, late at night, an MIT fraternity hosed down an underpass Xthat is part of a commuter expressway near MIT. This produced an ice Xslick that `trapped' a couple of small cars: they didn't have the Xmomentum or traction to climb out of the underpass. While it was Xclever to apply some simple science to trap a car, it was also very Xdangerous as it could have caused a collision. As such, this was a Xvery poor hack overall. X XAnd yet another: X XOn November 20, 1982, MIT hacked the Harvard-Yale football game. Just Xafter Harvard's second touchdown against Yale in the second quarter, a Xsmall black ball popped up out of the ground at the 40-yard line, and Xgrew bigger, and bigger, and bigger. The letters "MIT" appeared all Xover the ball. As the players and officials stood around gawking, the Xball grew to six feet in diameter and then burst with a bang and a Xcloud of white smoke. X XAs the Boston Globe later reported, "If you want to know the truth, XM.I.T. won The Game." X XThe prank had taken weeks of careful planning by members of MIT's XDelta Kappa Epsilon fraternity. The device consisted of a weather Xballoon, a hydraulic ram powered by Freon gas to lift it out of the Xground, and a vacuum-cleaner motor to inflate it. They made eight Xseparate expeditions to Harvard Stadium between 1 and 5 AM, in which Xthey located an unused 110-volt circuit in the stadium, and ran buried Xwiring from the stadium circuit to the 40-yard line, where they buried Xthe balloon device. When the time came to activate the device, two Xfraternity members had merely to flip a circuit breaker and push a Xplug into an outlet. X XThis stunt had all the earmarks of a perfect hack: surprise, Xpublicity, the ingenious use of technology, safety, and harmlessness. XThe use of manual control allowed the prank to be timed so as not to Xdisrupt the game (it was set off between plays, so the outcome of the Xgame would not be unduly affected). The perpetrators had even Xthoughtfully attached a note to the balloon explaining that the device Xwas not dangerous and contained no explosives. X XHarvard president Derek Bok commented: "They have an awful lot of Xclever people down there at MIT, and they did it again." President XPaul E. Gray of MIT said, "There is absolutely no truth to the rumor Xthat I had anything to do with it, but I wish there were." X XStill another: X XAt Stevens Tech, a programmer, having seen the {Cookie Bear} program Xon the ITS systems, proceeded to write his own version for TOPS-10. XUnlike the ITS one, this version, called TSCB (Time-Sharing Cookie XBear) was able to simultaneously harass multiple users at a time with Xnumerous {bells and whistles}. It had a mode to look for a Xparticular user or program name and pounce as soon as it saw either; Xit accepted wildcards (e.g. the command `BOTHER [3??,*]' would sic the Xbear on all Chemistry Department users); and it had commands to hide Xas various other programs (making detection difficult if not Ximpossible). X XLater on, it acquired other, nastier features; the `PUNISH' command Xwould look for a particular user or program name and log that job out Xas soon as it saw it; the `IWANT' command could grab a reserved device Xfrom another user, etc. X XThis program became well-known in the Stevens folklore, and copies Xended up on just about everywhere despite the efforts of the Computer XCenter administration to eradicate it. Fortunately, this program Xrequired privileges to work; unfortunately, the ability of Computer XCenter employees to get and use these privileges with impunity lead to Xa strong `us vs. them' mentality among Stevens hackers. X XFinally, here is a great story about one of the classic computer hacks. X XBack in the mid-1970s, several of the system support staff at Motorola Xdiscovered a relatively simple way to crack system security on the XXEROX CP-V timesharing system. Through a simple programming strategy, Xit was possible for a user program to trick the system into running a Xportion of the program in `master mode' (supervisor state), in which Xmemory protection does not apply. The program could then poke a large Xvalue into its `privilege level' byte (normally write-protected) and Xcould then proceed to bypass all levels of security within the Xfile-management system, patch the system monitor, and do numerous Xother interesting things. In short, the barn door was wide open. X XMotorola quite properly reported this problem to XEROX via an official X`level 1 SIDR' (a bug report with an intended urgency of `needs to be Xfixed yesterday'). Because the text of each SIDR was entered into a Xdatabase that could be viewed by quite a number of people, Motorola Xfollowed the approved procedure: they simply reported the problem as X`Security SIDR', and attached all of the necessary documentation, Xways-to-reproduce, etc. X XXEROX sat on their thumbs...they either didn't realize the severity of Xthe problem, or didn't assign the necessary operating-system-staff Xresources to develop and distribute an official patch. X XMonths passed. The Motorola guys pestered their XEROX field-support Xrep, to no avail. Finally they decided to take Direct Action, to Xdemonstrate to XEROX management just how easily the system could be Xcracked and just how thoroughly the security safeguards could be Xsubverted. X XThey dug around in the operating-system listings and devised a Xthoroughly devilish set of patches. These patches were then Xincorporated into a pair of programs called `Robin Hood' and `Friar XTuck'. Robin Hood and Friar Tuck were designed to run as `ghost jobs' X(daemons, in UNIX terminology); they would use the existing loophole Xto subvert system security, install the necessary patches, and then Xkeep an eye on one another's statuses in order to keep the system Xoperator (in effect, the superuser) from aborting them. X XSo... one day, the system operator on the main CP-V software Xdevelopment system in El Segundo was surprised by a number of unusual Xphenomena. These included the following: X X * Tape drives would rewind and dismount their tapes in the middle of a X job. X * Disk drives would seek back and forth so rapidly that they'd attempt X to walk across the floor (see {walking drives}). X * The card-punch output device would occasionally start up of itself and X punch a {lace card}. These would usually jam in the punch. X * The console would print snide and insulting messages from Robin Hood X to Friar Tuck, or vice versa. X * The XEROX card reader had two output stackers; it could be instructed X to stack into A, stack into B, or stack into A unless a card was X unreadable, in which case the bad card was placed into stacker B. One X of the patches installed by the ghosts added some code to the X card-reader driver... after reading a card, it would flip over to X the opposite stacker. As a result, card decks would divide themselves X in half when they were read, leaving the operator to recollate them X manually. X XNaturally, the operator called in the operating-system developers. They Xfound the bandit ghost jobs running, and X'ed them... and were once Xagain surprised. When Robin Hood was X'ed, the following sequence of Xevents took place: X X !X id1 X X id1: Friar Tuck... I am under attack! Pray save me! X id1: Off (aborted) X X id2: Fear not, friend Robin! I shall rout the Sheriff of X Nottingham's men! X X id1: Thank you, my good fellow! X XEach ghost-job would detect the fact that the other had been killed, Xand would start a new copy of the recently-slain program within a few Xmilliseconds. The only way to kill both ghosts was to kill them Xsimultaneously (very difficult) or to deliberately crash the system. X XFinally, the system programmers did the latter... only to find Xthat the bandits appeared once again when the system rebooted! It Xturned out that these two programs had patched the boot-time OS image X(the kernel file, in UNIX terms) and had added themselves to the list Xof programs that were to be started at boot time... X XThe Robin Hood and Friar Tuck ghosts were finally eradicated when the Xsystem staff rebooted the system from a clean boot-tape and Xreinstalled the monitor. Not long thereafter, XEROX released a patch Xfor this problem. X XIt is alleged that XEROX filed a complaint with Motorola's management about Xthe merry-prankster actions of the two employees in question. It is Xnot recorded that any serious disciplinary action was taken against Xeither of them. X XThe Untimely Demise of Mabel the Monkey X======================================= X X The following, modulo a couple of inserted commas and Xcapitalization changes for readability, is the exact text of a famous XUSENET message. The reader may wish to review the definitions of X{PM} in the main text before continuing. X X Date: Wed 3 Sep 86 16:46:31-EDT X From: "Art Evans" <Evans@TL-20B.ARPA> X Subject: Always Mount a Scratch Monkey X To: Risks@CSL.SRI.COM X XMy friend Bud used to be the intercept man at a computer vendor for Xcalls when an irate customer called. Seems one day Bud was sitting at Xhis desk when the phone rang. X X Bud: Hello. Voice: YOU KILLED MABEL!! X B: Excuse me? V: YOU KILLED MABEL!! X XThis went on for a couple of minutes and Bud was getting nowhere, so he Xdecided to alter his approach to the customer. X X B: HOW DID I KILL MABEL? V: YOU PM'ED MY MACHINE!! X XWell, to avoid making a long story even longer, I will abbreviate what had Xhappened. The customer was a Biologist at the University of Blah-de-blah, Xand he had one of our computers that controlled gas mixtures that Mabel (the Xmonkey) breathed. Now, Mabel was not your ordinary monkey. The University Xhad spent years teaching Mabel to swim, and they were studying the effects Xthat different gas mixtures had on her physiology. It turns out that the Xrepair folks had just gotten a new Calibrated Power Supply (used to Xcalibrate analog equipment), and at their first opportunity decided to Xcalibrate the D/A converters in that computer. This changed some of the gas Xmixtures and poor Mabel was asphyxiated. Well, Bud then called the branch Xmanager for the repair folks: X X Manager: Hello X B: This is Bud, I heard you did a PM at the University of X Blah-de-blah. X M: Yes, we really performed a complete PM. What can I do X for you? X B: Can you swim? X XThe moral is, of course, that you should always mount a scratch monkey. X X ~~~~~~~~~~~~~~~~~~~~~~ X XThere are several morals here related to risks in use of computers. XExamples include, "If it ain't broken, don't fix it." However, the Xcautious philosophical approach implied by "always mount a scratch Xmonkey" says a lot that we should keep in mind. X X Art Evans X Tartan Labs X XTV Typewriters: A Tale Of Hackish Ingenuity X=========================================== X XHere is a true story about a glass tty. One day an MIT hacker was in Xa motorcycle accident and broke his leg. He had to stay in the Xhospital quite a while, and got restless because he couldn't {hack}. XTwo of his friends therefore took a terminal and modem for it to the Xhospital, so that he could use the computer by telephone from his Xhospital bed. X XNow this happened some years before the spread of home computers, and Xcomputer terminals were not a familiar sight to the average person. XWhen the two friends got to the hospital, a guard stopped them and Xasked what they were carrying. They explained that they wanted to Xtake a computer terminal to their friend who was a patient. X XThe guard got out his list of things that patients were permitted to Xhave in their rooms: TV, radio, electric razor, typewriter, tape Xplayer... no computer terminals. Computer terminals weren't on the Xlist, so they couldn't take it in. Rules are rules, you know. X XFair enough, said the two friends, and they left again. They were Xfrustrated, of course, because they knew that the terminal was as Xharmless as a TV or anything else on the list... which gave them an Xidea. X XThe next day they returned, and the same thing happened: a guard Xstopped them and asked what they were carrying. They said, "This is Xa TV typewriter!" The guard was skeptical, so they plugged it in and Xdemonstrated it. "See? You just type on the keyboard and what you Xtype shows up on the TV screen." Now the guard didn't stop to think Xabout how utterly useless a typewriter would be that didn't produce Xany paper copies of what you typed; but this was clearly a TV Xtypewriter, no doubt about it. So he checked his list: "A TV is all Xright, a typewriter is all right... okay, take it on in!" X XTwo Stories About `Magic' (by Guy Steele) X========================================= X XWhen Barbara Steele was in her fifth month of pregnancy in 1981, her Xdoctor sent her to a specialist to have a sonogram made to determine Xwhether there were twins. She dragged her husband Guy along to the Xappointment. It was quite fascinating; as the doctor moved an Xinstrument along the skin, a small TV screen showed cross-sectional Xpictures of the abdomen. X XNow Barbara and I had both studied computer science at MIT, and we Xboth saw that some complex computerized image-processing was involved. XOut of curiosity, we asked the doctor how it was done, hoping to learn Xsome details about the mathematics involved. The doctor, not knowing Xour educational background, simply said, "The probe sends out sound Xwaves, which bounce off the internal organs. A microphone picks up Xthe echoes, like radar, and send the signals to a computer --- and the Xcomputer makes a picture." Thanks a lot! Now a hacker would have Xsaid, "... and the computer *magically* (or {automagically}) Xmakes a picture", implicitly acknowledging that he has glossed over Xan extremely complicated process. X XSome years ago I was snooping around in the cabinets that housed the XMIT AI Lab's PDP-10, and noticed a little switch glued to the frame of Xone cabinet. It was obviously a homebrew job, added by one of the Xlab's hardware hackers (no one knows who). X XYou don't touch an unknown switch on a computer without knowing what Xit does, because you might crash the computer. The switch was labeled Xin a most unhelpful way. It had two positions, and scrawled in pencil Xon the metal switch body were the words `magic' and `more magic'. XThe switch was in the `more magic' position. X XI called another hacker over to look at it. He had never seen the Xswitch before either. Closer examination revealed that the switch Xonly had one wire running to it! The other end of the wire did Xdisappear into the maze of wires inside the computer, but it's a basic Xfact of electricity that a switch can't do anything unless there are Xtwo wires connected to it. This switch had a wire connected on one Xside and no wire on its other side. X XIt was clear that this switch was someone's idea of a silly joke. XConvinced by our reasoning that the switch was inoperative, we flipped Xit. The computer instantly crashed. X XImagine our utter astonishment. We wrote it off as coincidence, but Xnevertheless restored the switch to the `more magic' position before Xreviving the computer. X XA year later, I told this story to yet another hacker, David Moon as I Xrecall. He clearly doubted my sanity, or suspected me of a Xsupernatural belief in the power of this switch, or perhaps thought I Xwas fooling him with a bogus saga. To prove it to him, I showed him Xthe very switch, still glued to the cabinet frame with only one wire Xconnected to it, still in the `more magic' position. We scrutinized Xthe switch and its lone connection, and found that the other end of Xthe wire, though connected to the computer wiring, was connected to a Xground pin. That clearly made the switch doubly useless: not only was Xit electrically nonoperative, but it was connected to a place that Xcouldn't affect anything anyway. So we flipped the switch. X XThe computer promptly crashed. X XThis time we ran for Richard Greenblatt, a long-time MIT hacker, who Xwas close at hand. He had never noticed the switch before, either. XHe inspected it, concluded it was useless, got some diagonal cutters Xand {dike}d it out. We then revived the computer and it ran fine Xever since. X XWe still don't know how the switch crashed the machine. There is a Xtheory that some circuit near the ground pin was marginal, and Xflipping the switch changed the electrical capacitance enough to upset Xthe circuit as millionth-of-a-second pulses went through it. But Xwe'll never know for sure; all we can really say is that the switch Xwas {magic}. X XI still have that switch in my basement. Maybe I'm silly, but I Xusually keep it set on `more magic'. X XA Selection of AI Koans X======================= X X These are some of the funniest examples of a genre of jokes told at Xthe MIT AI lab about various noted hackers. The original koans were Xcomposed by Danny Hillis. In reading these, it is at least useful to Xknow that Minsky, Sussman, and Drescher are AI researchers of note, Xthat Tom Knight was one of the Lisp machine's principal designers, and Xthat David Moon wrote much of Lisp machine Lisp. X X * * * X X A novice was trying to fix a broken Lisp machine by turning the power Xoff and on. X X Knight, seeing what the student was doing spoke sternly: "You can not Xfix a machine by just power-cycling it with no understanding of what Xis going wrong." X X Knight turned the machine off and on. X X The machine worked. X X * * * X XOne day a student came to Moon and said, "I understand how to Xmake a better garbage collector. We must keep a reference count Xof the pointers to each cons." X XMoon patiently told the student the following story: X X "One day a student came to Moon and said, `I understand how X to make a better garbage collector... X X[Ed. note: Pure reference-count garbage collectors have problems with X circular structures that point to themselves.] X X * * * X XIn the days when Sussman was a novice, Minsky once came to him as Xhe sat hacking at the PDP-6. X X "What are you doing?" asked Minsky. X X "I am training a randomly wired neural net to play Tic-Tac-Toe", XSussman replied. X X "Why is the net wired randomly?" asked Minsky. X X "I do not want it to have any preconceptions of how to play." XSussman said. X X Minsky then shut his eyes. X X "Why do you close your eyes?" Sussman asked his teacher. X X "So that the room will be empty." X X At that moment, Sussman was enlightened. X X * * * X X A disciple of another sect once came to Drescher as he was Xeating his morning meal. X X "I would like to give you this personality test", said the Xoutsider, "because I want you to be happy." X X Drescher took the paper that was offered him and put it Xinto the toaster, saying: X X "I wish the toaster to be happy, too." X XOS and JEDGAR X============= X XThis story says a lot about the the ITS ethos. X XOn the ITS system there was a program that allowed you to see what is Xbeing printed on someone else's terminal. It spied on the other guy's Xoutput by examining the insides of the monitor system. The output spy Xprogram was called OS. Throughout the rest of the computer science X(and at IBM too) OS means `operating system', but among old-time ITS Xhackers it almost always meant `output spy'. X XOS could work because ITS purposely had very little in the way of X`protection' that prevented one user from trespassing on another's Xareas. Fair is fair, however. There was another program that would Xautomatically notify you if anyone started to spy on your output. It Xworked in exactly the same way, by looking at the insides of the Xoperating system to see if anyone else was looking at the insides that Xhad to do with your output. This `counterspy' program was called XJEDGAR (a six-letterism pronounced as two syllables: /jed'gr/), in Xhonor of the former head of the FBI. X XBut there's more. The rest of the story is that JEDGAR would ask the Xuser for `license to kill'. If the user said yes, then JEDGAR would Xactually {gun} the job of the {luser} who was spying. XUnfortunately, people found this made life too violent, especially when Xtourists learned about it. One of the systems hackers solved the Xproblem by replacing JEDGAR with another program that only pretended Xto do its job. It took a long time to do this, because every copy of XJEDGAR had to be patched, and to this day no one knows how many people Xnever figured out that JEDGAR had been defanged. X XThe Story of Mel, a Real Programmer X=================================== X XThis was posted to USENET by its author Ed Nather (utastro!nather) on XMay 21, 1983. X X A recent article devoted to the *macho* side of programming X made the bald and unvarnished statement: X X Real Programmers write in Fortran. X X Maybe they do now, X in this decadent era of X Lite beer, hand calculators and "user-friendly" software X but back in the Good Old Days, X when the term "software" sounded funny X and Real Computers were made out of drums and vacuum tubes, X Real Programmers wrote in machine code. X Not Fortran. Not RATFOR. Not, even, assembly language. X Machine Code. X Raw, unadorned, inscrutable hexadecimal numbers. X Directly. X X Lest a whole new generation of programmers X grow up in ignorance of this glorious past, X I feel duty-bound to describe, X as best I can through the generation gap, X how a Real Programmer wrote code. X I'll call him Mel, X because that was his name. X X I first met Mel when I went to work for Royal McBee Computer Corp., X a now-defunct subsidiary of the typewriter company. X The firm manufactured the LGP-30, X a small, cheap (by the standards of the day) X drum-memory computer, X and had just started to manufacture X the RPC-4000, a much-improved, X bigger, better, faster --- drum-memory computer. X Cores cost too much, X and weren't here to stay, anyway. X (That's why you haven't heard of the company, or the computer.) X X I had been hired to write a Fortran compiler X for this new marvel and Mel was my guide to its wonders. X Mel didn't approve of compilers. X X "If a program can't rewrite its own code", X he asked, "what good is it?" X X Mel had written, X in hexadecimal, X the most popular computer program the company owned. X It ran on the LGP-30 X and played blackjack with potential customers X at computer shows. X Its effect was always dramatic. X The LGP-30 booth was packed at every show, X and the IBM salesmen stood around X talking to each other. X Whether or not this actually sold computers X was a question we never discussed. X X Mel's job was to re-write X the blackjack program for the RPC-4000. X (Port? What does that mean?) X The new computer had a one-plus-one X addressing scheme, X in which each machine instruction, X in addition to the operation code X and the address of the needed operand, X had a second address that indicated where, on the revolving drum, X the next instruction was located. X In modern parlance, X every single instruction was followed by a GO TO! X Put *that* in Pascal's pipe and smoke it. X X Mel loved the RPC-4000 X because he could optimize his code: X that is, locate instructions on the drum X so that just as one finished its job, X the next would be just arriving at the "read head" X and available for immediate execution. X There was a program to do that job, X an "optimizing assembler", X but Mel refused to use it. X X "You never know where its going to put things", X he explained, "so you'd have to use separate constants". X X It was a long time before I understood that remark. X Since Mel knew the numerical value X of every operation code, X and assigned his own drum addresses, X every instruction he wrote could also be considered X a numerical constant. X He could pick up an earlier "add" instruction, say, X and multiply by it, X if it had the right numeric value. X His code was not easy for someone else to modify. X X I compared Mel's hand-optimized programs X with the same code massaged by the optimizing assembler program, X and Mel's always ran faster. X That was because the "top-down" method of program design X hadn't been invented yet, X and Mel wouldn't have used it anyway. X He wrote the innermost parts of his program loops first, X so they would get first choice X of the optimum address locations on the drum. X The optimizing assembler wasn't smart enough to do it that way. X X Mel never wrote time-delay loops, either, X even when the balky Flexowriter X required a delay between output characters to work right. X He just located instructions on the drum X so each successive one was just *past* the read head X when it was needed; X the drum had to execute another complete revolution X to find the next instruction. X He coined an unforgettable term for this procedure. X Although "optimum" is an absolute term, X like "unique", it became common verbal practice X to make it relative: X "not quite optimum" or "less optimum" X or "not very optimum". X Mel called the maximum time-delay locations X the "most pessimum". X X After he finished the blackjack program X and got it to run, X ("Even the initializer is optimized", X he said proudly) X he got a Change Request from the sales department. X The program used an elegant (optimized) X random number generator X to shuffle the "cards" and deal from the "deck", X and some of the salesmen felt it was too fair, X since sometimes the customers lost. X They wanted Mel to modify the program X so, at the setting of a sense switch on the console, X they could change the odds and let the customer win. X X Mel balked. X He felt this was patently dishonest, X which it was, X and that it impinged on his personal integrity as a programmer, X which it did, X so he refused to do it. X The Head Salesman talked to Mel, X as did the Big Boss and, at the boss's urging, X a few Fellow Programmers. X Mel finally gave in and wrote the code, X but he got the test backwards, X and, when the sense switch was turned on, X the program would cheat, winning every time. X Mel was delighted with this, X claiming his subconscious was uncontrollably ethical, X and adamantly refused to fix it. X X After Mel had left the company for greener pa$ture$, X the Big Boss asked me to look at the code X and see if I could find the test and reverse it. X Somewhat reluctantly, I agreed to look. X Tracking Mel's code was a real adventure. X X I have often felt that programming is an art form, X whose real value can only be appreciated X by another versed in the same arcane art; X there are lovely gems and brilliant coups X hidden from human view and admiration, sometimes forever, X by the very nature of the process. X You can learn a lot about an individual X just by reading through his code, X even in hexadecimal. X Mel was, I think, an unsung genius. X X Perhaps my greatest shock came X when I found an innocent loop that had no test in it. X No test. *None*. X Common sense said it had to be a closed loop, X where the program would circle, forever, endlessly. X Program control passed right through it, however, X and safely out the other side. X It took me two weeks to figure it out. X X The RPC-4000 computer had a really modern facility X called an index register. X It allowed the programmer to write a program loop X that used an indexed instruction inside; X each time through, X the number in the index register X was added to the address of that instruction, X so it would refer X to the next datum in a series. X He had only to increment the index register X each time through. X Mel never used it. X X Instead, he would pull the instruction into a machine register, X add one to its address, X and store it back. X He would then execute the modified instruction X right from the register. X The loop was written so this additional execution time X was taken into account --- X just as this instruction finished, X the next one was right under the drum's read head, X ready to go. X But the loop had no test in it. X X The vital clue came when I noticed X the index register bit, X the bit that lay between the address X and the operation code in the instruction word, X was turned on --- X yet Mel never used the index register, X leaving it zero all the time. X When the light went on it nearly blinded me. X X He had located the data he was working on X near the top of memory --- X the largest locations the instructions could address --- X so, after the last datum was handled, X incrementing the instruction address X would make it overflow. X The carry would add one to the X operation code, changing it to the next one in the instruction set: X a jump instruction. X Sure enough, the next program instruction was X in address location zero, X and the program went happily on its way. X X I haven't kept in touch with Mel, X so I don't know if he ever gave in to the flood of X change that has washed over programming techniques X since those long-gone days. X I like to think he didn't. X In any event, X I was impressed enough that I quit looking for the X offending test, X telling the Big Boss I couldn't find it. X He didn't seem surprised. X X When I left the company, X the blackjack program would still cheat X if you turned on the right sense switch, X and I think that's how it should be. X I didn't feel comfortable X hacking up the code of a Real Programmer. X X[This is one of hackerdom's great heroic epics, free verse or no. In a Xfew spare images it captures more about the esthetics and psychology Xof hacking than every scholarly volume on the subject put together. XFor an opposing point of view, see the entry for {real programmer}.] X XAppendix B: A Portrait of J. Random Hacker X****************************************** X XThis profile reflects detailed comments on an earlier `trial balloon' Xversion from about a hundred USENET respondents. Where comparatives Xare used, the implicit `other' is a randomly selected group from the Xnon-hacker population of the same size as hackerdom. X X XGeneral appearance: X=================== X XIntelligent. Scruffy. Intense. Abstracted. Surprisingly for a Xsedentary profession, more hackers run to skinny than fat; both Xextremes are more common than elsewhere. Tans are rare. X X XDress: X====== X XCasual, vaguely post-hippy; T-shirts, jeans, running shoes, XBirkenstocks (or bare feet). Long hair, beards and moustaches are Xcommon. High incidence of tie-dye and intellectual or humorous X`slogan' T-shirts (only rarely computer related; that's too obvious). X XA substantial minority prefers `outdoorsy' clothing --- hiking boots X("in case a mountain should suddenly spring up in the machine room", Xas one famous parody put it), khakis, lumberjack or chamois shirts and Xthe like. X XVery few actually fit the National-Lampoon-Nerd stereotype, though it Xlingers on at MIT and may have been more common before 1975. These Xdays, backpacks are more common than briefcases, and the hacker `look' Xis more whole-earth than whole-polyester. X XHackers dress for comfort, function, and minimal maintenance hassles Xrather than for appearance (some, perhaps unfortunately, take this to Xextremes and neglect personal hygiene). They have a very low Xtolerance of suits or other `business' attire, in fact it is not Xuncommon for hackers to quit a job rather than conform to a dress Xcode. X XFemale hackers never wear visible makeup and many use none at all. X X XReading habits: X=============== X XOmnivorous, but usually includes lots of science and science fiction. XThe typical hacker household might subscribe to `Analog', X`Scientific American', `Co-Evolution Quarterly', and X`Smithsonian'. Hackers often have a reading range that astonishes X`liberal arts' people but tend not to talk about it as much. Many Xhackers spend as much of their spare time reading as the average XAmerican burns up watching TV, and often keep shelves and shelves of Xwell-thumbed books in their homes. X X XOther interests: X================ X XSome hobbies are widely shared and recognized as going with the Xculture. Science fiction. Music. Medievalism. Chess, go, Xbackgammon, wargames and intellectual games of all kinds. X(Role-playing games such as Dungeons and Dragons used to be extremely Xpopular among hackers but have lost a bit of their former luster as Xthey moved into the mainstream and became heavily commercialized.) XLogic puzzles. Ham radio. Other interests that seem to correlate Xless strongly but positively with hackerdom include: linguistics and Xtheater teching. X X XPhysical Activity and Sports: X============================= X XMany (perhaps even most) hackers don't follow or do sports at all and Xare determinedly anti-physical. Among those who do, interest in Xspectator sports is low to non-existent; sports are something one X*does*, not something one watches on TV. X XFurther, hackers avoid most team sports like the plague (though Xvolleyball is a notable exception, perhaps because it's non-contact Xand relatively friendly). Hacker sports are are almost always Xprimarily self-competitive ones involving concentration, stamina, and Xmicromotor skills: martial arts, bicycling, auto racing, kite-flying, Xhiking, rock-climbing, sailing, caving, juggling, skiing, skating (ice Xand roller). X X XEducation: X========== X XNearly all hackers past their teens are either college-degreed or Xself-educated to an equivalent level. The self-taught hacker is often Xconsidered (at least by other hackers) to be better-motivated, and may Xbe more respected than his school-shaped counterpart. Academic areas Xfrom which people often gravitate into hackerdom include (besides the Xobvious computer science and electrical engineering) physics, Xmathematics, linguistics, and philosophy. X X XThings hackers detest and avoid: X================================ X XIBM mainframes. Smurfs, Ewoks, and other forms of offensive cuteness. XBureaucracies. Stupid people. Easy listening music. Television X(except for cartoons, movies, the old `Star Trek', and the new X`Simpsons'). Business suits. Dishonesty. Incompetence. XBoredom. BASIC. Character-based menu interfaces. X X XFood: X===== X XEthnic. Spicy. Oriental, esp. Chinese and most especially Szechuan, XHunan and Mandarin (hackers consider Cantonese vaguely declasse). XHackers prefer the exotic; for example, the Japanese-food fans among Xthem will eat with gusto such delicacies as fugu (poisonous Xpufferfish) and whale. Thai food has experienced flurries of Xpopularity. Where available, high-quality Jewish delicatessen food is Xmuch esteemed. A visible minority of Southwestern and Pacific Coast Xhackers prefers Mexican. X XFor those all-night hacks, pizza and microwaved burritos are big. XInterestingly, though the mainstream culture has tended to think of Xhackers as incorrigible junk-food junkies, many have at least mildly Xhealth-foodist attitudes and are fairly discriminating about what they Xeat. This may be generational; anecdotal evidence suggests that the Xstereotype was more on the mark ten to fifteen years ago. X X XPolitics: X========= X XVaguely left of center, except for the strong libertarian contingent Xwhich rejects conventional left-right politics entirely. The only Xsafe generalization is that almost all hackers are anti-authoritarian, Xthus both conventional conservatism and `hard' leftism are rare. XHackers are far more likely than most non-hackers to either (a) be Xaggressively apolitical, or (b) entertain peculiar or idiosyncratic Xpolitical ideas and actually try to live by them day-to-day. X X XGender & Ethnicity: X=================== X XHackerdom is still predominantly male. However the percentage of Xwomen is clearly higher than the low-single-digit range typical for Xtechnical professions, and female hackers are generally respected and Xdealt with as equals. X XIn the U.S., hackerdom is predominantly Caucasian with strong Xminorities of Jews (east coast) and Orientals (west coast). The XJewish contingent has exerted a particularly pervasive cultural Xinfluence (see Food, and note that several common jargon terms are Xobviously mutated Yiddish). X XThe ethnic distribution of hackers is understood by them to be a Xfunction of which subcultures tend to seek and value education. Race Xand ethnic prejudice is notably uncommon and tends to be met with Xfreezing contempt. X XWhen asked, hackers often ascribe their culture's gender- and Xcolor-blindness to a positive effect of text-only network channels. X X XReligion: X========= X XAgnostic. Atheist. Non-observant Jewish. Neo-pagan. Very commonly, Xthree or more of these are combined in the same person. Conventional Xfaith-holding Christianity is rare though not unknown (at least on the Xeast coast, more hackers wear yarmulkes than crucifixes). X XEven hackers who identify with a religious affiliation tend to be Xrelaxed about it, hostile to organized religion in general and all Xforms of religious bigotry in particular. Many enjoy `parody' Xreligions such as Discordianism and the Church of the SubGenius. X XAlso, many hackers are influenced to varying degrees by Zen Buddhism Xor (less commonly) Taoism, and blend them easily with their `native' Xreligions. X XThere is a definite strain of mystical, almost Gnostic sensibility Xthat shows up even among those hackers not actively involved with Xneo-paganism, Discordianism, or Zen. Hacker folklore that pays homage Xto `wizards' and speaks of incantations and demons has too much Xpsychological truthfulness about it to be entirely a joke. X X XCeremonial chemicals: X===================== X XMost hackers don't smoke tobacco and use alcohol in moderation if at Xall (though there is a visible contingent of exotic-beer fanciers, and Xa few hackers are serious oenophiles). Limited use of non-addictive Xpsychedelic drugs such as marijuana, LSD, psilocybin, nitrous oxide, Xetc. used to be relatively common and is still regarded with more Xtolerance than in the mainstream culture. Use of `downers' and Xopiates, on the other hand, appears to be particularly rare; hackers Xseem in general to dislike drugs that `dumb them down'. On the third Xhand, many hackers regularly wire up on caffeine and/or sugar for Xall-night hacking runs. X X XCommunication style: X==================== X XSee the dictionary notes on `Hacker speech style'. Though hackers Xoften have poor person-to-person communication skills, they are as a Xrule extremely sensitive to nuances of language and very precise in Xtheir use of it. They are often better at written communication than Xspoken. X X XGeographical Distribution: X========================== X XIn the U.S., hackerdom revolves on a Bay Area/Boston axis; about half Xof the hard core seems to live within a hundred miles of Cambridge X(Massachusetts) or Berkeley (California), although there are Xsignificant contigents in Los Angeles, the Pacific Northwest, and XWashington DC. Hackers tend to cluster around large cities, Xespecially `university towns' such as the Raleigh/Durham area in North XCarolina or Princeton, New Jersey (this may simply reflect the fact Xthat many are students or ex-students living near their alma maters). X X XSexual habits: X============== X XHackerdom tolerates a much wider range of sexual and lifestyle Xvariation than the mainstream culture. It includes a relatively large Xgay contingent. Hackers are somewhat more likely to live in Xpolygynous or polyandrous relationships, practice open marriage, or Xlive in communes or group houses. In this, as in some other respects, X(see `General Appearance') hackerdom semi-consciously maintains X`counterculture' values. X X XPersonality Characteristics: X============================ X XThe most obvious common `personality' characteristics of hackers are Xhigh intelligence, consuming curiosity, and facility with intellectual Xabstractions. Also, most hackers are `neophiles', stimulated by and Xappreciative of novelty (especially intellectual novelty). Most are Xalso relatively individualistic and anti-conformist. X XContrary to stereotype, hackers are *not* usually intellectually Xnarrow; they tend to be interested in any subject that can provide Xmental stimulation, and can often discourse knowledgeably and even Xinterestingly on any number of obscure subjects --- assuming you can Xget them to talk at all as opposed to, say, going back to hacking. X XIt is noticeable (and contrary to many outsiders' expectations) that Xthe better a hacker is at hacking, the more likely he/she is to have Xoutside interests at which he/she is more than merely competent. X XHackers are `control freaks' in a way that has nothing to do with the Xusual coercive or authoritarian connotations of the term. In the same Xway that children delight in making model trains go forward and back Xby moving a switch, hackers love making complicated things like Xcomputers do nifty stuff for them. But it has to be *their* Xnifty stuff. They don't like tedium, nondeterminism or most of the Xfussy, boring, ill-defined little tasks that go with maintaining a Xnormal existence. Accordingly, they tend to be careful and orderly in Xtheir intellectual lives and chaotic elsewhere. Their code will be Xbeautiful, even if their desks are buried in three feet of crap. X XHackers are generally only very weakly motivated by conventional Xrewards such as social approval or money. They tend to be attracted Xby challenges and excited by interesting toys, and to judge the Xinterest of work or other activities in terms of the challenges Xoffered and the toys they get to play with. X XIn terms of Myers-Briggs and equivalent psychometric systems, Xhackerdom appears to concentrate the relatively rare INTJ and INTP Xtypes; that is, introverted, intuitive, and thinker types (as opposed Xto the extroverted-sensate personalities that predominate in the Xmainstream culture). ENT[JP] types are also concentrated among Xhackers but are in a minority. X X XWeaknesses of the hacker personality: X===================================== X XRelatively little ability to identify emotionally with other people. XThis may be because hackers generally aren't much like `other people'. XUnsurprisingly, there is also a tendency to self-absorption, Xintellectual arrogance, and impatience with people and tasks perceived Xto be wasting one's time. As a result, many hackers have difficulty Xmaintaining stable relationships. X XAs cynical as hackers sometimes wax about the amount of idiocy in the Xworld, they tend by reflex to assume that everyone is as rational, X`cool', and imaginative as they consider themselves. This bias often Xcontributes to weakness in communication skills. Hackers tend to be Xespecially poor at confrontations and negotiation. X XHackers are often monumentally disorganized and sloppy about dealing Xwith the physical world. Bills don't get paid on time, clutter piles Xup to incredible heights in homes and offices, and minor maintenance Xtasks get deferred indefinitely. X XThe sort of person who uses phrases like `incompletely socialized' Xusually thinks hackers are. Hackers regard such people with contempt Xwhen they notice them at all. X X XMiscellaneous: X============== X XHackers are more likely to have cats than dogs (in fact, it is widely Xgrokked that cats have the hacker nature). Many drive incredibly Xdecrepit heaps and forget to wash them; richer ones drive spiffy XPorsches and RX-7s and then forget to have them washed. Almost all Xhackers have terribly bad handwriting, and often grow up Xblock-printing everything like junior draftsmen. X XAppendix C: Bibliography X************************ X XHere are some other books you can read to help you understand the Xhacker mindset. X X Godel, Escher, Bach: An Eternal Golden Braid X Hofstadter, Douglas X Basic Books, 1979, New York X ISBN 0-394-74502-7 X XThis book reads like an intellectual Grand Tour of hacker Xpreoccupations. Music, mathematical logic, programming, speculations Xon the nature of intelligence, biology, and Zen are woven into a Xbrilliant tapestry themed on the concept of encoded self-reference. XThe perfect left-brain companion to `Illuminatus'. X X The Illuminatus Trilogy X Shea, Robert & Wilson, Robert Anton X Dell Books, 1988, New York X ISBN 0-440-53981-1 X XThis work of alleged fiction is an incredible berserko-surrealist Xrollercoaster of world-girdling conspiracies, intelligent dolphins, Xthe fall of Atlantis, who really killed JFK, sex, drugs, rock & roll Xand the Cosmic Giggle Factor. First published in 3 volumes, but Xthere's now a one-volume trade paperback carried by most chain Xbookstores under SF. The perfect right-brain companion to Hofstadter's X`Godel, Escher, Bach: An Eternal Golden Braid'. See {Eris}, X{Discordianism}, {random numbers}, {Church Of The Sub-Genius}. X X The Hitchhiker's Guide to the Galaxy X Douglas Adams X Pocket Books, 1981, New York X ISBN 0-671-46149-4 X XThis `Monty-Python-in-Space' spoof of SF genre traditions has been Xpopular among hackers ever since the original British radio show. XRead it if only to learn about Vogons (see {bogons}) and the Xsignificance of the number 42 (see {random numbers}) --- also why the Xwinningest chess program of 1990 was called `Deep Thought'. X X The Tao of Programming X James Geoffrey X Infobooks, 1987, Santa Monica X ISBN 0-931137-07-1 X XThis gentle, funny spoof of the `Tao Te Ching' contains much that is Xilluminating about the hacker way of thought. "When you have learned Xto snatch the error code from the trap frame, it will be time for you Xto leave." X X Hackers X Steven Levy X Anchor/Doubleday 1984, New York X ISBN 0-385-19195-2 X XLevy's book is at its best in describing the early MIT hackers at the XModel Railroad Club and the early days of the microcomputer Xrevolution. He never understood UNIX or the networks, though, and his Xenshrinement of Richard Stallman as "the last true hacker" turns out X(thankfully) to have been quite misleading. Numerous minor factual Xerrors also mar the text; for example, Levy's claim that the original XJargon File derived from the TMRC Dictionary (the File originated at XStanford and was brought to MIT in 1976; the First Edition co-authors Xhad never seen the dictionary in question). There are also numerous Xmisspellings in the book that inflame the passions of old-timers; as XDan Murphy, the author of TECO, once said, "You would have thought SHAR_EOF true || echo 'restore of jargon.ascii failed' fi echo 'End of part 18, continue with part 19' echo 19 > _shar_seq_.tmp exit 0