Skip to main content
Erschienen in: Empirical Software Engineering 4/2023

01.07.2023

Understanding code smells in Elixir functional language

verfasst von: Lucas Francisco da Matta Vegi, Marco Tulio Valente

Erschienen in: Empirical Software Engineering | Ausgabe 4/2023

Einloggen

Aktivieren Sie unsere intelligente Suche, um passende Fachinhalte oder Patente zu finden.

search-config
loading …

Abstract

Elixir is a functional programming language created in 2012, whose popularity is growing in the industry. Despite this fact, and to the best of our knowledge, there are few works in the literature focused on studying the internal quality of systems implemented with this language. In a preliminary and previous study, we conducted a grey literature review to provide an initial list of Elixir-specific code smells. Aiming to expand the results of this preliminary study, in this work we use a mixed methodology, based on the interaction with the Elixir developer community and on the mining of issues, commits, pull requests, and the source code in GitHub repositories to prospect and document new code smells for this language. As a result, we propose a catalog composed of 35 code smells, 23 of them are new and specific to Elixir, and 12 of them are traditional code smells, as cataloged by Fowler and Beck, which also affect Elixir systems. We validated this catalog by conducting a survey with 181 experienced Elixir developers from 37 countries and all continents. In this survey, we assessed the levels of relevance and prevalence of each smell in the catalog. We show that most smells in Elixir have relevance levels capable of impacting the readability, maintainability, and evolution of Elixir systems. Furthermore, most of the smells are not uncommon in production code. Our results have practical implications related to the prevention and removal of code smells in Elixir.

Sie haben noch keine Lizenz? Dann Informieren Sie sich jetzt über unsere Produkte:

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Literatur
Zurück zum Zitat Almeida U (2018) Learn functional programming with Elixir: new foundations for a new world, 1st edn. Pragmatic Bookshelf Almeida U (2018) Learn functional programming with Elixir: new foundations for a new world, 1st edn. Pragmatic Bookshelf
Zurück zum Zitat Brown WJ, Malveau RC, McCormick HW, Mowbray TJ (1998) AntiPatterns: refactoring software, architectures, and projects in crisis. Wiley Brown WJ, Malveau RC, McCormick HW, Mowbray TJ (1998) AntiPatterns: refactoring software, architectures, and projects in crisis. Wiley
Zurück zum Zitat Cowie J (2005) Detecting bad smells in haskell. Tech. rep., University of Kent, UK Cowie J (2005) Detecting bad smells in haskell. Tech. rep., University of Kent, UK
Zurück zum Zitat Dabic O, Aghajani E, Bavota G (2021) Sampling projects in github for MSR studies. In: 18th IEEE/ACM International Conference on Mining Software Repositories (MSR). pp 560–564 Dabic O, Aghajani E, Bavota G (2021) Sampling projects in github for MSR studies. In: 18th IEEE/ACM International Conference on Mining Software Repositories (MSR). pp 560–564
Zurück zum Zitat Fontana FA, Ferme V, Marino A, Walter B, Martenka P (2013) Investigating the impact of code smells on system’s quality: an empirical study on systems of different application domains. In: 29th IEEE International Conference on Software Maintenance (ICSM). pp 260–269. https://doi.org/10.1109/ICSM.2013.37 Fontana FA, Ferme V, Marino A, Walter B, Martenka P (2013) Investigating the impact of code smells on system’s quality: an empirical study on systems of different application domains. In: 29th IEEE International Conference on Software Maintenance (ICSM). pp 260–269. https://​doi.​org/​10.​1109/​ICSM.​2013.​37
Zurück zum Zitat Fowler M, Beck K (1999) Refactoring: improving the design of existing code, 1st edn. Addison-Wesley Fowler M, Beck K (1999) Refactoring: improving the design of existing code, 1st edn. Addison-Wesley
Zurück zum Zitat Hecht G, Benomar O, Rouvoy R, Moha N, Duchien L (2015) Tracking the software quality of Android applications along their evolution. In: 30th IEEE/ACM International Conference on Automated Software Engineering (ASE). pp 236–247. https://doi.org/10.1109/ASE.2015.46 Hecht G, Benomar O, Rouvoy R, Moha N, Duchien L (2015) Tracking the software quality of Android applications along their evolution. In: 30th IEEE/ACM International Conference on Automated Software Engineering (ASE). pp 236–247. https://​doi.​org/​10.​1109/​ASE.​2015.​46
Zurück zum Zitat Oizumi W, Garcia A, da Silva Sousa L, Cafeo B, Zhao Y (2016) Code anomalies flock together: exploring code anomaly agglomerations for locating design problems. In: 38th International Conference on Software Engineering (ICSE). pp 440–451. https://doi.org/10.1145/2884781.2884868 Oizumi W, Garcia A, da Silva Sousa L, Cafeo B, Zhao Y (2016) Code anomalies flock together: exploring code anomaly agglomerations for locating design problems. In: 38th International Conference on Software Engineering (ICSE). pp 440–451. https://​doi.​org/​10.​1145/​2884781.​2884868
Zurück zum Zitat Oizumi WN, Garcia AF, Colanzi TE, Ferreira M, von Staa A (2014) When code-anomaly agglomerations represent architectural problems? an exploratory study. In: 28th Brazilian Symposium on Software Engineering (SBSE). pp 91–100. https://doi.org/10.1109/SBES.2014.18 Oizumi WN, Garcia AF, Colanzi TE, Ferreira M, von Staa A (2014) When code-anomaly agglomerations represent architectural problems? an exploratory study. In: 28th Brazilian Symposium on Software Engineering (SBSE). pp 91–100. https://​doi.​org/​10.​1109/​SBES.​2014.​18
Zurück zum Zitat Page L, Brin S, Motwani R, Winograd T (1999) The PageRank citation ranking: bringing order to the Web. Technical report, Stanford InfoLab Page L, Brin S, Motwani R, Winograd T (1999) The PageRank citation ranking: bringing order to the Web. Technical report, Stanford InfoLab
Zurück zum Zitat Palomba F, Bavota G, Penta MD, Oliveto R, Lucia AD (2014) Do they really smell bad? a study on developers’ perception of bad code smells. In: IEEE International Conference on Software Maintenance and Evolution (ICSME). pp 101–110. https://doi.org/10.1109/ICSME.2014.32 Palomba F, Bavota G, Penta MD, Oliveto R, Lucia AD (2014) Do they really smell bad? a study on developers’ perception of bad code smells. In: IEEE International Conference on Software Maintenance and Evolution (ICSME). pp 101–110. https://​doi.​org/​10.​1109/​ICSME.​2014.​32
Zurück zum Zitat Reimann J, Brylski M, Aßmann U (2014) A tool-supported quality smell catalogue for Android developers. In: Modellbasierte und modellgetriebene Softwaremodernisierung (MMSM). pp 1–2 Reimann J, Brylski M, Aßmann U (2014) A tool-supported quality smell catalogue for Android developers. In: Modellbasierte und modellgetriebene Softwaremodernisierung (MMSM). pp 1–2
Zurück zum Zitat Sharma T, Fragkoulis M, Spinellis D (2016) Does your configuration code smell? In: 13th IEEE/ACM Working Conference on Mining Software Repositories (MSR). pp 189–200 Sharma T, Fragkoulis M, Spinellis D (2016) Does your configuration code smell? In: 13th IEEE/ACM Working Conference on Mining Software Repositories (MSR). pp 189–200
Zurück zum Zitat Siegel S, Castellan J (1988) Nonparametric Statistics for the Behavioral Sciences, 2nd edn. McGraw-Hill International Editions Siegel S, Castellan J (1988) Nonparametric Statistics for the Behavioral Sciences, 2nd edn. McGraw-Hill International Editions
Zurück zum Zitat Soh Z, Yamashita A, Khomh F, Guéhéneuc YG (2016) Do code smells impact the effort of different maintenance programming activities? In: 23rd IEEE International Conference on Software Analysis, Evolution, and Reengineering (SANER). pp 393–402. https://doi.org/10.1109/SANER.2016.103 Soh Z, Yamashita A, Khomh F, Guéhéneuc YG (2016) Do code smells impact the effort of different maintenance programming activities? In: 23rd IEEE International Conference on Software Analysis, Evolution, and Reengineering (SANER). pp 393–402. https://​doi.​org/​10.​1109/​SANER.​2016.​103
Zurück zum Zitat Thomas D (2018) Programming Elixir |\({>}\) 1.6: functional |\({>}\) concurrent |\({>}\) pragmatic |\({>}\) fun, 1st edn. Pragmatic Bookshelf Thomas D (2018) Programming Elixir |\({>}\) 1.6: functional |\({>}\) concurrent |\({>}\) pragmatic |\({>}\) fun, 1st edn. Pragmatic Bookshelf
Zurück zum Zitat Wohlin C, Runeson P, Hst M, Ohlsson MC, Regnell B, Wessln A (2012) Experimentation in Software Engineering. Springer Wohlin C, Runeson P, Hst M, Ohlsson MC, Regnell B, Wessln A (2012) Experimentation in Software Engineering. Springer
Metadaten
Titel
Understanding code smells in Elixir functional language
verfasst von
Lucas Francisco da Matta Vegi
Marco Tulio Valente
Publikationsdatum
01.07.2023
Verlag
Springer US
Erschienen in
Empirical Software Engineering / Ausgabe 4/2023
Print ISSN: 1382-3256
Elektronische ISSN: 1573-7616
DOI
https://doi.org/10.1007/s10664-023-10343-6

Weitere Artikel der Ausgabe 4/2023

Empirical Software Engineering 4/2023 Zur Ausgabe

Premium Partner