Anyone can write a software program, a sequence of steps that accomplishes an action. Open a programming manual for any computer language...
Anyone can write a software program, a sequence of steps that accomplishes an action. Open a programming manual for any computer language and you can find commands that cause the computer to spout, “Hello, world!”
But does everyone want to program? Hardly.
Most of us — even me, who programs in several scripting languages — would rather perform a task than produce software to accomplish it.
The disconnect is between our ability to visualize how to carry out a tedious task through repetitive procedures, like renaming 100 digital photographs with numbers that ascend chronologically, and how to cause our computer to do it for us.
Most Read Stories
- Foreign buyers drop off as Seattle housing market hits hottest tempo since 2006 bubble
- What drivers can and cannot do under Washington state's new distracted-driving law
- ‘A painful and frustrating experience’: Horizon Air scheduling havoc will continue into the fall
- Seattle police after organizer cancels popular Magnuson Park movie nights: ‘The park is safe’
- Dining on roadkill: Washington residents gather 1,600 deer, elk in law's first year VIEW
In Mac OS X 10.4 Tiger, Apple risks that a percentage of their users will cast off the shackles of prepackaged free or commercial software and start working on their own inventions. Spotlight, Automator and Widgets all involve aspects of programming, and provide a clear set of stepping stones for someone to develop more of an interest.
A programming language consists of a fixed and limited vocabulary of words used in a precise order and with precise expression, called syntax — as in a spoken language but with less flexibility.
Learning those words and the language’s manner of putting them together can take weeks or months to master the basics. Apple wants to sidestep that learning curve and put you immediately in the programmer’s seat.
Spotlight itself is a single-minded, virtual computer. Programs fed into it are composed of single words or a few restrictive keywords like kind and date.
Apple has posted a list of valid items you can pair with kinds (like image and font) and dates (like yesterday) at www.apple.com/macosx/tips/spotlight.html.
When you enter a search such as Benjamin kind: images date: this year, you’re writing a very simple program defined by those parameters. The Spotlight “computer” produces a list of results as its output.
Moving from Spotlight to Automator is a big leap, but still approachable. Automator produces AppleScript code, Apple’s long-time scripting language that uses a human-readable approach: tell application “Finder” select file fileName of startup disk is a valid line of AppleScript. But Automator doesn’t show you this code unless you want to see it.
When you launch Automator (found in the Applications folder), you can pull together prebuilt actions from programs that support Automator. This includes a large list, and Apple has Automator actions for many of its products. To create an Automator work flow, you drag actions into a visual, numbered sequence.
A very simple case is how I install Dashboard Widgets. I prefer the Firefox browser even to Apple’s improved Safari 2.0 in Tiger, but Firefox doesn’t install Widgets automatically the way Safari 2.0 can. (This is itself a security risk that Apple has already addressed since Tiger was released.)
I created an Automator action that has two parts: first, “Get Selected Finder Items,” which creates a list of items to act upon, and then, “Move Finder Items,” specifying the Widgets folder in the Library folder. I save this Widget as a Plug-In for the Finder.
When I select a Widget on the Desktop and Control-click it to bring up the contextual menu, I can select the workflow from the Automator submenu. Voila: I have created a little program. (You can attach these workflow to folders so that the workflow automatically acts on any item dropped into the folder.)
Speaking of Widgets, Apple’s introduction of these mini-programs that appear via the Dashboard, a sort of overlay that you can show and hide, has prompted interest in whether small, tightly focused software can be useful in a world of multipurpose programs.
Widgets generally pull in information over the Internet and then display that in a compact form. Early Widgets from developers other than Apple include one that takes the Washington State Department of Transportation traffic map and displays it in compact format.
Apple’s early documentation is sparse, and I’d recommend waiting for my colleague Dori Smith’s book, “Dashboard Widgets for OS X: A Visual QuickStart Guide” to hit the bookshelves later this year.
Glenn Fleishman and Jeff Carlson write the Practical Mac column for Personal Technology and about technology in general for The Seattle Times and other publications. Send questions to Glenn at email@example.com. More columns at www.seattletimes.com/columnists