Last week one of the account managers in the company I work for asked me to edit a little feature we have on one of the websites we manage,
Turn out I spent almost a week on that task.
If that happened to you, this is the time to change!
This website is very old and it is not actively managed, it was developed a long time ago then passed from developer to developer.
I must say, I work on it only once or twice a year.
The task itself was really easy and should have been a quick fix…
It took 2 days only to understand what I was looking at.
Why do we like messes?
I realized that this is a common problem while deciding to refactor some code.
I really did not enjoy spending my time there, taking note of which interface was doing what, where a class was invoked and why there were methods 200 lines long.
As web developers, we are creators we want to see stuff on a web page that was blank only a few minutes before.
We must do in conscientiously though!
The way to write good code
Software engineers have been there for years and some of them have developed theories and principles that have been proved right times and times again.
One of the most famous and engineer that has done it is Robert Martin,
he has created a set of 5 principles that, if followed, will make every program scalable and most important incredibly easy to read.
That is called S.O.L.I.D.
What can you do?
It’s time to stop wasting days try to understand code written ages ago.
You can do it, and it only requires to follow 5 principles.