Recent Articles

Jun 2011

Unstructions: The Factory Reset, Irrational Installation, and Installs the Manual

by in Feature Articles on

Irrational Installation (from Mike T)
My company recently shelled out $8,000 for a mobile TV conference endpoint that allows us to do a two-way video conference from the field using a fairly small device (about the size of a large digital camera). It's a pretty cool idea, but we're finding that the hardware and software design are just not quite Enterprisey enough for our liking.

As an example, here is the official company reply on their support forum explaining how to reset the device to factory default settings:


How Not to Count Lines

by in Representative Line on

 "Not long ago, I was poking around one of our production web servers and noticed the following curiosity in a shell script," writes Marshall G.

/bin/cat /var/run/netstat_r.lst | /usr/bin/wc | /usr/bin/cut -b -8 |perl -e 'my $r=<>; $r =~ s/^\s+//; print "$r"'

The Key to a Good Schema

by in Feature Articles on

*ding* Customer Process Manager Error - Unable to Close Order Line 255731

Rick ignored the error. The Customer Process Manager was a rickety ASP web floating on an Oracle DB designed by a drunken sailor. It was more likely to produce errors than the desired result. The users, who had been using the application for a decade before Rick was tasked with keeping it hobbling along, were used to its odd behavior and knew when to expect errors.


A More Better Way to Count

by in CodeSOD on

As he popped the blister pack on another pair of 'industrial grade' antacid pills Brian recalled the contractor's first few weeks in the department.

Everything was better at his last assignment. The department's development processes were obsolete and the development tools he was given? Don't even start. His way, no matter how convoluted or obtuse was the best way. Don't question it - just get used to it.


CAPTCHA'd - All Facebook Edition

by in Error'd on

Well...it's been a while, but here's an all CAPTCHA edition of Error'd!


The Quine Programmer

by in Feature Articles on

The Quine – i.e., a program that produces its own source code as output – lives in the esoteric realm of computing and computer science. It’s almost entirely useless, but usually pretty fun. The Quine Programmer, on the other hand, is among the pantheon of programming gods, sitting between The Great Abstractor and The PHP God.

The Quine Programmer has the uncanny gifts of being infinitely good at programming and infinitely insightful, thus allowing him to write a program to replace himself and all other programmers. The output of The Quine Programmer is system that’s fully configurable by the end-user; should the end-user want something changed, she can simply change it herself.


Decimal Binary

by in CodeSOD on

"My company makes a device with a movable wheel that's connected to a computer," Geoff writes, "the device incorporates a design where notches in the wheel encode a binary pattern that can be read by sensors. The computer determines the position of the wheel by reading the sensors from a digital I/O card."

"It's actually a clever way of putting an impromptu encoder on the wheel. The software is, unfortunately, not so clever."


Not So Smart Card

by in Feature Articles on

A few years ago, Sebastian was working as a security consultant for a relatively big software security company that was working on a credential management project for "Her Majesty's Telecom" or simply, HMT.

His group was high-spirits all around counting down the days remaining in the final month of the year-long project, well, that is presumably except for Simon. Up until 48 hours prior, he was the consulting company's corporate liaison who had decided to unexpectedly exit from the project.  His departure left Sebastian, a former corporate IT drop-out himself, the project's only possible option to fill his shoes two days before an all-manager status meeting.



Doubleizing

by in CodeSOD on

Jeff C. was hired as an exterminator. The "big rewrite" had a lot of "big bugs" that needed to be eliminated, which was somewhat ironic, as the big rewrite was commissioned to eliminate a lot of "little bugs" that found their way into the original system over the years.

A product of neglect and abuse, the original system had become a crazy nightmare of Classic ASP pages. Nothing fully worked, but things half-worked half the time. The big rewrite yielded exactly the same thing, but in VB.NET. There have been talks about rewriting the rewrite, but in the mean time, Jeff's day-to-day involves toiling in code like this:


Sponsor Appreciation: Windows Azure with a Free TDWTF Mug!

by in Feature Articles on

Today's sponsor appreciation post is especially exciting. As I'm sure you know, our sponsors help pay the bills (and as such, you should definitely check out what they do)... but this time, our friends at Microsoft took it one step further: they've agreed to buy you one of the elusive The Daily WTF mugs.


Activate!!!!!!!!

by in CodeSOD on

"I was recently hired as an enterprise architect," Chris writes, "and my first task was to assess how far off the 'silo developed' applications were from the newly-implemented, company-wide standard."

"While I could submit a WTF for every hour I worked on this task, following is what I found in a lone WPF application containing a single screen with 1,890 lines of code.


Wild Card

by in Feature Articles on

Photo credit: jepoirrier@flickr"Today, with all the usual pomp and circumstance, pride and prejudice," rumbled the university president, "we unveil our new, multi-million dollar investment: a chip-card system for student payments. Now students will have an easy and convenient way to purchase books and other items from our campus stores and vending machines and manage the balances on their student accounts."

Patrick didn't really pay much attention to the round of announcements about the new system. Judging from the way the school was giving sessions and tutorials about the system, you'd imagine it required an advanced degree to use. In reality, it was little different from a standard debit card. The most cumbersome element was that you had to use a cashier at one of the campus stores to add money to the card.


Another Project, Another Place

by in CodeSOD on

It was another project at another place, and when Paul had settled in, he was given his first task. It was to get an application running after the original author had left. Apparently, it was "giving problems" when someone tried to get the code from the repository and build it. Paul dived into the code and started looking.

The code base was large. Very large. It was an imaging processing test application that gathered images from custom hardware and performed some fairly complex maths. What stood out though, was the idiosyncratic coding. Outside the number crunching, there was a slowly emerging pattern. Every function call took the following form.


Parallel Shipping

by in Error'd on

"I spotted this on Decathlon, a sports store here in the UK," Steve Mansfield wrote, "they are obviously taking no chances, just in case the theory of quantum cosmology is proved correct and there are indeed multiple parallel universes. It would be awful (and no doubt disastrous for the space-time continuum) if your pair of running shoes went to the wrong universe."


Twenty-Four Bits Per Intern

by in Feature Articles on

It's tough to find good uses for interns. They don't have the experience to do any heavy lifting, and management gets annoyed if you only use them to fetch you coffee. Usually, they get to re-organize the supply closet or maybe help sanitize some DB records in test, if anyone trusts them near a computer.

Matthew thought he had found some good work for Timmy, his fresh-faced intern. "This is hopefully pretty straight-forward, but please, let me know if you have any questions," Matthew said. He pointed to a screen-mockup. "We want this little round swatch to display the user's currently selected color. When the user clicks the round swatch, they should see this text-box and they can enter in a new hex-code. When they hit 'save', the hex-code gets saved to the DB, and the swatch displays the new color."


Trilingual Query Language

by in CodeSOD on

"For some reason," writes Graeme Hefner, "someone decided that it'd be best that we write our own bug/issue tracking system instead of using one of the plethora of fully-functional systems available on the market."

"For some reason, someone — perhaps the same someone — decided that the best way to develop this system was a SQL stored procedure called by a Classic ASP page that simply dumped everything to a single page list. Every ticket, ever. This is the core of its entire logic, which impressively uses of SQL, HTML, and JavaScript all in one query."


Release Management Done Right

by in Alex's Soapbox on

I was having lunch with a colleague the other day when his phone rang with the distinctive office ringtone. Rolling his eyes, he excused himself to take the call. It was just a run-of-the mill workplace emergency, but there was one thing he said that I couldn’t help overhearing: “fine! I guess we’ll just do a new release for QA.”

It stood out like nails on a chalkboard. “Huh, what do you mean?” he responded when I asked him about it, “they were trying to fix the build, but I dunno, they couldn’t, so I said to do a new release.”


Divine by Zero

by in CodeSOD on

Mike P had some rather large sandals to fill. His predecessor was a self-described "PHP God" who had, much to the chagrin of his followers, left to bestow his benevolence elsewhere. While mere "PHP mortals" might misunderstand his code to be convoluted and bizarre, those who knew better (i.e. management) sang plenty of praise, of both the PHP God, and his clean, well-commented code.

But the PHP God did much more than simple sites – he solved what many would consider unsolvable problems. Take, for example, division by zero, presented in its original, impeccably commented form.


Creative Logistics

by in Error'd on

"Perhaps the USPS could use some help with logistics," writes Brad R., "I wonder what the Carbon Footprint of my 2 lb. package was for this journey?"


The Big Picture Thinker, A JavaScript-like Job, and The Job Opportunity

by in Tales from the Interview on

The Big Picture Thinker (from James S)
After an in-person technical interview, we decided to advance a candidate to the next step in our hiring process, which is a brief, one-page written test with some relatively easy (or, easy to look-up) technical questions. It's designed mostly to gauge written communication, since our developers often interface directly with clients.

Mea culpa, I forgot to attach the test. Turns out I didn't need to, this guy already aced the written communication test.


Error-prone Errors

by in CodeSOD on

"Sometimes, web applications error out," Brian writes via the Submit to The Daily WTF plug-in. "In ASP.NET, a simple web.config entry will redirect all errors to a given location like, errors.aspx. On that page, you can call Server.GetLastError() to get all the error deatils you'd like, including a full stack trace. For more advanced scenarios, you can use the Application_Error event to log errors. "

"Or, you could do what my predecessor did and rewrite the built-in behavior with something woefully inadequate. In this case, he decided to build some kind of XML object to wrap a System.Exception, then forward that error in a URL encoded with Base 64."