6 ms·
> In my experience, having worked at many large tech companies, design documents obfuscate, not enlighten. They become increasingly out-of-date as the code evol
by dismantlethesun 10y ago
> In my experience, having worked at many large tech companies, design documents obfuscate, not enlighten. They become increasingly out-of-date as the code evolves, creating anti-documentation that makes it take longer to understand code. Yes, yes, people should update design documents as the code evolves. Everyone knows that in practice, nobody updates old design documents.
My experience has been the reverse, precisely because as you said.... no one updates old design documents.
A piece of code with a design document at least has a historical record of what the original aims of the project were, and a written rationale for why they took certain approaches.
Often you'll find a piece of code with a seemingly inane architecture and wonder "why is this so inane? were the the developers on drugs?". By reading the design document, you find out that sadly no the water fountains were not spiked with LSD in the 70s, but rather they were working around the performance characteristics of hardware that no longer exists and thus these baked in assumptions had reason and merit.
Understanding the original why often illuminates the entire architecture, even if undergone a lot of changes because the original skeleton still remains.
I sort of look at it as Code Archeology, or maybe literary deconstruction as applies to code.
- fdsfsaa 10y ago> A piece of code with a design document at least has a historical record of what the original aims of the project were, and a written rationale for why they took certain approaches. That information is very useful, particularly as a comment or a commit message. Storing this information in a separate unversioned document off on some enterprise management system makes it harder to find. If you put the rationale for a change in the commit message, the rationale is right there when you run blame!
- vertex-four 10y agoAnd what about when your commit is part of a 5-patch series, as part of a 3-series project to bring some internal framework code up to scratch in order to start implementing a new feature? Which commit do you stick your design rationale on, and how do you ensure people will see it? Commit messages are really good for e.g. "patch that due to this bug" or "refactor this so it's decoupled from that feature", but not quite so good for describing arches in development. On the other hand, you can reference an issue in every commit message, and that issue can lead to the design document.