Comments in code are quite often a code smell. Let’s see what is suboptimal about comments and talk about some strategies to avoid them.

  • danrot@kbin.socialOP
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    Totally agree, that’s why I also mentioned this in the article.

    Very often good code that is self-explanatory does not need any comments at all and if it does, the comment should describe why it has been implemented this way instead of just repeating what the code already says.