19
My simple energy tracker code is somehow using more power than it saves
I decided to learn coding by making a basic script to monitor my home's electricity use. Every tutorial made it sound easy, but my first try just looped forever and froze my old laptop. Now I have this useless program that does nothing but drain the battery while I figure out how to stop it. It feels backwards to waste all this power trying to code something green. I even looked up how to make code efficient, but the explanations might as well be in another language. So much for helping the planet with my beginner skills.
3 comments
Log in to join the discussion
Log In3 Comments
tylerblack1mo ago
Been there, you gotta kill that process in task manager first. Then maybe add a sleep() call so it doesn't just loop and freeze up.
4
anderson.rowan1mo ago
A quick sleep() call between loops stopped the freeze for me.
1
simonb921mo ago
My coffee maker needs a cool-down cycle between brews.
1