Document Design Intent As A Programmer [DP2] [WHY]
Tip DP2
The second kind of intent that is important to document is your design intent as a programmer when writing the code. This is important for future maintenance programmers and can cover everything from the lowest to highest levels of design. Why is the code designed the way it is? If the answer isn’t easily available via other standard documentation for your team, make sure it’s documented.
See the following examples: