Site logo
Using Applscript to ease application testing
This is one of those ideas that when you hear it you think "Well of course", but I have to admit that all these years it never occurred to me. I'm one of these people who eats his own dogfood. When I need to find a color, I use Painter's Picker. When i need to launch a program, I use Trampoline. Now here's the trick: When it comes time to test an update to Trampoline, I often have to rearrange the preferences of the app. It's a real pain having to constantly reset my prefs, especially since Trampoline's entire reason for being is basically just to store a set of user preferences (favorite programs and other paths), so every time I test it, I change my own workspace.

So I finally came up with these 2 applescripts. When run, the first one will quit Trampoline if it's running, then backup the preferences file and delete it, leaving me ready to run Trampoline like it's the first time it's ever been run. The second will, of course, restore the backed up preferences.

Both scripts are relatively easy to customize, just enter a different application name and defaults domain in the top two lines. Then save them as applications and add them to your XCode project (but make sure they're not included in any targets, they'll just waste space). Now you have a simple way to test new defaults regimes and then return to your favorite settings when done.

You can find them on the Open Source page.

Simple development automation. Joy.
PixureSaver 0.8.1
I promised I'd release Pixure to the general public, and so I have.

PixureSaver 0.8.1 is a pretty stable version of the screensaver I submitted to IronCoder V. It's a simple attempt at a genetic algorithm to approximate the appearance of a preexisting picture. When it first loads, it looks like a bunch of static, but over time, a picture appears as the Pixures (PIXel creatURES) begin adapting to the image.

Since I submitted the source to IronCoder, I saw no reason to close it now. So the full source of PixureSaver is available for download as well. I've been meaning to start an open source page on this site for a while, and this was as good a reason as any.

So download, enjoy, modify, criticize, etc.
IronCoder V
My first Ironcoder. What a ride.

If you're not aware, Ironcoder is a programming competition put on more or less quarterly by the macsb mailing list. Entrants have 48 hours to create a new piece of software using a particular technology and a theme. For Ironcoder V, the technology was ScreenSaver.framework and the theme was "life". Many thanks to Jonathan Wight, winner of Ironcoder IV, for coming up with a challenging theme. Entries ranged from Life Cereal to the Game of Life (the mathematical version, not the Hasbro one), to a brilliant wikipedia crawler/information visualizer doohickey by Ben Gottlieb.

I have to tip my hat to Jonathan. He basically spent the last week handling the contest, and when there ended up being 30 entries, he did his best to judge them all in a timely manner. There actually was a part of me that was glad not to win. It isn't easy to judge your peers, especially with them all watching you on irc.

And no, I didn't win. Ben Gottlieb did with his Wikipath knowledge explorer screensaver. And it was well earned. A great idea, a great implementation, a classy look. And informative. This is the trifecta (quadrifecta?) for screensavers. I'm probably going to set it up as my screensaver now, though I honestly spend little time watching screen savers anymore. Congratulations Ben.

Of course, I did make it to the top 5 with my entry, Pixure, which I hope to release to the general public soon. It's a quick and dirty attempt at a genetic algorithm that gradually builds an approximation of a preexisting image. I've been meaning for a while to open up a source code section on this site, and this is as good a reason as any. So keep your eyes open for this soon.

But in the meantime, I'd recommend anyone who wants to learn more about programming the macintosh download the full set of entries with source code (15MB). I know I'll be using some tricks I've seen in there.