Environmental pollution is traditionally associated with industrial activity, agriculture, transportation, and fossil fuel consumption. Still, the growing energy footprint of software systems presents a significant—and often overlooked—source of carbon emissions. As digital infrastructure expands, addressing the energy footprint of software is critical to achieving Net Zero Carbon goals. Despite progress in hardware and renewable energy, software-level energy efficiency remains a largely untapped area for climate action. This paper introduces Sustainable Green Coding (SGC) as a language-agnostic strategy to embed carbon-conscious practices into software development. We propose a structured framework encompassing algorithmic and structural optimisations, resource-aware programming, and domain-specific techniques for Artificial Intelligence (AI) and Machine Learning (ML) systems. Empirical evaluations across diverse programming environments demonstrate that code-level interventions can reduce energy consumption by up to 63%, without sacrificing performance. Tools such as CodeCarbon, CarbonTracker, and hardware-level profilers were employed to accurately measure energy usage and carbon emissions. Case studies, including AI inference caching and efficient memory allocation strategies, highlight practical and scalable methods for reducing software-related emissions. By embedding sustainability into software engineering workflows, education, and tooling, this work empowers and redefines the role of developers as key enablers of environmentally responsible digital innovation.
inproceedings MAR+25
BibTeXKey: MAR+25