4 ms·
The only thing better than well written code is well written code with well written comments. I am especially fond of the way how Ruby and Ruby on Rails docume
by t0mbstone 5y ago
The only thing better than well written code is well written code with well written comments.
I am especially fond of the way how Ruby and Ruby on Rails documents their standard libraries. Every single method (even if it is only a stub) has a comment above it that documents the method. That comment is then used to generate the documentation itself. Unit tests also ensure everything is operating as documented.
This methodology ensures that the code, comments, and documentation are all up to date and in sync with each other.