Recent Articles

May 2006

Living With Parents

by in Feature Articles on

A few weeks ago, Greg moved one step closer to becoming "the man" and took a management job at a small software development company. Things were a bit of a mess (to put it nicely) and Greg thought a good place to start would be to get an idea of his subordinates' skill levels. He asked the team submit what they felt were the latest and greatest code they've written and thought he'd share with us what was the best of their best: the code had proper casing, it was indented, it not only had a "serious" sounding name (unlike eyeEyeCaptain()) but actually did what the function said it would, and only had a single case of undocumented and out-of-place mystery business logic, and so on, ...


Talkin' Bizness

by in Feature Articles on

It was the start of Month Nineteen and Steve and his fellow developers were finally seeing the light at the end of the tunnel. For the past eight months, they had all been working overtime to deliver Enterprise Financials, a financial reporting application estimated to be finished in six months.

At first, the application didn't seem too difficult to do. Enterprise Financials required a single database (which was already designed) that received exports of the general ledger (which it was already doing) and provided several different groups various reports (which it already did). All that was left to do was rewrite the existing reporting so that it worked in a consistent manner. And even this didn't seem to be too difficult to do – the reporting was already entirely in several different .NET applications that just needed to be combined with consistent security, look, and navigation. Naturally, solving this problem wasn't so simple.


Rewrapping a Wrapper Wrapper

by in Feature Articles on

Since a good portion of readers are out enjoying the last day of their three-day Memorial-Day weekend, I thought today would be a perfect opportunity to rehash the ObjectWrapper. It's a Java class that almost made it into Chris' company's codebase as a check-in (and no, not as a joke). It's become a bit of a cult phenomena around the office and even inspired creativity in one of the developers as the thumbnail aside shows ...


Of Course We Tested It ...

by in Feature Articles on

A little more than a decade ago, Ian Mc worked for a consulting company that just landed a large contract for COBOL/Oracle conversion project. An early adopter of outsourcing, Ian's company sub-contracted most of the programming work to a certain overseas programming company with a staff of "highly proficient" COBOL programmers.

Months passed and the deadline the first module to be demonstrated and delivered was coming up fast. Ian was the point person to present the module to the client and, due to a slew of client and management blunders, he never had a chance to see the completed code before the demonstration.


Oh, the Workarounds

by in Feature Articles on

I've had to use some rather strange workarounds to get things working, but none like these two. Today's post is an "interactive" one, so go ahead and post your own workaround stories in the comments.

Rusty B was having trouble connecting to a Sybase database through Access. He just kept receiving the following error message:


It Must Be Broken

by in Feature Articles on

I'll just step aside today and let Jeremy H share one of his WTF moments, It Must Be Broken ...

At my previous job, I worked on a team that built automated scanning systems.  The software controlled a motor that moved the scanning head over the piece of material, took data points in a grid pattern, and fed the results into the data acquisition module of the software.


Periodically Tabling

by in Feature Articles on

The first three times I received submissions like Schien Dong's, I passed them up. They're "just" HTML WTFs, after all. But you know what they say -- fourth time is the charm -- so, here goes. First, consider this fairly typical cellular phone usage log from Fido Mobile's on-line account viewing website ...


Insuring Proper Error Handling

by in Feature Articles on

Rich Leick was brought into a major insurance company as a consultant to help them with managing defects and bugs in their core underwriting application. One major problem Rich noticed was that support developers had little-to-no information about the problems they were assigned to fixed: the application provided no logging and all of the error messages simply read "An error occurred. Please try again."

After Rich spent a few weeks adding copious amounts of logging, tracing, and error handling code to the system, the developers were thrilled. They finally had some direction to go when they were assigned a bug. Still, there was one thing that struck Rich as rather odd: the database was throwing lots and lots of "divide by zero" errors.


It's a Little Funny

by in Feature Articles on

Michael Atlas was pretty excited to land and an internship at a local software company, especially one as prestigious as to have "Enterprise" in their name. Even better, in his first week, Michael was given an actual programming task: add a certain feature to one of the company's applications. Once he got the environment information, Michael went to the database to get an idea of what the data model looked like. Enterprise Manager was taking forever to load the table list, so Michael expressed his surprise to his cubicle mate, who happened to be the application's creator.

"Yeah, that application -- it's a little funny," his coworker replied, "but it actually works pretty well." Once the table list loaded, Michael's excitement turned quickly to thoughts of changing his major to Accounting ...


More Rube Goldberg design

by in Feature Articles on

Ahh, The Incredible Machine.  What a great video game.  A basketball would roll down the slope, hit a bucket attached to a rope which was networked through a complex system of pulleys, pulling a lever that would turn on a motor, sending a conveyor belt in motion, carrying a baseball into a seesaw connected with string to a gun that shoots a cat in the face.

Shooting a cat in the face, incidentally, is more humane than subjecting an innocent developer to a horrible, Rube-Goldbergian system that our poor friend RJ had to maintain.  I'll step aside and allow him to explain.


The Cost of Reliability

by in Feature Articles on

It's one thing when you have to pay ten times more than the average residential consumer for T-1 Internet access. It's another thing when your T-1 line is three times slower than many residential packages. It's yet another thing when your T-1 line is less reliable than most residential lines, going out at least twice a week. But when your inbox is flooded with outage notifications as soon as connectivity is restored, that's just plain obnoxious ...


Injection Rejection

by in Feature Articles on

Matthias Winkelmann's company decided to go the ole' outsourcing route and hand off all development work for a fixed-bid project to a certain overseas company. As it turned out, the hourly rate for certain overseas programmers were less than half that of the in-house folks, so management did the math and figured they could profit that much more.

The in-house programmers were told to spend "only a little bit of time" on the project -- no technical advice, no coding assistance, and no even looking at the code. They were only to assist testers in "effectively communicating technical issues" to the overseas team. As it turned out, there were a lot of technical issues, and a lot of issues communicating the technical issues, so that job ended up taking quite a bit more than "only a little bit of time."


The Excel Worm

by in Feature Articles on

Nathan's colleague ("Steve") works as a "rogue" IT operative. No one knows what department he works for, who is supervisor is, or even what his real name is. Steve's job is, apparently, to analyze, develop, deploy, and support "unofficial" IT projects without ever telling, let alone getting any support from, the IT department. No IT support means that Steve's job is a dirty one: he can only use non-development tools (such as Microsoft Excel), rely on rogue servers (such as a random user's workstation), and non-database databases (such as CSV files).

But what Steve lacks in tools, he makes up in job satisfaction. Since no one seems to know his job title, many people from the "business side" just refer to him as "The Hero." Unlike the mean-old folks in IT, Steve works in a developmestruction environment[1] and doesn't bother with things like testing, code review, deployments, etc. -- he just does what it takes. The "business people" also empathize with Steve and his constant battles with IT who's sole purpose sometimes seems to be shutting down Steve and his rogue operations. In fact, just recently, the mean-old database folks shut down one of his latest creations called "Dashboard.xls"


Pop-up Potpourri: Mayday Edition

by in Pop-up Potpourri on

For many more, check out the previous post from the series, Pop-up Potpourri: Tax Time Edition


In case you were wondering why time moved backwards for a few minutes several weeks ago, it was because Jason decided to click the Apply button in eMagic's Logic Platinum ...


Web 0.1

by in Feature Articles on

One policy that I strictly follow is that the examples I post here come from professionals. I believe it's important to let the learners learn and, therefore, consider school assignments, messageboards, and hobby projects to be "off limits." But really, how fun are rules if you can't break 'em every once in a while? Especially when there's an opportunity to present a website design technique that Justin recently came across. It's called flyer-to-print-to-photo-to-print-to-scan-to-web (or, Web 0.1):

  1. Using your favorite word processing software, design a flyer that contains the information you'd like to convey to your website visitor
  2. Once designed, print the flyer on a color printer
  3. Lay the printed sheet of paper face-up on a table, preferably a clean, wooden table
  4. Take a photograph of the flyer using a camera, preferably a digital
  5. Download and print (or develop) the photograph of the flyer
  6. With a normal scanner, scan the photograph of the flyer
  7. Upload the scanned image to a frame on your website

Here is a screenshot of one early adopters of this technique ...


Uniquely Secure

by in Feature Articles on

If you haven't had the opportunity to work on a behemoth application that requires more full-time production support developers than most companies employ, then you've missed out on a lot of fun. In these systems, trying to find quality code is like trying to find a needle in a stack of hay other needles ... while blindfolded ... with your feet. Now as much as I'd like to feature such an application, I suspect that most readers would stop reading after the eightieth page or so. Instead, I'll present a single line of code representative of the entire system Kico Zaninetti came to maintain ...

if (errMsg.indexOf("Violation of UNIQUE KEY constraint 'UQ__mbrs_pwd'") != -1)
  return "The password entered is already in use. Please enter another.";

The Never Ending Error

by in Feature Articles on
If your application is going to fail, you may as well have it do so in a spectacular fashion. Sure, you could just display a simple error message and be done with it, but that's no fun; it's much better to just ruin the system for everyone else. At least, that's how the users of Niall's newly inherited system believed it was designed. The previous maintenance developer just got accustomed to rebooting the server several times whenever the application froze and told the users there was nothing he could do, because there was nothing in the logs to say why it failed. Niall, instead, decided to take a peek at the code ...


It's Pretty Null

by in Feature Articles on

Most strongly-typed languages (C++, Java, C#, etc.) do not support NULL values for their primitive types (integers, floats, etc). There's quite a few ways to get around this limitation, from using an additional null indicator variable to wrapping the primitive type in a class, but the most common is using a "magic value" to represent NULL. Generally, this "magic value" is the smallest value possible, such as -1.79769313486232e308.

In Mihhon's case, the original coders decided to use a range of values to represent NULL. This led to the following function to test if a double is NULL:


The Motivator

by in Feature Articles on

Most people have a hard time understanding why CEO's are paid so highly. They don't see that it really is a tough job, requiring the utmost dedication to the company. They don't realize that a CEO has no power to directly change things and that he must rely on all of subordinates to realize the company's objectives.  They don't get that it takes a very special person, one who is a skillful communicator, a champion motivator, and an ideal role model to do the job. But then again, they are inundated with anonymously-submitted examples like today's ...

From: Jim M----- [[email protected]]
Sent: Thursday, March 02, 2006 3:49 PM
To: All Employees
Subject: Employee Departure


Hungry, Hungry HIPAA

by in Feature Articles on

I get pretty excited whenever a new regulatory framework like HIPAA or SOX is enacted. Not only does it bring the potential to sit on a committee responsible for deciding the procedure needed to formulate a project request to initiate the creation of group responsible for determining the key players on a compliance assessment team, but it brings some pretty interesting stories of non-compliance like this anonymously submitted one ...

I worked on a web project for my company that tracks diagnosis and treatment information for drug addicts. Because this is medical information, it is subject to the many privacy regulations set out in the HIPAA legislation. This law mandates, among many other things, that you stand behind the line at the pharmacy (lest you get a glimse of the computer screen with the prescription information on it.) And ours is medical information about people who are seeking treatment for drug addition - double private!


The Encryption Initiative

by in Feature Articles on

Quite a many secure electronic transactions take place at Oliver Klozoff's company and, in order to make sure the remain secure, his company undertook an Encryption Initiative. The idea was that, because encryption is such a vital part of security, all encryption should be done in one place, with once web service, instead of within each application. All applications -- new and existing -- would need to be immediately changed to utilize the new web service, and a crack team of only the best developers would be formed to lead up the Encryption Initiative.

The web service required to support the Encryption Initiative needed to be pretty robust. Because each application could (and often did) have its own encryption algorithms, the service would need to account for that. In addition, applications could (and often did) use several different keys that plugged into their application. Thankfully, the Encryption Initiative team had already thought of all that.


Take-home Trouble

by in Feature Articles on

I always used to be skeptical of giving job candidates a take-home code test. The reason was that the assignment needed to be simple -- no in-demand developer would spend more than a few hours on it -- and even the most incompetent developer could surely throw together an elegant solution if he put enough hours into it. But leave it to Nikolay Simeonov(*) to show me the way. Following are some examples (warning: Delphi ahead) that job candidates turned after several days of working on a simple take-home assignment ...

One candidate demonstrating familiarity with code reuse of the copy/paste variety ...


Hyperlink 2.0

by in Feature Articles on

For those of you who haven't upgraded to Web 2.0 yet, today's submission from Daniel is a perfect example of what you're missing out on. Since the beginning of the Web (the "1.0 days"), website owners have always wanted to know who was visiting their website, how often, and when. Back then, this was accomplished by recording each website "hit" in a log file and running a report on the log later.

But the problem with this method in Web 2.0 is that people don't use logs anymore; they use blogs, and everyone knows that blogs are a pretty stupid way of tracking web traffic. Fortunately, Daniel's colleagues developed an elegant, clever, and -- most importantly -- "AJAX" way of solving this problem. Instead of being coded in HTML pages, all hyperlinks are assigned a numeric identifier and kept in a database table. This identifier is then used on the HTML pages within an anchor tag: