From: "Chris Friesen" <cfriesen@nortel.com>
To: Michael Gerdau <mgerdau@tiscali.de>
Cc: Philippe Elie <phil.el@wanadoo.fr>,
Russell Leighton <russ@elegant-software.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: OT: Does Linux have any "Perfect Code"
Date: Thu, 15 Nov 2007 11:05:38 -0600 [thread overview]
Message-ID: <473C7C62.9030100@nortel.com> (raw)
In-Reply-To: <200711151416.54570.mgerdau@tiscali.de>
Michael Gerdau wrote:
> That having said:
> I really do like such obvious (as in: for those knowing the stuff anyway)
> comments when looking at code and probably concepts I'm not familiar with.
>
> IMO there is no need to belittle this type of comment. IMO any casual
> reader not familiar with the whole set of functions possibly involved
> will be thankful for this type of comment - I certainly am.
Obvious comments explaining _what_ the code is doing are annoying.
They're fluff. You can see what the code is doing.
The critical comments are the ones that explain _why_ and _how_. The
comments should give the higher level view as to the rationale for that
code.
Of course if you've got some highly-optimized bit of black magic there
had better be some good comments explaining what's going on...but there
should also be some comments explaining why we need the magic in the
first place.
Chris
prev parent reply other threads:[~2007-11-15 17:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-15 1:21 OT: Does Linux have any "Perfect Code" Russell Leighton
2007-11-15 1:33 ` David Miller
2007-11-15 6:29 ` Eric Dumazet
2007-11-15 7:11 ` David Miller
2007-11-15 7:43 ` Andi Kleen
2007-11-15 8:27 ` Philippe Elie
2007-11-15 13:16 ` Michael Gerdau
2007-11-15 15:10 ` Daniel Barkalow
2007-11-17 8:44 ` Geert Uytterhoeven
2007-11-15 17:05 ` Chris Friesen [this message]
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=473C7C62.9030100@nortel.com \
--to=cfriesen@nortel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgerdau@tiscali.de \
--cc=phil.el@wanadoo.fr \
--cc=russ@elegant-software.com \
/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