From: Ingo Oeser <ioe-lkml@rameria.de>
To: "John Stoffel" <john@stoffel.org>
Cc: Jeff Garzik <jeff@garzik.org>, Krzysztof Halasa <khc@pm.waw.pl>,
Alan Cox <alan@lxorguk.ukuu.org.uk>,
akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] intel-rng: Undo mess made by an 80 column extremist
Date: Fri, 8 Jun 2007 20:21:41 +0200 [thread overview]
Message-ID: <200706082021.42698.ioe-lkml@rameria.de> (raw)
In-Reply-To: <18024.47852.272454.21519@stoffel.org>
On Friday 08 June 2007, John Stoffel wrote:
> Jeff> On Thu, Jun 07, 2007 at 09:56:06PM -0400, John Stoffel wrote:
> >> Thinking about it more, I wonder if Krysztof is bitching more about
> >> the tab width of 8 characters? I know that it ticks me off,
>
> Jeff> Even if he is, _that_ is definitely not getting changed.
>
> Oh sure... I know that part is written in stone.
Yes, and as a person doing Linux code review for 12 years now,
I'm really thankful for it. 8 char tab, 80 column rule and 25-50 lines
of code per function actually enable effective review of code snippets.
Because you can see more code flow per patch.
And enables high code reuse. If you can get within 1-5min,
what a functions does and match it with your actually
written down last 20 code lines, you just reuse it more often.
If you have more to choose from, you reuse naturally.
Personally I find best candidates by code position in tree and
function signature.
> Jeff> If code starts creeping way right due to indentation levels,
> Jeff> create a new function.
>
> Sure... compilers are good, us humans haven't gotten much better, make
> it easier on us and harder on the computer.
Yes, let compile remove all the abstraction overhead.
GCC does a pretty good job there, I think.
I recently analyzed some code and it took much, much longer (factor 2-3),
because of laxer coding rules similiar to the ones you suggest.
I even asked the developers, who wrote that code and to ones who work
daily with that code base and they had the same problems. They all couldn't
explain the "Why?" only the "How?". Not to mention, that this was a core
component.
After refactoring some big messy parts into smaller functions,
identical, missing, unhandled cases became visible, inappropriate usages
were identified and even some loops could be removed.
Now try to find such problems within Linux. They should be a small percentage
and not within core components.
So a big THANKS to all the code cops here: You actually make the
damn fast change rate of Linux possible by keeping the base clean
and neat.
Best Regards
Ingo oeser
next prev parent reply other threads:[~2007-06-08 18:20 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-07 15:22 Alan Cox
2007-06-07 15:23 ` Jeff Garzik
2007-06-07 15:44 ` Alan Cox
2007-06-07 17:22 ` Jeff Garzik
2007-06-07 21:17 ` Krzysztof Halasa
2007-06-07 21:32 ` Alistair John Strachan
2007-06-07 22:06 ` Krzysztof Halasa
2007-06-08 1:08 ` H. Peter Anvin
2007-06-08 1:25 ` Jeff Garzik
2007-06-08 10:11 ` Peter Zijlstra
2007-06-09 20:33 ` Krzysztof Halasa
2007-06-07 22:32 ` Daniel Hazelton
2007-06-07 22:37 ` Krzysztof Halasa
2007-06-07 23:01 ` Daniel Hazelton
2007-06-07 22:46 ` Jesper Juhl
2007-06-07 23:04 ` Daniel Hazelton
2007-06-08 1:44 ` John Stoffel
2007-06-08 1:47 ` Jeff Garzik
2007-06-08 1:56 ` John Stoffel
2007-06-08 2:07 ` Jeff Garzik
2007-06-08 2:11 ` John Stoffel
2007-06-08 18:21 ` Ingo Oeser [this message]
2007-06-09 20:41 ` Krzysztof Halasa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200706082021.42698.ioe-lkml@rameria.de \
--to=ioe-lkml@rameria.de \
--cc=akpm@osdl.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=jeff@garzik.org \
--cc=john@stoffel.org \
--cc=khc@pm.waw.pl \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®