Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You think airport codes are bad, try airline codes. The IATA standard is still only two (2) letters, leading to insanity like recycling codes after one airline dies, meaning the meaning of the code is time-dependent, and, even worse, "controlled duplicates" where two airlines are intentionally assigned the same code at the same time, since they fly in different parts of the world and pinky-promise to never overlap.

https://aviation.stackexchange.com/questions/35907/do-two-ai...

Three-character ICAO airline codes are much better and used almost exclusively in actual flight ops, but for passengers it's still two-character codes all the way.



Or better try telephone region codes, which are ambiguous when a phone number is written as a consecutive string of digits, without +/()/-/space.


Every now and then I’ll get a spam call and the caller ID has spaces in the wrong place. My iPhone tells me the call is from +33 1 … which is in Paris, instead of area code 331, which is Chicago. I don’t know if the phone system is relying on the caller to properly format their number, but it seems like a mad way to handle things.


You say this as if it’s a universal thing, like IATA codes, but I assume it’s a quirk of some particular country? My region code definitely does not have this.

Sounds pretty nuts to me btw, how does that work when you turn it into standard E.164 format like “+123456789”?


Britain has different length area codes. 020 is London, 0121 is Birmingham, 01234 is Bedford, 015396 is Sedburgh, population 2700.

The local part of the number is 8, 7, 6 or 5 digits accordingly.

I never found this to be a problem. If you're dialing locally from a land line, you usually know the local code. For national or international dialing it doesn't matter.

Occasionally people put the space in the wrong place, like 0207 77777777 for a London number.


> Occasionally people put the space in the wrong place, like 0207 77777777 for a London number

To expand on this, the codes have changed a lot over time. London used to have separate codes for inner and outer London, which at their last iteration were 0171 and 0181. These were replaced in 2000 with (020)7 and (020)8 respectively. At this point it still made sense, if inaccurately, to group the first four numbers. There was also some perceived prestige with having an inner London number.

In 2005 (020)3 was included due to a shortage of numbers and (020)4 for the same reason in 2019. With the portability of numbers and the extra ranges it no longer makes sense to group the first four - and the number of people who want to infer location from a landline number is probably much lower these days anyway.


Actually, London used to have one area code, "01".

Then at some point it was split into inner & outer, and there was endless one-up-manship about whether you had an inner or outer London code. (obviously, inner London was posher)


I believe you -- in the large village where I grew up there was some daft division between having a 5-digit area code for a nearby town rather than the (nearer) large city's 4-digit code, and (along roughly the same lines) having <Town, Countyshire> as your official address rather than <Large city>.

But it seems odd for London, when there are plenty of posh areas in outer London, and run-down areas of inner London. Maybe it was more for businesses to appear 'central'?


Wikipedia has a surprisingly detailed article about it:

https://en.wikipedia.org/wiki/UK_telephone_code_misconceptio...


This feature of a numbering system is referred to as “open-plan numbering“. In a place with “closed-plan” numbering, all telephone numbers have the same length and format.


It kind of makes sense. You can then have a mix of large and small area codes. A small number of large cities and a larger number of small towns. The problem of course appears when an area starts to grow...


Many countries (if not all of them) use localized numbering format - short numbers to hit the local destinations (intra-city calls), numbers with city prefixes to get to the numbers in a different city within the same country, specific prefixes (i.e. 00) for international calls, etc. The most convenient way of processing this mess is to rewrite the numbers (called/calling) on the ingress, into e164, and then processing the call using the routing table/rules of the pbx. On the egress the numbers may be rewritten again using the local numbering rules. This is how I built the international telephony system in one of my previous companies at least.

Some countries are easier in their numbering system (Singapore being an obvious example) and some are not (China doesn’t disclose number ranges allocated for different regions/cities, which makes the renumbering step more difficult)


There's many places where you can skip the area code or similar when dialling, but I think the original poster was thinking of systems where the actual numbering has variable-length components.


Variable length is solved by inter-digit timeout - pbx is waiting for a couple of seconds, then decides that the caller has finished entering the number and processes the collected digits according to the existing rules. Simple as that.


Always been disappointed that nowhere went with arbitrary length numbers for phone numbers, with the excess/end forwarded on to wherever the prefix is. I suppose that's not possible with the amount of time needed to actually do the switching, and would tie up a lot of switches before a call ever connects.

Or, assuming every number ends with many 0s that are omitted when dialling. Mainly to make extending the numbers easier, though you would lose 10% of the available ones.


It is technically possible to use a pound key (#) as an end of input indicator. It is almost impossible to change the users habits though, not mentioning the need to reprogram thousands of telephony switches. Another (better) option here is packet sending of DTMF string - digits are collected on a smart user's device (i.e. iphone) and the complete number is sent as a digit string, not one by one. Problem here is that there are still lots of dumb phones that don’t do that. Analog lines (copper fxo/fxs interfaces) are also present even nowadays. So as usual, legacy and backwards compatibility are holding back progress.


Or just the date. The dumb game of dd/mm/yy versus mm/dd/yy when you live in a dd/mm/yy country is infuriating.


I started using yyyy-mm-dd for everything, since that is the most text-friendly sortable date. I haven't come across yyyy-dd-mm, but I'm sure someone uses it.



It's mostly "why must Americans be like this?" while leaving in virtually any other country in the world (countries with a MDY date format are a handful).


Write the month as a three letter code and your ambiguity is solved.


I'm not sure about the lack of ambiguity.... Christmas day is on 25-Dec-2022 or is it 25-Dic-2022 (German), or is it 25-Dez-2022 (Spanish) ?

At least ISO-8601 works for everyone who uses the Gregorian calendar, which is certainly not everyone, but it's a reasonable coverage.


I could, but it isn’t my format the confuses me, it’s what other people do and what vendors set computers to etc.


There must be some language pair that has some collision with that.


In greek "June" and "July" start with the same three letters


I wonder if any languages have a different starting letter for each of the 12 months. Bonus if the days of the week are also different.


I am looking forward to a dystopian future where a region will be assigned a 911 or 112 area code if they pinky promise to never have an emergency.


With the plus, isn't every number and prefix/suffix unique across countries?

I have no idea if that holds true not knowing if a country code is attached.


The goal of those codes is to improve the communication, mostly between the airplane and air traffic controllers.

The one large issue with the IATA aircompany codes is that there aren't enough to every one in activity, even if you extend them with not allowed tokens (like numbers). Those codes were never meant to identify any entity in an atemporal matter.


> leading to insanity like recycling codes after one airline dies, meaning the meaning of the code is time-dependent

Why is this insanity? Almost everything in real life is time dependent. I think this is just insanity to devs who want to fit the world to their data model rather than the other way around which is how it should be.


Reusing the same unique identifier another user or business had almost always causes problems.

If special access was given to one entity, often that special access remains after the new entity takes over.

Often times the new entity gets access to private data of the old entity.

It makes record keeping difficult to know who was what entity at any given time.

If you haven’t seen the problems caused by doing this, consider yourself lucky for working for institutions that aren’t so careless.


If you are from the US, I have bad news for you about SSNs. :D


No, but I would assume that SSNs are not re-used.

Is this not the case?


Well, I was certainly told that was the what happened once. Quickly trying to verify that now, I am finding the opposite on their site.

So, maybe I have good news about SSN values! :D


Funnily enough, CGP Grey also made a video about that[1].

[1]: https://youtu.be/jfOUVYQnuhw


That’s the same video as the post, unless I’m missing something.


Ah, my bad. I thought the post was a link to the other CGP Grey video about airports[1] because the video about airport codes does talk about airline codes (and GP implied it doesn't). I really shouldn't comment late at night...

[1]: https://youtu.be/qD6bPNZRRbQ


You're not. GP, did you mean to link to a different video?


I think they meant to link to this one: https://youtu.be/jfOUVYQnuhw


..which is the same video as the thread. Airline codes are a different beast.


This is a hilarious bit of exposition of how few people actually read/watch the links posted here. Anyways, both IATA and ICAO (as well as FAA) are explained in the video. Y'all should watch it!

It took months of original history just to get an answer to why Canadian airports start with a Y


You're trolling, right?


I thought it was remarkably well-executed




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: