- 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
TRWTF is this article. And frist.
Admin
As an bonus, if we try to parse that end time as UNIX timestamp with time-zone it turns out to be before the start time.
Admin
From this article we can see there are only a limited number of RWTF's that are perpetrated over and over again..and TDWTF is running out of them.
Admin
Admin
If I set my computer's clock to year 2316 and store something in a database, is that the fault of mySQL?
In 1997 I bought a peripheral. The accompanying floppy disk contained drivers for Windows. One of the vendor's files had a timestamp in year 2098. The floppy's file system was Microsoft's FAT12. Now this might be hard to believe, but really, truly, I do not blame Microsoft for that timestamp.
Admin
The USS Enterprisey, boldly going where the hand of man has never set foot.
Admin
Haven't read something like this since..well, since the start of the Foundation series.
Admin
Where did you dig up these new writers? This is terrible. The level of embellishment here is getting to be outright ridiculous. Sure, some anonymization I can understand since you are afraid the company will sue, but this is ridiculous.
People don't come to this site to read stories, we come to laugh at morons in our profession and relate to how stupid companies are.
Admin
WT?F
Admin
Admin
Looks like most of the people commenting here need to try and maintain a site like this. Jeez, stop complaining. I thought the story was funny and it actually told me without having to check the UNIX timestamp that it would be before the start date.
The funny writing style is actually the only reason why I read this page.
Admin
Oh, Internet...you and your ability to trash people that are only attempting to humor you. Had you only posted two lines, it wouldn't have been as entertaining to read and people would be critical of how short it was.
I thoroughly enjoyed this article, don't let the hypercritical sway you. A quirky little fabricated story like this is nice for sci-fi nerds like myself.
Admin
Admin
Has no-one worked it out yet? The secret is out..... Windows Mobile is going to become the standard......
Admin
Noooooooooooooooooooooooooooooooooooooooooooooo...........................................................................
Admin
WHERE's the WTF in the output? Honestly, without knowing the schema, that output could be perfectly normal.
So you think StartDate and EndDate must both be of type DateTime, eh? And why should EndDate not be of type varchar? With the string "Date(1328033230-0500)" as its value?
Anybody following The Daily WTF on a regular basis should long have abandoned assumptions about schemas (or code) automatically following the logic most of us would consider as "normal".
In the twisted mind of a lone programmer there could well be reason behind this ("StartDate can be DateTime, but EndDate should better be something I can shove into an eval() method, so if I use a Varchar there, I could use the result of a select without further transformation").
And if both columns are of type DateTime and mysql console spits out the wrongly formatted EndDate: that's a bug, and so should be reported. It's not a wtf.
Admin
However not everybody has your background, so the story obfuscates TRWTF, and that confuses them .. and makes them angry [/Zapp Brannigan voice]
Admin
The beginning of the article reminds me of some scifi story, perhaps one by Asimov. I can't pinpoint which one, though.
Admin
Anything that mocks MySQL is good in my book! And we know this is fiction because NOBODY will be using MySQL (or any other current database) in 23xx, amirite?
Admin
I mean, even today's students in mechanical engineering / shipbuilding would probably not understand the implications of a WTF in shipbuilding from the 1800s if shown a relevant picture.
200 years is a long time...
Admin
Okay, for the hard of thinking, hard of understanding and hard of learning:
WTF1: the end date and start date not both being date/time fields. The only reason for the end time to be held in the db as a long is laziness. You can do it for the start date, you can do it for the end date, bozobrain. Now make your code sophisticated enough for this to happen. If you find yourself unable so to do, then I have a pile of CVs here of people who are more than keen enough to take your place.
WTF2: the end date is before the start date. Clearly something has gone wrong in the business logic, but that will probably take some time to debug, especially if this is an isolated example of an old data set. It would be nice if you were to establish the source of the problem, ubnless of course it's a current bug in the application, in which case I would like you to be on the case immediately.
WTF3: It is impossible to tell at a glance that the end date precedes the start date without processing the date-as-a-long into a date-as-a-date (or the other way about, but that's just silly). The fact that nobody has realised that the suffering incurred by enduring the tedium of performing the operation means they're just not very good programmers. A good programmer is far too lazy to let something like that sit around in the database for any length of time.
The Isaac Asimov story that I thought of first was in fact "Thiotimoline to the Stars".
Admin
Obviously they'd traveled there from 2013 to escape Windows Mobile.
Admin
"the end date is before the start date. Clearly something has gone wrong in the business logic,"
That's also mighty presumptive. It's entirely possible that the logic is "if the start date is after the end date, then the (fill in the blank) hasn't ended yet." So why not blank out (or null) the end date when you start a new one? Maybe you want to keep track of when the last one ended. And since it would be only tracking that one value, a separate transaction table would clearly be a waste. All valid.
Admin
Don't worry fellow TDWTFians, I am hard at work producing the next big WTF.
Admin
The end date is just missing the year and the month (and separators):
1328033230-0500
becomes
YYYY-MM-13-28 03:32:30 -0500
Yes, it's a WTF (why are you taking substrings of your dates and then stuffing them back into dates?). But the fluffy story is even more of a WTF.
Admin
http://dilbert.com/fast/2013-09-20/
Admin
WTF1: That the StartDate and EndDate do not have the same type is pretty obvious. But misleading names are so common in the world of programming (ref: TDWTF) that without knowledge of the code that makes use of that db, I simply consider this a very minor wtf.
WTF2: EndDate before StartDate is a problem? So you know for sure that these two Dates refer to the same event? That EndDate is only legal if it is greater than StartDate? If you simply assume that this is the case, then your logic is fundamentally flawed. Yes, better naming would make things clearer, but without knowledge of the problem domain, EndDate and StartDate could well be shorthand for "EndDateOfLastSeason" and "StartDateOfNextSeason".
WTF3: If you think that every programmer can just fire up a mysql console and use it to debug his application, than your experience is a bit limited. Not everyone has access to the database server to say the least. If you don't use the console than the limitations caused by the differing datatypes do not apply. Same goes for the suggested database refactoring: once the codebase depending on your existing schema is large enough, you don't do it.
Finally: have you ever selected a DateTime and a long together on a mysql console? On mine, I would see a nice Date with the time and a very long number. What I would not see is "Date(1328033230-0500)" because that is a string.
Admin
To this and similar comments: If all you want are WTFs, they are cached for speed and convenience in your local code base.
If you want stories, you may find them here.
Admin
I come here for the stories and as long as there's some grain of truth in it, it's fine for me.
Today's WTF would have been pretty without any story around it.
Admin
I'm sensing a completely unmerited amount of nerd rage in these comments. I quite enjoyed this WTF. Sure I've read better, but it certainly was not bad.
Admin
I don't think anyone is raging... I think they are calmly, and rationally, expressing a negative opinion of an article that they didn't think was even up to the low standards that we have come to expect from this site.
Admin
Just had a good laugh
Admin
I actually really like my Windows phone. Certainly won't go back to iOS with what I've seen of iOS7. Android is too fussy.
Unless you were talking about old WinMo 6.x. That's an abomination.
Admin
So all we need in order to develop warp drive technology is to create and apply the correct WTF in just the right situation that not only does it baffle the minds trying to comprehend it, but it baffles space-time itself?
transverbero - such a WTF that is so appalling that it transcends description
Admin
TRWTF is author thinking that Windows Mobile was bad and somehow hindered progress.
Admin
There has to be more interesting WTFs to feature than this. I know, because I've submitted several that were. The hate on Windows phones just adds to the stupidity. I'm an Android user, but I've messed around with some friends' Windows phones and think they are actually quite nice.
Admin
No, the same mistakes are just being made over and over again.
Admin
Am I the only one that thought of Magrathea when it came to this story?
Admin
Story flavoring was awful, but it's rather surprising how many people are legitimately defending that format for the EndDate with comments like "well we can't judge without seeing the rest of the code!"
Yes we can. If the rest of the code requires a format like that, then it's just as WTF as the data values. In fact I can almost guarantee that it is, and that's why CodeSOD is so awesome. The segments are bad, and the horrors they hint at beyond, lurking in your mind but certainly existing in a file somewhere, are WORSE.
Admin
+1
I can't believe someone defended storing a date/time value as a varchar, since it would need to be used that way in the code. Even if you do have a WTF in the front end, convert it there. Store it as a datetime! If you need to shove it in an eval() call or something (which is another WTF), transform it in the front end. Don't kill the structure of the database just because the front end is a WTF.
Admin
This would have been drastically improved by a simple explanation of what this is and some of the code behind it.
Unless, of course, some idiot simply noticed that the end date value is before the starting date and submitted that as a WTF.
In either case, TRWTF is whether we should blame the submitter or the writer for being dense enough to give life to this.
Admin
Also, what's with the Windows Phone hate in the article? It's a perfectly usable phone OS. It certainly doesn't belong on the desktop, but that's a different complaint.
Admin
So, did TDWTF get hacked? XD
Otherwise 3 wtfs here:
1.) Dates not being stored in consistent formats (Unix date string versus ... actual date format?)
2.) EndDate < StartDate
3.) The article.
Admin
On the contrary, it's not at all clear the fields are of different types. Maybe they are both strings.
Here's my guess as to what happened:
Admin
Oh, come on. This is a comment board. You don't have to have actually have USED a product to hate on it. Really, for half the trolls that haunt this board, all they have to see is the word 'Microsoft' and it sends them into a slavering fit of rage.
Go on, keep drinking the Steve Jobs Kool-Aid. The rest of us will continue to think for ourselves.
Admin
If I had tea, coffee, or milk in my mouth, you would have owed me a new computer.
For now, I'll just wipe the spit off and continue with my laughter :)
Admin
Each of those straws you grasped at is a separate WTF. Represent items in an intuitive manner if you want maintainability.
Admin
to be fair, they're talking about Windows Mobile, not Windows Phone, which are two separate things and the former of which is much worse
Admin
A good WTF is like a good joke - if you have to explain it then it's not good! I was left confused by this one
Admin
The thiotimoline stories are more relevant of course.