Jump to content
Sign in to follow this  
willichan

New York Times - C Style Guide???

Recommended Posts

willichan

https://github.com/NYTimes/objective-c-style-guide

[sarcasm]

Hurrah!  The programming experts at the New York Times have published their style guide for C.

Start cleaning up your code folks.

[/sarcasm]

This was aparently written for Objective-C, but they want it to be adopted for all C-style languages.

That's right.  All this time, you thought turning to technical publications and fellow coders was the way to go, when in fact you should have been turning to a newspaper.

[can't seem to  /sarcasm]

  • Like 1

Share this post


Link to post
Share on other sites
Richard Robertson

I will never understand people who indent with manual spaces. I stopped reading at that part. Which is only the second part. The first one made no sense as I'm not an Objective-C coder.

Share this post


Link to post
Share on other sites
FireFox

if (something) {
...
...
..
}

Damn, you forgot a 4th space.

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites
monoceres

What's so special about this? It's just some rules used by NYTimes to make sure their code base is following the same style.


This style guide outlines the coding conventions of the iOS team at The New York Times. 

 

It's far more important that everybody in a team follow the same conventions than that the code is 100 % correct from a philosophical standpoint (which of course isn't even objective(-c)). 


Broken link? PM me and I'll send you the file!

Share this post


Link to post
Share on other sites
Shaggi

It's far more important that everybody in a team follow the same conventions than that the code is 100 % correct from a philosophical standpoint (which of course isn't even objective(-c)). 

I'll second this. Consistency is always the best, else reading/working on an existing codebase is arguably enough reason to suicide.


Ever wanted to call functions in another process? ProcessCall UDFConsole stuff: Console UDFC Preprocessor for AutoIt OMG

Share this post


Link to post
Share on other sites
Ascend4nt

The Google style guides are interesting read, and the Facebook open-source code (folly) is nice to peruse although they don't have a style guide per se.  Still, Andrei Alexandrescu, who's a part of that team and author of Modern C++ Design, is an amazing talent from which alot can be learned about coding style.

Share this post


Link to post
Share on other sites
willichan

I don't think I have ever been anywhere even close to what they want to see.  But then again, I have always had an aversion to newsprint on my fingertips.  It messes with the pizza sauce flavor. 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×