Recent Articles

May 2017

Dot-Matrix Ragnarok

by in Feature Articles on

Fresh out of college and out of money, Johan K. started work at Midgard Manufacturing as a junior developer. His supervisor Ragna made it clear: he would only be responsible for coding error handlers.

“Our plant equipment is several decades old,” she said, “and we have to rely on the manufacturer-provided documentation for adequate coverage. To be honest, none of the senior developers want to bother. So instead of bothering one of them, you’ll be doing it.”


Flubbed Buzz

by in CodeSOD on

Interviewing developers always poses a challenge. You can’t rate their skills at writing code without seeing them write code, and most of the code they’ve written probably belongs to someone else. Writing anything non-trivial takes time, which both the candidate and the interviewer may not be willing to spend. Even then, it’s not always representative. And let’s not even talk about whiteboard programming.

Douglas’s company makes a compromise- they’ll give a time-boxed programming challenge. A developer is given two hours, access to the Internet, and a moderately complex problem. A smart developer might make some mistakes on the trickier parts of the problems, which is great, because it doesn’t fail them- it shows how they think. One candidate, Steve, never quite got that far.


Classic WTF: Time for a tblHoliday

by in CodeSOD on
It's a holiday in the US today, which tracking the dates on which holidays fall is always a complicated, fraught proposition. Let's dig back into the archives for a classic article which can help us celebrate this holiday. This article originally ran waaaaaay back in 2006. --Remy

For most, the New Year is great occasion: not only is it kicked off with a big bash, but it's so easy to trick yourself in feeling like you have a "clean slate", setting all sorts of great goals and resolutions, and just all-around feeling good. But for some programmers, like Dave Sussman, it's not so joyous of an occasion; each change of the year is like a mini-Y2K. These programmers are the guys who get to maintain systems with comments like ...


The Developer Test

by in Error'd on

"Apparently, if AMEX's site knows that you're a developer, it will present a REGEX challenge before allowing you to reset your password," Jim wrote.


Icon on Fire

by in Feature Articles on

Tim joined a company that provided a SaaS solution for tracking attendance and grades in schools. The job was mostly minor updates to a ColdFusion application, although there was an active project to replace it with something more modern. Tim felt like half of his hiring was based on him knowing when to throw out buzzwords like SPA or REST or Reactive Programming.

The fire emoji, as an image.

“It’s not the first time,” Karmen explained. She’d been with the company for some time. “When I joined, they had just upgraded to ColdFusion from a VBA hack on Microsoft Access. Crazy days, back then, when the whole ‘selling service, not software’ thing was new. Sometimes, I think I was hired because I knew the right buzzwords.”


Lucee Execution

by in CodeSOD on

I Love Lucy title

Recently, at my dayjob, I had a burning need to understand how scheduled tasks work. You see, we've recently switched from Adobe Coldfusion to Lucee, and I was shaky on how Adobe did things before, so I wanted a deeper understanding of how the code I was working on would be executed. For the uninitiated, Lucee is an open-source reimplementation of Cold Fusion. And that's not the WTF.


Take the Bus

by in Feature Articles on

Rachel started working as a web developer for the local bus company. The job made her feel young, since the buses, the IT infrastructure, and most of their back-office code was older than she was. The bus fare-boxes were cash only, and while you could buy a monthly pass, it was just a little cardboard slip that you showed the driver. Their accounting system ran on a mainframe, their garage management software was a 16-bit DOS application. Email ran on an Exchange 5.5 server.

Translink-B8017


Hard Reboot

by in CodeSOD on

Every day in IT, each one of us walks the fine line between "brilliant" and "appalling." We come across things that make our jaws drop, and we're not sure whether we're amazed or horrified or both. Here's a PHP sample that Brett P. was lucky—or unlucky—enough to discover:


The Maybe Compiler

by in Error'd on

"Maybe it it compiled...maybe it didn't. I guess that I have to find out myself from here on out," wrote, Y. Diomidov.


The Smell-O-Vision

by in Feature Articles on

Ron used to work for a company which built “smell-o-visions”. These were customized systems running small form factor Windows PCs that operated smell pumps and fans using USB relays timed to a video to give a so-called “4D Experience.” Their product was gimmicky, and thus absolutely loved by marketing groups.

One such marketing group, whose client was a branch of the military, worked with them to create a gimmick to help with recruiting. A smell-o-vision was installed on a trailer and towed around the country, used to convince teenagers to join the service by making them smell fresh-squeezed orange juice while watching a seizure-inducing video with guns. The trailer was staffed by grunts, and these guys cycled through so frequently that they received little or no training on the system.

A vintage ad for a smell-o-vision film called 'Scent of Mystery'

Your Private Foursome

by in Bring Your Own Code on

Last week, I shared some code that, while imperfect, wasn’t that bad. I then issued a challenge: make it worse. Or better, if you really want. As many comments noted: one case covers only the first iteration of the loop, and one case only covers the last iteration of the loop. You could easily pull those out of the loop, and not need a for-case at all. Others noticed that this pattern looked like odd slices out of an identity matrix.

With that in mind, we got a few numpy, Matlab, or MatrixUtils based solutions generally were the “best” solutions to the problem: generate an identity matrix and take slices out of it. This is reasonable and fine. It makes perfect sense. Let’s see if we can avoid making sense.


The New Manager

by in Feature Articles on

Error Message Example vbs

She'd resisted the call for years. As a senior developer, Makoto knew how the story ended: one day, she'd be drafted into the ranks of the manager, forswearing her true love webdev. She knew she'd eventually succumb, but she'd expected to hold out for a few years before she had to decide if she were willing to change jobs to avoid management.


Documented Concerns

by in CodeSOD on

There’s a lot of debate about how much a developer should rely on comments. Clear code should, well, be clear, and thus not need comments. On the other hand, code that’s clear the minute you write it might not be as clear six months later when you forget what it was for. On the other, other hand, sometimes a crime has been committed and we need the comments for a confession.

Austin S confesses his crime.


Just Buttons

by in Error'd on

"What do you think the buttons do? If you thought the dialog was trying to help you log in or give an opportunity to send them an e-mail, instant message, or tweet pointing out how the buttons don't do anything, you might be mistaken," writes Alex M., "


A Naughty Bot

by in Feature Articles on

Ambox warning yellow

As many of you know, outside of being a writer, I also work on open-source projects. The most famous of these is Sockbot, a chatbot platform that interfaces with various forum and message clients. If you're reading this, my boss didn't object to pointing out that my work has never made this particular mistake—but maybe we'd be more famous if we had.


A Foursome of Arrays

by in Bring Your Own Code on

So, fun fact about myself: I didn’t know what the For-Case anti-pattern was until relatively recently, when there were a spate of articles condemning it as an anti-pattern. I’m sure I’ve probably used it, at some point, but I never knew it by name. It’s thought of as a textbook antipattern that generally implies a misunderstanding of for loop, case statements, the problem being solved, or some combination of all three. That said, there are certain problems that might be more clear to solve by using the For-Case. Like GOTO, it might be harmful, but its actual evil exceeds its reputation.

John A had a problem, and most unfortunately for him, this problem involved VBA macros embedded in an Excel spreadsheet. He needed to generate four arrays, that fall into this pattern:


How to Start Freelance Programming

by in Sponsor Post on

This article originally ran on Hired's blog. For more posts like these, and great career insights, join Hired. I chose to run this article here because, well- this is what I do these days. Freelance training, consulting, and development, and I've had the good fortune of connecting with some folks who do most of the sales work for me. That said, if anybody knows of these $1,000/hr jobs that the article mentions, point me in their direction!

Find out more by following their blog, or jumpstart your career by joining Hired today

-- Remy
By Brenna Flores

Where in the World Is Our Website?

by in Feature Articles on

It was a particularly irritating Monday morning, when Travis got a frantic text from his boss. The sun was shining, the birds were nattering, and everyone was greeting him with a smile; it was like everyone in the world had their coffee, but Travis overslept and was going to have to satisfy himself with whatever sludge he could scrape out of the office coffee maker. He had just crossed the threshold when the text arrived:

WEBSITE GONE. WHERE R U?


Strongly Bad Emails

by in CodeSOD on

If you want to send emails from a Java program, you might be tempted to use the javax.mail package, which contains objects for doing exactly that. It’s a relatively straightforward API, and while it’s a bit verbose, that’s hardly unusual for Java. You just wrap it up in a convenience function based on how you need to call it, and reuse that, right?

Well, PHP, an obviously superior language, already did that work. There’s a built-in mail function, which sends emails. It uses your php.ini file to figure out what SMTP service to use, making the parameters to the function more “obvious”.


Outage to the Max!

by in Error'd on

"When Google's having an outage, and it's also affecting their outage notification service, things are NOT going well" writes Nathan.


On Punctuation

by in CodeSOD on

Have you ever fallen asleep on your keyboard? Aside from the awkward face-prints it leaves behind, did you notice yourself programming in your sleep? I suspect that Chris’s co-worker does sleep-program. At least, that’s the only explanation for the 7,088 line code-sample I’m about to show you. Don’t scroll too fast- there’s actual code mixed into the middle of this. And yes, I’m including all of the code.

Which is less than you’d think, from the line count.


Basic Manners

by in Editor's Soapbox on
As someone who's been accused of "not being a team player" because I had the temerity to say, "No, I can't come in on short notice on a day I've called off, because I'm busy,", Snoofle's rant struck a nerve. I lend him the soapbox for today. -- Remy

When you're very young, your parents teach you to say please and thank you. It's good-manners 101. Barking give me ..., get me ... or I want... usually gets you some sort of reprimand. Persistent rudeness yields reprimands of increasing sternness such as no dessert, no TV, etc. Ideally, once learned, those manners should follow us into the grown-up world.

The cover of Miss Manners' Guide for the Turn-Of-The-Millenium

Should.


Robotic Implementation

by in CodeSOD on

Pearl’s employer couldn’t find an off-the-shelf product that handled their call-center needs, so they developed one in house. One department didn’t want to use that front-end, so they developed a different one in house, but it still used the same backend… mostly. Another group did the same thing, adding some fields and extending the database. And then another.

Then there was an organizational restructuring, and suddenly the call-center reps found themselves in the annoying position of needing to do double- or sometimes triple-entry, in order to get all the right columns and fields filled out based on the current business rules.


Do While False

by in Feature Articles on

Carolina Cyclone (Double Loop)

It was early in Seth's tenure at PicoServices Inc. when he first heard about Joe.