When I write code, my goal is to take as few shortcuts as possible. People often ask me why I bother.

I bother because shortcuts join together like Voltron to tangle your code. I bother because it’s hard enough to read my code when it’s written well. I bother because I never know who’s going to be looking at my code.

Code quality is precisely the proverbial “back of the fence”. Perhaps apocryphally, Steve Jobs was known to care about small, sometimes invisible details. He would fuss over the beauty in a circuit’s design, because his father inspired him to consider the minutiae:

It was important, his father said, to craft the backs of cabinets and fences properly, even though they were hidden. “He loved doing things right. He even cared about the look of the parts you couldn’t see.”

It applies to more than just code and circuit boards. I’ve noticed the best designers that I’ve worked with have meticulously assembled PSD files. Deep hierarchies of organization, consistently-named layers, edges perfectly between pixels rather than on top of them. This attention to detail is reflected in the quality of the designs as well; truly, someone who sweats the details sweats the big picture, too.

The back of the fence never aligns with business metrics; code quality is no exception. It’s a second-order effect which can only affect your bottom line in indirect ways. It’s cheaper to write the code right the first time, rather than having to fix its bugs later. It’s cheaper to work with supple code, code that’s been designed with change in mind.

(There’s one little hack. If you’re working on an open-source project that’ll be used by developers, then your code quality is no longer merely adjacent to cost. You can effortlessly align your business metrics and code.)

In some cases, it’s not possible to draw even the most tenuous connection between the concerns of your business and back-of-the-fence style code quality. For those times, we might call it professional pride.

Joe Cieplinski is a designer who (not by coincidence, I’m sure!) creates extremely neat PSDs. I’ll leave you with some remarks from Joe’s talk at CocoaLove last year:

We don’t design beautiful things hoping that people notice. We design beautiful things knowing that they probably won’t. […] We do design for us. We do design because we want to sleep at night.