In love with Ada

No Comments

Anyone out there remembering the Ada programming language? In this blog post, I’m going to give you a short introduction to Ada, the history of its name and some of the current occurrences in pop culture.

Hello World in Ada

To compile our first Ada program, we need to install the GNAT – the GNU compiler for Ada. On Ubuntu this can be done with

sudo apt-get install gnat-4.8

On other OS, you may have to use other package managers.

Our hello world program hello.adb

with Ada.Text_IO; 
use Ada.Text_IO;
procedure Hello is
  Put_Line ("Hello, world!");
end Hello;

… can be compiled and linked with

$ gnatmake hello.adb
gcc-4.8 -c hello.adb
gnatbind -x hello.ali
gnatlink hello.ali

This will result in an executable hello in the same directory. Running it will finally print out the desired message:

Hello, world!

As you can see, Ada looks a little bit like Pascal and is indeed based on it. The full syntax can be found in the lastest reference manual. Some of the main features are exceptions and built-in concurreny handling. The IDE for Ada development is GPS – the GNAT Programming Studio.

A brief history of Ada

The Ada programming language was built in the late 1970s by the US DoD (Department of Defense) in order to consolidate the huge amont of different programming languages used there. It is named after Augusta Ada King, Countess of Lovelace, better knows as Ada Lovelace, an English mathematician from the 19th century. This woman is said to be the first programmer ever, or at least she worked on an algorithm for Babbage’s analytic engine, some kind of mechanical device for performing simple (from our point of view) computations. Her achievements made her an iconic person and the name Ada has several occurrences in modern culture.

Ada in Pop Culture

The godfathers of cyperpunk, William Gibson and Bruce Sterling, picked up the topic in their novel The Difference Engine which more or less etashblised a whole new genre called steampunk. Of course, Ada does appear in that story.

Being a big fan of Lego, I really like this to-be set: Lovelace & Babbage.

Lego set Lovelace + Babbage

It features two minifigures Ada Lovelace and Charles Babbage and of course the analytical machine which is designed to house a small computer like a Raspberry Pi.

The name Ada often occurs in computer games. The last recent occurrences I know of are in Ingress and Fallout 4.

ADA Refactor - a weapon in Ingress Ingress is an augmented reality game played on mobile devices. Two factions battle against each other for so-called portals, locations inside the real world. You can capture enemy portals be attacking them. The ADA Refactor is one of the most powerful weapons.

The RPG Fallout 4 is set in a post-apocalyptic world where the player wanders the wasteland and fights for survival. There is a modifiable robot companion called Ada. My version looks like this:

Ada - a Fallout 4 robot companion

There’s another robot called Lady Lovelace. Both are clear references to the real-world Ada.

If you are aware of any further recent Ada occurrences, please let me know.

Dipl.-Math. Tobias Trelle is a Senior IT Consultant at codecentric AG in Solingen/Germany. He’s into IT business for nearly 20 years and is interested in software architecture and scalability. Tobias gives talks at conferences and meetups and is the author of the German book “MongoDB: Der praktische Einstieg”.


Your email address will not be published.