by Mark Bowytz on (#2MMK1)
"If you want to sneak in an ad that doesn't necessarily belong in Kongregate, I guess a little creative spelling is one way to do it," wrote Ben J.
Link | http://thedailywtf.com/ |
Feed | http://syndication.thedailywtf.com/TheDailyWtf |
Updated | 2025-07-01 01:01 |
![]() |
by Remy Porter on (#2MCG2)
I recently have needed to write some systems that do analysis on a stream of samples. The target stream of the analysis process was stored in a variable targetOfAnal, because obviously, that’s more efficient to type than targetOfAnalysis. I of course needed an analProcess and analComplete flag, and yes, my inner 13-year old was snickering the entire time.James’s co-worker decided to demonstrate that immature dirty jokes should only be taken so far. James heard him cursing up a storm, and thus offered to help debug whatever the problem was. You could say this code is hitting the “dirty variable names†button a bit too hard. I present it here without modification, because honestly, there is no way to censor this code and have it convey its full meaning. Ready your alt-tab before the boss comes by:
|
![]() |
by Charles Robinson on (#2M8E6)
Having survived the scourge of Jack's automated testing debacle, Rita thought she could handle anything. Since that time, Rita had Operations burn/kill/destroy all the JCKRKS servers and set up new ones that she had full control over. Rita felt well-prepared for a future where nothing that bad could happen again. But sometimes those who only look forward are unprepared for the return of a long-forgotten relic.In a different IVR-enabled part of their health insurance system, customers could call in to hear information about their health benefits. These benefits, as is par for anything with health insurance, were governed by a very complex set of rules, contracts, overrides, and addendums. Depending on the caller's employer, benefit administrator, subscriber level, eye color, astrological sign and feng shui positioning, their very specific set of benefit information would be read back to them.To house this complex set of business rules, the organization depended on ILOG to keep things in order. It did the job but when it came time to tweak said rules, customers had to file a formal change request and wait weeks to see their change implemented. Customers complained about the process enough that Gregor, bringer of Jack, had the bright idea to give them a way to make rule changes on the fly themselves."It's quite simple, Rita," he began to explain with an arrogant tone. "It's taking too long for our customers to get their changes and it takes too much of our time to implement them. We need to create a web-based way for them to alter their business rules and I think you're just the girl to make it happen!""Gregor, I agree that we could do better with this, but are you sure we want our end-users messing around with complicated settings? Things could get ugly in a hurry," Rita expressed great concern."Point taken, but I still think this is a brilliant way to make everyone happy and more productive! Plus we can deprecate that expensive ILOG system and just store everything in a database! Get to work."So began a large unplanned, unbudgeted project to get the web interface built with a SQL backend while exporting all the data from ILOG to a massive Excel spreadsheet. It drove Rita to her wit's end but she started to see the light at the end of the tunnel. They were now prepared for a round of beta testing by HealthLords, their biggest client (see: biggest complainer).The HealthLords were excited to get started so they could brag about being the first insurer to set up their own business rules. They logged in to Rita's slick web interface and began to manipulate stuff. As they dug through their extensive set of rules, they came across one that was foreign to them - "PAUL TEST DO NOT DELETE". They opened it up to find the shocking description of "This is just an internal test. Those whiny HealthLord idiots will never see this once ILOG is implemented."Almost immediately, Rita received an angry call from a big whig at HealthLords. Caught off guard, she was only able to offer a token apology and promise to look in to it. It had never been there before, so it was definitely a mystery to solve.She dug in to the IVR platform that was still being used before and after the days of ILOG. After many rounds of tracing the code, she found the rule embedded deep in a dusty corner of the code in a class that shouldn't have processed benefit addenda at all. There stood a comment on the offending rule, "// remove this if we decides [sic] to pay for ILOG ~ Paul".Paul hadn't been with the company for several years and had quit just before the ILOG system was implemented. But that didn't mean Rita couldn't curse his name on this day. ILOG had been covering up his test rule forever and now that it was out of the picture, it showed up again during HealthLords' beta testing. It took Gregor escalating to his bosses' bosses' boss just to keep HealthLords from backing out of their contract. [Advertisement] Universal Package Manager – store all your Maven, NuGet, Chocolatey, npm, Bower, TFS, TeamCity, Jenkins packages in one central location. Learn more today!
|
![]() |
by Remy Porter on (#2M4P4)
UUIDs, aka GUIDs are, well… unique. Unique identifiers. It’s right there in the name.Active Directory needs to identify things. Thus, it uses GUIDs. “Omni’s†co-worker got this far, but then ran into a problem. If you print a GUID from AD, it looks like this: “35918bc9196d40ea9779889d79b753f0â€, but if you print it from C#, it looks like this: “35918bc9–196d–40ea–9779–889d79b753f0â€. Whatever is a programmer to do when dealing with these radically incompotible formats?
|
![]() |
by Remy Porter on (#2KQ2P)
Tony Hoare has called null references his “billion dollar mistakeâ€. Dealing with nulls and their consequences have created a large number of bugs, and eaten a lot of developer time. It’s certainly bad enough when you understand nulls and why they exist, but Benjamin Soddy inherited code from someone who absolutely didn’t.First, there’s our new type, the ByteBool:
|
![]() |
by Ellis Morning on (#2KETK)
|
![]() |
by Jane Bailey on (#2KBBN)
Monday morning, 10:00AM. As per usual, today's protagonist, Merv, got some coffee and settled in for his usual Monday morning routine of checking Facebook and trying to drag his brain into some semblance of gear. As he waited, the least interesting conversation ever floated to his ears from the hallway:"It's like, yak butter, I guess? I put it in my coffee, it's supposed to do wonders."
|
![]() |
by Mark Bowytz on (#2K2T4)
"Since clicking 'Yes, I mind', took me to the review page, I left a one star review," writes Pascal.
|
![]() |
by snoofle on (#2JZ96)
We've all been approached for jobs where the job description was merely an endless list of buzzwords across disciplines, and there was no real way to figure out what was actually the top couple of relevant skills. The head hunter is usually of no help as they're rarely tech-savvy enough to understand what the buzzwords mean. The phone screen is often misleading as they always say that one or two skills are the important ones, and then reject candidates because they don't have expertise in some ancillary skill.Teddy applied for a position at a firm that started out as a telco but morphed into a business service provider. The job was advertised as looking for people with at least 15-20 years of experience in designing complex systems, and Java programming. The phone screen confirmed the advert and claims of the head hunter. "This is a really great opportunity," the head hunter proclaimed.Then it was time for the interview. The interview was the sort where you meet with the manager, a peer of the manager, and several senior members of the team, repeating your work history for each one.There was a coding exercise to see if you could convert an int to a Roman numeral and vice versa.Each person asked some simplistic architectural design type questions...
|
![]() |
by Remy Porter on (#2JVAW)
Cédric runs the backend for a video streaming service. Since video streaming, even in modern HTML5, is still a bit of a mess, they have to be able to provide many different stream formats. So, for example, the JSON data might look like this:
|
![]() |
by Ellis Morning on (#2JQGC)
In the mid-90s, Darren landed his first corporate job at a company that sold IT systems to insurance brokers. Their software ran on servers about the size of small chest freezers—outdated by the 70s, let alone the 90s. Every month, they'd push out software fixes by sending each customer between 3 and 15 numbered floppy disks. The customers would have to insert the first disk, type UPDATE into the console, and wait for "Insert Disk Number X" prompts to appear on screen.It wasn't slick, but it worked. The firm even offered a recycling service for the hundreds of disks that eventually built up at customer sites.While working there, Darren became unfortunately well acquainted with one particular insurance broker, Mr. Lasco. The man refused all offers of training ("Too expensive!") and paid support ("You don't know enough!"), and was too good to read instructions, but could always be counted on to tie up some poor tech support rep's phone every time a new update went out. He never let them charge the call against his company's account, or even thanked anybody for the help. When told about it, management just shrugged their shoulders. Mr. Lasco's firm did have a big contract with them, after all.Early one Monday morning, Darren answered his phone, only to receive an ear-splitting tirade. As Mr. Lasco ranted, Darren held in a sigh and used the time to start filing a support ticket."What's the nature of your problem, sir?" he asked during the gap in which Mr. Lasco paused to breathe."I—it's—your damn update won't work! Again!" Mr. Lasco sputtered. "My machine is full!"Darren frowned. That wasn't an error message that the update process would ever throw. "'Full?' Hmm, maybe one of the server's hard drives is out of disk space? Maybe you need to—""No, you fool, it's full! It's FULL!" Mr. Lasco snapped. "I KNEW this would happen eventually! Do you know how much money I'm losing right now with this thing down? I want one of your people to come out here and fix this immediately!"The demand prompted an eyeroll from Darren, who already knew Mr. Lasco would never pay for a consultant's time. Still, this was a perfect way to get him off the phone. "Why don't I forward you to your sales rep?"To Darren's amazement—and pity—a software engineer was dispatched within the hour to drive several hundred miles to Mr. Lasco's site, with instructions to call Darren with updates.By late afternoon, the call came. The engineer was laughing so hard, he couldn't talk."Is everything OK?" prompted Darren."Wait'll you hear this." The engineer struggled to breathe. "There's a gap in the server casing. All this time, Lasco's been inserting update disks into the server, and couldn't force any more in. I popped the case open, and swear to God, there must be a few hundred disks crammed in there, easy. Years of updates!"Darren joined in the mirth, but it was short-lived. The poor engineer had to spend 7 hours onsite carefully extracting floppy disks wedged between drives and memory cards, sorting them, then applying the updates in order.The one silver lining to the whole affair was that Mr. Lasco never called them again.[Advertisement] Manage IT infrastructure as code across all environments with Puppet. Puppet Enterprise now offers more control and insight, with role-based access control, activity logging and all-new Puppet Apps. Start your free trial today!
|
![]() |
by Remy Porter on (#2JKYD)
In the Star Trek episode, “A Piece of the Actionâ€, Kirk and his crew travel to Sigma Iotia II, a planet last visited before the Prime Directive of non-interference existed. Well, they left behind a book, Chicago Mobs of the Twenties, which the Iotians took as a holy guide, to be imitated and followed even if they didn’t quite understand it, a sort of sci-fi cargo-cult. Cue the crew of the Enterprise being threatened with Tommy Guns and guys doing bad Al Capone impressions.Michael’s co-worker may have fallen into a similar trap. An advanced developer came to him, and gave him a rule: in PHP, since variables may be used without being declared, it’s entirely possible to have an unset variable. Thus, it’s a good practice to check and see if the variable is set before you use it. Normally, we use this to check if, for example, the submitted form contains certain fields.Like Bela Okmyx, the “Boss†of Sigma Iotia II, this developer may have read the rules, but they certainly didn’t understand them.
|
![]() |
by Mark Bowytz on (#2JDA1)
"I too have always felt that discount codes are a great way to express sympathy," writes Shawn A.
|
![]() |
by Remy Porter on (#2JAFG)
Microsoft’s C# has become an extremely popular language for “enterprise†development, and it’s sobering to think that: yes, this language has been around for 15 years at this point. That’s long enough for the language to have grown from a “sort of Java with reliability, productivity and security deleted.†(James Gosling, one of the creators of Java) to “sort of Java, but with generics and lambdas actually implemented in a useful way, and not completely broken by designâ€.15 years is also more than enough time for a project to grow out of control, turning into a sprawling mass of tentacles with mouths on the ends, thrashing about looking for a programmer’s brain to absorb. Viginia N is currently locked in a struggle for sanity against one such project.Some of the code looks like this:
|
![]() |
by snoofle on (#2J7KD)
A long, long time ago when C was all the rage and C++ was just coming into its own, many people that were running applications on Unix boxes used the X-Windowing system created by MIT to build their GUI applications. This was the GUI equivalent of programming in assembly; it worked, but was cumbersome and hard to do. Shortly thereafter, the Xt-Intrinsics library was created as a wrapper, which provided higher level entities that were easier to work with. Shortly after that, several higher level toolkits that were even easier to use were created. Among these was Motif, created by DEC, HP, etc.While these higher level libraries were easier to use than raw X-lib, they were not without their problems.Sam was a senior developer at Military Widgets, Inc. His responsibilities included the usual architectural/development duties on his project. One day, Pat, Sam's boss, asked him to stay late. "Taylor has a bug that he just can't crack," Pat explained. "I want someone with a little more experience to give him a hand."It seems that after making some changes to their Motif GUI, the application started throwing stack dumps on every transaction. As a result, every transaction was rolling back as failed. Taylor insisted that his code was correct and that it was not the cause of the problem. To this end, Pat asked Sam to stay late one afternoon and take a look at it.After some company-sponsored pizza, Pat had Taylor hand Sam a stack trace. In the middle of it was a call to:
|
![]() |
by Remy Porter on (#2J3QQ)
There’s plenty of bad code that makes you ask, “what were they thinking?†There’s a whole bunch of code we get, however, that doesn’t even raise that question- the programmer responsible simply wasn’t thinking. Today, let’s examine a few “programmer brain-fartsâ€. We turn our attention first, to Jim C.While reviewing some unit tests, he found this line:
|