DEV Community

Sazardev
Sazardev

Posted on

Clean code doesn't make your bosses happy.

Talking about one of the legends like Robert C. Martin with his very famous book Clean Code makes one of the experts in the field wonder if he will say something good or bad, and although many like to follow the design pattern or philosophy of Clean Code I certainly can not agree that this helps in speeding up the programming.

Don't get me wrong, I love the architecture, development, style and design of Clean Code, but in the real world it is very difficult to implement this kind of things unless you are in a big company, your bosses give you reasonable lead times or you are just a software architect with a lot of free time.

But as far as ordinary programmers are concerned, doing clean architecture is torture, it slows down delivery times, it slows down programming, it slows down the programmers' Eureka! moment, turning them into constant boilerplate machines all over the code. It keeps order, but... At what cost?

In my experience as a Freelancer using technologies like JavaFX, Android, Electron.js, Ionic, Flutter or Angular is always critical to have a framework that allows you to streamline all processes and deliver to the client as soon as possible the product requested with the desired quality and desired functionality, and ... It is not always possible to do this, even if you are a junior or senior programmer is always complicated to deliver these projects when delivery times are tight, and... It is not always possible to do this, even if you are a junior or senior programmer is always complicated to deliver these projects when delivery times are tight.

There is always the possibility of expanding the hours, but being a freelancer there are hundreds of programmers that sometimes offer the same quality as you and with a much shorter delivery time, so you always have to think about competing with this, it is a long competition of who offers the best in the fastest delivery, many clients are not even interested in quality, they just need the code urgently, and when we put together the clean code with being fast... That's when everything falls down.

Image description

It seems exaggerated, but being a freelancer you will experience cases where clients ask for exaggeratedly ridiculous times, but with an excellent pay, so it's up to the programmer (that's you), to decide if it's worth delivering an incredibly dirty code, desperate, sleepless, and a good cup of coffee in order to deliver that software on time for the client.

Top comments (1)

Collapse
 
sreno77 profile image
Scott Reno

I guess it depends on how you define "Clean Code." Uncle Bob has some good points but he goes a little to far on others. Functions should do one thing but a 10 line function isn't too long (even if Bob says it is).

Clean Code is code that is easy to follow, understand and update. There should always be time for that. If you don't write it "cleanly", you will regret it later.