DISCLAIMER: The article is in no way an intention of bragging about my development capabilities. The intention is only to emphasize in so many ways on a rule which can surely, in my opinion, help developers improve quite a notch and become a better developer. I would like to reach as many developers as possible with an intention to create a belief in them regarding the principle I spoke. Thanks for reading the blog. Please feel free to share.
For several years that I spent in IT industry while working on a different roles and responsibilities such as developer, technology lead and architect, I was looking for that ONE THUMB RULE that would have made me a great developer. Additionally, I also wanted to know what rule could I follow to put great architecture or great software design? I always wondered if any such role even existed that I could have called UNIVERSAL RULE that I could use architecture, design and development phase. I also wanted to share this rule with others including fresher/junior developers such that they could focus more on solving business problems using IT and not get bogged down by software quality issues? Well, I knew my intention was great. But, whether it was possible to find such rule kept me researching.
Did it sound like me getting over ambitious? 🙂
Then, thankfully, Destiny pull happened!
I landed in a small software services company based out of Hyderabad which was bleeding with software code quality issues with its customer making major complaints on code issues and poor developers. Quite a challenge it was as I was better but still unaware of that thumb rule. This was the time I got my Eureka Moments!
This is when I got opportunity to try and experiment with what is called as “Single Responsibility Principle (SRP)“. The SRP principle is one of the SOLID principle which is primarily a set of principles for object oriented programming.
SRP recommends that every class or method should do just one thing and that’s it. In another words, the class should have just onee reason to change. The principle can be stretched to architecture and design. The idea is that every module or application should try and achieve one larger objective consisting of smaller functionality which could be split into multiple packages and classes.
Fine, but the question you may ask is how did it make me a great developer and how did it help me solve the code quality issue of the organization I joined. Valid questions.
This only principle helped me to write code of great quality in following manners:
Today, if I have to suggest JUST ONE RULE for greater code quality, it has to be SINGLE RESPONSIBILITY PRINCIPLE. Let me know what you think about this.
In recent years, artificial intelligence (AI) has evolved to include more sophisticated and capable agents,…
Adaptive learning helps in tailoring learning experiences to fit the unique needs of each student.…
With the increasing demand for more powerful machine learning (ML) systems that can handle diverse…
Anxiety is a common mental health condition that affects millions of people around the world.…
In machine learning, confounder features or variables can significantly affect the accuracy and validity of…
Last updated: 26 Sept, 2024 Credit card fraud detection is a major concern for credit…
View Comments
Good point about srp but havent met anyone who calls himself a great developer ... So you are pretty close to Jeff dean or Linus...
Thanks Kris for your comment. I was only trying to attract attention of those who have been struggling with code quality issues, with absolutely no intention of bragging:-) cheers!
I admit, while I was put off by the name, I was drawn in to read it. And, I was pleasantly surprised when I agreed with what I read. SRP is super powerful that impacts everything: readability, testability, maintainability and more. Whenever I get on a new team, I ask who has read Bob Martin's Clean Code and highly suggest those that haven't give it a read; no matter what point you are in your career. Not that people have to agree with everything in the book, but I guarantee it will open up ideas for crafting better code.
Thanks Brian for your comment. Over a period of time, I have realized that this one principle, if applied, can not only help developers write better code, but also help in clean design. Also, the title "great developer" was chosen intentionally to attract attention of those who are always advised by their managers to become a "great developer". I am glad that the title was able to attract attention of those like yours and share your comments.
Very useful and good title as brian said. Thanks for the sharing brother :)
Thanks Raj for your comment.
Couldn't agree more
Thanks for the great article.
thanks Michael for those words.