40th Anniversary of The Story of Mel (Hacker folklore)
May 23, 2023 2:16 PM   Subscribe

Who are you, Mel Kaye? [via mefi projects] 40 years (and two days) ago, The Story of Mel was posted to Usenet. This tale of a software engineer, his blackjack program, and the ingenious hack hidden inside it has enshrined "Mel" in the pantheon of Real Programmers. But did Mel really exist? Who was he?

A year ago, lipsum posted their project to document Mel. Now on the 40th anniversary of that Usenet post, we can finally read the biography of Mel Kaye (Melvin Kornitzky).
posted by mpark (49 comments total) 38 users marked this as a favorite
 
I remember reading this story on the web in college, twenty-five years ago.
posted by infinitewindow at 2:40 PM on May 23, 2023 [3 favorites]


I also remember reading this a long time ago, when I only half understood it.
posted by Ickster at 2:48 PM on May 23, 2023


Wow, that posted story is almost as old as I am. Still amazes. Of course Mel, 50+ years later would have email.
posted by now i'm piste at 3:20 PM on May 23, 2023


Working on those old machines all the way down at the iron level always struck me as a feat of something strange and wild.
posted by drewbage1847 at 3:29 PM on May 23, 2023 [3 favorites]


"...as a feat of something strange and wild."

Because it was.
posted by aleph at 3:33 PM on May 23, 2023 [2 favorites]


I remember reading this story on the web in college, twenty-five years ago.

The web? Luxury. I remember reading this in a text file I downloaded using FTP in college, thirty-five years ago. (Or maybe from a dial-up BBS? Memories fade, but the scars still linger...)
posted by The Tensor at 3:37 PM on May 23, 2023 [4 favorites]


FTFA: "Real Programmers wrote in machine code.
Not FORTRAN. Not RATFOR. Not, even, assembly language.
Machine Code."


Indeed,

Real Programmers Don't Write Specs
Real Programmers don't write specs -- users should consider themselves lucky to get any programs at all, and take what they get.

...

Real Programmers don't write in FORTRAN. FORTRAN is for pipe stress freaks and crystallography weenies.

...
posted by mikelieman at 3:51 PM on May 23, 2023 [1 favorite]


Sometimes it really bothers me how the common REPL in the era of cloud computing and serverless architecture has shifted back towards a much more async design-deploy-test-fail paradigm which reminds me of punch cards and mainframes. It's not an exact duplicate. We still have local tests, etc. But it does promote a frustratingly slow dev process.
posted by allium cepa at 4:06 PM on May 23, 2023 [9 favorites]


I love the fact that it celebrates code that didn't work properly, and when an attempt was made to port the code, it worked even less properly. This may not be the ideal it is held up to be.
posted by scruss at 4:09 PM on May 23, 2023 [1 favorite]


a frustratingly slow dev process

it's faster than getting your card deck and error dump back in a day or two after your code was keyed in the punch room and run the next night. And no-one ever dropped an Azure deck and got the program lines in the wrong order
posted by scruss at 4:13 PM on May 23, 2023 [5 favorites]


Interestingly, in MeFi previously (2001), folklorist Jan Harold Brunvand is quoted as authoritatively declaring that "Mel is most likely a fictional programmer, although the story is told as a true account and uses real machines and real languages as examples."
posted by meehawl at 4:19 PM on May 23, 2023 [6 favorites]


meehawl, nice find!

These threads take on lives of their own, but I hope we can also celebrate lipsum's achievement in researching the back story of a computing legend.
posted by mpark at 4:24 PM on May 23, 2023 [2 favorites]


In a similar vein, it turns out Guy Steele still has the "more magic" switch and there are photos of it now.
posted by automatronic at 4:42 PM on May 23, 2023 [18 favorites]


Working on those old machines all the way down at the iron level always struck me as a feat of something strange and wild.

You can still do it today! In addition to those two things, you might also find it fun. An LGP-30 might not be the best choice for recreational bare-metal programming today --- perhaps something a little newer.
posted by Chef Flamboyardee at 4:44 PM on May 23, 2023


meehawl, nice find!

It's disturbing how many 2000s-era entries are in my Firefox Metafilter bookmark list!
posted by meehawl at 4:57 PM on May 23, 2023 [2 favorites]


This may not be the ideal it is held up to be.

Nostalgia is fine, I guess, but nothing on Eric Raymond's site has aged well, much like the man himself. Inscrutable, unmaintainable spaghetti code full of hardware dependent magic numbers? Refusing to fix a bug for a colleague? Integer overflow as a deliberate control-flow technique? No.
posted by mhoye at 4:58 PM on May 23, 2023 [9 favorites]


Integer overflow as a deliberate control-flow technique? No.

Ok, you are right (more than right) on the first couple of points, but proper use of wrapping registers is a fairly common tool in the 8-bit toolbox. One frequently does a loop by loading the index register with the loop count to start, decrementing it at the start of the loop, and then comparing it against 0 at the end of the loop. But in order to do a loop of 256 using that one-byte index register, you load 0 at the start, the first loop decrements it, wrapping to 255, and then you do 255 more loops before it's zero and you break out.
posted by notoriety public at 5:37 PM on May 23, 2023 [6 favorites]


You could argue that the Motorola 680x0's DBcc instructions were exactly integer overflow as a deliberate control flow technique...
posted by Chef Flamboyardee at 5:59 PM on May 23, 2023 [3 favorites]


Refusing to fix a bug for a colleague?

Maybe if more programmers put their foot down when asked to do underhanded crap the internet wouldn't be such a hole of deceptive marketing practices and late stage capitalist exploitation.

I love the story of Mel. I almost certainly saw it first in Usenet though in a repost not original. Also more magic (which I always pictured as being in the superior position however the switch itself is exactly how I imagined it). One of the little consistent joys in my life is labelling nonop switches magic-more magic (being honest I've labelled more than a few operational switches this way too) and making the scale on unitless controls go to 11.
posted by Mitheral at 6:22 PM on May 23, 2023 [7 favorites]


Nice, but then I can't point at it, look at it.
posted by riverlife at 6:30 PM on May 23, 2023


Back in my software engineering days, a coworker told us about the most frightening piece of code they had seen. It was 100’s of pages of assembly language with no comments. Except about 75% through the code was one comment.

; and now for some magic
posted by njohnson23 at 7:09 PM on May 23, 2023 [25 favorites]


I read the story on alt.folklore.computers back in the 90s most likely. Those were the days. These are the days, too. Just different days.
posted by Spike Glee at 7:33 PM on May 23, 2023 [7 favorites]


On first glance the formatting made me think it was an ode and I started reading it as such. The meter stinks.
posted by bendy at 8:04 PM on May 23, 2023


01010010 01001001 01010000 00100000 01001101 01100101 01101100
posted by TheophileEscargot at 8:26 PM on May 23, 2023 [1 favorite]


In the infamous summer of 1996 that I spent at Caltech I came back with 5 highly prized documents off the dot matrix printer in the computer lab that was in the dorm. Four were different copies of "The Purity Test", one from each of the three dorm/houses at Caltech and one was from MIT. The fifth document was "The Jargon File" which among all the other wonders had the story of Mel (and the story of magic/more-magic).
posted by zengargoyle at 9:06 PM on May 23, 2023 [3 favorites]


s/1996/1986/ bah!
posted by zengargoyle at 9:13 PM on May 23, 2023 [1 favorite]


"...for a more civilized age."
posted by aleph at 9:15 PM on May 23, 2023


I’ve read this story periodically since probably some time in the 90s, when I was a teenage boy.

And now, seeing it again, I have so many questions. How much time would this blackjack demo have taken? What else would these guys have been doing?

And what did the sales process look like for these machines? When did the blackjack game get played, and how, given the primitive input/output tools at the time? What other demos would they want? Would it have been seen as a prelude to a boys’ night out for the salesman and customer?
posted by smelendez at 10:05 PM on May 23, 2023


meehawl: folklorist Jan Harold Brunvand is quoted

Not Jan Harold but his son Erik Brunvand, who’s a computer science professor.
posted by Kattullus at 10:51 PM on May 23, 2023 [1 favorite]


Also, when I first read the Story of Mel I pictured Mel as a grizzled old veteran of programming, gray-haired and wrinkled. Turns out he was 27 at the time of the story. And 29 by the time he leaves in the coda!
posted by Kattullus at 10:57 PM on May 23, 2023 [4 favorites]


Turns out he was 27 at the time of the story. And 29 by the time he leaves in the coda!

That tracks. I started coding at about 17, and it took me until I was well over 30 to stop treating the task as essentially a form of sculpture rather than anything resembling engineering.

Getting away with being paid to make that kind of sculpture was fun. There's a visceral satisfaction in finding that there exists a Lego block that's just the right shape to make a nose or ear if we just use a smaller one there and jiggle those two around there and as long as nobody ever touches that one down the other end then everything will just keep working and look how few blocks it took to build that thing and how fast it goes! So when I first read the Story of Mel, I knew exactly what he was doing and why.

But it's unprofessional behaviour all the same, as mhoye points out upthread. It takes time, and repeatedly becoming gutsick from trying to understand other people's inscrutable code under deadline pressure, for a bright young kid to learn why elegance and beauty are not the shining virtues they always seemed to be and why plonking, dull, pedestrian, obvious code that actually does what's required is what puts food on the table.

That said, if anybody still needs 267 bytes of 6502 code massaged and tweaked until it fits inside a 256 byte PROM, I'll take a look at it for you. Not for money, just for fun.
posted by flabdablet at 11:47 PM on May 23, 2023 [21 favorites]


It was 100’s of pages of assembly language with no comments. Except about 75% through the code was one comment.

; and now for some magic


No word of exaggeration...I just started sweating a little bit.
posted by Mr. Bad Example at 2:44 AM on May 24, 2023 [2 favorites]


I've worked with programmers like Mel. Brilliant, but their code was incomprehensible and you died a little inside when they left for another job knowing you'd never be able to make even the slightest change without it blowing up in your face.
posted by tommasz at 4:32 AM on May 24, 2023 [2 favorites]


smelendez: When did the blackjack game get played, and how, given the primitive input/output tools at the time?

I was curious about the input-output too, so I did some research.

The Story of Mel says it got played at computer shows, and the sales booth was always packed. Insert blackjack and hookers joke here.

But how did it get played?

The Preface to Mel's Blackjack game included in lipsum's article includes a note "Before playing Blackjack, set 4 typewriter tab stops to provide for 4 columns of printing", and mentions that users could type in how much they wanted to bet. It sounds like there was some sort of typewriter/printer attached to the computer.

Googling the RPC-4000, I found this page that includes photos of the computer set up with "a modernized Flexowriter terminal and the standard paper tape punch/reader accessory".

(The author of that page, e-basteln, goes on to build a modern replica of the RPC-4000 that fits in your hand.)

Wikipedia has a page about the Flexowriter terminal: "The Friden Flexowriter produced by the Friden Calculating Machine Company, was a teleprinter, a heavy-duty electric typewriter capable of being driven not only by a human typing, but also automatically by several methods, including direct attachment to a computer and by use of paper tape."

So the electric typewriter provided both input and output.

Wikipedia also says: "The Whirlwind I deployment in 1955 is notable as it seems to have been the first time that a typewriter-like input device was directly connected to a general-purpose electronic computer, becoming directly ancestral to today's computer keyboards."
posted by davidwitteveen at 5:08 AM on May 24, 2023 [3 favorites]


tommasz: you died a little inside when they left for another job knowing you'd never be able to make even the slightest change without it blowing up in your face

I think I’ve told this story on here before, but I met a guy like that once who, long since retired from a nuclear plant, had to be called in every once in a while to fix a system he’d designed in the 1970s. We got to talking on a train in the US in the late 00s, and I’m guessing he was about of Mel’s generation, so he’d been in his late seventies at that point, maybe eighty. He was wearing a fairly strange looking boiler suit, and an old fashioned striped engineer’s cap, so I asked him what he did.

He’d been the head engineer at a nuclear plant and once his bosses asked him to make a temporary replacement for some critical part that the company couldn’t afford to replace right away. According to him, it had worked much better than what they’d’ve gotten from outside that they decided to make the temporary part permanent.

Because no one but him really understood how it worked, after he retired they had to call him in every time they did maintenance on that system, because through the years everything else had been added on top, and made to work with it, and he was the only person who could work out all the contingencies.

Anyway, this isn’t why I left the US, but it was definitely one less thing to worry about when I moved away.
posted by Kattullus at 5:08 AM on May 24, 2023 [2 favorites]


An article on reconstructing the Whirlwind blackjack program from tape.
posted by nonane at 5:38 AM on May 24, 2023


The flip side of the kind of professional values espoused by mhoye above (and don't get me wrong, I appreciate clear, maintainable code as much as the next working stiff) is that they feed into a tendency for management, and especially management consultants, to believe that documentation is a workable substitute for expertise and that workers should be as easily interchangeable and interoperable as standard parts from McMaster-Carr. Neither is true.

his bosses asked him to make a temporary replacement for some critical part that the company couldn’t afford to replace right away. According to him, it had worked much better than what they’d’ve gotten from outside that they decided to make the temporary part permanent.

Fulfilling mission-critical requirements in-house instead of buying stuff in is a completely workable strategy. But it's super common for management to overlook the necessity of ongoing technical support for stuff built internally, and the fact that backing up expertise is even more vital than backing up data, and that those considerations must be priced in when deciding whether in-house is the best potential vendor.

no one but him really understood how it worked

Transferring genuine expertise takes much longer than transferring data, as well as needing much better people-matching. But it's eminently doable if the right people get hired, and leaving it undone for so long that the org needs to rely on (or worse, to keep on relying on) retired ex-employees for ongoing technical support reflects unspeakably incompetent management.

I'm finding it a bit weird just how unsurprised I am to learn that management at a nuclear power plant is exactly that unspeakably incompetent.
posted by flabdablet at 6:05 AM on May 24, 2023 [5 favorites]


The Story of Mel was posted by Ed Nather. I happen to know Ed's daughter and pointed her at this FPP. She proceeded to post a bit of trivia about it on Mastodon: Posting thread starts here
posted by rmd1023 at 7:08 AM on May 24, 2023 [17 favorites]


I'm one of the people volunteering on a software restoration project, the Medley Interlisp Project. The leader of the project is one of the original authors, and his ability to remember the obscure "this is why we did this this way, to support this feature of the original d-machines" is really invaluable. A lot of his updates are to take out those idiosyncracies and clean up the code, for example he did some Y2K-related updates to a minor utility that shows the date and time at the bottom of the screen.
posted by Runes at 7:17 AM on May 24, 2023 [3 favorites]


rmd1023: proceeded to post a bit of trivia about it on Mastodon

How lovely to learn that Mel found out about his legend.
posted by Kattullus at 7:41 AM on May 24, 2023 [4 favorites]


Oddly enough, I dated Ed's daughter in the 1980's. I had read the story a couple years before she and I met and didn't make the connection until she pointed it out. I never met her dad, though. Or Mel.

In the context of this type of programming, when I was taking a CS class in computer architecture in 1988 or so the professor spoke with reverence about how Alan Turing could write self-modifying code. I remember thinking, "isn't that how it's done when your processor sucks?" I had been writing self-modifying code for the Apple II for 5 years at that point.

Tangent on a tangent
This was when RISC (reduced instruction set) machines were a brand new research topic so he presented us with the architecture of the Manchester Mark I as "the ultimate RISC machine". The MMI had 7 instructions (note, he was presenting us with the Baby, not the MMI):
  • LNEG addr - Load the 2's complement of a value from memory into the accumulator
  • STORE addr - Store the accumulator into the memory address
  • SUB addr - Subtract the contents of memory from the accumulator
  • NOP - no operation - do nothing
  • SKNEG - skip the next instruction if the result of the last subtraction was negative
  • BR addr - branch to the address
  • BRREL value - branch relative by the value
  • HALT
As an assignment, he had us write a program that could calculate factorial and offered a prize of 1 US dollar for the shortest correct program. You'll notice that there are no immediate addressing which means that there are no actual constants. They're part of your code. So he gave us the constants 0, 1, and -1 for free in our code. There were at least 4 students who were absolutely killing themselves to win. I was one of them. My fist step was to write an assembler for the machine. It vastly increased my speed of trying things out since everyone else was writing opcodes and hand assembling them. I also noticed that 0 and 1 were both valid opcodes in the machine and you can bet your life that I dual purposed them (and other instructions and operands) as data. In the end, I came in second by 1 instruction. Me and the winner looked at each other's code and combined them and shaved off another two instructions.
So yeah, when your CPU sucks you find ways around it or I guess it's more kind to call it a liberating restriction.
posted by plinth at 7:55 AM on May 24, 2023 [11 favorites]


When did the blackjack game get played, and how, given the primitive input/output tools at the time?

I played early games with only the line printer as output. In the 1970s and into even… the late 1980s? By then there were alternatives, but some games are more fun with the tap and rattle of physical output.
posted by clew at 8:35 AM on May 24, 2023


I found this craps simulator on a HP tape archive, with the banner "GTE Sylvania 1974 Family Day" and the messages "COMMENTS HAVE BEEN ADJUSTED FOR FAMILIES" and "NO PROFANITY". What were they doing to this poor program when it wasn't family day?
posted by credulous at 9:08 AM on May 24, 2023 [1 favorite]


My father's name was Mel, and he was a Real Programmer.(1) I remember showing him a copy of the Jargon File, sometime back in the mid-80s, and he got a chuckle out of it. "Not me," he said.

(1) He was not shy about bragging that when he started programming, you input the bits of words of program memory by patching plug boards. Later, he was part of the group that wrote the NAS air-traffic control system, a mostly-JOVIAL set of programs that ran on an early SMP lashup made of multiple IBM 360 (later 370) computers. Later still, he left the Civil Service and did contracts for air-traffic-adjacent projects. It was during this time that I started apprenticing with him, making tools to QA the performance of a new air-traffic radar the Feds were buying at the time. By the end of his career, we were implementing radar data acquisition boxes based around intelligent multiport communications boards, on Wintel UNIX boxes running SystemV/386. In his 60s he wrote an interrupt-driven scheduler for a 68020-based 6-port card, to clock messages from the ports into a shared memory area that was mapped into the AT bus host's address space. The data coming in on the ports was an obscure 13-bit synchronous protocol that predates 8-bit bytes, though it's possible to process it with an 8-bit part and some clever initialization and a clever state machine. Like I said, he was a Real Programmer.
posted by Aardvark Cheeselog at 10:24 AM on May 24, 2023 [6 favorites]


some games are more fun with the tap and rattle of physical output.

Indeed. Even some silly little demos. I wrote a very small FORTRAN program called Bugrun that made printouts like this:
!                                   *                                  !
! +                                 *                                  !
!                                    *                                 !
!                                    *                                 !
!                                    *                          +      !
!                                     *                                !
!                                      *                               !
!                                       *                              !
!                                       *   +                          !
!                                      *                               !
!                                     *                                !
!                                     *                                !
!                                     *                                !
!                                     *                                !
!                                      *                               !
!                                      *                               !
!                                      *                               !
!                                     *                                !
!                                    *                                 !
!                                   *                                  !
!                      +           *                                   !
!                                  *                                   !
!                                 *                                    !
!                                 *                 +                  !
!                                 *       +                            !
!                                *                                     !
!                               *                                      !
!                               *                                      !
!                              *             +                         !
!                             *                                        !
!                             *                                        !
!                             *                                        !
!                            *                                         !
!                           @                                          !

Watching the little guy duck and weave until one of the bombs eventually splatted him was much more suspenseful at 30 characters per second on a dot matrix DECwriter. We used up far too much of the college's greenbar fanfold making these.
posted by flabdablet at 1:47 PM on May 24, 2023 [8 favorites]


People who write code like this still exist, as exploit writers, demosceners, and speedrunners (the tool-assisted variety). Using an integer overflow for control flow is like normal behaviour in those contexts.
posted by destrius at 8:50 PM on May 24, 2023 [2 favorites]


Kinda curious if flabdablet typed out that output by hand or OCRed an old printout or whipped up a reincarnation of Bugrun.
posted by mpark at 4:55 PM on May 26, 2023 [1 favorite]


Wrote one in C. If I recall correctly, the original FORTRAN version was more convoluted: rather than use a character array as a display buffer it made heavy use of dynamic FORMAT statements, which I had just found out about at the time but have long since forgotten how to do.
posted by flabdablet at 4:48 AM on May 27, 2023 [4 favorites]


Whirlwind I deployment in 1955 is notable as it seems to have been the first time that a typewriter-like input device was directly connected to a general-purpose electronic computer

As ever, Manchester was years ahead of anything in the USA. The Mark I had teleprinter input and output in 1949
posted by scruss at 4:00 PM on May 29, 2023


« Older Writing for the Ear   |   ALIENS CALLING....okay, not really, darn it. Newer »


This thread has been archived and is closed to new comments