On Fri, Mar 14, 2008 at 04:08:36PM -0500, Gabriel Sechan wrote: > 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.
I imagine if we were looking at code all day that the word wrap would get annoying and waste precious nanoseconds to fix. I think that is the motivation for <= 80 col. I can understand why Linus would want that. That is one reason why even 1 char over 80 may be a problem. > 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. I agree line breaks and small variable names are bad. But there is a solution to be found in more functions. Linux uses this and is widely considered to be beautiful well-written code. I'm writing a Scheme interpreter at seberino.org/pyscheme this way. It reminds me to spawn a new function rather than push the complexity envelope. > 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- I agree lots of 2 line functions would be lame. Breaking up your logic with bad function choices is also lame and ruins readability. You could see it as a programming challenge to try to break up your code into common sense function encapsulations. I've *always* been able to do that. That would *increase* readability. cs -- [email protected] http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg
