Re: Structure vs purism ?

Alain Williams (addw@phcomp.co.uk)
Wed, 27 Jan 1999 09:09:18 +0000


On Fri, Jan 22, 1999 at 04:40:41PM +0000, Steve Dodd wrote:
> One of the people I used to (and occasionally still do) work with used to
> comment every single line of his C code with a translation of the C code to
> English. My argument is always that you should comment (pref. with block
> comments) why your code is doing something, not what it is doing. (i.e. if
> you can't read C, you shouldn't be looking at or modifying C programs). I've
> not won that particular battle yet, and fear I never will.

I could not agree with you more.
Code is all about clarity, that means how rapidly can a reader
understand what the code is doing. Excessive comments mean that the
reader has to do more work. Good/consistent layout/style helps the human
'parser'. White space to separate 'actions/tasks', but too much white
space wastes screen space reducing what can be seen at a glance.

> There was a young man of St. John's
> Who wanted to bugger the swans.
> But the loyal hall porter
> Said, "Pray take my daughter!
> Those birds are reserved for the dons."
SJC ?

-- 
Alain Williams

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/