More Learning Than I Can Shake A Stick At

Out of the Tunnel: 1/30s f/6.3 ISO400 17mm -0.3ev, Canon 30D, Canon 17-55 f/2.8 IS
I've been a bad blogger -- not blogging. It has something to do with working harder, commuting further, and earning less, but it's also also tied up with my head being in continual input mode right now.
My temporary spot tech writing has morphed a little and I have another writing client for whom I'm doing a developer guide for cell phone middleware, so I seem to have become a technical writer without really meaning to (talking to others, this is how it apparently happens). Not only that, I'm hiring and managing other tech writers. Plus I continue to plug away at my Cocoa application in my "spare" time.
Let's see, I'm learning:
- Ruby
- Rails
- XML
- XForms
- XPath
- How to hire and manage tech writers, set up a tech pubs department, etc.
- How enormous chips are designed
- Big chunks of Cocoa
- Object-oriented programming
- The practical application of MVC
- PDF document structure
- The math of Bezier curves
Cocoa Programming for Mac OS X Third Edition
Silicon Valley iPhone Developer Meeting

Alex Cone wins the prize for the geekiest name tag at the first Silicon Valley iPhone Developer meeting put together by Tim Burks.
Chi-Hua Chien of KPCB talked about the iFund, KPCB's $100 million fund for investing in new iPhone applications. The meeting was well-attended: probably close to 80 people there.
Aperture: Plug-In SDK 2.1 Now Available
Aperture: Laptop Workflow

Ferris Wheel: 1/1250s f/8.0 ISO200 73mm -0.3ev, Canon 30D, Canon 70-200 f/2.8L IS
Here is what I am currently doing to manage photos on my MacBook and iMac. It's a simple one-way process.
When I import my photos onto the Macbook I do so as managed files so they go into the library. Then I'll cull, rate, keyword, or whatever I want to get done. I don't adjust much, since the screen is small and not as good as my iMac and I can't control the room illumination as well. I leave preview generation turned on for all projects in my library and set it to make half size images. This lets me quickly put together slide shows and skim through images in a flash.
Then when I'm done working on the laptop, I export the project to the desktop and rename the project in the library by adding "Exported" to the end. That's to remind me that I've already done the export and should not do any more editing.
To transfer the project to the iMac I either copy it across the network, or restart the laptop in Firewire target mode and use the Finder to drag the folder across and onto my iMac Aperture library.
Back on the MacBook I delete all the rejects by finding them with a smart album and pressing command delete and then relocate all the remaining project images to a temporary folder. I immediately delete the temporary folder, since I don't want the RAW images to remain on the Macbook, and rename the project again by removing "Exported" and adding "Previews".
So on the laptop I have previews that I can easily show, drag out to other apps, or email, and on the iMac I have the RAW files, the previews, and the project intact. On the laptop the images use up only about 1 MByte each with the thumbnails and previews, so it is pretty space-efficient.
Aperture: Adjustment Plug-Ins Starting To Appear

Tiffen now has their Dfx digital filter suite available as a plug-in for Aperture 2.1:
They are offering a 15-day free trial with full availability in May.Dfx digital filter suite offers precision adjustments over its range of effects that cannot be approached by any other digital filter software. A complete edition includes the most comprehensive array today, emulating more than 1,000 varied effects and gels, from factory pre-sets or custom effects, providing total creative and technical control with the most comprehensive and user-friendly filter-effect palette today.
Digital Film Tools has Light, Ozone, and Power Stroke, three tools that appear to be available right now.
Light: Using a pre-built light and texture library that includes windows, doors, leaves and abstract patterns, you can add realistic lighting and shadow to scenes just as if you were adding a light at the time of shooting.
Ozone: Inspired by Ansel Adams' Zone System for still photography, Ozone allows you to manipulate the color of an image with incredible flexibility and accuracy using a Digital Zone System. The Digital Zone System takes the spectrum of image values and divides them into 11 discrete zones. The color, brightness, contrast and gamma of each zone can be independently adjusted until you've painted a new picture.
Power Stroke introduces a simple, interactive stroke-based interface to quickly and intuitively perform targeted adjustments. Instead of meticulously selecting regions or hand-painting masks, regions of interest are isolated by drawing a few simple brush strokes with adjustments then made only in those areas. Strokes can be assigned multiple adjustments and effects such as color correction, recoloring or desaturation, colorization of black and white images, blur, fill light for dimly lit image areas and Diffusion/Glow.
XCode and Subversion: How Do I Revert?
I have an alternate approach, but I have to undo the changes I made. Subversion to the rescue. I have a subversion repository set up and so I can revert to a previous version. But how? The subversion functionality in XCode is very limited: it's really only any good for checking in new versions and looking at history. There is no way to see the structure of past versions and no way to revert any more than single files.
The answer was to tag the current version by copying it to the tags subversion folder and then check out the older version. I did all of that with snvx. It's a simple but functional GUI subversion client.
My subversion repository has moved from its old location that I set up with Tiger. I had hoped to be able to access it from my laptop over AFP, but locking does not work. So I moved it to an HTTP server-based repository. There are plenty of places on the web that detail how to set it up with Leopard, and it was simple to do. Next I need to figure out how to do ssh tunneling and I'll have a remote access solution.
Aperture: How To Install Aperture On A Second Machine
Dragging the application over does not work because there are some pro application frameworks that are needed. How about downloading another demo and entering my key? That would probably be OK, but then I need to fill out the form and download the whole thing over again.
What worked was to install the original 2.0 demo that I had kept, and then enter the upgrade key I had paid for. When I did that it requested my original Aperture 1.1 key as well and was unlocked. Then I ran the 2.1 updater.
I was quite pleased to find that Aperture 2.1 runs just fine on my MacBook. It's the lowest spec machine, but with 4G RAM fitted. Processing 7MB CR2 files is easily fast enough for normal use, but noticeably slower than my iMac. The glossy screen is nice, but low-end, perfectly acceptable for normal use.
Fraser Speirs On Keywording
In particular he talks at length about the keyword bar at the bottom of the window:So, finally, I’ve drawn together my thoughts about keywording in Aperture. My problem with keywording has always been more about “how can I make it easy enough that I will actually do it?”, rather than “what should the keywords be?”. I’ll explain my personal taste for both, though.
The magic — if that’s what it is — is that these button sets give keyboard shortcuts to your keywords. The first nine keywords in any set get the shortcuts Option-1 through Option-9, although the set of keywords can be arbitrarily large (I think). The second insight, that I think few people have noticed, is that you can cycle through these button groups using the shortcuts Comma and Period. This makes for really fast navigation through keyword groups.
WWDC 2008

White Tree: 1/640s f/8.0 ISO200 70mm, -0.3ev, Canon 30D, Canon 70-200L IS f2.8
Since I'm now developing a real Mac application (known as PP for now), I've taken the plunge and signed up for WWDC. It will be my first year and it will be busy.
I'm in the SF Bay area, but far enough away that commuting to the show in San Francisco makes no sense; so I'll have to find accommodation for that week. Does anyone know of a good (and not oppressively expensive) hotel in the Moscone area?
I'm coding this app in my spare time, progress is slow. I'm learning a great deal about how the frameworks are put together and how they should be used. Typically I get something wrong when I add a feature and then figure out what the right way is as I work through the issues that uncovers. Invariably I end up with less code, and find my code shifting to more sensible places. At that point I know I'm done and can move on.
I'm tackling the application in a simple way. I know that the main purpose of the app needs a whole lot of supporting functionality, so I'm writing that support first. Once all those pieces are in place I will start on the main event. This has the advantage that by the time I get there I will have had a lot of time to think about how I want to do it. And by the magic of object-oriented design, much of that should be independent of other decisions, such as how I store documents on disk and how the windows and views work.
Lightroom 2.0 Beta And Aperture 2.1
Undoubtedly in response to pre-empt any traction by Apple’s rapidly updated Aperture 2 software, Adobe has released a beta of the next version of its competing Lightroom, now at 2.0. As always, comparisons abound, and as always fans of either software will draw their respective lines in the sand.
Aperture: Migrating From 1.0 to 1.5 to 2.1
Aperture: Aperture 2.1 Released -- Adds Image-Editing Plug-Ins

Apple has added image-editing plug-ins to Aperture in this free update to owners of 2.0. The first plug-in is Dodge and Burn, but may more are coming. From the Aperture Resources page:
Aperture 2 includes a powerful plug-in architecture for the seamless integration of popular third-party image editing software, such as Nik Software's Viveza and PictureCode's Noise Ninja (both available soon).
Aperture 2.1 also includes an Apple developed plug-in, Dodge & Burn, that provides tools for making selective edits of images with dodge (lighten), burn (darken), blur, sharpen, and saturation effects.
There is a new movie that shows Dodge and Burn in operation.The free Imaging Plug-in Software Developer Kit (SDK) for Aperture will be available through the Apple Developer Connection (ADC) soon. Interested developers should contact Apple at aperturedeveloper@apple.com.
This considerably opens up the the usefulness of Aperture and will create a whole ecosystem of very useful additions. I will be very interested to see the SDK when it arrives.
In addition to the plug-in, there are a host of other features added:
• Customize Default Adjustment Set. You can now specify which adjustments appear by default in the Adjustments Inspector/HUD.
• Updated Crop Tool. A simplified UI makes it easier to preserve an image’s original aspect ratio, match the aspect ratio of your display, or use one of the standard preset aspect ratios.
• Sorting in All Projects View. A contextual menu allows you to sort the All Projects view in ascending or descending date order.
• Show on Map A contextual menu allows you to choose the Show on Map by right-clicking (or Control-clicking) on an image that contains GPS
data.
• Access to Toolbar on Second Display. When using multiple displays in Full Screen mode, the Full Screen toolbar is now accessible on a second display.
• “Snapshots” book theme. This additional theme includes new “photo border” frames in which to place images.
• Flip Images. You can now flip images horizontally or vertically within Aperture.
• Vignette. The range of gamma and exposure settings available has been expanded.
• Save Books as JPEG or TIFF images. Automator workflows have been added to the PDF pop-up menu in the Print Book window to automatically generate JPEG or TIFF images from book pages.
• Update EXIF from Master. This command allows Aperture to reread EXIF from master images after they have been imported.
• 8-bit External Editor support. Preferences settings have been updated to allow you to send images to an external editor as either 8-bit or 16-bit TIFF or PSD files.
• Extended AppleScript support. The “Reveal” verb in the AppleScript dictionary has been extended to include containers such as projects and albums.
The update also includes fixes that impact a number of other areas, including import, Quick Preview, All Projects view, image adjustments, books, printing and export.To get the update (41 Mbytes), go to the Aperture Downloads page. Then check the Late Breaking News from the Help menu.
[Late updates:]
Rob Galbraith has a particularly good write-up on his site.
The catch with the plug-ins is that they work on a copy of the original image, just like round-tripping to an external application like photoshop -- they are not integrated into the RAW processing that Aperture does. This means that you have to separate your plug-in adjustment workflow from your Aperture adjustment workflow, deciding what you are going to do first, last, and in the middle.
The logic of this implementation is understandable when you consider what will happen long-term, and what Apple has control over. Apple controls its own built-in adjustments and processing so can guarantee that they will stay intact, or be enhanced (like the RAW 2.0 processing update we received recently). But the same guarantees cannot be made for third-party plug-ins, so they have to create and store the intermediate images.
The improved crop is still lacking a basic setting: Current. There is no way to scale (except by math and typing) an image that has been custom-cropped and keep the same aspect ratio. There is also no "flip" option that keeps the clip rectangle the same , but rotates it 90 degrees.
Cocoa: How To Sync Views With A Color Preference Slider
PP has a thumbnail browser, as any photography-oriented app has, and I want to be able to control its background color. Just like Aperture I have a slider in my prefs panel that changes the gray level of the background and need to have that stored in the user's preferences. Since PP is a document-based app (I can have many document windows open at the same time), changing the browser background has to affect all the open documents and should do so in real time so the user can see the result.
Here is my prefs panel. Not much there yet:

The slider is set up to deliver a number between 0.0 and 1.0 and continuously return its state. The prefs panel XIB file also has an NSUserDefaultsController. The file's owner is a custom window controller:

I use three separate mechanisms for keeping everything in sync: actions, bindings, and notifications. Here is all of it together in one diagram:

The slider, NSUserDefaultsController and preferences file are joined together with bindings. I bind the slider's value to NSUserDefaultsController:

so that the controller is notified of all changes to the slider value. The NSUserDefaultsController keeps the prefs file on disk in sync. That is 100% of what is needed to handle the slider and the prefs. To set up the initial preferences I create the defaults in my application object:

To keep the browser background color in sync with the slider I have to be able to tell the browser's view controller that the value has changed so that it can get it from the NSUserDefaultsController object. This is a two-stage process: the slider tells its window controller via its action and the window controller tells the browser view controller through a notification:

To update the browser views, each instance of the browser view controller listens for notifications that indicate the color has changed and sends the appropriate message to its view:

The above two methods are called at appropriate times by the browser's window controller. The color is updated like this as the notification is received:

Finally, to set up the initial color the browser view controller implements this code:
That's it. Having set all of this up I can use the same mechanisms for handling other preferences and parameters that affect the browser or other views. I'm understanding the value of following the MVC pattern: it gives everything a place -- if you can figure out where that should be.
