- 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
Is my number "1st"?
Admin
Admin
No, it's 1ts
Admin
Admin
Can't see youtube right now. Does that youtube link point to homestarrunner's "The System is Down" email response?
Oh, yeah, I can watch it on my "phone". Sure enough, it is strongbad.
Admin
lol, I'm going to put doomsday clocks in all of my apps from now on.
Admin
Admin
OMG! This is so funny I have to do it.
Admin
This is known here as the "partitioned ID" anti-pattern. The last time I spotted it in the wild it was at least documented in a sense by a class containing one static method that "decoded" the ID .
Admin
Also, I would assume that Daryl magically disappeared one day after giving short notice.
/incassum he was ever needed again.
Admin
We get 2 wtfs today
1: Why the fuck would you put all that shit into 1 table? 2: If you were putting everything all in 1 table, why name it "tbl14a_fx004B" when something like "table1" would suffice?
I do however love the doomsday clock :)
Also (my ignorance will start to show I'm sure), Why would you need scratch space in a database?
Admin
Admin
There are actually times when this is the right thing to do. Say, when you're partitioning VSIDs between processes. Or segmenting a network. Or...
But not if you're a normal human being, no.
Admin
This comment is out of frists
delete previous 12 comments to obtain more frists
Admin
The concept of having doomsday clocks in databases and code is not a bad idea, and already exists in slightly different forms like for tracking free space on hard drives and stuff (but without such a cool name). From now on I am going to put doomsday clocks anywhere I reasonably can for the poor souls that have to inherit my code.
I think somewhere evil laughter is in order...
Admin
If nuber issues were tissues, this would be a box of Kleenex.
Admin
Kind of an easy fix, right? There must be a function to allocate IDs, since overwriting records wasn't a problem. Find all the code that references that function, then create a new scratch table and use that. Don't forget to remove the "OH NOSE, ITS OVAR" message that his doomsday clock probably triggers.
Admin
Um, yeah. This is why when they talk about "a jury of your peers" they all have to be fellow coders. That way not only will they bring back an immediate verdict of justifiable homicide, they'll probably even award you something for helping to clean up the planet.
Admin
Anyone else get to the first link then go on a massive Strong Bad-viewing-spree on YouTube and completely forget about the fact that they were trying to read TheDailyWtf?
... :D
Admin
If you two are great minds, then I'm einstein (deliberately lowercased, you nitpicks; it's used as a common/collective noun).
Admin
Yes... For like the last hour and a half.
Admin
Error: Out of comments. Contact author.
Admin
"All of the IDs between 1 and 199 are reserved for employees, 200-499 for product codes."
As long as we stay within these numbers we are ok.
Admin
Admin
If you are using it as a collective noun, then you are using it wrong.
You wouldn't say "I'm geese" or "I'm people".
If you are using it as a common noun then you are referring to the particle; that doesn't make much sense either.
Admin
Only about 40 minutes of strongbad. But, I now have a new soundtrack for my life. time well spent. thanks TDWTF!
TROGDOOOOOOOR!!!!!
TROGDOR COMES IN THE NIGHT!!!!
Admin
What a nuber.
CAPTCHA: appellatio - What you have to perform to get some of these applications to work?
Admin
From now on every application I write will have a doomsday clock. Except for the doomsday application, because that would be silly.
Admin
...but fools rarely differ.
Admin
Oh, we in orkut team one nice Friday got out of user ids, and started assigning old ones to new customers. Luckily, account #1 (Orkut Buyukokten), as well as those of her girlfriend and other famous people (Brin, Page, Meyer etc) were spared, and were not shared with perplexed new guys in Rio (where orkut was most popular).
Took half a week to throw in more ids and disambiguate between "old guys" (cf. MiB) and "new guys".
Admin
Me too. That really won this WTF for me.
Admin
Admin
Going out on a limb here, but that sounds like something I'd expect to find in an Oracle database (or created by an Oracle DBA). It's just the right combination of needlessly-esoteric and needlessly-complicated, with a healthy dash of not-invented-here thrown in.
Admin
Heh. We use Peoplesoft for HR here, with a 5 digit employee number. Peoplesoft employee data, including the employee number, is used to populate Active Directory. Regular employees get an incremental (mine is in the high 46,000 range) and contractors get an incremental in the 90,000 range. We'll probably replace our HR system long before we run out of numbers though. I started four years ago, and it looks like the newest employee is in the 47,7## range.
Admin
while the concept of a doomsday clock is pretty awesome, it is the TRWTF. It shows the original coder knew that he was creating a problem, but only created a way to monitor it instead of doing it the right way.
Admin
Admin
Oh, I think I know this one. It is simply "table 14", but the "fixed" one, so we had to add the "a". Changes to this table effects (get it, "fx"?) rows in Table 4 (but the second "fix"). The "00" part is the number of indexes and foreign keys, respectively, obviously.
Admin
Admin
Sigh.
Admin
That's more than enough time to find a new job AND advance the doomsday clock by a quarter. That should teach those higher management morons a thing or two.
Admin
Easy solution. Increase order count to 40k. Modify script to delete above 40000 instead of 30000.
profit!
bonus: tell bosses it will take 2 weeks to work the solution. Use extra time to find new job.
Admin
I think that's what was implied in the TL;DR; source view of the storey...
I'm guessing he just handed it off to the next poor schlub in line...Admin
they hired me to fix it, but then never let me start the job. Something about me being the two hundredth employee.
Admin
Admin
Edit: Makes complete sense, cause they would only ever order as many desks/staplers/cake as employees in that system.
Admin
This is why the unique ID should be a floating point number. When you get to employee 199, the next one is 199.1, then 199.2, 199.3...
Admin
Except now when you go to grab record 300001 for scratch space and scribble in it, you've corrupted whatever order was supposed to be there.
Whoops.
Admin
Admin
Minecraft does this - blocks have an ID under 256, items have higher IDs. They of course eventually decided to add support for more blocks in the latest snapshot -- but since it would be too much work to change the IDs of all the items to make space, they worked around it by adding a "4 bit data layer" i.e. another number you presumably have to add to the ID to get the actual ID of a block when it is >255
Admin
I am sure he had all the time in the world to do it correctly and that management had all the money to spend on hiring top quality staff with experience in that kind of project.
TRWTF is that I fell for the troll