Ask HN: How can I fight climate change by writing code? - leather
======
tlack
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](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.

~~~
caryd
This is a very subjective idea and is not always true. Ymmv

~~~
mister_hn
It's extensively tested on various benchmarks and the programming languages
I've mentioned are the best performing, based on electricity consumption.

~~~
caryd
Ymmv. Use what's right for your program. Having to download and run an
application for something you can do in a second in a browser or terminal
isn't saving 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...](https://hacktheplanet.substack.com/p/pulling-the-climate-switch)

~~~
anantk147
Hey!Thanks for sharing a link to my (new) blog. As I'm still in very early
stages, I'm trying to capture as much feedback as possible -- if you would be
so inclined, I would love to hear any of your thoughts / reflections on either
the topic or my writing on anantk147@gmail.com

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

------
eucryphia
Use a pencil.

~~~
KiranRao0
I'm curious if this is actually used less energy. Compared to buying a new
computer, it's clearly better.

But given that someone most likely already owns a computer, does the marginal
amount of energy required to operate the computer exceed the energy impact of
extracting resources/manufacturing/transporting pencil and paper?

~~~
caryd
If they have a computer, they likely already have stationary and pens.

