Discover how software developers are like archaeologists, and why understanding source code involves a lot more than digging.
According to a number of experienced programmers, developers spend the great majority of their time (75-80%) simply searching and understanding existing software, and the rest of their time actually modifying legacy software or developing new applications.
They are forced to spend so much time finding and comprehending code because current tools and techniques are not technically savvy – they don't help developers understand how the code works together within the systems they serve.
In fact, a recent blog post compared the source-code searching process to archeology. It's a reasonable analogy given that the tools developers use are only slightly more advanced than rudimentary shovels and brushes.
Why is software development – an activity that's driving incredible technological change – so far behind the curve in building tools that help programmers comprehend the code they work on.
Searching for ancient relics and specific lines of code are both complex processes.
An archeologist doesn't use a bulldozer and dig in random locations. She researches excavation sites and uses advanced technology, such as satellite imagery to find optimum exploration locales and ground-penetrating radar for mapping. Then she carefully and methodically removes topsoil while analyzing and records each artifact down to the smallest pottery shard.
Every relic she unearths builds her knowledge of the site, and the people and culture she's investigating. For example, the archaeologist may assemble a handful of pottery shards into a serving dish, which she studies alongside other artifacts to better understand an ancient culture's family meal rituals. She can easily share the dish with other scholars and store it for future analysis.
Each discovered artifact may also modify how she approaches the rest of the dig.
In software development, Professor Vaclav Rajlich asserts that the processes of searching and understanding code require two phases called concept location and impact analysis. Concept location involves finding the lines of code to be modified and the relevant but disjoined source surrounding it.
Impact analysis examines how a proposed modification will impact the entire application, including performance, stability, intent, and secondary consequences in distant modules. Poor or incomplete impact analysis can lead to more bugs.
In essence, a developer spends his time in active knowledge construction, building an integrated mental model so he understands how a system is constructed and its purpose and intended results. Only then can he be confident enough to make changes.
Errors logs, debuggers, and grepping assist developers in finding specific lines of code – his shards of pottery. But the developer must reconstruct the code into the mental models necessary for understanding the system. And these models remain locked away in the developer's mind, making them difficult to share and retrieve over time.
The greatest shovel ever invented
But it doesn’t have to be that way. Phase Change is developing assistive artificial intelligence (AI) that automatically analyzes source code and understands the human intent behind it, creating immersive application visualizations that resemble a programmer’s mental models. These visualizations can be stored, retrieved, and shared similar to how an archaeologist saves and shares the artifacts she assembles.
A developer will collaborate with our AI agent using natural language to locate source code and move quickly beyond simply identifying concept locations to performing comprehensive impact analysis. She will be aware of every effect her modifications bring about and work confidently with a rich understanding of the code and the application.
Because the goal isn't to search, it's to understand. Learn more at CodeCatalyst.ai.
Originally published on June 26, 2017, By Elizabeth Richards and Todd Erickson.
Elizabeth Richards is Phase Change's Director of Business Operations. You can reach her at firstname.lastname@example.org.
Todd Erickson is a Tech Writer with Phase Change. You can reach him at email@example.com.