Messages to Nowhere
January 3, 2008This article has been updated, and moved here
This article has been updated, and moved here
I was blown away when I read the first part of this talk given by Joel Spolsky at Yale, because it so totally nails problems I’ve seen at Microsoft and problems at my alma mater.
I was also reminded of Will Shipley’s excellent article on the limitations of unit-testing.
EDITED TO ADD: I could reproduce this bug in a large project, but not isolate it in a smaller one. It is much likely for my code to have a bug then NSWorkspace. I’m still not 100% certain that this issue wasn’t my fault in some way I don’t understand. But no [...]
Daniel Jalkut on how to get the most out of crash logs. It’s good advice.
Actually I do have one big issue with the article:
If there’s one behavior of your application that you should focus on eliminating, it’s the behavior of crashing. Above all other “nuisances,” this is the one that is absolutely unacceptable.
But preserving someone’s [...]
This simple NSCAssert has saved me a lot of bother. In any class that has an IBOutlet connected to something, Put
NSCAssert(outlet1 && outlet2 && … && outletn, @”An outlet got disconnected!”);
in the awakeFromNib method. Then if you ever accidentally disconnect an outlet, you’ll find out about it quickly.
I think this is a worthwhile [...]
EDITED TO ADD: Several months later, I ran into this same bug again!
I had an issue where if I used
beginSheetModalForWindow:modalDelegate:didEndSelector:contextInfo:
to put up an NSAlert as a sheet inside a window, and I was not running on the main thread, the sheet would not have focus. I’m not sure exactly why, but this solution worked [...]
This article has been updated, and moved here.
Any errors involving NSCFType or some class you have never heard of (eg ” *** -[NSCFType count]: selector not recognized “) are indicators of a memory management bug. Most likely an object is getting released too soon. The freed memory is then re-allocated for a new object, say an NSCFType. The pointer [...]