[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: openntpd and ntpq
- To: misc_(_at_)_openbsd_(_dot_)_org
- Subject: Re: openntpd and ntpq
- From: Ben Goren <ben_(_at_)_trumpetpower_(_dot_)_com>
- Date: Tue, 31 Aug 2004 20:38:54 -0700
On 2004 Aug 31, at 8:02 PM, Damien Miller wrote:
> i = 1; /* set i to one */
Exactly. Now, if it read something like this:
i = 4 /* You'd expect us to start
* counting at 0, but we need
* to start at 4 instead because
* of some twisted reason....
Then it'd be an entirely different thing. Of course, that twisted
reason better have something from the real world backing it up. Like,
``We're counting planets in the Sol system, but the Vogons destroyed
Mercury, Venus, and Earth, and Mars to make way for a hyperspace
bypass. For historical reasons, Jupiter is still considered the fifth
In longer files, I like to put in big banner-style comments to help me
spot or search for major sections as I scroll though--``This is where
we weigh the planets to see if they mass enough to be used in the
construction of the bypass.'' If I had to make a questionable decision,
I'll put my reasons for the choice I made in the comment. ``I thought
about breaking this into a subroutine, but, since I only need the code
twice, I decided to be lazy and do a copy-paste. The Vogons'll never
notice.'' If it's some hairy recursion or some such, I'll comment every
line for that quarter-screen.
But, for the most part, I try to write code that speaks for itself.
Those who want as much comments as code are either illiterate or silly.
P.S. It's probably not a bad thing to have beginning coders
over-comment their code, but only if the teacher carefully reviews the
[demime 0.98d removed an attachment of type application/pgp-signature which had a name of PGP.sig]
Visit your host, monkey.org