Automators 18: Terminal Automation with John Siracusa

3 Likes

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

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

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

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

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

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

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

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

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

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

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.