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, where he wrote about technology. He is currently freelancing and can be reached through his personal website, 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.

How to Cook Spaghetti Squash (and Why)

Cooking for yourself is one of the surest ways to eat well. Bestselling author Mark Bittman teaches James Hamblin the recipe that everyone is Googling.

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


How to Cook Spaghetti Squash (and Why)

Cooking for yourself is one of the surest ways to eat well.


Before Tinder, a Tree

Looking for your soulmate? Write a letter to the "Bridegroom's Oak" in Germany.


The Health Benefits of Going Outside

People spend too much time indoors. One solution: ecotherapy.


Where High Tech Meets the 1950s

Why did Green Bank, West Virginia, ban wireless signals? For science.


Yes, Quidditch Is Real

How J.K. Rowling's magical sport spread from Hogwarts to college campuses


Would You Live in a Treehouse?

A treehouse can be an ideal office space, vacation rental, and way of reconnecting with your youth.

More in Technology

Just In