The Cardboard Architect (#3 in a series)

Photo Apr 01, 3 34 00 PM

Oh hell he’s got that crazy look in his eye again.

Part of this job is learning how to think like a computer. Or worse, like a stack of computers, communicating with each other faster than you can possibly comprehend on a variety of channels and protocols, each with its own quirks. You need to be able to place yourself, mentally, in a stream of data as it’s being processed and understand the interactions taking place. Minor details can cause big changes in interactivity.

At the same time, you need to be able to model users, model your coworkers, anticipate their usage patterns, desires, constraints. You need to understand these touchpoints, because they’re how the quirks get introduced in the first place.

I recently had a system break down because somebody put the wrong kind of slash in an <img /> tag seven years ago. He used IE and it worked. Our test engine uses Firefox and it didn’t — but the img was a spacer, being used for an onload hook that performed a no-op. So the fact that Firefox couldn’t render the image, and thus didn’t fire the event, was never picked up. (Blah blah unit test your javascript, I know I know.)

Anyhow. We accidentally fixed the image problem with a system upgrade, which immediately caused 45 tests to fail. Because over the years, lots of devs had copied and pasted the broken code. And, assuming it worked, lots of operations had been inserted into that hook. When they didn’t fire, some people just left them in there as they thrashed about trying to hack the system into a working state.

This made no sense whatsoever. Here we’ve got two systems with identical HTML, one is all kinds of broken, the other works fine. It made no sense that this would be possible. I pulled half the office over to my desk to illustrate this and people agreed. It wasn’t possible, but it was happening.

When I figured out the answer — an upgrade of a gateway was causing the incorrect slash to flip and identify a resource, firing a glut of unwanted javascript with that newly enabled onload hook — I was nowhere near a computer. I was driving my car, exploring the problem through thought experiments. I was so excited I had to pull over and email everybody involved.

Cop shows have a trope about thinking like a criminal to catch a criminal. Sometimes, in this job, you have to think like a poorly programmed system to fix that system. It can make you crazy. It can make you giddy. And damn it feels good to figure these things out.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s