Coding green for the future

analysis
Jul 31, 20088 mins

The burden of green doesn't just fall on hardware vendors; software developers need to crank out slimmer, more eco-friendly code

We know that some computer hardware — PCs and servers, for example — are greener than others. They are built to be more energy efficient and easier to recycle, plus they use fewer hazardous materials. Certifications such as Energy Star and EPEAT make it easy to find at least some of those machines.

But can some software be greener, too? Most definitely. I had an interesting conversation on this very topic recently with author Tim Sanders, who makes a thought-provoking argument in his forthcoming book “Saving the World at Work: What Companies and Individuals Can Do to Go Beyond Making a Profit to Making a Difference.” He asserts that developers building Web 3.0 will embrace social responsibility and sustainability in the Web applications they produce.

Building socially responsible applications — those that can help fight world hunger or rally people to combat global warming — is a fascinating notion, one that I might explore at a future point. But this week, let’s look at three real-life examples where actual coding of applications in particular ways can result in waste reduction. That is, coding that results in more sustainable — or greener — applications.

EA’s Scrabble Beta vs. Scrabulous: Too much is not good enough

If you’re a Facebook user and a Scrabble fan, you’ve likely played Scrabulous. It’s a version of Scrabble and has been one of the most popular applications on Facebook. Unfortunately for the developers of Scrabulous, as well as its legions of fans, Hasbro, which holds the trademark for Scrabble, has successfully lobbied for Facebook to disable Scrabulous for U.S. and Canadian users, citing trademark infringement.

The company also teamed with Electronic Arts to develop its own version of Scrabble on Facebook. I believe that comparing this version of Scrabble to Scrabulous (still available free via the Web) provides another interesting case study in green programming.

In many ways, Scrabulous and Scrabble Beta are similar: They both adhere to the rules of Scrabble. They have the same style board with double-letters squares and triple-word scores and such. They both have dictionaries to check word legitimacy and little cheat cards to look up two-letter words. You can click a button to scramble your tiles to see if a word pops out as you mix the order. And so on.

There’s a huge difference, however, one that makes Scrabulous, in my view, a far greener application. The designers of Scrabble Beta decided to employ animation. Lots of animation. Pointless animation that brings nothing to the game-playing experience — unless you count a longer wait as “something.” Waiting for the game to load. Waiting for the board you’re playing to spin and grow larger when you’re ready to play a turn. Waiting for animation showing your points adding up.

Scrabulous, on the other hand, has little to no waiting. It’s quick, efficient, and snappy. And it has an elegant UI that makes it exceedingly simple to use. It’s no wonder the game has proven so popular — and addicting: The learning curve is minute and the game play is quick and seamless.

(Note: Between completing this and publishing it, I found that Scrabble Beta has been temporarily shut down. Developers plan to launch a finished version in mid-August, which will be “a streamlined app with the option to turn-off animations for faster gameplay.”)

Of course, this is just a game, right? Who cares, and what does it have to do with green programming? Well, imagine if this was a financial application for your company instead of a version of Scrabble. It was developed in-house and accessed by hundreds of employees each day. If your developers coded a Scrabulous-like version of the financial app, it would mean they’d have developed something with an elegant UI and no excess, time-wasting, resource-intensive bells and whistles that serve no purpose.

On the other hand, if they developed something akin to EA’s Scrabble Beta, you’d have a clunky, slow app that’s wasting user’s time — and putting extra strain on your servers. That’s really where the green element comes in. Now, I don’t know the system resources of the two apps I’m discussing here, but I’m willing to wager Scrabulous has far fewer system requirements. So if your developers went with the clunkier, eye-candy-filled app over the sleeker one, it would mean you’d have to throw more hardware into your server room or datacenter to make it run. (Charging the costs back to the department like Microsoft does could result in some swift recoding, by the way.)

Google vs. Cuil: A black-and-white issue

Google reigns over Internet search. It’s tough to argue otherwise (at least convincingly). And its Spartan interface has inspired imitation, including from an upstart search engine called Cuil (pronounced “cool”), which went live this week.

Beyond search capabilities and other features, there’s a big green difference between Cuil and Google: Cuil’s home page is almost entirely black whereas Google’s is almost entirely white. Research has shown that for most, if not all, popular display types, such as LCD, CRT, and plasma, displaying a black background requires less energy than displaying a white one. Thus, given how many computers worldwide access Google’s stark white home page each day, were Google to turn its home screen black, the result would be a cumulative savings of 750 MWh per year from all those monitors using just a little less juice. (That’s the magic of green; it scales tremendously.) This idea was put forth originally by Mark Ontkush in January 2007 in his ecoIron blog.

According to research cited by Ontkush, a CRT uses an average of 15 fewer watts when displaying a black background instead of a white one. Yes, CRTs are going extinct, but as of 2006, just more than 25 percent of the world still used them.

As for LCDs, a study in 2006 found that an LCD monitor saved as much as 3W by switching from a white to a black screen. At the moment, LCD is the dominant monitor technology — but plasma will likely overtake LCD over the next few years as prices come down.

When that happens, the energy savings going from white to black become even more significant. According to Ontkush, “a study conducted by G4TechTV using a Samsung 42 [inch] plasma display found a 191W differential for a white vs. black screen in normal mode, and a 138W differential in super energy savings mode.”

Now, one might argue that a stark black background is just too hard on the eyes to justify replacing white backgrounds with black — and not just for search engines. As I type, I am looking at a Word document with a white background, as well as IM windows behind them, also with white backgrounds. But perhaps going gray or some other muted colors between white and black would make a difference in saving energy, argues Sanders. It could make a difference in putting a big dent in that 750 MWh figure.

If you’re behind this, you can switch your search engine home page from Google to Cuil, if you like the engine (it’s had hiccups thus far), or consider Blackle, which uses the Google search engine but has a black background.

Windows Vista vs. Windows XP: Spare us pointless hardware upgrades

It’s been well documented that Windows Vista requires more computing power than Windows XP. Even systems that came out just prior to Vista’s release, marked with “Windows Vista Capable” stickers, lacked the oomph to run the OS, save for the most bare-bones version of the OS. Yet scores of companies have found there’s been little to no justification to make the costly, wasteful hardware upgrades necessary to migrate to Vista.

The point here is, it’s up to Microsoft and other software developers out there to trim their code for the sake of sustainability (as well as efficiency and performance). Yes, new machines are coming out every day, it seems, that are capable of crunching data and processing requests faster than ever. But there are also plenty of older machines out there that can hold their own just fine if you don’t burden them unnecessarily. There’s also a wealth of lower-power laptops. Just because your truck can haul a half-ton of lumber doesn’t mean you should put more wood in the back than necessary, right?

So there you have it: Yet another way an IT pro can “think green” while going about his or her daily tasks. The less bloated your code, the greener it is — plus it makes for a happier user, especially one who isn’t ready to dispose of a perfectly usable machine.

Tim Sanders’ book “Saving the World at Work: What Companies and Individuals Can Do to Go Beyond Making a Profit to Making a Difference” is due out Sept. 16.