Skip to Content
This article has been translated from Japanese using AI
Read in Japanese
This article is in the Public Domain (CC0). Feel free to use it freely. CC0 1.0 Universal

Development-Driven Development and Refactoring-Driven Testing

Development is about repeatedly creating something new and useful.

When we hear "development," new product development often comes to mind. This differs from manufacturing individual products; it implies creating the product's blueprints or molds, so to speak.

Therefore, the designs and molds created through new product development are repeatedly used in factories to mass-produce identical products.

There are also uses of the word "development" such as developing individual capabilities, or developing society and a nation. These imply not merely an increase in what is possessed, but rather the ability to repeatedly use and benefit from the developed capabilities.

While the economic power of individuals and societies may fluctuate with economic conditions, developed capabilities are generally permanent.

Even if they diminish, it is seen as a decline, not a fluctuation like economic prosperity.

Furthermore, there is the development of technology and knowledge. Unlike the capabilities of individuals or specific societies, these have the characteristic of being easily shared.

And among the outcomes of these developments—products, capabilities, knowledge, and technologies—some can be useful for subsequent development.

By developing such useful outcomes, the scope of development expands, and efficiency and quality also improve.

AI-Driven Software Development

Generally, development required considerable time and effort. Especially as society advances and various things become more sophisticated, creating new things becomes increasingly difficult.

However, with the advent of generative AI, this situation is changing. Currently, software development is undergoing a dramatic transformation, benefiting from the high programming capabilities of generative AI.

A future vision where autonomous agents based on generative AI become central to software development as software engineers is already becoming a reality.

We are currently in a transitional period. While we cannot fully entrust development to generative AI, skillfully utilizing generative AI can powerfully advance software development.

This is referred to as AI-Driven Software Development.

Development-Driven Development

When generative AI streamlines software development, it can not only make the development of the final target software more efficient but also the development of software that aids in development itself.

As mentioned earlier, development-aiding outcomes expand the scope of development and contribute to increased efficiency and quality. Moreover, if created effectively, they can be reused in other development projects.

Therefore, by developing useful software during the course of software development, overall efficiency can ultimately be increased, and these assets can be leveraged for future development as well.

Traditionally, developing such development-aiding software was common practice in the field, but it required its own development time and effort, necessitating careful assessment and targeted implementation.

By utilizing generative AI, simple software to automate small, impromptu tasks can be created quickly. For tasks with clear processes, generative AI can generate accurate programs with almost no errors.

This makes it easier than ever to develop software that aids development during software development.

And upon deeper reflection, a development style emerges where useful tools are continuously developed during the development process, thereby transforming the very method of development itself.

We will call this Development-Driven Development.

To practice Development-Driven Development, it requires the habit of objectively observing one's own software development to consider which parts can be delegated to software and which parts only humans can do, along with the skill to develop such development-aiding software.

Furthermore, generative AI can be integrated into these software tools. By embedding it within the software, unlike a standalone generative AI agent, the scope of processing can be narrowed and a clear path defined to some extent.

While AI agents can achieve similar results through prompting, software integrating generative AI can more easily increase accuracy by combining both programs and prompts.

If Development-Driven Development can be practiced, the second project will see improvements in both quality and cost compared to the first. Furthermore, with each subsequent project—the third, fourth, and so on—improvements will continue to accrue.

This is entirely different from merely developing software using generative AI. A significant gap will emerge over time between teams that simply master generative AI tools and teams that practice Development-Driven Development.

Refactoring-Driven Test

There is a concept called Test-Driven Development (TDD), which involves first designing tests based on specifications and then developing software to pass those tests.

Initially, I also thought that with generative AI making it easy to develop test programs for automated testing, Test-Driven Development might be practicable.

However, as I began to practice Development-Driven Development, I came to believe that the approach of designing tests before implementation was not always suitable.

Especially for software like web applications, which involve subjective aspects such as usability and visual design that one can experience by interacting with, I realized that actually running and interacting with the software takes precedence over detailed testing.

This is because if there are significant dissatisfactions at the UI/UX level upon interaction, there is a possibility that fundamental parts such as the framework, basic architecture, data model, or use cases might need to be changed.

In my current personal software development project, I also noticed issues with functional flexibility and performance, leading me to swap out two frameworks for different ones.

There was also a part with poor memory usage efficiency, which required a complete overhaul of the processing.

It is at these refactoring junctures that testing first becomes a conscious consideration.

If this is during the early stages of development, or if features and specifications are going to change significantly anyway, tests might not be necessary.

However, if development is already well underway and there are many items to check, tests will likely be needed during refactoring to ensure there are no functional deficiencies or omissions.

Therefore, the idea of creating test programs at the point when development has progressed to a certain extent and refactoring becomes necessary is not a bad one.

At this point, the key is not to create tests for all code, but to focus tests on mature parts that are unlikely to change much in the future, leaving the still-fluid parts without automated tests.

This can be called Refactoring-Driven Test.

Conclusion

Generative AI is dramatically transforming software development.

In previous articles, I wrote about the importance of aiming to become an Omnidirectional Engineer, who can go beyond the traditional full-stack engineer role to develop omnidirectional systems that combine various domains, infrastructure, and execution environments.

I also wrote an article suggesting that we are entering an era of Experience & Behavior-Driven Development, which focuses on enhancing user experience through software behavior, rather than the traditional software development approach of aligning specifications with implementation.

Development-Driven Development and Refactoring-Driven Test are precisely the approaches that will lead us towards these new horizons in software development.