If you change the behavior of the code, change the documentation accordingly.
如果您改变了代码的行为,就要相应地改变文档。
Rewriting code alters the behavior and even the contract of code, while refactoring preserves its outward interface.
重写代码会修改代码的行为甚至合约,而重构保持对外接口不变。
If you're like many programmers who aren't fond of commenting code, unit tests are a way of documenting your code behavior.
如果您像其他许多程序员一样不喜欢为代码加注,则单元测试是记录代码行为的一种方法。
应用推荐