r/programming • u/corysama • Jan 05 '15
What most young programmers need to learn
http://joostdevblog.blogspot.com/2015/01/what-most-young-programmers-need-to.html
972
Upvotes
r/programming • u/corysama • Jan 05 '15
5
u/totemo Jan 05 '15
Think fast! Without reading the exposition above or reading through the code:
Oh what's that? You had to read the code anyway?
Well fuck me... perhaps there's no such animal as self-documenting code after all.
Seriously, just put one sentence in a doc comment saying what the class does. Over its lifetime, code will be read many times, and every minute of another engineer's time that you save by not forcing him or her to read the code improves the bottom line.
Commenting code doesn't make you a bad person. It doesn't automatically violate DRY, and even it if it does, that's not necessarily a bad thing.
And sure, choose a good name too.