Don't commit commented code

Always delete commented code. It can be easily accessible via your source control.

Commented code increase cognitive load.

If old code needs to be accessed, it can be referenced via source control.

Reasons for removing:

  • Increases cognitive load

  • Commented code maybe outdated

  • Old code can be accessed via source

References:

Last updated