When Dr. Fernando Castor was a child in Brazil, his father gave him an ultimatum: stop playing computer games all day, or he would sell the computer. Instead of giving up his favourite pastime, Castor found another solution. He learned how to program. That moment set him on a path that would later take him from Brazil to the Netherlands, where he is now pioneering research on energy-efficient computing.
For Castor, writing better software is about efficiency. "People think of software as this intangible thing, but every line of code translates into something happening on real-world hardware," he says. "And that hardware consumes energy. If we do not improve how we write software, we just waste resources."
His research focuses on green software development, a field that aims to minimize software's energy consumption without sacrificing performance. In an age where AI, cloud computing, and data centers consume more power than entire countries and everyone has a battery-powered device in their pocket, Castor’s work is more critical than ever.
AI is wasting energy
The rise of AI-powered tools, such as ChatGPT and Copilot, along with other large language models, has transformed the way people work. From writing emails to generating code, these tools offer an unprecedented level of automation and support. But behind the convenience lies a hidden cost: energy consumption.
"AI is incredibly powerful, but it is also a resource hog," Castor explains. "These models require massive computational power, and that power does not come for free. Every time you use an AI assistant, there is a data center somewhere burning electricity to generate that response."
His research has uncovered a surprising truth: not all AI models are equal when it comes to energy efficiency. Some require five times more power than others while producing similar, or sometimes even worse, results.
This has major implications. Tech companies running AI-powered services could save millions in energy costs by choosing the right models. Developers relying on AI coding assistants could extend their laptop battery life by using more efficient tools. On a global scale, reducing AI’s energy footprint could significantly cut carbon emissions.
Energy consumption in the software you use
Most people don’t think about energy consumption when they open an app or browse the internet. After all, software seems invisible. But Castor warns that software inefficiency is a silent energy killer.
"Software does not consume energy directly, but it controls what hardware does," he says. "And if the software is inefficient, the hardware works harder. Draining your battery, overheating your device, or racking up energy costs in a data center."
Take mobile phones, for example. Everyone wants longer battery life, yet few realise that poorly optimised apps are one of the biggest culprits behind fast-draining batteries. The same principle applies to cloud computing. A single inefficient program running on thousands of servers can lead to millions of euros in unnecessary energy costs each year.
Castor’s research aims to fix this by teaching AI models and human developers how to write software that does the same job using less energy.
Reprogramming the next generation of coders
While Castor spends much of his time researching energy-efficient software, he also has a passion for teaching. At the EEMCS faculty, he created a Green Software Development course designed to educate the next generation of programmers about the environmental impact of their work.
He was shocked to realise how little students knew about these issues before taking the course. "Most students do not even think about energy efficiency in computing. And why would they? It is barely covered in traditional education," he admits.
One lecture in his course is particularly eye-opening for students: the illusion of sustainability. He discusses how major corporations, including the packaging industry in the 1970s, used recycling campaigns as a form of greenwashing to shift responsibility to consumers. Similarly, he warns that the tech industry may be headed down the same path, focusing on feel-good sustainability efforts instead of tackling the real sources of waste.
"I want my students to question things," he says. "I want them to think critically about the software they build and the impact it has beyond just functionality."
Smarter, faster, and greener AI?
AI is not going anywhere. If anything, it becomes more embedded in daily life. That is why Castor believes sustainability and AI development should go hand in hand. His team is now working on ways to train AI models to generate energy-efficient code. Currently, most AI coding assistants focus on correctness, ensuring the code works. But Castor’s research is pushing for the next step: AI that not only writes correct code but writes efficient code.
"We are asking: can we teach AI to write software that is not just functional but also energy efficient?" he explains. It is an ambitious goal, but early experiments are promising. So far, his team has found that contemporary large language models can already generate code that performs better than code written by a competent human in a few scenarios. Their current focus is twofold: identifying such scenarios and, at the same time, experimenting with training models by exposing them to both efficient and non-efficient solutions to see if they can learn from that and apply the knowledge to generate even better programs.
However, Castor is realistic about the challenges ahead. AI models themselves are energy-intensive, so he acknowledges a fair question: if AI consumes so much power, why use it at all for efficiency? "The reality is, developers are using these models anyway," he says. "The cost is already being paid. The best we can do is make sure that costs are used wisely to produce better, more efficient software that ultimately reduces waste.
A personal mission with global implications
Castor’s move from Brazil to the Netherlands was about making a meaningful impact. The decision to move was not easy. He and his wife, who also comes from Brazil, had to weigh their options carefully. "I work in computer science, so I could technically go anywhere," he says. "But we wanted a place where we could build a future."
After considering several countries, the Netherlands stood out. "The work-life balance here is amazing, and the level of English is ridiculously good," he jokes. "Sometimes Dutch people say ‘Oh, my English is not great,’ and then they speak better than I do!"
Now, settled at the University of Twente, Castor is more committed than ever to his research and teaching. He hopes that by making software more energy-efficient, he can help slow down the tech industry’s growing carbon footprint while also improving everyday computing experiences. "And that is something everyone, from big tech companies to individual developers, should care about."
Why you should care about green software
Even if you are not a programmer, Castor’s work affects you. Whether it is the AI assistant you use, the apps on your phone, or the websites you visit. Every digital interaction has an energy cost. By making software greener, Castor’s research is helping all of us.
With computing demands increasing every year, the need for sustainable software development has never been more urgent. "The future of technology does not have to be wasteful," Castor says. "We just have to be smart about how we build it."