4 ms·
I'll take well-named variables, functions, and classes over code comments any day. It's a chore and and half to plow through code in which the author has, for
by apo 8y ago
I'll take well-named variables, functions, and classes over code comments any day.
It's a chore and and half to plow through code in which the author has, for whatever misguided reasons, shortened variable names to inscrutable abbreviations, acronyms, and single letter head-scratchers.
Context-switching between comments and code may be easy for the author, but isn't good for the reader.
More often than not, the short-variable tendency points to an even worse problem: the author hasn't though very deeply about the software at a high level and therefore hasn't developed a good vocabulary or conceptual framework around the problem space.
- antirez 8y agoThe best is the code the more and better the comments usually... No mutual exclusivity.
- Drdrdrq 8y agoThis! I don't mind comments, but thinking they can replace good naming discipline is misguided imho. I prefer less comments, and only those that explain intent. (+API docs of course)
- deleted 8y ago[deleted]