Tile 17
Green coding
Good practice · Double your moveOn the board: Simple code makes the computer work less.
Green coding means writing software that needs fewer resources: less computing power, less memory, less data transfer. Efficient software runs well on older devices and uses less energy.
Why is it a good practice?
Code that does useless work (endless loops, loading data that is never shown, heavy libraries for a small feature) makes processors, servers and networks work for nothing. Multiplied by millions of users, small optimisations save a lot of energy. Light software also avoids software obsolescence: old computers stay usable, so they are not replaced.
Good practices for developers
- Keep it simple: only code the features that are really needed.
- Avoid heavy libraries and frameworks when a few lines are enough.
- Load and process only the data you need (pagination, caching).
- Choose efficient algorithms and avoid useless requests to the server.
- Test your software on old devices and slow connections.
Light software for old computers
An old computer that is too slow with a recent operating system can often run perfectly well with a lightweight Linux distribution. Open-source software usually supports old hardware for longer, and anyone can maintain it.