View Single Post
  #26   Spotlight this post!  
Unread 26-02-2016, 11:29
MamaSpoldi's Avatar
MamaSpoldi MamaSpoldi is offline
Programming Mentor
AKA: Laura Spoldi
FRC #0230 (Gaelhawks)
Team Role: Engineer
 
Join Date: Jan 2009
Rookie Year: 2007
Location: Shelton, CT
Posts: 305
MamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant future
Re: Thoughts On Comments In Team Code

I agree with many of the others posts in this thread.

Here is my 2 cents:
  • the level of commenting shown by the OP is excessive and not necessarily helpful as it clutters the code and does not really provide any added information;
  • thoughtful comments on why something is done in the code is generally much more useful than what is being done;
  • a caveat to the previous point: if the code is a bit complicated it can be very helpful to provide a comment that explains the algorithm being implemented at a higher level and/or any issues that were encountered when implementing it a different way that seemed simpler but didn't work;
  • including comments with all constants being defined that state the units and how the constant was determined are very useful when making adjustments at competition;
  • other coding standards such as using consistent and descriptive variable names and avoiding confusing syntax (e.g. trying to put too much into a single line of code), as this will make your life much less stressful when you are working on your code in the pit.
Good Luck!
__________________