Raised This Month: $ Target: $400
 0% 

Comments in code


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
|2ob
Senior Member
Join Date: Mar 2004
Location: Ontario, Canada
Old 04-11-2004 , 18:28  
Reply With Quote #1

you people are so smart compared to me...


*cry*
__________________
24/7 Custom Maps Vitrus | Style by www.WebGZ.net
64.247.24.125:27015

Visit Vitrus's Clan Site!

I would put more, but they have a limit on chars
|2ob is offline
Send a message via AIM to |2ob Send a message via MSN to |2ob
IceMouse[WrG]
Senior Member
Join Date: Mar 2004
Old 04-11-2004 , 20:51  
Reply With Quote #2

*Flames him*
IceMouse[WrG] is offline
Send a message via AIM to IceMouse[WrG] Send a message via MSN to IceMouse[WrG] Send a message via Yahoo to IceMouse[WrG]
Dygear
SourceMod Donor
Join Date: Apr 2004
Location: Levittown, NY
Old 04-15-2004 , 07:48  
Reply With Quote #3

Quote:
Originally Posted by |2ob
you people are so smart compared to me...


*cry*
yea i know its unfair, but instead of playing some crappy game with you buds , you could be making a crappy game with your self .
But yea we are more or less in the same boat, i dont have to use compilers for the code i right, sep for NSIS, so dont feel left out.

Quote:
Originally Posted by IceMouse[WrG
]*Flames him*
lol, yea ill do that later.

@all Readable code is in the eye of the beholder.
__________________
Dygear is offline
Send a message via AIM to Dygear Send a message via MSN to Dygear Send a message via Skype™ to Dygear
PM
hello, i am pm
Join Date: Jan 2004
Location: Canalization
Old 04-15-2004 , 11:01  
Reply With Quote #4

sorry that i noticed this thread so late

Comments: i try to choose better names than calling a variable for example tefitp (The Event Function In The Plugin) and than saying in a comment what it should be. Too few comments is bad, but too much comments is also bad... But you are right, i will better comment my (but not OLO's!) functions and arguments

Pre / Post conditions: Too much to do ;]

CString operators: We took that class from OLO, and we will only add something when / if it will be needed. If you want to make operators for it, feel free to do it and post the file, we will take it and give you a credit but we have more important things to do at the moment...

std: i wanted to use it; but i wasn't allowed to there were some problems; i don't remember
__________________
hello, i am pm
PM is offline
GIR
Junior Member
Join Date: Apr 2004
Old 04-18-2004 , 17:07  
Reply With Quote #5

I know what you mean about too much comments or, too obsecure comments. The coding convention I have to follow obligates me and much of the staff to include formal pre/post conditions. I mean who can understand this:

Quote:
PRE: N > 0
POST: {(X = A[Y]) \land (1 \leq Y \leq N)} \lor {(Y = 0) \land (\forall k\ (1 \leq k \leq N) \supset A[k] \neq X)
But I do believe that atleast informal pre/post comments do help the readaboility along alot. Something like this:

Quote:
PRE: Object != NULL && Object->value > 0
POST: Some operation happend to Object and stuff has been stored in Object->value
GIR is offline
PM
hello, i am pm
Join Date: Jan 2004
Location: Canalization
Old 04-19-2004 , 03:13  
Reply With Quote #6

i will try that and will see whether i'll get used to it
__________________
hello, i am pm
PM is offline
Johnny got his gun
Veteran Member
Join Date: Jan 2004
Location: Tokyo
Old 04-19-2004 , 03:31  
Reply With Quote #7

I could maybe get used to pres/posts.
Btw I also belong to those who like to name their variables "playerName" instead of "p", though I won't go as far as using hungarian notation because it's just too much to do although I admit it is pleasing to the eye (think Vexd code)
Johnny got his gun is offline
Reply



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


All times are GMT -4. The time now is 01:54.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode