Vol. 15 No. 9 (2023): Emerging Trends in Machine Intelligence and Big Data - 159
Articles

Code Smells in Software Development Causes, Consequences, and Detection Strategies

Manish Raj Khatri
Department of Computer Science, Amrit Science Campus, Tribhuvan University, Kathmandu, Nepal
Anushka Thapa
Department of Computer Science, North Campus, Tribhuvan University, Kathmandu, Nepal

Published 2023-09-29

Keywords

  • Code smells,
  • Software maintainability,
  • Design weaknesses,
  • Static analysis tools,
  • Refactoring

How to Cite

Khatri, M. R., & Thapa, A. (2023). Code Smells in Software Development Causes, Consequences, and Detection Strategies. Emerging Trends in Machine Intelligence and Big Data, 15(9), 37–50. Retrieved from https://orientreview.com/index.php/etmibd-journal/article/view/22

Abstract

Code smells, indicative of potential design weaknesses in software, have garnered attention due to their subtle yet impactful implications on software maintainability. These symptoms, unlike explicit bugs or errors, hint at deeper architectural or design issues. This study delves into the origins, key manifestations, repercussions, and strategies to pinpoint these smells. Primary causes include inexperienced development, looming deadlines, evolving or ambiguous requirements, a neglect of refactoring, and insufficient code review processes. Such origins can manifest as widely recognized code smells, such as Large Classes, Duplicated Code, and Primitive Obsession. The presence of these patterns, while not immediately problematic, can precipitate several negative outcomes. These include diminished maintainability, an increased propensity for bugs, stunted development processes, limited code reusability, and reduced code comprehensibility. To address these concerns, this research advocates for a multipronged detection approach. Regular manual code reviews are fundamental, augmented by automated static analysis tools like SonarQube and PMD. Metrics such as cyclomatic complexity offer quantitative insights into code health. Moreover, integrating these checks within Continuous Integration systems can preemptively identify and mitigate these smells.