I've received a lot of e-mails from people who have read Beginning iPhone 3 Development. Anytime somebody thanks Dave and me for helping them to create an App, it feels pretty darn good, but a few e-mails stand out. I got one such e-mail, today, from Cameron Cohen, an eleven year old developer who already has an App in the App Store.
Now, in my mind, that's a pretty cool thing in and of itself. But it gets even cooler: Cameron is donating a part of the proceeds of his app to Mattel Children's Hospital UCLA's Child Life / Child Development program.
I don't normally blog about end-user applications — that's not the purpose of this blog — but I'm making an exception in this case. Check out Cameron's web site and also check out his first app, iSketch (iTunes Link).
Also, if there's anybody in the media reading this, I think Cameron's tale would make a great human interest story… I'm just sayin'.
Sunday, January 17, 2010
Thursday, January 14, 2010
NSZombies in Instruments
If you've been an iPhone developer fro any length of time, you probably know about the eight wonder of the debugging world, NSZombie (if you don't, check out the last chapter of More iPhone 3 Development). What you may not know is that Instruments has recently added support for NSZombie. Mark Johnson has put together a little video showing how to use Instrument's NSZombie support right here.
Tuesday, January 12, 2010
Top 10 Pubs Near NSConference UK
Chris Walters assembled this extremely helpful list of the top 10 pubs near NSConference UK. What an awesome resource! The after hours socializing at conferences is at least as important as the day-time activities, so this is a list that is likely to be well-used.
Monday, January 11, 2010
NSConference 2010
Just wanted to remind people that NSConference Europe is coming up at the beginning of February in the U.K. and three weeks later in Atlanta, Georgia. I've agreed to give three presentations this year, one on Mac development, and two on iPhone development, though my Mac presentation actually talks mostly about Objective-C and foundation and is equally applicable to iPhone.
I'm really jazzed about both NSConferences, and am excited to be listed alongside some of these crazy good speakers. The speaker list this year includes Mike Lee, Wolf Rentzsch, Dave Dribin, Mat Gemmell, Drew McCormack, Aaron Hillegas, Marcus Zarra, and Andy Finnell, and I may have even missed some. If I were to include the previous conferences, the list would read like a who's who of Mac development.
If you're not already planning to go, you really should consider it. I've heard nothing but great things about NSConference.
I'll be arriving in the U.K. on Saturday, January 30, 2010, and this will be my first time there, so I'm looking forward to it. There's also a rumor going around that they have beer in the U.K. I'm just sayin'…
I'm really jazzed about both NSConferences, and am excited to be listed alongside some of these crazy good speakers. The speaker list this year includes Mike Lee, Wolf Rentzsch, Dave Dribin, Mat Gemmell, Drew McCormack, Aaron Hillegas, Marcus Zarra, and Andy Finnell, and I may have even missed some. If I were to include the previous conferences, the list would read like a who's who of Mac development.
If you're not already planning to go, you really should consider it. I've heard nothing but great things about NSConference.
I'll be arriving in the U.K. on Saturday, January 30, 2010, and this will be my first time there, so I'm looking forward to it. There's also a rumor going around that they have beer in the U.K. I'm just sayin'…
Thursday, January 7, 2010
CES Keynote
Part of my New Year's resolution was not to spend much time on opinion pieces and stick more to programming and technical topics. I can't let last night's disaster of a CES Keynote go without at least a brief comment, however. Watching Steve Ballmer on stage felt like watching QVC, only that comparison does a grave disservice to the QVC sales professionals who actually understand their audience, if not necessarily all the products they sell.

Things go wrong in live presentations, but they don't go as wrong as they did last night unless you really fucking try. It was a fail of epic proportions. From the constant technical problems, like tablets and mobile touch phones not detecting touches, to the use of Twilight to showcase the ability of the "slate" PCs to display eBooks (ZOMG, really? They can do that without a keyboard!?). You're presenting to the Consumer Electronic industry - a room full of geeks and press geeks, and you choose to showcase Twilight? Wow, talk about not knowing your audience.
Now, I know I bash Ballmer and Microsoft more than I probably should, but every year, Ballmer and Microsoft (with the exception of the Xbox division) look more and more buffoonish and less and less relevant. I've said it before, and I'll continue to say it until it happens: Microsoft needs a new leader. They need somebody who really groks technology (Ballmer clearly doesn't) and understands the way people use technology (ditto). The company has a huge number of incredibly talented and smart people. With the right leadership, Microsoft could absolutely knock our socks off and out-Apple Apple.
And that would be awesome for everybody. I can think of nothing better than having Microsoft create truly compelling products across their product lines. But they can't do it the way they are structured and with the present leadership. I'm not saying it would be easy for Microsoft to find the right leader, but almost anybody would be a step in the right direction from where they are now, and the right leader can make all the difference. Look at Apple ten years ago if you doubt that.
Last night's keynote was, quite literally, too painful for me to watch. After a while I just had to turn it off. I don't like watching people embarrass themselves. I really don't, and the press release was already available before the presentation started (oops!), so the salient points could be had without the agony.
Please, Microsoft, please… find a new leader. You owe it to yourselves and your customers to stop this painful decline at Ballmer's ham-fisted hands. Go watch Dr. Ed Catmull of Pixar explain how success masks problems and then find somebody who's got the brains, balls, and sense of showmanship to get you back into a leadership position.

Things go wrong in live presentations, but they don't go as wrong as they did last night unless you really fucking try. It was a fail of epic proportions. From the constant technical problems, like tablets and mobile touch phones not detecting touches, to the use of Twilight to showcase the ability of the "slate" PCs to display eBooks (ZOMG, really? They can do that without a keyboard!?). You're presenting to the Consumer Electronic industry - a room full of geeks and press geeks, and you choose to showcase Twilight? Wow, talk about not knowing your audience.
Now, I know I bash Ballmer and Microsoft more than I probably should, but every year, Ballmer and Microsoft (with the exception of the Xbox division) look more and more buffoonish and less and less relevant. I've said it before, and I'll continue to say it until it happens: Microsoft needs a new leader. They need somebody who really groks technology (Ballmer clearly doesn't) and understands the way people use technology (ditto). The company has a huge number of incredibly talented and smart people. With the right leadership, Microsoft could absolutely knock our socks off and out-Apple Apple.
And that would be awesome for everybody. I can think of nothing better than having Microsoft create truly compelling products across their product lines. But they can't do it the way they are structured and with the present leadership. I'm not saying it would be easy for Microsoft to find the right leader, but almost anybody would be a step in the right direction from where they are now, and the right leader can make all the difference. Look at Apple ten years ago if you doubt that.
Last night's keynote was, quite literally, too painful for me to watch. After a while I just had to turn it off. I don't like watching people embarrass themselves. I really don't, and the press release was already available before the presentation started (oops!), so the salient points could be had without the agony.
Please, Microsoft, please… find a new leader. You owe it to yourselves and your customers to stop this painful decline at Ballmer's ham-fisted hands. Go watch Dr. Ed Catmull of Pixar explain how success masks problems and then find somebody who's got the brains, balls, and sense of showmanship to get you back into a leadership position.
Tuesday, January 5, 2010
Navigation-based Core Data Application Template Reposted
Based on some feedback to an earlier post, I was able to fix another bug in my version of Apple's Navigation-based Core Data Application Xcode template. It was an off-by-one error caused by using a >= when I should have used just a >.
New version of delegate methods follow:
New version of delegate methods follow:
- (void)controllerWillChangeContent:(NSFetchedResultsController *)controller {
[self.tableView beginUpdates];
}
- (void)controllerDidChangeContent:(NSFetchedResultsController *)controller {
[self.tableView endUpdates];
}
- (void)controller:(NSFetchedResultsController *)controller didChangeObject:(id)anObject atIndexPath:(NSIndexPath *)indexPath forChangeType:(NSFetchedResultsChangeType)type newIndexPath:(NSIndexPath *)newIndexPath {
switch(type) {
case NSFetchedResultsChangeInsert:
[self.tableView insertRowsAtIndexPaths:[NSArray arrayWithObject:newIndexPath] withRowAnimation:UITableViewRowAnimationFade];
break;
case NSFetchedResultsChangeDelete:
[self.tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade];
break;
case NSFetchedResultsChangeUpdate: {
NSString *sectionKeyPath = [controller sectionNameKeyPath];
if (sectionKeyPath == nil)
break;
NSManagedObject *changedObject = [controller objectAtIndexPath:indexPath];
NSArray *keyParts = [sectionKeyPath componentsSeparatedByString:@"."];
id currentKeyValue = [changedObject valueForKeyPath:sectionKeyPath];
for (int i = 0; i < [keyParts count] - 1; i++) {
NSString *onePart = [keyParts objectAtIndex:i];
changedObject = [changedObject valueForKey:onePart];
}
sectionKeyPath = [keyParts lastObject];
NSDictionary *committedValues = [changedObject committedValuesForKeys:nil];
if ([[committedValues valueForKeyPath:sectionKeyPath] isEqual:currentKeyValue])
break;
NSUInteger tableSectionCount = [self.tableView numberOfSections];
NSUInteger frcSectionCount = [[controller sections] count];
if (tableSectionCount != frcSectionCount) {
// Need to insert a section
NSArray *sections = controller.sections;
NSInteger newSectionLocation = -1;
for (id oneSection in sections) {
NSString *sectionName = [oneSection name];
if ([currentKeyValue isEqual:sectionName]) {
newSectionLocation = [sections indexOfObject:oneSection];
break;
}
}
if (newSectionLocation == -1)
return; // uh oh
if (!((newSectionLocation == 0) && (tableSectionCount == 1) && ([self.tableView numberOfRowsInSection:0] == 0)))
[self.tableView insertSections:[NSIndexSet indexSetWithIndex:newSectionLocation] withRowAnimation:UITableViewRowAnimationFade];
NSUInteger indices[2] = {newSectionLocation, 0};
newIndexPath = [[[NSIndexPath alloc] initWithIndexes:indices length:2] autorelease];
}
}
case NSFetchedResultsChangeMove:
if (newIndexPath != nil) {
NSUInteger tableSectionCount = [self.tableView numberOfSections];
NSUInteger frcSectionCount = [[controller sections] count];
if (frcSectionCount > tableSectionCount)
[self.tableView insertSections:[NSIndexSet indexSetWithIndex:[newIndexPath section]] withRowAnimation:UITableViewRowAnimationNone];
else if (frcSectionCount < tableSectionCount && tableSectionCount > 1)
[self.tableView deleteSections:[NSIndexSet indexSetWithIndex:[indexPath section]] withRowAnimation:UITableViewRowAnimationNone];
[self.tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade];
[self.tableView insertRowsAtIndexPaths: [NSArray arrayWithObject:newIndexPath]
withRowAnimation: UITableViewRowAnimationRight];
}
else {
[self.tableView reloadSections:[NSIndexSet indexSetWithIndex:[indexPath section]] withRowAnimation:UITableViewRowAnimationFade];
}
break;
default:
break;
}
}
- (void)controller:(NSFetchedResultsController *)controller didChangeSection:(id <NSFetchedResultsSectionInfo>)sectionInfo atIndex:(NSUInteger)sectionIndex forChangeType:(NSFetchedResultsChangeType)type {
switch(type) {
case NSFetchedResultsChangeInsert:
if (!((sectionIndex == 0) && ([self.tableView numberOfSections] == 1)))
[self.tableView insertSections:[NSIndexSet indexSetWithIndex:sectionIndex] withRowAnimation:UITableViewRowAnimationFade];
break;
case NSFetchedResultsChangeDelete:
if (!((sectionIndex == 0) && ([self.tableView numberOfSections] == 1) ))
[self.tableView deleteSections:[NSIndexSet indexSetWithIndex:sectionIndex] withRowAnimation:UITableViewRowAnimationFade];
break;
case NSFetchedResultsChangeMove:
break;
case NSFetchedResultsChangeUpdate:
break;
default:
break;
}
}
Three Billion and Counting
Today, Apple announced that there have been over three billion downloads from the App Store. Can you say "juggernaut"?
Subscribe to:
Posts (Atom)