Products > Programming

Comments

(1/41) > >>

PlainName:
Why does no-one write comments any more? Not even just something to say what the function is meant to do, never mind the intricacies of how it goes about that. Some cryptic 12-character name may mean something to the programmer but it's bugger-all use when coming afresh to get a birds-eye view of things.

And variables! Really, do babies die or something if you let on WTF a variable is about?

golden_labels:
Not sure, what you mean. In particular your “anymore” suggests there is some shift in the situation from some previous different state. Which I do not really see. If anything, in the past 20 years programmers started to at least write docs for documentation generators. It often sucks and misses the point of an API documentation, but it is still better than 20–30 years ago, when there was nothing. So… clarify?

bpiphany:
Reaction video for two opinions in one


Lengthier take on comments

woody:
Well, not no-one.

I recon that at least 80% of the characters I type in any given program is part of a comment. If not more. My latest project has 22 functions, 652 statements and 1918 comments. Sometimes my code reads like a book  ;D

Mind you, this is pure self-preservation, for if I look at anything I wrote that is not part of a project I am currently working on, I often don't have a clue what I meant. Might be either age or fluctuating brilliancy.

Paul

madires:
I'm writing plenty of comments, mainly for myself. It makes maintaining the code much easier. And as a side effect it also helps others to understand what is happening. When you contribute to a larger project without any comments you'll have to waste a lot of time to get into the code.

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod