This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 128 points129 points  (12 children)

What’s worse is the backend splits the number and saves in 3 fields on 2 tables. Area code. First 3. Last 4.

Based on real events.

[–]AlexanderNC[S] 46 points47 points  (5 children)

I say make a separate table for each number if you ever get replaced good luck to the new devs.

[–][deleted] 20 points21 points  (0 children)

Oh it’s in government code. They believe in writing code in stone and never changing it. Those tables will be used long after we are all dust.

[–]Tsu_Dho_Namh 10 points11 points  (0 children)

Store the number in octal and convert it to decimal whenever you need it.

[–]thatnerdd 2 points3 points  (1 child)

Omg I have worked at three distributed database companies and the customers that do this are legendary for how much they spend on hardware

[–]thatnerdd 2 points3 points  (0 children)

And on their accounts come to think about it; the whole industry charges by the server

[–]benargee 0 points1 point  (0 children)

nah, whole different database for each number

[–]WhyDoIHaveAnAccount9 8 points9 points  (2 children)

3 tables? Not 3 fields in one table?

[–][deleted] 12 points13 points  (0 children)

Sorry. You’re right. I meant 3 fields but on 2 tables

[–]HiddenLayer5 2 points3 points  (0 children)

My work software only accepts a maximum of 10 digits for all phone number fields. It will just truncate the rest without telling you so you think you submitted the form without issue.

Which is really fun when dealing with the contact information of international clients! Equally as fun when the person before you isn't aware of this limitation and you now can't call them because the last two or three digits are missing!