Recent Articles

Apr 2017

This Hits an Association

by in CodeSOD on

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:


A Lost Voice

by in Feature Articles on

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.

Laryngitis: a diagram of the larynx and its inflammation 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.


Identifying the Globally Unique

by in CodeSOD on

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?


When Good Dev Tools Go Bad

by in Error'd on

"I'd say that this brings new meaning to what a 'core dump' really is," Paul N. writes.


ByteBool

by in CodeSOD on

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:


When Computers Fly

by in Feature Articles on

In the Before Times, the Ancients would gather in well-sheltered caverns, gather to themselves foods blessed by the gods, drink strange, unnaturally colored concoctions, and perform the Rite of the LAN Party.

In the era when the Internet was accessed by modem, to have any hope of playing a game with usable latency, you had to get all the players in the same place. This meant packing up your desktop in a car, driving to your friend’s house, and setting up your computer on whatever horizontal surface hadn’t already been claimed by another guest.


The Wrong Sacrifice

by in CodeSOD on

pentacle




Folks, you need to choose a different sacrificial animal for your multithreading issues. Thanks to this comment Edward found in a stubborn bit of Java code, we now know the programming gods won't take our goats.


What Equals Equals

by in Feature Articles on

Lemon velvet pudding

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:


Would You Mind?

by in Error'd on

"Since clicking 'Yes, I mind', took me to the review page, I left a one star review," writes Pascal.


All You Zombies…

by in Feature Articles on

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.

A sign, dated March 9, 1982, welcoming travelers from the future

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.


print_a_idiot()

by in CodeSOD on

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:

{"DASH":"https:\/\/anonymised-wtfdash.akamaihd.invalid\/path\/to\/film.mpd",
"HLS":"https:\/\/anonymised-wtfhls.akamaihd.invalid\/path\/to\/film.mp4\/master.m3u8",
"PD":"https:\/\/anonymised-wtfpd.akamaihd.invalid\/path\/to\/film.mp4"}

My Machine Is Full

by in Feature Articles on

Close-up photo of a 3.5-inch floppy disk

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.


A Piece of the Variable

by in CodeSOD on

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.


Our Deepest Regrets (and 20% off your next purchase)

by in Error'd on

"I too have always felt that discount codes are a great way to express sympathy," writes Shawn A.


An Extinction Event

by in CodeSOD on

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.


By the Book

by in Feature Articles on

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.


Cerebral Flatulence

by in Coded Smorgasbord on

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:


Radio WTF: Space for Guests

by in Feature Articles on

Radio WTF Presents!

Jump to transcript

Welcome back to Radio WTF. This week, we visit a two kilometer wide mushroom in space, and find out WTF happens when unexpected guests arrive...

2001-A Space Odyssey Space Station

Soundcloud Links: Radio WTF: Space for Guests