When documentation is written with the goal of teaching other developers how a system works, providing examples on how to use its inner layers, and train them on the driving design principles behind some complex software, it can be a very effective way to onboard new team members in a project.
In any fairly big and complex project, documentation becomes something that is essential for navigating the complexity of the system without having to rely on our memory to remember how to use every single layer or class involved in the system.
But documentation is also hard. Not only is it actually hard to write, because what might seem obvious and clear to us might sound cryptic to another reader, but also because the code evolves quickly and documentation easily becomes outdated and inaccurate.
Thankfully, testing is a very effective way to also ensure that our documentation doesn't get outdated and that it still applies to our system. As much as we test the application...