No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Space Cookies Programming 2017 Guidelines

This document contains framework, style, and check-in guidelines.


See the current documentation here.

Style Guidelines

Follow these guidelines to ensure consistency across our code.


  • Initialize all private instance variables in constructors in roughly the same order they were declared in the header file.

Header Files

  • All header files should have #define guards
	#ifndef FILE_NAME_H
	#define FILE_NAME_H
  • #include the header files in this order (if applicable): WPILib.h, external libraries specific to robotics (like navx/AHRS.h), other header files in the order they appear in your source tree, and libraries specific to C++ (like <iostream>)
  • Only #include the header files you need


  • Declare pointers like type *ptrName;. If you're declaring more than one pointer, do type *ptrName1, *ptrName2;.


  • Put the starting curly brace on the same line (like Method() {)
  • Try to group similar methods and variables together. Separate the groups with empty lines.
  • In header files, generally methods go before variables
  • Methods should be written in this order: Get, Set, Reset

Switch statements


switch (condition) {
case ABC:
case DEF:

Naming Conventions

  • Instance variables: lowerCamelCase

  • Member instance variable: 'lowerCaseCamel_'. Don't forget the underscore!

  • Macros, consts (like ports): CAPITAL_LETTERS

  • Methods and classes: UpperCamelCase

  • Enum-list: kInit, kIdle, etc.

  • Abbreviate only when necessary

  • Class names should be nouns.

  • Accessor methods typically start with Get, mutator methods typically start with Set.

Unit and Coordinate Conventions

All distances are in feet, all angles are in degrees. +x is forward, +y is left. This means that positive degrees are counterclockwise.


  • Use double (not float) for decimal values
  • Always use curly braces for if statements, for loops, etc.

Check-in Guidelines

Follow these guidelines for clarity and quality control.


  • Are you only checking in the files you changed? Make sure to check the diffs between your code and the code in the repo.
  • Does the code compile?
  • Have you added descriptive and concise comments to your code?
  • Does the code comply with our style guidelines?
  • Has a leader and/or mentor checked your code?
  • Have you written a descriptive commit message with the following details?:
    • The changes you made
    • Whether you tested the code and how it ran on the robot
    • Next steps / what needs to be done on the code
    • Sign your name, the names of people working with you, and the person/people who checked your code.

Changing the INI File

  • ssh into roboRIO.
  • cd /home/lvuser
  • ls ---> lists files
  • vi robot.ini ---> you can modify this file by typing "i" (for insert). When you're done, hit escape and then ":wq" (saves and quits)