Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualKaptein

Posted 25 September 2013 - 10:10 AM

 


Frankly, nothing I see in your code needs to be commented, because it's about as trivial and straight forward as it gets. Better names, clean formatting and at least an attempt at well structured code would make any kind of comment superfluous.
so I  don't need any comments?

 

honestly, write all the comments you feel that you need, for yourself, 1 month from now

you are just starting out, and you will no doubt leave this project for another as you get better at programming and you realize that there are things that could be solved with easier and simpler code

so, this project could be like a reference for you, if you need to take alook at how you did a specific thing, when you need it

 

i frequently take a look at my previous code just because otherwise i would have to re-read documentation or "google it".. no one remembers every little thing smile.png

 

making your variable and function names "short sweet and to the point" is more important

so, for your ogres HP variable:

"hp"  bad

"ogre.getHP()" good

 

me post now (PS. take a quick look at classes, they really do help compartmentalize both your code and your thoughts)


#1Kaptein

Posted 25 September 2013 - 10:08 AM

 


Frankly, nothing I see in your code needs to be commented, because it's about as trivial and straight forward as it gets. Better names, clean formatting and at least an attempt at well structured code would make any kind of comment superfluous.
so I  don't need any comments?

 

honestly, write all the comments you feel that you need, for yourself, 1 month from now

you are just starting out, and you will no doubt leave this project for another as you get better at programming and you realize that there are things that could be solved with easier and simpler code

so, this project could be like a reference for you, if you need to take alook at how you did a specific thing, when you need it

 

i frequently take a look at my previous code just because otherwise i would have to re-read documentation or "google it".. no one remembers every little thing :)

 

making your variable and function names "short sweet and to the point" is more important

so, for your ogres HP variable: "hp"  bad  "ogre.getHP()" good

 

me post now


PARTNERS