Hacker News new | ask | show | jobs
by ars 2450 days ago
> If my program ever treats a zip code like a number I would like it to throw an error.

One interesting thing you can do though, is sort by zipcode. This sorts your mail from East to West in the US. You can use that as a rough estimate of shipping time.

2 comments

That's really cool, even if I never find a place to use it.

Anyway you can still sort strings.

So? You make sure the zip code is left zero filled and the strings sort fine. Admittedly, numbers would sort a bit faster.