Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

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

Reply
 
Thread Tools Display Modes
Old Jun 6th, 2006, 12:44 PM   #41
melbolt
Hobbyist Programmer
 
melbolt's Avatar
 
Join Date: Feb 2005
Location: PA, USA
Posts: 242
Rep Power: 4 melbolt is on a distinguished road
Send a message via AIM to melbolt Send a message via Yahoo to melbolt
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
melbolt is offline   Reply With Quote
Old Jun 6th, 2006, 1:49 PM   #42
UnKnown X
Hobbyist Programmer
 
UnKnown X's Avatar
 
Join Date: Dec 2005
Location: Sandvika, Norway
Posts: 114
Rep Power: 0 UnKnown X is an unknown quantity at this point
Send a message via MSN to UnKnown X
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
UnKnown X is offline   Reply With Quote
Old Jun 7th, 2006, 1:47 AM   #43
Soulstorm
Hobbyist Programmer
 
Soulstorm's Avatar
 
Join Date: Jan 2006
Location: Menidi, Athens, Greece
Posts: 243
Rep Power: 3 Soulstorm is on a distinguished road
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)
Soulstorm is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 1:29 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC