The November meeting came on the heels of Hurricane Sandy. As a group, we decided to skip the usual presentation part of the meeting and go directly to Patsy's for pizza. We had a good turnout (10 people) and Patsy's treated us very well as usual.
Demitri did come prepared with a programming question for the group, about populating a table view with a huge number of rows when the acquisition of the data to display could take a noticeably long time. His question was a follow-up to this thread on the group mailing list.
Bob Clair's talk was about "Hiding your instances variables… or not":
I've discovered some odd things while investigating the issue. Let's say you declare an instance variable in a class extension or the @implementation section so it is (theoretically) @private. If I find out the name (hello class-dump) I can read or set that variable from anyplace that has a pointer to the instance without subclassing it, without writing a category accessor, without using KVC and without using the runtime functions.
Jason Brennan (visiting from Ottawa!) gave a demo of
a debugging tool that works over the network to do real-time inspection and manipulation of iOS apps (that is, without need to set break points). It does this with a REPL console with some handy tools for quickly making changes and testing them.
Jason's slides are on GitHub. You can also view them below:
On a side note, I (Andy) was unable to make this meeting, which is a bummer because by all accounts it was great. I notice Jason's slides use what I believe is called the Lawrence Lessig style of presentation. They are sparse, but they look so great I can't stop skimming them!
Thanks very much to Jason for making time on his trip to visit CocoaHeads.
[UPDATE: SuperDB is now open source on GitHub. Thanks very much, Jason!]
Demitri Muna gave an introduction to SceneKit — what it is, how to use it, and some tips and pitfalls. His demo apps demonstrated, among other things, how to create objects in the scene programmatically.
You can download Demitri's code here. The zip file contains a PDF of his Keynote presentation, which you can also view below:
Moshe Berman demonstrated a UIKit game engine he wrote called MBTileParser (source on GitHub). He talked about the motivation and design decisions behind his framework.
This month's featured speakers were David Jacobs and Natalie Podrazik of 29th Street Publishing. David and Natalie gave us an inside look at the tools and infrastructure they're building for developing Newsstand apps. They're doing this because they found that Apple's process for publishing on Newsstand is less straightforward than one might expect. Among the components they're using is the Starwatch framework they presented in February. You can ask for more info at firstname.lastname@example.org or on the CocoaHeadsNYC mailing list (which you can sign up for here if you're not on it already).
Natalie has also posted some open-source mini-projects (not related to the Newsstand stuff) on GitHub.
One thing David mentioned in passing was a collaboration and task management tool called Asana. I checked it out and I think it's pretty nicely done.
I had two show-and-tell items. One was the "method-aware" feature I recently added to AppKiDo. It's implemented by a single AKMethodNameExtractor class (.h file, .m file) that is just a simple hand-rolled parser. I mentioned that I use hand-rolled parsers in a couple of places, and I used to feel vaguely wrong about it until I read a blog post entitled "Why I don't use a Parser Generator".
My other show-and-tell was the Scene Kit example project from WWDC, which I'd modified slightly. Since the meeting I've learned that Apple actually has three publicly available Scene Kit examples.
Speaking of conferences, we're two months away from MacTech Conference, which Ed Marczak co-chairs. This year at least three of the speakers are CocoaHeadsNYC members: Natalie, Mark Mentovai, and me. I hope to see you there; it was really fun last year.
I hope to see you all next month, and I hope you'll bring your own show-and-tells.
For openers I showed a couple of "Stupid Dash Tricks" — nifty features of the Dash documentation browser. For example, you can limit its search to a particular docset by typing a prefix before your search string. I use the prefix "m:" to search the Cocoa docs, and "i:" for the iOS docs. Thereafter, Dash continues to use the same prefix until you say otherwise.
Another trick: you can specify a separate find string after the search string, which has two effects:
If your selected search result is a class, the list of methods for the class is filtered using the find string.
The find string goes into the system Find pasteboard, so you can use Command-G and/or Shift-Command-G to cycle through occurrences of the string in the selected document.
I then gave a talk about something else entirely, namely Auto Layout. That talk was a tiny bit of a train wreck, as I'd managed to mess up my demo app at the last minute before the meeting, but the audience was kind.
In fact, the audience at CocoaHeadsNYC is always kind, which is why I recommend volunteering to give a presentation if that's something you'd like to practice, or if you simply have an interesting thing you'd like to share. You don't have to be a world-class expert — it could even be something you're just learning about.
Because of WWDC, we held the June meeting a week later than we normally would have.
This month we had three presentations.
1. Demitri and Brad
[UPDATE: In one discussion tangent, I mentioned that Smalltalk (at least the Smalltalk I used ages ago) formats your code when you save, applying a consistent indenting style. I seem to recall THINK Pascal used to do the same, but I'm not positive. This in turn reminded me of an article in Joel Spolsky's book, "The Best Software Writing I", which proposes that coding style be enforced by the language syntax. This would save us all a lot of wasted effort disagreeing about whether braces should go on the same line, and so on. Below, I've added a link to the article, titled "Style is Substance".]
Demitri also passed around his Playbook tablet so we could get a feel for a tablet with a different size and OS than we're used to.
I talked about my favorite sessions at WWDC — the ones about the Accelerate framework and Scene Kit. As I recall, I also told about being mistaken for an Apple employee at a noodle house, and almost getting a 10% discount on the check.
WWDC videos; see "The Accelerate Framework" (Session 708) and "Introducing Scene Kit" (Session 504)
Ben Ragheb reprised a fun talk he'd given at the iOS meetup, about going to San Francisco without a WWDC ticket. Good tips. Given how quickly the WWDC videos came out, I'm tempted to do the same next year unless I have a specific need to meet with Apple engineers.
Unfortunately Ben's #badgeless tweets no longer show up in a Twitter search. If you hurry you can go here and grep for #badgeless and #wwdc. Note that, due to limitations in the Twitter API, AllMyTweets only shows the person's last 3200 tweets.
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.
For our April meeting, Isaac Schmidt gave a nice introduction to Parse.com, 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.
Samuel talked about refactoring. You can click this link for a PDF of his slides, or you can view them embedded below:
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:
[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.]