
The Story of Mel (1983) - thefreeman
http://www.cs.utah.edu/~elb/folklore/mel.html
======
Codhisattva
I think every programmer should write machine code at least once. It's
fascinating to understand how the CPU actually gets the job done.

~~~
delinka
I find it even more fascinating the techniques we use to make calling
libraries of code reliable. When writing your own code in machine code, you
can jump around all you like; but when you need to use a compiled library,
calling conventions start to matter a lot.

------
thefreeman

         Mel finally gave in and wrote the code,
         but he got the test backwards,
         and, when the sense switch was turned on,
         the program would cheat, winning every time.
         Mel was delighted with this,
         claiming his subconscious was uncontrollably ethical,
         and adamantly refused to fix it.
    

I can't decide if its better if he intentionally did this, or it actually was
an accident, but this was my favorite part by far.

~~~
philh
That seems like a difficult mistake to not notice while working on a "let me
win" feature.

For that matter, in general the code for "the computer should win every time"
and the code for "the computer should lose every time" don't necessarily look
anything like each other. They could do in this case, though. E.g. make the
computer decide whether or not to bet based on the next card to be dealt, and
accidentally reverse that test. (The test that he got backwards was clearly
not "is the sense switch turned on?")

------
MichaelCrawford
I've done this, in the Intro to Computer Architecture class at UC Davis during
Summer Session 1981, while I was still in high school.

What I was expecting was to learn how to build a computer out of transistors,
you know, with a soldering iron, as I wasn't having much luck finding paying
work when I was in high school.

What the course actually taught was how to write device drivers for the LSI-11
- a PDP-11 compatible minicomputer - in assembly code, hand-assembling it into
octal, then entering with a keypad using ODT, the Octal Debugging Technique.

It was my only college course for which I receive a C. :-(

------
SixSigma
Welcome back Mel

[https://news.ycombinator.com/item?id=8922844](https://news.ycombinator.com/item?id=8922844)

1 point by SixSigma 18 days ago | link | parent

currentoor > Why is HN so interested in linear algebra lately?

me> It happens to all topics.

One topic gets voted to front page, then people fall down the rabbit hole,
posting any links they hit on their way down.

Once every 6 months or so Plan 9 gets a front page hit, probably from someone
getting into Go-lang. Then we see all the related papers and websites flood in
for a while - Russ Cox' site, cat-v, Rob Pike Interviews, Utah2000, The birth
of UTF-8.

It's like the September that Never Ended.

The Story of Mel is on the same cycle.

[http://www.catb.org/jargon/html/story-of-
mel.html](http://www.catb.org/jargon/html/story-of-mel.html)

------
LukeB_UK
Relevant XKCD: [http://xkcd.com/378/](http://xkcd.com/378/)

~~~
Codhisattva
Real programmers use "copy con program.com"

