Junior need rules, senior guidelines

Bruno Noriller - Jul 2 '23 - - Dev Community

Working Effectively with Legacy Code by Michael Feathers, Refactoring by Kent Beck and Martin Fowler, The Mythical Man-Month by Fred Brooks, and countless others.

You know them, you probably agree with all if not mostly because they give situations, scenarios, and guidelines of what to do. Sometimes you know and agree without even having read them.

Then you have Clean Code by Robert “Uncle Bob” Martin. Love or hate it, it’s easier to find someone who has read and has an opinion about it than the others you just “agree with”. Why is that?

The power of “creating rules”

I was listening to a podcast where the hosts and guests were discussing programming books and of course, the Clean Code was mentioned. Some liked it, others didn’t and no other book had generated that kind of discussion.

The thing that Clean Code does that other books don’t is that it’s not a “discussion”, it doesn’t “depend”, it just “is”. There are “rules”, there is a “right” and a “wrong”, and you should follow them, period.

This makes people either love it or hate it. People who don’t know it better probably love it because you don’t need “to think”, you just need to follow the rules. Others that know better, know that it “depends” and for situation ABC it would be better XYZ.

This is also the internet today

If Clean Code were a “normal” book presenting multiple scenarios and best practices that “depends” and everything other books do… it would be “just another book”.

People would read, agree, learn something, close it and that would be it. But by making it about “this is right” and “this is wrong” it became unique.

Junior or Senior? Well… it DEPENDS!

Some time ago, I learned that one thing that makes someone junior or senior is the “depends”.

A junior doesn't know better, so there’s no “depends”. It’s a person with a hammer trying to make everything a nail to be hammered.

The internet loves to joke that you’re a senior when everything can be answered with “depends”. But that’s just the first step into seniority.

Transcending senior means that, yes, while everything “depends”, you know how to narrow the options down… to the one to follow and tell everyone else “why”.

Junior needs rules.

So, since a junior doesn’t know better than the hammer in their hand, this means they need clear rules of what to do and what not to do.

Even if the rules are not the best for that situation, I can say that it doesn’t matter and that’s where a book like Clean Code shines! Right or wrong, it tells people one way of doing things, no thinking needed.

With time they will probably find multiple situations where the rules don’t apply and it will feel weird to try to apply the rules handed down to them… so they won’t.

With time, their repertoire of “depends” will grow until…

Senior needs guidelines.

Everything will be a “depends”.

You learned multiple tools, you passed through multiple situations. So you know there are multiple approaches and that’s just what you know you can pull off because there would be a lot more that you know are a possibility but never actually tried.

You don't need rules, because you know they won’t fit all problems. However… guidelines? That you can welcome.

With guidelines you can trim multiple “depends” right off the bat and make steps to transcending “senior” because you will be able to trim and narrow the decisions more effectively.

So, the “normal” books come with the solutions here. Probably not on a silver plate. But it will be there and will help with multiple problems to come.

I’m totally right about it, trust me. ;)

Jokes aside, I have a quote that fits here and sums up the “why” I write stuff:

"The purpose of a storyteller is not to tell you how to think but to give you questions to think upon." - Brandon Sanderson

Although for me it’s the other way around. Something comes up that makes me think about it, then I write because it’s what I thought about it.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .