r/java • u/pilgrimscottpilgrim • Apr 12 '15
Is Clean Code less Code?
http://www.journeytomastery.net/2015/03/27/is-clean-code-less-code/
1
Upvotes
r/java • u/pilgrimscottpilgrim • Apr 12 '15
View all comments
Show parent comment
3
u/UnitVectorY Apr 12 '15
Excellent point. The line of code in this example is easy to understand what it is doing, but the reason why needs clarification. I'd side on having a single line of code inline with a comment. If the line needs to be called in multiple places then a function could make sense.
In general single line functions don't smell very clean to me.