But it doesn't really matter, these things can easily be handled by using gnu indent to put code the way you like it... and to also change it back to whatever style guide you must follow before checkin.
Your code style guide is crap, but still better than nothing.
11–20 of 49 posts
Re: Your code style guide is crap, but still better than nothing.
#12Earlier quoted context omitted.
I do not understand why there seem to be so much agreement on 80 characters line length. I often use 132 character. I have a rule that invite to avoid abbreviations in identifiers and I have often 4 spaces. If I limit to 80 character, all the line breaks decrease significantly readability.
Code is just like literature. Too many words on a line and it looses the reader. All of this indeed depends on the density of the language you're using. If your're using extremelyLongVariableNames it may be ok to use 132 characters per lines but if you use shorter var_names, 80 characters is plenty of room to express yourself^W^Wwrite code. Also, unix. Stop arguing about religion.
I still recommend wrapping at 80 chars though.
Re: Your code style guide is crap, but still better than nothing.
#13Re: Your code style guide is crap, but still better than nothing.
#14Re: Your code style guide is crap, but still better than nothing.
#15Re: Your code style guide is crap, but still better than nothing.
#16Between minifying your css and js, and gzip compression, I doubt that tabs save you a significant amount of bandwidth when you're on your phone.
And how often are you working on code where using tabs instead of spaces seriously impacts your storage and I/O?
Re: Your code style guide is crap, but still better than nothing.
#17But I wish it could just be acknowledged somewhere that, if you know what you're doing, tabs are better and have no downsides (except that you can't control how other people see your code).
Caveat: I really mean tabs + spaces for complicated formatting beyond the indent level of the current line.
Regarding 80 character width, I'm often coding on my laptop and I really appreciate it when code is kept within those bounds as it allows me to vertically tile 3 files without line-breaks. Also, I find that it forces me to write more succinctly. 'One idea per line' is a good idea and 80 characters is a good arbitrary limitation that helps me achieve that.
Re: Your code style guide is crap, but still better than nothing.
#18 Why, in the name of all that is holy, do our modern style
guides still force us to manually wrap text to fit within
80 columns? (That’s four and a half vertical splits of 80
columns each on my monitor!)
but chooses a blog template that holds the width constant at 1000px. Perhaps there is a reason not to grow without bound horizontally?I use 80 characters because it's just easier to read than 120 char lines. Plus, I rarely need to break lines anyway, even at 80 chars ... what the heck are you writing that needs to be 120 chars wide?
Also, I have 2 screens with 4 work areas (each half a screen):
* mvim (at 90 chars wide)
* two terminals
* browser
* developer tools
At 120 chars lines, mvim now needs to be 125/130 chars wide and require it's own dedicated monitor.
Re: Your code style guide is crap, but still better than nothing.
#19 automaticallyForwardAppearanceAndRotationMethodsToChildViewControllersRe: Your code style guide is crap, but still better than nothing.
#20The tabs vs. spaces debate makes me very sad. I get it, big companies use spaces because interns are stupid and don't understand how tabs work. And some people monomaniacally want their code to look exactly the same everywhere. But I wish it could just be acknowledged somewhere that, if you know what you're doing, tabs are better and have no downsides (except that you can't control how other people see your code). Ca…
// This doesn't look very nice
thing = { some_key_1: some_var_1,
[->][->][->]some_key_2: some_var_2,
[->][->][->]some_key_3: some_var_3 }
// Neither does this.
thing = { some_key_1: some_var_1,
[->][->]some_key_2: some_var_2,
[->][->]some_key_3: some_var_3 }
// Feels good, man.
thing = { some_key_1: some_var_1,
some_key_2: some_var_2,
some_key_3: some_var_3 }
// I want to beat you with an oar.
thing = { some_key_1: some_var_1,
[->][->] some_key_2: some_var_2,
[->][->] some_key_3: some_var_3 }