Skip to content

Style Guideline

Jose Jimenez edited this page Dec 12, 2019 · 23 revisions

File Headers:

/**
 *
 * Jose Jimenez 
 * Brandon Cramer
 * Minh Pham
 * Tony Guan
 * Victor Chen
 *
 *                 University of California, San Diego
 *                      IEEE Micromouse Team 2020
 *
 * File Name:   <Name>
 * Description: <Short Description>
 */

Routine Headers:

Routine Headers will be in parallel with the Javadocs. Every header should have a short description of its role, a short description for all formal parameters, and what the function expects to return. An example is as follows:

/**
 * Two pairs are equal if the content in the pair are equivalent order does 
 * not matter.
 * @param o object of comparison.
 * @return true if pairs have the same content.
 */
@Override
public boolean equals( Object o ) {
  ...
}

Indentation:

Two space indentation. (NOT tabs)

Inline Comments

Use the following format:

if( condition ) {
  /* <comment> */
  ...
}

Parenthesis Clauses:

For consistency make sure to leave whitespace on conditional clauses in between the parenthesis. Example:

if( condition ) {
  ...
}  

Max Characters per Line:

The maximum number of characters on a line is 80.

Clone this wiki locally