Thursday, April 15, 2010

code review lesson learned

Just had some code review and got a lot of comments:
  1.  mis-spell in comments. I should use the a spell check add-in
  2. copy and paste others code without change the styles
  3. use the const function whenever possible
  4. use std::string::empty() instead of compare with empty string
  5. include all dependent header in the header definition vs. depending on the cpp file include sequence.
  6. pay more attention to resource release, return true/false path even if most did not matter.

No comments: