# Introduction

Improving code quality is a software development practice based on the principle that *new code* (code that you added or modified recently) needs to comply with quality standards. The Sonar solution supports improving code quality by warning you whenever issues are detected in your new code.

When you add new code to your projects, you usually touch a portion of the old code in the process. As a consequence, analyzing and cleaning new code allows you to fix issues in your old code and gradually improve the overall quality of your codebase.

![](https://312504542-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiJj3TXBdWssTGGg8qK5I%2Fuploads%2Fgit-blob-1c11bd79bfd7915cfe081d478c30ab477cdd82d8%2F3e15eaa38ec923b342261e5df52f42e20aa11678.png?alt=media)

The end goal is to achieve high code quality across your entire codebase. This approach is also suitable for legacy projects with a substantial amount of code, although in this case a full cleanup can hardly be achieved.

Sometimes, you may want to implement additional measures to ensure the quality of the overall code base, such as checking for vulnerabilities and performing refactoring. This approach does not prevent you from pursuing these additional use cases.

## Benefits of improving code quality <a href="#benefits-of-clean-as-you-code" id="benefits-of-clean-as-you-code"></a>

### For developers <a href="#for-developers" id="for-developers"></a>

* You ensure that all new code added to the project is always clean.
* You gain time by reducing and even eliminating debt-addressing sprints.
* You adopt a sustainable approach to software development, as cleaning code becomes part of the development routine.
* You fix issues in your own code, reducing the complexity that comes with fixing old code that is hard to understand.

### For organizations <a href="#for-organizations" id="for-organizations"></a>

* The overall quality of your code increases over time.
* You ensure your software meets high quality standards.
* You increase developer morale by reducing debt-addressing sprints.
* Engineering/Feature development velocity increases.

In SonarQube Server, you can get a visual representation of your code quality improvements based on the data in your projects by navigating to **More** > **Clean as You Code**.

## Related pages <a href="#related-pages" id="related-pages"></a>

* [https://github.com/SonarSource/sonarqube-documentation/blob/main/content-output/server/10.8/core-concepts/clean-code/introduction.md](https://github.com/SonarSource/sonarqube-documentation/blob/main/content-output/server/10.8/core-concepts/clean-code/introduction.md "mention")
* [setting-up-clean-as-you-code](https://docs.sonarsource.com/sonarqube-server/10.8/project-administration/setting-up-clean-as-you-code "mention")
