---
title: "Discussion on \"Code Smell 36 - Switch/case/elseif/else/if statements\" | Hashnode"
description: "Discussion on \"Code Smell 36 - Switch/case/elseif/else/if statements\". First programming lesson: Control structures. Senior developer lesson: avoid them.\nProblems\n\nToo many decisions together\n\nCoupling\n\nDuplicated code\n\nViolation of Open/Closed Principle.\n\nA new condition should not change the main algorithm.\n\nNulls\n\n\nS..."
url: "https://hashnode.com/posts/code-smell-36-switchcaseelseifelseif-statements/5fc2579155b779631e1acec0"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Code Smell 36 - Switch/case/elseif/else/if statements](https://maximilianocontieri.com/code-smell-36-switchcaseelseifelseif-statements?utm_source=hashnode&utm_medium=feed)

First programming lesson: Control structures. Senior developer lesson: avoid them. Problems Too many decisions together Coupling Duplicated code Violation of Open/Closed Principle. A new condition should not change the main algorithm. Nulls S...

Nov 28, 2020 · 1 min read · maximilianocontieri.com  
Updated Dec 18, 2022  
Read the article

-   [#code-smell-1](https://hashnode.com/tag/code-smell-1)
-   [#programming](https://hashnode.com/tag/programming)
-   [#2articles1week](https://hashnode.com/tag/2articles1week)

## Written by

[Maxi Contieri](https://hashnode.com/@mcsee)

@mcsee · Buenos Aires

  
[View profile](https://hashnode.com/@mcsee)

Software Engineer

I’m a senior software engineer loving clean code, and declarative designs. S.O.L.I.D. and agile methodologies fan.

## Responses 1

Markdown supported · ⌘↵ to post

[Kenny Perez](https://hashnode.com/@kksven)

[Jun 22, 2024](https://hashnode.com/posts/code-smell-36-switchcaseelseifelseif-statements/5fc2579155b779631e1acec0/comment/66770c95fed0909dc4addab5)

Muy bueno, quiza se pudo extender un poco más
