CodeFaster

CodeFaster

Share this post

CodeFaster
CodeFaster
Quick tip: delete commented code

Quick tip: delete commented code

Tyler Adams's avatar
Tyler Adams
May 28, 2021
∙ Paid

Share this post

CodeFaster
CodeFaster
Quick tip: delete commented code
Share

There’s no reason to leave code commented when checking it in, just delete it. It’s one of the most common pieces of feedback I give while reviewing code.

If you’re commenting code because you think you’ll need it later, it’s in the git commit deleting the code. So there’s no reason to leave it in the code itself. Leaving commented code lying around makes the code harder to read and harder to navigate.

It’s fine to leave it commented while prototyping and testing locally.

If you have any other situations you think you need to leave commented code in a codebase, reply to this email or leave a comment below.

This post is for paid subscribers

Already a paid subscriber? Sign in
© 2025 Tyler Adams
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share