6 ms·
I hate absurdly long variable names like this: static const NSTimeInterval NYTArticleViewControllerNavigationFadeAnimationDuration = 0.3; I feel like if y
by calhoun137 13y ago
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.
- 5teev 13y agoObjective-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.
- Groxx 13y agoNow if only that autocomplete would passively infer the current project prefix + (super)class name, so you wouldn't have to type it when it's "local"...
- blub 13y agoWith 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.
- chrisdevereux 13y agoOr press tab to get a partial completion and use the arrow keys to pick the right one?
- taspeotis 13y agoI'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:
- w0utert 13y ago>> I'm not an Objective-C native, but every time I write Objective-C it feels like I'm writing a short story. That's the whole point of it ;-). Remember you usually only have to write the code once, but you or someone else may have to read it many times. I used to hate long variable and function names in the past, and I used to hate named parameters. Going on the assumption the time spent typing the code was somehow relevant, and also feeling a little more badass being able to write all this cryptic gibberish to 'control the computer'. In time, I've learned none of this matters and readability of your code is one of the most important quality metrics of any piece of software that needs to be maintained by multiple people and/or over a long timespan.
- Groxx 13y agoIt's also a sign that your language lacks namespaces.
- millstone 13y agoRight, if only it used C#! Then it could use nice short names like ListViewVirtualItemsSelectionRangeChangedEventHandler or DataGridViewColumnDividerDoubleClickEventArgs.
- Groxx 13y agohaha, you win this round :) though using a Microsoft (or Java) codebase might be considered cheating.
- MichaelGG 13y agoOh god. That's an artifact of the idiotic VB-style, non-generic event handling "pattern". If event handlers used normal functions like everything else this just wouldn't be a problem (those types just wouldn't exist).
- tater 13y agoIt'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.
- retr0h 13y ago++ for pep8 :)