Prev: Disable SR when more than one pipe is enabled
Next: [PATCH 3/3] [RFC] nmi_watchdog: config option to enable new nmi_watchdog
From: Joel Schopp on 27 Jan 2010 13:20 > The time of 80 characters punch card and terminals are over, so i would > be a good thing to set the line length limit to 120. Every display today > should be able handle this. > Nack. While the origins of 80 character lines dates back to punchcards there is a reason it has survived the test of time. Lines that go longer are hard to comprehend. Either they are long themselves, in which case breaking them up into smaller chunks on multiple lines helps readability, or they are starting from deep indentation, in which case the function should be refactored or broken up so the logic is more digestable. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: David Daney on 27 Jan 2010 14:10 Joel Schopp wrote: > >> The time of 80 characters punch card and terminals are over, so i would >> be a good thing to set the line length limit to 120. Every display today >> should be able handle this. > Nack. > > While the origins of 80 character lines dates back to punchcards there > is a reason it has survived the test of time. Has it though? If that were the undisputed truth, we wouldn't be having this discussion. Also it is likely that there would be very few devices capable of displaying more than 80 columns. > Lines that go longer are hard to comprehend. Not universally. > Either they are long themselves, in which case > breaking them up into smaller chunks on multiple lines helps > readability, .... Or sometimes it results in gibberish. > or they are starting from deep indentation, in which case > the function should be refactored or broken up so the logic is more > digestable. -- The problem with the checkpatch.pl tool is that its use results in people trying to eliminate warnings. In the case of the 80 column warning, this can result in going against the goal stated in CodingStyle Chapter 2: "Coding style is all about readability and maintainability..." Perhaps checkpatch.pl needs a third level of diagnostic. Perhaps: NOTICE: line over 80 characters Indicating that the line in question should be given extra attention, but weaker than a WARNING. In any event, it is always fun to discuss these questions of style. David Daney -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Joel Schopp on 27 Jan 2010 15:40 >> >> >> While the origins of 80 character lines dates back to punchcards >> there is a reason it has survived the test of time. > > Has it though? If that were the undisputed truth, we wouldn't be > having this discussion. If you know of a usability study that quantifies the effect of line length on readibility of C code I'm willing to listen, and I'm sure others are too. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: David Daney on 27 Jan 2010 15:50 Joel Schopp wrote: > >>> >>> >>> While the origins of 80 character lines dates back to punchcards >>> there is a reason it has survived the test of time. >> >> Has it though? If that were the undisputed truth, we wouldn't be >> having this discussion. > > If you know of a usability study that quantifies the effect of line > length on readibility of C code I'm willing to listen, and I'm sure > others are too. Good point. As with most things related to kernel development, a usability study or other market research from a reputable institution is a vital first step before taking any action. We don't have any good peer reviewed research on the subject that I am aware of. I guess even contemplating a change at this early point would be rash and dangerous. I withdraw my previous comments with respect to the 80 Column Question. Instead I would recommend elevating the WARNING to ERROR status. David Daney -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Stefani Seibold on 27 Jan 2010 16:40
Am Mittwoch, den 27.01.2010, 14:31 -0600 schrieb Joel Schopp: > >> > >> > >> While the origins of 80 character lines dates back to punchcards > >> there is a reason it has survived the test of time. > > > > Has it though? If that were the undisputed truth, we wouldn't be > > having this discussion. > > If you know of a usability study that quantifies the effect of line > length on readibility of C code I'm willing to listen, and I'm sure > others are too. Show me the usability study with claims that 80 columns is the wisdom in software engineering. Why not 73, 90 or 95? The only reason for the 80 columns is a historic one. And the programming rules for linux doesn't manifest the 80 character per line. Code will get in many cases harder to read, especially together with the tab size of 8. Multiline C statements makes the code IMHO harder to read. Stefani -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |