Is there anyone out there that codes like me?
Posted
by Jacob Relkin
on Stack Overflow
See other posts from Stack Overflow
or by Jacob Relkin
Published on 2010-05-10T04:57:03Z
Indexed on
2010/05/10
5:08 UTC
Read the original article
Hit count: 237
language-agnostic
|coding-style
Hi,
Some people have told me that my coding style is a lot different than theirs. I think I am somewhat neurotic when it comes to spacing and indenting though.
Here's a snippet to show you what I mean:
- ( void ) applicationDidFinishLaunching: ( UIApplication *) application {
SomeObject *object = [ [ SomeObject alloc ] init ];
int x = 100 / 5;
object.someInstanceVariable = ( ( 4 * x ) + rand() );
[ object someMethod ];
}
Notice how I space out all of my brackets/parentheses, start curly braces on the same line, "my code has room to breathe", so to speak.
So my questions are a) is this normal and b) What's your coding style?
© Stack Overflow or respective owner