I believe many of you may know me from the research I conducted on code smells/anti-patterns for Elixir, which was partially incorporated into the official Elixir documentation.
Currently, my Ph.D. advisor and I are investigating refactoring strategies for Elixir and cataloging them. For this reason, we need your help to identify which refactorings are most frequently performed in your Elixir systems and which ones bring positive impacts on maintainability, comprehensibility, and evolution of your Elixir code.
If you are interested in the quality of your code, could you please help us by answering this survey on refactorings? (it should take 20 minutes)(https://lucasvegi.github.io/Elixir-Refactorings/)
Thank you!
Note: The complete catalog consists of 82 different refactoring strategies. However, each participant will be asked to respond to only a small portion of it, randomly selected. If you are interested in exploring all the refactorings, access the complete catalog.
Iām confused about the meaning of the ārelevanceā metric in the survey. For example, consider this question:
[Transform a body-recursive function to a tail-recursive**]**.
This refactoring aims to convert a body-recursive function into a tail-recursive one, thus improving runtime performance due to the tail-call optimization provided by BEAM. More details and code examples here: [LINK]
I believe that the relevance of this very much depends on the particular function (does making it tail-recursive decrease readability and how much?) and, most importantly, on the expected input (do we expect infinite recursion and having a memory leak, or do we expect at most 10 stack frames to be kept at any time?). What should be my answer to this?
Hello, I understand your question. In fact, the relevance of a refactoring may depend on the application scenario, as you said.
I recommend that answers are always based on the worst case that the developer has experienced or is aware of someone having experienced. In this specific refactoring, as you said, it could be an infinite recursion, memory leak, etc.
In short, think something like this: āIn general, can this bring me more advantages or not?āā¦ The more advantage, the closer to 5.
I would like to thank the great number of devs who have already participated in our survey. For those who have NOT yet participated and are interested, we will collect responses until April 3rd at 11:59 PM (UTC-3).