Are you a professional developer?
Tags: programming, codequality, webdev, codereview
Published: 2021-05-25 12:40:34

According to Robert C. Martin, author of *Clean Code: A Handbook of Agile Software Craftsmanship:*
 
> Writing clean code is what you must do in order to call yourself a professional. There is no reasonable excuse for doing anything less than your best.

**But what does "clean code" mean?**

As Robert C. Martin mentions in his book, many authors have their own definitions of clean code. However, most of them mention at least one of these characteristics:

- Easy to read
- Easy to understand
- Easy to change

To this end, the code must be simple, tidy, and have the right abstractions. It is necessary to spend time reviewing the code to find ways to improve it and achieve a clean code.

**The code review**

![undraw_Code_review_re_woeb.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1621808173233/GX7v-uiCF.png)

In the code review, we can find many improvements such as more meaningful variable names, splitting long methods into smaller ones, reorganizing code into more specific classes, and so on. Of course, this can take time. But that investment of time will pay off every time you or your co-workers refer back to the code. It will be easy to read, understand and change.

As a result of the code review, we would deliver a polished and refined code. Our co-workers would appreciate it and we would convey the culture of clean code also. When others see that elegant and tidy code, no one will want to be the first to screw it up.

**Reasons why we don't write clean code**

Let's be honest. Sometimes, we forget to review the code or just leave it for later refactoring. That code can even stay there forever, though. There is a famous saying:

> Later equals never

As developers, we commit to complete a certain amount of work. We have deadlines, that unconsciously lead us to code as quickly as possible, leaving aside the code review and consecutively the code quality.

> 
![Captura de pantalla de 2021-05-23 15-36-41.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1621798687899/C-OjiUYzI.png)
*Follow [@gitlost](https://twitter.com/gitlost) on Twitter for more funny git commit messages.*

We could go on citing reasons why we don't write clean code, such as the code was already a mess before it passed through our hands, as mentioned by Andy Hunt and Dave Thomas in *The Pragmatic Programmer*, making an analogy with the broken windows theory. You can find more information about this theory in this [article](https://www.freecodecamp.org/news/pragmatic-programmer-broken-windows-6916998eecbe/).

> 
![joe-dudeck-rb8kbbtOMGo-unsplash.jpg](https://cdn.hashnode.com/res/hashnode/image/upload/v1621799759548/mzXaQudF8.jpeg)
*Photo by <a href="https://unsplash.com/@joetography?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Joe Dudeck</a> on <a href="https://unsplash.com/s/photos/broken-window?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a>*

It turns out that, as professionals, we should not look for excuses but solutions. If something is not right, we must be able to communicate it and provide solutions. Otherwise, we would be part of the mess. So, the main reason we don't write clean code is that we are not professionals.

**Conclusion**

Spending time on code review is the key to clean code and can make the difference between being a professional developer or not. A professional not only cares about the code does what it is expected to do but also cares about the quality of the code.
  
So the next time you are about to push your changes, I invite you to take a look at your code and ask yourself the following questions:

- Am I satisfied with this code?
- Does this code represent me as a programmer?

If the answer is no, I invite you to spend some time reviewing your code and finding ways to improve it.

So, are you a professional developer?

Thanks for reading!