![]() |
|
| View Poll Results: Do you comment your code? | |||
| All the time |
|
17 | 29.31% |
| Sometimes |
|
35 | 60.34% |
| Never |
|
5 | 8.62% |
| Commenting? |
|
1 | 1.72% |
| Voters: 58. You may not vote on this poll | |||
![]() |
|
|
Thread Tools | Display Modes |
|
|
#31 |
|
Programmer
Join Date: May 2006
Location: The US duhhhhh!
Posts: 42
Rep Power: 0
![]() |
I am still learning to code, so I use comments to go back and see how I used my code. That is the important thing to do for me. Although a simple design with explicit code does allow for transparency, I would still like to comment, especially if I come up with a large program.
|
|
|
|
|
|
#32 |
|
Hobbyist Programmer
Join Date: May 2006
Location: West Jordan, Utah, United States
Posts: 176
Rep Power: 3
![]() |
Also, I think commenting helps you write better code which ironically mitigates the need for comments.
|
|
|
|
|
|
#33 | |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Quote:
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
|
#34 |
|
Hobby Coder
Join Date: May 2006
Posts: 57
Rep Power: 0
![]() |
Had a couple experiences with "This can't be my code - it doesn't LOOK like my code! It doesn't even look like it was written by a HUMAN, at all!!".
I strive for more clarity in my programs, and definitely more comments, and more informative comments. Every non-trivial line of code will have something for a comment. Adak |
|
|
|
|
|
#35 |
|
Hobbyist Programmer
|
I comment things like my Data structures fairly well and my functions, inside a function I don't document as much myself.
|
|
|
|
|
|
#36 | |
|
Programmer
Join Date: Feb 2005
Posts: 62
Rep Power: 4
![]() |
Quote:
perhaps it's a total noob thing to do, but i always start my programs by using comments to write out, in plain english, every step of everything i want my finished product to do. this is the extent of my commenting. then i go and create my code in between the comments. it not only helps when i need to go back and look at something i wrote six months ago, but while i'm in the process of coding it helps me maintain focus on what i need to accomplish. |
|
|
|
|
|
|
#37 |
|
Hobbyist Programmer
|
I dont' comment and I write a lot of confusing code. This way, I can open the same program a little later, and its like a whole new puzzle trying to figure it out, instead of boring "yea it does this" type code.
__________________
#programmingforums relay - http://thegupstudio.com/cgi-bin/pforelay.cgi freelance scripts - http://ryanguthrie.com/index.html |
|
|
|
|
|
#38 |
|
Hobbyist Programmer
Join Date: Jun 2005
Location: Helltown
Posts: 162
Rep Power: 4
![]() |
hmmmm...I start coding with comments
__________________
Spread your wings and fly! Chicken! |
|
|
|
|
|
#39 |
|
Newbie
Join Date: Jul 2004
Location: Somewhere in them thar hills
Posts: 23
Rep Power: 0
![]() |
I usually find that if I stick to three rules, it works pretty well. They are:
/*1) If it isn't clear enough to me at the time of the writing to explain in 3 line comments, I'd better look around some more because I'm being DUMB! 2) Make sure that all your variables, structures, classes and functions are explanatory in their own names and code. 3) Switch rule 1's and 2's priority and check it again, document anything that doesn't look right and let some one else read it to see if they understand it. If I get by those the first time, a miracle has occurred ;-)*/ |
|
|
|
|
|
#40 | |
|
Professional Programmer
Join Date: Jan 2006
Location: Ontario, Canada
Posts: 377
Rep Power: 0
![]() |
Quote:
__________________
I am Addicted to Linux! |
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|