home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / fortran / 4762 < prev    next >
Encoding:
Internet Message Format  |  1992-12-16  |  6.0 KB

  1. Path: sparky!uunet!spool.mu.edu!sdd.hp.com!usc!cs.utexas.edu!ut-emx!newshost.cc.utexas.edu!mclay
  2. From: mclay@navier.ae.utexas.edu (Robert McLay)
  3. Newsgroups: comp.lang.fortran
  4. Subject: Re: Real Programmers (Mel & Blackjack & RPC-4000)
  5. Message-ID: <MCLAY.92Dec16093918@navier.ae.utexas.edu>
  6. Date: 16 Dec 92 15:39:18 GMT
  7. Sender: news@ut-emx.uucp
  8. Distribution: comp
  9. Organization: CFD Lab, Dept ASE-EM, University of Texas at Austin
  10. Lines: 146
  11.  
  12.  
  13. When this discussion of "Real Programmers" came up in 1984.  There was
  14. also a poem about Mel and an machine coded blackjack program for a
  15. drum memory computer (that's right: a drum memory computer).  I saved
  16. it but it got messed up when I transfered a compressed copy from VMS
  17. to unix.  Does anyone still have a copy.  It starts like this:
  18.  
  19. ________________________________________________________________________
  20. From CC.CLIVE@UTEXAS-20.ARPA Wed Oct 24 15:54:54 1984
  21.  
  22. From: Clive Dawson <CC.Clive@UTEXAS-20.ARPA>
  23. >From the net for your enjoyment:
  24. ------
  25.  
  26.      A recent article devoted to the *macho* side of programming
  27.      made the bald and unvarnished statement:
  28.      
  29.                 Real Programmers write in Fortran.
  30.      
  31.      Maybe they do now,
  32.      in this decadent era of
  33.      Lite beer, hand calculators and "user-friendly" software
  34.      but back in the Good Old Days,
  35.      when the term "software" sounded funny
  36.      and Real Computers were made out of drums and vacuum tubes,
  37.      Real Programmers wrote in machine code.
  38.      Not Fortran. Not RATFOR. Not, even, assembly language.
  39.      Machine Code.
  40.      Raw, unadorned, inscrutable hexadecimal numbers.
  41.      Directly.
  42.      
  43.      Lest a whole new generation of programmers
  44.      grow up in ignorance of this glorious past,
  45.      I feel duty-bound to describe,
  46.      as best I can through the generation gap,
  47.      how a Real Programmer wrote code.
  48.      I'll call him Mel,
  49.      because that was his name.
  50.      
  51.      I first met Mel when I went to work for Royal McBee Computer Corp.,
  52.      a now-defunct subsidiary of the typewriter company.
  53.      The firm manufactured the LGP-30,
  54.      a small, cheap (by the standards of the day)
  55.      drum-memory computer,
  56.      and had just started to manufacture
  57.      the RPC-4000, a much-improved,
  58.      bigger, better, faster -- drum-memory computer.
  59.      Cores cost too much,
  60.      and weren't here to stay, anyway.
  61.      (That's why you haven't heard of the company, or the computer.)
  62.      
  63.      I had been hired to write a Fortran compiler 
  64.      for this new marvel and Mel was my guide to its wonders.
  65.      Mel didn't approve of compilers.
  66.      
  67.      "If a program can't rewrite its own code,"
  68.      he asked, "what good is it?"
  69.      
  70.      Mel had written,
  71.      in hexadecimal,
  72.      the most popular computer program the company owned.
  73.      It ran on the LGP-30
  74.      and played blackjack with potential customers
  75.      at computer shows.
  76.      Its effect was always dramatic.
  77.      The LGP-30 booth was packed at every show,
  78.      and the IBM salesmen stood around
  79.      talking to each other.
  80.      Whether or not this actually sold computers
  81.      was a question we never discussed.
  82.      
  83.      Mel's job was to re-write
  84.      the blackjack program for the RPC-4000.
  85.      (Port?  What does that mean?)
  86.      The new computer had a one-plus-one
  87.      addressing scheme,
  88.      in which each machine instruction,
  89.      in addition to the operation code
  90.      and the address of the needed operand,
  91.      had a second address that indicated where, on the revolving drum,
  92.      the next instruction was located.
  93.      In modern parlance,
  94.      every single instruction was followed by a GO TO!
  95.      Put *that* in Pascal's pipe and smoke it.
  96.      
  97.      Mel loved the RPC-4000
  98.      because he could optimize his code:
  99.      that is, locate instructions on the drum
  100.      so that just as one finished its job,
  101.      the next would be just arriving at the "read head"
  102.      and available for immediate execution.
  103.      There was a program to do that job,
  104.      an "optimizing assembler",
  105.      but Mel refused to use it.
  106.      
  107.      "You never know where its going to put things",
  108.      he explained, "so you'd have to use separate constants".
  109.      
  110.      It was a long time before I understood that remark.
  111.      Since Mel knew the numerical value
  112.      of every operation code,
  113.      and assigned his own drum addresses,
  114.      every instruction he wrote could also be considered
  115.      a numerical constant.
  116.      He could pick up an earlier "add" instruction, say,
  117.      and multiply by it,
  118.      if it had the right numeric value.
  119.      His code was not easy for someone else to modify.
  120.      
  121.      I compared Mel's hand-optimized programs
  122.           ack  the same code massaged by the optimizing assembler program,
  123.      and Mel's always ran faster.
  124.      That was because the "top-down" method of program design
  125.      hadn't been invented yet,
  126.      and Mel wouldn't have used it anyway.
  127.      He wrote the innermost parts of his program loops first,
  128.      so they would get first choice
  129.      of the optimum address locations on the drum.
  130.      The optimizing assembler wasn't smart enough to do it that way.
  131.      
  132.      Mel never wrote time-delay loops, either,
  133.      even when the balky Flexowriter
  134.      required a delay between output characters to work right.
  135.      He just located instructions on the drum
  136.      so each successive one was just *past* the read head
  137.       hen it was needed;
  138.      the drum had to execute another complete revolution
  139.      to find the next instruction.
  140.      He coined an unforgettable term for this procedure.
  141.      Although "optimum" is an absolute term,
  142.      like "unique", it became common verbal practice
  143.      to make it relative:
  144.      "not quite optimum" or "less optimum"
  145.  
  146. ...
  147. --
  148.  
  149. ______________________________________________________________________________
  150. Robert McLay                   | Kayak Rules of Life:
  151. Manager CFD Lab                |   a) lose altitude
  152. Dept ASE-EM                    |   b) Surf waves and holes.
  153. University of Texas at Austin  |   c) Do enders.
  154. WRW 111                        |
  155. Austin, TX 78712               |
  156.                                |
  157. mclay@cfdlab.ae.utexas.edu     |
  158.