DEV Community

Discussion on: Don't document your code. Code your documentation.

Collapse
 
nimmo profile image
Nimmo

Documenting the why, rather than the what, can be absolutely crucial. As for comments being easier to understand than code being extracted into separate functions; I'd say there is far more chance of a comment being out of date than a function name (although the latter is also entirely a possibility).