The CodeMRI® ROI tool is a scenario analysis that can help determine the most cost-efficient way to refactor a codebase given a scenario or set of scenarios. For the ROI tool, the different scenarios available are:

  1. Reduce code complexity by reducing the McCabe Complexity score.

  2. Reduce technical health complexity by reducing the size of any Cores.

  3. Both reduce code and technical health complexity.

Initial Set-up

In order to create the scenario analysis, two pieces of information are needed to calculate the Return on Investment information: the Preferences and the Scenarios.

Preferences

First, a set of Preferences should be filled in. The different Preference options are:

The default Silverthread values are filled in, however, this may differ for each organization. These values should be updated to properly tune results to your organization.

In Excel, this is done on the Preferences tab.

Figure 1. The Preferences tab of the Excel Return on Investment (ROI) report.

On the Web version, it is the top half of the form submittal when first entering the ROI.

Figure 2. The form for submitting information to create a Return on Investment report through the Web.

Note that on the Web version, all Preference values must be a positive integer greater than 1. The Yearly code turnover and Interest rate for capitalization fields are considered percentages, and that will be taken into account on submittal. So, please type in 25 for a value of 25%.

Scenario Analysis

The next set of information to fill out are the possible scenarios to evaluate. For the Web, this is the second half of the form as seen in Figure 2 above.

In Excel, this is done at the top of the CodeMRI® Refactoring ROI tab.

Figure 3. The CodeMRI® Refactoring ROI tab from the Return on Investment report showing the Refactoring Initiative steps.

The Refactoring Initiative section provides the ability to do one or more scenarios, and each scenario is a row of four sections that need to be filled out: Area, Name, Target Code Quality, Target Design Quality. The target code and design quality values are what the goals are for the end state of the scenario analysis.

Please note that if more than one scenario is filled in, then the scenarios are evaluated together.

Excel allows for five scenarios, the Web does not have a limit. All five scenarios do not need to be filled out in Excel, the options are just available. On the Web, please press the plus button at the end of the scenario row in order to add another scenario, if desired.

Area

The area field is the definition of what part of the codebase should be included for this specific scenario. The available options are:

Name

The name field further defines of the Area field.

Target Code Quality

The target code quality field defines what level of McCabe complexity is desired for that Area/Name combination. Silverthread defines the following for McCabe complexity:

Due to this, the target code quality field has the following available options:

Target Design Quality

The target design quality field defines what level of Core reduction is desired for the Area/Name combination. The following options are available:

Note that the ROI tool does not say how to reduce the size of a core. For one possibility on doing so, please see the Technical Health Improvement Plan, which is also described in the CodeMRI® Care User’s Guide, https://silverthread.atlassian.net/wiki/spaces/CKB/pages/961773820/CodeMRI+Care+User+s+Guide#CodeMRI%C2%AECareUser%27sGuide-ImprovingTechnicalHealth .

Results

Once the preferences and scenarios are set, calculations are performed and results are displayed. In Excel, as seen in Figure 3, the results are at the bottom of the CodeMRI® Refactoring ROI tab. On the Web, the results are displayed on a new page.

Figure 4. The ROI results from the Web.

Both results show three sets of results:

Estimated Outcomes

There are seven outcomes given in the results: