logoalt Hacker News

prependyesterday at 7:36 PM2 repliesview on HN

Comments are great for developers. I like having as much design in the repo directly. If not in the code, then in a markdown in the repo.


Replies

KronisLVyesterday at 8:25 PM

Meanwhile, some colleagues: "Code should have as little comments as possible, the code should explain itself." (conceptually not wholly wrong, but it can only explain HOW not WHY and even then often insufficiently) all while having barebones/empty README.md files more often than not. Fun times.

show 3 replies
hk__2yesterday at 7:53 PM

This is also a great way to ensure the documentation is up to date. It’s easier to fix the comment while you’re in the code just below it than to remember “ah yes I have to update docs/something.md because I modified src/foo/bar.ts”.

show 1 reply