
Design
Tracking Small Coding Decisions
By Andrew Binstock, April 18, 2012
Most coding involves numerous small design decisions made on the fly. Tracking those decisions helps keep code clean and documentation up to date. It also says something about your design.Related Reading
More Insights
White Papers
More >>Webcasts
- Understanding Cyber Attacks on Remote Workers
- Rethinking Asset Management to Improve Enterprise Security

Currently we allow the following HTML tags in comments:
Single tags
These tags can be used alone and don't need an ending tag.
<br>
Defines a single line break
<hr>
Defines a horizontal line
Matching tags
These require an ending tag - e.g. <i>italic text</i>
<a>
Defines an anchor
<b>
Defines bold text
<big>
Defines big text
<blockquote>
Defines a long quotation
<caption>
Defines a table caption
<cite>
Defines a citation
<code>
Defines computer code text
<em>
Defines emphasized text
<fieldset>
Defines a border around elements in a form
<h1>
This is heading 1
<h2>
This is heading 2
<h3>
This is heading 3
<h4>
This is heading 4
<h5>
This is heading 5
<h6>
This is heading 6
<i>
Defines italic text
<p>
Defines a paragraph
<pre>
Defines preformatted text
<q>
Defines a short quotation
<samp>
Defines sample computer code text
<small>
Defines small text
<span>
Defines a section in a document
<s>
Defines strikethrough text
<strike>
Defines strikethrough text
<strong>
Defines strong text
<sub>
Defines subscripted text
<sup>
Defines superscripted text
<u>
Defines underlined text
Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.
![]() |
To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy. |
Unit tests record only what you decided to do, not what you chose not to do. They also don't record reasons for the decision. In fact, let's be strictly honest, all they capture is the specific implementation in code.
Is it not what you do with a unit-test, describe the capabilities of the code?
Good practice. Thanks. As to what are the better ways to do this... ugh, is that really a question?
I would follow up with the thought that the very low-level at which we find ourselves doing this (i do it repeatedly and voluminously inline with code...enterprise, vc, or home) is very much the "big design up front" ugliness at work. So we've been drawn to a "agile" perspective of the "minimal"; though many enterprise shops do not even require this much in the fight for time-to-market competitiveness. Obviously, ooops. Well imo there are many shades between BIG and small, and they are all rather unrelated to effectiveness and quality. Except that the developers and engineers that come after us already have, if you will, developed bias against some ways and are religious about others.
So the practice is best mentioned in passing perhaps; leave it not be seen as yet another idea from someone else, but an opportunity to get ahead of the pack. :-)
This is a great suggestion! Every now and then I look at my old code and wonder, why on earth have I done it this way? I even start re-coding, only to realize that other decisions have hidden undesirable consequences.
What is not clear is how to track the decisions in the most convenient and systematic way. Ideally, decision record should include a list of possible options, pro-s and contra-s for each, and the path taken. Perhaps it should also include an ID to make cross-references.
Where should the records be kept? Clearly, they should be tied with the source code and version control in some way. Keeping them in a separate Google document is not a good idea, because they will quickly go out of sync.
Perhaps, Doxygen comments is a good place for these records. I have not tried it myself, but a custom command can be created using \xrefitem to produce a separate Decisions section in the documentation.
Thank you for the article
Mikhail
Thank you for writing this article.
This sounds like a useful habit.