Documentations explain how to use code, and are for the users of your code
Comments explain WHY, and are for the maintainers of your code
use javadoc for self-documentations
use FIXBUGTODO to show different kinds of comments
Python
Always use timezone-aware time or timestamp, never use local time string.
使用 Google 的 docstring 规范
禁止在代码中 import sys.path 来修改 PYTHONPATH
禁止直接连接服务,必须使用连接池,连接使用完毕之后放回到连接池。
严禁使用 kwargs
C++
header file should use *.hpp NOT *.h
always use #define guards
Reduce the number of #include files in header files. It will reduce build times.
Instead, put include files in source code files and use forward declarations in
header files. If a class in a header file does not need to know the size of a data
member class or does not need to use the class's members then forward declare the
class instead of including the file with #include. To avoid the need of a full class
declaration, use references (or pointers) and forward declare the class.
Never use using namespace std
use nullptr not NULL
devops
using mosh is recommended over plain ssh
using tmux is recommended over screen
all directories/repositories should use underscore NOT hyphen