Recent Articles

Sep 2007

Your CAPTCHA Hates You

by in Error'd on

Brandon got it wrong the first time when it was "UIDIOT":


Serializalicious

by in Representative Line on

If you aren’t familiar with Serialization in Java, then today is your lucky day! Here’s a quick, crash course in Java Serialization:

Serialization allows instances of classes (i.e. objects) created at runtime to be saved and then later restored at a different runtime. While most developers could probably do this on their own with a GetState() and LoadState() method, Java can automagically do this on virtually any object by preserving its state to a sequence of bytes. All a Java developer has to do is add “implements Serializable” to their class definition, and voila! they can now save state with an ObjectOutputStream and instantiate states into objects with an ObjectInputStream.


Diary of a Third-Class Programmer

by in Feature Articles on

Most first-class (consultants & employees) and second-class (contractors) programmers don’t realize that there’s an entire class of programmers below them. These programmers – the third-class programmers – work in Developer Purgatory with far less responsibilities, no latitude to make any decision at any level, and always get assigned the “dirty work.” In fact, some even consider it an act of charity to call these poor folks “programmers” at all.

Most third-class programmers are third-class for a reason. There is simply no way they could ever get a job anywhere else. Occasionally, recent graduates get sucked in to Developer Purgatory by the allure of a “real programming job,” never realizing the stigma that goes along with it. Andrew is one of these poor souls, desperately trying to get out. And this is his diary.


Taking a Long Trip

by in Error'd on

Hopefully Nicole had a good time on a long trip she took:


When an Enum's an Enum

by in CodeSOD on

Barry R. and Rob P.'s coworker had a problem: how could he really, really make sure they verify that a value stored in an enumeration, say the EmailsFormat enum, is actually a valid value for that enumeration? With the handy FromEmailsFormat function of course!


The Mythical Business Layer

by in Alex's Soapbox on

If you’ve developed software for long enough, you’ve most certainly heard of a “business logic layer.” It’s supposed to be the layer (or “tier”) containing an application’s business logic and is sandwiched between a “persistence layer” and a “presentation layer.” Some call that the “standard three tiers of an application.” But what it really is, however, is a bad design that leads to bad software. Or at the very least, dangerously poor semantics. In lieu of your standard WTF article, allow me to explain why.

First and foremost, we need to define the term “business logic.” Unlike so many other entries in the IT lexicon, “business logic” has no standard meaning. We’re left with what you think it is, what your colleague wants it to be, and what some article you read says it is. So, for the purpose of this article (and hopefully beyond), here is my definitive definition.


Pay the Bills, Bill

by in Feature Articles on

Joe A. recently had some troubles at work. Joe works for a company that runs scrolling marquee signs using a markup language similar to HTML. It's a small company, run by two guys we'll call Tom and Bill.

Tom is the technical lead and main owner. The business was his idea to begin with. Bill, on the other hand, came from an accounting background and doesn't have much technical knowledge. Joe, as a technical guy, always reported to Tom.


My Keyboard Doesn't Look Like That

by in Error'd on

From Christopher:


containsNotEqualBackwards

by in CodeSOD on

Ahh, the things you can find in an old, gigantic system! Chris B recently uncovered this gem in an old Java application. It might be misnamed, but then again... how could one possibly describe what this is supposed to do...


MAN WALKS ON MOON

by in Error'd on

From David W.: "DEWEY DEFEATS TRUMAN. MAN WALKS ON MOON. ATOMIC BOMB DROPPED ON HIROSHIMA. Great news headlines grab our attention, tell us in seconds how our world has changed, and stay with us for decades. Google News's interpretation of a San Francisco Chronicle story, however, will most likely fail to stand the test of time."


All For 19 Seconds

by in CodeSOD on

Date and Time computations aren’t easy. Unless you’re fortunate enough to use Metric Time, there are a whole lot of uneven measurements to work with. Sixty seconds in a minute. Twenty four hours in a day. Thirty, thirty one, twenty eight, maybe twenty nine days in a month. Fifty two point something weeks in a year. It’s just ugly.

Fortunately, just about every programming language out there has library code to help with the math. Naturally, many “certain” programmers chose to ignore this library code and hack their own. Like Yuri’s predecessor. He was presented with a simple problem: add nineteen seconds to the current date/time in Perl.


Wish-It-Was Two-Factor

by in Feature Articles on

Unless you’ve just recently signed on to this whole Internet Thing, you’ve probably noticed an increasing trend in the World of Authentication. These days, when logging on to various websites, users are asked for a name, password, and the answer to one or more “secret questions.” It’s actually a new-fangled type of authentication called Wish-It-Was Two-Factor.

It all started way back in the year 2005, when the Federal Financial Institutions Examination Council issued a guideline entitled Authentication in an Internet Banking Environment. It’s a rather exhilarating read if I do say so myself, especially if you’re a fan of government banking regulations. And, really: who isn’t? In a nutshell, the FFIEC mandated that internet banks utilize a Two-Factor approach to authentication by year-end 2006.


The Best of Both Worlds

by in Error'd on

Ever wanted your .mp3 file to play like an .mp3 file? Well, now you can have it both ways!


Ph33r my 5k1llz!

by in CodeSOD on

I hate the final stretch of a project; it's when all the minor bugs that I've been putting off fixing need to get fixed. An anonymous submitter that we'll call Scott was brought on for the final round of fixes of a large, vendor-built application.

Scott's first task was to fix a simple little issue in the admin section of the site. He opened the project and read an ominous line of code right at the top of the file:


One at a Time, Please

by in Feature Articles on

Imagine how much easier your job could be. Imagine no meetings, no signatures on change control paperwork, no code written by people other than you. Imagine being able to just log in to the production server to make a quick fix. Imagine being able to log in to the database server to manually fix some data.

Well, someone at the big bank David works at had the same idea. Checks and balances are for wimps. And out of this idea, Visual Basic for Databases was born. Developed internally (and not to be confused with commercial products with the same name that for all I know are good), VBDBs gave the user total control over the data using a VB-powered Excel spreadsheet.


Searching... 1,091 Stone Tablets Found

by in Error'd on

Ahh, 6142 years ago, when the internet was still in its infancy.


(submitted by Nick)


Only $0.001 per Line

by in CodeSOD on

Generally speaking, $300 doesn’t go very far in the world of custom software. If you’re lucky, it might be enough to fix a typo in a production application. These days, with the advent of IT Project Portals (as discussed before) that provide everyone access to certain developers from certain countries, $300 can go a long way. Not long enough to build working software, of course, but surely long enough to generate lots and lots of worthless code. At least, that was the experience with Christopher’s client.

Christopher’s client is a large (as in, one of the “Big 5”) advertising firms that decided to initially place their RFP for a survey application on an IT Project Portal. A few months and $300 later, they ended up with about 500 PHP-files (31 of which are class files without any members) and a database schema that stores all values in VARCHARs. And it all “almost worked.” Fortunately, they had Christopher to help “debug” it.


Same Old, Same Old

by in Error'd on

Today's highly inappropriate ad being run under a very sad headline comes to us from Justin:


Old Fashioned Web Services

by in CodeSOD on

When users upload a multimedia file to Toti S.'s company's website, their system transcodes the file into several different multimedia formats. At the high level, it's a pretty basic process.

1. User uploads file to Upload Server
2. Upload Server notified Transcoding Server via an XML request
3. Transcoding Server reads XML request and does its thing (creating various sizes/flavors of multimedia content)
4. Transcoding Server uploads various files to the Main Server


CSI: Server Room

by in Feature Articles on

Sometimes in IT, we have to be dicks. Like private dicks, I mean. Like Dick Tracy dicks. What did you think I meant?

Well, DickNick H. found himself wrapped up in an IT investigation that not only had intrigue and mystery, but trickery and knavery! It all started when Nick was working on a web project at his firm in the UK. The setup phase had gone well; they had a dev server, source control, and backup servers. They'd hired contractors to make some modifications to the building, adding network ports, cabling, and installing server cabinets. They received a 1Tb NAS drive, installed it, set it up to receive backups, and all their testing of the backups went well. Nick insisted on a trinagulated backup plan, so all their files would be backed up remotely, as well.


"Auto" Configuration

by in Error'd on

Consider this print configuration dialog that Quint came across...


Class Ego

by in CodeSOD on

Sometimes, there just isn’t a better way. You have to implement the DoNothing() method. Or even IsTrue(). At least, that’s what D.C. assumed when he saw a a class with a member variable named “self” …

 


Slightly Excessive

by in Feature Articles on

When Mario W.'s company was approached by a mega not-for-profit organization for a brochure and web site, they were excited. The organization worked for welfare and was all over the place; it owned a nursing home, meeting places, a travel club, meals on wheels... in fact, it might be quicker to list the ventures they don't have: a tattoo parlor, a laser tag arena, and a bee colony. All told, there were about 5,000 members across all the corporation's ventures.

As a tech firm, Mario's company was often asked for advice on technical matters. While Mario was working on the web site, his client asked him about his opinion regarding a new network in their nursing home. It was a small nursing home with half a dozen full-timers that would need computers.


Definately Use Spell-Check

by in Error'd on

"Occurance" is definately a common mispeling.


(submitted by Tero)


I Didn’t Know You Could Do That!

by in Feature Articles on

Sebastian K.'s first encounter with Megan – a programmer in the company’s data verification department – came in the form of an innocent-sounding question: “how do I get the first value out of a variable?”

Having no idea what she was talking about, Sebastian inquired a bit further. Her code looked something like this:


You Can't Please All 580% 100% of the Time

by in Error'd on

The important thing is that all 580% agreed that each city did their best to build stadiums!


(submitted by Austin)


SELECT [Connection_String] FROM [WTF]

by in Representative Line on

Telly B. sent in a representative line that returns database connection information... from the database.

SELECT 'driver={SQL Server};user id=<removed>;pwd=<removed>;' +
       'Network=dbms;server=127.0.0.1;database=<removed>;'
    AS dbconn
  FROM users

How Did No One Think of this Before?

by in CodeSOD on

Matt found a less-than-helpful helper function in a large JavaScript library:

function confirmMessage(msg)
{
    if ( confirm(msg) )
        return true;
    else
        return false;
}

Cognos Kōans

by in Error'd on

A frequent user of Cognos PowerPlay, Tom Murray shares some of its more insightful error messages...


It's Like a Double Yellow Line, and More!

by in Tales from the Interview on

It's Like a Double Yellow Line:

Near the end of a technical interview, Paco H. was asked a rather blunt question from the candidate he was interviewing: "Hey, be straight with me. How am I doing?" Paco replied with the truth: not too well. The candidate was a bit disappointed, so Paco gave him a chance of redemption.


SKU'd

by in Error'd on

Kyle was in the market for a bluetooth GPS device and stumbled upon this company who had a rather interesting SKU Number scheme ...