Live data from Hacker News

NYTimes Objective–C Style Guide

github.com

21–30 of 51 posts

Re: NYTimes Objective–C Style Guide

#21

I 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 a marketing ploy to get you to buy larger (wider) monitors in order to avoid line wrapping.

My only gripe about developing on a 13" MBP is not being able to have 2 buffers side by side without wrapping the snot out of half the lines.

Re: NYTimes Objective–C Style Guide

#22
post #8

Why do so many style guides mandate spaces for indentation?

Mainly it's that you don't want to mix both spaces and tabs — you want to use one or the other for a given file or else the indentation will be an incoherent mess from one machine to the next — and it's easier and more compatible to standardize on spaces than tabs.

Re: NYTimes Objective–C Style Guide

#24
post #12

I 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.

With Xcode it's just as bad as it looks. If you have multiple names with the same prefix you have to type it all or scroll in a list to select the correct item.

It even fails to complete types like NSString correctly when part of a method call. Not always of course, just when it gets confused, and then I have to delete and type again because the case is wrong.

Re: NYTimes Objective–C Style Guide

#25
post #12

I 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.

I'm not an Objective-C native, but every time I write Objective-C it feels like I'm writing a short story.

    applicationDidLoad:withANotification:iWonderWhatTheWeatherTodayIs:LetsAskSiri:

Re: NYTimes Objective–C Style Guide

#26
post #21

I 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 a marketing ploy to get you to buy larger (wider) monitors in order to avoid line wrapping. My only gripe about developing on a 13" MBP is not being able to have 2 buffers side by side without wrapping the snot out of half the lines.

++ for pep8 :)

Re: NYTimes Objective–C Style Guide

#28
post #24
post #12

Earlier quoted context omitted.

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.

With Xcode it's just as bad as it looks. If you have multiple names with the same prefix you have to type it all or scroll in a list to select the correct item. It even fails to complete types like NSString correctly when part of a method call. Not always of course, just when it gets confused, and then I have to delete and type again because the case is wrong.

Or press tab to get a partial completion and use the arrow keys to pick the right one?

Re: NYTimes Objective–C Style Guide

#29
I see a lot of obsession with the irrelevant: when you're allowed to use dot-notation, number of spaces for indentation (sic), etc... The only reasonable item, it the singleton one, the rest... what a waste of time!
Post reply on HN