static const NSTimeInterval NYTArticleViewControllerNavigationFadeAnimationDuration = 0.3;
I feel like if your naming convention forces you to have variable names over 50 letters long, there is a problem.NYTimes Objective–C Style Guide
11–20 of 51 posts
Re: NYTimes Objective–C Style Guide
#12I hate absurdly long variable names like this: static const NSTimeInterval NYTArticleViewControllerNavigationFadeAnimationDuration = 0.3; I feel like if your naming convention forces you to have variable names over 50 letters long, there is a problem.
Re: NYTimes Objective–C Style Guide
#13I hate absurdly long variable names like this: static const NSTimeInterval NYTArticleViewControllerNavigationFadeAnimationDuration = 0.3; I feel like if your naming convention forces you to have variable names over 50 letters long, there is a problem.
Re: NYTimes Objective–C Style Guide
#14I hate absurdly long variable names like this: static const NSTimeInterval NYTArticleViewControllerNavigationFadeAnimationDuration = 0.3; I feel like if your naming convention forces you to have variable names over 50 letters long, there is a problem.
Objective-C's tendency to long names (variables, selectors, classes) makes it more "self-documenting" than any language I've worked with. Besides, it's not that bad with autocomplete.
Re: NYTimes Objective–C Style Guide
#15I hate absurdly long variable names like this: static const NSTimeInterval NYTArticleViewControllerNavigationFadeAnimationDuration = 0.3; I feel like if your naming convention forces you to have variable names over 50 letters long, there is a problem.
It's also a sign that your language lacks namespaces.
Re: NYTimes Objective–C Style Guide
#16Earlier quoted context omitted.
It's also a sign that your language lacks namespaces.
Right, if only it used C#! Then it could use nice short names like ListViewVirtualItemsSelectionRangeChangedEventHandler or DataGridViewColumnDividerDoubleClickEventArgs.
Re: NYTimes Objective–C Style Guide
#17> Asterisks indicating pointers belong with the variable, i.e. NSString text not NSString text or NSString * text, except in the case of global string constants. I know I have it wrong, but I always feel that the the variable is of type "pointer to type" so isnt it fairer to have the asterisk paired with the type denoting it is of the kind "pointer to type"?
For every weird little edge case where `MyObject* ` doesn't make sense, there are hundreds of examples where it makes complete sense.
I've been doing it that way since I started in the 90s, and I've always felt the people who do it the old way (attaching the asterisk to the variable name) are either holding on to an obsolete bit of antique C style, or they don't know what they're doing. It has no place in modern object-oriented code.
So what about `int* a, b, c;`? Never declare multiple variables on one line like this.
Re: NYTimes Objective–C Style Guide
#18Why do so many style guides mandate spaces for indentation?
Deterministic layout view. Tabs are non deterministic as it depends on user settings.
Re: NYTimes Objective–C Style Guide
#19Here's their blog post about it: http://open.blogs.nytimes.com/2013/08/01/objectively-stylish...
Re: NYTimes Objective–C Style Guide
#20Earlier quoted context omitted.
It's also a sign that your language lacks namespaces.
Right, if only it used C#! Then it could use nice short names like ListViewVirtualItemsSelectionRangeChangedEventHandler or DataGridViewColumnDividerDoubleClickEventArgs.