How I Got Into Programming

How I Got Into Programming

My dad got us our first computer when I was 11; it was a BBC Model B+128 with a 40/80 track switchable double-sided 5.25″ disk drive. And it came with a manual. Printed. On paper! Not just how to connect it up and switch it on but full details of all the OS commands and the built-in BBC BASIC programming language. So I started using it, learning to program in BASIC, slowly at first but with increasing speed and confidence. I subscribed to Acorn User magazine and slavishly typed in the program listings. I was hooked!

BBC BASIC was an great language in an great environment for learning to program. It introduced me to control structures: conditions and loops. It had named functions and procedures (rather than the usual GOSUB in most microcomputer BASICs). It had floating point as well as integers. It had strings and a set of built-in functions for manipulating them. It could access the machine’s memory directly. It even had a built-in assembler. It gave me such a feeling of control over the hardware that I felt I could do anything with it.

When the 32-bit ARM2 Acorn Archimedes was released in 1987 I got one (one of the first batch of A305 machines with Arthur 0.2 OS), later upgraded to 1 MB RAM and Arthur 1.2; then RISC OS 2.0. I thought it was a marvellous machine, so fast and capable. I later upgraded to an ARM3-based A540 with 8 MB RAM and two SCSI hard disks for a total of about 160 MB storage. Huge for its time, especially for a home computer. I continued programming in BBC BASIC (version V included with the “Arc”) which included additional control structures (WHILE…ENDWHILE, multi-line IF…THEN…ELSE…ENDIF, CASE…OF…WHEN…OTHERWISE…ENDCASE), RETURN parameters in procedures, libraries (via LIBRARY, INSTALL or OVERLAY) and had a built-in full-screen editor, the ARM BASIC Editor or ARMBE. I reckon I probably spent the majority of my time in front of the machine in that editor, developing programs.

A number of times I would spend upwards of 12 hours at a stretch at the keyboard and some of the programs ran into thousands of lines. I wrote interpreters for scripting languages, bitmapped font editors, a parser for chemical formulae, a graphical plot of magnetic fields in a plane intersected by wires carrying current, and many others. I even wrote a kind of hypertext application inspired by the depiction of the “Guide” in the TV adaptation of The Hitchhikers Guide to the Galaxy.

It was on this A540 that I first encountered C. I got a copy of Acorn C and a book to teach me the basics. Once I grasped the concept of main() being the entry point for the program I was well away. The nature of BBC BASIC meant I already understood structured programming: conditions, loops, functions, and was used to thinking in those terms. It wasn’t long before I got hold of a copy of Software Tools in Pascal and coded the programs presented therein in C. I wrote a utility to implement IO pipelines on top of RISC OS’s pipefs (OS-implemented named pipes) so I could reproduce unix-style filters without needing intermediate files. I got a copy of Expert C Programming: deep C secrets and found it very informative and practical: it taught me a lot and by this stage I was proficient enough to program C professionally. I got my first job programming C on 16-bit DOS and Windows 3.1 despite having limited experience of those platforms: I was given the job on the strength of my performance on a C programming test at the interview.

I had had some limited exposure to a fairly new language called C++ that introduced something called classes. I didn’t really get a lot of exposure to it until the mid-90’s and it took a little bit of perseverance to get used to object-orientation. There were no templates in those days, at least not in the version of Microsoft C++ used where I worked, and exceptions were avoided because of concerns about performance. I really got the hang of it after taking a course in OO design which gave me the mental toolkit for thinking about classes naturally. The language support from Microsoft’s compilers improved over time and it was really with the move to 32-bit Windows and new development for that platform that C++ became my new programming language of choice. I got copies of and read Effective C++ and Exceptional C++ to learn about best practices.

It’s now some 15 years down the line and I consider myself a skilled C++ developer. (More to the point, so does my employer.) Along the way I’ve had exposure to several other programming languages, some of which I use regularly such as Python, sh, javascript, perl and awk while others I’ve used as and when the job has demanded it such as Java, C#, SQL, Visual Basic and several application-specific embedded scripting languages. I’ve dabbled with other languages such as Haskell, Lisp, Ruby, Pascal, Fortran and even Cobol at times just out of interest but never becoming fluent enough to use them as a first choice day to day.

So what started out as “just” a hobby is still, over 25 years later, my main hobby. The only difference is that I get paid to do it. I still feel the same joy and excitement when I produce code that does something neat. I get exactly the same satisfaction from my latest code to, say, ingest video and audio from an XDCAM disk as I did from my first BASIC program that just printed “hello, world” to the screen. What will I be doing in 10 or 20 years’ time? I don’t know, but I’m pretty sure I’ll still be programming and loving it.