Whether you have a degree or are self-taught, the first thing you, as a software engineer, learn is a programming language. Some started with FORTRAN or C, some learned Java or C#, and others began with JavaScript, Python, or PHP.
I am sure that at some point, probably sooner rather than later during your journey to become an engineer, you asked yourself the question: "How does it work?" That is, my friend, a very valid question, and the answer can date back quite far, depending on how deep you are willing to dig.
A quick history lesson.
Programming languages are not a novelty. Our conversation with machines, at least in the form we know it today, began nearly a century ago. However, to pinpoint the exact moment we started telling computers what to do, we must venture even further back in time.
The earliest concepts resembling programming, or at least algorithmic thinking, were developed by the ancient Babylonians and Egyptians over 4,000 years ago. However, I'm not interested in going that far back. For me, the pivotal year is 1854, the name is George Boole, and the key concept is algebraic logic, which became the foundation for digital circuit design and subsequently computer programming. If the name rings a bell, bonus points for you. Yes, I'm talking about Boolean logic.
It wasn't until almost a century later that the era of coders, programmers, and software engineers truly began. The Second World War, with all its horrors, brought about a plethora of new technologies. The programmable computer was one such invention. In 1941, the Germans introduced the Z3 computer, followed by Britain in 1943 with the Colossus.
Then, in 1949, the Assembly language was introduced to the world.
0000: LDA 0010
0001: STA CRT
0002: INC ACC
0003: STA CRT
0004: INC ACC
0005: STA CRT
0006: ...
0010: 'H'
0011: 'E'
0012: 'L'
0013: 'L'
0014: 'O'
0015: ' '
0016: 'W'
0017: 'O'
0018: 'R'
0019: 'L'
001A: 'D'
001B: '\0'
Now we’re talking. Literally talking to the machine. I don’t think people could fathom how groundbreaking this is.
Abstraction, abstraction, abstraction!
This is where our venture into the world of abstraction starts. As our machines became better, so did our language and ability to speak to them. From 1949 to today, each language created was a form of abstraction over its predecessor in one way or another.
The 1960s and 1970s introduced loops, conditionals (remember Mr. Boole?), as alternatives to the goto statements. An early garbage collector and strong typing also date back to the 1970s. A decade later, multi-threading became a reality thanks to C and Erlang, and the 1990s introduced early virtualization by the JVM and CLR. We became increasingly more efficient at communicating with our silicon friends.
Every single thing mentioned here is a form of abstraction. While they sound complex, they brought us so many quality-of-life improvements that it's only fair to study them a little more. And maybe if we do, some of them won't be as terrifying as they might seem at first glance.
After all, we went from assembly code to near English-like Ruby:
print "HELLO WORLD"
Modern programming languages benefit tremendously from the ones that came before them. Many of the languages you write on a daily basis were actually written in C, which in turn was written in Assembly. Each time, they improved and provided more features while becoming easier to use.
Thanks to open-source software, it becomes easier to learn and understand how to speak any of the languages our computers understand. Most of the time, with some exceptions, you can just look up the implementation of any given method. This strips the magic of the unknown away and, hopefully, will make you a more confident and proficient engineer.
Plenty to choose from.
Now, we have a plethora of languages to choose from and that is a great thing. That said, I’d urge you to try to build something small yourself. Why? If you’re feeling romantic you can do it to celebrate decades of work to enable a conversation you have with your computer each day. Not feeling romantic? Well, you’ll learn a lot about how computers work, you’ll get a great hands on experience on parsing complex inputs, mapping that to trees, translating that into actual actions. Basically, you will become a DSL expert and I bet you won’t regret doing it.
Also you can just brag that you created a programming language. Who wouldn’t want that.
What’s next?
Want more? Interested? Good. Next week we will take a first step into the world of computer linguistics and will start designing our own simple language. Examples included.
I genuinely hope that you do find this topic at least half as interesting as I do. Until the next one.