Issue #13: Programming Languages

Memories Of Hello World

Once upon a time, during the summer of 1992. It was, if I remember well, around the 15th of July. I wrote my first line of QBasic code on a blue text editor, fueled by the eponymous PRINT command.

I pressed the F5 button to execute it.

A line of white text appeared on a dark screen.

Just that.

I still have the files somewhere. They have the .BAS extension. It was the first code I ever executed in that PC, my first real computer. A machine powered by an Intel 386 SX CPU clocked at 25 MHz, with 2 MB of RAM, a hard disk of 128 MB, and a SoundBlaster card.

But, wait. It was not the first time I programmed a computer. In school, back in the 1980s, I used a Casio fx-180p calculator with a memory for 38 instructions. That is right, you could program any formula in it, as long as it required than 39 instructions. I used it mostly for solving quadratic equations during exams. That’s cheating, I know. In the Argentina of the 1980s, it felt like using alien technology in front of my teachers.

Technically, that calculator was a computer. Small, limited, and painfully so. But I bet it was Turing complete and all and all.

But in 1992 it was a completely different level. I had a real keyboard. I had a machine that could execute more than 38 instructions. QBasic even came bundled with sample code for a game, called Gorillas, and the rumor went that Bill Gates himself had written it. Imagine that.

QBasic was simple. Fully procedural, with SUB and FUNCTION keywords (hint: the latter returned values, while the former did not, but essentially they were the same thing: subroutines.) No object orientation, no closures. There were WHILE loops and IF statements.

It was very similar to JavaScript in terms of experience; no explicit compilation phase; just write the code and press F5 (which, curiously enough, still is the essence of web development, almost 30 years later.)

I programmed in QBasic day and night, and then I would play Aces of the Pacific when I got bored or frustrated with the language. Which was very often.

I went to the Librairie Ellipse in Geneva and bought a book about QBasic. I wanted to learn more. It was the first computer book I ever bought. It was not very good, actually, but little did I know.

Writing code was an exercise in patience. My second line was obviously buggy. I could not get the syntax right. I did not know that you could “debug” a program, and execute it step-by-step. I did not know that you could use breakpoints and inspect the values of variables.

I did not know anything about programming. I had no idea who Turing was. I had no idea of paradigms, patterns, IDEs, not even how many other programming languages there were.

By 1993 I added a CD-ROM player to my computer, and I ordered a couple of CD-ROMs from Walnut Creek. One of them had folders and folders of source code in a variety of languages with very strange names: REXX, Forth, Basica, ADA, Lisp, Fortran. I did not know what those languages were for. I did not know why there were so many. I did not know I could create my own. There was no Stack Overflow, there was no Github.

There was no Internet, actually. Not yet, at least. That was in December 1994. I connected to comp.lang.pascal in Usenet and asked questions. I logged anonymously to ftp.funet.fi to download freeware stuff via FTP. Some of that was compilers and editors.

I was still mostly using MS-DOS edit. I had not heard about emacs or vim.

After that came Turbo Pascal. We had to learn it in University, for simulating some laws of mechanics. We actually had exams about Turbo Pascal without a computer; we had to write the source code of a recursive function, and we would have points taken away if we forgot semicolons.

This is how they taught us programming in university back then. But I do not remember them telling us how to reverse a linked list.

Turbo Pascal had “Units” which were libraries that you could reuse from project to project. I started collecting bits and pieces of code from the Walnut Creek CD-ROMs that I used in my projects, and without knowing I started applying the DRY principle in my work.

I also wrote my first class and my first objects with Turbo Pascal. I somehow figured out the Singleton and the Adapter design patterns without knowing that the Gang of Four were busy writing a book about them, roughly at the same time.

Maybe some design patterns, like Singleton and Adapter, are just simply natural steps happening while writing simple code snippets. But the Abstract Factory and the Flyweight are not. Neither is MVC or React or other architectures.

Those days we would meet with other fans of programming in the cafeteria of the “Sciences II” building of the University of Geneva. We would exchange ideas, dream about writing code for a living.

In October 1997 I got my first job as a software developer. But you know that story.

If I could back in time, I would have recommended my younger self to read the first edition of “Code Complete” in its entirety, before taking that job.

Cover photo by Jukan Tateisi on Unsplash.

Adrian Kosmaczewski is a software consultant and evangelist. He is a published writer, trainer and speaker. He holds a Master's degree from the University of Liverpool.