Recent Articles

28 Jul 2015

You've Got My Number

by Jane Bailey in CodeSOD on 2015-07-28

Luftballons Hannover

Today's snippet needs very little introduction. In the words of the submitter:

[My predecessor] is what I would consider, among the worst programmers in the world. While his programs actually do work and do what they should, his techniques and programming decisions are very questionable. The [below] code snippet is from a program he wrote after he spend about a year at this company.

27 Comments - Last Comment @ 22:19
27 Jul 2015
24 Jul 2015

What is this 'Right Click' You Speak Of?

by Mark Bowytz in Error'd on 2015-07-24

"What makes this worse is that this wasn't an edge case," wrote Roger, "I only right-clicked in the body of an email."

0 Comments - Last Comment @ 20:33
23 Jul 2015

Patterned After Success

by Remy Porter in CodeSOD on 2015-07-23

Design patterns are more than just useless interview questions that waste everyone’s time and annoy developers. They’re also a set of approaches to solving common software problems, while at the same time, being a great way to introduce new problems, but enough about Spring.

For those of us that really want global variables back in our object oriented languages, the Singleton pattern is our go-to approach. Since it’s the easiest design pattern to understand and implement, those new to design patterns tend to throw it in everywhere, whether or not it fits.

79 Comments - Last Comment @ 2015-07-24
22 Jul 2015
21 Jul 2015

The New Zero

by Remy Porter in CodeSOD on 2015-07-21

If Alice needed to rate her co-workers, on a scale of 1–10, whoever wrote this is a zero. The goal here is to create a new string that is 4096 characters long and contains only zeros. This was the best approach Alice’s co-worker found:

string s = new String("0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000");

150 Comments - Last Comment @ 12:46
20 Jul 2015
17 Jul 2015

Error Version 16

by Mark Bowytz in Error'd on 2015-07-17

"I was filling out a survey for PayPal when this message popped up to let me know that I am at a testing stage," Ishai S. writes.

40 Comments - Last Comment @ 2015-07-20
16 Jul 2015
16 Jul 2015

Experience Your Own Support Stories at Inedo

by Alex Papadimoulis in Announcements on 2015-07-16

Support stories have always been among some of my favorite. Not enough links for you? Here, I'll just share my favorite favorite: Radio WTF Presents: Quantity of Service.

It's not so much the sense of smug superiority that comes with diagnosing ID-10t and PEBCAK errors, but more a sense of appreciation. I've been there — my first grown-up job was on a helpdesk — and to this day I still handle a fair bit of BuildMaster and ProGet support inquiries. And actually, that's why I'm writing this message today.

17 Comments - Last Comment @ 2015-07-23
16 Jul 2015

Truely Representative

by Remy Porter in Representative Line on 2015-07-16

There’s bad code, and then there’s code so bad that you only need to see one line of code to understand how bad it actually is. Simon supplied this tiny horror which manages to combine all that’s wrong with PHP with the worst of loose typing and a thick layer of not really understanding what you’re doing.

Korean Traffic sign (Pass Left or Right)

94 Comments - Last Comment @ 2015-07-21
15 Jul 2015
14 Jul 2015


by Maciej Stachowski in CodeSOD on 2015-07-14

Rusted chain

Working with a legacy codebase is like embarking on an archaeological expedition to a foreign land: you never know what ancient artifacts you're going to uncover. Will it be the mighty fast inverse square root? The rusty yet still operational Duff's device? An old COBOL module forgotten by time, quietly holding the universe together?

104 Comments - Last Comment @ 2015-07-27
13 Jul 2015
10 Jul 2015

Classic WTF: Mandatory Fun

by Mark Bowytz in Mandatory Fun Day on 2015-07-10

It's hard to believe that it's been 7 years since the last installments of MFD. Mark's been too busy doing art for things like Release! to waste his artistic talents here with us. From back in 2008, I've grabbed a few of my personal favorites from the old MFD days. --Remy

I'm a sucker for terrible puns, so I love these. But, if you scroll back through the comments on those old articles (back in Community Server!), some of our readers had a slightly different attitude. This Viking lays out our editorial stance on that!

41 Comments - Last Comment @ 2015-07-14
09 Jul 2015

Classic WTF: XML Abuse

by Jake Vinson in CodeSOD on 2015-07-09

Is it still trendy to hate on XML? Of course it is! But this WTF would still be a WTF if it were built in JSON, because this is terrible.

This classic comes from 2008, but finding WTFs in XML knows no decade. - Remy

"Where I work we keep a lot of data stored in XML files," Ben writes. "They're not your average XML files, though — they're special." His colleague invented the following technique (recommended for senior level XML programmers only).

19 Comments - Last Comment @ 2015-07-14
08 Jul 2015
07 Jul 2015

Classic WTF: Trouble With Founders, the Lost Candidate, and More

by Mark Bowytz in Tales from the Interview on 2015-07-07

I think Tales from the Interview are always a special treat, in part because we don't run them very often. It may also be because at my last job, I was notorious for once making a candidate cry and have a panic attack, but I'm an incredibly nice interviewer! I swear!

Enjoy this veritable smorgasbord of terrifying interviews from 2012. - Remy

Trouble with Founders (from Ben C.)
A few of my friends (all CS people) were attending a startup mixer hosted at a little airport near our university. At one point, we all got kind of bored of talking with everyone, so we stepped outside to look at the planes. Soon enough, some business people in suits noticed the nerds talking outside so slowly started approaching.

They started talking with us, trying not to be too obvious about their intents. They asked where we were from and we told them our college. We asked what brought them here, and they said they were starting a company. We asked what it was for and they responded "Data Analytics". At this point, we were a little curious, so we tried to get some more information, and then they gave us their wonderful pitch.

119 Comments - Last Comment @ 10:56
06 Jul 2015
03 Jul 2015

A Defined Sense of Taste

by Mark Bowytz in Error'd on 2015-07-03

"This was in the appetizers section. I wonder if they do 1920x1200 for an entree," wrote Semaj.

33 Comments - Last Comment @ 2015-07-05
02 Jul 2015

I'm Not Married to the Idea

by Remy Porter in News Roundup on 2015-07-02

A bit more than 15 years ago, the software industry was barreling straight into a crisis: the dreaded Y2K bug. Vital software was going to fail in odd ways, banks weren’t going to handle transactions, planes weren’t going to fly, nuclear reactors weren’t going to react, cats and dogs living together, mass hysteria, real wrath of God type stuff.

The software industry rallied, software got patched, and at the stroke of midnight, not much actually happened. Over the past week, a different bug has been keeping a small pool of software developers up at night. Welcome to the world of Y2Gay.

235 Comments - Last Comment @ 2015-07-13
01 Jul 2015

Mistakes Were Made

by Remy Porter in CodeSOD on 2015-07-01

As a general rule, “dead code” should never be commented out, but instead, should be replaced. If you ever need to review the history, source control contains that information.

But sometimes, the “I’ll just comment it out” lets us see the moment of realization, when a developer discovers that they’ve done the absolute wrong thing. Clara sends us this:

90 Comments - Last Comment @ 2015-07-12