[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: "dselect" replacement team



On Mon, 14 Apr 1997, Ian Jackson wrote:

> Jason Gunthorpe:
> > Now, in my definition clear code requires a very high comment density,
> > alot of descriptive text and so on, [...]
> 
> I don't want to get into a religious flamewar about the virtue or
> otherwise of comments.

I know it's a touchy issue, so I think this will be my last posting on
this subject. We who are working on Deity all generally like lots of
comments so Deity will be like that.

> The lack of comments in my code reflects my own personal experience,
> that other people's comments don't help my understanding of the code
> (I read the code itself), and my expectation that only good
> programmers ought to be modifying my code at all.

I have a similar situation, the excess of comments in my code reflects my
personal experiance that non expert programmers will out of nescessity be
manipulating and changing my code. Inorder to help them and me I want to
throw as much information as possible, so they don't make any major
screw ups that I have to fix later.

> If I were writing for a company full of monkey-see monkey-do
> programmers I might well take a different view, but we have to realise
> that free software gets much of its virtue from being written by a few
> good programmers rather than many mediocre ones.

This is true, but that is vaugely exclusivist. If I comment my code well,
someone who has never seen a particular technique can understant it
quicker and more deeply. This technique might be obvious to a good
programmer however. 

My opinion is that comments make the code 'freeer' in that more people can
understand how, what and why and then contribute small->large fixes to it.
After all, were do the expert programmers come from :>

> [1] Not that he's God or anything; it's just that I thought that since
> Jason seemed heavily into C++ he might have some respect for
> Stroustrup.

I try very hard to not to think of anyone as 'god'. Everyone has their on
and off days, sometimes they have good ideas sometimes they have bad. I
haven't yet met anyone that is always right about everything all the time
for all situations and people.

BTW, Linus has similar view on comments, see the kernel coding style
guidelines.

Jason


Reply to: