- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
Smart move Ebony, I think you have a successful carrier ahead of you.
Admin
Eh, easy solution: mobile numbers are negative, and any negative values shall be prefixed by 07.
Admin
Admin
At least they didn't parse the numbers as octal.
Admin
Integrated Departmental Incident Outcome Tracker I.D.I.O.T.
Very nice, indeed.
Admin
"Customer relations for software developers" 101: "If customer data causes problems with software, customer has to get different data."
Wasn't there another article about mobile phone numbers just the other day? Something about truncating them to ten digits?
Admin
I'm reminded of some advice that I saw here sometime ago: if you would not do arithmetic with a field, do not store it as a numerical type (store it as a string).
Admin
Admin
You can get rid of the error message by automatically setting oversize numbers to 2147483647. It appears to be a popular phone number.
Admin
Just drop the last digit if the number is too long. It's unnecessary accuracy anyway.
Admin
The real WTF is that her manager didn't even TRY. Half the stories on the site are about stupid management decisions. Over half of those could have been solved by the developer, or their manager, doing their actual JOB and telling the powers that be that (a) The policy is stupid, and why; and (b) The policy needs to be changed, or the IT department is not going to be held responsible.
Seriously, people need to grow a backbone. If it is really a stupid policy, not just one you disagree with, but blatantly stupid and contrary to reality and/or the laws of physics, don't tolerate it. Go over their heads, if they won't listen. Be a damn professional and defend the integrity of your work. If you are too new at your job to stick your neck out, then convince your boss to back you up. If they won't, then find another job and tell them exactly why you are leaving.
Admin
So any primary identification field should be a string? I know I'll never do an arithmetic operation on an ID field, yet I will still use a kind of integer if my DBMS doesn't handle Guids.
Admin
But you DO arithmetic on it -- don't you increment it by some set value when inserting a new row with a new ID? Gosh, I hope so!
Admin
Admin
Rightly or wrongly, that's just the way the president's daughter did things. After all, she wasn't a highly paid consultant, just a lowly student.
Also, I would be crafting an anonymous letter to print off and drop into the student newspaper to explain how stupid the people running the university are.
Admin
We were maintaining an elderly FORTRAN app some years ago, which queued entries onto a print queue. All went well till our new printer software suddenly decided that all files would be printed in size order. So all the front pages came out, then all the back pages, then the report content, thereby causing a colossal manual overhead in collating the damn things, which previously had been printed envelope-perfect.
The solution of course was to concatenate the complete report into one file before printing: front page, body, back page in that order, so that they would be directly ready once more for mailing.
The next problem concerned how to uniquely create a report file. This was done by means of a timestamp, consisting of day, month, hour, minute, second, all in 2-digit format, concatenated into one integer.
Suddenly, on the 22nd of October, all the print jobs failed.
Admin
Admin
I don't have anything funny to say, but if you want my opinion, please call me on my mobile at: -2147483648
Admin
Admin
Admin
Supposedly some guy in Dallas took the MAXINT phone number intentionally. In any case, here's the googles on it so you be distracted while I get my ass off to work...
https://www.google.com/search?hl=en&q=214-748-3647
Admin
Which is yet another unrealistic generalisation that college graduates and evangelical DBAs like to quote without really thinking through.
Admin
Foreign phone numbers start with 00. For example, USA called from the UK starts with 001.
Admin
How so? I've successfully used the argument on several projects that keeping such fields as strings rather than numbers at least eliminates the cpu overhead of the repeated conversion to and from string format. Also, such "numbers" always consist of a list of fixed-length fields, and you sometimes want to do arithmetic on them, such as calculating the next number for a new entry. If kept in integer form, detecting and correcting overflows when one field is incremented takes more code and cpu time than if you keep the data in string form. Then you can just convert a single field to integer when you want to increment it, and overflow doesn't modify an adjacent field.
Also, I have a number of "account numbers" that contain letters. The US Social Security Administration does this, for instance, as do some credit unions. The letters are essentially qualifiers on the number field, for labelling closely-related accounts or marking them with some attribute. You can argue that this shouldn't be done, but when management decides it's The Thing To Do, life is easier for the programmers if they had decided to not store string data in numeric formats even though the strings contained only digits and looked like numbers at the time.
So when is it advantageous to store strings that aren't really numbers in a numeric format? I haven't ever seen any real advantage to this. And note that it only matters to programmers, since they're the only ones that see the actual formatting. Arguments based on the feelings of non-programmers aren't really relevant to deciding what internal format to use.
Admin
Easy Fix: Start with the month, not the day...
Admin
Yeah, that makes more sense anyway. Who the heck goes "hey, let's sort data by the second most significant unit, then the most significant unit, then the third most significant unit..."
Oh wait, I know who.
Admin
What idiot would use integeres for phone numbers in the first place.
Try international numbers in that field: "+31......" awww too bad, can't fill in a +. Oh, let me preface the number with 00 then. Nope, integers don't start with "0".
wah wah wah wahhhhh
Admin
A successful carrier? You mean like the USS Nimitz?
Admin
Why did they fail? I'm sure I could sift through the logic and make some pseudo code. ... but I have not the free time.
Admin
So when the boss calls you into his office for a major screw up, that means you're about to ...CARRIER LOST
Admin
Once the appropriate facepalm moments had been indulged in, we did it properly by building the filename using a proper FORMAT command which did not rely upon the cloth-brained integer implementation put together by the perpetrator of this particular WTF.
But you're right (and everybody else who commented), this was a particularly silly implementation.
Admin
... and are more like 15 digits long (for a typical e.g. UK number from the US) rather than 10, (13 without the 00 at the start) so you're already blown out of the water.
Admin
Admin
Admin
What's even more amazing is that 2209124553 wasn't.
Admin
Building international support into the phonenumber field without it being required would be something like premature generalization.
Yeah, I know. It's still a wtf. :-)
Admin
Duh! Use a long long!
Admin
Admin
/agreed
How come no one ever tries to change things? In real IT we have to make changes all the time, especially when something is, oh I don't know....broken.
People, even unreasonable people who do not like change, will allow it if you can explain to them why it needs to be done. In this case, it should be a simple change to the system to fix what the original developers didn't foresee. The system is broken.
Definitely TRWTF is Ebony and the manager just not trying.
Admin
It was September. Everyone was too busy discovering the internet to try to print.
Admin
The funniest thing about middle endian is when Americans try and defend it... great times had by all.
Admin
Typhoid Mary, more like.
Admin
If you are very constrained for space. That said, I would not do it if I could avoid it.
Any savings could be eaten up by more complex programming. For example, you can not print a numeric ZIP Code without having to convert it (or missing leading zeroes).
Sincerely,
Gene Wirchenko
Admin
Little known fact...
The USS Typhoid Mary can carry up to 90 aircraft, has 2.5 inch kevlar armour, and is armed with 24 Sea Sparrow missiles.
Admin
They did think it through. Finally, after failing so hard so many times. Which is why you have the generalization.
Seriously, there is no benefit not to do this unless you're limited on memory or throughput.
Admin
From java/util/Calendar.java:
Admin
Admin
(Think about it. Under what logic does it make sense to put the field list at the start of the query and not the end?)
Admin
Ahhh, the beauty of SLAs.
"If we can't fix it, we won't support it. We're forwarding all complaints to you."
Admin
Are you confusing sorting and presentation formats?