Comments in Code

Comments In Our Code: Necessary or Not?

Robert Rice Development Technologies, Programming 1 Comment

No matter what your opinion is on comments, one thing is universally true: developers should create code that the next developer can understand.

Sometimes, comments are a safe, simple way to leave the code better than how you found it. Sometimes, extracting sections of code into a well-named method can be an alternative way of doing this, with the added benefit that (a) you can test this method individually and (b) it may help you to spot smells in your code or see places for further refactoring or simplification.

Each situation you encounter will require different treatment, but I hope this post has given you a starting place for creating clean, readable code in your own life!