DEV Community

Discussion on: Why I can't recommend Clean Architecture by Robert C Martin

 
albanx0 profile image
Alban X

Theory of relativity is not opinion based, same as gravity, same as computer theory...
Uncle Bob support the Single Responsibility Principle, a function should do one thing and do well, and a long function does a lot of things.

Again you're wrong here, Uncle Bob does just says method must be short, he brings up different examples with charts, comparing bug density of different project (at least in the videos, do not remember in the book).

Have a look here at lest
softwareengineering.stackexchange....

Thread Thread
 
bosepchuk profile image
Blaine Osepchuk

You serious with this stuff?

You think the ideal length of the function is on the same footing as the acceleration due to gravity being 9.81 meters per second squared?

Thread Thread
 
albanx0 profile image
Alban X

If you did not get that, then is useless we discuss about it.

I am serious on the stuff, the computer theory is an exact science, software patterns and models, are not opinion based, and are proven with years of experience and studies.

I can relate you to thousand of article that says the same thing, function length was just an example
swreflections.blogspot.com/2012/12... but I am not going to do that research for you now.

What I am trying to say is that experience and studies have consolidate these things, has nothing to do with opinion based as you say, even you disagree, the best thing to do is to commit to them.

The hardest thing I had to deal in coaching my work teammates, was convincing them that coding using clean code principles was the right thing. Some they were young, unexperienced, other thinking they could write the best code (which only they understand) and the resistance to change thebalancecareers.com/what-is-resi..., are some of the factors you had to deal with, which I think is your case in your article.

And I do not bias you for this, I work everyday with strong opinion based colleagues who thinks "yeah that 1000 line spaghetti code is easy just change that and that"... and loose 7 days on fixing a simple bug, and other 10 trying to extend that code.

I take Uncle Bob for grant, because he has a great experience, he describe exactly what is happening and what will happen in your job, he is not the only one saying those things, and he is basing his writings on theory, studies and solid fundamentals, not on opinion.
And lately especially because I have experienced, tried the benefits of writing clean code.

Again my advice is, be open minded, try, compare, check the benefits, use data and numbers not feelings and opinions.

This web site is a great source of examples if you need one:
refactoring.guru/refactoring/smells