The New Best Practices
The New Best Practices
The New Best Practices
Code Comments
54 minutes Posted Jan 19, 2018 at 4:00 pm.
0:00
54:01
Download MP3
Show notes

 

Outline

  • Definition of comments: “Metadata in source code that describe what code fails to communicate. Some languages and frameworks opt to use the mechanism of comments as formal documentation for code, but these two concepts should be separated.
  • Strive to make code self-documenting
  • Formal Documentation vs. Code Comments
  • Using tests to document your code
  • Considering strong types as a type of documentation
  • Docstring Tests
  • The value of documenting types
  • Worthless comments should be avoided
  • Don’t use comments to “vent” your emotions