Always write comments - eviltoast
  • Von_Broheim@programming.dev
    link
    fedilink
    arrow-up
    1
    arrow-down
    1
    ·
    1 year ago

    If you’re writing an explanation of what your code does then, ding ding, you’re writing code. If your code has so many side effects and garbage in it that it’s incomprehensible without an explanation then it’s shit code and I doubt you’d be able to write a comment that explains it that is not equally as shit as the code. Commenting on how shit code works cannot be trusted because the commenter has already proved they’re shit at the job by creating that shit code.

    Best you can hope for is the comment contains a reason as to why the code is shit.