DEV Community

Cover image for I Started Coding in 2024. Here’s Why My First "Hello World" Came with a Carbon Footprint.
Abhay Pratap Yadav
Abhay Pratap Yadav Subscriber

Posted on

I Started Coding in 2024. Here’s Why My First "Hello World" Came with a Carbon Footprint.

I wrote my first line of code in 2024.

I didn't grow up with punch cards or floppy disks. I grew up with GitHub Copilot, fibre internet, and AWS regions that scale infinitely at the click of a button. When I started learning, the focus was on speed: How fast can you ship? How quickly can you deploy?

But in the rush to build the virtual world, I realised we were forgetting the physical one.

There is a misconception among new devs that software is "clean." We sit in air-conditioned rooms, typing on sleek laptops, building intangible things. It feels weightless. But the cloud isn't made of water vapour; it’s made of silicon, steel, and massive amounts of electricity.

As the newest generation of developers, we have a choice. We can build bloated, energy-hungry software because our hardware is fast enough to handle it, or we can code with a conscience.

Why "Green Coding" is the New "Clean Code"
When I learned about Big O notation (time complexity), it was framed as a performance metric. "Make your code faster so the user doesn't wait."

But in 2025, Big O is also a climate metric.

  • O(n²) isn't just slow; it burns more coal.

  • An inefficient database query isn't just a bottleneck; it’s a waste of water used to cool a data centre in a drought-stricken region.

We are inheriting a tech stack that is powerful but wasteful. It is up to us to refactor it.

How We Can Build Differently
I’m new to this industry, but here is what I’m prioritising in my journey:

  1. Mindful Libraries It’s easy to npm install everything. But do I need a 5MB library to format a date? Every kilobyte of JavaScript sent over the wire requires energy to transmit, parse, and execute on the user's device. I’m learning to choose lightweight dependencies.

  2. The "Dark Mode" Default It may sound small, but on OLED screens (which most phones use now), dark pixels consume almost no energy. Designing for Dark Mode isn't just an aesthetic choice; it's an energy-saving feature for millions of users.

  3. Efficient Assets I used to upload images directly. Now, I’m learning about Next-Gen formats (like AVIF or WebP). Compressing an image by 50% means 50% less energy is used every time that page loads. If your site gets 10,000 hits, that adds up fast.

  4. Stopping the "Zombie" Processes In my tutorials, I often spun up servers and forgot about them. I’m learning that leaving a cloud instance running when no one is using it is like leaving a car idling in the driveway 24/7. Shut it down.

The Future is Efficient
The developers before us built the foundation of the internet. They connected the world.

Our job is different. Our job is to ensure the internet doesn't harm the world. We are the architects of the next 50 years. Let’s make sure the code we leave behind is as clean as the air we want to breathe.

Top comments (0)