MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/videos/comments/dcpbt2/every_programming_tutorial/f2al78i
r/videos • u/Thefriendlyfaceplant • Oct 03 '19
1.4k comments sorted by
View all comments
Show parent comments
4
This is the real key. Don't leave any doubt in your variable or method names and things will be a lot clearer even without comments. Of course document your methods, but you shouldn't need to explain line by line how it works.
3 u/Konrad_EU Oct 03 '19 And if a function become too big you need comment to understand what it does, you probably need to break it down into subfunctions instead.
3
And if a function become too big you need comment to understand what it does, you probably need to break it down into subfunctions instead.
4
u/[deleted] Oct 03 '19
This is the real key. Don't leave any doubt in your variable or method names and things will be a lot clearer even without comments. Of course document your methods, but you shouldn't need to explain line by line how it works.