# Clean Code Patterns

While creational, structural and behavioral pattern help us to solve specific problems, clean code patterns help us to produce code that is readable, easily understandable and easy to change. Some of them are called low-level refactoring patterns but some are rather ideas and principles to examine and be inspired by.

Clean code patterns are activities that are supposed to be done continuously over the time. Clean code patterns become are supposed to become a good habit, rather than one time solution for a problem.

> The more you don’t pay, the worse your fees and payments become.

This category of design patterns is based on the following points:

> 1. Remove duplication. &#x20;
> 2. Simplify your code. &#x20;
> 3. Clarify you code’s intent.
>
> \-- Ward Cunningham

There is a subtle difference between code which is new, the code which is new and kept refactored and code that nobody every did refactor over many years.

With this chapter, I hope to provide more insight on how to make code that does not rot.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ondrej-kvasnovsky-2.gitbook.io/design-patterns-handbook/clean-code-patterns.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
