Peter,

> What's the riposte?  Comments lie, especially through entropy.  The 
> compiler takes no notice of any other intention you are encoding in the 
> name.

I disagree, the analogy is not correct. Comments lie, code shouldn't.
I'm not advocating that we write lots of inline comments, in fact quiet
the opposite. Comments should be sparse the focus should be on clear
intention revealing code.

The compiler takes no notice of variable names but I do. I spend a lot
of time working with other peoples code, reviewing and optimizing and
people spend a lot of time working with mine. Some of the teams I work
with have up to 50 engineers. If you don't have clear coding practices
then working with the code of an engineer who left the company twelve
months ago becomes a nightmare. I believe that it's more important in
open source projects as contributors and committers come and go over
time and are often distributed across national and language boundries. 

>  >>currentPageNumber = m_pageNumber + 1;

So this is significant I can see from this that the local variable
currentPageNumber is being assigned to the member variable pageNumber
plus one. 

If I instead had

currentPageNumber = pageNumber + 1;

I would have to know where currentPageNumber and pageNumber are defined.
Are they static variables from an imported class, are they member
variables, are they local? All of which is answered in the previous
sample. 

Tools like emacs and vslick edit make the task of finding the definition
easier, but you still have to find it you can't simply infer it. 

Now you might say "but a developer might forget to do it so it's
worthless over time", that's where code quality tools like checkstyle
come in. They report breaches so they are easily fixed.


> Have mercy.

I'm just trying to reduce the amount of time it takes for someone to
understand the code base. 

In fact I would like to see things like opening and closing brace
position in the coding standards (I have a preference for on a new line
but I really don't care as long as it's consistent.

I'd also be happy to create jalopy and eclipse code formats for the
project once they are established. 

-k.

-- 
If you don't test then your code is only a collection of bugs which 
apparently behave like a working program. 

Website: http://radio.weblogs.com/0111457/


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to