IATA Guesser

IATA Guesser is a personal tool that my traveling friends and I use to memorize the IATA code for an airport. The IATA code is defined by the eponymous organization as,

IATA Codes are an integral part of the travel industry and essential for the identification of an airline, its destinations and its traffic documents. They are also fundamental to the smooth running of hundreds of electronic applications which have been built around these coding systems for passenger and cargo traffic purposes.

https://www.iata.org/en/services/codes/

I feel pretty strongly that using the IATA code to refer to a city is a sound idea. It offers conciseness when messaging or when storing information on the city on a computer (faster access, faster creation of directories to organize files), and it gives me a fun game to know them all.

An IATA code is also occasionally an interesting peek into the history or geography of a city’s airport. A favorite airport story that comes to my mind is the Newark Liberty International Airport (EWR) first brought to my attention by CGPGrey (I am a big fan of this video). Newark couldn’t use the more sensible NEW code because the US Navy sought to use the three-letter code that started ‘N’ for their purposes, and then was later given to an airport in New Orleans.

Therefore, I felt it necessary to make a game, such that I could memorize all these little nuances, which is why I made the web game. This was the first webpage created fully in HTML, CSS, and JS. I refactored the original personal Python script and wrote the bulk of it in JavaScript, naturally.

A big trouble that I encountered was understanding the algorithm to generate not already seen codes, as I initially had a recursive solution, but this caused a stack overflow error. I opted for an iterative one, since it proved not to make the client stop and stopped some very strange behavior, that made the game unplayable. This taught me about the oddities of JavaScript, and how it may vary from C++, which I have more of a background in.

2 responses

  1. You know me Avatar
    You know me

    So when I was playing IATA guesser I noticed an error — XIY is the airport code for 西安 or Xian city, not Xianyang. I also knew most of the codes because I have probably been to most of the international airports in your list! I am also very glad to have discovered your website. I am devoting valuable sleep time to your œuvre, which hopefully shows the honor and inspiration that you cultivate in working and sharing. Let’s talk about this over food!! You know how to find me

Leave a Reply

Your email address will not be published. Required fields are marked *