Recent Articles

Mar 2013

Unethical Research in Computing

by in Error'd on

"I think Google is trying to tell me something. I can't quit put my finger on what though..." writes Jakub.


The Tye That Binds ...(part 2 Real Escape String)

by in Feature Articles on

Previously on Lost The Daily WTF

He shifted uncomfortably in his seat. He should just say nothing. Smile and nod. Keep his head down.


Hangin' On

by in CodeSOD on

Don T. was tasked with adding the ability to process transactions with new reference data to their flagship product. After some thought, Don decided that he would create a DAO to load the new reference data from the database, and store it in another sub-cache in the singleton master-cache of the application. Further, he would grab a handle to that sub-cache and pass it around to anything that needed it. The actual processing would be done by a remote web service. There would be approximately 100 megabytes of new reference data. He wrote and tested the code. QA tested and blessed the code. It was deployed.

Within an hour, the application died with an OutOfMemoryError.


The Tye That Binds

by in Feature Articles on

"The System is too slow," Aargle's manager told him. No hello, no small talk. Direct and to the point, like a shiv.

When he'd started at MediDyn, Mack, his team leader, assured him that Tye's management style just grew on you. Two months later, Aargle assumed he'd meant like a tumor.


All the Pieces

by in CodeSOD on

So much bad code arises from the fact that people don’t know that there’s a better way. If a developer doesn’t know about “split” and “join” functions, they might write a cumbersome for loop to manipulate a string. If they don’t know about regexes, they might really overcomplicate some string munging . Or heck, maybe they don’t understand a for loop, and use a while instead.

Maurycy submits this PHP code. It’s hard to really understand how this particular version of the code came into being.


Crashception

by in Error'd on

"Would you call a crash within a crash a...'crashception'?" asks Rich Eardley.


Try More Random

by in CodeSOD on

All of Christian R.'s fellow employees were so overloaded with criticality-1 tasks like replacing icons, fixing spelling mistakes and such that their company decided that it would be prudent to outsource new work to Experts. Management reasoned that choosing highly trained experts would ensure that the job would be done right the first time. The solution would be cost effective, efficient and make them look wise.

One particular new task was to enable two devices to be paired. This would be accomplished by having one device display a number. The user would enter the number on the other device: the two devices would be paired and the user would be logged in on both devices. Underneath the covers, both devices talked to a common server. Once paired, the devices could talk to each other (through the server).


Accounting for Development

by in Feature Articles on

Karen glared across her desk at Tom. “Did you install Visual Studio on your computer?”

“Yes,” Tom replied, unsure why she radiated waves of fury at him.


SELECTing Valid SQL

by in CodeSOD on

“No EXECUTE-ions,” the whiteboard read. Doug always smiled at the note in the common space at Wolfram and Hart Software, but it had taken on a more sinister meaning lately.

“Use a stored procedure? No can do,” the DBA Joss said. “The codebase simply won’t support it. If your query requires anything other than SELECT, INSERT, UPDATE, OR DELETE, it fails.”


Freelance Fun with Dick and Jane

by in Feature Articles on

When you're a freelance software developer and the relatives come calling, you learn quickly - if you want to keep your business afloat - how to let them down easy. When friends of relatives come calling, however, it gets tougher, especially when they're as enthusiastic as Jane.

Dick's second cousin (once removed) had pitched Jane's idea as "similar to Khan Academy or MIT's online college", which didn't really float Dick's boat: it sounded either extremely boring or impossible. But Dick sat down for coffee with Jane anyway, and found himself confronted with the following business plan:


Warning - Upgrade Have a Risk, Working Wriness

by in Error'd on

Lee wrote, "I ordered a Polaroid 7" Tablet recently from a well-known daily deal site. When I got it, it was DOA. I checked with the daily deal site and they suggested contacting the manufacturer first before asking them for a return or exchange, so I called Polaroid's tech support."

"I explained the lady who took my call that when I plugged the charger in to the tablet, the tablet lit up and displayed the Polaroid logo, so I knew it was recognizing that the charger had been connected. It would then display a blue screen that said 'Internet Tablet' for a few seconds then it would flash several times and turn off. It would then proceed to turn on again showing the Polaroid logo and start the cycle over again. It would do this continuously and never boot up. Her response was 'So, if I understand you correctly, your saying your tablet is sluggish?' After several seconds pause I finally managed to say 'Well, if you consider not booting at all "sluggish", then yes.'"


Less is More

by in Feature Articles on

Pratik K. left work on very late on Friday with plans for an awesome weekend. He had earned it. Each application that was part of the new release had been tested in the test database, both individually and as part of an end-to-end drill that included both vertical and horizontal functional and stress testing. His code was bullet proof. All the signoffs had been acquired. The DBAs were ready. The SAs were ready. He could heave a sigh of relief, let go and have some fun. And so on Saturday night, out he went. Drink he did. Late he came home. He got the call at 5AM Sunday morning. Something was horribly, horribly wrong.

The business users had kicked off what they thought would be a 15 minute job early Saturday afternoon. When they came back several hours later, all the applications were hung. The users couldn't access the database. After everything had been so thoroughly tested, how could such a catastrophic failure have happened? What had gone wrong? The customers were already expecting the release to be installed for their use by business-open on Monday morning. This absolutely had to be fixed now!


I'm Sensing Some Tension

by in Feature Articles on

Darren A. writes, "I've just started a new job for a company that (on their own admission) needs some help. The developers are a little behind the times while the testers are a lot behind the times."

"My uphill task is to educate them in the ways of continuous integration, source control, design patterns, OO design, unit testing and automated building, testing and deployment. Their communication skills need some work too. I haven't risked a peek into the code yet but based on the following defect ticket, I suspect I won't be pleased."


A Misleading Memory

by in Feature Articles on

6:55 PM. Tom's shift ended in precisely five minutes. Neither he nor any of his late-shift copilots were on the phone at the moment, so increasingly carefree banter flowed through an otherwise empty office. His co-workers discussed that new game, Myst, and the latest puzzle that stumped them. They'd keep it up all the way out to their cars.

There was one break in the banter: 6:59, that magical time when everyone rushed to his or her cubicle to hover a finger over the button that would release him or her from the phone queue. Tom jumped out of his chair and joined them in that much. Performing late-day housekeeping on his open tickets had taken longer than he’d anticipated, but it was good not to have to wait out the eternity that stretched between 6:55 and 7:00.


The Right Way to Find a File

by in CodeSOD on

When not at the office at StartCo Ltd, AJ raises her two kids with her husband, who works at home. A few months ago she was working long hours on a migration to a new codebase, so she made up the lost sleep on the weekends. While her kids were placated with episodes of The Muppet Show on repeat, she would doze off on the couch.

One Saturday afternoon, with the two kids enraptured by “Pigs in Space,” she took her usual nap. A few minutes later, her youngest daughter urgently shook her awake. “Mommy, Mommy! Are you awake, Mommy?”


Amazon Proves Godwin's Law

by in Error'd on

Who knew that Peter R.'s search on Amazon for a gift for his fiancee, would result in yet another proof of Godwin's Law.


Trust Me

by in CodeSOD on

Pritesh C. took a position working for an Architect's Architect who could out-design anything to out-do and out-perform any other system. Everything this guy ever designed and coded had more features, capabilities and brute-force performance than any similar widget ever designed by anyone else, anywhere, ever.

Way back when the system was first being designed, the Architect's Architect decreed that communication with the system was to be via JMS messaging. Additionally, there would be two queues; one for normal and one for high priority messages. Applications requiring the services of this new application would send normal priority messages for batch processing, and high priority messages for direct user-interaction. The application would monitor both queues, but let the high priority messages jump to the head of the line for faster response. Also, due to the system it was to replace being notoriously buggy and unreliable, this system had to be bullet proof. It simply could not go down.


Hardware Mismatch

by in Feature Articles on

“Ugh, this server is such a pile of garbage!” Eric shouted for the 10th time that week. The “server” was an aging desktop that fell out of use several years prior. Eric’s team needed to resolve a performance problem in their production BizTalk environment. The best thing they had to simulate that environment was running virtual machines on this over-matched computer that you wouldn’t even give away to your kids. Such “recycling” was the standard at Eric’s company. Whenever they needed hardware to assist with development, Eric argued with the hardware guys just to get a handout of scraps from them. This time was no different.

In hopes of actually getting a usable dev server, Eric knew he would have to contact Mitch, the cranky head of the hardware team. A machine that was in its prime back when MySpace was the social media king would be an improvement. Eric carefully drafted a respectful, polite, and painfully courteous email to Mitch, explaining the inadequacies of their current setup and how this was keeping them from supporting production.


A Long Running Process

by in CodeSOD on

A process might run for a long time, and it’s important for code to ensure that the long-running process doesn’t crash unexpectedly. Alexander found this block of code, which carefully protects against overflows:

if (_totalSeconds < ulong.MaxValue)
{  
   _totalSeconds += 1;
}  
else
{  
   _totalSeconds = 0;  
}

War of the Worlds

by in Feature Articles on

Laptops Rule!At Cheryl C's company, most of the work was done, and all of the data was stored on Linux servers, but everyone used laptops to access the network and by extension, their Linux servers. Most of the time this worked out well. However, when something went wrong... support was handled by two different organizations: one in her company and one on The Other Side. Specifically, the company on the other side of the merger. Two behemoths had merged into one mammoth colossus of Jurassic proportions.

For the past 18 months, all sorts of efforts had been ongoing to divide the responsibilities to eliminate the redundancies. Managers met. Managers fought. Managers decided that it was redundant to have two PC support organizations, two network support organizations and two Linux support organizations, so they decreed that Cheryl's company would support the PC world and the other company would support the Linux world and the network. And never the twain would meet.


Helpful Google!

by in Error'd on

I was checking on my flight on US Airways today and when my mouse moved over my seat assignment Google thought that it would be helpful to know just how cold my seat was in Fahrenheit," writes Alan R.