Developers spend most of their time figuring systems out
The oldest reference on the topic we know of dates back to 1979 in a book by Zelkowitz, Shaw, and Gannon entitled Principles of software engineering and design. It said that most of the development time was spent on maintenance (67%).
Granted, the book does not specify how the figure was obtained. Still, it was deemed an important enough problem to attract significant research attention since then.
So, how far are we now, more than 4 decades later?
Let’s look at a recent paper by Xia, Bao, Lo, Xing, Hassan, & Li entitled Measuring Program Comprehension: A Large-Scale Field Study with Professionals and published in IEEE Transactions on Software Engineering, 44, 951-976, 2018. This paper is quite interesting in that it describes in great details how the figures are obtained. And it says that Comprehension took on average ~58%.
Now, take a closer look at the results table.
In particular, take a look at the third column in the table: it says Navigation accounts for 24% of the effort, and that is considered separately from the Comprehension effort!
These observations are not isolated. Here are some others spread over several decades:
Minelli, Roberto and and, Andrea Mocci and Lanza, Michele. Proceedings of the 2015 IEEE 23rd International Conference on Program Comprehension 2015. I Know What You Did Last Summer: An Investigation of How Developers Spend Their Time
Quote: Program understanding is as expected the dominant activity, but as we see our analysis attributes to it even more importance than what the common knowledge suggests, reaching a value of roughly 70%.
Thomas D. LaToza, Gina Venolia, and Robert DeLine. Maintaining mental models: a study of developer work habits. In ICSE '06: Proceedings of the 28th International Conference on Software Engineering, p. 492—501, ACM. 2006.
Quote: 66% of developers stated that understanding the code is the biggest development problem; 82% stated that it takes a lot of effort to understand the existing code
Robert L. Glass. Frequently forgotten fundamental facts about software engineering. IEEE Software. Volume 18. Issue 3. 2001.
Quote: Maintenance typically consumes about 40 to 80 percent (60 percent average) of software costs.
Victor Basili. Evolving and Packaging Reading Technologies. In Journal Systems and Software 38(1) p. 3—12, 1997.
Quote: 50% effort spent in reading the code
So, after 4 decades, we can observe that not much has changed beside learning how to measure the “figuring out” time.
Well, that is the single largest expense we have. If we want to optimize anything in our discipline we should look at this part first. We talk often about how we build systems, but how often do you talk about how you spend the “figuring out" time? If we do not talk about it, it’s not explicit. If it’s not explicit, it does not get optimized.
If we do talk about how the “figuring out the system” time is spent, we notice that people spend it reading. In fact, as the above paper also shows, comprehension is essentially measured as reading! The two are considered as mostly synonymous.
So, how should we talk about how we figure the system out?
Given that not much happened for 4 decades, we should entertain the idea that maybe we should frame the problem differently.
This is where it gets interesting. So, why do developers read code? Because they want to figure the situation enough to know what to do next. The intent is important. This is decision making.
What is the alternative? Moldable Development.