DEV Community

Discussion on: What are some "classic reads" in programming?

 
aimerib profile image
Aimeri Baddouh

Would you expand on what gains you've had by eliminating comments on your PRs?
Personally, I'm a big fan of leaving comments for context for future me/colleagues. I've found that commenting on what the code does isn't really helpful as it is more of an indicator that the code is likely too complex to begin with, and should probably be broken down more, and named better, however, there is immense value in having breadcrumbs about what will this change mean for the codebase going forward, and also implementation guides if the particular PR is for code that will be used in other parts of the applications.

Thread Thread
 
eddycorderol profile image
Eddy Cordero

Comments are really good when they evolve with your code.

But I want to say that when I start working as a developer, my pull requests were full of similar comments, rename this variable or delete this space and a coworker recommends "Clean Code" and this book helped me change this .

Thread Thread
 
aimerib profile image
Aimeri Baddouh

I see! Yeah, in that situation, I completely agree that comments were probably not super helpful.
I've found that in my own experience, PR and code comments aren't a good way to explain the code itself as it quickly gets stale and comments go out of sync with the code they are for.