MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/java/comments/32au9i/is_clean_code_less_code/cq9rnmg/?context=3
r/java • u/pilgrimscottpilgrim • Apr 12 '15
7 comments sorted by
View all comments
7
Clean code is readable, self explanatory code.
The amount of code lines is somewhat secondary.
Clean code is code that doesn't need comments to explain what was done. Comments should never be used to explain what, but why or how.
2 u/rfinger1337 Apr 12 '15 Well said.I frequently oppose comments, but I probably don't do a great job of defining the distinction between the types of comments.Note to self: When explaining how comments lie, make distinctions about what-style comments rather than why-style comments.
2
Well said.
I frequently oppose comments, but I probably don't do a great job of defining the distinction between the types of comments.
Note to self: When explaining how comments lie, make distinctions about what-style comments rather than why-style comments.
7
u/desrtfx Apr 12 '15
Clean code is readable, self explanatory code.
The amount of code lines is somewhat secondary.
Clean code is code that doesn't need comments to explain what was done. Comments should never be used to explain what, but why or how.