Content area
Writing software is hard; reviewing, changing, or adapting old software is even more challenging. A bad design can quickly lead to rotting software, with each modification heading to a rigid and fragile codebase. Evolution may become extremely costly if we do not refactor code at the right time.
Often, developers choose to refactor too late when most symptoms are already impossible to ignore. They check their source code, looking for code smells and the most appropriate refactorings, trying to bring sanity into their design. They then realize they need help from specialized, overly complex, and hard to use tools. If only they tended to refactor their code sooner, they might have gained more peace of mind earlier.
In this process of writing and evolving code, changing hats from coding to refactoring should be done often, if not constantly. We argued that a live refactoring environment, which presents refactorings in real-time, would help developers be continually aware of possible refactoring opportunities, making it easier to apply them earlier and faster when the codebase is still under control. We developed such a live environment by considering and evaluating in real-time several code-quality metrics, detecting smells, providing feedback, and presenting possible refactoring candidates unobtrusively and elegantly to the developers — all without leaving the comfort of their development environment.
By enhancing an existing IDE with live refactoring capabilities, we showed that we can help developers understand, adapt, and maintain their systems in a more controlled and prompt fashion, allowing them to produce better code faster.
The following contributions resulted from this work: (i) an extensive analysis of the state-of-theart on the main topics of our project, (ii) a live refactoring environment capable of continuously inspecting code to detect, suggest, and apply refactorings, (iii) an empirical validation using different approaches that helped us gathering data that allowed to confirm our hypothesis, and (iv) a set of scientific publications validating all the work done.
While our work presents significant contributions, there are areas for further exploration. We could enhance specific aspects of our Live Refactoring Environment, including broader refactoring support or reducing processing time for complex code. Moreover, future work could also involve predicting the impact of refactorings on quality metrics and enhancing usability, including tests with color-blind users.