Everything I build has to survive a power cut
The electricity goes out a lot here. I also work through the night and sleep in the morning, so a power cut can come right in the middle of my working day.
An inverter, a battery backup, keeps the essentials running, so I’ve learned to live with it. But it has changed how I think about the things I build.
Pick up where you left off
Say a job takes two hours, and the power can cut at any minute. If it’s one long two-hour job, a cut means starting again from zero. So it’s better to split it into lots of small steps that each save their progress. When the power comes back, the job carries on from the last step instead of starting over.
Power isn’t the only thing that stops my work. I run my own AI video recorder on a ThinkPad laptop, and that laptop keeps running short of memory. My fix is honest and a bit silly: I restart the laptop. So the recorder also has to cope with being stopped and started again.
Note to future me: interruptions aren’t rare. Plan for them, and they stop being scary.
This is just good practice anywhere. My electricity simply taught it to me faster. It’s the same thinking behind how I built this website, and behind replacing a phone I couldn’t trust.