Analyze and understand your codebase like never before: Announcing code visualizations in the Moderne Platform

Sharon Power
November 27, 2023
Code visualization in the Moderne Platform

Key Takeaways

  • Moderne code visualizations empower developers with large-scale automated impact analysis.
  • Visualizations enable developers to reduce complex code data into a recognizable form that can convey code impacts to business leadership. This helps to prioritize and advocate for follow-on change.
  • Using visualizations, developers can estimate timelines for modernization efforts and migrations more accurately.

How often do you field questions like this from your business leaders: “What’s holding us back from migrating to the cloud? How can we modernize our codebase without disrupting operations? What will it cost? What resources do we need to dedicate to it? How many teams will need to participate?” 

You and your development team then start doing impact analysis to determine: “What code must change? What type of changes will we make? Who needs to be involved? What are the risks? What are the testing requirements?”

A large-scale impact analysis can take multiple experienced developers weeks or months of difficult, tedious work digging into the code. It takes so long that it’s typically outdated before it’s finished since code is always moving forward. It’s expensive. And the typical reward? Impact analysis paralysis and a failed migration or modernization effort.

Understanding your code and the effects of changes doesn’t have to be so hard. 

Today, we’re launching Moderne code visualizations, a new way for platform engineers and developers to analyze and understand complex information about code usage at scale. (See Figure 1.) Moderne code visualizations give real-time insights into relationships across your codebase. Now, you can confidently plan migrations, explain changes to business leadership, and easily track the progress of your migrations because you can quickly see the potential impacts across your codebase.

We’re excited to share Moderne visualizations with you.

Figure 1. Where to find visualizations in the Moderne Platform recipes

​​What are Moderne code visualizations?

Moderne code visualizations are graphical representations of your codebase consolidated from any number of repositories. They uniquely represent data tables produced when you run out-of-the-box or custom recipes on source code in the Moderne Platform

Visualizations are built from data tables through a Moderne integration with Jupyter Notebooks. A visualization can be a complex image that you can zoom in and out of to examine connections between nodes, or it can be as simple as a text-based data grid that you can filter or search. You can even create a custom recipe that defines the data table parameters and types of visualizations you need.

You decide which aspects of your codebase and its relationships you want to see—APIs, dependencies, services, database queries, and more—then create filters to view them. Visualizations help you make better decisions and collaborate on code changes more efficiently. Plus, you can estimate timelines for modernization efforts and migrations more accurately.

No doubt—our customers love the deep-level insights Moderne data tables provide. But seeing these relationships mapped out in vivid graphics that reveal the ebb and flow of your code's architecture takes things to a new level.

By weaving real-time visualizations into the fabric of Moderne, we've created a beacon through the fog, where clarity and insight into desired outcomes are just a few clicks away. You can access detailed views of software across repositories and teams, including: 

  • APIs and their call graphs
  • Distribution of dependency versions across repositories 
  • The composition of programming languages
  • Dependencies with security vulnerabilities
  • Every instance of a SQL operation across your applications
  • Finding relationships within mainframe codebases
  • The complete impact of Spring Boot migrations before you make them

Read on to see for yourself what Moderne visualizations can do.

Visualize API-to-API calls with detailed code graphs

Doing cross-repository impact analysis for API changes is critical when adding new features to business applications and during migrations and modernizations. You need to know which code and who will be impacted when you issue breaking changes. 

In today’s world, doing comprehensive impact analyses for every breaking API change is inconceivable. It’s too complex, time-consuming, and frequently cost-prohibitive. This is why developers are forced to spot-check versus doing a comprehensive audit. It’s also why changes continue to be checked in without proper up-front impact analysis. 

With visualizations in the Moderne Platform, this is no longer the case.

To illustrate, the “Find Call Graph” recipe allows you to see API-to-API calls in your codebase. It provides both a holistic visualization (see Figure 2) and an incredibly detailed, filterable data grid (see Figure 3) of which methods call other methods across your entire stack of libraries and services. You can also see cross-repository views. For example, if you have a class in one library and you want to know where that class, or even a method on that class, is being called from in all of your other libraries, you would run this recipe, and it would show you where that method is called from.

Figure 2. Visualization from “Find Call Graph” recipe in the Moderne Platform
Figure 3. Data grid from “Find Call Graph” recipe in the Moderne Platform

With this type of analysis, you could build automatic detection of breaking changes into your code review process. This makes impact analyses inexpensive and easy. And you’ll no longer need to roll the dice and see what breaks. You’ll know in advance and can plan for it.

View the distribution of dependency versions across repositories

There are times—particularly during code migrations—when you need to understand how well-aligned your dependency versions are across repositories. Sometimes dependencies get updated in one repo and not another, and the whole application breaks. This is especially true in the case of transitive dependencies, which are not visible through basic text searches. Dependency violin visualizations in the Moderne Platform can help you see all cross-repo dependencies, direct and transitive,  at a glance. 

The Moderne platform creates violin dependency usage plots from dependency insight recipes. These visualizations enable you to proportionately see the distribution of versions across repositories. In this example (see Figure 4), the gray density curves indicate the number of repositories running different versions of Jackson artifacts. You can see that most of the repositories are on version 2.15.3. You can also see that the Jackson core artifact has many repositories with older versions still in play. 

Figure 4. Visualization of Jackson artifact versions in use across a set of repositories

With Moderne violin visualizations, you can quickly see which dependency versions are aligned and which ones are lagging behind. You can then plan your next steps to upgrade or phase out old versions.

Dependency insight recipes currently available in the Moderne Platform include:

Discover the language composition of your organization’s codebase

The Moderne Platform can help you quickly comprehend the diversity of programming languages used within your organization. Our “Language Composition” creates a treemap diagram (see Figure 5) highlighting the proportionate use of languages across your codebase by repository.

Understanding which languages dominate the codebase is pivotal for identifying potential risk areas, especially if specific languages are becoming obsolete, unsupported, or are known to have more security issues. It’s also valuable for understanding migrations you need to plan for, planning code maintenance budgets, and determining which developer skillsets to hire for.

Seeing your codebase this way makes it easier for engineering leaders to advocate for the necessary investments to update or maintain portions of the codebase. It also allows you to allocate developer resources better, make training decisions, and hire in the most critical areas, ensuring that teams are skilled in the languages most prevalent in the codebase.

Figure 5. Language composition by repository visualization

Identify and automatically remediate security vulnerabilities

Moderne’s “Find and Fix Vulnerable Dependencies” recipe is a software composition analysis (SCA) capability that detects publicly disclosed vulnerabilities in your dependencies. It provides a visualization (see Figure 6) and a data table that allows you to see how critical, disruptive, and potentially time-consuming these security dependency updates will be to remediate. 

Figure 6. Dependency vulnerability profile chart

The data can be shared with management for visibility and used to prioritize actions for automated remediation, helping you focus on the most pressing vulnerabilities first. Fortunately, the recipe already automates updates for dependency patch releases. You simply review the pull request and can mass-commit the change anywhere it’s needed across your entire codebase. 

If a minor or major upgrade is required to reach the fixed version, this recipe will not make any changes. However, the data table lets you quickly see which recipes you must apply (or create) to affect minor or major library upgrades that will close the vulnerability and update the source code.

SQL operations: Discover what is in use by application 

As another example of how Moderne visualizations can simplify impact analysis, consider this data grid for SQL operation usage in code (see Figure 7). It helps you know what databases are in use and by which applications. Data grids like this one, while not graphic, allow you to quickly search and filter your code by table, operation, repository, organization, and more.

Figure 7. SQL operation usage in code

See relationships between COBOL libraries and services

Ground-breaking code visualization examples can be seen using Moderne’s “Find COBOL relationships” recipe. This recipe produces both a directed graph diagram (see Figures 8 and 9) for an aerial view of your codebase that shows relationships between different COBOL resources. It also produces a data grid (see Figure 10) with detail about the relationships, including COBOL sources, copybooks, link-edit cards, DB2 access, and others.

What makes this capability so exciting? It’s the first of its kind! There’s never been a tool that lets you visualize your mainframe code like this, enabling you to see and understand all the relationships. What’s more, Moderne delivers it in full fidelity and at speed. This allows you to keep visualizations continuously updated. The Moderne Platform can ingest an entire 25 million line codebase and produce a Lossless Semantic Tree (LST) in approximately four hours. You can then run recipes on the LST in minutes to generate data tables and visualizations that provide instant insight into your code and all of its dependencies. 

Figure 8. An overview of COBOL relationships in a mainframe codebase
Figure 9. A filtered view of COBOL relationships 
Figure 10. COBOL relationships data grid

Understand the complete impact of Spring Boot migrations before you make them 

A Sankey diagram (see Figure 11) produced using our “Migrate to Spring Boot 3.x” recipe illustrates which recipes will make the most changes to the codebase. It shows the most common changes and most significant areas of impact for a large migration. This helps you understand which areas of your codebase  may require additional scrutiny or have the most urgent need for change.

(And by the way, our Migrate to Spring Boot 3.x recipe is a composite of all the recipes needed to migrate your codebase to Spring Boot 3.1 automatically.)

Figure 11. Sankey diagram built from the “Migrate to Spring Boot 3.1” data table

Empower decision-making, then make auto-remediations to your codebase with confidence—and at scale

With Moderne visualizations and data tables, visual cues and detailed maps can now guide every move in your code. You can build compelling narratives to explain code impacts to business leadership. And you can pinpoint problems more effectively and efficiently. By clarifying the consequences of action—or inaction—these tools can be pivotal in securing the necessary commitment to maintain, improve, and evolve a codebase.

Once you understand the impact of changes to your code, the Moderne Platform’s auto-remediation capabilities enable you to make changes at scale. This frees your development teams from tedious tasks like eliminating technical debt so that you can gain back time and focus on feature developments that drive business innovation.

Let’s cut through complexity and usher in clarity that accelerates and improves every aspect of software development. We're building this future at Moderne, and we can't wait for you to see and experience it in action.

Contact Moderne for more information about how to get started with the Moderne Platform and visualizations.

Colorful, semi-transparent Moderne symbol breaking apart like a puzzleColorful, semi-transparent Moderne symbol breaking apart like a puzzleColorful, semi-transparent Moderne symbol breaking apart like a puzzle

Back to Blog

Colorful, semi-transparent Moderne symbol breaking apart like a puzzleColorful, semi-transparent Moderne symbol breaking apart like a puzzleColorful, semi-transparent Moderne symbol breaking apart like a puzzle

Back to Engineering Blog