Non-FictionForecast & OutlookGreen Software
Green Software Efficiency Guide eBook
Discover energy-efficient code, carbon-aware compu
by Snell Lon
Discover energy-efficient code, carbon-aware computing, and sustainable software engineering practices.
Formats
Free sample
Chapter 1: Your Laptop Is Lying--–- The screen is bright. The fans are silent. Your cursor blinks patiently, awaiting your next command. Everything about this moment feels clean, digital, weightless. You are writing code—or deploying a container, or querying a database—and the only thing leaving your workstation is intention.
No smoke. No exhaust. No visible cost.That is the lie.Behind the drywall of your office, behind the seamless abstraction of "the cloud," behind the kindly progress bar that says "Deploying to production," there is a physical world burning fossil fuels to keep your software alive. The data center that hosts your application is not a fluffy white cumulus. It is a building the size of several football fields, filled with racks of screaming metal servers, each one pulling hundreds of watts, each watt tracing back to a power plant that is likely, right now, burning natural gas or coal.Your software has a carbon footprint.
Not metaphorically. Not in a vague, "everything we do impacts the planet" way. Measurably. Legally. Expensively.This chapter dismantles the myth of software as a purely virtual product.
We will trace the physical journey of a single line of code—from your keyboard to a server to a user's phone—and tally every joule along the way. We will introduce the two complementary pillars of green software that form the foundation for the entire book. And we will confront a startling fact: the global information technology sector now accounts for an estimated 2 to 4 percent of all carbon emissions, a share roughly equivalent to the aviation industry. Unlike a jet, however, your code does not leave a visible contrail. That invisibility is not innocence.
It is opacity.By the end of this chapter, you will never look at a terminal window the same way again.The Physical Journey of a Single Line of Code Let us follow a single HTTP request. Imagine you are a developer in Seattle, and you push a "Hello, World" API endpoint to production. A user in London clicks a button. Here is what actually happens, physically, atom by atom.First, your keystroke. The energy to register that keystroke comes from your laptop's battery or power adapter.
Your laptop draws between 20 and 85 watts depending on its workload. Typing is low-intensity, but the act of compiling, bundling, and uploading your code to a git repository demands CPU cycles. Those cycles generate heat. Your laptop's fan spins. That spinning consumes energy.
According to a 2021 study from the University of Cambridge, the average developer workstation emits approximately 175 kilograms of carbon dioxide equivalent per year just from typing, compiling, and testing—before any code ever reaches production.Second, the network. Your code, now committed, travels from your laptop to your office router, then to your internet service provider's fiber optic or coaxial cable, then through a series of switches, routers, and amplifiers. Every network hop consumes electricity. A typical core router consumes between 1,000 and 5,000 watts. An optical amplifier along a submarine cable consumes about 1,000 watts.
Those watts scale with data volume. Sending a 10 megabyte payload to the cloud emits roughly 0.01 grams of CO₂ per megabyte—which sounds tiny until you multiply by billions of daily API calls.Third, the data center. This is where the real energy concentration occurs. Your code lands on a server—a physical machine with a CPU, RAM, storage, and a motherboard. That server sits in a rack alongside forty other servers.
The rack sits in a data center hall with hundreds of racks. The data center draws power from the local electrical grid. In Virginia, where over 70 percent of the world's internet traffic flows through "Data Center Alley," the grid is powered by a mix of natural gas, nuclear, and a growing but still insufficient percentage of solar and wind. In 2022, Northern Virginia data centers consumed 2.5 gigawatts of electricity—equivalent to the output of two large nuclear reactors.Your "Hello, World" response then travels back across the Atlantic to your user's phone in London. That phone, like your laptop, draws power from a battery.
Every millijoule that phone spends rendering your response is a millijoule that must be recharged, ultimately pulling from the UK grid, which still uses natural gas for roughly 40 percent of its electricity generation.One line of code. One round trip. A dozen physical systems. Hundreds of grams of CO₂, depending on the grid mix.Now multiply by the 300 billion emails sent each day. The 5 billion Google searches.
The 1 billion hours of You Tube watched daily. The invisible exhaust of software becomes visible only in aggregate—and the aggregate is staggering.The Greenhouse Gas Protocol and Software's Legal Accountability You might reasonably ask: Is any of this actually my responsibility? I did not build the power plant. I did not design the router. I just wrote a function.The answer, under emerging global regulations, is increasingly yes.The Greenhouse Gas (GHG) Protocol is the international accounting standard for corporate emissions.
It divides emissions into three categories, called scopes.Scope 1 is direct emissions from owned sources—the diesel in a company delivery truck, the natural gas in a company cafeteria kitchen.Scope 2 is indirect emissions from purchased electricity—the power a company buys to run its office lights and servers.Scope 3 is all other indirect emissions in a company's value chain—suppliers, distributors, and critically for software, the use of sold products.Here is where software vendors become accountable. GHG Protocol Scope 3, Category 11 covers the emissions generated when customers use a company's software product. If you sell a mobile app, and that app drains a user's battery faster than necessary, those battery recharges count against your Scope 3 emissions. Category 13 covers downstream leased assets—which includes cloud customers using rented virtual machines.In plain English: if your inefficient code forces a cloud provider to spin up more servers, those servers' electricity use is partially your legal responsibility. If your bloated mobile app reduces a phone's battery life from two days to one, the additional charging cycles are your responsibility.This is not theoretical.
The EU's Corporate Sustainability Reporting Directive (CSRD) now requires large companies to disclose their Scope 3 emissions, including software use. California's Climate Corporate Data Accountability Act (SB 253) does the same starting in 2026. In France, the REEN law requires electronics manufacturers—including smartphone makers—to publish repairability and environmental impact scores, which indirectly pressures app developers to optimize for energy efficiency.Your code is no longer private. It is no longer purely technical. It is an environmental disclosure waiting to happen.The Two Pillars of Green Software Given this accountability, how do we actually reduce software's carbon footprint?
The literature—including the authoritative works by Currie, Hsu, and Bergman (O'Reilly, 2024) and Fontanarrosa (Packt, 2024)—converges on two complementary strategies. Throughout this book, we will call them the two pillars.Pillar One: Energy Efficiency Energy efficiency means doing the same computational work using fewer joules. This is the classic optimization most developers already understand: choose a faster algorithm, reduce unnecessary loops, cache repeated results, compress payloads. If a task requires 1,000 CPU cycles today and you reduce it to 100 CPU cycles tomorrow, you have improved energy efficiency by an order of magnitude.Energy efficiency always reduces absolute energy consumption.…
This is the end of the free sample. Get the eBook to keep going. Buy now
About this book
Details
- Author
- Snell Lon
- Publisher
- SamEnrico
- Language
- English
- Genre
- Non-Fiction, Forecast & Outlook, Green Software
- Released
- 2026-06-01
- Pages (approx.)
- 152
- Available as
- eBook, Audiobook
Read better in the ZLOADR app
Your eBooks on your phone or tablet. Sign in with your SamEnrico account and start reading.
More by Snell Lon
Disappointment from Adult ChildrenSnell Lon$11.99
Diplomat International Crisis CourseSnell Lon$11.99
FODMAP Diet And Brain SymptomsSnell Lon$11.99
The Gambling Relapse Emergency KitSnell Lon$11.99
Body Language for Restaurant ServersSnell Lon$11.99
The Great Political Pivot: How a Single Debate Redrew the 2016 Election MapSnell Lon$11.99
Branch CoordinatorSnell Lon$11.99
How to Start a Bakery (baking Main Activity) Business (Beginners Guide)Snell Lon$11.99
Lead Time Predictor PrimerSnell Lon$12.99
Understanding Langer–giedion SyndromeSnell Lon$17.99You may also like
Hong Kong Handover 1997Dunn Johnnie$11.99
Zumba For Postnatal Recovery CourseNeal Christian$11.99
Zumba for BeginnersLadner Nikia$11.99
YouTube Comment Mining GuideHumes Pandora$12.99
Worry Box MeditationCarlin Rudy$11.99
Workplace Stress MeditationNguyen Lynn$11.99
Workplace Stress and Sleep RepairHawley Ivory$11.99
Workplace Perfectionism CureDelaney Jeffry$11.99
Workplace Injustice Anger GuideWallen Isabelle$11.99
Work Addiction and Burnout LinkGreenwood Ester$11.99
Women in Yoga and WellnessBeattie Galina$11.99
Women in Stand Up ComedyChun Evangeline$11.99