How can I document the structure of my code?

I’ve written a program and now I’m leaning towards writing documentation for it’s source code in a separate file. Preferably I’d like to start off with the structure of the code (like how things are connected and what they transfer) on some sort of spreadsheet. Is there a standard format to do this in programming? An Application that is dedicated to this specific use or a filetype that is capable of doing so?

Documentation for unit tests

I have a small project written primarily in C++ which is documented with Doxygen and tested with a unit testing framework (Google Test in my case, but that doesn’t matter). I wrote several test cases for each method of each class to test the method’s behavior under various conditions, and I want to leave some comments for the test suites. The Doxygen documentation is designed for projet’s user, who very likely does not want to see the documents for projects implementation details and tests.

How to maintain a project documentation?

How is it done in practice to maintain a project documentation but not the documentation to the users but the doc for the maintainers. For example, is it customary to just look at the files and understand how it works or we should have class diagrams, etc to explain the project? I don’t see any project on Github having class diagrams.

Errors that don’t make code behave wrong from user’s point of view – how would you call them?

var file_extension = ‘txt’; if (file_extension === ‘txt’) alert(‘plain text’); else if (file_extension === ‘md’) alert(‘markdown’); var file_extension = ‘txt’; if (file_extension === ‘txt’) alert(‘plain text’); if (file_extension === ‘md’) alert(‘markdown’); The second example is wrong: there is no need to use the second if. I would say the use of the second if is…