The PhD thesis "Code Smells and Refactorings for Elixir" is now publicly available

With great satisfaction, I announce that my PhD thesis, titled “Code Smells and Refactorings for Elixir,” is now publicly available! All the results and methodological details used in our research over the past three years can be openly accessed at:

https://repositorio.ufmg.br/handle/1843/80651

Abstract:

Elixir is a modern functional programming language, created in 2012, whose popularity has been growing in the industry. Despite this fact, and to the best of our knowledge, there are few studies in the literature addressing the internal quality of systems implemented with this language. In particular, no study to date has investigated specific code smells or refactorings for Elixir. Therefore, to fill these research gaps, we take inspiration from Fowler’s well-known book on code smells and refactorings to prospect, study, document, and evaluate code smells and refactoring strategies specifically tailored to Elixir. In the first study, we employed a mixed-method approach to catalog 35 code smells, 23 of which are new and specific to Elixir, while 12 are traditional code smells cataloged by Fowler and Beck that also affect code implemented in this language. We validated this catalog by surveying 181 experienced Elixir developers from 37 countries across all continents. In a second study, we also adopted a mixed-method approach, including a systematic literature review, to catalog 82 refactoring strategies compatible with Elixir, 14 of which are novel and specific to this language. All these refactorings were validated through another survey answered by 151 developers from 42 countries. To document the cataloged code smells and refactorings, in addition to structured textual descriptions, we produced code examples representing them. Finally, we conducted a third study where the code smells and refactorings for Elixir were correlated, allowing the definition of practical guidelines on how each code smell can be removed systematically with the help of refactoring strategies. In this final study, we also cataloged five new composite refactorings for Elixir. Overall, the results of this thesis have practical implications for the prevention and removal of code smells in Elixir, as well as the prioritization of understanding and using refactoring strategies for this language.

Enjoy!

61 Likes

Nice! Thanks for all your work on this Lucas! :blush:

3 Likes

I also have to sincerely thank all the members of the community who actively participated and helped this research thrive. In the acknowledgments section of the thesis (in Portuguese), I did not forget any of you! :slight_smile:

5 Likes

Congratulations on finishing your thesis, that’s a huge accomplishment!!!

2 Likes

Thank you so much! Gonna read the whole thing and apply it to my current main project :slight_smile:

2 Likes

Amazing thank you for this! Should be great as an input to a custom GPT!

3 Likes

I didn’t know you can do that :slight_smile:

2 Likes

Oh yeah! I have a custom GPT with all the elixir docs, and other good resources. Docs are dead, long live LLMs!

4 Likes

Thank Lucas for sharing! I want to study about this do you have any other link? (I cannot access that link).

2 Likes

Is the page not resolving for you? If so I am getting the same thing here so it might just be a temporary glitch…

1 Like

Site is too lag, but now is ok. I downloaded docs and start reading :ok_hand:

1 Like

Congratulations. Your thesis is going to help the community a lot. Thanks for the good work.

1 Like

Not my thesis, that is Lucas’s one!

2 Likes

It seems like a great idea! Feel free to test and share this customized GPT with us :slight_smile:

I’d love to, but it’s private in my work’s enterprise OpenAI plan :frowning:

1 Like

I see. But it’s still a great idea. If it’s feasible for some community member to create this custom GPT, I’m curious to see the result.

Hi,
ty for this awesome piece of work.

1 Like

Thanks!

1 Like

Interesting how you managed to sniff out bad smells related to Elixir. Let us try to transform any or refactor any foul code smells in Elixir into beautiful notes of odor in highly functional code.

1 Like

Thanks for putting this together. It’s super impressive!

I was curious what you think about plugging this into an embedding-based search system so devs could easily query it—especially to help with code quality. I built something kind of related called hexdocs-mcp, which helps AI tooling understand details about dependencies. It’s been a big help in my own workflow.

I’m using AI more in my dev process, and honestly, the code it writes isn’t great. Having a resource like this to point it toward or even just to use manually would be really useful.

I’ve been toying with the idea of building an MCP server that aggregates Elixir best practices. Your work would be an awesome addition. Would be cool to talk more if that sounds interesting.

2 Likes