The Beauty of Inefficient Code

For most online coders, efficiency no longer matters -- and that's a good thing.

Computers are fast enough that the difference between elegant and crude code is, on a small scale, virtually indistinguishable to users, as former Twitter engineer Alex Payne wrote recently in a blog post (on a different topic altogether). Throw something together that's good enough and it will just work.

The power of today's hardware is such that, for example, you can build a web application that supports thousands of users using one of the slowest available programming languages, brutally inefficient datastore access and storage patterns, zero caching, no sensible distribution of work, no attention to locality, etc. etc. Basically, you can apply every available anti-pattern and still come out the other end with a workable system, simply because the hardware can move faster than your bad decision-making.

That's a good thing because programmers can quickly and easily create prototypes for their ideas, he explains. But it also opens the door to innovation. So what if it takes 100 lines of code to do what could be done in 10? Who cares if an app could be twice as fast when it only means a difference of milliseconds? On a small scale, these differences are imperceptible to users. As commenters will no doubt point out, perfection and efficiency should always be the goal. But the bottom line is that, with servers and PC's as fast as they are, if it works it works.

It's the software equivalent of the good-enough revolution, the idea that consumers are willing to settle for imperfect products that get the job done. The New York Times offered an explanation of it in 2008, which Wired elaborated on a year later:

Cheap, fast, simple tools are suddenly everywhere. We get our breaking news from blogs, we make spotty long-distance calls on Skype, we watch video on small computer screens rather than TVs, and more and more of us are carrying around dinky, low-power netbook computers that are just good enough to meet our surfing and emailing needs. The low end has never been riding higher.

Of course, there are advantages to high-end applications. Well-written code is secure. It's easy to analyze, fix and pass on to other competent programmers and, importantly, it's scalable -- it performs similarly whether 10 or 10,000 people are using it. Lightning-fast, efficient code is especially crucial for wildly popular services like Payne's former employer Twitter, whose rapid growth has been plagued by Fail-Whale downtime.

But for all the exacting requirements of large-scale software development, there's something to be said for empowering the amateur who has a great idea, but a less-than-stellar ability to program, with the means to do so.

Presented by

Niraj Chokshi is a former staff editor at TheAtlantic.com, where he wrote about technology. He is currently freelancing and can be reached through his personal website, NirajC.com. More

Niraj previously reported on the business of the nation's largest law firms for The Recorder, a San Francisco legal newspaper. He has also been published in The Hartford Courant, The Seattle Times and The Age, in Melbourne, Australia. He's also a longtime programmer and sometimes website designer.

The Blacksmith: A Short Film About Art Forged From Metal

"I'm exploiting the maximum of what you can ask a piece of metal to do."

Join the Discussion

After you comment, click Post. If you’re not already logged in you will be asked to log in or register.

blog comments powered by Disqus

Video

Riding Unicycles in a Cave

"If you fall down and break your leg, there's no way out."

Video

Carrot: A Pitch-Perfect Satire of Tech

"It's not just a vegetable. It's what a vegetable should be."

Video

An Ingenious 360-Degree Time-Lapse

Watch the world become a cartoonishly small playground

Video

The Benefits of Living Alone on a Mountain

"You really have to love solitary time by yourself."

Video

The Rise of the Cat Tattoo

How a Brooklyn tattoo artist popularized the "cattoo"

More in Technology

Just In