Dummy Tip Learned the Hard Way: Always test your code!

Don't you love it when you think you're so sophisticated with your automation and then your computer slaps you upside the head with a "way to go, dummy"?? I had run into an issue using FruitJuice to keep the laptop battery healthy, where I'd unplug the MBP for a while during the day, forget it was unplugged, and go away from the computer only to return and find out it had completely drained itself of all power and ungracefully shut down. So I thought I set an automation script to check for when (a) the battery was draining and (b) it was at 5%. Well, not so much. I set it to look for a number ending in 5%. So this morning the laptop shut down on its own and I realized my problem. It hit 85% and was draining. Lessons learned: 1. Be very specific, and 2. always test your code!

1 Like