Hello again!
In our last lesson, we explored our first potential project theme by defining flaky tests and understanding their damaging impact on CI/CD pipelines. We saw how unreliable tests can erode trust and slow down development.
Today, we'll dive into the second major theme: technical debt. This lesson is designed to help you define technical debt and learn to identify its common indicators in a codebase. Understanding what technical debt is and where it hides is the first step toward building a tool that can help manage it, which is one of the project ideas we're exploring.
Let's get started.
1. What is Technical Debt?
The term "technical debt" is a powerful metaphor. Just like financial debt, it involves taking a shortcut now that you'll have to "repay" with interest later. In software, this means choosing an easy, short-term solution that will likely create extra rework and slow down future development.
To get a solid introduction to this concept, let's watch a video that explains it clearly.
Everything You NEED to Know About TECH DEBT
This video from ForrestKnight provides an excellent and engaging explanation of technical debt, using the financial debt analogy and introducing a foundational framework for classifying it.
Watch the first 1 minute and 17 seconds (00:00 - 01:17). Pay close attention to the definition of technical debt and Martin Fowler's four quadrants, which help classify the intent behind the debt.
As the video explained, technical debt isn't always a result of bad programming. It can be a deliberate, strategic decision. Martin Fowler's quadrants help us distinguish between:
- Prudent debt: Taken on knowingly to meet a deadline. ("We must ship now and will deal with the consequences.")
- Reckless debt: Taken on without regard for the consequences. ("We don't have time for design.")
- Inadvertent debt: Accrued unintentionally, often through learning. ("Now we know how we should have done it.")
For a more formal definition and to understand its origins, let's turn to a short reading.
What Is Technical Debt? | JetBrains Qodana
The article "What Is Technical Debt?" from JetBrains Qodana offers a concise, written definition that complements the video.
Please read the first two sections of the article, "What is Technical Debt?" and "Defining technical debt". This will reinforce the core concept and its importance in Agile development.
The "Interest" on Technical Debt
The analogy to financial debt is most powerful when we consider the concept of "interest." In software, interest isn't money; it's time and effort. Every time developers have to work with a piece of code burdened by debt, they pay an interest tax. This tax comes in the form of:
- Slower development of new features.
- Increased time spent on debugging.
- Higher risk of introducing new bugs.
- Decreased team morale and frustration.
Let's return to the ForrestKnight video to see a breakdown of this impact.
Everything You NEED to Know About TECH DEBT
This segment of the video quantifies the 'interest' of technical debt, highlighting its significant impact on developer time and IT budgets.
Watch the segment from 01:12 to 02:19. Notice the statistics on how much development time can be consumed by dealing with technical debt.
The key takeaway is that undealt-with debt compounds. What starts as a small shortcut can grow into a major roadblock that consumes a significant portion of your team's capacity.
2. How to Identify Technical Debt
Now for the most practical part of our lesson: how do you find technical debt? You can't fix what you can't find. Technical debt manifests in many ways, from obvious "code smells" to subtle patterns in your development process.
Types of Technical Debt
It's helpful to categorize technical debt to know what you're looking for. A messy function is different from outdated documentation, but both represent a form of debt.

The JetBrains Qodana article you looked at earlier provides a more detailed breakdown of these types.
What Is Technical Debt? | JetBrains Qodana
Let's review the JetBrains Qodana article to see concrete examples for each type of technical debt.
Read the section titled "Types of technical debt". For each type (e.g., Design debt, Implementation debt), focus on understanding the examples provided, like "Monolithic architecture" or "Spaghetti code".
Indicator 1: Code Smells
The most direct indicators of technical debt are found within the source code itself. These are known as code smells. A code smell isn't a bug—the code works—but it suggests a deeper problem in the design that makes it hard to maintain or understand.
Your experience in software development means you've likely encountered many of these before, such as:
- Duplicate Code: The same logic copied and pasted in multiple places.
- Long Functions/Classes: A single function or class trying to do too many things.
- Mysterious Names: Vague variable or function names like
dataorprocess_stuff(). - Tight Coupling: Components that are so interdependent that a change in one breaks others.
Let's watch a video that explains these and other common code smells.
The video "What is Code Smell?" by Telusko offers a great tour of common code smells that are direct signals of implementation debt.
Watch the segments from 01:44 to 02:39 to get the definition, and then from 03:21 to 08:47 for a detailed breakdown of various code smells. As you watch, think about which of these you've seen in projects you've worked on.
Indicator 2: Quantitative Metrics
While code smells are often found through manual review, we can also use quantitative metrics to flag potential technical debt hotspots automatically. This is where the opportunity for an ML-powered tool really begins to take shape.
Common metrics used to indicate debt include:
- Code Complexity: Measures how many decision paths exist in a function. High complexity often means the code is hard to test and understand. Cyclomatic Complexity is a formal measure of this.
- Code Churn / Rework: How frequently a file is changed. If a file is constantly being modified, it might be a sign of unstable requirements or a poor underlying design.
- Defect Density: The number of bugs found per thousand lines of code. A high density in a particular module points to underlying quality issues.
- Low Code Coverage: The percentage of code not covered by automated tests. Untested code is a risk and represents testing debt.
The following resources provide excellent detail on these metrics.
Everything You NEED to Know About TECH DEBT
Let's revisit the ForrestKnight video, which introduces several of these key metrics in a very accessible way.
Watch the segment from 13:17 to 14:37 (the part of the section about other points of tracking). The speaker discusses cyclomatic complexity, test coverage, lead time, and code churn as debt indicators.
To get a more comprehensive list, let's consult an article that focuses specifically on metrics.
7 Essential Metrics to Measure Tech Debt - Waydev
This article from Waydev, "7 Essential Metrics to Measure Tech Debt", provides a list of concrete, measurable indicators. This is highly relevant for thinking about what features you might use in an ML model.
Read the section titled "Unlock the Power of Measurement: Discover the 7 Key Metrics for Assessing and Managing Tech Debt". Pay attention to the definitions of each metric, as these could become the features for a debt prioritization model.
Indicator 3: Process and Team-Based Indicators
Finally, technical debt isn't just visible in code or metrics; it's visible in how your team works. These are qualitative signals that something is wrong:
- Fear of Change: Developers are hesitant to work on a certain part of the codebase because it's fragile and they're afraid of breaking it.
- Onboarding Difficulty: New team members take an unusually long time to become productive because the codebase is too complex or poorly documented.
- Rising Bug Count: The number of new bugs reported starts to increase, even when the pace of development is steady.
- Slowing Velocity: Features that used to take days now take weeks.

Connecting to Your Goal
The ultimate goal of identifying technical debt isn't just to list problems, but to prioritize them. Not all debt is created equal. A complex function in a core payment service is more critical to fix than messy code in a rarely used admin report.
This is where your project idea comes in. An ML-based tool could ingest many of the indicators we've discussed (code churn, complexity, author count, bug history) and learn to predict which pieces of debt are most "expensive"—that is, which ones are having the biggest negative impact on development.
The ForrestKnight video briefly touched on this prioritization aspect.
Everything You NEED to Know About TECH DEBT
This final clip introduces simple models for prioritizing debt, which is the problem your potential project would aim to solve.
Watch from 12:30 to 13:17 to see the 'three-factor model' and then from 14:54 to 15:24 for the 'PAID' model. These are simple heuristics that an ML model could learn and automate on a large scale.
Key Takeaways
- Technical Debt is the implied cost of rework caused by choosing an easy solution now instead of using a better approach that would take longer.
- It's not always bad; it can be a strategic trade-off. However, it accrues "interest" in the form of reduced productivity, increased bugs, and lower morale.
- Technical debt can be identified through several key indicators:
- Code Smells: Patterns in code that suggest design problems (e.g., duplicate code, long methods).
- Quantitative Metrics: Measurable data points like code complexity, code churn, and defect density.
- Process Indicators: Team-level observations like developer fear of a codebase or slowing velocity.
You now have a solid understanding of our second project theme. You can see how identifying and prioritizing technical debt is a perfect problem to tackle with data analysis and machine learning.
In the next lesson, we'll explore our third and final project area: how ML can be used to automatically generate test cases, and how this differs from traditional test creation methods. This will complete your overview and prepare you to choose your project.