---
title: "Discussion on \"Code Smell 160 - Invalid Id = 9999\" | Hashnode"
description: "Discussion on \"Code Smell 160 - Invalid Id = 9999\". Maxint is a very good number for an invalid ID. We will never reach it."
url: "https://hashnode.com/posts/code-smell-160-invalid-id-9999/630e073656df9e8e50255fe0"
---

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

Discussion

# [Code Smell 160 - Invalid Id = 9999](https://maximilianocontieri.com/code-smell-160-invalid-id-9999?utm_source=hashnode&utm_medium=feed)

Maxint is a very good number for an invalid ID. We will never reach it.

Aug 30, 2022 · 2 min read · maximilianocontieri.com  
Read the article

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

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

[Gary McMeekin](https://hashnode.com/@garymcm)

[Aug 31, 2022](https://hashnode.com/posts/code-smell-160-invalid-id-9999/630e073656df9e8e50255fe0/comment/630f4ea575af73ad1f060e85)

Isn't there a boolean-to-int conversion and that will result in a valid domain object of 0 (zero)? Maybe C handles this better than Javascript does.
