- 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
EndDate precedes StartDate if Hillary catches me.
Admin
No, TRWTF is that you apparently think there is some month that has a day numbered "13-28". Of course, perhaps you meant the 28th day of the 13th month, but that doesn't really get rid of the WTF.
Admin
More like Galactic patrol By E.E. 'Doc' Smith
Admin
Unfortunately the setup for this article is very poor. It's a very klunky introduction to what is essentially "Help us get the date format consistent in our database because we use it every day and still don't get SQL". It really needed a different narrative angle, although the prose was well-written. I was utterly confused by what the hell they were trying to say.
I would much rather see a return of Best Of The Sidebar. Take inspiration from those posts and write articles based on them, preferably with a more consistent narrative than this one.
(Sorry to the OP, I'm trying to be constructive.)
Admin
So go back to reading your well-thumbed and probably by now rather soggy copy of 50 Shades of Grey.
Admin
WTF 1: Yes I know it's "obvious" that start date and end date don't have the same type. In a consistently designed and maintained application, that is unacceptable. It should have been caught at code review. Storing a date/time in any format but a date/time is suboptimal. If you want to continue to argue with me, then you can do it from someone else's department, I'm not having silly little boys with attitudes like yours working on my team.
WTF2: If they don't refer to the same event, then the fact that they are not named according to the events they are referring to is also completely unacceptable. Unless they come from separate tables, and that within the context of those tables it is obvious, then again, absolutely no good at all.
WTF3: I expect any programmer working on MySQL to be at least competent enough to have learned how to do obvious stuff like handle date/time processing. I perceive a bit of a training opportunity here. You have a week to take advantage of it, on pain of being promoted to a customer.
Now get out of my office and stop wasting any more of my time and the company resources.
Admin
I do in fact have some questions before I leave.
In general; Why do you think that "Date(1328033230-0500)" is an example of a date-as-a-long? And why do you think anyone who claims this could be seen as authorative on anything in IT.
To point 1; Why do both you and faoileag assume that StartDate and EndDate have different types? To me it seems far more likely that both fields are strings.
To point 2 and 3; Why do you assume that any single programmer has enough clout to impose a project to identify and correct all the cases where the fields are used in a project so that the database schema can be corrected? Or more severely, why do you think that the changing the database without first identifying the places where this field is used is a sane decision?
Admin
TRWTF is the stupid story constructed around this GEM of a CodeSOD / representative line!
Admin
Of course you are right and both fields could be of a string type. If I recall correctly some database wtfs published here, this might even be highly likely :-)
Admin
Should it ever come to that: welcome to the real world!
Admin
". . . You really haven't seen much legacy code, have you?" True that. Remember the good old days...like now in some cases...where you get 8 characters to name your columns? Because you know (26 + 10)^8 unique names is way more than anyone will ever need, right? Until you try to make those 8 characters make some kind of sense. Especially in a flat-file with 100 or so fields.
Admin
There's another wtf hiding here. That date string is in the MS json sterilization format (which is a whole other WTF). In a MySQL database.
Admin
I wasn't even complaining... I'm here enjoying the avalanche of other peoples complaints because they are, at least, entertaining.
Admin
Crap, I just fed a troll, didn't I. >.>
Admin
This is why I don't read TDWTF very often anymore.
Admin
Code reviews are the first thing to go if everybody is working 110% just to make the code fail in time. TRWTF.
Admin
"Work" on the other hand can mean: "it didn't crash when presented to the customer because we didn't let him fiddle with it at will".
In the absence of unit tests, "it works" is an extremely flexible description! ;-)
Admin
I prefer the old days of TDWTF, when a simple expression of the problem/WTF was sufficient, and we could immediately begin riffing it in the comments.
Seems now, every one of them has to be whipped up into a sort of mini-novella with a lot of excess verbiage.
Admin
Jan 31, 2012. That's the end date. Might save someone having to look it up, as I had to.