Code Comments

The New Best Practices

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

Links

  • Python doctest
  • JSON API Expectations Semantic expectation helpers for JSON API testing using RSpec and Airborne.

To listen to explicit episodes, sign in.

Stay up to date with this show

Sign in or sign up to follow shows, save episodes, and get the latest updates.

Select a country or region

Africa, Middle East, and India

Asia Pacific

Europe

Latin America and the Caribbean

The United States and Canada