Introduction
Over the past 5 years at TribalScale, since introducing our code assessment service offering, it has been rare to see a codebase that scores higher than a level 2 on the TribalScale code Maturity scale. I’ve also talked to several technology leaders that laugh when chatting about testing. I must confess that in a former life at a product company, I too have been in the situation where adding a “skiptest=true” parameter to the build has been done to get the product out the door.
The debate over how much time to spend refactoring code and tests (we typically spend 20%) is something for another article, but it’s extremely easy to take shortcuts when pressure from stakeholders dictates to push out features that drive value.
Whether you’re a startup looking to stabilize your initial product or an established company aiming to optimize your development process, assessing your code’s maturity can provide valuable insights. This guide will help you analyze your codebase to determine its current level of maturity and provide steps to either refine or overhaul your code.
A chart illustrating the model steps that are described below in this blog
The Levels of Code Maturity
Level 1: Inconsistent / Chaos
At Level 1, your code is likely in a chaotic state, often seen in early-stage startups. Here are some common characteristics:
•
Unstructured Development:
Developers may take shortcuts to push out features quickly, often at the expense of code quality.
•
Inconsistent Architecture:
The lack of a unified architectural vision can lead to a fragmented codebase.
•
Skipping Unit Tests:
Testing is often overlooked in the rush to release features.
Challenges: Adding new features becomes increasingly difficult, and the codebase deteriorates further with each hastily added update.
Level 2: Defined Vision/Plan
Transitioning to Level 2 involves establishing a clear vision and plan for your software development process:
•
Defined Processes:
Best practices and architectural standards are chosen and documented.
•
Leadership Buy-in:
Technical and business leadership align on development standards and actively support their implementation.
•
Documentation:
Detailed documentation helps onboard new team members and maintains consistency.
Goal: Ensure everyone understands and follows the documented vision to guide development efforts.
Level 3: Processes in Place
At Level 3, the focus shifts to implementing and enforcing the defined processes:
•
Compliance:
New modules, features, and UI elements must adhere to established guidelines.
•
Code Reviews:
Peer reviews help maintain code quality.
•
Pre-commit Hooks and Linting:
Automated tools enforce code style, formatting, and quality standards before code commits.
•
Continuous Integration:
Automated tests run with each integration to catch errors early.
•
Crash Reporting Automation:
Bugs are automatically reported and assigned for resolution.
Outcome: A more stable and predictable development process with reduced errors in production.
Level 4: Measurable Metrics
Note: Level 4 is the furthest TribalScale can take you on this journey.
Level 4 introduces quantifiable metrics to assess and guide your development process:
•
Defining Goals:
Leadership sets numeric targets based on metrics from Level 3.
•
Crash Thresholds:
For example, fixing crashes that affect more than a specific number of users within a set timeframe.
•
Analytics:
Analyzing your data from Segment or Fullstory to drive new feature development.
Importance: Metrics provide a clear, objective measure of success and areas needing improvement.
Level 5: Optimizing/Continuous Improvement
Note: This may be a mythical level for some, but this is going to be the bread and butter for AI. Imagine a crowdsourced feature improvement textbox and submit button right on your application — essentially an application that builds itself based on user feedback.
At Level 5, the focus is on continuous improvement based on metrics:
•
Process Improvements:
Implementing changes to improve metrics with minimal disruption.
•
Feedback Loop:
Regularly review and adjust processes based on metric outcomes.
•
Developer Workflow:
Ensuring that improvements do not negatively impact developer productivity.
Objective: Achieve continuous, incremental improvements in both code quality and development efficiency.
Assessing Your Codebase
To determine your current level of code maturity, we follow these steps:
Step 1: Conduct a Code Review — Thoroughly review your codebase to identify areas of inconsistency and technical debt.
The biggest issues we see here are multiple architecture patterns in the code, keys committed to repos, poor Readme files, lack of tests (some have a testing framework in place, but then it stops at 1 or 2 tests written), files that are 1000’s of lines long.
Step 2: Evaluate Processes — Assess your current development processes against the characteristics of each maturity level.
Code Review processes can cause a lot of the issues here. Even just spending a 1 or 2 days to formalize gated check-ins, linting, pipelines can transform bad habits quickly. Personally, I would start here to shift your mindset.
Step 3: Gather Metrics — If possible, gather existing metrics to understand your current performance.
Understanding the parts of the application that are causing the most pain for your users, and equally the parts that are causing the most pain for the engineering team. It’s quick to add in a tool to start collecting this data if you don’t have anything in place.
Step 4: Identify Gaps — Determine where your current practices fall short of the desired maturity level.
What does it take to move from Level 1 to Level 2 or from Level 3 to Level 4, etc. Showing the value added in relation to the effort is the key to moving forward.
Making Improvements
Based on your assessment, you can decide whether to tweak your existing code and processes or explore re-writing.
It may only take a few days to correct your project trajectory — How many days have you wasted looking for defects in your code due to poor testing? I wish I had started tracking that metric throughout my career.
Spend a day or two and try out the following:
•
Gap analysis
: Don’t try to move your project from Level 1 right to Level 5. First decide if it’s quicker to re-write vs. update, especially if you reached that point in your software where you have 3 or more different architecture styles. Pick out 1 or 2 things to integrate into your process.
•
Automated Tools:
Invest in tools to automate testing, code style enforcement, and crash reporting. These are abundant. If you are trying to catch-up on testing, this can be extremely difficult to accomplish though due to Red, Green, Refactor- we can save this for another article.
•
Regular Reviews:
Establish regular code reviews and process assessments to catch issues early. As part of our process at TribalScale, we have regular architecture reviews, which are quite different from PR reviews. Reflect on your project — we do it every 3 weeks at a minimum.
To Sum Up
Improving the maturity of your codebase is an ongoing process that requires commitment from all levels of your org. By understanding your current maturity level and taking targeted steps to improve, you can ensure your codebase remains stable, scalable, and maintainable. Whether you need a complete overhaul or just a few tweaks, the key is to approach improvements systematically and consistently.
If you don’t know where to start, reach out and we can provide a comprehensive code assessment for you.