https://frc5431.gitbooks.io/styleguide/
We need to establish a coding standard, so all of our code looks the same. This will be an extensive document, and will talk about things you don't know yet. If you don't know what a certain clause refers to, then you can ignore it for now.
There will be the occasional funny relevant comic to make sure this isn't too boring.
Why?
Without a Styleguide, this was the condition of programming team:
- At least one hole in the wall every season
- Always 2 weeks late on the promised deadline
- 1 very expensive item and 2 copies that is extensively experimented with only to be scrapped the day before Dallas regional, such as Kinect, NUC, LED's, or Jetson.
- 5 repos with names such as "finalCompCode," "realCode," "finalCompCode2017ACTUAL." But the actual repo with the competition code is "PRAC-COMP-CODE-2017"
- More humorous comments and puns in code than actual helpful documentation, such as woaver
- Building a turret when no one else would
- Forgetting to plug in the router
- Arguments over singleton vs static functions (both are almost functionally identical)
- Code purges over disagreements of styles
- Cheating on programming quizzes
- The inability to write an HTTP server
- Calculating the price of pizza for the team
- Not wanting to eat pizza
- Withstanding yelling from Eric, Michael, Burnham, and any other student who happens to be on the field when the robot inevitably goes haywire.
- Enduring many cuts on sharp pieces of metal trying to reach the RoboRIO on Themis
- Spending $200 for an IR sensor
- Wasting numerous LED strips and Arduinos for no purpose
- Having to skip dinner to fix the code
- Drama with all of the other teams
Not all of these problems will be fixed quickly. But a defined Styleguide is a step in the right direction.