Three letter strings

Consider all possible three letter combinations of the English alphabet. From AAA to ZZZ. There are 26 x 26 x 26 = 17,576 of them in all, or 626 per letter.

Some of these are valid English words - you could use them in a game of Scrabble. For example, ACE, BAT, ZAG etc.

IATA also assigns three letter codes to airports. You know, the ones you see on your boarding passes and baggage tags. Like AMS for Schiphol, Amsterdam. Quite a few of the possible 17,576 three letter strings are also IATA codes1.

For a comprehensive and entertaining look at these three letter IATA airport codes, I’d highly recommend watching this video by CGP Grey:

Some IATA codes are also valid English words. For example, YEA (Edmonton, Alberta, Canada), YES (Yasuj Airport, Iran).

And some English words are not yet2 IATA codes. For example, AYE, YEP, YUP.

The venn diagram of three letter strings, IATA airport codes and wordsThe venn diagram of three letter strings, IATA airport codes and words

I was interested in exploring the entire space of these three letter strings visually, especially in context of 3 letter IATA codes. So I built a little web app that lets you see this information for each English letter.

It was fun to visually see how M and S are completely packed, while Q and X are still wide open.

The strings are sorted alphabetically by default. So if you are looking at, say the letter A, the first row goes from AAA to AAZ, the next from ABA to ABZ and so on till AZA to AZZ.

Three letter strings from AAA to AZZ, sorted alphabeticallyThree letter strings from AAA to AZZ, sorted alphabetically

You can also sort the list by type. This will cluster IATA codes that are valid words, IATA codes, valid English words and non-words together3.

Three letter strings from AAA to AZZ, sorted by typeThree letter strings from AAA to AZZ, sorted by type

If you are on a desktop browser, you can hover over each IATA code to see the airport’s name and location in a tooltip. On a mobile, you can tap to do the same.

If you really want to have some fun though, you can say ridiculous things in sentences of IATA codes that are valid words.


And for those of you that are a bit more ambitious, you could buy an island, start an airport and apply to IATA for words that haven’t been assigned to an airport yet. Looks like GOD is still available. Anyone?

p.s. Here is a plot showing the utilisation of three letter strings from A to Z:

A plot showing different categories of three letter stringsA plot showing different categories of three letter strings

p.p.s. On an altogether higher intellectual plane - looking for words in amino acid sequence of a real protein.

  1. Based on publicly available data on Wikipedia, as of today (11 Aug 2023), about 9083 (51%) of the three letter strings are also valid IATA codes.↩︎

  2. Though YET is - Edson Airport, Alberta, Canada.↩︎

  3. This reminded me of a defrag.exe from DOS days. Apparently, there is Twitch stream where you can watch a disk defragment all day.↩︎

  4. The Indian city of Madras (now Chennai), got MAA. And there is another Madras - in Oregon, United States. Their municipal airport is MDJ.↩︎

August 11, 2023

A week in Malta - Day #4

I’ll start this post with the obligatory photo of the Mediterranean taken from our hotel’s balcony. Future posts won’t feature one because on this day we checked out of the hotel and moved into an apartment in Valletta1.

The view from our hotels’ balcony on Day 4The view from our hotels’ balcony on Day 4

The apartment was in a street that was decked with green plastic festoons. I couldn’t tell if it was old Christmas decoration they hadn’t yet gotten around to taking down or if they were commemorating some obscure patron saint.

The street of our apartmentThe street of our apartment

Our plan for the day was to take a ferry to the Three Cities and explore them on foot.

On our way to the ferry, we were greeted by young a British man in his 20s who politely asked us to wait a couple of minutes in the street we were in. A film was being shot next door and he was preventing people from accidentally straying into the scene. Film shoots are a big source of income for Malta these days2.

Our view while we waited for a film scene shoot to be overOur view while we waited for a film scene shoot to be over

The ferries weren’t very large but had ample seating space. They seemed to be mostly in use by tourists. We sat on the upper deck and I made a video of the short journey to the ferry stop. Never before had I seen such a large concentration of expensive yachts over such a small ride.

One still comes across pandemic era public health messaging in public transport.

Pandemic era public health messagingPandemic era public health messaging

Of course, no one took this one seriously. There wasn’t a mask or visor in sight on or off the ferry. I guess it’ll be another year or two before these signs completely disappear from our public spaces and from our collective memories.

The ferry stop at the other end looked positively makeshift. A decrepit building right opposite the stop warned visitors about falling debris.

A crumbling building opposite the ferry pointA crumbling building opposite the ferry point

WARNING falling debrisWARNING falling debris

This was the second of such a warning I had seen during our stay. Just a couple of days ago we had come across this sign at Cittadella in Gozo. It seemed like public buildings in Malta had to be either historically significant or dangerously derelict or both.

And after all, you’re my danger wall… Oasis reference anyone?And after all, you’re my danger wall… Oasis reference anyone?

Just a short walk from the ferry stop was this art-installation that looked like a steampunk blimp. It was thankfully free of warnings about falling debris.

A steampunk blimpA steampunk blimp

We walked through the warren of narrow streets and enjoyed the (by now familiar) sight of colourful boxy wooden balconies.

A street with boxy balconiesA street with boxy balconies

It had been a wet start to the year in Malta and tiny plants were thriving even in the gap between the cobblestones.

Tiny plants thriving in the gap between cobblestonesTiny plants thriving in the gap between cobblestones

Like that street on our first day here, the houses here prominently displayed tiny figurines depicting Christian themes. The statuettes of mother Mary and baby Jesus were most common.

A figurine of Mary and baby JesusA figurine of Mary and baby Jesus

A figurine of Mary and baby JesusA figurine of Mary and baby Jesus

The geography of the Three Cities was quite varied too. One moment you’d be looking at domes and spires of distant cathedrals from a good height and the other moment you’d be walking right along the water.

Thanks to the varied geography of Malta, the views were rarely boringThanks to the varied geography of Malta, the views were rarely boring

In one street, a small gap between two streets had been designated to a small shrine to Jesus.

A small shrine in the gap between two housesA small shrine in the gap between two houses

We also saw a statue of St. Dominic inside a large niche inside a wall. I learned that he is customarily depicted with a dog carrying a flaming torch in its mouth.

A statue of St. DominicA statue of St. Dominic

Wikipedia later clarified why it is so:

The story is told that before his birth his barren mother made a pilgrimage to the Abbey at Silos, and dreamt that a dog leapt from her womb carrying a flaming torch in its mouth, and seemed to set the earth on fire. This story is likely to have emerged when his order became known, after his name, as the Dominican order, Dominicanus in Latin, and a play on words interpreted as Domini canis: Dog of the Lord.”

We continued walking some more and came by Birgu’s (aka Vittoriosa, one of the Three Cities) harbour front. The view of the blue water with sunlight illuminating historic buildings and fortifications in the background was absolutely magical. Little wonder then, it’s a popular location for making films, especially if their plots have a historic/fantasy angle.

A view of Birgu HarbourA view of Birgu Harbour

A view of Birgu HarbourA view of Birgu Harbour

A view of Birgu HarbourA view of Birgu Harbour

A view of Birgu HarbourA view of Birgu Harbour

A view of Birgu HarbourA view of Birgu Harbour

We eventually settled at a small Italian restaurant by one of the numerous marinas for lunch.

The setting for our lunch breakThe setting for our lunch break

A short postprandial walk later, it was time to head back to Valletta. The views from the ferry on the way back were again gorgeous.

From left to right: Siege Bell Memorial, St. Elmo Breakwater Lighthouse, Ricasoli Breakwater LighthouseFrom left to right: Siege Bell Memorial, St. Elmo Breakwater Lighthouse, Ricasoli Breakwater Lighthouse

Once back at the ferry station, we noticed that there were also gondoliers offering rides, probably to the Three Cities. We’d have opted for them if these were canals of Venice or Amsterdam but in these relatively open waters with a lot of varied marine traffic, they just didn’t feel like a good idea to us.

A Gondolier plies his craft at the Ferry point in VallettaA Gondolier plies his craft at the Ferry point in Valletta

We walked back into Valletta and took the paid elevator to Upper Barrakka Gardens. From here we looked out towards the Three Cities and tried to locate landmarks we had walked past.

Looking towards the Three Cities from Upper BarrakkaLooking towards the Three Cities from Upper Barrakka

We wandered a bit more but the day’s exertions had left us a little tired and we lacked the purposefulness of this morning. It was time to head back to the hotel, rest, grab dinner and plan our next day.

  1. I am writing this post when Malta, like the rest of the region, is undergoing severe heat waves with record temperatures and power cuts. The rainy Malta we visited in Jan feels like a distant idyll. I’d rather have my vacation ruined by the occasional rain than 40ºC+ heat.↩︎

  2. Theres a whole Wikipedia page dedicated to films shot in Malta↩︎

July 24, 2023

Bringing 19th century ornamental tile illustrations into a 21st century web app

The Internet Archive also archives physical books. The archive’s 2010 scan of a late 19th century catalogue of colourful granite tiles came to my attention recently - thanks to this post on

Album of Ornamental Granite TilesAlbum of Ornamental Granite Tiles

I decided to build a little web app that’d allow me to play with the tiles in this catalogue.

The original catalogue only shows a little over 1/4th of the design but by digitising these tiles I could complete all 4 quadrants.

I could also choose how many tiles I wanted to use and even decide how big (up to a point) an individual tile should be. For now I’ve settled on 10 rows x 10 columns of 55px tiles including the border.

While some tiles in this catalogue are symmetrical, others are not. Which means combining them after rotating in multiples of 90º or mirroring them results in patterns that sometimes surprise you. Depending on the tile, mirroring and rotating are not equivalent and can give different results:

Using the original tile as is, or rotating/mirroring it while tiling, results in different patternsUsing the original tile as is, or rotating/mirroring it while tiling, results in different patterns

When you select the rotate option, the app does this:

Rotation explainedRotation explained

Depending on the initial rotation of the first tile you can get very different patterns:

When using rotation, the rotation of the starting tile mattersWhen using rotation, the rotation of the starting tile matters

The mirror option just constructs the first rows by flipping the alternate tiles horizontally and makes the second row by flipping the first row vertically. The first two rows are then repeated.

Mirroring explainedMirroring explained

The borders were another fascinating detail that add an extra visual flair to the designs. While the catalogue illustrates a limited number of border + main tile combinations (19 in all), we of course can combine any border with any tile (a whopping 19x19 = 361 possibilities).

Another thing I realised when tinkering with the borders is that some of the corner tiles used in the borders also look good when used as a main tile, especially when you apply mirroring or rotation to them.

Some of the top left corner border tiles can double up as the main tileSome of the top left corner border tiles can double up as the main tile

Next steps

  • Some of the patterns in the original catalogue use two different tiles for the border, while others use two different tiles for the main tile (i.e. not just rotated variants of the original). My app doesn’t support this yet, but I’ll be adding them shortly.

    The first goal would be to allow you to create all 19 patterns in the original catalog faithfully but I might eventually make it flexible so that you could pick any two tiles.

  • I will also make the no. of rows and columns user selectable. I might add control over the size of the tile (capped to the max size I could extract from the catalogue (around 110px for things to look good on Retina displays).

  • I also want to experiment with supporting khaki/custom tiles for the rest of the background. In the original catalogue, they do make the rest of the colourful pattern pop’. I might even add support for spacing between the tiles and a custom background colour that shows in the space.

Other thoughts

A lot of these tiles were hand-drawn individually. You can see some of these imperfections when looking closely at titles that are not too geometric. To make this easy to spot, I overlaid two rows of one of the patterns on top of each other, changed the opacity of the topmost one and made a short video:

Each tile is somewhat unique!

While I am of course working with just one tile that’s repeated, so some of the charm of the hand-drawn tiles is lost1. And then there are imperfections from the pages ageing for over a hundred years. Plus scanning artefacts - even though I started with the highest resolution jp2 downloads that offer.

A part of me fancies going all in and creating their digitally perfect replicas by tracing them in a vector program. We’ll see.

This project also got me thinking about the realities of the physical world to which these tiles belong. While I can mirror them easily digitally, in the real world it would mean creating 4 versions of a tile. Whereas, rotation is something you can do easily to the same tile. So I think designs that only be replicated by mirroring alone must’ve been much rarer.

I’ve also been paying a lot more attention to tiling patterns in the real world2. While traveling through Newark airport recently, I came across tiles that somehow looked wrong. I took a picture and plugged them into this tool - lo and behold - if only they’d rotated these tiles while laying them, it would’ve looked like a much nicer pattern!

Tiles at Newark Airport - what a missed opportunity!Tiles at Newark Airport - what a missed opportunity!

A note about AI

Many of the initial drafts of this tool were at least partially generated by ChatGPT 4. They never came close to anything you could simply use, but they were instrumental in showing me what’s possible. More importantly, they greatly lowered the inertia I would have had to overcome to start building something like this in the first place. We live in interesting times.

Update: 18 Jul 2023:

While I can mirror them easily digitally, in the real world it would mean creating 4 versions of a tile.

My wife pointed out that they’d only need to create 2 versions of the tile not 4. Her intuition is that when you mirror an already mirrored object again, you get the original back. My two mirroring operations cancel each other out.

I tried this in Photomator and she is right. Once I mirrored the first tile, I could generate the second row through translation or rotation.

In the image below the first column shows the starting tile, the last column shows the pattern created entirely through mirroring. The middle column shows how you could replicate the patterns of the last column by only mirroring the first tile.

Creating mirrored patterns by mirroring just one tileCreating mirrored patterns by mirroring just one tile

  1. It feels akin to listening to a MIDI file of a classical piece.↩︎

  2. This won’t be the first time I’ve been slightly obsessed with tiling patterns (although this time it has lasted very long indeed). See these posts about Porto and Amsterdam.↩︎

July 16, 2023

A trip down the memory lane aided by Polaroid’s latest marketing campaign

Mansi recently drew my attention to this outdoor marketing campaign by Polaroid. We both found it funny that what was once considered instant” is too slow by our modern standards. I saw this campaign again on my way to work today and was overcome with nostalgia.

Real Life is…Real Life is…

Real Life is having to wait”.

I am old enough to have lived through times when we’d wait weeks if not months to see our pictures. You see, film rolls used to cost money. Processing exposed rolls used to cost money too1. As a parsimonious middle class family in the 1980s in India, you wouldn’t just click anything that caught your fancy and blow through your roll. There’d always be a few shots left on the roll even after a big event like a birthday or a wedding. The camera would be packed away, only to come out on some other minor occasion like the start of the school in winters2. With the remaining shots finally used up, the roll would go into a small, black, plastic canister and taken to the local photo studio’ for processing.

We’d get the prints back after 3-4 days along with a strip of negatives in translucent photo sleeves. We’d sit down around the dining table, pass around the photos3 and reminisce - the events the photos had captured, already a distant memory. And oh the negatives would be promptly stowed away in some mysterious nook in our parents’ almirah and forgotten forever.

If you would have handed me a polaroid camera back then, it would have felt like magic. And to think that Polaroid have to somehow justify keeping you waiting a few seconds…

  1. Little wonder then that Kodak found itself in a lot of trouble once digital photography started to become good enough and all that cash flowing into film rolls and their processing stopped.↩︎

  2. The event would be considered photographically significant because we would be switching into our winter school uniforms.↩︎

  3. With a reminder from mom to hold them from the edges and not leave our grubby fingerprints all over them.↩︎

July 6, 2023

The unintended consequence of The Netherlands’ bottle/can deposit scheme

The Netherlands reintroduced a deposit scheme (‘statiegeld’) on plastic bottles (PET) in 2021. We get € 0.15 back on returning a bottle smaller than a litre and € 0.25 for a bottle 1 through 3 litres. As of April 2023, the scheme has also been extended to aluminium cans. Most cans now carry a deposit of € 0.15. Field studies show that this scheme has been very successful in reducing littler as well as the amount of these bottles and cans that people throw into non-recyclable waste. And oh, this being a developed country in western Europe, there isn’t a human at the grocery store collecting your bottles and issuing you small change - it’s all done through automated deposit machines.

However, some people still throw them away. Especially tourists who:

  • might not know about the deposit scheme in The Netherlands

  • might not find the hassle of keeping the empty bottles or cans on them for getting back small amounts worth it

  • might not have means to get their deposit money back - while stores like Albert Hijn have machines that’ll print you a coupon upon returning the bottles that you can redeem against your next purchase, at Amsterdam Centraal station the deposit machines credit the amount to your bank account - meaning you need a Dutch bank account number.

This means enough of these bottles or cans still end up in trash. Municipalities are now reporting that people are rummaging through trash cans, salvaging the PET bottles and cans and simply leaving the rest on the street. This is exacerbating the cities’ litter problem especially in and around busy tourist areas like Amsterdam’s Centraal Station.

I’ve already seen this phenomenon with my own eyes twice this weekend - though my scavengers were careful enough to put back the rest of the trash.

An unintended consequence I wouldn’t have seen coming.

The municipality is exploring a few solutions of varying degrees of cost and feasability. Most bins in Amsterdam have locks that are apparently easily opened by a generic triangle key available at utility stores. So the city is looking to updgrade the locks on bins. They are also putting dedicated bins for bottles and cans to encourage tourists to not throw them in the trash. Finally, the city is also issuing fines for littering, but given the labour intensive nature of such enforcement, I don’t see that going very far here.

June 11, 2023

A week in Malta - Day #3

The view from our hotel’s balcony on the third morning of our stay promised a mixed bag weather-wise.

The view from our hotels’ balcony on Day 3The view from our hotels’ balcony on Day 3

Fortunately, our itinerary for the day wasn’t very ambitious. We wanted to spend time walking about in one of the numerous neighbourhoods close to our hotel, catch the views of the Mediterranean sea from Dingli Cliffs and avoid being sucked into Valletta yet again. We were scheduled to check out of our hotel in St. Paul’s Bay and move to an apartment in Valletta the very next day so we were going to get plenty of time to explore Valletta for the remainder of our trip. We took a bus to Rabat and explored the neighbourhood on foot.

The colourful balconies of RabatThe colourful balconies of Rabat

The colourful balconies of RabatThe colourful balconies of Rabat

The narrow and winding streets of RabatThe narrow and winding streets of Rabat

We then took a short break at Is-Serkin - a famous bakery selling Pastizzi, Malta’s signature greasy, puffed pastries. Being vegetarians, Ricotta and Peas were our favourite fillings1. Coffee wasn’t on their menu but a shop next door was happy to sell us americanos.

We continued to wander for a bit longer but seeing the sunny morning beginning to turn into a cloudy afternoon called for a cab to Dingli Cliffs from outside a small church. We had had our fill of walking in the rain on our first day.

Not a bad spot to wait for your cabNot a bad spot to wait for your cab

The view from Dingli Cliffs felt a little underwhelming. Had we been living in a hotel with a less spectacular view and had the weather been a shade sunnier, perhaps we would’ve been more impressed. Still, the pools of sunlight dancing on the surface of the Mediterranean sea had us mesmerised for a few minutes.

Pools of sunlight dancing on waterPools of sunlight dancing on water

Next to the cliffs was a large antenna installation with a spherical dome that reminded me of Matrimandir from our visit to Pondicherry many years ago.

The large antenna installation at Dingli CliffsThe large antenna installation at Dingli Cliffs

A strange sign outside the antenna building warned visitors with pacemakers to not enter.

A notice for people with pacemakersA notice for people with pacemakers

We decided to walk a bit further on the appropriately named Triq Panoramika (Panoramic Street) adjacent to the cliffs and see where it’d take us.

A bench along Triq PanoramikaA bench along Triq Panoramika

There were a lot of farms in the vicinity. Given the patience of the drivers here, perhaps mini traffic jams precipitated by herds of goat weren’t too uncommon.

A lifestock-induced traffic jamA lifestock-induced traffic jam

We saw many large cacti that grew in dense clusters a metre or two high and ran several metres along our path. Given that prickly pear is popular in Malta, these were probably not wild and were being cultivated. Throughout our walk, we saw (and what I presume to be) several prickly pears simply lying on the ground. I regret not picking and tasting one. The fear of cutting myself on the thorns might have deterred me so I guess the thorns did what they were meant to.

Prickly pear cactusPrickly pear cactus

After nearly an hour of walking we found ourselves in the town of Dingli.

On our way to DingliOn our way to Dingli

It was well past our lunch time but not much was open in Dingli. We struggled to come up with options for lunch other than dining in at one of the restaurants in Valletta. We located a bus stop in order to take a bus there. And by a bus stop I mean a little placard planted into a footpath to mark the spot for a bus to stop. The area adjacent to the footpath, where the bus was supposed to stop, was occupied by a couple of parked cars. The bus promptly ignored the sign and wooshed past us forcing us to call for a cab once again.

A bus stop blocked by parked carsA bus stop blocked by parked cars

After lunch at Valletta we stepped out for a walk but just then it started to rain. We knew from our first day here that walking in Valletta on a wet day isn’t really a pleasant experience. We took a bus back for a relaxed evening at our hotel.

A street in Valletta on a rainy dayA street in Valletta on a rainy day

  1. Though I suspect lard might’ve been involved in their preparation.↩︎

May 24, 2023