Skip Navigation
Niraj Chokshi

Niraj Chokshi - 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 Beauty of Inefficient Code

By Niraj Chokshi
Jul 29 2010, 12:58 PM ET Comment

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

More at The Atlantic

Whitney Houston Has Died Whitney Houston's Greatest Hits
Until Yesterday, Kickstarter Had No $1 Million Projects—Today, It Has 2 Kickstarter Celebrates a Record-Setting Day
Picture of the Day: The Supermassive Black Hole That's Eating Asteroids in Our Own Galaxy The Milky Way's Asteroid-Eating Black Hole
Twelve Hours at CPAC, the 'Mardis Gras of the Right' 12 Hours at CPAC, the 'Mardi Gras of the Right'
Know Your Internet: What Is Pinterest and Why Should I Care? Know Your Internet: What Is Pinterest and Why Should I Care?

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
Special Report
Election 2012 Reuters Election 2012
The destination for full politics coverage, from the primaries to the White House. Read more ›

Just In

View All Correspondents

The Biggest Story in Photos

The Civil War, Part 3: The Stereographs

Feb 10, 2012

Subscribe Now

SAVE 59%! 10 issues JUST $2.45 PER COPY

Facebook

Newsletters

Sign up to receive our free newsletters

(sample)

(sample)

(sample)

(sample)