View Single Post
  #6   Spotlight this post!  
Unread 01-01-2015, 22:21
MrRoboSteve MrRoboSteve is offline
Mentor
AKA: Steve Peterson
FRC #3081 (Kennedy RoboEagles)
Team Role: Mentor
 
Join Date: Mar 2012
Rookie Year: 2011
Location: Bloomington, MN
Posts: 581
MrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond repute
Re: Tips for a new programmer?

* start small and work your way up
* build every couple minutes to make sure that your program still compiles
* test your work as you go along
* select good variable, method, and type names. Don't shy away from changing them if there's a better name -- that's what the professionals do. It's easy in Eclipse -- right click on the variable name
* set up the control system on a board and test prior to robot completion
* keep your code organized and well commented
* use a version control system (free GitHub anyone?), and commit regularly. This allows you go to backwards in time if you break something (and you _will_ break something)
* read the code of other teams
* post questions on CD
* use the same name in the program for a control as you do in the real world --e.g., "left drive Jaguar". Put a label on the left Jaguar that says that.
* use constants in a single type for all of the port assignments (e.g., PWM1) and name the constants after the device. This allows you to go to one place in the code and see how things should be connected.
__________________
2016-17 events: 10000 Lakes Regional, Northern Lights Regional, FTC Burnsville Qualifying Tournament

2011 - present · FRC 3081 Kennedy RoboEagles mentor
2013 - present · event volunteer at 10000 Lakes Regional, Northern Lights Regional, North Star Regional, Lake Superior Regional, Minnesota State Tournament, PNW District 4 Glacier Peak, MN FTC, CMP
http://twitter.com/MrRoboSteve · www.linkedin.com/in/speterson