Direction of KDevelop4

Cavalaria Christophe chris.cavalaria at free.fr
Wed Sep 14 00:55:08 UTC 2005


On Monday 12 September 2005 21:45, Andrew Sutton wrote:
> > As I've said, I only want useless comments thrown out.  I specifically
> > exempted from my wish list those that document subtle problems.
>
> normally, i wouldn't bother contributing my $.02 to the discussion
> because i'm not a kdevelop developer, but i thought i might weigh in
> on this topic because commenting style comes up alot in my lab (we
> all teach or have taught programming). the only useless comments are
> those that are inconsistent with what the code actually does.
> otherwise, comments, among other things, serve to document
> information that just can't be written down in the syntax of the
> language (e.g., rationale). for me they often serve as reminders for
> what i'm doing and why. so while i may have written functions that
> are over 60% comment, but you know what? anybody who looks at it can
> tell exactly what they do and why they do it that way.

On the other hand, the more comments there is, the easier it is to have them 
go out of synch with the code. And as you say, the only real bad comment is a 
lying comment.

> anyway, there are two points to make. first, standardizing commenting
> style (how much and where) is a complete waste of time. second,
> _removing_ comments is just asinine. if you didn't write the code
> originally, how do you know what comments are useful to its writer. i
> would actually be supremely pissed if somebody went ahead and deleted
> comments out of my code. it's just plain rude.
>
> that said, i try to teach my students to comment so i can look at a
> piece of code they write and understand the logic of what they're
> trying to do. it helps me figure out why they're might be trying to
> write a program one way as opposed to another, or if there are any
> obvious flaws in the logic. but that's how i roll.

Wouldn't it be a great test to ask them to write a program without a single 
comment and remind them that you will have to understand what they wrote very 
easily ? That way, you would theach them not to write obfuscated code, even 
if there is some comment to explain what it does.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20050914/8d5e2afa/attachment.sig>


More information about the KDevelop-devel mailing list