Case Study

Quick jQuery rewrite replaces a week’s worth of buggy code

The client

The client provides web design services.

The problem

The client had been working with a front-end developer for more than a week to write the jQuery for a tab-based interface that fetched its content using AJAX. The interface was buggy in Firefox and broken in Internet Explorer, and the client had already exceeded the budget for the project. The client called on me to address the bugs and add some new features, all in time for a launch in a couple of days.

How we met

The client had advertised for a jQuery, HTML and CSS developer.

My solution

I rapidly ascertained that the existing code would need to be replaced; it had been written by a junior developer in over his head.

The basic pattern of the feature was one with which I was very familiar; I knew that I could rewrite it faster than I could fix it. I presented the client with a plan for rewriting the jQuery from the ground up: I would address fundamental structural issues, organize the code for easier extensibility, and make the code configurable for easier reuse. The client approved the plan; five hours later, the rewritten feature was complete.

The outcome

The client got well-written, extensible code in a matter of hours after struggling to get working code from the junior developer for more than a week. Now, they work with me directly at the beginning of projects rather than rolling the dice with junior developers who may not be able to deliver.