Generalized Software Style Guide

From RoboJackets Wiki
Revision as of 22:42, 27 February 2019 by Jgibson37 (talk | contribs) (Created page with "== General == What they do isn’t already done by a function that they don’t know about Any simple optimization is done == Comments == Things do what their comments say...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

General

What they do isn’t already done by a function that they don’t know about Any simple optimization is done

Comments

Things do what their comments say

Structure

No chances for infinite loops / errors

Unit Tests

Any testable functionality added has the corresponding unit tests


TODO things

Things should look nice overall, if you can’t figure out what code is doing at a glance, it’s bad Variables are named nicely. I want to be able to look at it and know what it represents Includes are in a specific order. Group by stdlib, system/library, local headers, then ABC order inside each group Keep line lengths in check All magic numbers are config values or const’s at top of file Things are initialized in the constructor in the same order they are defined in the header Single responsibility principle is often lacking Comments Args / rets should be described for functions with notes about assumptions made Classes should describe their place in the program overall Doc pages should be made for entire systems describing the way all the data / classes work together Blocks of code should be commented to describe things on a low level Math should be fully described (ASCII art for vectors) https://github.com/RoboJackets/robocup-software/blob/master/soccer/vision/ball/BallBounce.cpp#L65