frontend-playbook icon indicating copy to clipboard operation
frontend-playbook copied to clipboard

Provide a couple more examples of acceptable commenting

Open dotcode opened this issue 5 years ago • 1 comments

After a discussion about reasonable use of comments, we thought it worth providing a couple of extra examples of where comments in code are useful (to complement the general rule that code should be self-documenting).

For example, from @morgaan "comment for tricks dictated by business needs"

dotcode avatar Aug 29 '19 13:08 dotcode

I always liked "comments should be why, not what". If documenting what the code is doing, that's probably a code smell.

jpw avatar Sep 02 '19 10:09 jpw