Skip to main content

The Demon Machine

Over the weekend I was reunited with the first two computers I spent extensive time programming. The Sharp MZ-80K (released in 1979) and the BBC Micro Model B (released in 1982).

Here's the BBC Micro:

with the top off you can spot that I've added my own headphone socket at the back and that this machine was upgraded with the speech synthesis module.

And I had the ROM slots maxed out with Basic II, Caretaker, and Acornsoft LISP.

And here's the Sharp MZ-80K:


Both work fine, but I was struck by my reaction to the machines. I wanted to boot them up and get programming. A little voice in each machine was speaking to me about all the unchartered lands of programs that could be written in just kilobytes of RAM. Of all the possibilities, tucked away in the Acorn MOS and the Sharp's memory.

It's the same little voice that still drives me on to write just another line of code, to perfect just another little routine. Just the other night I was dragging myself at midnight but unable to turn in until I'd got the proportional font working on this homebrew display I'm working on:



Truly, that inner voice is demonic. The seductive world inside a computer (so well captured in 1982's Tron) draws you in with just one more possibility, just a little more time. The demon voice asks that you keep going when physical strength is gone, when you know that tomorrow will come and tiredness will ruin your day. But right now, right then, the power of the machine, the power over the machine, matters more than anything.

And yet the computer is a harsh mistress. If it fails to do what you want it's because you failed. It is merely deterministic; you didn't correctly tell it what to do. As Maurice Wilkes poignantly puts it of the early days of computing:
As soon as we started programming, we found to our surprise that it wasn't as easy to get programs right as we had thought. Debugging had to be discovered. I can remember the exact instant when I realized that a large part of my life from then on was going to be spent in finding mistakes in my own programs.
The human/machine relationship is abusive. The computer tempts you with its power and possibility, then punishes you with your own failings, your own inept attempts at programming it, your own lack of knowledge. And yet you love it.

As ever Richard Feynman can be relied upon to capture the disease of computing:
“Well, Mr. Frankel, who started this program, began to suffer from the computer disease that anybody who works with computers now knows about. It's a very serious disease and it interferes completely with the work. The trouble with computers is you *play* with them. They are so wonderful. You have these switches - if it's an even number you do this, if it's an odd number you do that - and pretty soon you can do more and more elaborate things if you are clever enough, on one machine.

After a while the whole system broke down. Frankel wasn't paying any attention; he wasn't supervising anybody. The system was going very, very slowly - while he was sitting in a room figuring out how to make one tabulator automatically print arc-tangent X, and then it would start and it would print columns and then bitsi, bitsi, bitsi, and calculate the arc-tangent automatically by integrating as it went along and make a whole table in one operation.

Absolutely useless. We *had* tables of arc-tangents. But if you've ever worked with computers, you understand the disease - the *delight* in being able to see how much you can do. But he got the disease for the first time, the poor fellow who invented the thing.”
And so dear BBC Micro and Sharp MZ-80K you shall remain powered off (or at least that's what I'll tell everyone and I'll secretly fire up that LISP ROM when no one's looking and just write a little program, just one.)

Henry Kissinger has famously said that power is better than sex. Well, clearly he isn't a programmer!

PS Does anyone have a copy of the manual for the Caretaker ROM? Purely, for completeness; clearly I'm not going to actually need it :-)

Comments

Ruben Berenguel said…
When I got to the main point in your post I thought "hah! Like Feynman said!". And then you quote Feynman :) Everyone who has been biten by the programming bug knows the feeling. Start and never end, and repeat the cycle endlessly.

Ruben @mostlymaths.net
Anonymous said…
I know this feeling well. It is definitely an addiction. Strangely, though, people will pay you to engage in it! The other night a catchy phrase occurred to me: After midnight, I collapsed into bed exhausted but happy, having successfully sought and achieved Computational Consummation.
KBR said…
Ah shit. I found an old TI computer that's older than I am and my first reaction was, "I need to get the RF modulator so I can hook this thing up to a TV and get hackin'".

I wouldn't have any idea where to even start, but I know I'd get sucked in.

Yeah, that evil little silver box lives in the storage unit now.
Michael Gruen said…
Wow... so TRUE ! :-) I still have my Zilog Z-80 from 1982, with wires all hanging out from a phone dialer... and a notebook with tens of pages of handwritten assembly code... Ha ha almost 30 years later now... and seriously, the play aspect to this day requires deliberate self-control... thanks for the article.
Dan Sutton said…
Yes! Yes! That's right! Ah... this takes me back to the good old days, when everyone programmed in machine code and lived in the forest... and nobody lived anywhere else...
Mark Agius said…
Plug in to the mains, turn on 'beep' and you can start using it,
unlike modern computers that take ages to turn on.
I'm sure BBC micros can crash, but I can't remember mine ever crashing.
The only computer that knows how to spell the word colour.
Richard Langner said…
My business still runs on a BBC micro!

Way back in the 80s I wrote an accounting program (in a 16k ROM), and I still use it today to make a living as an accountant.

There is still nothing like it that runs on a PC.

I wrote the program in 6502 assembler, and it assembled into sideways RAM, which occupies the same address space as the BASIC ROM.

The program finished up as a relational database, with data compression (and decompression on-the-fly) and I used my own version of virtual memory to assemble the code which was in 13 parts as it would not all fit into ram at the same time.

The BBC's RS485 connects nicely with the RS232 on the PC so I can publish the results in MS Word.

The good old days!
@Richard

That's a wonderful story. Do you have a web site write up of what you are doing? I'd love to see pictures of your set up. Sounds brilliant.

John.
frilijibican said…
I still have the punched cards for an eternal calender program run on the Illiac IV in Urbana Illinois - The creator of "Hal" in "2001 A Space Odyssey"

Popular posts from this blog

Your last name contains invalid characters

My last name is "Graham-Cumming". But here's a typical form response when I enter it:


Does the web site have any idea how rude it is to claim that my last name contains invalid characters? Clearly not. What they actually meant is: our web site will not accept that hyphen in your last name. But do they say that? No, of course not. They decide to shove in my face the claim that there's something wrong with my name.

There's nothing wrong with my name, just as there's nothing wrong with someone whose first name is Jean-Marie, or someone whose last name is O'Reilly.

What is wrong is that way this is being handled. If the system can't cope with non-letters and spaces it needs to say that. How about the following error message:

Our system is unable to process last names that contain non-letters, please replace them with spaces.

Don't blame me for having a last name that your system doesn't like, whose fault is that? Saying "Your last name …

All the symmetrical watch faces (and code to generate them)

If you ever look at pictures of clocks and watches in advertising they are set to roughly 10:10 which is meant to be the most attractive (smiling!) position for the hands. They are actually set to 10:09.14 if the hands are truly symmetrical. CC BY 2.0image by Shinji
I wanted to know what all the possible symmetrical watch faces are and so I wrote some code using Processing. Here's the output (there's one watch face missing, 00:00 or 12:00, because it's very boring):



The key to writing this is to figure out the relationship between the hour and minute hands when the watch face is symmetrical. In an hour the minute hand moves through 360° and the hour hand moves through 30° (12 hours are shown on the watch face and 360/12 = 30).
The core loop inside the program is this:   for (int h = 0; h <= 12; h++) {
    float m = (360-30*float(h))*2/13;
    int s = round(60*(m-floor(m)));
    int col = h%6;
    int row = floor(h/6);
    draw_clock((r+f)*(2*col+1), (r+f)*(row*2+1), r, h, floor(m…

The Elevator Button Problem

User interface design is hard. It's hard because people perceive apparently simple things very differently. For example, take a look at this interface to an elevator:


From flickr

Now imagine the following situation. You are on the third floor of this building and you wish to go to the tenth. The elevator is on the fifth floor and there's an indicator that tells you where it is. Which button do you press?

Most people probably say: "press up" since they want to go up. Not long ago I watched someone do the opposite and questioned them about their behavior. They said: "well the elevator is on the fifth floor and I am on the third, so I want it to come down to me".

Much can be learnt about the design of user interfaces by considering this, apparently, simple interface. If you think about the elevator button problem you'll find that something so simple has hidden depths. How do people learn about elevator calling? What's the right amount of informati…