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)

A Technicolor Time-Lapse of Alaska's Northern Lights

The beauty of aurora borealis, as seen from America's last frontier


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

What Do You Wish You Learned in College?

Ivy League academics reveal their undergrad regrets

Video

Famous Movies, Reimagined

From Apocalypse Now to The Lord of the Rings, this clever video puts a new spin on Hollywood's greatest hits.

Video

What Is a City?

Cities are like nothing else on Earth.

Video

CrossFit Versus Yoga: Choose a Side

How a workout becomes a social identity

Video

In Online Dating, Everyone's a Little Bit Racist

The co-founder of OKCupid shares findings from his analysis of millions of users' data.

Writers

Up
Down

More in Technology

Just In