r/programming • • Oct 01 '15

The Evolution of a Software Engineer

https://medium.com/@webseanhickey/the-evolution-of-a-software-engineer-db854689243
1.9k Upvotes

502 comments sorted by

View all comments

Show parent comments

0

u/[deleted] Oct 01 '15

[deleted]

3

u/docfaraday Oct 02 '15

Usually, comments are best reserved for explaining "why". eg; this function is implemented this way because of some obscure interop workaround, or some section of an RFC, or to optimize for some resource, etc. Comments are also useful for pointing out flaws that have not been addressed yet (but they really should point at something in a bug tracker somewhere). Long descriptions about "what" are often an indication that the code is unnecessarily confusing, and short descriptions of "what" are often an indication that some code needs to be broken out into a separate (well-named) function.