Hacker News new | ask | show | jobs
by CrimsonCape 579 days ago
It seems like tasking a software engineer to figure this out when the industry at large hasn't figured this out just isn't fair.

Best I can see (using Rust) is a hashmap on UTF-8 string keys and every code in existence gets inserted into the hash map with an enum struct based on the code type. So you are forced to switch over each enum case and handle each case no matter what region code type.

It becomes apparent that the problem must be handled with app logic earlier in the system; to query a database of codes, you must also know which code and "what type" of code it is. Users are going to want to give the code only, so there's some interesting mis-direction introduced; the system has to somehow fuzzy match the best code for the itinerary. Correct me if i'm wrong, but the above seems like a mandatory step in solving the problem which would have caught the exception.

I echo other comments that say that there's probably 60% more work involved than your manager realizes.