The real world doesn't care about encoding

by Jannik Arndt

Last week one of our programs failed looking up an airplane by its registration. That’s not a surprise, since ac regs are a horrible identifier. They change all the time. Also there is almost no naming rule at all. Wikipedia states

When painted on the fuselage, the prefix and suffix are usually separated by a dash (for example, YR-BMA). When entered in a flight plan, the dash is omitted (for example, YRBMA). In some countries that use a number suffix rather than letters, like the United States (N), South Korea (HL), and Japan (JA), the prefix and suffix are connected without a dash.

Okay, so the only thing in common is a prefix and a main part, separated by a dash, but that’s often dropped. Nice! Also the both parts might consist of letters and numbers. And they vary in length. And most of the time, the prefix designates the country of registration, although there are exceptions, for example Guernsey, which is not a part of Great Britain (G–) but its property, therefore having the registration 2– They island has its own airline, Aurigny, but all of their 10 aircraft use the G--Prefix.


And then there are military aircraft. Since they are not affected by the Chicago Convention on International Civil Aviation, they are free to do whatever they want. In the US, they use the base code (as in code of the military base), year they were ordered and a serial number. In Germany consists of the aircraft type and a serial number. And this is where my error comes from:

We recently switched one of our source systems, and apparently the aircraft formerly entered as 10-27 now is 10+27. That’s weird, because the old source is more trustworthy (but incomplete), and you usually use dashes, not plus-signs.

A quick Google-search turns up the wikipedia page and an official Luftwaffe page, both in favour of the plus. Okay, but this is Germany, there surely is an official Behörde that clearly regulates all this! — Yes, there is! It’s the Luftfahrzeugrolle and their website states that due to data protection reasons they cannot disclose anything. Marvellous! The information written in huge letters and visible for everyone is protected. Wait! It’s written on the plane! And there are a lot of people taking pictures of airplanes! Alas, the solution is:


They use the iron cross as a separator! I give up…


This example show how to write a reactive reader for the AWS Simple Queue Service, using Scala and alpakka (respective akka streams).

While the Akka documentation is incredibly well written, it has surprisingly few images. Since I visualize concepts to remember them, here is my take on how Event Sourcing in Akka Persistence works:

Changing the password for a PostgreSQL database user involves two steps: The change in the database and the change in the application code. This blog post describes how to do this without any downtime or failed authentication tries.