Hacker News new | past | comments | ask | show | jobs | submit login

Regarding the relative usefulness of a well-named method vs an explanatory comment, I think it depends on the culture of refactoring for the codebase. If a codebase sees its code very regularly refactored, then comments can be downright dangerous/misleading while methods are easily renamed throughout. On the other hand, a well placed comment can tell you a lot of “why” or “how-to” that a method name / signature cannot.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: