Recent Articles

Jan 2006

Reporting All Through The Night

by in Feature Articles on

The reporting system had always been slow. But this is to be expected, so the consultants said, the reports are incredibly complex and couldn't possibly be completed in the short time you want.

As time went on and more data was entered, the reporting system started to drag down production system. But this is to be expected, the consultants said, the reports are incredibly complex and require a lot of resources to run, so we will run them on their own server.


Solution Injecting

by in Feature Articles on

The Entity Manager will present all business entities in a common format, the Big-5 consultant raved, allowing any application within the enterprise to access the CRM system. That, and the bargain-basement rate of £1000/developer/day, made the Entity Manager-based CRM system an install sell to management. A year and a few million pounds later, Mike Barker's company was the proud owner of a somewhat-functioning, fairly buggy CRM system.

But none of this really impacted Mike; his group had nothing to do with the CRM system. That is, until his system was required to interface with the CRM. Fortunately, working with the Entity Manager wasn't too bad. It was simply XML-in, XML-out ...


A Collection Of Comments

by in Coded Smorgasbord on

It's time once again to give all those cool-but-too-small-to-make-a-full-post submissions a home ...


Nick was disappointed that, despite all of GetGlobalTime()'s robustness, it didn't actually provide a method to apply the path integral transformation ...


Drive-By Architecture

by in Feature Articles on

Anne Wiggler has the pleasure of sitting directly across from a conference room. Although her location is the prime spot for scavenging lunch meeting leftovers, it does have its disadvantages. Managers, while waiting for the room to free up, will congregate around the door and hold a pre-meeting just in case anyone in the immediate vicinity was trying to write code and wasn't distracted enough already. Worse, some managers (especially the more jovial executive type) will notice Anne hard at work and stop by for a chat.

One of Anne's more recent chats was with a VP ("Bill Lumbergh"), who decided to stop by to enlighten her on the finer points of the new .NET technology. As she sat there, trying to write code in Visual Studio.NET, Bill hijacked her notepad and pen and started to explain what .NET was all about. Although Bill's explanation may have mixed up some of the finer details, such as "Smart Clients" and "N-Tiers", his diagram really cleared things up ...


Please Compile

by in Feature Articles on

When some people receive an error from the compiler, they see it as an indication that they are doing something fundamentally wrong and should change their code. Others see such a message as a challenge to overcome and strive to find a way to trick or force the compiler to do what they want. You can probably guess what camp Jon's predecessors fell in ...


A Representative Sample

by in Feature Articles on

When you're working on a system that's stagnated in the development phase for a few years and has chewed through more developers and teams than you even realized existed, it can be a daunting task just to explain why the system is as ridiculously bad as it is. As much as I'd love to feature such systems here, I suspect that most would prefer not to read thirty-seven pages just to get to the punch line. No less, Rick Harris was able find a *single line* of code that is a fair representation of such a system he was working on ...


The Storray Engine

by in Feature Articles on

As an independent .NET consultant, Steve gets called in to help smaller development teams to transition to the platform. Several weeks ago, a client had asked him to help rebuild some of their "core technologies" in .NET so they could offer it as a service to their clients. The first "technology" they wanted to upgrade was something called the Storray Engine.

At the requirements meeting, the brain behind the engine gave a quick summary: it's like having the benefit of a database without ever having to use SQL, ADO, or any of that stuff; just simple arrays. Then they dove into the code. First, they looked at the FindProducts.asp page. The beauty of it, the programmer explained, was that all you needed to do was include a single file, and you had access to all the products and could easily manipulate them with simple array functions ...


It's a Small World Afterall

by in Feature Articles on

Everyone at Mark's company knew about the Resource Allocation system. To say the least, it was a mess of a Java servlets held together with batch files, spreadsheets, and chewing gum, all developed by programmers who have long since been promoted to Lead Architect and Management roles. A slight change of winds was all that was needed to start a chain reactions of bugs: a while back, an edit to the configuration file to change the notification email address caused the system to bring down the email servers with a loop that became infinite when the config-file value didn't match the hard-coded value.

When word came down that the business would switch to ISO-3166 country codes throughout the enterprise, Mark knew this would have a devastating impact on the RA system. He bravely updated the COUNTRY_CODES table and prepared himself to battle a swarm of bugs. After it all was over, he was kind enough to share one of the more memorable finds from the DatabaseCache class ...


The Green, the Whole Green, and Nothing But the Green

by in Feature Articles on

Relational databases don't have Boolean data types for good reason: the inherent nature of tri-value logic (i.e., true, false, and unknown/null) makes it a logical impossibility. To compensate for this, developers will use a code of some sort to represent their data: 1/0, 'T'/'F', 'Y'/'N', or, in D.P.'s case, "green"/"red".

There's really no standard when it comes to encoding "Boolean"-like data in a database, leaving the choice up to the developer. Some prefer the ease of conversion from integers to Booleans, and stick with 1's and 0's. Others prefer a more natural representation and use a 'Y' or a 'N'. In D.P.'s case, I guess the developer just liked colors or traffic lights or something.


Styling With Classy CSS

by in Feature Articles on
A number of the submissions I receive here are in some way based around HTML. Bizarre as they may be, I generally excuse them: after all, just about any amateur can use some WYSWYG-editor to mangle HTML. And besides, HTML really isn't programming. But no less, I couldn't pass up this find by Sam Gabrielsson. He happened to browse the HTML-source of TV.com and noticed some interesting CSS-class references ...

<div class="mr-5 f-xbig f-bold">1.</div>

<td class="f-white f-bold p-5 f-medium ta-r" style="border-top:1px solid #093B70;">

<td class="ta-r f-white pr-10">NBC</td>

Ask Thrice and Ye Shall Receive

by in Feature Articles on

Unlike many of his fresh-out-of-college peers, Sam Snee is a developer who actually understands that he doesn't know everything. He recognizes that there are a whole lot of techniques, practices, and methodologies that he has yet to learn and keeps this in mind before screaming WTF when looking at his predecessor's code. No less, he was pretty sure that something just wasn't right when he kept seeing "triple-checks" within a 28,600-line dataset-building class he was maintaining ...


Toss Your Cookies Round 'n' Round

by in Feature Articles on

Today's post is a revisit of a classic, Tossing Your Cookies.

As you read this short introduction, I'm guessing that you can see today's code in your peripheral vision and are wondering, Tossing Your Cookies? What does that have to do with a huge, ugly SQL statement? I'll let the combination of "Cookies" and "SQL" sink in for a moment ........ ahh, there it is. And yes, it's exactly what your thinking. It's from the system that Chris F inherited and is used to redirect the browser to a results page, execute the "SQL cookie" (as the sa user, of course), and display the results in a grid.


Party Assortment

by in Feature Articles on

Just a quick handful of miscellaneousness today ...

Jason Mauss never gets invited to the cool parties. He's always stuck reading about them in SQL+ and TOAD while trying to learn the system and look at the database schema ...


A Happy Happy Birthday

by in Feature Articles on

One of the senior programmers on Steve's team is responsible for approving requests by their clients to add functionality to their project. Unfortunately, he's not very strong at estimating the technical challenges of the request or determining who on the team has the time to implement the requirements.

Given that, no one was surprised that he agreed to add a last-minute feature to email customers and give them a "happy birthday" coupon. The real surprise came when he learned that he'd have to actually implement the change. You see, as it turns out, programming wasn't this programmer's strong point either ...


A Date of Infamy

by in Feature Articles on

Without many of the built-in date/time functions found in other languages, some Perl users can find themselves having to write some interesting code in order to get the results they want. Sure, it's pretty easy to reference the DateTime module, or a whole host of other modules to help with this, but who wants to use code that someone else invented? Some resort to fiddling with the number of seconds since epoch returned by the time() function. Others, such as Mike's predecessor, issue an operating system command to write the date out to text file, read the file back in, parse it, and use the result ...


Avoiding The Dreaded Exclamation Point

by in Feature Articles on

One of the countless things that the Internet has introduced is the rampant abuse of the exclamation point. Before blogs, IMs, and message boards, the "."-to-"!" ratio was something like 100-to-1. Now that we're in the "OMG!!!!LOL!!!!!!"-days, it's hard enough to find a sentence with a single punctuation mark, let alone a period.

Thankfully, there's some sanity left. Some people are so fed up with this overuse that they refuse to use the exclamation point anywhere. For anything. Even when writing code. Sure, it may make their code a bit strange, but every little bit counts ...


Correcter Rounding

by in Feature Articles on

Rounding is one of those things that seems to be a fairly difficult for programmers. Although the built-in rounding functions of many programming languages have helped a lot of programmers embarrass themselves, some still choose (or, in C/C++, are forced) to take a stab at it. But it's just a simple combination of floor(). ceil(), and arithmetic, you might think. An anonymous submitter ("Isostar") found out that some choose to use sprintf() for this ...


Pop-up Potpourri: Sixth Time is the Charm

by in Pop-up Potpourri on

Just in case you missed last month's, you can find it here: Pop-up Potpourri: ?????(p???? Edition.


Juha Nieminen was surprised to see that he could actually take a stroll around the planet before his 4GB-worth-of movies finished copying ...


Imaging In Line

by in Feature Articles on

Shortly after taking a new job, Graham noticed that his new colleagues had a rather peculiar metric for determining software quality: cleverness. The standard measurements of cost, performance, maintainability, and so on, were afterthoughts -- nay, hindrances -- to their vision. Oh no, they were special, and so would be the software that they developed.

One of Graham's first tasks was an apparently common one for the developers there: add an image to the site so that the graphic designer may use it. It seemed a bit odd of a task; after all, the designers had full access to the site, why could they drop their .gif image into an /images folder? No less, Graham complied and sought out the /images folder to place the image in.


Yessssssss! Noooooooo!

by in Feature Articles on

One of Paul's first assignments on a new contract seemed fairly simple ...

Produce a report that will list the Case Number, Officer Name, and Days Open for all remote offices where the case is TPS Reportable.


Whaddya Mean It's VBA-based?

by in Feature Articles on

If you've ever been asked the question "whaddya mean it's VBA-based?", you're likely familiar with the moment of sadistic glee that follows. After all, before you stands a naïve programmer who believes that VBA (i.e. Word/Excel macros) is a simple tool for increasing the usability of forms and similar documents. Not only do you get to crush his untainted worldview by divulging that entire information systems are built on VBA, but you get to tell him that he will be responsible for maintaining such a system.

A few years back, John was that naïve programmer. When his company merged two locations, his group inherited an in-house "application" developed by the programmer at the other location. Note that the word application is in quotes; I'm not quite sure if one can define thirty-four interconnected spreadsheets and six separate databases as an application.