Early on, you learn a lot of rules.
Always handle the error.
Never trust user input.
Keep functions small.
You follow them because someone told you to, and following them keeps you out of trouble.
That is fine at the start.
But there is a level you get stuck at if you only ever collect rules.
Because rules without reasons are brittle.
You apply them everywhere, even where they do not fit.
And the moment you hit a situation the rule did not anticipate, you are lost, because you never understood what the rule was protecting you from.
So here is the shift that matters.
Stop learning the rule.
Start learning the why behind it.
When someone says keep functions small, do not just nod.
Ask why.
The real answer is not that small is holy.
It is that a function you can hold in your head is a function you can change without fear.
Once you understand that, the rule becomes flexible.
You know when a slightly longer function is fine, and when a short one is hiding the real problem.
You are no longer obeying.
You are deciding.
This is the difference between someone who has two years of experience and someone who has the same year of experience twice.
Both know the rules.
Only one of them knows what the rules are for.
So every time you meet a best practice, a convention, a should and a never, do not just file it away.
Dig one level down.
What breaks when you ignore this?
What pain did someone feel that made them write this rule down?
When you understand the pain, the rule stops being a cage and becomes a tool.
You can wield it, bend it, and know exactly when to set it aside.
That is what senior really means.
Not memorizing more rules.
Understanding the reasons well enough that you could have invented the rules yourself.
Learn the why, and every rule you meet after that gets easier.
– Asael Shinder
Top comments (0)