Green coding is a trend, it should be a science

Green coding is a trend, it should be a science

Self-proclaimed experts invaded the ecosystem, often to sell their expertise rather than bringing real value. Scientists are still unsure how to mitigate the environmental impact of writing software. At BearStudio, we suffered from that.

Introduction to "Fork It!" and Eco-Development Roundtable

At the beginning of June, we launched our inaugural “Fork It!” event, a conference attended by 200 passionate professionals eager to share their knowledge. We wanted to introduce a “roundtable” format to break with the traditional series of lectures. The discussion was on eco-development—the art of reducing the carbon footprint of software solutions. The organization of “Fork It!” and the roundtable underscored our collective distance from truly understanding green-coding, a realization that prompted me to reflect and potentially spark some debate.

Misalignment and Overemphasis on Green Software

The push for a 'green angle' in every topic has surged beyond its ideological origins to sometimes absurd extents. For instance, at the “Fork It!” event in Rouen, certain organizations declined to promote our event because it didn’t fully align with eco-conception principles while they were not themselves focused on eco-conception! It seems that eco-development has gained the power to overshadow the essence of developing software, what we decided to focus on during “Fork It!”: measurable quality and sharing deep value.

The Cost of Eco-Development in the Tech Industry

While I find the idea of optimizing software and hardware to minimize energy consumption appealing, it comes with often overlooked costs. The tech industry is fundamentally a business aimed at delivering products for profit and growth. The prevailing wisdom in tech has always been to first write “perfectly” functional code and then optimize.

However, the current discourse around eco-development often seems to bypass the foundational practices of software engineering, leaning heavily towards idealism rather than practicality. While I'm not opposed to eco-conception, I argue that the drive to optimize the energy consumption of technology, both on a global scale and within local implementations, is not just necessary but crucial. Yet, this push must be balanced with the realities of software development where time-to-market, cost, and functionality traditionally take precedence. The conversation needs to evolve from mere trendiness to incorporating actionable, science-backed strategies that developers can realistically implement without compromising the core objectives of their projects.

Energy consumption of ICT in 2024

Source: On Global Electricity Usage of Communication Technology: Trends to 2030 - Anders S. G. Andrae https://pisrt.org/psr-press/journals/easl/new-perspectives-on-internet-electricity-use-in-2030

Trendiness Over Substance

Another issue with the rising popularity of eco-development is its trendiness, which sometimes feels more like an opportunity for professionals to enhance their LinkedIn profiles or craft compelling narratives for investors. It appears that many self-proclaimed experts in this field are more interested in gaining an audience than addressing genuine environmental concerns, often to sell consultancy to an eager audience. Participating in green coding as a trend and not as a fundamental shift will not produce any desirable outcome. I’m not aiming at anyone, my goal is not to tag crucify people on this post (but if you feel like doing it…)

The Role of Developers in Eco-Development

As a developer, I feel that we are not the most qualified to assess the energy impact of our coding decisions. Software development is more of an experimental process, guided by personal comfort and diverse approaches to problem-solving, rather than a rigid and objective scientific process. In my humble opinion, the job of evaluating the environmental impact of software and hardware designs is better lead by scientists, especially given the diversity of design patterns and programming languages in our field. The primary focus in software development is to solve a problem in the fastest way possible, prioritizing efficiency. 99% of the time, we use the cost of a given solution as the most important metric. When choosing between different algorithms or coding practices, the decision hinges on factors like engineering time, cost, and scalability rather than environmental impact. Eco-design requires considering energy consumption and environmental impact as new metrics, which are not always compatible with the industry's primary focus on maximizing ROI.

Adopting a more energy-efficient algorithm often means investing additional development time and resources, which can lead to higher initial costs and potentially more energy consumption during the development phase itself. Moreover, the training time needed to master these efficient technologies can prevent developers from forming a well-informed stance on the matter, despite them being the primary voices we hear. However, there are indeed scenarios where optimized solutions are not just preferable but also eco-responsible, particularly when building from the ground up with sustainability in mind.

Yet, the reality is that many situations do not allow for such optimizations. For instance, consider creating a simple website for a local neighborhood shop; most would opt for WordPress, known for not being carbon-friendly, because building a lean, custom site would be prohibitively expensive for the client. Here, trade-offs are inevitable. Legacy systems, widespread use of content management systems (CMS), and other constraints often mean that the most energy-efficient solution isn't feasible.

It falls upon scientists to analyze the overall balance of engineering, taking into account not just the obvious technical factors but all the hidden variables as well. While every developer might know that JavaScript consumes more energy than C++ for similar tasks, truly understanding the comprehensive impact demands a broader and deeper analysis that goes beyond the capabilities and scope of everyday development work.

If you want to explore the topic on development and software perspective, this github repository references the available tools to measure and work towards reducing carbon emissions of our code.

https://github.com/Green-Software-Foundation/awesome-green-software

Conclusion: A Call for Practical Approaches to Eco-Development

I can understand that eco-conception is looked at with defiance from a part of the industry, on one side, we face mandatory guidelines to incorporate eco-conception into our discussions, and on the other, individuals exploit these guidelines to expand their influence using urgency and fear to push the topic on the front. How can we address legitimate environmental issues in such a conflicted landscape?

According to the Green Software Foundation, if only 3% of the developers were applying the general principles of green coding, it would be enough to reduce significantly the greenhouse emissions of the Communication and Information Technology industry, which will be responsible of 14% of greenhouse emissions by 2040 (I don’t know if this number takes in account the predicted boom of AI in the global economy).

Tell me in the comments if green-coding has been in your mind recently or if you just dismissed it because it’s too far from your priorities right now. If you have ressources about it, I would be happy to read them. I’m not an expert in green software, carbon friendly tech, the folks at green software foundation are, so here is my pick for a concise introduction to the topic:

https://greensoftware.foundation/articles/reading-list-on-green-software

Rudy Baer

Rudy Baer

February 11, 2025