Software Sucks, but It Doesn’t Have To
You can’t see, hear, taste, feel, or smell it, but software is everywhere around us. It underpins modern civilization even while consuming more energy, wealth, and time than it needs to and burping out a significant amount of carbon dioxide into the atmosphere. The software industry and the code it ships need to be much more efficient in order to minimize the emissions attributable to programs running in data centers and over transmission networks. Two approaches to software development featured in Spectrum‘s April 2024 issue can help us get there.
In “Why Bloat Is Still Software’s Biggest Vulnerability,” Bert Hubert pays homage to the famed computer scientist and inventor of Pascal, Niklaus Wirth, whose influential essay “A Plea for Lean Software” appeared in IEEE Computer in 1995. Wirth’s essay built on a methodology first conceived by Spectrum contributing editor Robert N. Charette, who in the early 1990s adapted the Toyota Production System for software development.
Hubert points out that bloated code offers giant attack surfaces for bad actors. Malicious hacks and ransomware attacks, not to mention run-of-the-mill software failures, are like the weather now: partly cloudy with a 50 percent chance of your app crashing or your personal information being circulated on the Dark Web. Back in the day, limited compute resources forced programmers to write lean code. Now, with much more robust resources at hand, coders are writing millions of lines of code for relatively simple apps that call on hundreds of libraries of, as Hubert says, “unknown provenance.”
“There’s an already existing large segment of the software-development ecosystem that cares about this space—they just haven’t known what to do.” —Asim Hussain, Green Web Foundation
Among other things, he argues for legislation along the lines of what the European Union is trying to enforce: “NIS2 for important services; the Cyber Resilience Act for almost all commercial software and electronic devices; and a revamped Product Liability Directive that also extends to software.” Hubert, a software developer himself, walks the lean walk: His 3-megabyte image-sharing program Trifecta does the same job as other programs that use hundreds of megabytes of code.
Lean software should, in theory, be green software. In other words, it should run so efficiently that it reduces the amount of energy used in data centers and transmission networks. Overall, the IT and communications sectors are estimated to account for 2 to 4 percent of global greenhouse gas emissions and, according to one 2018 study, could by 2040 reach 14 percent. And that study came out prior to the explosion in AI applications, whose insatiable hunger for computing resources and the power required to feed the algorithms exacerbates an already complicated problem.
Thankfully, several groups are working on solutions, including the Green Web Foundation. The GWF was spun up almost 20 years ago to figure out how the Internet is powered, and now has a goal of a fossil-free Internet by 2030.
There are three main ways to achieve that objective, according to the foundation’s chair and executive director Asim Hussain: Use less energy, use fewer physical resources, and use energy more prudently—by, for instance, having your apps do more when there’s power from wind and solar available and less when there’s not.
“There’s an already existing large segment of the software-development ecosystem that cares about this space—they just haven’t known what to do,” Hussain told Spectrum contributing editor Rina Diane Caballar. They do now, thanks to Caballar’s extensive reporting and the handy how-to guide she includes in “We Need to Decarbonize Software.” Programmers have the tools to make software leaner and greener. Now it’s up to them, and as we’ve seen in the EU, their legislators, to make sustainable and secure code their top priority. Software doesn’t have to suck.
IEEE Spectrum