What Code Comments are Not For.
I deal a lot with other people’s and legacy code. One of the things I see very often is what I call "misuse of code comments". Let me provide an exhaustive list of what code comments are for: Describing why code isn’t doing something obvious There, done. What code comments are not for (not complete): The Obvious // set the value of i i = value; It’s obvious that the code is doing that; the comment adds no value here. The compiler provides no validation that the "i" in the comment really applies to any variable in the line the … Continue reading What Code Comments are Not For.