- Feature Articles
- CodeSOD
-
Error'd
- Most Recent Articles
- Chicken Feed
- Twofers
- Two-faced
- Boxing Day Math
- Michael's Holiday Snaps
- Anonymice
- A Horse With No Name
- On the Dark Side
-
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
A frist thing happened.
Edit Admin
A thrid thing happened
Admin
And then a scnd thing
Edit Admin
This is one of those so obvious so dumb things that it's hardly WTF worthy.
I don't know those particular syscalls, but was there any good reason they couldn't have simply replaced the call to the first with the call to the second then output all the date & time components from that result value?
Looks to me like another example of doing without thinking. And of "the best change is the smallest change". Both of which are shortsighted crap pushed by ignorant managements. Faster isn't better when you have to do it twice to get it right. Or more.
Admin
You may think so, but the other day, I saw an announcement for some kind of "no code" declarative thingy that translates to SQL and JavaScript (and something else), which was vibe-coded and had this exact same error in the example on the front page. Nobody seemed to notice it. So there's that...
Edit Admin
No, there wasn't a good reason. That's why it's a WTF and posted on this site.
Edit Admin
At least this code is pretty easy to fix:
A couple things I noticed in the original code that's probably from anonymization:
now_tvwas declared on the stack but its members accessed via->instead of.andtime();was being called without an argument (often justNULL), both of which result in compiler errors.