FWIW, on our team, we ask developers to put as much documentation inline as 
possible - and only use external documents when absolutely necessary.

The reason being simply this: documentation needs updates. When the code 
changes, often the documentation should too - and it's really easy to forget 
that, if the documentation for the code is in an entirely different system. If 
you weren't the original author, you might not even realize that external 
documentation exists.

As part of our development process, during code review, we look for changes 
that require documentation updates - a pull request isn't merged until it's 
complete with documentation updates. It doesn't work 100% of the time, but it 
works pretty well - a lot better than the documentation for our old platform, 
which was located in an external system.

IMO, information overload in the source code is a problem that can be managed - 
either by folding in the editor (which may increase the risk of forgetting to 
update the documentation!) or by writing smaller files, e.g. fewer members per 
file, which is usually a good thing either way.

In my experience, external documentation always rots. Inline documentation has 
a better chance of actually receiving the maintenance it requires.

Just my two cents. 

Reply via email to