Coding Practice: Commenting Out Code

Coding Practice: When should I check in commented code?
Code that is commented out should not be checked into TFS.

“When you see commented-out code, delete it! Don’t worry; the source code control system still remembers it. If anyone really needs it, he or she can go back and check out a previous version.”
–            Robert Martin

Commented out code becomes irrelevant within days of being checked into TFS, and then it just becomes an impediment to the readability of your code.  Don’t check commented code   into TFS.

Clean   Code: A Handbook of Agile Software Craftsmanship
7 Tips On Writing Clean Code

About Chris VanHoose

Principal Software Architect at CT Lien Solutions
This entry was posted in Software Architecture and tagged , . Bookmark the permalink.

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.