Dec 2, 2026
How to Measure Software System Complexity (Part 2)
Part two of a series on software complexity: mapping the factors across the full lifecycle — requirements research, development, delivery, and operations — and quantifying complexity along the dimensions of time, space, and cost, plus its dynamism, fragility, transitivity, and equivalence.
1. Background
The previous article, How to Measure Software System Complexity (Part 1), focused on the origins and manifestations of software complexity from various perspectives. This article will delve deeper into specific metrics that form complexity, categorizing them by different dimensions.
One reason for this is to make software complexity more tangible and enable software developers to have a clearer and more comprehensive understanding of it.
2. What Factors Contribute to Complexity
Here we look at the entire lifecycle of software development to identify which factors contribute to complexity during each phase.
2.1 Requirements Research Phase
2.1.1 Requirements and Policy Environment
Many complex requirements are closely tied to policy environments. For example, if certain industry policies prohibit a business activity, then even overcoming technical challenges won’t allow us to proceed because we can’t get the necessary users. Thus, based on policy guidance, complexity is reflected in terms of support, prohibition, or changes required by policy.
2.1.2 Requirements and Technical Development Level
Often, our innovative requirements may be achievable in the future but are currently unfeasible due to technological and productivity constraints. For instance, controlling a satellite landing or rocket launches were impossible before computers existed. Therefore, how we translate real-world requirements into technical solutions is a manifestation of complexity. From a technical perspective, software development involves programming languages, development environments, required software toolkits, and network infrastructure. On the hardware side, it includes servers, disks, memory, and CPUs.
2.1.3 Requirements Research Implementation
For product managers in different companies and industries, their roles can vary from essential to non-existent. When implementing requirements, we need documentation and people to articulate the details of the requirements and related stakeholders, as well as non-functional needs. Thus, complexity isn’t confined solely to code but also manifests in documents.
2.2 Requirements Development Phase
2.2.1 Development and Testing Process
Even during development and testing phases, there are factors that contribute to complexity, such as bugs. Changes in requirements can lead to rework, while different technology stacks and implementation strategies affect the matching of demands and delivery efficiency. Thus, both technical aspects and requirements significantly influence these processes.
2.2.2 Development Team and Division of Labor
Software development has a unique phenomenon: a complex software might be developed by one person, but this is rare in fields like construction. When multiple people are involved, human factors can introduce complexity, such as the skill levels of team members, the direction of development, and cross-functional collaboration across different regions. These factors may not seem directly related to complexity, but they can lead to failed software development outcomes due to these reasons. Communication within teams is also a significant factor contributing to complexity.
2.2.3 Software Engineering and Architecture
Many discussions about the complexity of software engineering focus on code modules themselves, including architecture and coupling relationships. However, this series aims to explore the broader scope of software engineering development, which includes various dimensions such as requirements, design, implementation, testing, deployment, and maintenance.
Here, we won’t delve into mathematical formulas based on coupling or code associations but will use statistical methods to analyze the complexity of software engineering modules. Metrics can include lines of code, number of files, methods, modules, dependent modules (components, downstream services), dependent software (middleware, development tools, container software), API interfaces, and architectural elements.
2.3 Requirements Delivery Phase
In the delivery phase, different tools and processes are required for systems of varying domains and scales. Thus, complexity can also manifest in the delivery process, especially for large distributed websites. Concepts like BAAS, IAAS, SAAS, PAAS have gained popularity, and their impact on complexity during the delivery phase varies.
2.4 Requirements Maintenance Phase
The maintenance phase includes normal software upkeep. Once a system goes offline, its complexity within that system disappears, but overall complexity may still persist. In the digital transformation era, legacy systems face challenges, with decisions about cloud migration or purchasing services discussed in the maintenance phase. There are also scenarios where systems are independently maintained and iterated upon.
The complexity during this phase appears relatively stable, but changes such as personnel turnover or software infrastructure updates can affect it. Other quantifiable factors include the number of maintenance personnel, time required to fix a feature or bug, and hardware resources needed.
These metrics seem related to engineering efficiency or development productivity, but they are manifestations of complexity. The relationship between complexity and development productivity will be discussed later in more detail.
Many people complain about maintaining legacy systems because there is no effective methodology for handling them, and their complexity frequently changes. This requires significant effort to combat complexity, leading to a desire to start over from scratch.
2.5 Mind Map of Complexity Factors

3. Quantitative Dimensions of Complexity
After much thought, I have identified several dimensions that contribute to complexity because there are too many factors involved. Summarizing these dimensions will help us better understand the overall complexity of a large system and facilitate its measurement.
Here, I borrow two common languages from algorithms: time complexity and space complexity. For our purposes, they refer to the overall complexity in terms of both time and space for the entire software development lifecycle. Of course, when measuring software complexity, we also consider factors such as business benefits and costs. Therefore, cost complexity is listed separately.
3.1 Time Complexity
Time complexity primarily reflects the length of the software development lifecycle. The longer a project takes, the more complex it becomes. For example, even if a change in requirements for a programmer seems simple, the time spent on requirement analysis and release can increase complexity. Thus, different difficulty levels of requirements often lead to different solutions, such as simple bug fixes, which reduce time complexity.
Other factors also fall under this category, including the time taken for planning, reviewing test cases, and integrating them. If a project changes direction or is paused, the total time spent represents part of the software system’s complexity.
3.2 Space Complexity
Space complexity isn’t just about server numbers and configurations; it encompasses more factors such as team size, cross-regional teams, and scale metrics for the software system. From an overall development perspective, higher space complexity means greater complexity in the software system. For example, a typical e-commerce website’s operation relies on hardware support, human resources, and software components that are interrelated, making it complex from both business and technical perspectives.
In essence, if a company is asked to replicate Taobao, programmers feel challenged because many of Taobao’s technologies require team collaboration and cross-departmental efforts. It would be nearly impossible for one person to complete the entire system.
3.3 Cost Complexity
Now let’s discuss another dimension of complexity: why companies hire large numbers of developers is that it provides a good return on investment, with higher productivity leading to lower costs. Once software systems are operational and generate better benefits, they can provide profits for the company, increasing developer salaries.
Other factors include policy considerations—whether policies allow or prohibit certain activities, which can affect design complexity in areas like public welfare and security. For new systems, policy impacts may not be significant, but existing systems that need to adapt due to policy changes will experience increased complexity.
Factors such as software patent licensing and technology authorization are also included under cost complexity. A more detailed mind map of the complexity dimensions will follow.
3.4 Summary
3.4.1 Measurement Scales for Complexity
The three dimensions outlined above provide a basic understanding of how to categorize complexity, but we haven’t yet found a universal or unified scale to measure it. If we consider cost complexity as decomposable into time and space complexities, then space complexity can be converted into time complexity in certain scenarios.
Thus, one could argue that the length of time spent on software development can serve as a proxy for its complexity. To some extent, this is reasonable. We can use time as a flexible scale to measure complexity.
If we break down each dimension separately, the measurement scales might include time, quantity (scale), and money.
Often, we focus more on time and how to better assess it. Here, we can consider the entire software development lifecycle as a large timescale, evaluating its complexity in different phases using units like hours, days, weeks, or months.
3.4.2 Mind Map of Quantitative Dimensions

4. Characteristics of Complexity
Through the analysis and discussion in this article, we can feel that complexity has some hidden properties. However, I am not a mathematician or an expert in software engineering, so here we will only discuss the characteristics or features of complexity without defining it formally.
4.1 Dynamism
Over the past year, I’ve joined many WeChat groups and discussed complexity with different friends and colleagues. One clear characteristic of complexity is its dynamism. Some people believe that complexity is dynamically conserved because it has both objective and subjective aspects, making dynamic conservation a reasonable concept.
4.2 Fragility
The fragility of software complexity refers to the possibility that software can be replaced at any time. Thus, discussing the complexity of our software objects becomes meaningless when business operations cease or due to changes in software. However, this also reflects how requirements change and are mapped to different software components or systems.
4.3 Transitivity
In mathematics, there’s a law called commutativity: (a + b = b + a). Similarly, when measuring complexity factors, we often prepare alternatives or modifications that can increase the complexity of other factors. For example, over-engineering or premature optimization might seem beneficial but can lead to problems in systems with high stability requirements.
4.4 Correlation (Equivalent Substitution)
From the characteristic described in 4.3, we can use correlation for more precise measurements when simplifying complexity. For instance, adding people during iterations can increase efficiency and shorten delivery times, so additional personnel can be negatively correlated with time. This allows us to observe and measure the mutual influence of different factors more precisely.
5. Conclusion
This article analyzes related factors contributing to software complexity throughout its lifecycle and attempts to quantify these dimensions. During this process, we also discovered some properties that reflect in the software’s complexity. The next articles will delve deeper into the quantification of complexity and provide a related model for measurement.
Next in the series: How to Measure Software System Complexity (Part 3)
Comments
Comments are powered by GitHub Discussions. Sign in with GitHub to join the discussion.