Recent Articles

Jul 2016

Quantification of Service

by in Error'd on

"So, do I enter a number 0 to 65,535 or −32,768 to 32,767? What if my experience wasn't an integer? This is a really technical question for applying at a restaurant," writes Brennan.


Exit Thread

by in CodeSOD on

Objects left in the garage or the attic tend to multiply. If you don’t clean them regularly, you find mysterious and inexplicable things have bred like rabbits. “Why is there a bag of marbles in this box, and when did I ever buy an ugly Christmas sweater?”

Without regular refactoring, the same thing can happen to your code-base. Michal is finally taking a look at a bit of code that hasn’t been touched since 2001. The original developer has left the company, there’s no documentation, and the SVN history has long since been discarded.


The Inner JSON Effect

by in Feature Articles on

Jake eagerly stepped into his new job, grateful for more experience and new challenges, craving to learn new software stacks and see what his new company had to teach him about the world of software.

They told him he’d be working on some websites, dealing with JavaScript, Node.js, JSON, and the like. It sounded pretty reasonable for web development, except for the non-technical interviewer’s comment that it was all “built on top of Subversion” which he assumed was a simple misunderstanding.


It's Log, Log, Log

by in CodeSOD on

Logarithm keys

Reader Bernie submits for our approval this wonderful C# log base 2 implementation. He says: “We can distinguish two halves in that code. It looks like it was originally written for an unsigned 16-bit int, and later on extended for signed 32-bit integers.”


The Missing Source

by in Feature Articles on

Source code project 1171

The year was 2006. Nelly Furtado was getting promiscuous, the Winter Olympics were in Italy, and Domino was an application developer for Rocketware, a company that produced multimedia applications. Back then, applications were still commonly distributed on CD-ROMs: small round disks of plastic that contained grooves that could be read by a specialized laser and interpreted as data. This was handy in a period when only 30% of Americans had broadband Internet.


Wait...Press What?!

by in Error'd on

"Um, I'm not sure the programmers and the engineers were working together on this one," wrote Rob.


The Keys to Cloud Storage

by in Feature Articles on

When you want to store data in Amazon’s S3 cloud-based storage, you have to assign that data a key. In practice, this looks and behaves like a filename, but the underlying APIs treat it like a key/value store, where the value can be a large data object.

S3 is flexible and cost-effective enough that Melinda’s company decided to use it for logging HTTP requests to their application. These requests often contained large data files for upload, and those files might need to be referenced in the future, so a persistent and reliable storage was important.


Not A Fan

by in Feature Articles on

Red computer cooling fan

Larry worked in the IT department of a medium-sized financial company. Bright and early on what should have been a promising day, the phone rang. Larry cursed the caller ID for informing him that Graham was on the line. The resident old man of the office and bane of IT, he frequently disregarded sound advice and policy to satisfy his own whims.


OhgodnoSQL

by in CodeSOD on

How about those NoSQL databases, huh? There’s nothing more trendy than a NoSQL database, and while they lack many of the features that make a traditional RDBMS desirable (like, um… guaranteeing writes?) , they compensate by being more scalable and easier to integrate into an application.

Chuck D’s company made a big deal out of migrating their data to a more “modern”, “JSON-based” solution. Chuck wasn’t involved in that project, but after the result went live, he got roped in to diagnose a problem: the migration of data from the old to the new database created duplicate records. Many duplicates. So he took a look at the migration script, and found piles of code that looked like this:


Optimizing the Backup

by in Feature Articles on

Leslie, head of IT at BlueBox, knew there was trouble when one of her underlings called her at 3AM. “The shared server’s down,” she said. “Disk failure. Accounting can’t issue invoices, design can’t get to its prototypes, and the CEO just lost his PowerPoint for next week’s conference speech.”

BlueBox, like many companies, kept many important documents on a shared server. It also held personal directories for every employee, and many (like the CEO) used it to store personal files. That data, totaling 100 GB, was backed up to a remote server every 24 hours. “Okay, swap out the disk and restore it.”


A Case of Mistaken Identity

by in Error'd on

"Wow, even Google doesn't understand the current mess that is British politics," writes Mike R.


The Not-So-Highly-Paid Consultant

by in Feature Articles on

Consulting. It's as much art as science. You apply for a job to create/change some system, and need to bid an amount that not only covers your time, but leaves a little something extra in your pocket. Of course, we all know that requirements are never absolute, or even well thought out. As such, you need to build some extra cost into your bid to take this into account. Build in too much and you will be overpriced and not get the job. Build in too little and you will be under-priced and get the job at what will inevitably become a loss.

Writing a contract that restricts the work to a specific list of features is nearly impossible because nobody ever thinks through what they want in advance (think about your last outsourced project). Given that, you need to be skilled at letting the client know that you will be nice and implement tiny things that are not in the spec for free, but anything that is outside the contract spec and takes any real time will be at an added cost (the art of saying no: why yes, we can add that feature, but it will take x weeks at a cost of y).


Lunatic Schema-tic

by in CodeSOD on

One day, James’s boss asked him to take a look at a ticket regarding the “Cash Card Lookup” package, which had an issue. James had no idea what that was, so he asked.

“I don’t know,” his boss replied. “I just know the call center uses it. You’ll need to talk to them.”


A Song of API And Fire

by in Feature Articles on

Mapoffantasyland

Emily didn't expect much excitement at her day job. She worked for a health insurance company, so most of her projects were pretty routine enterprise-level things: hooking up the accounting software to the billing software, managing mailing lists, the usual stuff. When she was given a minor role on a large project, she never dreamed it would be any different than the usual fare. She was unprepared for what she received: Project Aegon.


Hanging By a String

by in CodeSOD on

We all know that truth is a flexible thing, that strict binaries of true and false are not enough.

Dana’s co-worker knew this, and so that co-worker didn’t use any pidling boolean values, no enums. They could do one better.


Not in Kansas Anymore

by in Error'd on

Eric G. wrote, "It looks like Dinerware, a point of sale system for restaurants, has a similar problem to the Scarecrow in the Wizard of Oz."


Classic WTF: The Circle of Fail

by in Feature Articles on
"Doctor, it hurts whenever I do this!" This classic ran back in 2013 -- Remy

During Ulrich’s days as an undergraduate, he landed a part-time gig at a nuclear power plant. It was an anxious time to be on board at the nuke plant- the late 1990s. The dreaded Y2K loomed over all of their aging systems. One decimal point in the wrong spot at midnight on January 1st, 2000 and… well, nothing good would come of it.

Ulrich’s job for the big conversion was more benign though. He needed to update the simple graphics on the monitoring program the nuclear technicians used to keep tabs on the reactor. The very basic macro language generated Commodore 64-quality graphics; it displayed the position of the control rods, neutron flux, water temperatures & pressure, turbine and generator stats, and how many three-eyed fish were caught in the neighboring lake. All of this was then shown on 10 massive CRT monitors mounted around the main control room.


Classic WTF: RegExp from Down Under

by in CodeSOD on
This particularly bad example of regular expressions and client side validation was originally published in 2009. I thought Australia was supposed to be upside down, not bass ackwards. - Remy

"The company I work for sells vacation packages for Australia," writes Nathan, "and for whatever reason, they're marketed under different two different brands — redacted-travel.com.au and redacted-travel.com — depending on whether you live Down Under or somewhere else in the world."

Nathan continues, "one of the requirements for the international website (redacted-travel.com) is to disallow people from within Australia and New Zealand to make bookings. But the way this is done from the front end... well, it's a real gem."


Classic WTF: Manual Automation

by in Feature Articles on
This article originally ran in 2014, and it's the rare case of a happy ending. They DO exist! -- Remy

Aikh was the new hire on the local bank’s data warehousing/business intelligence team. His manager threw him right into the hurricane: a project with the neediest, whiniest and most demanding business unit. Said business hated their unreliable batch process for archiving reports, and the manual slog of connect > find/create directory > upload > pray. They hoped the DW team would code to the rescue.

Eager to impress, Aikh sketched out a simple, automated client/server solution. The business quickly approved his design and estimates. To mentor and keep the project on-track, Aikh’s manager assigned Dean, a more senior developer, to help out.
John Henry-27527
What do you mean, “steam powered hammer?”

“I could really use a good library to transfer files via secure shell,” Aikh told Dean during their initial meeting.


Independence Day

by in Feature Articles on

Today is the 4th of July, which is a holiday with historical significance in the US. Twenty years ago, Jeff Goldblum and the Fresh Prince defeated an alien invasion using a PowerBook and a hastily written computer virus. It’s such a big holiday, they’ve just released a mediocre and forgettable film about it.


Not What I Had in Mind

by in Error'd on

Rob writes, "Sorry, but I'm not into Microsoft Office in that way."