News for hackers. Stuff that matters.
Re:Microsoft Exchange stops passing mail due to bug on 1/1/22 by reaperducer on Saturday January 01, 2022 @12:35PM (#29760598)
that might be why some ppl store phone numbers and zip codes as int

Anyone who stores ZIP Codes as an int should have his dev license revoked. You've just corrupted the data you store for a hundred million people in the northeast.

I'm currently dealing with a situation where a system developed by an offshore team stored Social Security numbers as integers. They had no idea that an SSN can start with a zero, and didn't even do a basic web search to see what the possible range of values is before designing the database and application.

Re:Microsoft Exchange stops passing mail due to bug on 1/1/22 by Kevin578 on Saturday January 01, 2022 @01:37PM (#29761199)
you can tell a 4 digit zip code has a leading zero that was removed though. you'll also get faster sql queries if you search for zip codes as int vs string
Re:Microsoft Exchange stops passing mail due to bug on 1/1/22 by reaperducer on Saturday January 01, 2022 @03:03PM (#29762079)
you can tell a 4 digit zip code has a leading zero that was removed though

Only if you're 100% sure your date is completely clean. Only very rarely is this the case, especially with ZIP Codes because the data almost always traces back to human input.

The initial query may be quicker, but then you have to compensate for the missing digits elsewhere, likely multiple times. You have to consider the expense to the whole system, not just to one query.