---
title: "Discussion on \"Code Smell 202 - God Constant Class\" | Hashnode"
description: "Discussion on \"Code Smell 202 - God Constant Class\". Constants should be together to find them easily"
url: "https://hashnode.com/posts/code-smell-202-god-constant-class/6415c4c758624f6405519449"
---

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

Discussion

# [Code Smell 202 - God Constant Class](https://maximilianocontieri.com/code-smell-202-god-constant-class?utm_source=hashnode&utm_medium=feed)

Constants should be together to find them easily

Mar 18, 2023 · 2 min read · maximilianocontieri.com  
Read the article

-   [#programming](https://hashnode.com/tag/programming)
-   [#clean-code](https://hashnode.com/tag/clean-code)
-   [#programming-blogs](https://hashnode.com/tag/programming-blogs)
-   [#software-development](https://hashnode.com/tag/software-development)
-   [#debuggingfeb](https://hashnode.com/tag/debuggingfeb)

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

[Anthony Fung](https://hashnode.com/@anthonyf)

[Mar 18, 2023](https://hashnode.com/posts/code-smell-202-god-constant-class/6415c4c758624f6405519449/comment/6415f2b9f94a99cca7bd6fc7)

Interesting point of view. How do you feel about a class of classes, e.g.

```
public static class GlobalConstants
{
    public static class MaxPlayers
    {
        public const int MaxPlayers = 10;
    }

    public static class DefaultLanguage
    {
        public const string DefaultLanguage = "en-US";
    }

    public static class Math
    {
        public const double Pi = 3.14159;
    }
}
```

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

[Mar 26, 2023](https://hashnode.com/posts/code-smell-202-god-constant-class/6415c4c758624f6405519449/comment/6415f2b9f94a99cca7bd6fc7#reply-6420b725bdbe7d697133cb4e)

IMHO, Nested classes are yet another code smell

[maximilianocontieri.com/code-smell-181-nested-cla…](https://maximilianocontieri.com/code-smell-181-nested-classes)
