3 ms·
A full test suite does not replace comments. Most comments are replaced by well-chosen descriptive names for data and functions, combined with refactoring to th
by memracom 13y ago
A full test suite does not replace comments. Most comments are replaced by well-chosen descriptive names for data and functions, combined with refactoring to the point that no functions have more than a half dozen lines, which means that the number of functions is much higher than normal in un-refactored code. This means more function names, and even more variable names, and those extra names provide additional documentation.
That said, however, most business code is there to serve a problem domain which the programmers do not understand implicitly. It is very necessary to provide the programmers with good documentation of the problem domain so that they can write the right tests. Without this documentation, the test suite will be crap and the programmers will be too scared to refactor the code.
So documentation is very important but it must be the RIGHT SORT of documentation. As the brits in the audience will know, the WRONG SORT of documentation will lead to utter chaos and BIG BALLS OF MUD.