User Tools


This is an old revision of the document!


Coding Conventions

Due to this being a collaborative software project among new developers, it's important to make sure that the code you write is clean and usable by others. We predominantly use two languages in this project, C++ and Python. Below are a list of coding conventions for each respective language in the project. There may be exceptions to these rules, but otherwise they should be followed. A code linter will be created to ensure that code conforms to there standards.

All Languages

Indentation

Spaces shall be used for indentation, no tabs.
Rational: mixing tabs a.nd spaces can cause major bugs in Python, and can create ugly formatted code in all other languages, so consistency is important. Although I prefer all tabs in Python, spaces makes more sense for other languages.

Line Length

The maximum length of a line shall be 80 characters
Rational: this results in code that is readable on most screens without wrapping lines

C++

Python