This is the FRC 6695 Robot code for the 2024 competitions season.
- Spacing set to tab size 4
- Single spaces inbetween conditional statments or mathematical operations
- Yes
x > y
,x * y
- No
x>y
,x*y
- Yes
- Functions or if statements with multple parameters: put each parameter on a new line
- Classes, funtions, and variables should have a description (using
""" """
under the declaration) which accurately describes their purpose - Comments. For. Everthing. You might think your code painfully obvious to understand, but people new to club would have a significantly easier time if it was explained in words
- Keep nesting if statements to a minimum
- There is nothing from stopping you, so you have to make sure never to edit constants. There is no const, static, or final in python.
- Every class, function, and operation should have on function.
- Try not to
import __lib__ as
a nickname too often. Unless it is likenetworktables
which is absurdly long andnt
can't be confused with anything.
- Variables: camelCase
m_
prefix for measurementsx_
prefix for positions (lik physics)p_
prefix for pressurek
prefix for (???)
- Functions: camelCase
- Classes: PascalCase