Recent Articles

Nov 2006

The Wi-Fi Initiative at WTF University

by in Feature Articles on

Niklas B considered himself lucky. His dormitory at West Thomson-Friedman* University (also known as WTFU) was the first selected to participate in the campus-wide Wi-Fi Initiative. This meant that he'd be able to take his laptop and work in the more-comfortable areas of the building instead of staying cramped up in his room. Of course, like everything else at WTFU, the Wi-Fi Initiative didn't quite work like one might expect. Connecting to the wireless network required tilting one's laptop to a randomly-changing angle, waiting until the solar azimuth and winds were just right, and not only crossing one's fingers on both hands, but crossing the arms over each other as well. It was a bit inconvenient to say the least.

Achieving such low wireless performance is not an easy task, especially when using the commercial-grade wireless equipment that WTFU purchased. Finding a proprietary wireless authentication application that manages to freeze any computer unlucky enough to drop the wireless signal is an even bigger challenge. Thankfully, the cleverness of WTFU's IT department knows no bounds. They found the perfect location for the dormitory's high-powered wireless router: the basement kitchen.


K.I.T.T. on a Critical Mission

by in Feature Articles on

Christian P felt kind of bad. His company had just been awarded a contract to take over in-house software development at a fairly large underwriting agency. Not only would six developers be laid off immediately, but the remaining three would be responsible for transitioning their replacements before getting laid off. On Christian's first day, he was prepared to be met with anger, sadness, resentment, hopelessness, and even hatred. But there was none of that; instead, it seemed as if the outgoing developers had a feeling of relief.

After his first day of training, Christian no longer felt bad for the laid off employees. In fact, he was a bit envious of them. The system that they had been maintaining was best summed up in a single world: miraculous. Not "miraculous" as in, an amazing suite of business applications that transformed productivity and caused profits to skyrocket. I mean "miraculous" as in, surviving after being shot twelve times, thrown from an airplane, landing on a rosebush with a hornets nest inside, dragged out to the river by a bear, carried downstream over Grade VI rapids, and spit out to the ocean for a three-day tread. Because that pretty much describes what their system went through. It also explained why none of the developers were interested in working as contractors for 50% more than they were making as employees.


setDirty( true )

by in CodeSOD on

Today's code snippet come to us from Carl Cerecke. Carl is currently deep within the bowels of a large government application trying to complete a minor defect fix. This application is used throughout the country of New Zealand by the front line staff dealing with a sizeable percentage of the citizens. Carl knows a couple of these front line staff personally and they hate the software. Carl writes, "I work for the large international software house that has the support and maintenance contract on this impenetrable piece of enterprisey spaghetti code."

Carl continues, "here's a piece of code that has nothing to do with the defect I'm trying to fix. At least I don't think it does. It did, however, jump out at me while scrolling through the file as an exemplar examplar of the sort of code littered around the project. I had to use a pen and paper to work out exactly what conditions the setDirty(true) call was made. It was no real surprise that the if statements can be replaced entirely by a much more understandable one-liner."


Don't Worry, We'll Fix It!

by in Feature Articles on

We're in a bit of a jam, an email to the support desk read, we accidentally ran an entire day's worth of transactions for 11 Oct 2009 instead of 11 Oct 2006. Can you fix this?

In the world of retail, it's not an uncommon practice to "open" for a business date that is not the current date. Think of 24-hour stores that want to "close" the day at 11:00 PM instead of midnight, or the cases when the registers are out of commission. Whatever the reason, it's a feature that customers want and a feature that T. Ferguson's company provides in their point-of-sale systems.


Passwords! Get Your Free Passwords Here!

by in CodeSOD on

Today's Code Snippet comes from Christopher Stolworthy. Christopher has a friend who is attending an upstanding college to get his Bachelors of Science in Computer Science. One day this friend called him up... "He wanted me to test out his new login system that he had written in C#, using SQL Server. I agreed and he sent me his app. I was playing around with it when I noticed something interesting. After typing in my username I would begin to type my password, if I mistyped a character ANYWHERE in the field the app immediately threw an error. "This is interesting" I thought to myself. So I dove into the code, after a few minutes I found the following. He couldn't see where the security issue was, until I used "Admin" as the username and started guessing his password."


The /etc/bus

by in Feature Articles on

Back in the early 90's, Steve worked at a certain blue company known for its putty colored machines that cost a lot of green. This company was trying to make a big splash for itself in the UNIX market and wanted to convince technical folks that they "got it." And Steve had just the idea to help them out.


The Seven Levels of SQL

by in CodeSOD on

This just absolutely amazes me.
RJ Writes, "When I first began working at the company in question, I was trying to get a handle on the flow of database queries during a fund transfer, so I enabled query logging, and stepped through an example transaction. (Platform, PHP/MySQL on Linux). For any who read this: DON'T PANIC - the system never saw real production use until after it was completely revamped in a proper DBMS.

Order of SQL Queries for "Dispatcher sending funds" transaction:


Coded Smorgasbord: Prepare For Return

by in Coded Smorgasbord on

For more fun-but-not-necessarily-bad code, check out the previous episode: Coded Smorgasboard: Muhahahahaha


It's not that Thorsten doesn't have a sense of humor, it's just that finding this function (which simply processes a list of names and converts them to proper case) after hours of debugging several similarly named functions, it gets a little tiring ...


Representative Line: Spreading the Holiday Jeer

by in Representative Line on

For those of you stuck at work today, or in one of those 191 countries that don't celebrate Thanksgiving Day today, or -- *gasp* -- actually reading this from home while on holiday, here's a Representative Line that should get you in the holiday spirit. It's the subject of an email sent by the CFO to Mike and the rest of the company ...

New Expense Policy: No employee celebrations


Print or Fish

by in Feature Articles on

Today's story is a lot different than most the stories I share here. It's not one of incompetence, failure, disaster, or anything like that -- in fact, it's kind of the opposite of that. I thought it'd be a nice lead-in for the four-day Thanksgiving weekend.

 


The Super Secure Web Service

by in Feature Articles on

Everyone tolerated Steve. Some even got a kick out of his antics: whenever a successful project was nearing launch, Steve would rush in to "rescue" it. He'd send off warning emails to everyone, saying the testing was not conclusive, the deployment plan was incomplete, and the code was riddled with bugs. Then he'd call for a "weekend crunch" to make things right and slave away as the project's sole martyr when no one else would come in. Granted, he would never actually check-in code or make any other changes, but he'd always take credit for the project. No one bought it, and that's why it was so funny. Well, funny until he was promoted to management.

Steve's new management role was to lead the software architects, who were responsible for designing all of the applications throughout the company. He believed in "leading by example" and wanted to show everyone that he knew what he was going. To do this, he'd need to come up with a new initiative. An impressive initiative. One that would simplify all development across the company. Then it hit him: Web Services.


XML vs CSV : The Choice is Obvious

by in CodeSOD on

Today's Code Snippet comes from Rob O. Rob was working in a company (as a contractor) on different projects for almost a year before he was asked to sit in on a meeting with two vendors and two business analysts. Rob failed to notice during the discussion one of the third parties furiously writing notes every time they were asked about XML.

They had not gotten very far with the technical details of the project, but the business analysts knew what they wanted. Buzz-word compliance. The buzz-word: XML.


Saved By The Burst

by in Feature Articles on

One of the more popular ideas from the dot-com days was creating a payment service provider company. It's hard to say why; perhaps their founders believed that we really needed yet another "layer of abstraction" in commerce? Perhaps they thought that merchants would sign up in droves when they heard about the opportunity to give away yet another percentage of each sale to a middleman? Whatever the reason, no one signed up and most providers collapsed as soon as their funding dried up. Well, I shouldn't say "no one;" there were a few businesses that took the bait. <b>Diez B. Roggisch's</b> company was one of them.

Diez worked for a fairly large travel agency that did a lot of third-party hotel reservations. There's nothing new about third-party reservations -- agency reserves a room with customer's credit card, hotel bills the customer, agency gets a cut -- and that lack of newness was exactly why Diez's company wanted to change. They wanted to jump on the dot-com bandwagon and become an online travel agency. A new executive was brought in to make this happen.


Triple Play

by in CodeSOD on

Today's Code Snippet of the day is legion. I ran across several snippets that don't necessarily stand on their own, but deserve to be gently* laughed at anyway. We start with a recursive error handler...

I.F. writes, "This might be interesting for discussion. Found in the wild on production system. management summary (in Java) of my investigation of a production bug.
 public boolean aMethod(Object anObject) {
  try {
   /*
    * Some 50 lines of unreadable obfuscated code littered with
    * return statements, throwing some exceptions and performing
    * various exception prone operations like:
    * - parsing
    * - database access
    * - calling other methods of similar signature (but not catching Exception)
    */
   return true;
  } catch (Exception e /*PANIC. NEVER DO THIS AT HOME*/) {
   //call a method of similar signature
   aMethod(anObject); //RECURSION in exception handler => BUG => PANIC
  }
 }


Tales from the Interview

by in Tales from the Interview on

It's been a long, long time since I've run interview stories. Too long. Here's a few of my favorites; feel free to send in some of your own for next time.

The Wanderer
From Peter Szymonik, the VP of Technology Operations at a technology company ...


Lacking Knowledge Essentials

by in Feature Articles on

It was a very exciting email: "Dave, Binnentech is definitely interested in a trial run! Can you go to Amsterdam for two weeks to do the setup and presentation?" While frequent business travelers might dread such a request, Dave had only been on a single business trip in his career, and even then, it was just an overnighter to Ottawa which was just a few hundred kilometers across the province. He couldn't pass it up an overseas journey like this.

Dave's company had been courting Binnentech for nearly eighteen months, trying to get them to buy their Enterprise Knowledge Management system. It was actually a pretty slick system and would have been a great fit for an international giant like Binnentech, if only it wasn't so expensive. Not in terms of licensing costs or fees, but in how much time it would take for Binnentech engineers to migrate to the new system.


It Must Have Been Using Those Files

by in Feature Articles on

Though it's taken a little more than a decade, Paul has finally been able to live down his reputation: it's been a full year and no one has referred to him as "the guy who ruined The Merge." It's not that Paul is eager to stir up memories of his great blunder which, in all likelihood, will make him "that guy" again for the next ten years; he just wanted to share his story in the hopes that other young and eager consultants will listen and not succumb to his fate.

It was the eve of The Merge, a day that two companies (Intertrode and Initech) and Paul's consulting firm had been planning for months. All of Initech's customer data and transaction processing was to be moved into Intertrode's Unix-based Enterprise Resource Planning system.


We Have Met the Enemy

by in CodeSOD on

Today's Code Snippet comes from two different people, Nate and Mike. I felt these were each too small to post by themselves(maybe we'll get to 200 comments?!), so I decided to give a little more. To try a little harder. To reach a little deeper. To, to... Never mind, here's the code.

Nate writes, "Having recently started a new programming job, I've quickly discovered what most of the day-to-day grind entails: Deciphering and cleaning poorly written Visual Basic code before actually being able to perform my assigned work. Our code base has plenty of the usual suspects: Variables with meaningless names like "AA" and "bbb", thousand-line functions (which approach VB's built-in limits), no-ops, unreachable code, gobs of copy-and-pasted code, and a few instances of this little construct (irrelevant code removed):"


Representative Line: Tetricosanary Logic

by in Representative Line on

Good news, everyone: it's time for a new series! Technically, this is not the first time that I've presented a 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. However, going back and renaming the old articles is a bit of a hassle, so I'll just pretend this is the first episode.

Today's Representative Line was uncovered by Hank Miller while he was "getting to know" a titanic system by fixing some of its bugs. This following function definition pretty much sums what the whole system is about ...


Please Select Fewer Files

by in CodeSOD on

Today's Code Snippet comes to us from Hank M. Hank writes, "It was my third week on the job, and that morning the custom compiler they wrote for their in-house language (steaming pile of WTFs) quit working." Standard debugging revealed that the executable didn't change, and reverting source control to when it worked, both source files and executable (just to make sure) didn't help.

Hank continues, "Fortunately the source code to the compiler was in source control, so I was able to run a debugger to find the problem. Here are the problem lines. Note that this is C++, not C, so std::string and helpers exist. See if you can guess why it didn't work."


Fisher Price Technology Integration

by in Feature Articles on

Ryan H was pretty excited to start his new job as a developer. But his excitement quickly faded after he started. It didn't fade into apprehension, disappointment, or regret -- just into nothing; he simply stopped feeling anything at all. This type of apathy is to be expected when one is given the type of assignment that Ryan was given: absolutely nothing. Ryan's day to day job was to sit and patiently wait for the company to start up a project.

Ryan's manager was in the same position; the business was still trying to decide what it wanted to do and their small team was forbidden from doing any type of development work in the mean time. So they all did nothing. Well, not "nothing" nothing -- everyone knows that a lack of work is no excuse for not working -- it was more a delicate balancing act of trying to look busy while not looking so busy as to give the impression that more help is needed. After all, that's how they ended up with Ryan.


The Magnitude of Ineptitude

by in CodeSOD on

Today's Code Snippet comes from [Name blanked out to protect the innocent - Hereafter referred to as Mr. X.]. Mr X is a programmer who works on proprietary embedded systems which means that often what is considered by many to be "stdlib" functions aren't available and one has to first write the utilities that one needs. This, of course, allows for excellent possibility of spectacular results...

Mr X. writes, "I was recently required to port some code (originally written by a third-party) to a slightly different architecture, it was to be a journey; I laughed, I cried, I wanted to strangle someone... but hopefully I can summarize. I give you the atoi implementation from hell."


Pop-up Potpourri: It's Getting a Little NaN Outside

by in Pop-up Potpourri on

For many, many more, check out the previous article from the series, Pop-up Potpourri: You Can Quote Me On That


I can't say that Tor was really surprised when the Help button responded with a "no help topic associated with this item" ...


Smooth, Like a Factory

by in Feature Articles on

Daren S knew that his days were numbered. He was a troublemaker bent on changing The Way Things Were and The Director was hot on his tail. Though Daren worked discreetly, improving his coworkers' productivity a little bit at a time, it only was inevitable that The Director would eventually find out. One does not become The Director by letting such things slide.

A financial services provider, Daren's company did a lot of data processing and aggregation from a lot of different sources. The Director acknowledged that their processes were "a little rough around the edges" but insisted that they ran "smooth, like a factory." An accurate analogy I'd say, especially considering what the typical industrial factory is like: poisonous steam pipes spewing death gas every three seconds; razor-sharp pinwheel governors spinning at different yet predictable intervals; and giant, spiked stampers slamming down on conveyer belts running different speeds in varying direction, all placed inconveniently at the entrance and exit so that they must be meticulously navigated to avoid a significant loss of Life Points. At least, that's what every factory I've been in was like.


The Mentor

by in CodeSOD on

Today's Code Snippet comes from Chris. Chris has had the distinct pleasure of being "mentored" by an amazing individual. Some time passed, then Chris bumped into The Mentor again. This time Chris had to rework a web site The Mentor had, dare I say, created? As Chris was going through the code for the page design, he noticed something curious about the footer. No matter where the page was scrolled to, the footer always showed up. "Very nice", he thought to himself, "I wonder where he got the script?" Turns out The Mentor had written it himself.

The layout for the site was made from a giant table with 1 row and 3 columns, navigation, content and a spacer column. The method he used to put the footer into place was interesting (putting it nicely). Instead of moving the footer itself and stretching the container with it (a widely documented process), The Mentor decided to resize the spacer image... one, pixel, at, a time.


The Joe Board

by in Feature Articles on

The IT recruiters at Josh K's company have a certain knack for finding the best contractors. I don't mean "best" in a programming or development sort of way, more in a I'm-impressed-that-this-guy-can-actually-spell-.NET sort of way. When Joe, a contractor with "an intense knowledge of .NET and SQL Server" and "acclaimed web development skills", was brought in, Josh and his coworkers thought they'd try something a little different. Instead of gripe and complain about his ineptitude, they'd create The Joe Board.

The Joe Board was simply a large whiteboard hung up in Josh's office. The goal was to see how much white space they could fill up with "Joeisms" before Joe's contract would inevitably be terminated early. Amazingly, and despite the fact that Joe was let go only four weeks after his three-month contract started, they ran out of whiteboard space. Following are some their favorite Joeisms ...


Investment Advice

by in CodeSOD on

Today's snippet, courtesy of James Curran, is short. However it has two problems. Can you spot them?

Which do you spot first? The major problem which happens rarely, or the minor problem which happens every call? I actually shouldn't call the second problem minor as I always treat memory leaks as a Big Deal TM.


A UPS Should Be Fine

by in Feature Articles on

James works at one of the few companies where maintaining a high-reliability environment is important. Actually, it's more than important, it's required by law. The company is a natural gas supplier and needs to ensure that their Problem Alert & Monitoring (PAM) system is always running. And for good reason: PAM is responsible for coordinating, dispatching, and directing emergency crew to problems like gas leaks and pipeline explosions.

Creating an environment that systems like PAM require is not an easy task. First, there's data backup, both on- and off-site. Then there's the fail-over/clustered server. And the diesel generator. And the backup generator. And, of course, around-the-clock, on-site staff to monitor everything. But their PAM didn't live in such an environment. James' company had a slightly different strategy for reliability: a thirty-minute UPS and a lot of faith.


The Jewel of the File

by in CodeSOD on

Today's Code snippet comes to us from Jeff Miller. He was asked to take a look at a script that was running slowly. This script opened a file and read it in. One of the very first things he noticed was something that was happening with each pass of the loop that read the file.

He writes, "I noticed first off that the file was being re-opened with each pass of the loop and somehow it was managing to process each line of the file by only using ReadLine."


Yes, It Really is Three Tiers

by in Feature Articles on

Several years back, Jack Herrington worked at a Web 1.0 company. Of course, no one called it "Web 1.0" back then; it was simply the "Dot-com Era" or the "Internet Age." Personally, I think the version numbers are okay, but I'd prefer if we all used nonsensical acronyms: "Web QM3200" or "Web ZXT." Come on, you know you want to surf the Web ZXT.

In any case, Jack's company had been around a few years prior to Web 1.0 and was doing fairly well for themselves. And that was the problem: they were only doing "fairly well." They wanted to be doing "IPO-well." And what better way to do this than embrace one of the new technologies offered by Web 1.0: Java. All they'd have to do is turn their Perl operation into a Java one.


It Doubles as a Saw Horse

by in Feature Articles on

A little more than a decade ago, John Rudd was a Computer Science student at the Georgia Institute of Technology. He worked closely with the university's IT department and played a vital role in the creation of a new state-of-the-art data center: he unplugged and labeled cables before the movers relocated the servers and plugged them back in at their new location. There was one thing that struck John as being a bit different: the data center wasn't fully built yet.

For the most part, the data center was complete and needed just a bit of interior work. This wasn't a big deal, though, as the contractors built a wall of plastic sheets around the area to be worked on and draped the servers with a giant plastic sheet, just to be safe. Some of the network administrators were worried about heat build-up, but after a few days of carefully monitoring the servers and watching them run cool and without issue, they worried no more.


Please Supply a Test Case

by in CodeSOD on

Today's code snippet comes to us from Tobias Tobiasen. The company he works for used to include a third-party closed-source HTTP client in their product. Being a little worried about having to support their product without the source code for the HTTP client, they asked for a source code license. After paying an obscene amount of money for it (red flag #1) they finally got it.

While browsing though the source code, he found all sorts of odd comments like:


Crash Test _dummy

by in Feature Articles on

One thing I miss about working at a large corporation is being a part of a team that maintains a large business application. Well, that, and reading Slashdot all day. But let me clarify what I mean by the "team" thing. You see, working on the application itself isn't very fun. Actually, it pretty much sucks: large system, horrific codebase, ridiculous management, the whole nine yards. But watching other people work on it, especially the newbies -- now that's great!

You see, when a newbie joins such a team, he's generally coming from a small company that hired him straight out of college. He's full of hope and optimism, and is ready to dive in and make the world -- or, at least, the application -- a better place. And I should clarify that, when I said "watching other people work," I actually meant "watching their spirit get completely crushed by the monstrosity that has become their daily life." I admit it; I'm a bit of a sadist.


Happy Merge Day!

by in Feature Articles on

Today is a very special day for quite a few of you out there; you know who you are. For those of you not fortunate enough to work for a certain leader in the travel industry with a certain brand that is a household name, allow me to explain what Merge Day is all about. Jim M got to live through it for nearly two years.

It all started a few years ago when the company -- whom I'll call ediabitzocity59line.com -- decided to undertake the biggest technology project they had ever done: create the end-all, be-all of ecommerce websites. It was to be built from scratch and be internationalized, service-oriented, and all-around enterprisey.