> Date: Fri, 14 Mar 2008 13:50:02 -0700
> From: [EMAIL PROTECTED]
> To: [email protected]
> Subject: 8 space tabs, 80 column lines & small functions ever *bad* ?
> 
> You'd think KISS principle would make people embrace the Linux coding 
> style....
> 
> (80 column lines & 8 space indents)
> 
> Instead they cringe!
> 
> Now *I* cringe when I hear about 2-3 space idents and 130 column lines.
> 
> Anyone ever seen a case where lotsa little functions *wasn't* ideal and *very*
> nice?  8 space tabs/80 columns forces you to chop your problem into little 
> bite
> sized functions!!! I love it!
> 
80 column lines-  sure, just don't get religious about it.  If I turn in 
something that has two or three lines in the 81-85 range, don't reject it due 
to a magic number.  If you do, you need serious help on your anal-ness.

8 space tabs?  No thanks.  Takes up way too much space-  it ends up forcing you 
to either break lines up to an annoying degree, or use shorter, possibly less 
readable variable names.  2-3 works just fine and is no less readable.  
Although I wouldn't reject a code review on it so long as it was a consistent 
indent.  Just don't expect me to write the same way.

Bite sized functions-  there's a tradeoff there.  Using lots of small functions 
reduces the nesting, which is good for readability.  It also makes it harder to 
figure out what the code is actually doing, which is bad for maintainability.  
If you have a lot of 1-2 line functions that are only called from one spot, 
you're probably into the territory where smaller functions are making your code 
worse.  If you have them due to the above 80 columns/8 space tab rule in order 
to get things to fit, there's no maybe-  your code is now worse.



Gabe
_________________________________________________________________
Need to know the score, the latest news, or you need your HotmailĀ®-get your 
"fix".
http://www.msnmobilefix.com/Default.aspx--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg

Reply via email to