| Cause                   | Description                                                                                                    | Solution                                                                                                          |
| ----------------------- | -------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
| Nested conditionals     | A sequence of conditionals nested inside each other increases cognitive complexity.                            | Refactor nested conditionals into a series of functions or extract complex conditionals into their own functions. |
| Unnecessary abstraction | Overly complex abstractions can lead to confusion and cognitive overload.                                      | Keep abstractions simple and only use them when necessary.                                                        |
| Large functions         | Functions with too much code and too many responsibilities make it difficult to understand the code's purpose. | Break large functions into smaller functions with a single responsibility.                                        |
| Magic values            | Hard-coded values that aren't easily understood can make the code harder to understand.                        | Assign magic values to named constants or enums.                                                                  |
| Global state            | Global state makes it difficult to understand how data is being used throughout the codebase.                  | Avoid using global state and prefer passing data through function arguments.                                      |
| Inconsistent naming     | Inconsistent naming conventions make it difficult to understand the code's meaning.                            | Use consistent naming conventions and follow language-specific guidelines.                                        |
| Poorly documented code  | Lack of documentation makes it difficult to understand code.                                                   | Write clear comments and documentation that describes the code's purpose and behavior.                            |
