Learning to Code
Code defines our relationship with machines, and we all have a unique relationship with machines because we all learn code differently. This is my journey. Yours won’t be the same, because ‘the past is a foreign land’. All that I can hope is that there are some lessons/inspiration here.
This post was inspired by the recent #FirstSevenLanguages hashtag on Twitter, and posts like this one from Paul Fremantle; and then I read Dan Luu’s How I learned to program. Also last week I was at a graduate induction event and referenced GE CEO Jeff Immelt’s statement “Everybody who joins G.E. is going to learn to code. We hire 4,000 to 5,000 college grads every year, and whether they join in finance or I.T. or marketing, they’re going to code.”, which led to a lot of people asking how I learned to code at the networking event later that day.
I didn’t get my hands on a computer until I was 10, when my dad bought a ZX81. My brother and I both wanted to play games, which generally meant typing in listings from books and magazines, which then meant debugging our typos, which meant we needed to figure out what was wrong, which meant understanding what was supposed to be right.
Beginners All-purpose Symbolic Instruction Code (BASIC) was pretty much the only show in town at that point, so I learned different dialects as I encountered different machines. An RML 480Z turned up at school, so I got a taste of LOGO, but BASIC was still where things were happening. I found books with games tat were in flavours of BASIC that didn’t quite work on the computers I had access to, so I learned to adapt.
My next school was blessed with a room full of computers that I got access to as part of a ‘computer club’ that ran at lunchtimes and some evenings. When I started there were about half a dozen BBC Micros, a variety of Commodore PETs, and an RML 380Z. The latter provided a means for me to learn CP/M and dabble with some ALGOL, but most of the action was still BASIC.
That club, and the people in it, were a source of great inspiration. Particularly one of the 6th formers ‘Stig’ who had been part of the team that won Young Scientist of the Year with a Commodore PET based theatre lighting control system. ‘Stig’ also had tales of helping to fit the BBC Micro ROMs into the available space, and got embroiled in the first real world vs software copyright debacle when Waddingtons sued the publishers of Personal Computer World (PCW) after they published his PET version of Monopoly and featured it on their front cover.
At home we got a Dragon 32, whilst friends had Sinclair Spectrums, and Oric/1s and TI99/4as and all manner of other things from the cornucopia of 8bit home computing. More games, games, games, and BASIC, BASIC, BASIC. I hacked away on a graphics program for the Dragon that I hoped to sell to one of the multitude of software companies springing up to serve the UK market.
The Dragon 32 was a family computer, which meant fighting over it with my brother, and sometimes conceding that it had been bought for my step dad’s degree project (a civil engineering plant depreciation calculator). I wanted my own computer, and that came when Commodore’s commercial disaster the Plus/4 showed up at my local Poundstretcher in a £99 bundle with tape drive, joystick and a bundle of (mostly games) software. I scraped together enough money to pair it with an ex demo Philips TV/monitor on sale at my local Boots and I finally had a computer of my own. Also the Plus/4 had a much stronger BASIC than its more commercially successful predecessor the C64.
The Plus/4 got me writing programs that worked across many Commodore machines (e.g. PET, Vic-20, C64, C16, Plus/4) and at 14yrs old I managed to get a Simon game published in Commodore Computing International (CCI) and a disk utility in PCW. The cheques paid for a second hand C64, a 1541 floppy drive and a printer (so I no longer had to take stuff to school to be printed out).
Writing the disk utility got me under the covers of the hardware and the bit twiddling needed for things like undeleting files. The Plus/4 had a decent machine code monitor, so I started to dabble with 6502 assembly (well actually 6510, but close enough). A cheap copy of the C64 Programmers Reference Guide got me exploring the relationship between the CPU and all of the other chips. I also started blowing my own custom ‘Turbo’ boot ROMs for the C64 for my own machine and friends.
Although I never owned one myself the arrival of the Amstrad PCW became a significant factor, as my dad bought one and so did one of my friend’s dad’s. Whilst they were mostly used for Word Processing the ability to run CP/M opened the door to many other things, and they came with a strong BASIC interpreter.
At the end of this period cheap PC clones like the Amstrad PC1512 started showing up, and I spent a bunch of time setting people up with ‘hard cards’ – a combination of a (typically 32MB) 3.5″ hard disk drive and a controller card that was cheaper than the factory install 20MB 5.25″ HDD. This also got me learning my way around MS-DOS (and particularly autoexec.bat and config.sys).
Computers and programming didn’t feature as any part of the syllabus during this stage at school. I think 6th formers had the option to do a ‘computing studies’ O level, but I didn’t stay at that school for 6th form.
6th Form college
I’m pretty sure that computing wasn’t on offer at A level either, but computer labs (and computers in labs) did show up. I do recall a deal with my physics/electronics teacher that if I taught the microprocessors module in electronics he’d turn a blind eye to me skipping the electronics module in physics.
By this point helping people and local businesses with their computers had become my main source of income for evening/weekend work. Much of it was pretty mundane, like typing in handwritten CVs so that they could be presented more professionally in print, but I got to do some cool stuff, and I got to play with just about everything new to the market – Sage Accounting, Digital Research GEM, and early versions of Microsoft Windows.
The point to all that work was finding the means to buy my own Amiga 500 (and also my first car). That was the machine that got me started with C (and also the Amiga version of the REXX scripting language ARexx, which was often used to glue different apps together).
The end of 6th form brought a summer job at BMT Cortec working on their Transputer based ship simulator project. I didn’t get to spend much time with Occam, and working on the project directly, but I did meet my first VAX and learn FORTRAN in order to wrangle a bunch of charts and blueprints into a consistent model of Dover harbour.
The Amiga was left back at home as I headed to BRNC Dartmouth to become a Naval Officer. I’d picked up an Amstrad PPC640 to go with me. It wasn’t exactly a laptop, but it was portable enough. I didn’t get to do much programming, but I did spend a lot of time getting the staff PCs and their word processors working properly.
1st year at University brought PASCAL into the frame, and I did the assignments on the PPC640, infuriating Andy Tyrrell with my habit of making the source as small as I could – I hadn’t figured out at that stage that code was for people and not for computers.
Things got a little more interesting in 2nd year with a project to write an OSI networking stack in C running on some shiny new SGI Indigo boxes, so I got to learn IRIX and SunOS flavours of Unix. There was also some PAL programming thrown into the mix, and I upgraded to an Amiga 1200 (which quickly found itself with a 68030 processor card and a 60MB hard disk).
My final year project got me properly immersed in Occam as I developed a signal processing app on an array of Transputers. I also got a little exposure to Objective-C by working in a lab full of people with NeXT boxes. It was a privilege to rub shoulders and hack on stuff with some participants in the now infamous ‘Linux is Obsolete’ Tanenbaum-Torvalds thread. My real time systems module with the computer science department also got me into Ada, which at the time was very hot due to the DoD mandate to use it for defence equipment (and the University of York was at the heart of that hotness, as one of the handful of places that had developed Ada compilers).
Returning full time to the Navy I entered a world of training establishments that were just picking up Windows for Workgroups and the underlying networking. Windows brought with it visual programming, but rather than picking up Visual Basic I went with the PASCAL derived Borland Delphi, writing apps for things like determining the correct alignment of satellite communication antennae.
I’d been around to witness the birth of the web, so I naturally started playing around with HTML and Perl. A lot of my computer time went on practicing for MCSE exams, but I also got into Linux (Slackware then Red Hat 4 if I recall) and compiling my own kernels for the obscure hardware that started showing up everywhere for next to nothing as companies purged themselves of anything vaguely Y2K threatening.
The Java (and .Net) years
Missing the exploding .com bubble was one of the main factors that drove me out of the Navy, and a few months later I found myself heading up the application server engineering team at an investment bank. The main job was scripting installations for app servers like IBM’s WebSphere and BEA Weblogic. I wasn’t a Java developer, but I often found myself picking over poor quality Java code in order to make it run properly, so I leaned the difference between a JavaBean and an EJB and quickly became a JVM tuner.
In the parallel universe of of Microsoft stuff (which we were a big user of, having on hand the ‘gods of brittle architecture’ who’d made Microsoft’s ill fated ‘DNA‘ work) .Net was launched, and I found myself frequently flipping between C# and Java.
The end of this period found me using C++ in anger for the first time since doing a course on in in the mid 90s in order to tickle CPU-ID instructions on a menagerie of a few thousand servers making up a compute grid (we had issues with Hyper-Threading). I also got to appreciate the difference between idiomatic Java and Java written by hard core C++ programmers.
As the day job rotated between IT infrastructure, banking and infosec the kids were growing up and I wanted stuff that would introduce them to the joys of programming.
Infrastructure as Code
This entire post is about code and programming languages, but I’ve spent most of my career on the Ops side of the Dev-Ops split. Although I’ve occasionally been paid for writing some software I’ve never considered myself a professional developer. But infrastructure is becoming defined by code.
Ruby was the tool of choice whilst I was at Cohesive Networks, and some familiarity with it was useful as I found my way around Puppet and Chef. I also found myself becoming serious about bash scripts, and leaning heavily on Google’s Shell Style Guide and ShellCheck. Picking up Ansible was also helped by some previous Python familiarity.
The dominant force in infrastructure software for the past few years has been Go (or Golang). Docker is written in Go, Cloud Foundry has been rewritten in Go, all of the new Hashicorp tools are in Go. It’s the first new systems and application language since C, and it’s clearly designed to make relatively inexperienced programmers productive whilst bringing with it the Communicating Sequential Processes (CSP) support for concurrency that I first encountered in Occam. Good software is often defined by having great documentation, samples and examples, and Go gets off to a great start with its Tour of Go.
Looking to the future
The language geeks I know aren’t that excited about Go, but mostly are excited about Rust, which is also a systems programming language that can work on small devices (even the micro:bit). I’m also keeping a close eye on Swift, especially since it was open sourced leading to a lot of server side activity from IBM. The launch of the Swift Playgrounds for iOS devices could also get a lot of younger people using it.
I’m an electronics engineer rather than a computer scientist, so the pattern here is that I learn languages to do software stuff that makes hardware do what I need. A lot of the story above is about the hardware I had at hand as much as the programming languages I used to code against it.
 This became every evening after we made copies of the keys to hack around the need for adult (or 6th former) supervision.
 One of my all time favourite hacks for a customer was adding a 555 timer to a 5.25″ drive so that it could simulate the eject signal found on the newer 3.5″ drives that came with the IBM PS/2 they were using (they had a ton of stuff on older disks that they wanted to transfer).
 There were actual people in white lab coats looking after the VAX.
Filed under: technology, Uncategorized | 4 Comments