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

Secure remote control for conventional and virtual desktops

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
New 'Cosmos' browser surfs the net by TXT alone
No data plan? No WiFi? No worries ... except sluggish download speed
iOS 8 release: WebGL now runs everywhere. Hurrah for 3D graphics!
HTML 5's pretty neat ... when your browser supports it
Mathematica hits the Web
Wolfram embraces the cloud, promies private cloud cut of its number-cruncher
Mozilla shutters Labs, tells nobody it's been dead for five months
Staffer's blog reveals all as projects languish on GitHub
'People have forgotten just how late the first iPhone arrived ...'
Plus: 'Google's IDEALISM is an injudicious justification for inappropriate biz practices'
SUSE Linux owner Attachmate gobbled by Micro Focus for $2.3bn
Merger will lead to mainframe and COBOL powerhouse
iOS 8 Healthkit gets a bug SO Apple KILLS it. That's real healthcare!
Not fit for purpose on day of launch, says Cupertino
Netscape plugins about to stop working in Chrome for Mac
Google kills off 32-bit Chrome, only on Mac
prev story

Whitepapers

Secure remote control for conventional and virtual desktops
Balancing user privacy and privileged access, in accordance with compliance frameworks and legislation. Evaluating any potential remote control choice.
Intelligent flash storage arrays
Tegile Intelligent Storage Arrays with IntelliFlash helps IT boost storage utilization and effciency while delivering unmatched storage savings and performance.
WIN a very cool portable ZX Spectrum
Win a one-off portable Spectrum built by legendary hardware hacker Ben Heck
High Performance for All
While HPC is not new, it has traditionally been seen as a specialist area – is it now geared up to meet more mainstream requirements?
Beginner's guide to SSL certificates
De-mystify the technology involved and give you the information you need to make the best decision when considering your online security options.