If certain piece of code requires an explanation, we often add comments for the block or the logic.
Always try to avoid comments if the code can be moved to a new private method where the methodName can eliminate the need for comment.
Note: comments should not be used for bad code. it should explain in short about what "this good code does"
No comments:
Post a Comment