- 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
Obviously, he missed "File Not Found"!
Admin
Try as I might I can not come up with a "Reasonable" encoding for "Last 4" that is over 56 characters.....Maybe I just need more caffeine....
Admin
MD5 encode each digit?
Admin
Security by absurdity
Admin
Maybe they want to make sure they could enter the number in words, for additional security. And because they have international customers, they have to prepare for every UTF-8 four digit number representation in every language.
Admin
This last issue (last four digits of the card in a varchar(70) field) is just enterprisey - it allows for the potential case that in the future the value of 4 might become 70. Very forward looking :-P
Admin
Maybe they keep a comma separated list of the last four full credit card numbers that the user specified? Because shits and giggles.
Admin
Well, there is a four digit security code on the back of credit cards ...
Admin
Well you need 70 characters, of course, to store the string: "The last four digits are: nine-thousand, nine-hundred and ninety-nine."
Admin
Your database schema is bad and you should feel bad.
Admin
Nine(9) thousant five hundred and hundred and hundred and hundred and c2V2ZW50eS0= EFBC90EFBD82EFBC90EFBC91EFBC91EFBC90.
There is no limit to how badly you can represent a four-digit number, but it does take some serious WTFery to reach 70 characters. I'm going with the theory that they're storing four MD5 hashes in there for some arcane reason nobody really wants to know.
Admin
Sort of reminds me of the time I found a CSS class named "ArialRed". The text color was green.
Admin
The real WTF? The stupid corporate system of "internal billing". Because you know what happens? The IT department estimates $50K worth of time for a gorram 2-day webpage workup because hey, that's how they get funded.
What do you get? Timmy's, scattered throughout your enterprise like termites.
At least the call center got the support they needed without having to wipe out their budget.
Admin
Am I naive or is TRWTF the fact that the company charges interdepartment fees of 95$/hr for developing something that should have been part of the original customer service CRM software. If you give uninformed people the option of doing things right, or doing them cheaply, the will always choose the latter. So don't make people choose!
Admin
Y'all are waaaay overthinking the field length WTFs. There's No Doubt (with apologies to Gwen) that the author of this code made some random guesses for lengths, and then randomly cut/pasted lengths from existing records to new ones he added when he felt like it.
Admin
I just like the fact that you HAVE to put a comment in every row (
comments
text) because of course THAT is one of the most important fields in the entire table.Admin
What you do is design your sql table to handle everything in your giant excel. You don't want your vba to crash because some of the customer rows are a little wonky. The customer is always right.
Admin
You don't actually. Default value is "".
Admin
And the font-family was Comic Sans?
Admin
I like the fact that there are fields for
valuation_date
,ship_date
ANDnum_of_days_from_ship_to_valuation_date
.This guy knew that date-functions are scary and that there is no sure way to deduct one from another. Better save all the things.
Admin
For the last 4 digits, should you use a int(4) field, or a varchar(4) field? Presumably the digits are always base-10 numeric? And if the last 4 digits are 0123, storing it as 123 is still a unique mapping, even though it 'looks' like 3 digits.
Admin
last_4_cus_number
varchar(70) default NULLMay be the customer number is less than 17 digits, and the field stores the previous 4 customer number seperated by some kind of seperator?
Admin
No, store it as a smallint. Then use vba to get the four digits by looking at each set of 4 bits in the number. It's BETTER
Admin
My favourite bit was "default NULL" on nearly every column (all except the one not null column and the text columns). Because if the value isn't specified on an insert, we want to make sure we put a NULL in that column rather than leaving it as a NULL.
Admin
Frequent occurrence. You get a system where the names of the css classes reflect the content of the class rather than its purpose. so when it comes to a reskin, and all the colours change, you suddenly find you have a choice: either change the contents of the classes in the css file, thereby having examples similar to the above ArialRed containing green, or you go through the entire website finding all references to "ArialRed" and changing them to "Green".
Or you rename the classes to things like "DefaultBackgroundColour", "DefaultTextColour", and so on, and slap the original designer upside t' head wit' cluebat.
Admin
The last 4 number spelled in words, 70 varchar is too short!
Admin
Ah, my mistake. With some db engines, you have to actually specify a default value if you want one. I needed way more coffee yesterday than I drank.
Admin
3 for Visa and Mastercard (at least here in Australia), 4 for AMEX.
Admin
Interesting that the schema allows for addresses in non-US countries, but the phone number field is limited to 10 digits.
Admin
At least the length of middle_initial is correct!
Admin
Wow, all this bitching at Timmy... I for one think he did a great job, considering his position.
Admin
To be frank, this database table is not bad at all. Column names are very expressive. And keeping all in one table probably came from just few columns initially, which grew to more as need arised. I have seen much worse examples of databases "Timmy" has done.
Admin
I bet timmy is a big proponent of NOSQL databases
Admin
You obviously never had the delight of working with SQL Server before 2004 - no field defaulted to NULL. It was a feature.....
Admin
simply to fuck with the one colorblind webdesigner in the company? :D