They write, “The iOS team has been working on our style guide for over a year and we finally decided that it’s time to share it with the Objective-C community.”
The Times style guide repository offers extremely minimal starting points. It’s more a jumping off of style discussion rather than a final product, despite that year of development.
Unfortunately, while the guide lays out rules it offers very little discussion of motivation, and more than a few guidelines seem more grounded in personal habit than expressive maximization or general principle.
That’s not necessarily a bad thing — having a fixed design document helps guide code inspection. It’s just that the New York Times version seems less expansive and less road tested than many of the competing guides out there in the codeosphere. It seems lacking in substance and thought.
Compare with Marcus Zarra’s style guide at Cocoa is my Girlfriend. While some of Zarra’s guides are not exactly what I would use (2-space indentation, for example), it shows a much stronger set of standards than the New York Times attempt.
As developer Florent Pillet, software lead at Command Fusion, puts it, “Readability is very personal.” Alloysoft founder Matt Stevens adds, “I do find that consistency aids readability, don’t care much what the style is beyond that.”
I asked Gwynne Raskind, coauthor of the upcoming 2nd edition of Mac OS X Internals for her take on the NYT guide. She responded, “While addressing common bad practices, this guide puts a little too much emphasis on style choices which make no practical difference. Giving developers the freedom to use their own style often results in better code.”
Landon Fuller of Plausible Labs adds, “By my reckoning, it’s more important for organizations and projects to have a consistent style than it is to have a specific style. Generally following platform conventions can simplify interoperability, beyond which I have no particular opinion on anyone’s style guide; the NY Times guide seems perfectly inoffensive and servicable, as do most others. As long as someone’s style isn’t demented, I don’t mind doing things their way.
“I think it’s actually most interesting that the NY Times’ investment in mobile development has grown so much over the years that they now have a capable Objective-C team that cares enough to produce and release a style guide. That seems to mirror a general industry trend of technical organizations moving beyond a web-only purview.”
Here at TUAW, we give the NYT props for moving in a good development direction and look forward to seeing its project mature over the future. For now, however, we believe you may want to adapt one of the more time-tested style guides out there on the net.
Hat tip Scott Stevenson