The Beauty of Inefficient Code

More

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.

Jump to comments
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.
Get Today's Top Stories in Your Inbox (preview)

Why Do Men Assume They're So Great?

Katty Kay and Claire Shipman, authors of this month's Atlantic cover story, sit down with Hanna Rosin to discuss the power of confidence and how self doubt holds women back. 


Elsewhere on the web

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

Where Time Comes From

The clocks that coordinate your cellphone, GPS, and more

Video

Computer Vision Syndrome and You

Save your eyes. Take breaks.

Video

What Happens in 60 Seconds

Quantifying human activity around the world

Writers

Up
Down

More in Technology

Just In