My recent favorite coding tools are clang-format and autopep8 that do auto-formatting of C++ and python code respectively. They are pretty easy to set up on a mac given homebrew and access to easy_install. Using them results in nicely formatted python and C++ code with little effort. 

I put some instructions at <https://github.com/salilab/imp/wiki/Code-formatting>.