Machine love

A notification popped up on my screen, before disappearing a few seconds later. Someone had mentioned me on Twitter, a name that was familiar. Minecraft could wait, I went to see what this was about.

Ethan Lee, also known as flibitijibibo (I copied and pasted that, I still can’t write it without looking), asked a question, and it was a very interesting question.

flibitijibibo's tweet

If you don’t know him, have a quick look on Twitter. If you use Linux and like gaming, chances are you already have reason to thank him. He’s a very good developer, one that loves his job, and if I’m not mistaken, is becoming his own boss, doing what he loves best. His site presents him more than I could, but he is rather modest, he deserves more credit than he gives himself (probably one of the reasons why I like him). He also called me a “very nice person” once in one of his game’s README files, but for the life of me, I can’t remember which one it is. Anyway, I digress.

I would be interested in knowing if people really wanted to program for the machine they fell in love with, or loved programming in general.

Interesting question. Time for a quick history lesson, I suppose.

I was born on the 14th of April, 1977, in Singapore. I’m British, my parents are English, and for several reasons, my mother moved back to England shortly after my birth. My mother had a certain lifestyle which meant that I was often on my own. I don’t think I have any reason to complain; what I didn’t have in the way of family, I had in the way of learning resources. Books, videos and above all, a computer. A rather fancy Apple IIe, quite a beast for the time. I played a few games, wrote some extremely useless documents and had fun with spreadsheets. I was fascinated by the pure logic of this device, and also fascinated by the electronic expansion boards inside it. However, I didn’t really have a way to program it, so that had to wait for another year.

My first “personal computer” (not to be mistaken with a PC), was a Spectrum ZX81, a replacement for the family ZX80. Based on a 3.25Mhz Z80, it had a whopping one kilobyte of RAM, but if I’m not mistaken, I had an elite version that came with 4Kb of RAM. I had a few games, but the interesting thing about this was the BASIC interface. Just as a reminder, a very simple BASIC program looks like this:

10 PRINT "Hello, world!"

20 GOTO 10

The interesting thing about the ZX81 was the keyboard. Each key had the letter assigned to it (of course), but also a graphical character, and a BASIC instruction. To write “10 PRINT”, you would actually type in 10, and then the letter “P”, which would complete the “PRINT” directive.

ZX81 Keyboard

This was interesting. I now had all the instructions available in BASIC, and little chance of writing something wrong, and now it was time to learn. At the age of 6, I wrote my first program. It was particularly boring, and was a crude imitation of teletext, something popular on televisions at the time.

Time went by, and computers came and went. Spectrum ZX82, Spectrum +3, Commodore 64, and then finally, the Amiga 500. Now this was the machine that got me hooked. It was based on a Motorola 68000 running at 8MHz, and had 512Kb of RAM. The games were awesome, and so were the utilities. I saved up some money, and bought AMOS, a BASIC IDE (well, sort of), and could write awesome games. I published my first “game” at the age of 14, a platformer called Kitten Curse. Apparently, it has fallen into the oubliettes of retro gaming, where it belongs. I wasn’t very good at graphics or music, so they were both terrible. The level itself was rather easy, but the code was all mine.

In parallel, I had come to love electronics. I was fascinated by the insides of a computer, and while people told me to try and build my own radio receiver, I preferred digital systems (and I still do).

I moved to France, and apart from “Hi, my names is James, and I have a passport”, I couldn’t speak French. Life is “interesting” when you are 15, and don’t have any friends, living out in the countryside. To cheer me up, my family bought me DEVPAC, a programming environment for my trusty Amiga. DEVPAC wasn’t BASIC, it was assembly.

Assembly let me do some incredible things, pushing the processor to its maximum potential. I made a few more games, including a second port of Kitten Curse, that was probably even worse than the first one. Hey, give me some credit, I was only 16!

Somewhere in my brain, a few neurons fired. This was a mix of both electronics and programming. I knew exactly what happened on the processor, and how it communicated electronically to other devices.

This is the difference. I wasn’t programming the computer, I was programming the microprocessor. That might not sound like much, but it made a difference then, and it still makes a difference in my career today.

When I tell the story, I get a few questions. Hey, you started so young, you must be an awesome developer! No, I’m not. I know what an awesome developer is, I’ve worked with a few, and I’m not one of them. How come? Read on.

Eventually, the Amiga died, and something died with me. I had little choice, it was replaced by a PC, a 386SX25. That machine was awesome, and gave me some pearls like Monkey Island, Lemmings and the BASIC pearl Bananas.bas. Then I tried x86 assembly. I hated every second of it, and I still do. On my 386, there were over 10 types of JUMP statements, and that was just the start. I quickly gave in.

This as a grey period of my development life. I retried BASIC, fiddling around more than developing. I tried C, and it was kind of fun, but I’d lost the love I had. Still, I found out that I could do hardware programming in C, and so my 386 became a control unit that managed the heating of my student flat. Originally, my system used the parallel port, but I soon created my own ISA card. That was fun! Just when I got used to it, they replaced ISA with PCI. Yes, I could play better games, but I could no longer make my own cards.

Something happened. We had some friends that were in the computer industry, and someone gave me an Acorn Archimedes. I forget which model, but I believe it had an ARM3 microprocessor. It had a version of UNIX, so I had a few games, a few tools, and everything I needed to create programs. It took me a while to try ARM assembly, and my only regret is that I didn’t try it earlier. Memories of my previous joy flooded back as I had a look at the assembly instructions, and the power they had. Everything was fluid, and I started writing assembly again. Quite a few years had gone by, and assembly was no longer a viable option for writing applications. While it was fun, it just didn’t work out.

I was back on PCs after a while, and I have been ever since. However, a lot has changed. Despite what I believed, I’m still working on ARM assembly, only this time, I’m using my PC to compile for a tiny processor. I’ve swapped my 320×200 screen for a triple full-HD monitor setup. I’ve swapped my 8MHz processor for a 4GHz multi-core processor. I’ve swapped my 880k floppies for a 4Tb hard drive system with a 12Tb NAS. However, I haven’t swapped my love for programming embedded systems. I love talking directly to hardware, knowing exactly what the output of a particular pin is. I love talking interrupts, cache, sleep modes and bootloaders. And don’t even get me started on optimizing! I’ve found my love again.

Well, sort of. I live in France, and after a professional difficulty, I went to work for a French consultancy agency. This is where things went very, very wrong. This isn’t what people think it is. It is a collection of engineers who are very close to burning out, exchanging stories of nightmare missions and situation. To name but one, this particular company sent me on an international trip to  help a client. Two weeks in Brazil. Sounds nice? Well, for a start, we’re not talking beaches, but car manufacturing factories. The night guard at the hotel was armed, and didn’t joke around. I had strict orders to stay in the hotel, and not to leave without an escort. My girlfriend was also 8 months pregnant, and I could have missed the birth of my daughter (luckily, I didn’t). To top it off, remember the Air France flight AF447? The infamous Paris – Rio flight that went missing. No, it wasn’t that flight I was on (for obvious reasons), but it was the same route, not too long afterwards. And the co-pilot of AF447 was a personal friend of ours, so our wounds were fresh. At the time, no-one knew what happened. I arrived 2 hours late, and I turned my mobile telephone on to find several messages from my girlfriend, in tears, pleading with me to tell her I was alright. And this wasn’t even the worst story.

I used to love developing, but two things stopped that. One, the way developers are treated here in France. One of those clients rated developers work by the number of lines they wrote. The managers barely knew what an IDE is, but judged us by the number of lines of code we wrote. Java developers could write hundreds, but I was an assembly developer. So, out of rage, I wrote my cache control program, adding 500 lines of “NOP” (short for No OPeration, or basically, “do nothing”). That actually worked, I was pushed to the top of the list. Secondly, at close to 40, people asked me what went wrong during my career. Wait, you are 40, and you are STILL a developer, and not yet a project manager? Poor you! No, not poor me, I’m doing fine, thanks.

So, to answer Ethan’s question, yes, I did love writing for a specific computer (or at least, processor). I’ve tried writing multiple languages for PCs; C, C++, Pascal, assembly, Scala, Java… No such luck. Ironically, I do love Python, though. I don’t have to deal with memory, or timing, or data types, or anything, but I still love it. Maybe I do love programming, now that I’ve found a language that I love, as well as a computer that I love. Or maybe, after 2000 words, I still can’t answer Ethan’s question. Maybe I just needed more time, but a few things came along that just made me stop.

So, who am I today? I’m not a developer with Google, I don’t work for a Fortune 500 company, I work for someone much less fortunate, myself. Someone at ARM once called me world class, but I still don’t believe him. I now spend my time telling people how these things work. As Paul Rako from Atmel once said, I’m no longer an engineer who writes, but a writer who engineers. I’m jealous of people like Ethan who still love to develop. I really am. Now, enough reading me, go to his website, have a look at what he’s done, and go and play some of the games he’s ported. Off with you. Oh, and if you want to start programming ARMs or Arduinos, have a look at my book, you’ll understand where I am today.

Leave a Reply

Your email address will not be published. Required fields are marked *