Search:

Automate It!

  • Programming

Recently I've been really getting into scripting- and while I'm no stranger to general programming, usually for user-facing programs- this time I've been doing it for automation specifically. I heard this quote recently while watching the YT channel "No Boilerplate":

If you're going to do something twice, automate it

And that really stuck with me. I've tried some automation before, with this one Rust program that would run cargo clean in my project directories, however it was a bit clunky to do- as much as I love Rust, for basic automation like this it's not ideal. So I needed another language to write these scripts in- something lightweight and portable.

Perl

Perl is the first language I went to- it came up in conversation with some friends of mine and I thought it could be fun to learn. It was quite different that I thought it was going to be, as the syntax felt more like something you'd see in a compiled language- and I liked it! I also found out that many Linux systems will come with Perl out of the box, so I didn't even have to install anything to run my scripts. Still, one issue I encountered was tooling, as I didn't have an LSP/formatter set up. That is a fixable issue though, and I will probably get around to it at some point if I need to.

Python

Python is the first programming language I ever learned, so it has a special place in my heart for that. And recently, it's had some great improvements in it's tooling thanks to Astral, and their projects. I haven't been using uv for my scripts, but I have been using ty and ruff, which are amazing to work with- they were both available in my systems package manager, they both hooked up easily with my editor, and they were super fast. They made the development process a lot easier. I also found that I just liked Python's syntax in general, and while I don't know if I would use it for my larger projects, for automation like this it's awesome.

Automation. Is. Amazing

Once I got into the swing of it, I was wondering why I hadn't started doing it sooner. A lot of the tasks I needed to do I could automate, and not only is it fun to write scripts but it's also really satisfying to see a script run successfully. I highly encourage you to get into basic scripting and automation, as it can make your life so much easier. And you can do it in more languages than just Python and Perl, so find what works for you.

You can find my scripts here: https://codeberg.org/Cyncrovee/Cyncrovee-Scripts