Green Software in the AI Era: Bridging Innovation with Sustainability

Dec 12, 2024 | Portfolio Governance Green Software in the AI Era: Bridging Innovation with Sustainability

In the digital age, the advent of AI-generated code has been nothing short of revolutionary, heralding unprecedented speed and scalability in software development. This has enabled developers to automate complex coding tasks, significantly reducing time-to-market for new software applications. Yet, as the use of AI in coding practices becomes more widespread, it's increasingly becoming a double-edged sword for executives and technology leaders.

The challenges are manifold, ranging from the accumulation of technical debt to the potential risks associated with open-source software (OSS) and the production of inefficient code. These issues may not only complicate the maintenance and scalability of software applications, but also lead to increased operational costs. A particularly concerning aspect of this trend is the inefficiency inherent in some AI-generated code, which can result in excessive use of computational resources, higher energy consumption, and, consequently, increased CO2 emissions.

This shift towards less green software practices poses a significant challenge for companies striving to meet emerging Environmental, Social, and Governance (ESG) reporting requirements. As organizations worldwide commit to reducing their carbon footprint and enhancing their sustainability efforts, the role of software development in these initiatives cannot be overlooked.

Inefficiencies and emissions

According to the Green Software Foundation, data centers currently account for 4-5% of global emissions, equating their impact to that of the air, rail, and shipping industries combined. Additionally, research by Accenture indicates that approximately 85% of software-related emissions are attributable to the way software is designed, rather than the hardware and infrastructure it operates on. This realization uncovers a vast opportunity to make software more sustainable by prioritizing efficiency and resource conservation in software engineering practices.


Fig1 Green deficiency examples

One example of inefficiency in AI-generated code involves the repetitive execution of SQL queries within loops—a common practice that unnecessarily amplifies resource utilization. By reengineering such processes to execute SQL queries outside loops and only when needed, software applications would use less resources. The compounding effect of addressing such inefficiencies can bring in significant reductions in carbon emissions. This approach not only contributes to sustainability but also often enhances application performance and reduces operational costs.

Increasing efficiency with software intelligence technology

Despite these insights, it is still too soon to know if AI code generators are being educated on green coding practices to avoid situations like this because it is a relatively new concept in the development world. However, if AI-generated code continues to proliferate and is not written using green coding practices, this could have a huge impact on the environment and corporate bottom lines.

This uncertainty underscores the need to proactively integrate sustainability into AI-driven software development. Software mapping and intelligence technologies, such as CAST Highlight, can help. By analyzing application source code for inefficient patterns and offering remediation advice, CAST Highlight enables organizations to identify and correct green deficiencies, aligning software development with sustainability goals.


Fig 2 CO2 Emission Estimates

CAST Highlight's use of the Software Carbon Intensity (SCI) formula, established by the Green Software Foundation, allows organizations to quantify the environmental benefits of optimizing their software applications. This metric offers a tangible measure of the potential reduction in CO2 emissions, providing a clear incentive for adopting greener coding practices.


Fig 3 Automated Recommendations

As the digital and environmental landscapes continue to evolve, the integration of sustainability into software development emerges as a critical imperative. By leveraging software intelligence technologies and adhering to green coding practices, the tech industry can mitigate its environmental impact while advancing towards a more sustainable future. The journey towards greener software is not only a technical challenge but a moral one. That said, collective commitment to responsibility, and environmental stewardship isn’t divergent from a path toward productivity and innovation. As we further traverse this landscape, the most forward-thinking digital leaders will deepen their commitment in both domains, understanding their symbiotic relationship, blazing the trail for this new and exciting epoch for technology.

Greg Rivera is VP of CAST Highlight. The CAST SaaS platform helps customers and partners accelerate app modernization / cloud migration, rationalize their app portfolios, and reduce open source risk. https://www.castsoftware.com/