---
title: "Discussion on \"Code Smell 51 - Double Negatives\" | Hashnode"
description: "Discussion on \"Code Smell 51 - Double Negatives\". Not operator is our friend. Not not operator is not our friend.\n\nTL;DR: Avoid double negatives in boolean expressions\n\nProblems\n\nReadability\n\nSolutions\n\nName your variables, methods and classes with positive names.\n\nSample Code\nWrong\nif ( !work.isNot..."
url: "https://hashnode.com/posts/code-smell-51-double-negatives/5fe405311e6a660a92506a96"
---

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

Discussion

# [Code Smell 51 - Double Negatives](https://maximilianocontieri.com/code-smell-51-double-negatives?utm_source=hashnode&utm_medium=feed)

Not operator is our friend. Not not operator is not our friend. TL;DR: Avoid double negatives in boolean expressions Problems Readability Solutions Name your variables, methods and classes with positive names. Sample Code Wrong if ( !work.isNot...

Dec 24, 2020 · 1 min read · maximilianocontieri.com  
Updated Feb 22, 2023  
Read the article

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

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

[Chris Bongers](https://hashnode.com/@dailydevtips)

[Dec 24, 2020](https://hashnode.com/posts/code-smell-51-double-negatives/5fe405311e6a660a92506a96/comment/5fe41a8fddcb940a6d28d332)

Interesting point!

Agree, would be cool how to setup a linter for this
