It’s been over three years since I began working on my flight log. In that time, it’s gone from an interesting side feature of my personal website to a major project large enough to stand on its own. For the past month, I’ve been spending my free time working on spinning it off into its own site. Now announcing:
Along with the new domain, I’ve worked on adding a bit of new functionality to the site.
Table of Contents
I started the flight log with the capability for three classes: first, business, and economy. (I’ve then somehow managed to never fly business class.1) Over the last few years, many airlines have been adding a class of service that’s a little better than a standard coach class seat, but not quite to the level of a business class seat. At the very least, premium economy seats offer a few inches more legroom than a standard coach seat, and occupy a favorable part of the plane (often between the economy bulkhead and the over-wing exit rows).2 Many airlines are now charging for these seats or reserving them for passengers with frequent flyer status.
The experience is different enough from standard economy, and present on enough airlines, that I feel comfortable tracking premium economy as its own class.
Fortunately, I’ve been scanning and saving my old boarding passes for the past few years, so I was able to determine which of my recent economy flights were actually premium economy.
You may be familiar with the three-letter airport code you see printed on your boarding passes (for example, LAX for Los Angeles). This three-character code is assigned by the International Air Transport Association (IATA).
Airports aren’t the only thing that the IATA has codes for; they also have two-character codes for airlines (DL for Delta) and three character codes for aircraft types (M83 for MD-83), both of which you may see when booking flights online.
The IATA technically has one-letter codes for travel classes, but most airlines use their own fare codes instead. However, many travelers still informally use these IATA codes (F for first, J for business, Y for economy) to refer to the class they’re flying.
I’ve added these IATA codes to all airlines (including operators and codeshares), aircraft types, and travel classes.3
Faster Loading Speeds
My old flight log often took a long time to load. For a while, I’d been assuming that I was simply hosting my site on a slow server.
I realized there was more of a problem when doing all these updates required me to spend a lot of time with the site running on my local computer. Since I was the only user, it shouldn’t have been slow—yet it was.
Looking at my local server logs, I noticed that some pages were taking nearly seven seconds to render, and had thousands of database queries.
By optimizing some of my code, I was able to make most of the Flight Historian’s pages load much faster than they did in the old Flight Log. In particular, the home page (“root”), which is the page most people will see first, went from loading in 3.74 seconds to loading in 0.20 seconds—about 18 times faster!
- Added Premium economy to list of travel classes.
- Added IATA codes to airlines, aircraft families, and travel classes.
- Added aircraft illustrations to aircraft family pages.
- Added aircraft name to Show Flight view.
- Added tables of operators to Show Aircraft Family, Show Airport, Show Airline, Show Tail Number, Show Route, and Show Travel Class views.
- Added region selectors to many more maps.
- Added country flags to tail numbers.
- Added boarding pass data attribute to
- Added date sanity checking to warn if local departure date and UTC departure datetime are too far apart.
- Separated Flight Log from being part of Portfolio into its own site.
- Renamed Flight Log to Flight Historian.
- Replaced favicon.
- Upgraded Ruby from 1.8 to 2.2.
- Upgraded Rails from 3.2 to 4.2.
- Converted database from MySQL to PostgreSQL.
- Converted stylesheets to SCSS.
- Optimized database queries and page rendering to make pages load faster.
- Airlines are now their own
Airlinemodel rather than an attribute of
- Aircraft families are now their own
AircraftFamilymodel rather than an attribute of
- Moved list of flights to the end of Show views, and provided a link to the list of flights section under the flight map for each of these views.
- Rewrote Great Circle Mapper map generating functions to be more consistent.
- All maps now use the same color scheme.
- Minor typo fixes.
On 24 Sep 2017, I switched to counting domestic first class (or the highest class on a two-class plane) as business class, so my flight log now has quite a few business class flights and not many first class flights. ↩︎
On 6 Oct 2018, I added an Economy Extra class for seats that are only extra legroom (but are the same width as an economy seat) so that I could use Premium Economy for seats that were both wider and had more legroom, but were not quite business class. Generally, these Premium Economy seats are only found on long-haul flights. ↩︎
But I’ve since removed the IATA codes from travel classes, since they weren’t really standardized. Travel classes are annoyingly inconsistent and complicated to categorize. ↩︎