I put a bunch of Xcode text macros I use for writing Objective-C on GitHub, together with a cheat sheet generator:
http://github.com/liyanage/xcode-text-macros
You’re welcome to contribute additional macros to the collection.
Apple Generic Versioning (AGV) is a system that helps with software project version number management in Xcode projects. Adopting it has some benefits such as stamping the version information into the binaries in a way compatible with the what tool.
I thought about using it for my personal projects in the past, but was never comfortable with the agvtool utility manipulating files such as the Xcode project file directly. I thought that I would corrupt these files when I forgot to close the project in Xcode before bumping a version.
I’m now much more comfortable with that thought because I realized how well Xcode handles external changes to its open files. I realized that when I moved my projects to Git and started using local branches. At first I avoided switching between those branches while the project was open in Xcode for the same reason, but when I actually tested what happens when I switch back and forth I saw that Xcode handles it well:

Obviously you shouldn’t do this with files that have unsaved changes. Xcode seems to store all changes to the project settings to its project file right away, so you usually only have to check for unsaved source code files.
Now that I’m confident that I can’t get myself into trouble with agvtool (at least not this particular kind of trouble) here’s how I set it up:
First I enable AGV on the project level. There are two settings, setting the versioning system to AGV and setting the initial version number:

Make sure you set this on the project level and in “All Configurations.” There are some other settings on the target level, but Xcode should set those to sensible default values when you flip the switch to enable AGV.
Next I replace all occurrences of the project version number in the Info.plist file with a placeholder:
<key>CFBundleGetInfoString</key>
<string>Checksum version ${CURRENT_PROJECT_VERSION}, Copyright ...</string>
<key>CFBundleShortVersionString</key>
<string>Checksum version ${CURRENT_PROJECT_VERSION}</string>
<key>CFBundleVersion</key>
<string>${CURRENT_PROJECT_VERSION}</string>
From now on I can bump versions on the command line like this:
agvtool new-version 2.9
Xcode will display its “changed externally” message when it’s coming to the front again and after it reloads the project you can build with the new version number.
These two articles cover Xcode project versioning in much more detail, including alternatives to AGV:
http://www.dribin.org/dave/blog/archives/2006/08/02/versioning_os_x_apps/
http://chanson.livejournal.com/125568.html
![]()
I’m assessing the impact of dropping 10.5 support in one of the next versions of Album Artwork Assistant. I’m basing this decision on system profile data included in the application’s software update check requests (courtesy of the awesome Sparkle framework).
About 50% of the users who enabled automatic software update checks also allowed the application to send along this anonymous system profile data. If you’re curious, it looks like this:
osVersion=10.5.8 cputype=7 cpu64bit=1 cpusubtype=4 model=iMac7,1 ncpu=2 lang=en appName=Album Artwork Assistant appVersion=2.7 cpuFreqMHz=2800 ramMB=2048
The data I analyzed indicates a 50/50 split between 10.5 and 10.6 systems, so dropping 10.5 support affects a fair number of people. However, the data also indicates that the split between Intel and PPC systems is 93/7, which means that the vast majority of people who still run 10.5 have computers that could run 10.6, and in my opinion they really should to get the most out of their Macs.
So I’ll make Album Artwork Assistant 10.6-only in one of the next versions, because I want to take advantage of new development technologies in Mac OS X 10.6 that make my life easier and the application better. Without support for 10.5, 7% of the users won’t be able to upgrade to future versions, but for them the current version will continue to work just fine, and the program pretty much does what it needs to do in its current form. Plus, Album Artwork Assistant is free, so nobody gets to complain anyway :-)
By the way, looking at the update request data I was surprised to see how many requests were from the AppFresh update tracking application, it seems to be very popular. I tried it too a while a go and liked it. Give it a try...
I always thought that the overall system performance and responsiveness of powerful modern laptops like the MacBook Pro suffers from the performance characteristics of their 2.5" laptop hard disks. I know that in the past few years, my laptops got more and faster CPUs, faster memory buses, and more memory, but subjectively I still found them sluggish in many situations.
Now I replaced the 5400 RPM 320GB disk drive in my 2009 15" MacBook Pro with the Corsair P256, a 256GB solid-state drive (SSD). SSDs like this one got rave reviews, which nudged me towards buying one (they are not cheap, unfortunately).
The difference is like night and day - this thing is ridiculously fast. Booting and logging in are much faster (I start a few small utilities on login, and the system starts its own background processes). Application launch time is much improved. Even heavyweight applications such as Photoshop or Illustrator CS4 start up within seconds. I can realistically set Photoshop as external editor for iPhoto. Smaller applications such as Preview or iCal open instantly. Switching between applications doesn't lag, even when parts need to be swapped in. Because applications open so quickly, I find myself closing them more often when I don't need them again right away, which helps battery life in some cases.
Speaking of battery life, that's also improved. This laptop with the bigger, non-replaceable battery already had the longest run time I've ever had in a laptop, but with this SSD it's even better.
So the pros are more speed and longer battery run time, the cons are the price and reduced capacity. 256GB seems to be the largest that's currently available for the 2.5" form factor. If you can live with that and justify spending the money, get yourself one of these. You won't regret it.
My friend Severin replaced the boot disk of his Mac Pro with an SSD and is very happy with it too, so it's not just for laptops.
I'm not done pimping this laptop. These new MacBooks can handle up to 8GB of RAM with new 4GB SO-DIMMs, and I'll try that next.
Update: Unfortunately it turns out that the P256 freezes up completely from time to time, taking the OS and every application that touches the disk with it. The only solution is a hard shutdown and reboot. It seems to happen about every other day. Before Corsair (hopefully) issues a firmware update that fixes this, I cannot recommend this particular SSD drive. Tom’s Hardware has a review of some other SSDs.
Second update: that was a false alarm. I exchanged the P256 with a Crucial CT256M225, and I still get the system hangs, so the problem is not caused by the P256. Having used both now I can recommend either one. The Crucial seems to be a bit faster according to Xbench, but the P256 seems to use quite a bit less power and a charge of the MacBook’s battery lasts noticeably longer with it, so you have a nice choice depending on what you value more. That Tom’s Hardware review also mentions the P256’s power efficiency.
One thing I do like better about Crucial is that they are open about firmware updates and have a dedicated page for them. Corsair doesn’t give out any information about firmware updates, and the moderators in their forums only repeat unsatisfying responses.
Some pictures from earlier this month, from the San Francisco Fleet Week air show.
Flickr -> blog integration test...
Here’s one of the photos from my San Francisco trip:

I’m doing a contest, whoever comes up with the funniest text for the bubble wins a drink (or the Internet if you live too far away).
Submit your entry here in the comments or via e-mail
Update: Schwab’s entry was clearly my favorite so I updated the picture... Comments are closed but you can still see the other submission comments by clicking on the permalink.
I updated my small Mac OS X application for calculating file checksums (SHA-1, MD5):
http://www.entropy.ch/software/macosx/#checksum
The new version contains a few bug fixes as well as user interface improvements, specifically new user interface elements added in Leopard.
The PHP group recently released the final version of PHP 5.3.0 and I just finished a first release of my PHP module package for Apache 2 in Mac OS X 10.5. The download link is in this forum post:
http://www.entropy.ch/phpbb2/viewtopic.php?t=4000
Try it out and let me know if there are problems.
For me, PHP 5.3 finally brings the language closer to the level of others such as Perl, Python or Ruby, where these features have been available for a long time. I really missed them in PHP, and the language sucks less now that it has them :-)
Ted Stresen-Reuter, author of a big, popular BBEdit clipping set for PHP, Carlton Gibson, and I recently combined all our BBEdit clipping sets into one big collection, and the result is now on GitHub:
http://github.com/tedmasterweb/bbeditclippings/
This was a good opportunity to clean up the sets, especially the one for Perl. It got lots of new clippings and a more modern coding style in existing clippings.
I also realized that the sets on my site were always hopelessly out of date because I never published new versions when I improved and added clippings. With the code now available on GitHub, publishing is much easier for me and users of the sets can always update to the most recent version with a quick git pull.
You’re welcome to contribute additional clipping sets for other programming languages to this collection. If want to add your set, use GitHub’s fork feature to clone our project, then add your stuff and let us know about it.
Here’s an updated version of checklibs.pl, a developer tool that lists dynamic library dependencies of Mac OS X binaries. I introduced it in an earlier article.
The new version colorizes all libraries that are outside of the /System and /usr/lib directories and therefore not part of a standard Mac OS X installation.
The color helps spotting non-standard libraries. For each one, you have to determine if the dependency is a build mistake (hello MacPorts or Fink in $PATH) or if it’s OK because the library will be shipped and installed along with the binary.
The script is now under revision control as part of my Mac OS X shell script collection on GitHub:
http://github.com/liyanage/macosx-shell-scripts
I will be moving to the US later this year and I’m looking for a software engineering job, specifically Cocoa/Cocoa Touch or web development work.
Currently I’m a senior software engineer in Switzerland working at futureLAB AG, where my job includes activities such as software design/architecture, implementation, training of software engineers, technical documentation, user interface work and lots of other things, all of it in a UNIX / Mac OS X / open source environment.
I already have US permanent resident status including a social security number and everything else that goes with it, so there will be zero immigration/visa paperwork for an employer. You can just hire me, and I can just start working.
I’m interested in an on-site, full-time position in one of these locations:
- San Francisco
- Anywhere else in the SF Bay Area
- New York City
I also got several recommendations for the Portland, Oregon area.
If you have an interesting job offer, send me an e-mail so we can exchange more detailed information. My address is on the about page.
For me, the Mac OS X keyboard shortcuts for the text editing commands “Use Selection for Find” and “Find Next” / “Find Previous” are a reflex by now. These shortcuts and the way the commands work are pretty consistent across all Mac OS X apps that allow text editing.
The exception, of course, is Microsoft Word.
It drove me nuts that it doesn’t work the same way there, and obviously Word is exactly where I edit a lot of text. To bring it in line with the other applications I created three AppleScripts that implement these commands and bound them to the standard shortcuts ⌘E, ⌘G and ⇧⌘G with FastScripts (which is out in a great new version 2.4 with more features available for free).
Use Selection for Find:
tell application "Microsoft Word"
set mySelection to content of selection
set myFind to find object of selection
set content of myFind to mySelection
end tell
Find Next:
tell application "Microsoft Word"
set myFind to find object of selection
execute find myFind wrap find find continue with match forward
end tell
Find Previous:
tell application "Microsoft Word"
set myFind to find object of selection
execute find myFind wrap find find continue without match forward
end tell
I got a notice from Amazon telling me to change my Album Artwork Assistant application within 60 days so that it signs its search requests to the Amazon AWS product information web service. I use this service to find album artwork images.
Amazon provides some notes and examples for Java, Perl and C#, but not for Objective-C. I wrapped my signed request URL generation in a class that other Cocoa developers can reuse. It’s available here:
SignedAwsSearchRequest.h and SignedAwsSearchRequest.m
Example usage can be seen in the unit test file TestSignedAwsSearchRequest.m
|

















