Scripts, Sanity, and the Art of Doing Nothing Twice

Scripts, Sanity, and the Art of Doing Nothing Twice
translate Ten post jest również dostępny w języku polskim.
  • Some people meditate. I write bash scripts that tell me I’m okay.

Okay, so - automation.

The thing that I could probably talk hours about and you’d soon determine that I’m either allergic to work or that there’s something wrong with me. And you'd be partially right, I do not want to do things over and over again, especially when a machine can do it for me.

Why?

Ah yes, "why?" - the fundamental question. The one that people do not like me asking, partially because they feel like I'm challenging their authority, partially because it makes them question themselves.

But the reason I ask it is because I want to understand the process - because once I truly understand it, I can usually improve upon it - saving us both time and effort in the end.

For me, it’s about reducing the cognitive load. If something can happen automatically, why make myself busy doing it by hand? The day only has 24 hours - some of those are for sleeping, some are sold to others - so there’s only so much left. Why waste it on a task that can be done for you with no human labour involved?

But I don’t just automate to save time. I automate to stay sane.

Every script is a quiet truce with my own brain - a promise that I won’t have to think about this again tomorrow, or next week, or when I’m too tired to remember what went wrong last time.

Humble Beginnings

I think my first automation was a simple one - a Raspberry Pi running a print server that allowed everyone in the house to print on the printer via network and scan stuff (it was a printer / scanner combo) that would be dropped on the network drive. It wasn’t glamorous, but it worked. Saved everyone from moving and connecting the printer to their PCs or transferring files via USB sticks.

Back then it didn’t click for me yet. It was just frustration turned into convenience. Suddenly nobody needed to ask “hey, can you turn your PC on, I need to print something”.

I think that’s how it starts - frustration made useful. You fix something once because you’re annoyed, and only later you realise that this could be useful. Then you iterate. Rewrite. Create a better version. And at some point it doesn’t need fixing anymore. That’s when the magic happens. It just works.

Eventually you start eliminating those little frustrations and realise - you can do so much more. And you get curious…

The Orderly Madness

You could argue that what I’m doing is a special kind of madness.

Like sure, I could have done it faster manually than writing a script - xkcd #1205, and all that. But then again, could I?

I know myself pretty well by now; I know that doing repetitive things shuts down my thinking, or rather makes my mind wander and then mistakes, or worse, accidents. Automation helps cut through that noise - it reduces anxiety by replacing the mental checklist with trust in a predictable system. Each script becomes a small act of faith that things will be handled, letting my mind breathe and move on without the constant background hum of unfinished tasks. So it's not just making sure the work is done, it's making sure it's done right and doesn't cause delays or waste materials, because I need to fix my mistakes.

And of course, when properly instructed, the machine never tires, doesn't need sleep or makes mistakes. But yeah - properly instructed.

The problem with that is, of course, you have to translate the world of humans into the world of logic. And when it’s done right, you get the predictability of a stable system, you don’t have to worry about anything breaking. You can rely on the machine. You can focus on the creative things you were putting off, you can do the simple things around the house, you can travel - you get the actual time off.

Fail, but Gracefully

Everything runs smoothly, but what if it stops? What if that translation of messy, chaotic human world doesn’t quite work in the binary existence of a silicon chip? Something breaks. And when you automate your life, things get… complicated. You can’t have your life fail because of a simple mistake, right? But if it fails, how can you trust the machine to not fail again?

And here’s the thing - you shouldn’t have trusted it in the first place.

The machine runs code and is only as “smart” as the code it runs. In other words - you need smarter code. So the mistake was yours.

This is where you start writing your scripts with redundancies. And sometimes those are to let it fail and do it manually once.

I generally follow those four rules:

  1. Make the program run
  2. If the program fails, it should try to recover itself.
  3. Only if that fails, involve a human.
  4. If a human involvement was required, the program needs to be fixed.

This means constant iteration until the code stops failing. And eventually you get there or you give up.

The Ritual of Scripting

When I write scripts, there’s a rhythm to it - the satisfying click of the keyboard, the stream of text spilling down the terminal. There's the frustration of the script not running properly, finally replaced by the satisfaction of everything working properly. Relief that it's over.

Ha, I started this writing about meditation. I guess creating the automation is my meditation.

I get to solve a problem - once. Maybe twice. Perhaps multiple times. I get to think of all the edge cases and possible scenarios, and I get to change it the moment a new one crosses my mind. Or when something breaks…

In the end, however, I get something that’s solid. Something that will simply be there and run. And just like that, another thing that used to waste my time or attention is gone from my life.

Maybe that’s why I automate - because I can’t stand waste. Not of time, after all, the time you enjoy wasting is not a wasted time, no. Waste of thought. When every repetitive task feels like static in your brain, you want to turn it into silence.

Doing Nothing Twice

I guess the point of it all isn’t saving time - it’s reclaiming it. Every process that runs without me gives me back a few minutes, a few thoughts, a bit of space to be human again. I don’t have to wonder if the backups ran, if the certificates renewed, if the websites are up, if the dishwasher finished, if the networks are talking, or if the photos are safely backed up. They just do.

And they will let me know if they fail.

Automation doesn’t make life effortless, but it makes it lighter. The constant low-level anxiety of “did I forget something?” fades into trust - trust in the system, and in the version of myself who built it.

And that’s where the real peace hides. In knowing the machines have it handled, I finally get to do the one thing automation can’t: live the parts of life that can’t be scripted.