What's Happening?
Giles, the CTO for Europe, Middle East, and India at Thoughtworks, has conducted an experiment to explore the economic benefits of refactoring in software development. The experiment involved building a sophisticated application using agentic engineering,
primarily coded in Rust, with additional components in TypeScript and Terraform. The application, consisting of approximately 150,000 lines of code, was developed to support Giles' work. The focus of the experiment was on refactoring the data access layer, which had grown to over 17,000 lines in a single file. By applying a series of refactoring steps, Giles aimed to reduce the token consumption required for future changes. The results showed a significant reduction in input tokens from 159,564 to 27,360, representing an 83% saving.
Why It's Important?
The experiment highlights the potential cost savings and efficiency improvements that can be achieved through refactoring in software development. By reducing the token consumption required for changes, developers can lower the operational costs associated with maintaining and updating software applications. This is particularly relevant in the context of agentic engineering, where automated agents are used to perform coding tasks. The findings suggest that strategic refactoring can lead to long-term savings and improved performance, benefiting companies that rely on large-scale software systems. Additionally, the experiment underscores the importance of continuous evaluation and optimization in software development processes.
What's Next?
The experiment conducted by Giles is just the beginning of exploring the benefits of refactoring in agentic engineering. Future work could involve more complex changes, wider refactoring efforts, and continuous refactoring to identify additional savings. There is also potential to explore different refactoring approaches and their relative value. As the field of agentic engineering evolves, further research and experimentation could lead to new insights and best practices for optimizing software development processes. Companies may consider adopting similar refactoring strategies to enhance their software systems' efficiency and cost-effectiveness.
Beyond the Headlines
The experiment raises questions about the role of automated agents in software development and the potential for these agents to perform complex tasks with minimal human intervention. While the experiment demonstrated significant savings, it also highlighted the limitations of current agentic technologies, such as the need for human guidance in refactoring decisions. As technology advances, there may be opportunities to enhance the capabilities of automated agents, enabling them to perform more sophisticated refactoring tasks independently. This could lead to a shift in how software development is approached, with a greater emphasis on automation and efficiency.











