Recent Representative Line

A single line of code from a large application that somehow manages to provide an almost endless insight into the pain that its maintainers face each day.

Jan 2009

The Great Code Spawn

by in Representative Line on

Several years ago, Dan D’ predecessor, Steve, came to the realization that many of us arrived at one point or another: writing data-access code can get boring and repetitive. To ease the tedium, Steve did what many developers in his position do. He wrote some code to generate a lot of code.

Unfortunately, Steve’s coding skills weren’t all too hot. Worse were his code-writing-code writing skills. In the years since The Great Code Spawn (as it has come to be known), the data-access layer has become an unmaintainable disaster – so much so that, rather than add a new database column, developers have “split” single fields into multiple through bit-shifting and string manipulation.


ANDY=NO

by in Representative Line on

"Years ago," Mark wrote, "and long before I had started working there, the lead developer at my company tendered his resignation and starting up a firm of his own. It was a one-man consultancy built to service a single client: his former employer. They had little choice in retaining his services as, prior to leaving, he intentionally obfuscated all of the code.

"As part of Operation Obfuscation, he removed all of the unnecessary white space and (apparently) converted the code to all caps. Problems were compounded by the platform (some off-brand BASIC interpreter), his original choice of variable names (X, Y, Z, etc.), and the lack of any structures like subroutines. Developers came and, after hearing about code, quickly left. For a reason that escapes me to this day, I actually chose to stay and help them with their mess. It sounded like it could be a fun challenge.