Feeds

Can't agree on a coding style? Maybe the NEW YORK TIMES can help

Having controlled our commas for decades, Grey Lady now positioning our braces

Intelligent flash storage arrays

For decades, dour broadsheet the New York Times and its style guide have presided over the world of posh writing: its English usage manual serves as both a bible for upmarket writers and a blunt instrument with which to beat sensationalist tabloid hacks such as your humble correspondent.

Now the Grey Lady has turned her hand away from setting the standard on commas and em dashes to an entirely different kind of punctuation: defining proper Objective-C programming style. Semicolons, braces, whitespace and so on are all familiar territory to the NYT's editors, but here we have a set of rules for developers.

The style guide, which is relevant to any coder of C-like languages, has the following sorts of wisdom:

if (!error) return success;

The above is outlawed. If() must be followed by an indented block wrapped in matching {} braces, the leading brace on the same line as the if(). And the indent must be four spaces. You may as well kick off a git versus svn argument.

The documentation adds: "Long, descriptive method and variable names are good." Just like its headlines, then.

The guide was published this month, and updated only hours ago; the newspaper's iOS app team have invited contributions - via GitHub, of course. The paper's senior mobile software engineer Matthew Bischoff explained:

The New York Times has a long history of publishing style guides. We first released The New York Times Manual of Style and Usage in 1950 so that reporters inside and outside The Times could have a definitive resource for our somewhat quirky rules.

But what about style for our favorite programming languages? At The Times, software developers are as obsessed with brackets and braces as journalists are with word choice and punctuation.

At The Times, we care deeply about all the words we write — help us make the ones read by compilers as good as the ones in the newspaper.

Your humble hack never knew GCC or LLVM cared that much. ®

No doubt you have an opinion on the Grey Lady's style of programming (I mean, honestly, braces on the SAME line as the if()?), so flame away in our comments section, no holds barred; just hit the button below.

Top 5 reasons to deploy VMware with Tegile

More from The Register

next story
Preview redux: Microsoft ships new Windows 10 build with 7,000 changes
Latest bleeding-edge bits borrow Action Center from Windows Phone
Google opens Inbox – email for people too thick to handle email
Print this article out and give it to someone tech-y if you get stuck
Microsoft promises Windows 10 will mean two-factor auth for all
Sneak peek at security features Redmond's baking into new OS
UNIX greybeards threaten Debian fork over systemd plan
'Veteran Unix Admins' fear desktop emphasis is betraying open source
Entity Framework goes 'code first' as Microsoft pulls visual design tool
Visual Studio database diagramming's out the window
Google+ goes TITSUP. But WHO knew? How long? Anyone ... Hello ...
Wobbly Gmail, Contacts, Calendar on the other hand ...
DEATH by PowerPoint: Microsoft warns of 0-day attack hidden in slides
Might put out patch in update, might chuck it out sooner
prev story

Whitepapers

Choosing cloud Backup services
Demystify how you can address your data protection needs in your small- to medium-sized business and select the best online backup service to meet your needs.
Forging a new future with identity relationship management
Learn about ForgeRock's next generation IRM platform and how it is designed to empower CEOS's and enterprises to engage with consumers.
Security for virtualized datacentres
Legacy security solutions are inefficient due to the architectural differences between physical and virtual environments.
Reg Reader Research: SaaS based Email and Office Productivity Tools
Read this Reg reader report which provides advice and guidance for SMBs towards the use of SaaS based email and Office productivity tools.
Storage capacity and performance optimization at Mizuno USA
Mizuno USA turn to Tegile storage technology to solve both their SAN and backup issues.