• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

Web Why do people not add comments when coding nowadays?

Status
Not open for further replies.
Elite Diviner
Joined
Jul 15, 2005
Messages
404
Reaction score
2
If you are going to release a work, be it the most simplest npc, to the most complicated xxX stuff, thse comments really helps the second editor, how well the second or third editor can continue editing the code depends on this too. Don't you agreed?

why won't people add any useful comments anymore, just had a look at all these new random repack/src, they are all codes and letters and numbers, and barely any comment anymore and it seems like the original comments left by odinms is getting more and more lesser..
even if there are comments, theres no meaning in it, and the comments goes like //duck this line or //water of life? or //lol i like long names

that doesn't help editors at all..
or i guess they were not told the real uses of comments =|

does any of you agree? or people are really that selfish cause they want to be the one editing all the time and gets all the credit and thank D:
 
Custom Title Activated
Loyal Member
Joined
Nov 27, 2009
Messages
1,905
Reaction score
948
It's not what he meant, idiot.
He meant adding COMMENTS so that even skids and noobs could analyze what the script meant.

Well for one, you shouldn't call someone an idiot just because you don't understand what they're saying.
And what I think he means is that a source with a bunch of green poop loaded on it won't make it any more popular.
 
Upvote 0
Joined
Jun 25, 2008
Messages
923
Reaction score
269
Comments are okay here and there, maybe for determining some special new packets, like the comments we see in sources nowadays... For example:
// v83
or
// v75

But comments everywhere is un-necessary.

You could put a brief description before the whole code.. like.

/* This program does this, and this, with this included, and what it does is this and this and the results can vary from this to this. */

My two cents.
 
Last edited:
Upvote 0
Custom Title Activated
Loyal Member
Joined
Aug 21, 2009
Messages
1,149
Reaction score
598
You know in my school, when we submit our programs for our lecturers to mark, 1/3 of the programs must consist of comments, else its immediate failure and at every close '}' there must be a comment citing the examiner what the } is closing. failing to cite a comment behind the '}' minus 5 marks out of 100 for every practices(problem solving) and test.
like
}//end main
}//end function z
}//end if

So you kinda gets 0 if your program happens to have over 50 } and you dont cite a comment at the end of each }.

I believe the comment thingy is not related to skill/coding quality at all, its there to allow users including authors to understand and go through back big past works faster. I'm sure an experienced/pro programmer(not 1 that just noe about programming from maple) but one who really learned programming from the basics will agrees with me the usefulness of comments..

Reason is not because it's a good practice, I can assume you're in the beginning of the class, meaning like it's Programming Class - I. Reason you're forced to place a comment, is so you would forcibly learn when to close a method / statement / class / ..., this is not for further personal / open source projects.

Personally I thinks the method is bad, since you would ends up like now, that you see like placing a comment at each braked closing is good. However, commenting is good, but it's the programmer style to place it when ever he thinks or maybe not even use it. Personally I thinks that commenting the top of a program to details what it's about and putting good named to your classes / methods / attributes is enough to understand a code.
 
Upvote 0
for(alive>0){makeMoney()}
Loyal Member
Joined
Aug 1, 2006
Messages
357
Reaction score
68
public void xxxx

What else do you need?
 
Upvote 0
Junior Spellweaver
Joined
Sep 19, 2009
Messages
138
Reaction score
92
Comments are okay here and there, maybe for determining some special new packets, like the comments we see in sources nowadays... For example:
// v83
or
// v75

But comments everywhere is un-necessary.

You could put a brief description before the whole code.. like.

/* This program does this, and this, with this included, and what it does is this and this and the results can vary from this to this. */

My two cents.

I usually add comments only for addition of packets over versions and on switch statement..

such as

// intended fallthrough for switch, without "break"

I started out programming all by myself via Google search, I don't attend any programming class...
 
Last edited:
Upvote 0
Elite Diviner
Joined
Jul 15, 2005
Messages
404
Reaction score
2
Actually what I was trying to say is, use comment to its best.

Because if you go through all the repacks around, practically most of the comments are useless comment, that doesn't help the editor at all, comments like
//wtf?? //i like to give weird name to my function //nice cookie

They doesn't helps any editor when you put a comments lidat, but if you add a brief serious description like,
example, of a good comment
duration = 6; //change value of duration to choose freeze period.

not,
example of bad comment,
duration *= 2; //freezing skills are a lil weird [MapleStatEffect]
^- as you can see the above comment doesn't helps at all, except taking up space. Nobodys need to know about your impression about freezing skill.


Good commenting like that once in awhile, will certainly helps alot.. and this is supposedly the real thing about commenting.

when i said add it, i meant practically almost everytime you find appropriate for others references like a disciplined habit, not once in awhile, and do drop the meaningless comment habit, because thats the texts thats really taking up space for nothing... :)

We've done our job by releasing it and now, are you asking us to waste our time to add comments?
I'm merely discussing about angryzone coders' usage of comments frequencies, if you really feel such a pain to do so, then just don't do it, nobody (not me) is forcing you.. and for my exam part, yes you must write comments for every } and a big description summary of your program at the header, everytime you were given to writes with a pc.

But if its a written test only, you won't have to do so, because written test is more about rushing your work with a pencil to test your understanding within a given time. o_O

while those } is properly useless to most as its properly just used for the examiner reference, I still think the description summary at the header is useful, even to me as the writer, when i went back to check out old codes i written..





public void xxxx

What else do you need?
public void dispose(){ //compulsory function, that closes a chat conversation.
of course it properly wont be any use since, i dont think anyhere doesn't noe what dispose(); does, but if i write that, i will properly still write a comment as a form of habit. it will certainly comes handy once in awhile, like when i go through all my functions after 6months not opened the file since..

Adding that to 1 simple function may not have any differences, but if you add that to every functions be it complicated ones or simple one, you will see the differences made by the simple description for a few years by continued editors.
 
Last edited:
Upvote 0
Newbie Spellweaver
Joined
Feb 21, 2011
Messages
27
Reaction score
3
Comments for JavaDoc/Doxygen/godoc are good for documentation but the functions should be small enough to be understood without much comments. Really hacky, obscure and just plain wrong parts are exceptions though.
Usually defining the most used values such as map ids as constants create self-documenting code.
 
Upvote 0
Skilled Illusionist
Joined
Apr 21, 2012
Messages
337
Reaction score
144
It's really not that complicated.
Comment why, not how.
You don't need to explain what you're doing, the code already does that.
You may need to explain why you're doing something, because the answer may not be obvious.
Over-commenting is terrible, and you certainly shouldn't be commenting everything.
 
Upvote 0
Status
Not open for further replies.
Back
Top