In Defense of Uncle Bob and the SOLID Principles

Since blogs and podcasts are so searchable these days, I have no doubt that many novice programmers will find the material discounting the SOLID  principles and the work of one of the founders of the Agile movement.

Context:  Original published audio programFirst response by Robert MartinAttempt at clarification by Jeff AtwoodFurther backing of SOLID principles by Robert Martin.

By the blog comments on each of these, there are people with strong opinions on both sides.  I don’t think it is as black and white as taking sides.

For what it is worth, I, and my company, have found the SOLID principles very beneficial for the quality of the software systems we build.  By applying them weighted against experience, systems are easy to maintain and extend. 

Lack of experience might cause someone to attempt to apply them in a dogmatic, bureacratic manner.  This would fail just as surely as any attempt made by an inexperienced programmer; however, the appropriate application of these principles is a boon to a codebase.  I have found that my more senior programmers are able to apply the principles through experience, and those who are still learning the principles can see the concrete applications of them and duplicate them. 

The results are very clear and very positive.  For instance, on our current, largest project, the codebase continues to be easy to maintain and extend weekly.  Even complex business logic is easy to break down, test and verify.  New logic can be layered on (extended) without causing lots of churn with existing code (OCP).  The application of the SRP causes our code files to be small enough to understand quickly, and interface and method names are very specific, describing the responsibility.

I am not on a crusade to change the entire industry.  That takes time, and customers still don’t value success enough to ask the tough questions before hiring programmers.  Until the marketplace demands higher quality work, programmers around the world will continue getting paid for shoddy software.