russellr
Elite Level 1
[M:5000]
rCs?
Posts: 525
|
Post by russellr on Nov 20, 2010 21:18:54 GMT
Do you like to comment or label everything your work as your going? Or do you rarely label at all?
I've just noticed that I seem to comment also every other line which is a bit to much don't you think? Then again I am very forgetful and if I don't I'll never get anything done!
|
|
Cam
Administrator
[M:5000]
Posts: 6,381
|
Post by Cam on Nov 20, 2010 21:29:53 GMT
I sometimes comments things if it's hard to understand like my current project.
|
|
|
Post by Nightwalker on Nov 20, 2010 21:42:49 GMT
I hardly comment unless the code is a bunch of different codes put together.
|
|
|
Post by moneyman18 on Nov 20, 2010 21:48:19 GMT
The only time I would ever comment is if someone else will be using or editing the code or if someone asked me to comment it otherwise I think they are for the most part a waste of time.
|
|
edenwax
VIP
v5 Beta Tester[M:5000]
Posts: 1,266
|
Post by edenwax on Nov 20, 2010 22:00:34 GMT
I usually comment things to keep things nice and organized. In my css, I usually sort it out by id's, classes, headers, main content, and footers.
|
|
Nick
VIP
v5 Beta Tester[M:5000]
Philadelphia Eagles: 8-8
Posts: 2,239
|
Post by Nick on Nov 20, 2010 23:54:32 GMT
Eh. I am usually so excited about the code, I only comment the things that I know I'll forget I usually come back like a day after and comment everything.
|
|
Cam
Administrator
[M:5000]
Posts: 6,381
|
Post by Cam on Nov 21, 2010 1:55:00 GMT
Eh. I am usually so excited about the code, I only comment the things that I know I'll forget I usually come back like a day after and comment everything. That's a interesting way
|
|
John Wankel
Elite Poster
Coding for you one step at a time[M:0]
Posts: 399
|
Post by John Wankel on Nov 21, 2010 3:54:31 GMT
I only comment if someone is going to be using it.
|
|
Nick
VIP
v5 Beta Tester[M:5000]
Philadelphia Eagles: 8-8
Posts: 2,239
|
Post by Nick on Nov 21, 2010 17:05:51 GMT
I only comment if someone is going to be using it. Yeah. It is so easy to take your own style of coding for granted.
|
|
Cam
Administrator
[M:5000]
Posts: 6,381
|
Post by Cam on Nov 21, 2010 18:52:04 GMT
I only comment if someone is going to be using it. Yeah I do that with my proboards codes like the one I'm making now.
|
|
prads
Elite Poster
[M:0]
It's a shame that PI isn't an integer :(
Posts: 361
|
Post by prads on Nov 22, 2010 9:17:16 GMT
Commenting your code is a good habit but over-commenting is not so good. But I have a stupid habit to over-comment my code. LOL I also make separate documentation so that other programmers can understand my mess, haha
|
|
russellr
Elite Level 1
[M:5000]
rCs?
Posts: 525
|
Post by russellr on Nov 22, 2010 12:11:11 GMT
Is it possible to over-comment?
|
|
Nick
VIP
v5 Beta Tester[M:5000]
Philadelphia Eagles: 8-8
Posts: 2,239
|
Post by Nick on Nov 22, 2010 14:19:31 GMT
Is it possible to over-comment? Trust me, there is I like outsourcing my comments into documentation because it is so much neater.
|
|
prads
Elite Poster
[M:0]
It's a shame that PI isn't an integer :(
Posts: 361
|
Post by prads on Nov 22, 2010 15:05:50 GMT
Is it possible to over-comment? counter++; //Incrementing the counter I tend to do that a lot. ;D
|
|
Cam
Administrator
[M:5000]
Posts: 6,381
|
Post by Cam on Nov 22, 2010 17:51:46 GMT
I over comment sometime xD
|
|
Bobby
Junior Poster
Welly welly welly well
Posts: 14
|
Post by Bobby on Dec 1, 2010 14:09:17 GMT
I probably err on the side of over commenting. I'm not verbose to the point where I comment the blatantly obvious. But I do like to have plain text descriptions of what is going on (or should be going on) throughout my code. It helps in debugging as I essentially write out my logic flow in comments, so it's right there. It also make re-acclimating to the source, should I abandon it for a few weeks, much easier.
I say I err on the side of over commenting because besides the inline comments throughout my methods, I always lead a method off with a comment block. In that comment block I specifically outline what the method does and how it does it. I also document parameters, return values, any exception throwing, whether or not the method is static and also the visibility of the method. These comment blocks are more for the likes of Doxygen, RDoc, phpDoc, etc. though.
|
|