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

Hey,

I bet you all have your ways of coding things; I surely have learned a lot from my mistakes. So what are your best practices in terms of coding?

First of all, let me start:
- use classes, and sub classes to override behaviour
- use one convention for all your variables, don't do i1, i2, i3, etc.
- do not do this:
Code:
int i =0; // set i to 0
- use assertions wherever possible, to assure your assumptions are correct

So, what do you suggest?


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