Automators 18: Terminal Automation with John Siracusa

#1
3 Likes
#2

When the guest said Perl would be the best language for automation and the internet I quickly looked to see if it was April 1st already.

7 Likes
#3

If anyone has the Siri Shortcut Siracusa mentioned that finds oversized Contacts photos, then resizes them and puts them in iCloud Drive, I’d love a link for it, I have contact photos for just about all my contacts so I could really use this to auto-resize them. Thanks

#4

Just listened and most of the chat was about how real programmers can’t be bothered with the automation most of us are likely to do with Automator, Keyboard Maestro, Shortcuts, Applescript and similar.
How about getting Vitticci on the show. It would be more useful to the listeners.

2 Likes
#5

That’s not how I would have characterised it. I would have said it was about how much of what programmers do IS automation, so that they don’t really think about it in those terms. There was plenty of discussion about the things the rest of us COULD do, and about seeing the opportunities to automate.

It made me think that maybe there are things I should brush up my Applescript for, rather than just say, “Oh, that’s for real programmers”.

2 Likes
#6

I think there’s room for both. I’m a hobby programmer and I spend most of my time in the terminal, I use javascript and python for things here and there (and I used to use perl before everything started being written in python to the point where I just gave in). I’ve been using applescript, automator, etc. because I don’t do Mac-specific programming and didn’t know I could plug into all this functionality via scripts in languages I already use. I’ve tried Swift/Xcode in the past, but ran screaming because it’s just too complex to bother with for the sort of things I want to do.

So I really enjoyed this episode. I’m dying to see some example perl (or python or javascript) scripts using fsevents, cfprefs, etc., so I can see how to make use of those things in code in my preferred environment.

I 100% feel that we should make automation of our own systems possible and easy for everyone – but there are two paths: One path is the Unix philosophy of making tools that are powerful and efficient in a way that can’t be achieved with a fast learning curve, and other other path is targeting the fast learning curve even if some functionality is lost, because some people have more important things to do with their lives (I’m happy for my doctor to devote her time to getting really good at medicine, not programming, for instance, but I want automation to still be within reach for her). Both paths are important. Although I kinda feel like applescript is just another thing I have to learn that’s not really easier than the other languages mentioned and it’s certainly less universally useful. It’s just that it’s easier to find examples for manipulating the Mac with it than with the others.

My big ask is that there is some coverage at some point about automation without compromising privacy and security. But this topic is so big, and definitely has different approaches via the two different paths, that it almost needs its own podcast. I’m using Nextcloud to self-host a lot of my files on a Digital Ocean instance, and I love the way it integrates with the Files app just like Dropbox. But I now have lots of questions about automating remote server management to make it easier. And a lot of the apps mentioned in the podcast have you trade convenience for privacy, and I’d love a discussion on wedging more privacy-protecting apps (like protonmail and signal) into an automation system.

1 Like
#7

I didn’t interpret it that way, instead I would say it was a pretty good description of the feelings I have about automation (I’m not a programmer, I just teach programming at a university) - it’s highly useful but when connecting different apps using different technologies there are so many things that can go wrong, and so many edge cases that I feel quite exhausted just thinking about them … and I can’t write something that works in special circumstances, my whole training says that I must cover all those edge cases and then it becomes too much work for me to write the script.

Trust me, this is a “curse” not some “elitist” view of things.

2 Likes
#8

I really enjoyed John’s take on automation and/or programming, and like all good podcast episodes, this just made me want to learn more about both. I agree that Federico Viticci would also be a good guest, but not because he would be inherently better. They are just good at different aspects of the range of topics covered by automation. Thanks for a good episode!

2 Likes
#9

I was really surprised Python wasn’t mentioned by John when discussing an ideal scripting language. It’s already seen by many to be that and has a lot of the features he mentioned he wants to have: simple syntax, making easy things easy, etc.
I’ll fully agree there may be reasons to not choose Python, but I was genuinly disappointed it didn’t even come up.

Source: I’m a CS phd programming in python on a daily basis (Windows/Linux/Android though)

1 Like
#10

Agreed re: Python. (Siracusa did mention it in passing once, with a list of other languages.) I’m a writer primarily, but I increasingly use biggish datasets, for which I use python.

But I love automation, and have had much better luck using Python (on its own, within Keyboard Maestro, via Pythonista, etc.) than Javascript. Granted, I already know some Python, which makes it easier, but I learned it recently enough I feel like I can say that learning Javascript is so much less intuitive. Plus, most of the tutorials for Javascript are about web use-cases, which seems to be of limited help with automation.

1 Like
#11

True, he did mention it later on in the episode. To be honest, that only made me even more surprised… ¯_(ツ)_/¯

There is actually a whole book on automating using Python, which is available online, for free at https://automatetheboringstuff.com/.

It focusses on practical use-cases for day-to-day automation, while leaving out loads of the more technical aspects of programming in Python.

3 Likes
#12

AtBSwP was for a long time my bible… I even bought the digital and print versions, despite it being available free online. I still refer to it a lot when I forget how to do certain things.