Re: Coding style - a non-issue

Paul G. Allen
2001-11-30T20:29:02Z

John Kodis wrote:
>
> On Fri, Nov 30, 2001 at 02:00:18PM -0500, Jeff Garzik wrote:
>
> > Human beings know and understand context, and can use it
> > effectively. 'idx' or 'i' or 'bh' may make perfect sense in
> > context. There is absolutely no need for
> > JournalBHThatIsStoredAndSyncedWithSuperblock.

JounalBH would be far better than i or idx.

>
> Mathematics has a rich tradition of using short variable names such as
> "pi" rather than something like "circle-circumference-to-diameter-ratio".
> They keep formulas from becoming unreadably long, and have a meaning
> which is well understood in context. While the long version may more
> self-explainatory, it's the short form which is universally preferred.
>

While 'pi', 'e', 'theta', 'phi', etc. are universally understood, things
like 'i', 'a', and 'idx' are not. I can use these for anything I want
and even for more than one thing, and they say nothing about what they
are for. 'i', 'j', etc. are fine as loop counters and array indexes
where their meaning is apparent by context, but are _not_ fine in other
situations. You (or the person that wrote the code) may think that the
name is perfectly fine, but someone else that thinks a bit different may
not.

PGA
--
Paul G. Allen
UNIX Admin II ('til Dec. 3)/FlUnKy At LaRgE (forever!)
Akamai Technologies, Inc.