• Home
  • SOLID principles – Yes or No

SOLID principles – Yes or No

Recently I was on some Job interview in some large IT company and their lead .NET developer ask me about my experience in using SOLID principles in building software. That was very interesting question for me because at that time in interview I was not sure what to tell him. Of course, I know what SOLID principles are, and right answer will be always use SOLID … but something bother me when I said this … it doesn’t always make sense if you do SOLID. 

For example if you build smaller project SOLID will add complexity to your app and we all know overly complex applications are an ugly side of software development. While SOLID is mostly a coding concept, there is also an architectural aspect of app, and sometimes the complexity is not in the code, but in the architectural directions taken in the application. Bad architecture is often impossible to fix without a complete rewrite.  Common questions that you must ask yourself when you do SOLID is … Should I split something into multiple classes? How many interfaces should I use? And so on… and this takes time…

Also I ask myself if this company use SOLID principles are their projects not time restrained ( because refactoring your code with SOLID takes some time )?

Alright, I accept that every project is time constrained, but there are times you just need to get the code out and other times when you can “do it right”. If you’re seriously time constrained, adding the technical debt of not using SOLID when you should may be acceptable.

And for you who wants to know more about SOLID principles go here: https://en.wikipedia.org/wiki/SOLID

Thanks for reading…


Copyright by Kristijan Klepač 2018