- 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
frist aksimet no
Admin
The XBox deal wasn't a % off it was a free $100 amazon gc that you got with that deal only.
Admin
And this is why things like telephone numbers should be stored as strings. Yes, even if it fits into a "long long".
Admin
It's obviously asking if you want 32, 64, or 10 dollars cash back. Haven't you ever seen an old-school assembler where hex values are marked with '$'?
Admin
Admin
Wow, TDWTF does weekends now? Nice...
Admin
Red is such a soothing colour...
Admin
I see no problem with the first one. This atm is just using hex notation.
0x20 = $32 0x40 = $64 0xA = $10
Admin
Aaah come on you are getting a full cent discount on the Xbox, that's a 0.0033334444481% discount you innacurate twat.
Admin
Heh. The VS2010 Bug is actually a real bug encountered by many users:
http://connect.microsoft.com/VisualStudio/feedback/details/565866/conversion-from-vs-2008-solutiona-and-projects-to-vs-2010-fails
Admin
It used to be that before 1995 you COULD store US phone numbers in a 32 bit word. You changed the area code from N(0/1)X to (0/1)NX and then the 7 digits. It worked out wonderfully. The max number was something like 199 999 9999 (original number 919/999-9999), and fit nicely into 32 bits. After 1995, they had digits other than 1 & 0 as the middle digit of area codes and LOTS of software needed to be changed, along with PBX updates.
Now we store phone numbers as nice strings, even though they are all digits. We seem to want to punctuate then and add all sorts of silly prefixes so idiots don't need to think when they are dialing them (which is a further WTF for another day).
Admin
How do you propose storing a list of digits? Considering a digit is represented on a computer as a character, isn't a string the obvious choice?
Storing it as a number is wrong for so many reasons. It will only save you some memory, but it will:
The fact is, a telephone number consists of digits, but it is an address. It has none of the properties of mathematical numbers, and all the properties of addresses. There is no reason to counter-intuitively store it as an integer, unless you desperately need the disk size.
Admin
Hi,
Can you confirm the rumours that American telephone exchanges are all changing over to regex based switching? Thanks.
Admin
I want my A dollars!
Admin
Duh, A is 10, of course.
Admin
All the twats saying $A is hex know squat!!!
The A represents ALL. You select this to take ALL The money out of your account, and ship it to Nigeria (www.nigeriagoogle.com)
Admin
Taiwan one screams of machine translation. I see this first person singular stuff all the time at rakuten: http://plaza.rakuten.co.jp
(WTF? Firefox doesn't let us copy the scheme portion of a URI anymore? Bad enough they stopped displaying it ... )
Admin
I regularly have to throw s/w back to the Dev team for storing tel nos in a number field. That's what QA is for, you - you - ... you COBOL programmers!.
Admin
Admin
Admin
Hey, hey, no need for that kind of language.
Admin
Similarly with postal codes - they look like numbers (in many countries) but don't have the properties of numbers, and should be stored as strings.
Having leading zeroes dropped (if postal codes can start with 0, as they can at least in the US and Germany) is the least of the problems you get by treating them as numbers.
They're strings! You can't calculate with them meaningfully, so store them as an opaque item.
Admin
Admin
"The number you have dialed is imaginary. Please rotate your phone 90 degrees and try again."
(Seen in ancient times on USENET.)
Admin
RE that Office Communicator issue: It looks like Microsoft has been hiring Lotus Notes programmers away from IBM.
Admin
Visual Studio: "You can cancel the requested action. If you do, the project loading will continue and you can try to perform the action again later."
WTF? Does that mean that even if I cancel, the loading will continue? What is the cancel button for, then?
Admin
It cancels the action.
It doesn't cancel the loading.
It also doesn't cancel the thunderstorm outside, or your cat hollering at you to be fed.
Admin
Barcodes, category UPC. Social Security Number (SSN). Phone numbers. Zip code. Password, category "PIN". Street number.
When will programmers learn the difference between numeric values that need to be processed mathematically and external identifiers they don't control, and stop storing the later in numeric columns?
We just went through this yet again: A sister organization needs to use fake SSN's for people that don't want to provide a real one. They suggest values of the form A00-00-0000, and we have to decline. Because of the possibility that some idiot third-party designer for another sister system is storing SSN in an INTEGER.
This anti-pattern may not be the biggest WTF ever, but it ranks high. </rant>
Admin
Use $A if you want to get Australian money out.
Admin
Am I the only one that thinks the YES/NO/CANCEL style dialogs are good practice? Even if in this case NO and CANCEL do the same thing, I've always thought that CANCEL option is for 'leave the things as they were, do not change anything'.
It's like hitting undo when you did something you didn't want to :)
Admin
Except for your last example.
Because unlike the others, there is at least one way in which street numbers are treated arithmetically, albeit only in an ordinal sense and not necessarily as interval or ratio scales, and that's having a definitive lower and upper limit.
If someone hands you an address on Whatchajiggy Street, and you happen to know that addresses on Whatchajiggy Street only run from 1900 through 8000 (where beyond the upper limit Whatchajiggy Street turns into Howzamacallit Parkway), you can do a range check and reject an obviously wrong address like 22246 (the guy meant to enter 2246 but his finger bounced on the key and he didn't realize it at the time). And you can even reject 8170 as invalid, which makes this different from the ones where someone just puts in too many digits.
Admin
Admin
Admin
Do you think that maintaining a database of legitimate street numbers is less trivial than comparing a street address to them? How often do you need to check if a street number is real, if not just once on initial validation?
Admin
Admin
Subdivisions.
12A Example Street
12C/455 Example Street
Admin
Cancel and No would do the same here, however it's more convenient for the user to see that cancel button, so he can safely click it without even reading the dialog message - if he clicked it by accident.
Admin
I lived for ten years on a street in a town in Sussex, England, where there were numbered houses in a fairly conventional fashion, from 1 at the top to 12 at the bottom, with evens on one side and odds on the other. OK so far. Up the hill from number 1 were five or six houses with names but not numbers, but they were still on the same street.
Then my father chased a job to the US, and we lived for a while on a street with maybe two dozen houses. We were in the middle, number 914. The houses to either side were 900 and 920, or something like that, and in fact the number space of the street was fairly sparse, because they weren't house numbers. Each house was numbered for the land plot it was on (or, actually, one of them, because the numbered plots were fairly small).
And don't forget these things that screw up your convenient scheme for European street addresses:
A street in, I believe, Hamburg (Germany) which is numbered in chronological order of construction, so 1 is at one end, 2 the other, and 3 in the middle, etc.
Boundary Road / Station Road in Portslade and in Hove (part of Brighton-and-Hove) (both these places are in Sussex, but not the same part of Sussex). OK, streets with different names in different parts of them are common. These two names, however, apply to the two sides of the road, not the two ends.
tl;dr. Conclusion: the "numbers" in street addresses are just oddly-shaped letters. They are not digits, and do not form numbers.
Admin
Somebody set up open-chan the impossibility!
Admin
TRWTF is that we're still using MSISDNs (mobile phone numbers) on mobile phones, whereas each SIM card has its own unique identifier (IMSI). Which, um, is a 15-digit string.
But yeah, being an opco, we work a lot with telephone numbers, and whoever decides to store them as a number has a thing or two to explain to me.
Admin
Why? Well, why not? Probably, it seemed a good idea at the time.
Admin
$A is exactly equal to the integer 65 in Erlang, where these are all integer values:
65 $A 16#14
Admin
Time to get another bank.
Admin
In defense of the Rock Band Facebook app, Roger has conveniently cropped out the giant "BETA" banner at the end of the title, and this was apparently cleaned up pretty quickly since I started using that app a few days after launch and never saw this message.
If there's a TRWTF it's not having "TODO:" at the beginning of the message to make it easy to find for replacement later.
Admin
I pity the FooBar.
Admin
Admin
Admin
Admin
Admin
TRWTF is using the Microsoft Office Communicator client instead of Pidgin + SIPE