Welcome to the Agile Engineering Deep Dive. My name is Alessandra Guida, and in this episode, I explore a simple but often overlooked idea. Software may be virtual, but its impact is physical. We'll look at how everyday engineering decisions, from algorithms and design choices to architecture, usability, and team culture, quietly shape the energy footprint of the systems we build. This episode is not about green checklists or prescriptive rules. It's about awareness, seeing clean code, clean architecture, and good engineering practices not only as quality concerns, but as contributors to a more sustainable digital world. If we already care about performance, clarity, and simplicity, the question becomes: what happens when we extend that same craftsmanship to energy and sustainability? Let's dive in.
SPEAKER_02Welcome back to the Deep Dive. Today we're getting into something that feels, you know, completely virtual software, but it has this huge hidden physical cost.
SPEAKER_00Aaron Powell It really does.
SPEAKER_02We're talking about the digital carbon footprint and how basically every engineering choice you make plays a role.
SPEAKER_00It's the ultimate paradox, isn't it? Yeah. Code feels weightless. It's just data, right?
SPEAKER_02Yeah.
SPEAKER_00But behind every single API call, every background job, you have physical servers in a data center burning real electricity.
SPEAKER_02Aaron Powell And releasing very real co-Euros.
SPEAKER_00Exactly.
SPEAKER_02And the scale of it can be uh kind of mind-blowing. I know you have a statistic that really puts this into perspective, especially with, well, everything AI right now.
SPEAKER_00We absolutely do. And it's all about the sheer energy drain from that kind of intense computation. There's research showing that training just one large language model can emit as much carbon as five average cars. Wait, five cars? Over their entire lifetime.
SPEAKER_02Wow. And that's just for the training phase.
SPEAKER_00Just for the training.
SPEAKER_02Okay. So that's an extreme example, but it really hammers home the point. Our mission in this deep dive isn't to give you a bunch of rules, but to, you know, raise awareness that your choices have a measurable cost. We're going to explore this through five principles: clean code, clean design, clean architecture, clean usability, and finally, clean responsibility.
SPEAKER_00And we're starting right at the bottom at the foundation, clean code.
SPEAKER_02Right. So let's unpack this. For years, developers have heard Donald Newth's famous line: Premature optimization is the root of all evil.
SPEAKER_00We all have.
SPEAKER_02And that's true for developer time for maintainability. But when you look at it through an environmental lens, ignoring optimization entirely, well, it's just not sustainable anymore.
SPEAKER_00Precisely. You have to reframe what optimization even means. It's not just about shaving milliseconds off for the user anymore. It's about saving massive amounts of energy for the planet.
SPEAKER_02And when you look at the algorithmic choices, the difference isn't small, it's exponential.
SPEAKER_00It's huge. Let's take that sorting example. It's a classic.
SPEAKER_02Yeah, let's do it.
SPEAKER_00So imagine you need to sort, say, 10,000 items. Not a huge task for a modern machine. If you use a naive algorithm, an ON approach, you're basically checking every item against every other item.
SPEAKER_02Okay.
SPEAKER_00That comes out to roughly 100 million operations.
SPEAKER_02100 million. And what if you use a more efficient algorithm?
SPEAKER_00If you switch to something like quick sort, an ON login approach, you're looking at around 132,000 operations.
SPEAKER_02100 million versus 132,000? That's I mean, that's not even close.
SPEAKER_00It's not. The efficient method does almost 99.9% less work. Put another way, the naive version requires over 750 times more computation.
SPEAKER_02And if energy scales with computation, which it does, that's an enormous difference in environmental impact.
SPEAKER_00And that is the core lesson of clean code. Your algorithmic choices affect energy use way more than a hardware upgrade ever could. You're paying down technical and ecological debt at the same time.
SPEAKER_02So how do engineers actually see this debt? I mean, when I run my app in a Docker container, I see CPU percentage. I see memory. I don't see a power meter.
SPEAKER_00And that's the goal. We have to shift from measuring just performance to measuring computational load. We need tools to make that invisible power meter visible.
SPEAKER_02And those tools are starting to appear.
SPEAKER_00They are. You've got libraries like Code Carbon, which can wrap around your Python code and estimate the energy and carbon cost, especially for machine learning.
SPEAKER_02Okay.
SPEAKER_00And then there are lower level tools like Scaffondre that can actually measure the energy consumption of each process running on a machine.
SPEAKER_02So it's like bringing observability to energy use.
SPEAKER_00Exactly. And some hardware even exposes this directly. Intel has a feature called RAPL, which lets you see the power draw, the CPU, the memory, everything separately. It makes every inefficient loop just glare at you.
SPEAKER_02That makes so much sense for a single function. But what about the bigger picture? Let's move up a level to clean design.
SPEAKER_00That's a great way to put it. Clean design is where elegance really does become efficiency. It's not just about making code easy to read, it's about minimizing the total number of instructions the computer has to run.
SPEAKER_02And over-engineering is the enemy here.
SPEAKER_00It's a quiet, constant source of emissions. We love our layers of abstraction, our redundant mapping, but every layer adds overhead.
SPEAKER_02It adds CPU cycles.
SPEAKER_00It adds CPU cycles, memory traffic, cache misses. Studies have shown a direct link between code bloat and increased energy consumption.
SPEAKER_02Can you give us a real-world example of that kind of design bloat?
SPEAKER_00Sure. I once saw a system where a simple request for a user's profile passed through four different mapping layers. It went from a database object to a business object to a service object to a presentation model.
SPEAKER_02That sounds thorough.
SPEAKER_00It looked clean on a whiteboard, but it added about 15% to the CPU load for no real reason other than architectural purity, just wasted data translation.
SPEAKER_02Wow. So the takeaway here is that lean design is green design.
SPEAKER_00It is. The fewer steps, the less data, the fewer instructions, the less energy you burn. It's that simple. We can even use tools like SonarQuib, which already flag code complexity, and just start reading those flags is energy warnings.
SPEAKER_02So that's the feature level. Let's scale up again to clean architecture. This is like the city planning for our software, right? How much energy we spend just moving data around.
SPEAKER_00Aaron Powell That transit energy is a huge, often overlooked cost, servers idling, networks buzzing, and it brings up the big debate. Monoliths versus microservices.
SPEAKER_02And for the last decade, the answer has always been microservices, right? They're small, they're nimble, so they must be greener.
SPEAKER_00Aaron Powell That's the assumption we have to challenge. Often microservices use more energy.
SPEAKER_02More. Why?
SPEAKER_00Because you're duplicating everything. Every service has its own runtime, its own libraries, and they're often incredibly chatty, making tons of network calls to get anything done.
SPEAKER_02Aaron Powell So all that back and forth communication is where the waste is.
SPEAKER_00Exactly. So the solution isn't to go back to model it's it's about architecting for what we call locality and calmness.
SPEAKER_02Aaron Powell Calmness. What do you mean by a calm architecture?
SPEAKER_00A calm architecture is one that's not constantly asking, are we there yet? Instead of wasteful polling, where services constantly check for updates, you move to an event-driven model. A service only wakes up and does work when something has actually happened.
SPEAKER_02That makes sense. That alone could probably cut network traffic in half.
SPEAKER_00Easily. We can use APM tools like Jaeger to visualize these conversations between services. When you see five services calling each other in a loop for one simple update, you've just found a huge energy hotspot to fix.
SPEAKER_02Okay, we've gone from code to design to architecture. But this fourth dimension, I have to admit, this is the one that really surprised me. Clean usability. Clean usability.
SPEAKER_00It's the unexpected link for sure.
SPEAKER_02How does the user interface affect a data center's carbon footprint?
SPEAKER_00Because bad UX doesn't just waste the user's time, it wastes electricity. Every time a confused user has to retry an action, a click, a form submission, they're restarting that entire digital supply chain.
SPEAKER_02The front end renders again, the API gets called again, the database gets queried again.
SPEAKER_00Everything.
SPEAKER_02Yeah.
SPEAKER_00And I saw some research that inefficient front-end design can increase total energy use by up to 30%.
SPEAKER_0230%? That's a massive number for a UX choice.
SPEAKER_00Think about what we call the micro UX macro consequence scenario. A user is on a form, the submit button is active before it should be, and they hit return a bit too early.
SPEAKER_02So an incomplete request goes to the back end.
SPEAKER_00Right. And what if that back end is a massive AI model? That one mistaken keystroke just triggered a full, incredibly expensive inference pass on a giant neural network, all for nothing.
SPEAKER_02A colleague of mine summed it up perfectly. Bad UI kills the planet.
SPEAKER_00It's not an exaggeration.
SPEAKER_02So how do we fix it? What does a front-end dev do?
SPEAKER_00You design for intention, you make things clear, you provide instant feedback, you optimize your assets, compress images, maybe use a dark theme on OLED screens where black pixels use less power. Don't load a huge framework for one button.
SPEAKER_02And there are tools to measure this too.
unknownYep.
SPEAKER_00Tools like Lighthouse can profile your front-end performance, which correlates with energy use, and newer tools like e-coping are starting to estimate a web page's actual carbon output.
SPEAKER_02Aaron Powell Which brings us to the final and maybe most important dimension: clean responsibility. This isn't about the what anymore, it's about the how, the culture.
SPEAKER_00Aaron Powell This is the accountability piece. It's where sustainability stops being someone else's problem and becomes a core engineering value, just like security or reliability.
SPEAKER_02Aaron Powell There's a great quote about this, right? Moving from being code guardians to becoming climate custodians.
SPEAKER_00It's a mindset shift. Sustainable code is the new secure code.
SPEAKER_02So how do you drive that culture? What do you measure?
SPEAKER_00The Green Software Foundation gives us a great framework. Three pillars. One, measure. Use a metric like the software carbon intensity or SEI, which is basically grams of co-euros per user action.
SPEAKER_02So you make the invisible visible.
SPEAKER_00Exactly. Two, improve. Pair your energy goals with your performance goals. They usually go hand in hand. And three, and this is critical, offset last. Don't just buy credits, eliminate the waste first.
SPEAKER_02I love the idea of how behavior changes once you show people the data.
SPEAKER_00It's so powerful. Imagine a team just adds an energy metric to their CI pipeline. Suddenly there's a number on the dashboard, watts per build. Developers will playfully compete to get that number down.
SPEAKER_02And just like that, without any new hardware, the builds get faster and leaner.
SPEAKER_00Because awareness scales faster than hardware.
SPEAKER_02That really brings this whole thing full circle. The common thread through all five of these dimensions is just that. Awareness before action. Software is virtual, but its consequences are very, very physical.
SPEAKER_00Every little optimization, every clean query, every clear button, it all adds up. Clean thinking means you give your environmental footprint the same respect you give performance and security.
SPEAKER_02So for anyone listening to this, what's a concrete first step they can take back to their team?
SPEAKER_00Pick one single standard user scenario: a login, a search, whatever. Measure its CPU time and its energy draw, even if it's just an estimate from a tool, then track it over time.
SPEAKER_02And if that number starts creeping up, you treat it like a bug.
SPEAKER_00Because it is. It's an energy bug. That simple step makes sustainability a real actionable part of your engineering process.
SPEAKER_02And as we wrap up, I think the ultimate principle here is that the planet doesn't really care about your beautiful, complex abstractions. It only cares about efficient ones.
SPEAKER_00That's it. The greenest system isn't the one that does the most fancy things. It's the one that does only what truly matters cleanly, clearly, and consciously. If we all focus on that, the global impact could be enormous.
SPEAKER_01If today's episode gave you new insight into working across teams or highlighted the role of discipline in achieving real agility, feel free to share it with your colleagues or your network. You can find the full written article along with previous episodes in the Agile Software Engineering newsletter on LinkedIn. And if you have thoughts, questions, or examples from your own organization, I'd be happy to hear from you. Your experiences help shape what we explore next. Thanks again for tuning in, and I'll see you in the next episode.