HACKER Q&A
📣 leather

How can I fight climate change by writing code?


How can I fight climate change by writing code?


  👤 tlack Accepted Answer ✓
Because of the age old warning about premature optimization, a lot of software that runs critical parts of the internet infrastructure is dreadfully slow. You could pick something that is deployed on millions of servers, speed it up 20%, and the win would be significant.

An example is the progress bar used in `npm` during install operations. Someone discovered that it was extremely wasteful of resources. https://news.ycombinator.com/item?id=10974929

Little things like that add up. You could do even more by focusing on optimizing overall resource usage rather than just wall clock time. Perhaps even write software to automatically optimize others' software.

You want to find a community that is open to change and optimization, though - some maintainers are too busy or are afraid of change.


👤 BjoernKW
Support and advocate work-from-home / remote work.

This could mean convincing your employer / your clients to switch to a permanent work-from-home policy (and helping them to implement that policy) or creating software that enables people to work remotely.


👤 caryd
'sudo shutdown now' could save some energy. Unless you can work with the countries causing the real damage, then it's mostly going to make you feel good and not really help.

👤 mister_hn
Using a programming language with a better carbon footprint. Go native as much as you can.

Assembly, C, C++, Rust are some examples.

JavaScript, Python and other interpreted or GC languages require more power.


👤 decasteve
How about some indirect ways? This is what I've done.

Use the money you make to decrease your carbon footprint: Operating an electric car, buying or building a net-zero home, etc. Work from home. Get involved in local government.


👤 makerofspoons
A guide on how deep learning and IoT could save civilization: https://hacktheplanet.substack.com/p/pulling-the-climate-swi...

👤 matt_s
Find a job at a company that is in the wind or solar industry writing software for them.

👤 eucryphia
Use a pencil.