by softwaredoug · 1y ago · 0 comments
The real problem is the industry's inability to throwaway first solutions, so we introduce this (IMO inefficient) 'design doc' step as a safety mechanism
The main issue to me is exactly that we do throw away the prototype implementation.
Writing rich documentation for throwaway code is tedious, and at the early stages I see a split between the people that mostly read the doc and only glance over the code, those who almost ignore the docs and focus on the code, and some rare people actually looking at both and getting confused at the discrepancies ("you say you in your doc you store values in the remote database, but this code only writes to the local one, which one will stay ?")
Perhaps I'm just not good at docs, but doing code heavy prototypes with only very light and high level doc was way more efficient.
Then when we settle on one direction, I can freeze the main points in a separate documentation and rewrite the prototype in a more serious version.
Having a separate design docs also helps when the system components are split across many area. Having the doc even when it's a compact proposition standardizes the process and you never have to ask upfront if it will be needed or not.
A draft PR with rich documentation doesn't often communicate the "whys" and the "why nots" nearly as well as a well-written design document, or the high-level goals of a piece of code. It also is much harder to share with the product and business sides of a company which may be less comfortable with the idea of reading code.
A great design doc can reduce non-obvious problems to trivial and is usually written alongside a prototype (if the thing is simple enough).
I will give you that if you are instead competing with a poorly-written design document, a very well-documented PR may be a good alternative.