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. Four spaces to indicate a line continuation of the previous line.

Two space indentation:

  

Inline commenting

Use the following format:

    if( condition ) {
      /* <comment> */
      return;
    }

Parenthesis clauses:

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

    if( condition ) {
      ...
    }  

Max Width of File:

The maximum number of characters on a line is 80.

Clone this wiki locally