5. Contributing

Thank you for your interest in contributing to the CodeDog project!

Here you will find resources that will be useful in some way.

5.1. CodeDog Style Guide

The following are some general guidelines so that we all produce code that looks similar.

  1. Use 4 spaces to indent. Do not use tab characters. You can set your editor to do this automatically.

Note

If you use a file compare tool such as Meld, be sure to set it to use 4 spaces and no tabs. We have found that we get commits with terrible white space changes otherwise.

  1. Line up curly braces like this:
if(…){
    // code here
} else {
    // code here
}
  1. If it seems appropriate, lines of code can be made to line up with each other like this:
sizeDiff            <- 0
LHS.value.format    <- fLiteral
LHS.value.str       <- RHS.value.str
LHS.value.sizeMode  <- fromGiven
  1. Use camelCase for identifiers. Class names can be capitalized while other identifiers start lower case.
  2. Only put more than one command on a single line when it adds to the clarity of the code or makes trivial things take less space. Separate the items with semicolons:
void: clear()<-{path<-NULL; flags<-0;}

5.2. Our Code Review Checklist

5.3. Tiffany’s Workflow

5.4. A Tour of How CodeDog Builds Programs

5.4.1. The codeDog file

5.4.2. codeDogParser.py

5.4.3. progSpec.py

5.4.4. codeGenerator.py

5.4.5. buildDog.py