
This podcast episode of "Fronteiras da Engenharia de Software" and "Elixir em Foco" features hosts Adolfo Neto and Zoe Peçanha interviewing Professor Lucas Vege about his doctoral research on code...
This podcast episode of "Fronteiras da Engenharia de Software" and "Elixir em Foco" features hosts Adolfo Neto and Zoe Peçanha interviewing Professor Lucas Vege about his doctoral research on code smells and refactoring in Elixir. Adolfo introduces Lucas as a professor in the Informatics Department at the Federal University of Viçosa (UFV), where he coordinates the Laboratory for Mobile Device Development (LabD2M). Lucas holds a PhD in Computer Science from the Federal University of Minas Gerais (UFMG), completed in 2024, and his thesis was selected as one of the best in Brazil by the Brazilian Computer Society, competing in the SBC Congress thesis contest in July. Two articles from his thesis were published in Empirical Software Engineering, a highly regarded journal in the field.
Lucas explains that the research was motivated by a significant gap: software engineering research has historically focused on the dominant industry paradigm—object orientation since the 1980s—while functional programming languages like Elixir, Clojure, and F# are gaining industry relevance with little corresponding research. Elixir was particularly attractive because it is a functional language developed by a Brazilian and had virtually no software quality research. The work builds on the premise that all developers care about code quality, maintainability, testability, and extensibility, and that code smells can harm these qualities.
The methodology evolved in stages. The team began with a grey literature review—blogs, forums like Stack Overflow and Elixir Forum, podcasts, and YouTube videos—since no peer-reviewed publications existed on code smells in functional programming. This preliminary catalog was published at ICPS as early results and generated significant community interest, amplified when Marco Tulio Valente shared it on social media. The team then complemented the catalog through direct community interaction via GitHub pull requests, mined public Elixir repositories on GitHub, and validated the final catalog of 35 code smells through a survey with approximately 181 responses from developers with diverse backgrounds and experience levels. The code smells are categorized as traditional smells from Fowler that also apply to Elixir, Elixir-specific low-level concerns affecting small code instances, and design-related smells spanning multiple modules.
The refactoring catalog contains 82 refactorings in four categories: Elixir-specific, Erlang-specific, functional paradigm-level, and traditional Fowler refactorings. Zoe notes that the community response has been visible in practice, including anti-patterns documentation in official Elixir docs and community efforts to encode catalog rules into Credo, the static analysis tool.
Regarding practical impact, Lucas mentions that three companies—FImbets, Rebase, and Dashbit—partially funded the research, and teams reported applying the catalog to identify and remove smells. Looking ahead, Lucas plans to automate detection and refactoring. A FAPEMIG universal grant proposal has been submitted to build tools that detect code smells and suggest or apply refactorings. RefactorX, developed by Gabriel Pereira, already automates about 20 of the 82 refactorings. The vision is an integrated environment where a developer writing a smell receives immediate detection and refactoring suggestions, possibly leveraging AI models or LSP extensions for refactorings requiring deeper semantic context.