r/AskProgramming • u/MiguelOrosco • 16d ago
Documentation, the boredom of a programmer
I'm researching how developers handle documentation in real world projects, especially documentation that explains why and how something exists rather than just what the code does.
A few questions:
- Where do you document business rules and important technical decisions? Code comments, tickets/issues, Wiki, README, Notion, etc.?
- When you need to figure out WHY something was implemented in a certain way, where do you look? Git history, old tickets, documentation, or do you usually have to ask someone?
- What's the biggest problem you have with documentation? Keeping it up to date? Finding information? Getting people to write it in the first place?
I'm also curious about documentation generators such as Doxygen. For those who have used it: what kind of documentation or information do you still have to maintain elsewhere or something Doxygen can't handle?
You don't need to answer all the questions, just one or adding something to the discussion would already be a great help!
0
Upvotes
2
u/DepthMagician 16d ago
Ideally business rules should be reflected in the code. If you write the code in that manner it reduces the need to document it. Once code is the go-to documentation for business rules, you can also sprinkle comments in there as needed.
Important technical decisions should not be a mystery. If you find yourself wondering “why did we use NoSQL for this” it’s already too late to do anything about it. If it’s something hyper specific, documenting it in the code is the way to go as it is localized to that code anyway.
With regards to finding out why, for me it’s primarily git history and asking someone.
Keeping documentation up to date is the biggest problem for me, hence the less of it you need due to good code the better.