What Clean Means and Why you Should Care 🧹
Tags: cleancode, motivation, architecture
Published: 2020-12-22 07:01:09

---
title: What Clean Means and Why you Should Care 🧹
published: true
description: Clearly there are things that are overused in the software industry. Some of them even impact the world beyond the development office. The innocent term clean is one of them. Regardless of whoever bugs you about it – let us forget about them and embrace the power of clean together. 
tags: cleancode, motivation, architecture
cover_image: https://images.pexels.com/photos/169573/pexels-photo-169573.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940
---
Clean is a term that gets thrown around in the software development industry like null pointer exceptions. We read and hear everything about clean code(r), clean architecture and whatever other stuff that may or may not be clean in one way or another. Even project managers love to pick on us developers while rambling about the importance of this topic, often not being equipped with any coding experience or knowledge about it whatsoever. 

So, it seems that over time many developers got desensitized to truly caring about these concepts which were meant to give structure and a sense of ease in our craftsmanship software development. Now let us take a step back together. Forget about the times this simple, silly word nearly made you lose your marbles and look at what it can truly do for us. 

# The main Benefits of Clean 
As with everything a good amount of motivation makes things a lot easier. The main benefits of working clean are pretty obvious if you thought about it once.
- Easier to Test (more spaghetti for your dinner plate)
- Bugs are (more) obvious (again less spaghetti chaos in your code and problems sometimes just kind of resolve themselves)
- Lower maintenance burden (because there are less bugs to fix and customers to calm down)
- Less communication between developers needed (communication is key but let us use that time for more important topics)

And the list goes on. But you may already see a trend going in the direction of “If you do it right, you only have to do it once.”

# Clean Code – everyone starts small
The devil is in the detail, so first focus on that one. Thinking of the actual essence of software brings us to the code itself. But let us not dive into classes just yet, what are characteristics your ideal code should have? What special kind of spice was in the last snippet you really liked just because of how it looked? Probably at least one of those features grabbed your attention:
- The code was documented, but not polluted by comments
- Names of variables and function seemed reasonable (not too long and not too short)
- The code was not nested in some (nasty) way
- Functions (if present) fit on your screen (without zooming out)
- Calls were not overflowing with parameters

Did you see your snippet? All these rather small things make a difference concerning the general appearance of your code. And guess what, with just those thoughts in mind, your code base will already make a huge step in the right direction. 

_Clean, simple, and smart._
<br>
Ps. I highly recommend all books written by _Robert C. Martin_ if you are interested in cleaner code and a simpler developer life.