8
A senior dev told me my code comments were useless until I learned to explain the 'why' not the 'what'
I used to write comments like 'this loops through the data' and he said no kidding I can read the code, tell me why we're looping through the data in the first place, and now I actually write useful notes that save me hours when I come back to a project months later on the road - has anyone else gotten that kind of feedback that totally shifted their workflow?
2 comments
Log in to join the discussion
Log In2 Comments
ben4862d ago
Good comments tell a story, not just describe the code.
6
the_betty2d ago
Exactly this, @ben486. I started writing my comments as mini-narratives about why I made a decision instead of just what the code does, and it cut down so many questions from my teammates.
8