![]() |
|
| 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 |
|
|
#41 |
|
Professional Programmer
Join Date: Feb 2005
Location: PA, USA
Posts: 253
Rep Power: 4
![]() |
I only comment stuff that I might come back later and be like "now what the hell was I doing here?".
I don't see the point in commenting variable declarations in most cases and stuff like that that is common sense.
__________________
I have never let my schooling interfere with my education. -Mark Twain- Xbox live gamertag: melbolt |
|
|
|
|
|
#42 |
|
Hobbyist Programmer
|
I rarely comment the code itself, but I tend to explain what functions do and write huge lines that explain where in the code I am so I'll find it quickly later instead.
Python example: # # # # # # # # # # # # # # # # # # # # #
# ------ IMPORTS ------------------------
import foo
import bar
# # # # # # # # # # # # # # # # # # # # #
# ------ ENCRYPT ------------------------
# ---- Encrypts text, etc. --------------
def encrypt(blah):
# blah |
|
|
|
|
|
#43 |
|
Hobbyist Programmer
Join Date: Jan 2006
Location: Menidi, Athens, Greece
Posts: 243
Rep Power: 3
![]() |
The amount of comments I put is defined by who is going to see the source code. If that's only me, then I only put comments on every function. Just a single line to show what the function does.
If it's someone else, when I write the program, I write the same amount of comments as described before, but when I finish the program, I put more extensive comments afterwards.
__________________
Project::Soulstorm (personal homepage) |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|