Recent Articles

Jul 2015

No Color? No Problem!

by in Error'd on

"Samsung's printer technology must really be something," writes Tim, "A black and white printer able to output a full color photo?! Who knew!"


If You Want To

by in Coded Smorgasbord on

We pick on date handling code a lot here, simply because there are so many ways to mess up date related code (because dates are hard). In a way, it’s almost like we’re cheating. Even smart programmers could mess that up. What about basic conditional logic? How hard could that be to mess up?

Well Jan L. came across this solution to a simple boundary check- if telegramType is between 100 and 199, it is a payment type telegram.


What's The Password?

by in Feature Articles on

DigitalUNIX

"So, first day, huh?"


You've Got My Number

by in CodeSOD on

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.

We're All Admins Here

by in Feature Articles on

Ciberlinux-desktop-screenshot

Will, his boss Rita, and Nick from HR huddled around a conference room speakerphone, listening to their new marching orders from the giant company that’d just bought out their small 100-person shop. Big changes would be avalanching down from Corporate over the next several months. For the moment, they were going over the modifications required to be compliant with their new overlords’ IT policies.


What is this 'Right Click' You Speak Of?

by in Error'd on

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


Patterned After Success

by in CodeSOD on

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.


Finding Closure

by in Feature Articles on

Jim’s mail client dinged and announced a new message with the subject, “Assigned to you: TICKET #8271”. “Not this again,” he muttered.

Ticket #8271 was ancient. For over a year now, Initech’s employees had tossed the ticket around like kids playing hot potato. Due to general incompetence and rigid management policies, it never got fixed.


The New Zero

by in CodeSOD on

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");

Brillance is in the Eye of the Beholder

by in Feature Articles on

“E-commerce” just doesn’t have the ring it once did. The best-qualified hackers in the world used to fall all over themselves to work on the next Amazon or eBay, but now? A job maintaining the back-end of an online store isn’t likely to lure this generation’s rockstar ninja coderz, which explains why Inicart ended up hiring Jay.

As far as Colleen could tell, her boss had been trying to add a developer to their team for at least a year. Scott was always on his way to interviews, second interviews, phone screens, and follow-up Skype calls… but summer turned to autumn turned to Christmas, and Inicart’s dev team returned from the holidays to find only their waistbands had increased in size. But then came the day Colleen walked in to find the long-empty cubicle next to hers brimming with a brand-new task chair and workstation. She ran down the hall.


Error Version 16

by in Error'd on

"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.


Bonus WTF: 5:22

by in Feature Articles on

No, it isn't an extended cut of a John Cage song, it's a new feature article that we put together- but you can't read it here, you can only read it over at our sponsor site: 5:22.


Experience Your Own Support Stories at Inedo

by in Announcements on

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.


Truely Representative

by in Representative Line on

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.

$dtRecord->setProcessing((boolean)'true');
Korean Traffic sign (Pass Left or Right)

The Batman

by in Feature Articles on
    Na, na, na, na, na, na, na, na, 
    Na, na, na, na, na, na, na, na, 
    Na, na, na, na, na, na, na, na, 
    Batman!

We've all heard it. Some of us even grew up when it was first aired on TV. Be honest, who among us, hasn't experienced just a little bump in cardiac rate when the Batmobile fired up?


Pointerrific

by in CodeSOD on

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?


Loafing Around

by in Feature Articles on

Sliced bread bag2

Dateline: Friday, 1:00pm


Classic WTF: Mandatory Fun

by in Mandatory Fun Day on
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!


Classic WTF: XML Abuse

by in CodeSOD on

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).


Classic WTF: A Temporary Problem

by in Feature Articles on
This classic is a perfect example of what happens when you outsource IT functions. You get some short-term, temporary gains, but you'll always lose in the long run.

This one originally ran back in 2014, but it's already a classic. - Remy

Andy Dahl had suffered his share of delays at the hands of the NonLocal HelpDesk, but usually they were simply a matter of insurmountable language barriers or inexplicable delays. Today the threat was somewhat more sinister...

HelpDesk, NonLocal [14:13]: 
regarding your computer slowness issue
share the screen

**SCREEN SHARING INITIATED BY Dahl, Andy** [14:14]

HelpDesk, NonLocal [14:17]: 
give me control 

**SCREEN CONTROL INITIATED BY Dahl, Andy** [14:18] 

Dahl, Andy [14:23]: 
S%Topt
S%TOP
%

**SCREEN CONTROL TERMINATED BY Dahl, Andy** [14:23]

HelpDesk, NonLocal [14:24]: 
do shift+ delete
i am unable to do it form here

Dahl, Andy [14:25]: 
what are you trying to delete?

HelpDesk, NonLocal [14:25]: 
its a temporary files

Dahl, Andy [14:25]: 
You can't delete all those files you selected.
They are not all temp files.

HelpDesk, NonLocal [14:26]: 
they are

Dahl, Andy [14:26]: 
No. They are not all temp files. Just because something has the letters 'temp' in it does NOT mean it is a temp file.
MasterOrderTemplate.xml, CoreTemperatureController.cpp, and UpdateTemporaryJobPostings.SQL are resource that I NEED. They are NOT temp files.

HelpDesk, NonLocal [14:27]: 
while we run this search
(.*temp.*)
we will get only the temp files

Dahl, Andy [14:27]: 
No. You will get every file that has the letters 'temp' in the file name. Not all of those are temp files.

HelpDesk, NonLocal [14:27]: 
No
not like that
what happens is temp files are system generated it should not be the original file that you have on the folders in order to resolve the issue i need to delete it even the next level will do the same

Dahl, Andy [14:30]: 
With all due respect, I'm sorry but I can't allow you to delete those files. Not all of them are temp files.

HelpDesk, NonLocal [14:30]: 
alright
i will assign this ticket to next level


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

by in Tales from the Interview on
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.


Classic WTF: Long Distance DATE$ing

by in Feature Articles on

The Fourth of July was this weekend, and this is the perfect time for us to have our little Summer Vacation. For this week, sit back, enjoy some nice weather along with some Classic WTFs (nice weather not guaranteed, definitions of "nice" may vary from user to user).

This story originally ran in 2006, and is one of those examples where we let the submitter speak for themselves. - Remy


Mot did a pretty good job in telling this tale of Long Distance DATE$ing, so I'll just turn it on over to him ...


A Defined Sense of Taste

by in Error'd on

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


I'm Not Married to the Idea

by in News Roundup on

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.


Mistakes Were Made

by in CodeSOD on

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: