Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I prefer clean code that doesn’t have comments except as doc strings for various parsers on declarations and in areas that are particularly surprising.

If I want to know why something was done, I expect to be able to use git log or git blame on the file or line and get find a commit message, issue tracker link or pull request reference that I can pursue.



But then a single minor refactor means you have to dig through history after puzzling over something for long enough to decide that it's definitely no obvious instead of just seeing an inline explanation (or at least a link to one).


Issue trackers, vcs and employees change. A meaningful comment stay as long as it is meaningful.


> A meaningful comment stay as long as it is meaningful.

Sometimes even longer :)


# TODO remove this

is my all time favorite.




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

Search: