Documenting software is a waste of time?

Documenting software is a waste of time?

I heard from young guys that documenting software is a boring task, and some even say it's a waste of time, and I agree that some times is boring, and few years ago I thought the same, I didn't like to write documents and I used to complains about it, but you know what? my current me is so grateful I spent all those hours writing all those wiki/confluence pages of the projects, I have seen a lot of people coming and going because of the high rotation rate in the company(this is a topic for another post) and it's a lot of time wasted on KT/training sessions every time a new member join the team, I know it's necessary but it's really disappointing when you finally teach somebody to be productive within the project and then he/she resign or get laid off.

Today joining a new member is smooth, there are a lot of useful pages with information that only the people who coded some modules would know, and thanks to those documents the current team is able to be productive and find information faster than reading thousands of lines of code, even when migration or server upgrades are needed, the team is able to answer and provide advice with confidence.

To conclude, never stop documenting your software, once it's on production you're gonna be dragged into prod issues because you developed that, so do a favor to yourself and document all the things that you can think can be useful for somebody to catch up when issues come up.