Home > Business > CSR > Optimizing your code, a financial and environmental issue

Optimizing your code, a financial and environmental issue

Published on 22 February 2022
Share this page :
Ecodesign: a challenge for the environment that starts with the code

Loptimising code not only reduces the environmental footprint of an application or website, it also saves money and improves accessibility.

In 2019, the digital sector was responsible for 4 % of the world's annual greenhouse gas emissions, according to Ademe, the French Environment and Energy Management Agency. This is equivalent to the emissions of all the lorries in the world. Digital is also the sector whose share of global emissions is growing fastest: it is expected to double by 2025.

Faced with this situation, companies are taking an increasing interest in eco-design. This involves reducing the environmental impact of a product right from the design stage.

In addition to greenhouse gases, the environmental footprint of digital technology extends to the entire life cycle of equipment, networks and terminals. It must also include the consumption of water, rare earths and energy, as well as the lifespan of equipment and its recycling.

Acting on the hardware, but also the software, in particular the code

L'the impact of digital technology on the environment affects both hardware and software. The manufacture of IT hardware alone generates most of the environmental problems (from 65 to 92 % according to Ademe). To reduce its environmental footprint, an IT department can pull several levers. The most obvious is to extend the life of its equipment, servers, computers, tablets and smartphones. The IT Department immediately saves money and makes significant environmental gains, bearing in mind that, according to Ademe, the design, use and end-of-life treatment of hardware account for 47 % of greenhouse gas emissions.

This eco-responsible management of hardware should not overshadow the importance of taking action on the software side too, as the two aspects are closely linked.

Ecodesign involves designing digital services that consume as little energy as possible. It also promotes accessibility: an eco-designed application can run on any type of terminal, not just powerful computers.

The 3U rule

An eco-design approach covers the entire life cycle of a product or service, from design through development and maintenance to operation. It is also known aseco-design by designThis is because the process of reflection begins as early as the project scoping phase.

According to the 3U rule (Useful, Usable and Used), this involves reviewing the functionalities of the future application or website and asking whether each of them is useful, usable and used.

For example, is it necessary to integrate high-definition videos and non-optimised images on every page of an e-commerce site?

For Frédérick Marchand, director of Digital4Better, a company specialising in the development of eco-designed applications, and author of the guide 40 words for responsible digital (published by ContentA), "a design with "wow" effects that takes too long to display, or even doesn't display on certain computers or mobiles - and this happens a lot - is pointless". It can even be counter-productive. By unnecessarily complicating a user journey, a company runs the risk of losing the user along the way.

Respecting best practice in code optimisation

When making choices, an organisation needs to take account of these environmental and societal issues over and above the traditional criteria of cost, time or return on investment, even if it means giving a "no go" to a project that is considered to be too energy-intensive.

In the same way that we added the security component to the DevOps approach to end up with the catchword DevSecOps, perhaps tomorrow we'll have to do DevGreenSecOps, or even DevSocialGreenSecOps by including the inclusion and accessibility dimension, as Frédérick Marchand ironically suggests.

Once the project has been launched, it is a matter of applying best practice in terms of code optimisation and software quality, in line with the ISO 25010 or ISO 5055:2021 software quality standards or the Jamstack approach to website creation. Visit its siteThe Institut du numérique responsable (INR) lists a number of online tools that measure the environmental performance of a web page, such as Ecomoter, Ecoindex and Ecograder. Using such indicators enables a site to be positioned according to the quality of its design, code and hosting.

From design to operation

While the development phase is essential, we mustn't forget the testing phase, which enables us to identify bottlenecks and overconsumption of machine resources. Similarly, the choice of hosting (on-premise, cloud) is not neutral. Nor does the effort stop when the system goes live. As part of a continuous improvement approach, the optimisation of the energy footprint continues during the ongoing maintenance of the application and its code.

Similarly, ecodesign by design is not just for new projects. To reduce its technical debt (caused by sub-optimal coding), an organisation benefits from regular reviews of its application assets in order to 'unplug' applications that are little or not at all used, or at least to reduce their functional scope. As for the others, a 'facelift' of their design and code can reduce the digital 'fat'.

In coordination with the purchasing department, the IT Department can also influence the choice of software packages on the market. Even if publishers lack transparency on the subject, an eco-responsibility criterion can be used to guide calls for tender. "Software packages are overweight and have never been eco-designed; their footprint is too large for the most part".says Frédérick Marchand in his book. The expert also points out that "on average, a software package is used for only a quarter of its functions".

Optimising code: adopting the best practices of the pioneers

Beyond this governance In any case, it is in a company's interest to compare its performance with that of comparable organisations. In this respect, the Digital Sobriety Challengeorganised by APIdays The Green Compagnon and Fairness, is an interesting exercise. Coached by experts, IT teams from major French accounts have three months to reduce the carbon footprint of their digital activities.

CIOs from Allianz, OUI.sncf, Yves Rocher, Leroy Merlin and Meetic took part in the 2021 event. Allianz France, for example, set itself the goal of reducing the footprint of its website, which is visited by hundreds of thousands of users.

In the report that assesses the challenge, we see that the gains are to be found just about everywhere, in code optimisation and in architecture and infrastructure choices. These include avoiding unnecessary logs and processing data in batch mode rather than in real time. In the age of Big Data, we also need to consider whether it makes sense to store redundant, obsolete or worthless data.

Using cloud hosting would also allow you to benefit from the economies of scale of a shared infrastructure, as well as from the efforts made by suppliers to optimise the energy efficiency of their data centres, which are usually powered by renewable energy.

In conclusion, an eco-design approach is not only good for the planet. It enables an IT department to make savings at every stage of a project, and also to strengthen its employer brand. Finally, in a tight job market, an eco-responsible strategy resonates with the environmental concerns of young developers of generations Y and Z. This is an important factor in attracting new talent.

Our best training courses on the subject

Find all our training courses in Social and environmental responsibility

Our expert

Made up of journalists specialising in IT, management and personal development, the ORSYS Le mag editorial team [...]

field of training

associated training