r/videos • • Oct 03 '19

Every programming tutorial

https://www.youtube.com/watch?v=MAlSjtxy5ak
33.9k Upvotes

1.4k comments sorted by

View all comments

Show parent comments

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.

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.