View Single Post
Re: What are the best practices?
Old
  (#4)
stefanhendriks
RealBot Author
 
stefanhendriks's Avatar
 
Status: Offline
Posts: 3,088
Join Date: Nov 2003
Location: Netherlands
Default Re: What are the best practices? - 02-07-2008

Yeah it was about the comment ;-) I mean, the comment is more characters then the actual line of code; which brings me to:

- the code should be readable as it is, any comment needed to explain code, means your code is not simple/good enough.

Comments however can explain WHY certain things are done

Since i work with Java for some time now, I have been into classes big time; when i see the RB code, all those FUNC_ methods give me the creeps. Keep things where they belong (ie, a bot can See things, not a util method with a bot pointer... )

Also, i am all with you Whistler about huge params functions, but then again, you might wonder why they need so many params


Author of RealBot, "Arrakis" and "Dune 2 - The Maker" | co-Founder of Bots-United | Fundynamic | Blog | E-Mail me
  
Reply With Quote