May 2012 – Paul

Thanks to Paul Kim for a great talk on Cocoa's text system. Paul showed how to implement two features you might want if you were writing a programmer's code editor: line numbering and syntax highlighting.

Here are Paul's Keynote slides and example code. I've also embedded the slides below.

Paul posted a blog post about line numbering a while back. You can find more of his code on GitHub.

[UPDATE: At Paul's request I've made a correction. I deleted the third bullet from the second-to-last slide ("Things to Improve").]

April 2012 – Isaac

For our April meeting, Isaac Schmidt gave a nice introduction to, which is a web service plus an iOS framework that lets you quickly and easily set up web-backed object storage for your app. They also have Android support and a REST interface but no desktop Cocoa API. I wonder if it'd be worth writing a lightweight wrapper around the REST interface using RestKit.

Parse is really simple and it's free up to 1GB of disk storage and 1,000,000 server requests. If nothing else, I can imagine using it for quick prototyping or lightweight custom applications. As someone who has yet to dive into iOS development, I like that this will make it easy to get something working that's a real web-backed app.

Isaac demoed an example app called Instazam. (If that sounds like the name of a company that recently sold for a billion dollars, that's no coincidence.) Here's a zip file containing Isaac's Keynote slides and the Instazam code. You can also see his slides embedded below.

March 2012 – Samuel and Bob

We had two speakers at the March meeting.

Samuel talked about refactoring. You can click this link for a PDF of his slides, or you can view them embedded below:

**[JavaScript is required for the embedded viewer.]**

Related links:

  • Objc_dep, a tool that generates a diagram of class dependencies.
  • AppCode, which Samuel mentioned his company uses to help with refactoring.
  • SOLID, a set of basic principles for object-oriented programming.

Bob talked about quirky edge cases in ARC, the kind of subtle stuff that could drive you crazy, especially if you've written a book about Objective-C. You can click this link for a PDF of Bob's slides, or you can view them embedded below:

**[JavaScript is required for the embedded viewer.]**

[UPDATE: Uploaded Bob's slides to SpeakerDeck so you can view them embedded like Samuel's. I'd never heard of SpeakerDeck until Samuel posted his link to the mailing list. Pretty cool.]

December 2011 — belated recap

[I posted this recap to the list on December 6, and just realized I never put it here on the blog. I'm back-dating it by a couple of hours so Ed's update about the January meeting stays on top.]

Tom Frauenhofer gave an intro on developing for iCloud — what iCloud is and isn't, and how to enable your app to store and retrieve documents in iCloud.

Gabe Ghearing talked about how to use automatic reference counting with older iOS devices and with older libraries. He talked about MongoDB / Core Data integration and posed a question for the group about how to efficiently pull down object graphs when using a NoSQL database. Good discussion.

Demitri did a show-and-tell of a problem he'd been having with an astronomy app he's just starting. He's loading a bunch of FITS data into an array of floats, and wants to create a CGImage based on that array so that users can visualize the data. There was good discussion but we did not manage to solve the problem. Demitri gave me his code and I was able to get it working this morning — I'll explain in a separate email.

Odds and ends:

  • It was suggested that the CocoaHeadsNYC home page have a list of direct links to the meeting videos. Good idea — I'll do that when I get a chance.

  • A couple of people expressed interest in getting an NYC NSCoder night going. This has been a recurring request. A couple of us have tried to get NSCoder night off the ground in the past. It sounds like now the idea will have more traction. I'll follow up on this soon.

  • Here's the "F*ck You, Pay Me" video I mentioned at dinner: I also recommend the podcast Mike Monteiro co-hosts with Katie Gillum — it's one of my favorite podcasts on 5by5:

November 2011

Here's a belated recap of the November meeting.

Ed showed some photos from MacTech Conference, which was a lot of fun, by the way. I encourage all you developers to attend next year.

I gave a short intro to ARC, partly to invite the audience to fill in gaps in my understanding. For any of you who would like to give a presentation about something but hesitate because you don't feel like a world-class expert — I invite you to present what you do know and we can use group discussion to enhance everybody's understanding including your own. CocoaHeadsNYC is about as friendly and low-pressure a venue as you'll find to present at. And I think you will find that just preparing to give the talk will help clarify your thoughts.

Patsy's, our usual pizza/pasta place, was again very accommodating. I called ahead to say we had, as I recall, about 16 people. When we showed up with more like 20 people, they cleared an entire separate area for us to move to so the group wouldn't have to split between two tables. All that and they have good food.

Usually I try to jot down things that are mentioned at CocoaHeads, often in passing, that I think would be worth posting links to. For some reason I only have one thing in my notes this month: someone asked if anybody's tried AppCode, by JetBrains.

AppCode is a new Objective-C IDE for developers building apps for Apple devices such as Macs, iPhones & iPads.

I keep meaning to check it out myself.

December's meeting is coming up fast. It's going to be this coming Monday, December 5, instead of the traditional second Thursday, due to scheduling requirements at Google. We will have two speakers this month; stay tuned for details.

October 2011 – Jon Nathan

Jon Nathan was our presenter. He explained the nuts and bolts of how to have your app support plug-ins, and he pointed out some interesting reasons you might want to take this approach. For example, you (or a third party) can use plug-ins to extend your app's scripting dictionary, or support additional languages.

To me the most interesting reason for the plug-in approach was simply to force you to think about your code in a certain way. Jon has found that you can often — perhaps more often than you think — factor your application design into a central core plus a bunch of plug-ins that inherit from a common base class. Since the plug-ins live in their own Xcode projects, at any given time you're working on a smaller code base than if you had all your code in one monolithic project. And this can allow you to send your users a quick bug fix by having them install an updated plug-in, without making them wait until you ship a full official release of your app.

Jon preferred that we not video his presentation, but there's a link in the "show notes" where you can get his code. (Ever since I started listening to podcasts semi-regularly I think in terms of putting URLs in "show notes".) There are also links to other things that came up during the meeting or over dinner.


  • The source code Jon used for his talk.
  • Return to Dark Castle, for really old-school Mac gamers.
  • "Ed Catmull, Pixar: Keep Your Crises Small" — a talk about the organizational challenges at Pixar.
  • The 5by5 family of podcasts. There a were a couple of specific ones that came up over dinner, but I forget which ones.
  • The NSBrief podcast. This was mentioned during the meeting, but I forget the context.
  • Chrome Canary. The neat thing Ed pointed out was that you can now define multiple users (in Preferences) and have different windows belong to different users (via the Users menu). This is handy for logging into a web site using different identities.
  • "Mastering Xcode 4", which Ed recommended (Amazon link).
  • MacAdminMonthly, a new group that Ed's starting. "MacAdminMonthly is a monthly meetup that focuses on helping Sys Admins administer large deployments of Macs and iOS devices." First meeting Dec 6.

Other stuff from the September 2011 meeting

Here's some of the stuff we talked about at the last meeting in addition to the main presentation.

Xcode 4 – call for speaker

Demitri had questions about Xcode 4. Seems like there's a lot of that these days. Ed suggested that it would be great if we could get a presentation from someone who knows Xcode 4 very well and can talk us through it and get it to make sense to us.

==> If you can (and would like to) demo and evangelize Xcode 4 with clarity and persuasiveness that would make Guy Kawasaki proud, please let me know.

E-waste recycling at Tekserve next Saturday

LESEC's next e-waste recycling event will be at Tekserve next Saturday, the 17th. See here for more info.

iOS for students with special needs

I mentioned a seminar I'd attended at Tekserve called "iOS Devices for Students with Special Needs". The speaker was Vicky Windman, who has a site called IpadAppsClarkstown.

Tekserve does quite a bit of work with people with special needs. Check out their Adaptive Technology page if you're looking for solutions or if you'd like to work with Tekserve in this area.

NSManagedObject puzzler

I posed a brainteaser based on a debugging question Andy Finnell posted on Twitter:!/macgeek02/status/111654936940511232

macgeek02: I need a sanity check. I should be able to do this:

NSManagedObject *object = …; NSLog(@“object = %@“, object);

without an exception?!/macgeek02/status/111656936260378624

macgeek02: My google-fu is failing me. It’s throwing a -[__NSCFNumber objectID]: unrecognized selector… I only got one thread (that I created).!/macgeek02/status/111660524340641792

macgeek02: Thanks for all the suggestions. Twitter isn’t best way to debug. (FYI: not a fault, not a zombie. Throwing in NSManagedObject description)

Ben was the first to get on the right track. Here's where Andy posted the answer once he figured it out, and some of the replies he got:

September 2011 – Greg Casamento

Thanks to Greg Casamento, lead developer on the GNUstep project, for driving up from Laurel, MD to talk with us. That is quite an arduous day trip, and indicates how committed he is to spreading the word. Greg told us about the history and status of the project and answered our many questions about under-the-hood stuff. He showed us ProjectCenter and GORM, which are GNUstep's counterparts for Xcode and Interface Builder. They looked like the old NeXTstep dev tools, which struck a nostalgic chord with me.

One neat thing was when Greg took the source code for Bean (an open-source Cocoa text editor) and compiled and ran it on Linux, Windows XP, and Windows 7. He did all this within a virtual machine on his 2007 white MacBook, which we were viewing via Screen Sharing on my MacBook Pro, over WiFi, because we didn't have the video adapter he needed. Gotta love the technology we take for granted these days.

Greg's drive to New York took rather longer than he expected, so his talk got off to a late start, but we found stuff to talk about while we were waiting — more about that in my next post. We had our pizza delivered instead of going to Patsy's so Greg could talk while we ate.

After the meeting I took Greg to the Good Stuff Diner where we yakked for a couple more hours. Just one thing I learned: you may remember how it used to look in IB when you Control-dragged to make an outlet connection. You'd get an L-shaped line connecting the start point to the destination point. The thing about this connection was that it wasn't confined to a window; it typically connected points between windows. It turns out that way of drawing a connection was patented, which is why it isn't used in GORM (or at least wasn't — I forget exactly). Who'd have thought?

I hope to see you all next month, when Jon Nathan will be talking about how to make your app plug-innable.

August 2011 followup

I finally posted Avi's slides on Chromium's Out-of-Memory Killer, which he sent me shortly after his talk. Deep stuff.

Thanks very much to Mike Swan for the surprise donation of a raffle item, Core Data for iOS by Tim Isted and Tom Harrington. Mike was a technical reviewer for the book and decided to share one of his complimentary copies. It looks pretty good — I might get a copy myself. Congratulations to the raffle winner, and sorry for not getting your name in my rush to stuff my face with pizza. [UPDATE: As you can see in the comments, the winner was Gabe Ghearing.]

Speaking of which, I highly recommend the "freak pizza" that Ed and I shared at Patsy's, so-called because (horror of horrors) we requested that they leave off the cheese. With their good sauce and crust, and the fresh veggie toppings, I didn't miss the cheese at all. In fact, that might have been the best pizza I've had there.

Someone mentioned an "Xcode WTF" Tumblr stream. It's here.

If I'm forgetting something that came up, feel free to chime in here.

I hope to see you all next month, when our guest will be Greg Casamento, lead developer on the GNUstep project. Details to follow.

P.S. Ed has permanently booked the big room ("Bakerfield") that we used for the last two meetings. See the Meeting page for directions.