This is what clean code is [tell-tale signs of clean code]
Tags: cleancode, refactoring, technicaldebt, simpledesign
Published: 2021-07-01 04:57:01

{% user cleancodestudio %}
[![Twitter Follow](https://img.shields.io/twitter/follow/cleancodestudio.svg?style=social)](https://twitter.com/cleancodestudio) 

---

> *Innovation starts with simplification, we can't create if we're always fixing.*

![What clean code is cover photo of desk with computer, coffee, and plant](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tlsqygug6usqqkeuwt4x.png)

## Why Simply Designed Clean Code?
---
> *Why battle against technical debt?*
> *Why invest into refactoring?* 
> *Why fight for Clean Code?*

---

To **simplify** lives, save money, and improve the world through innovative invention.


Clean Code is **DRY**, **minimalistic**, **tested**, & **simple**

---

## Features of Clean Code

---


### Clean Code doesn't repeat itself

![Clean code doesn't repeat itself list](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h6hgk6ii18g75u891qwp.png)
Clean code doesn't repeat itself, it's DRY (**D**o not **R**epeat **Y**ourself). When we duplicated code, we have required the developer whom must make a change to one piece of code to be required to make a change to all duplicated pieces of that same code. 

Cognitive load, technical debt, visual debt, & bugs increase.

Progress and passion decrease. 

---


### Clean Code is minimalistic


![Clean Code is minimalistic list](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dwrtrbd89k64irhv619t.png)


More code is more stuff that each of those things making up all of that stuff depends on. More than that developers are now required to keep all of that extra stuff in their head and if it's not already in their head they must go through all of the extra fluff to understand what's going on. 

Less code is less buggy.
Less code is less onboarding.
Less code is less maintenance.

Code in of itself is liability. You are liable to maintain, update, refactor, understand, teach, and utilize code. 

Simply put, **less code** is **less liability**.

---

### Clean Code passes all tests

![Clean Code tests list](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u5rc0f2gzavhagbtdmi4.png)

90% of all of your tests passed ~ ouch. This is not clean code. You know you messed up if your not passing all of your tests. You also know you messed up when your test coverage is 0%. 

**Clean Code is tested thoroughly and passes those tests with flying colors**


---
<a target="_blank"  href="https://www.amazon.com/gp/product/0132350882/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=0132350882&linkCode=as2&tag=ccs0cc-20&linkId=29ab921c59af65f0d3d9fd0497a6bc22"><img border="0" src="//ws-na.amazon-adsystem.com/widgets/q?_encoding=UTF8&MarketPlace=US&ASIN=0132350882&ServiceVersion=20070822&ID=AsinImage&WS=1&Format=_SL250_&tag=ccs0cc-20" ></a>
![Clean Code Check List](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ekb5iqhmhien5rwsvh2k.png)

---
### Clean code minimizes technical debt
![Technical Debt Causes List and visual graphic](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ecmyj23xi3fdthoqco5l.png)

**Common causes of technical debt:**

-   Ongoing development long series of project enhancements over time renders old solutions sub-optimal.
-   Insufficient up-front definition, where [requirements](https://en.wikipedia.org/wiki/Requirements_analysis "Requirements analysis") are still being defined during development, development starts before any design takes place. This is done to save time but often has to be reworked later.
-   Business pressures, where the business considers getting something released sooner before the necessary changes are complete, builds up technical debt comprising those uncompleted changes.
-   Lack of process or understanding, where businesses are blind to the concept of technical debt, and make decisions without considering the implications.
-   [Tightly-coupled components](https://en.wikipedia.org/wiki/Coupling_(computer_programming)), where functions are not [modular](https://en.wikipedia.org/wiki/Modular_programming "Modular programming"), the software is not flexible enough to adapt to changes in business needs.
-   Lack of a [test suite](https://en.wikipedia.org/wiki/Test_suite "Test suite"), which encourages quick and risky [band-aid](https://en.wikipedia.org/wiki/Band-aid_(Computing) "Band-aid (Computing)") bug fixes.
-   Lack of documentation, where code is created without supporting documentation. The work to create documentation represents debt.
-   Lack of collaboration, where knowledge isn't shared around the organization and business efficiency suffers, or junior developers are not properly mentored.
-   Parallel development on multiple branches accrues technical debt because of the work required to merge the changes into a single source base. The more changes done in isolation, the more debt.
-   Delayed [refactoring](https://en.wikipedia.org/wiki/Code_refactoring "Code refactoring"); As the requirements for a project evolve, it may become clear that parts of the code have become inefficient or difficult to edit and must be refactored in order to support future requirements. The longer refactoring is delayed, and the more code is added, the bigger the debt.
-   Lack of alignment to standards, where industry standard features, [frameworks](https://en.wikipedia.org/wiki/Software_framework "Software framework"), technologies are ignored. Eventually integration with standards will come, and doing so sooner will cost less (similar to 'delayed refactoring').
-   Lack of knowledge, when the developer doesn't know how to write elegant code.
-   Lack of ownership, when outsourced software efforts result in in-house engineering being required to [refactor](https://en.wikipedia.org/wiki/Code_refactoring "Code refactoring") or rewrite outsourced code.
-   Poor technological leadership, where poorly thought out commands are handed down the chain of command.
-   Last minute specification changes, these have potential to percolate throughout a project but no time or budget to see them through with documentation and checks.

### Clean Code simplifies

![Clean Code Simplifies List](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qig7pvhgv8fbg7kbs4il.png)

Clean code is easier to understand, simpler to utilize, cheaper to maintain, and effective towards the goals in which it is created towards. 


<a target="_blank"  href="https://www.amazon.com/gp/product/0132350882/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=0132350882&linkCode=as2&tag=ccs0cc-20&linkId=29ab921c59af65f0d3d9fd0497a6bc22"><img border="0" src="//ws-na.amazon-adsystem.com/widgets/q?_encoding=UTF8&MarketPlace=US&ASIN=0132350882&ServiceVersion=20070822&ID=AsinImage&WS=1&Format=_SL250_&tag=ccs0cc-20" ></a>
![Clean Code Check List](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ekb5iqhmhien5rwsvh2k.png)

{% youtube 7UuQcDs86Uo %}


[Clean Code](https://cleancode.studio)
Clean Code Clean Life ~ Simplify!
[Clean Code Studio](https://youtube.com/c/cleancodestudio)