charting enterprise application complexity

frequently asked questions



  1. General Questions

    1. What is Complexity Map?

      Complexity Map is a tool to visualize technical debt in Java applications. It does so by combining weighted and aggregated static analysis with human input.

      Complexity Map's current features are:

      • flexible architecture to support numerous static or dynamic code measurement tools
      • displays code violations in individual or aggregated layers
      • zoomable interface allows quick analysis of large scale enterprise codebases
      • violations and metrics can be aggregated along various axes
      • code analysis results are weighted and summarized to calculate a total 'complexity torque'
      • drill down to individual finding-level (and sideways from this level) for detailed analysis
      • layers of findings can be saved for historical trend analyses
    2. What is accidental complexity or technical debt?

      Please read what Martin Fowler wrote:

      "Imagine you have a piece of functionality that you need to add to your system. You see two ways to do it, one is quick to do but is messy - you are sure that it will make further changes harder in the future. The other results in a cleaner design, but will take longer to put in place.

      Technical Debt is a wonderful metaphor developed by Ward Cunningham to help us think about this problem. In this metaphor, doing things the quick and dirty way sets us up with a technical debt, which is similar to a financial debt. Like a financial debt, the technical debt incurs interest payments, which come in the form of the extra effort that we have to do in future development because of the quick and dirty design choice. We can choose to continue paying the interest, or we can pay down the principal by refactoring the quick and dirty design into the better design. Although it costs to pay down the principal, we gain by reduced interest payments in the future."

      See Martin Fowler's bliki or Wikipedia's entry for accidental complexity for more information.

    3. What is refactoring?

      As Martin Fowler described on

      "Refactoring is a disciplined technique for restructuring an existing body of code,
      altering its internal structure without changing its external behavior."

      So when refactoring, the functionality of the application does not change, but the internal structure improves, which makes room for adding new functionality or makes it easier to fix issues at a later stage. Complexity Map indicates which areas of the application contain too much accidental complexity and thus are a candidate for refactoring.

    4. How is technical debt measured?

      Determining software quality in general and measuring technical debt in particular is non-trivial. A lot of things need to be taken into account, such as:

      • software architecture and design
      • frameworks that are used
      • coding standards
      • system functionality, tests
      • etc.

      Complexity Map is used to visualize accidental complexity, so it uses the following definition:

      Anything in which the actual application deviates from an (hypothetical) ideal application.

      Although it is tempting to reject this definition, since it impossible to sharply define the 'ideal' application, this is beyond the point. The Complexity Map is not so much a tool for determining an exact position with regard to application complexity, but much more about showing the proper direction in which to guide code changes. It is a tool which helps to grow the maturity of developers and their development organization.

      The Complexity Map application uses static code analysis to look at various key metrics to determine whether the application's stats are within acceptable bounds. Some examples of these metrics are:

      • code complexity (cyclomatic complexity, npath complexity, etc.)
      • code size violations (e.g. maximum method length, maximum file lengh)
      • design-style violations
      • explicit coding errors (e.g. equals/hashCode contracts, etc.)

      For an extensive list of code-metrics, please see the PMD rulesets.

    5. How are the measurements aggregated?

      Findings from various metrics are all incorporated in one model where weight is attributed to indicate that some violations are more serious than others. The weighted layers can be aggregated into one summarized picture of the application's complexity. The Complexity Map application allows the sensivitity of the visualization to be modified on the fly, allowing sensitivity-analysis in case of multiple areas with the same color.

      Note that the Complexity Map needs to be tailored to an organization, since it needs to configured to fit to the maturity-level of the code and the developers working on this code.

    6. What codebases were used to generate the screenshots?

      Codebases from various commercial applications (which are in production at this time) were used for generating the Complexity Map screenshots. To protect the interests of the organisations that have collaborated, the examples have been made anonymous.

  2. Using the Complexity Map

    1. What skills are necessary to use Complexity Map application?

      Although it's core functionality has been substantially tested, the Complexity Map UI is not ready for end-user use. As a consequence, Complexity Map is currently only available as a service. For more information, please contact our staff.

    2. What level of technical understanding is necessary to read a Complexity Map diagram?

      Although it is possible to drill-down to the actual findings and use a development-environment and directly look at the code which triggered a certain finding, the traffic-light visualization makes it very easy for non-technical people to keep a finger on the development pulse from an aggregated perspective.

    3. Will I not get many red areas when I start using the Complexity Map?

      It is likely that when initially deploying a code-analysis tool, a significant number of warnings and errors are generated, even for a medium-sized application. Complexity Map helps to prioritize by indicating a limited number of top priority issues first. When these have been solved, Complexity Map will allow the bar to be raised and indicate another limited number of issues to be tackled.

    4. How can I have a Complexity Map diagram created for my applications?

      Complexity Map is currently only available as a service (either online or offline, as part of consulting), please contact our staff for information.

  3. Technical Questions

    1. How was the Complexity Map visualization created?

      Complexity Map uses the superb Prefuse infovis library for the visualization of the treemaps. For more information, see the Prefuse Manual. Many thanks and kudos to Jeff Heer. The positioned treemap was developed as part of the Complexity Map development.

    2. How does Complexity Map aggregate measurements?

      Complexity Map uses a special algorithm to calculate the 'complexity torque' for each of the metric-layers. Violations of various gravity are weighted and aggregated to a total per context and layer. In the summary-view, a selection of layers can be combined to create one integrated visualization.

    3. Can the Complexity Map engine be used to visualize other data?

      Yes, with limited work, Complexity Map can be used to display and analyze any tree-based dataset. Don't hesitate to get in touch if you think of an interesting application.

  4. Miscellaneous Questions

    1. I have a great idea for a new feature, could you add ...?

      Don't hesitate to send in your ideas. It would be great if you could help development.

    2. Can I help develop to the Complexity Map?

      Please send a brief email describing your qualifications.

    3. Is the Complexity Map available under license?

      Yes, please contact our staff for more information.

    4. Is there anyone you would like to thank?

      The following people have helped make development of the Complexity Map possible:

In case you have a question which is not in this list, please don't hesitate to send it by email.