Dan Wood: The Eponymous Weblog (Archives)

Dan Wood Dan Wood is co-owner of Karelia Software, creating programs for the Macintosh computer. He is the father of two kids, lives in the Bay Area of California USA, and prefers bicycles to cars. This site is his older weblog, which mostly covers geeky topics like Macs and Mac Programming. Go visit the current blog here.

Useful Tidbits and Egotistical Musings from Dan Wood

Categories: Business · Mac OS X · Cocoa Programming · General · All Categories

Fri, 23 Mar 2007

Various Developer Questions to the LazyWeb

These are some development-related I've been wondering about. I'm curious if any readers have any suggestions/answers. I'd love to get feedback in the comments!

  • What do you do when you have the need for a dictionary with keys that are in a specific order? What I've done in the past is to have an NSDictionary and an NSArray that track each other; the array of keys maintains the order and the dictionary then deals with the lookup. Is there a better way? A custom data structure?
  • Analyzing textual sample outputs is tedious. If you have captured the sample yourself with the "Activity Monitor" utility, you get a nice user interface for analyzing the nested samples. Anybody seen an application that parses text samples (generally submitted by users) and displays them similarly?
  • When you create an application, framework, or bundle, your executable can have symbols embedded in them. Actually there seem to be two levels of data: the method names, or the method names with line numbers from the source files. Does anybody know of a tool to determine what kind of debug symbols are embedded in an executable?
  • Does anybody have any useful gdb macros to that are useful in Cocoa development?
  • Does anybody have any suggestions for outputting an NSTimeInterval in an internationalized way?
  • When analyzing a crash report that gives me the address offset into a function in the backtrace, I tend to bring up the debugger and get into that method (on the same architecture machine), and then toggle the disassembly display, then step through the code so I can see the lines of code on the left and the disassembly (to see the address offset) on the right. This is pretty tedious and often hard to find the right line. Are there any better/faster ways to get this information?

I'll make a post later with the highlights of whatever insights I learn!

Thu, 22 Mar 2007

LazyWeb: A Keychain item that won't unlock?

Has anybody seen this before? In Keychain Access, there are many items that I can't unlock to see the current password. Clicking on the "show password" checkbox, which normally should ask you permission and then show the current password in the field next to the checkbox, has no effect ... clicking the checkbox registers briefly, but the checkbox won't stay checked.

I've tried repairing the keychain with "Keychain First Aid" but it checks out just fine....

Any ideas on what might be happening? I sort of want to be able to access these items...

Wed, 14 Mar 2007

Fun with the Mac: Race Spotlight!

Spotlight on the Mac is useful, but it's still terribly slow, especially at finding Applications, I've found. I have come up with a little game:

  • Type the name of the application you want in the Spotlight menu, and hit return.
  • Then start navigating in the Finder to the folder/subfolder where you think your application will be.

Which one wins? Almost always, the manual navigation.

Maybe I should try LaunchBar or QuickSilver again....