Sunday, April 08, 2007

Core Image Fun House -- the powerful image editor you didn't know you had

Every modern Mac ships with Apple's developer toolkit, though it's not installed. It's on the DVD. You can also register as a developer (free) and download the latest version (which is what I did today since I'm messing with AppleScript Studio).

Besides a massive (1.3 GB) library of Apple documentation (take that Spotlight!) the Developer install includes several useful tools and at least one semi-frivolous tool: Core Image Fun House. I tried out the perspective manipulation tool. Very impressive.

You can do some valuable image manipulation with this, especially if you don't own Aperture. You can, for example, apply noise reduction, something that's part of Aperture but not part of iPhoto 6. It opened my Canon RAW images (.CR2) without complaint.

It has an interesting export option called "Fun House Preset". This is a package that contains the original RAW file and an plist style XML file.

You can also export as TIFF or JPG. Interesting and potentially useful. I'll test it as an external editor with iPhoto.

O'Reilly, Safari Books, and AppleScript: so close to a win-win

[Updated with a correction per Matt Neuburg's comments. Thank you very much Matt!]

This is one of those situations that's so achingly close to a win-win for everyone that it pains me. If only someone at O'Reilly could realize how close they are! Here's the problem and the solution.

Matt Neuburg's AppleScript book
(not Neuberg!) is an excellent overview of AppleScript. Alas, it is limited, as all such books are, by AppleScript's peculiar nature.

The problem is that AppleScript is primarily useful when it interacts with scriptable Applications; this means that many important commands one may think of as belonging to AppleScript belong to Applications instead [2]. If you working to extend an existing script, and decide to research a command in the excellent book index Matt built himself [1], you'll often be frustrated. The command, you see, belongs to the Application, not to AppleScript.

On the other hand, there's a good chance Matt used in the command in one or more examples. In the absence of a companion book entitled "AppleScript for Applications" [3] you'd like to find those examples. Alas, that's where you want a full text search engine.

The good news is, there are two. The even better news is that O'Reilly could make their engine much more visible and useful, with advantages for everyone.

Consider the case of the 'Duplicate' command, which is supported by iTunes (among others) and the Finder (in slightly different ways, no doubt). When I tried Amazon's "search within the book" I discovered several illuminating references. Similarly, O'Reilly allows one to search within the book as a promotion for its Safari eBook library: O'Reilly - Safari Books Online - 0596102119 - AppleScript: The Definitive Guide, 2nd Edition.

The Safari search works well, but they don't want to give away too much for free. You can only read a snippet of information in the search results. A snippet that doesn't, currently, include the page or section number. If you click further you get to the 'buy safari' screen, but you also get to see the section number. Now, you can return to the book and read the information.

Matt would love for O'Reilly to open up Safari a bit more, but they don't want to. That's ok, O'Reilly could make all of us (and themselves) happy by keeping Safari just as closed as it is today, but merely adding a section reference to the search results they freely expose already.

Here's the win-win for O'Reilly, Matt, book retailers and us:
1. Include the section reference in the initial search results screen.
2. Promote the search facility in every published O'Reilly book and explain how to use it on the O'Reilly book page.
3. If need be, request readers register to obtain this service. O'Reilly doesn't do spam, but they can suggest email subscriptions, RSS feeds, etc during the registration process.
Let us count the wins:
1. Matt's book is suddenly a better book. Readers get more value from it. They use it more. They like it and O'Reilly more.
2. O'Reilly gets ongoing visits from its customers. Many would kill for this alone.
3. O'Reilly gets free, regular, promotion of Safari services.
4. O'Reilly sells more books, Amazon sells more books.
5. O'Reilly does not reduce the value of Safari, they enhance it by introducing users to it without giving it away.
It's a win-win for everyone. I just hope someone at O'Reilly can see the profit in it for them.

john

[1] In my real life I'm a knowledge representation/informatics geek. I have a lot of respect for the unrecognized intellectual labor that goes into producing a truly excellent index. In this case Matt did the work himself!

[2] Many applications may use the same string to refer to somewhat similar functions with slightly different syntax and semantics. This "ontologic dilemma" is a kind of uncontrolled overloading, and it makes AppleScript very challenging to use.

[3] If Matt decides to sell an "AppleScript for Applications" as a Tidbits eBook I'll pay for mine in advance.

Saturday, April 07, 2007

The NYT reviews travel bargain finder services

It feels like we're completely outgunned by the airlines when it comes to pricing strategies, but there's no lack of sites trying to find a way to stay in the game. The NYT has a nice review. I'm going to add several of these to my old business travel page (emphases mine)
Sifting Data to Uncover Travel Deals - New York Times

... The Internet abounds with offers for low fares. You can find them on the major Internet travel agent sites like Orbitz, Travelocity or on more specialized sites like Cheaptickets.com or Sidestep.com.

Farecast.com, which gathered a following with technology that enables it to predict the direction of airfares on a particular route, is back with another innovation that it says can distinguish the best deals in air travel....

...George Hobica, a former travel writer, says he thinks that fare-finder sites that rely only on data feeds miss bargains mainly because they do not include the information from Southwest Airlines. Southwest offers bargain fares but does not share its information with other Web sites. He started airfare based on the idea that “technology can fail.

...For the hard-core traveler, the kind who wants to make sure he has the highest odds of making that meeting in Manhattan, there is Flightstats.com. It compiles statistics not just by airline, but by each flight. So, for instance, if you wanted to see which flights between Atlanta and Newark are most prone to problems, you would go to its Flight Rating section and find that while Continental Flight 1154 is on time 96 percent of the time, Continental Flight 1156 is on time only 44 percent of the time and was canceled or diverted 6 percent of the time over the last 60 days.

The site also helpfully lays out vital bits of information you need to make a decision. For instance, it cites the number of flights on a particular route. The on-time statistics become more relevant if you know only two flights were made on a particular route, not 54.

... One source of data at FlightStats on frequent-flier promotions comes from Boaz Shmueli, who runs MileMaven.com and PointMaven. If your goal in life is to accumulate enough points to get free flights to Hawaii for the family vacation, you will want to frequent these sites...

... Google Mobile’s (www.google.com/intl/en-us/mobile/sms/) text messaging service for cellphones provides information in a pinch. You can get flight arrival or departure information (it comes from Flightstats) by typing in the flight number, like “Jetblue 91” on your phone’s SMS service and sending the query to 466453. (That is Google on the keypad, in case you want to remember it.)

You can also get the phone number of an airline, which can come in handy when you have just learned a flight has been canceled. (While other frustrated travelers shove each other in line at the counter, you make a few calls.) Google also offers to translate words into foreign languages and provides driving directions.

Orbitz also makes flight information available to cellphone users. Type in orbitz.com from any Web-enabled phone and you can also get information about hotels that are near the airport in 20 major cities. It details room availability and prices.

Nextag.com, the comparison shopping site, scours other Web sites for deals on electronics, clothing and other products. Now it searches Web sites like Orbitz, hotels.com and cheaptickets.com to compile a list of hotels. It makes a similar effort for car rentals...

AppleScript: adding a progress indicator to a script

I finally found a need to write (modify) an AppleScript. I'd been kind of hoping Apple would dump AppleScript and switch over to Ruby or (even better) Python as the official AppleEvent scripting language [1]. After some grumbling, though, I was able to get things working. The remaining problems is that execution is dog slow and the progress indicator available from AppleScript is very annoying.

So I was interested in this tutorial ...
AppleScript Studio Tutorial - Getting Started with Displaying Progress

One very common use for AppleScript is batch processing. Scripts of this nature will often loop through multiple items, performing some type of automated task for each item being processed. An example of this might be a script that loops through a folder of image files, converting each one to another format.

A script of this nature that is created with Script Editor, and then run, may work just fine. However, visually, it is less than spectacular. Other than a spinning cursor, and perhaps a dialog message displayed here or there during script execution, the user does not usually receive a very good visual representation of what is occurring.

This is where AppleScript Studio can come in handy. In this month's column, we will discuss adding progress bars and spinners to an AppleScript, in order to provide a visual representation of what is being processed, how much processing is complete, and how much processing remains during script execution.
I'll give it a try, and if I get it running I'll post the code. I've added MacScripter to my feeds as well.

[1] This insightful feeling comment, however, has given me pause:
Posted February 28, 2007 @ 12:57PM by AlanS

... What makes AppleScripting difficult is not the AppleScript language, it is the OSA architecture, which pushes most of the semantics into individual applications. Not only do most applications do an abysmal job of documenting their OSA support, they also differ widely in how they choose implement basic semantics such as object references. Thus, every attempt to use AppleScript often becomes a treasure hunt to find the magic incantation to accomplish a goal. Switching to another scripting language will not solve this fundamental problem...
Which makes me even sadder that "AppleScript for Applications" (out of print) has never been updated. One of the most aggravating things about trying to use AppleScript is that so much is undocumented, under-documented, broken, incompletely implemented ...

Windows Live OneCare: maybe Microsoft is still incompetent

How much trouble is Microsoft having with their Windows Live OneCare subscription service? Let me count the ways:
1. Live OneCare is red recently. It says "An error has prevented Windows Live OneCare from installing a required upgrade".
2. I click "get help" and manually check for updates.
3. I get a notice that page URL has changed -- danger! danger! I persist.
4. The update page can't verify my account status.
5. I click the link I'm next shown for technical support.
6. I get this: Page Not Found: "undefined"
What a relief. I was afraid Microsoft was rediscovering competence. Maybe Windows Live Writer is some kind of statistical fluke. This latest debacle gives me a warm and fuzzy feeling ...

Update: unsurprisingly, an uninstall, new download and reinstall fixed the problem.

Thursday, April 05, 2007

Google My Maps killed my XP box

Google Maps now includes the KML based path sketching previously available only on Google Earth (Plus). Sounds great for inline skating trails, commuting bike paths, etc. I fired it up in Firefox tonight and zoomed out from my home map. Then XP died. Just died. No keyboard or mouse response, nothing. I had to power cycle.

Wow. I suspect something hit the video driver hard. I'll be very careful about using this app while I have any unsaved work open...

Update: The crash blew away my Firefox browser settings including the configuration data for the Google Firefox toolbar and Google's firefox browser sync. Wow.

Wednesday, April 04, 2007

Google's Mac desktop: a bit scary

The exciting news is that Google has delivered another major OS X product. The bad news is it tries to replace Spotlight and has a fairly ugly installation routine. DF has the story ...
Daring Fireball: A Quick, Possibly Incomplete Guide to What Gets Installed by the Google Desktop Installer

... One of the nice features of Apple’s installer is the Show Files command in the File menu, which gives you a nice listing of everything the installer is going to install, before it happens...

...Today, Google released Google Desktop for Mac, which, in a nutshell, is more or less a competitor to Spotlight. I’ve only had time to give it a cursory examination, but it’s clearly a deep and complex set of software. I say “set” because Google Desktop is not just one piece of software, it’s a system with numerous components. A simple drag-and-drop installation wouldn’t work.

But Google doesn’t use Apple’s standard installer, either. Google Desktop is delivered using another new Google app, called Google Updater. This app is a meta installer for various Google Mac apps, including, as of today, Google Desktop, Earth, Notifier, and Picasa Uploader. It doesn’t contain the software for any of these apps, instead, it downloads the latest version when you choose to install or update them. It also provides a simple one-button interface for uninstalling these apps...
I won't be installing this one for a while. Spotlight isn't perfect, but it's pretty darned good (especially with non-Apple front ends). I know Google is into search, but really I wish they'd focused on other value props for their Mac client. I also heartily dislike installations that break 'good conduct' rules, and it appears Google Desktop for Mac is quite a bad actor.

I hope Google will respond and address some of these issues. I'd like to see an installation that omitted the search function.