Readable, solid code is our livelihood and a matter of professional courtesy. The code is not yours to maintain, it is everybody's. Others will have to read it. Don't make your coworkers lose a day debugging your code just because you were undisciplined.
All of this book applies. Elaborations/modifications of individual items follow.
1. Compile Cleanly at High Warning Levels and leave -Werror turned on to guarantee this. If you need to disable certain warnings, do so carefully and in the smallest scope that you can:
set_source_files_properties(warnyfile.cpp
PROPERTIES
COMPILE_FLAGS -Wno-non-virtual-dtor)
Whitespace is important for diffing cleanly. We are a no tabs and no trailing whitespace code house (except where tabs are needs as in gnu makefiles). Please set your editor to not include tabs and not to save trailing whitespace.
In emacs land:
(add-hook 'before-save-hook 'delete-trailing-whitespace)
(setq-default indent-tabs-mode nil)
To help yourself from making the faux pas of committing evil invisible characters, try forcing git to dissallow it:
% cd my_git_repo
% cp .git/hooks/pre-commit.sample .git/hooks/pre-commit
You can also turn it on in your git diff via:
% git config --global core.whitespace tab-in-indent,trailing-space