We’ve all encountered decision trees at one time or another as a means to determine an answer based on a set of inputs. The problem with decision trees is that they are binary in nature. The answer is always yes or no.
But life is not binary. This is often best underlined by the classic joke of asking an architect what the right thing to do is, and you’ll get the answer ‘it depends‘. The art of being an architect is working out what the right trade-offs are when coming to a decision. This is fine, but to know all the factors (or trade-offs) that need to be considered requires a wealth of experience (a rare and expensive asset) or someone capturing these insights in a consumable manner that enables people who will understand how to use imparted wisdom, rather than try to blindly follow binary decisions.
This is where decision Matrices, or as I was introduced to them ‘Stress Tests’ – so called because the matrix is made up of a factor or ‘stressor’ are tested against one or more options. Each slot in the matrix can either be marked as yes/no or scored on the range (for example 1-5) on alignment to meeting the stressor. If you’re doing a product selection then the options are the different products. But equally the options could be an architectural pattern.
This is probably best illustrated. So the following Matrix looks at different programming languages against a range of different stressors. This isn’t a realistic case, but sufficient to help convey the idea. (The assessments in this matrix are not comprehensively researched, so feel free to argue)
|Single binary for multiple OS and architectures||5||5||4 1||1|
|Language evolves quickly to provide standardized libraries for common needs||5||5||4||3|
|Suitable for scripting and application development||42||5||4||1|
|Readily available skills||4||5||33||33|
- Ruby has several variants such as JRuby, Ruby with a C core – this has the potential to impact
- Use of Shebang or overlaying with Groovy makes Java more usable as a scripting language
- Not so commonly taught in educational settings which typically favor Python and Java
As you can see to help use the matrix we can add elaboration notes. To use the matrix we simply determine which stressors are most important or not and then score the different options. So if I wanted to use the matrix to determine which language is most suitable for developing a deployment utility then we know from the use case performance is less critical, portability is important, and skills should outweigh language evolution. Based on that the answer should resolve to Python failing that Java would be good enough.
While our question and its outcome is fairly obvious, in more nuanced situations the stress test gives several benefits:
- The decision process becomes transparent and easily communicated.
- The hard work is in developing the stressors and researching the different options in terms of how they fit with stressors.
- The matrix can be re-used, to help achieve other decisions. What if I was looking at the most suited solution for running data analytics that can maximize GPUs?
Through the use of the stress test we can translate the ‘it depends‘ to a more concrete but rationalized decision.