Jerry Stratton's Blog, page 42
October 16, 2019
A thousand points of color: give your photos a pointillist turn
October 12, 2019
Lingon linked on Astoundingly useful programming tools
Mac OS X contains a powerful alternative to cron, called launchd. Unlike cron, launchd can run scripts not just based on time of day but on repeated intervals; it can also ensure that scheduled scripts run when the computer starts up if the computer is turned off when their scheduled time comes around.
Launchd can also run applications that need assistive access, making it possible to schedule such apps without using an AppleScript app running all the time in the background.
Launchd is also, however, a lot more complicated to set up than cron jobs. I still use cron for most scheduling because cron is easier to maintain. Lingon, however, goes a long way toward making launchd almost as easy to use as cron. This is the only case in the book where I do things differently than I describe: I use Lingon to tell launchd to run an Automator app that runs the schemail e-mail scheduler.
I didn’t want to require you to buy third-party software. But I do recommend it if you use schemail but don’t like having an AppleScript app running all the time.
October 9, 2019
Anything less than school choice is unfair
October 5, 2019
October 2, 2019
Amazing Grace (Uncommon Melody)
September 28, 2019
101 BASIC Computer Games linked on Astounding Computer History
If you’re using a Macintosh, you can still program in BASIC if you want to. I recommend Chipmunk Basic but there are others.
If you’re also fascinated by the history of computers (and, frankly, there’s little other reason to use BASIC on your Macintosh, given the other programming options available—there’s a reason there are no BASIC programs in 42 Astoundingly Useful Scripts) there is no book more important, historically, to home computing than David Ahl’s collection of BASIC games. It’s the father of all of the “xx programs for home computers” books that came later, and thus the grandfather of 42 Astoundingly Useful Scripts and Automations for the Macintosh.
Prosumer home computer gamers mined this book for years for some of the best-loved computer games of the era. I doubt the Game of Life would be as popular if it weren’t for its inclusion in this book; it’s not even a game.
If you’ve ever played a Lunar Lander variation, or a tactical space game with quadrants, Klingons, and refueling stations, or a horse race game with characters moving across the screen… it started with 101 BASIC Computer Games.
September 21, 2019
Is It Worth the Time? linked on Astoundingly useful programming tools
The fact that someone actually made this chart up is funny, but in fact it’s quite useful. Douglas Adams’s quote about spending a full day writing a program to save ten seconds notwithstanding (see the book), writing a program almost always takes longer than performing the task once. The issue is, will writing the program save time over the long run?
If you perform a task five times a day, and you manage to shave ten seconds off of it, that’s worth spending a day or two of programming, at least if you’re going to be performing the task for five years or more. Back when I had a nine-to-five (well, technically, seven-to-three) job, I kept this chart posted on my wall next to the computer.
There were times when wasting the ten seconds is so easy, and writing the program was so uninteresting, that I didn’t feel like writing the program; this chart helped motivate me. And there were times when the savings were low but the program interesting, and the chart helped convince me not to waste the University’s time.
Now that I’m programming for myself, of course, interesting holds more importance.
September 18, 2019
Photo-editing with Persistence of Vision
September 14, 2019
Pythonista linked on Astoundingly useful programming tools
Once you start scripting your Mac, you’ll miss scripting on your mobile devices. Probably the best way to script your iPad or iPhone is using Pythonista. You can use it to create apps on your device and also to create sharing scripts. I have the moronify script set up as a sharing script on my iPad so that I can preflight comments. Highlight the text, share it with the script, and paste the result.
Pythonista is an essential tool for weekend scripters if you’re using an iPhone or iPad.