DEV Community


Discussion on: 5 clean code techniques you can start doing today

nathanoleach profile image
Nathan Leach

While they can certainly be misused, the best, legitimate use of comments is likely to state the "why" of a solution...the business rules or decision points...something that is rarely, if ever, explained by the code itself. It's the question that the person maintaining your code will ask themselves over and over again. So, do them a favor...and explicitly answer it, proactively.