- 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
It happens. DB normalisation is a skill one cannot expect of rookie programmers. They are not DBA's, nor seniors. It's funny, but a true WTF, no.
Admin
Aren't scenarios like this exactly why products like SSIS and the like (ETL tools) exist?
Admin
Motherlode, not mother-load. I normally wouldn't be so picky* but mining metaphors are so apt when dealing with huge volumes of horrible data.
*This is a lie
Admin
No big deal. Just an exercise to convert data from one format into another. A little tedious, a little fiddlesome, but just another day down in the engine room. You'd write a tool to do the actual migration, which will evolve during the course of the analysis of the problem. If you get entities that seem unmappable, either raise a ticket or talk to the customer. If you can't do this, you're probably in the wrong job.
The real WTF would be if you've been assigned a ridiculously short time to do it. And if that's the case, then you just take your time and warn the powers that be that it will be later than they expected. And if you're prone to panic at the shortness of deadlines and be tempted to rush it and cut corners, then again, you're probably in the wrong job.
Admin
Admin
Well, since it's Child table, maybe family pun was in order...
Admin
So there is some redundant information in the client's data. So what? Optimize that away and you're done.
If this kind of job scares you, I can only say you have been working in a very well protected bubble so far!
Admin
I kind of agree. Code based on the obvious data, work out the exceptions, rework the code... Pretty standard process for writing software really, isn't it?
Of course the real WTF in this article is the fact it got to this in the first place. Imagine the code/lack of code that created that he/she, boy/girl table.
Admin
That "motherlode" is just a code-to-text table. Well okay the PK doubles as a useful text, which is dubious but doesn't make the import any harder. Just add a constraint that "gender" must be one of the officially sanctioned values. Yeah it's a lot of non-official ways to store data, but so far nothing really worrisome; just run a "select distinct" on all the columns that use strings instead of raw values, and complain only if the same kind of data is stored in multiple ways (now THAT can suck royally).
Admin
This! A thousand times this. Why do programming departments in general continue to put up with this sort of crap? Salespeople should be held accountable for any promises they make, in such a way that they feel inclined to consult R&D before making outlandish claims. Perhaps commission in such cases should be contingent on the claims actually being met, and if any significant developer effort is required to meet them, a portion of it given to the developers.
Admin
Admin
This article is now 13 comments old.
Admin
Admin
Snoofle, you sexist. Why did you write 'boy' with a capital B and 'girl' all lower-case?
Admin
TRWTF is that we can't simply beat salesman to the ground like they deserve...
Captcha: commoveo... I'm afraid nobody will get commoved. Relieved, in fact.
Admin
Admin
Admin
Admin
Right or wrong, it's just the way things are here at TDWTF.
Admin
I'm having a hard time deciding whether the opposite of "programmer" is "marketer", "executive", or "lawyer", but I'd happily do with a few less of each of them.
Whoops, I just proved I'm an insensitive privileged bigot.
Admin
Admin
Wow, how disgusting. These cis-normatives didn't even consider the possibility the kids may be gender queer.
Admin
Admin
With the President's daughter on his arm, the salesman turns to Daan, and says "I just made a huge commission off of this sale. Book 'em Daan O.."
Admin
Glad to see I'm not the only one who says "What WTF? This is just business-as-usual, big deal, it's a text conversion". I was just a lowly half-ass intern programmer back in the 80's/90's, when this was practically an everyday occurrence thanks to mainframes, DBASE, early versions of Excel, etc. Import this text here, export that text there, convert this text like so. Meh, wasn't particularly difficult, even for a newbie.
Admin
No - you know very well that it really means sex and not gender. And we just don't like using the word sex when referring to children.
Admin
I think everyone agrees the import isn't that hard. It's more a matter of how much of a mess the old system must be that's the WTF.
Admin
I had just assumed that it was part of the WTF.
Admin
I just realized in re-reading it two hours later that the bit at the end wasn't a table for text strings to fill in parameters based on gender, it was the actual text strings, manually entered just like other crap like that age field.
Basically, nobody at the client company understood even the simplest aspects of programming or databases. What would be second nature to us (store just an M or F and let code elsewhere insert "his" or "her" based on it) is completely alien to the Excel Is My Database crowd.
But I guess we have to at least give them an honorable mention in their contributions to the fight against cis privilege.
See where it says "sample data"? This crap is all manually entered, so I'm sure that you can find both "boy" and "Boy" in that field. You can probably find "gril" in there too.Admin
I have to call bs on that. Basic class structures are precisely the same problem as relational databases. IF you cant write a normalized set of classes you are not even at the stage of rookie.
Admin
FILE_NOT_FOUND. Heh. I see what you did there.
Admin
If that's the motherlode, now might be a good time to become a lode runner.
Admin
Admin
I see why they put him/she in the database, what if you had a genetically mixed kid, they may be legally a boy, but prefer to be referred to as a girl.
What you need is two fields.
DNA gender (male, female, mixed male, mixed female) Gender Identity Crises (Yes, No)
Then, if GIC is set, you flip the pronouns from DNA gender to the "opposite".
This way you can add in new genders later, like:
Famele and Mefel
Of course you'd also need the politically correct "selected gender identity" if they have a separate identity than what's on their BC.
The question there would be: You're all muscular, but you like to wear dresses, which gender do you see yourself as.
You flip the answer to that, and then you know what gender they'd like to be.
Admin
What's so horrible about that motherlode table??
That looks like strings for merging when making form letters. While I've never put such info in a database I can certainly see the merits of it.
Admin
One of my pet peeves is a fill out form with the following fields:
Today's Date, Birth Date, Age.
With age and today's date, you still don't know whether they just turned today or they turn tomorrow; you won't have the right age up to 364 days of the year.
Admin
All the commenters saying "no big deal, just change the code" have yet to work on such a nightmare I-know-a-bit-about-databases-normalization-what's-that system. The likelihood is that the coupling between the database design and the application is such that the use of the data retrieved from these columns is scattered fairly consistently throughout the code base and would result in huge failure if one single instance was missed in an attempt to make it sane.
Awaiting the many and varied dire consequences of this rubbish is a question of when not if.
Admin
I'm a grill, and so is the president's daughter!
Admin
Works well if you check the redundant information and avoid a lot of problems later on.
Admin
We have data massaging algorithm to take care of such problem. Send Daan to sing contract with my company and we'll take care of it as soon as contract is signed and ink is dried on papers.
Admin
Nagesh, you, your company, and your algorithm are all made out of mashed up arseholes.
Admin
Using the age for parity? I'm more likely to get my age wrong than birthdate. And it doesn't explain forms that ask for age and not birthdate. And if I get my age wrong, my birthdate is suspect? Waste of my time. I mostly skip those fields. Often I put my birthdate instead of age on purpose, because it implies they're going to enter age into a database field one time, which will be most likely wrong in six months.
If someone can't get their birthdate right, the rest of the form is as good as kindle.
And what are you going to do to double check the address? name? etc.
Admin
Unless of course the lode was to blow. And from the sound of it, this lode totally blows.
Admin
My only complaint is the confusion between sex and gender (it isn't even meaningful to talk about the gender of a 16-year-old who isn't even fully self-aware yet), plus the absence of an intersex option.
Addendum (2013-07-29 11:55): 16-month-old, obviously. Not 16-year-old.
Admin
Because of 5% of the population, we can't figure out the difference between sex and gender?
It's in the freakin DNA for crying out loud.
Admin
Admin
This is typical of many vendors, particularly smaller ones trying to get a foothold.
I've sat through my share of meetings with customers, and without the sales rep who made the promises and a nice commission and who had already went off for a new victim, where I had to explain the sad truth. None were amused but when the driver is sales, you'll lose every argument.
"The developers can always figure something out!"
OTOH, I've worked in places where IT employed internal "business analysts" who basically made promises they weren't responsible for delivering. The only difference was that one group lived off commissions and the other got a straight salary. In both cases, they were gone as soon as the going got rough.
The solution is to be independently wealthy.
Admin
"Book 'em Daan O"
I estimate 92.376% of TDWTF readership will not get this reference.
Admin
This is quite an ingenious way of dealing with transgender children. A girl might prefer to be referred to as him, it, they, or s/he. You can't hardcode these things, fellas!
Admin
That's a lot of optimism.