---
title: "Discussion on \"Code Smell 62 - Flag Variables\" | Hashnode"
description: "Discussion on \"Code Smell 62 - Flag Variables\". Flags indicate what happened. Unless their name is too generic.\nProblems\n\nReadability\n\nMaintainability\n\nCoupling\n\n\nSolutions\n\nUse meaningful names\n\nTry to avoid flags. They generate coupling.\n\n\nSample Code\nWrong\nhttps://gist.github.com/mcsee/694068de..."
url: "https://hashnode.com/posts/code-smell-62-flag-variables/6020aa4c0da0382a2d49e4a5"
---

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

Discussion

# [Code Smell 62 - Flag Variables](https://maximilianocontieri.com/code-smell-62-flag-variables?utm_source=hashnode&utm_medium=feed)

Flags indicate what happened. Unless their name is too generic. Problems Readability Maintainability Coupling Solutions Use meaningful names Try to avoid flags. They generate coupling. Sample Code Wrong https://gist.github.com/mcsee/694068de...

Feb 8, 2021 · 1 min read · maximilianocontieri.com  
Updated May 27, 2021  
Read the article

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

## 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

No responses yet.
