- 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
Most of the important C libraries have been using use a 64 bit time_t for a number of years now.
There's plenty of time left for this to propagate, it will mostly be a non-issue.
Admin
At our uni computer related problems tend to pop up every new year. Usually it's just a bunch of expired SSL certificates, but when 2010 came all IT services requiring Shibboleth login stopped working. With exam week and homework deadlines rapidly closing in a hungover sysadmin was summoned from his two-and-a-half days' national holiday. Luckily a lone C/C++ course assistant had already located the problem and all internal services were brought up. However, it took half a week before all third party services were working again.
The culprit? The Shibboleth sample Service Provider configuration file had an expiration date of January 1st 2010.
Admin
I wonder why completely stupid, borked and wrong unit tests aren't posted regularly on TDWTF too...
Admin
Admin
You're right.
Obviously if unit tests are the silver bullet to prevent 100% of all bugs in code, we need "unit test tests" as a silver bullet to prevent 100% of all bugs in unit tests.
Of course we'd need to shift all the competent people into the new "unit test testing" roles; and because there's only so many competent people we'll need to use incompetent people to fill the programming roles. Unfortunately all these new incompetent people will really stress the unit testing (and the unit test testing), so you'd need to add "unit test test testing", and...
Eventually, there'll be at least 20 levels of testing, and anyone with enough intelligence to sit on a chair without falling off will be working as programmers (due to the skills shortage).
That'll work, won't it? :-)
Admin
Admin
TRWTF = countries that use dates in mm/dd/yy format.
It defies logic and common sense.
(UK-based poster)
Admin
01/01/01 - 1st Jan 01 } 01/02/01 - 1st Feb 01 } DD/MM/YY alphabetic ordering (non-numeric) 02/01/01 - 2nd Jan 01 }
01/01/01 - 1st Jan 01 } 01/02/01 - 2st Jan 01 } MM/DD/YY alphabetic ordering (numeric) 02/01/01 - 1st Feb 01 }
Admin
Using regexps for date validation is not that clever. Ofcourse the whole date can be validated using a single regex but the pattern gets like 80 characters long and very difficult to read beacause all the leap years, differences in amount of days in a month and such. Checking just the individual parts of a date string is questionable as well because each part is dependent on the other parts. Regular expressions are best for pattern matching, not for arithmetic comparisons.
Admin
Admin
why? we all made loads of cash out of it...
Admin
I thought we were quite successful in blaming it on old father time.
Admin
C99 allows variable declaration anywhere.
Seriously, what is it with people? This standard is now twelve years old.
Admin
Thanks for playing!
Admin
The company did the only thing possible to prevent further development disasters: he was made a line manager.
Admin
Admin
I'm assuming you're deliberately trolling, but what the hell.
MM/DD/YYYY - sorted numerically
01/01/2011 01/02/1957 01/03/2038
etc.
There's a reason why YYYY-MM-DD is the ISO 8601 standard date format: it's the only one that sorts correctly with a trivial sort.
As an added bonus, it means that the obnoxious Europeans who insist on DD/MM/YYYY and the obnoxious Americans who insist on MM/DD/YYYY are both equally wrong!
Admin
So when does the 1st Jan 2002 appear in your world? Apparently before February 2001.
Thanks for playing!
Admin
DD/MM/YYYY sorted alphabetically:
01/02/1903 01/02/2003 02/01/1903 02/01/2003
DD/MM/YYYY sorted by date:
01/02/1903 02/01/1903 01/02/2003 02/01/2003
So alphabetic and date ordering are different for DD/MM/YYYY
MM/DD/YYYY sorted alphabetically:
01/02/1903 02/01/1903 01/02/2003 02/01/2003
MM/DD/YYYY sorted by date:
01/02/1903 02/01/1903 01/02/2003 02/01/2003
So alphabetic and date ordering are the same for MM/DD/YYYY
WTF don't you understand about this incredibly simple concept?
Admin
Admin
I am from India and we use DD/MM/YYYY in our date formats.
Admin
I don't understand how 02/01/1903 comes before 01/02/2003 in an alphabetic/numeric sort.
Admin
Admin
Admin
Admin
Make sure you tally those totals, you enormous looser.
Admin
In case you can’t tell, this is a grown-up place. The fact that you insist on using your ridiculous handle clearly shows that you’re too young and too stupid to be trolling TDWTF.
Go away and grow up.
Sincerely, Bert Glanstron
Admin
Admin
+1
Yeah, every dev & admin at every vendor working crazy to get out the Y2K certified software (with the latest gee-whiz that marketing wanted, natch), with every dev & admin at every end site working crazy to test, install, verify & patch both the vendors crap & their own Kustom Krap.
Made good money but it was a lost year.
Admin
In an attempt to solve this issue, I propose the following date format be adopted:
D
Start counting from day 0 (presumably the day that time came into existence, for backwards compatibility). Scrap the notions of years and months entirely, because they're obviously confusing us all greatly. Make sure to store it as a suitably large integer type.
The average man on the street would hate it, but life would be peachy for developers.
Admin
Note, class, todays trollers managed to riff off of two of todays themes:
Proper date validation Valid unit tests
For bonus points, identify which concepts apply to each argument.
Admin
Admin
Admin
Probably either "I won't be here come 2000" or "WOW, this 2000 bug is really overrated"
Admin
wow, either your an idiot or a troll!
Admin
Admin
Our reply, however, was not quite so loquacious. It was basically "not a bug -- the year 2000 is a leap year".
Admin
Admin
Admin
As for maturity. The problem isn't the engineering. It's the management. They hire incompetent and unskilled workers for what is essentially a field for experts. And should there be an actual expert trying to do his job they are actively ignoring the expertise and doing their best to undermine and subvert all sensible approaches and solutions.
So, if there is an appearance on immaturity in the field, it's because the people who could do something about it are locked in the playpen.
Admin
FTFY
Admin
"Fix a couple of reports displaying “19100” here and correct some validation logic there"
Says you. I was coding for DOS and with 512k of memory available (himem was a POS) I had to modularize multiple forms because adding the first two digits of years caused them to just barely cross the threshold.
I spent 6 months of 50+ hour days fixing one application in my company's arsenal.
Admin
I never wrote VB, but I have a question. Is there any kind of explanation why somebody would write something like this:
Might 'Left' have a sideeffect on thisDate?
Admin
Maybe that's how Obama will solve the unemployment problem.
Admin
This is the most flexible way to do it.
Admin
Also, they didn't know they could get the Char with
I've never written VB either, but it took me all of five minutes to find that out. I guess there might be a reason for the reputation of VB.Admin
I can do you one better. In 1999 Q4, I fixed about a half dozen Y2K bugs in scripts written in 1999 Q2-4. The developer was still around, and didn't get fired over it. He also didn't get fired over the Y2K bugs in scripts he wrote in 2000. And, yes, he did put scripts into production in the year 2000 which claimed the current year was 1900. Fortunately, he did voluntarily leave in 2000.
His reasoning was that this was the way he always did it, and it always worked before, so the fact it wasn't working now was an OS defect. This despite the fact he was at multiple meetings where we said, "Stop using {bad code example}. Use {good code example} instead." Fortunately, his scripts actually used the bad code example character for character, so it was generally pretty easy to fix it.
Admin
Personally, I'd hope that it gets professionalized around 29 years from now. Of course, I understand, this is my own pipe dream - there'll probably be enough 64 bit or more computers that 2038 will be a mitigated disaster, rather than a true catastrophe.
(Yes, I know, 64 bit computing will fix a lot of the 2038 bug issues. However, my suspicion is, the primary effect of this will be to prevent management from permitting the programming resources needed to fix this, so most of the bugs that will still be there on January 1, 2030 will still be there on January 19, 2038. We will therefore actually get to feel them, and there will be companies that crumble because of them.)
Admin
FUCK OFF CINDY WE DON'T WANT YOUR SPAM!
Admin
It's comforting to know that the date
00010/000030/100
is still valid.