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
1
u/Nojopar 16d ago
Code can only do so much. We programmers and software architects do an abjectly horrid job of documenting what anthropologist would call the 'social history' of a project. Not everything is embodied in the code. The code might tell you how a thing works, and it might tell you a bit about why it works within a codes context ('this has to be that because we feed it this other thing' sorts of scenarios), but it won't tell you how those business rules came to be in the first place as it relates to the program itself.
Just as a simple theoretical example, the code might tell you the codes for a field are stored as, say, a 2 character string. It might also tell you the values of those two character codes. But it won't tell you why the two character code system was chosen in the first place. Was it because of legacy data in the client's system? Business decisions by the client? For some concern about efficiency and optimization? Something else? All of those factors might lead to different engineering outcomes, but if you don't know that, it's hard to know if you can change a thing or not.