Sign up ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

I've got a group of very talented, yet new, developers on my team. I've fully embraced the SOLID principles in the projects I'm working on, and my fellow developers have seen the wisdom of the ways - but I am not an experienced teacher (nor am I an experienced student - everything I've learned I've learned on my own or from blog posts). I've been given leeway to hold teaching sessions with these guys, but I need to come up with some sort of lesson plan or else I'll probably just confuse and frustrate them and myself.

There are plenty of resources on the web that describe or introduce the SOLID principles, but I haven't seen many that go in depth with them, and I've seen none at all that discuss how to teach them. Am I missing some resource that's already out there for this?

We're .NET developers, a mix of C# and VB.NET, so while I'll take examples in any language, .NET examples will be the best help as I won't have to translate them before showing them to my team.

I should mention that we don't have a budget for books. Feel free to mention them, but bear in mind that if they're not cheap, they'll need to be really compelling for me to consider. I won't be reimbursed in any case.


migration rejected from May 11 at 2:14

This question came from our site for professional and enthusiast programmers. Votes, comments, and answers are locked due to the question being closed here, but it may be eligible for editing and reopening on the site where it originated.

closed as primarily opinion-based by Ixrec, durron597, jwenting, MichaelT, Snowman May 11 at 2:14

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise.If this question can be reworded to fit the rules in the help center, please edit the question.

Please refer… for more on S.O.L.I.D principles –  Lijo Aug 2 '12 at 13:15

2 Answers 2

up vote 16 down vote accepted

Great question. Once I read Robert C. Martin's book Agile Principles, Patterns, and Practices in C#, I just felt the desire to teach them at work.

My manager supported me and allowed me to take the whole team (about 10 developers at the time) out of work for an hour a week, and present to them all.

Here are the lessons I learned from this:

Strictly after 60 mins, they begin to loose interest, unless you can keep them interactive the whole way through. Now, I always felt even 60 mins was perhaps not enough time to explain each principle from an academic point of view and then mainly a "Real-World" perspective.

What I found to be absolutely effective, was taking the current companies code, and showing them a problematic area, and a before and after the principle was applied. It was even more effective, when people had burning issues with a product, that they couldn't solve. So I took those problems and resolved them with SOLID, and showed the process of how I achieved that.

One lesson per week was plenty for them to think about. I usually would have days of discussions of that one principle right up until the next week and beyond. It was quite pushing for time also trying to get the presentation prepared, finding some code that wasn't going to step on peoples toes if I showed it up on a projector etc. Bear that in mind - use your own code if you can, or at least get the developers permission, and better yet, teach him before the presentation and let him present the solution with you - this worked great also!

I threw in the Clean Code principles in there too, then progressed on to SOLID, then branched in to testing and TDD. I have the course I prepared for the whole thing. I don't mind sharing that if you drop me a message :).

Oh, and everyone hates the Liskov Substitution Principle. Was hard for me to dig out an example of this in the company software.

I found the more academic the presentation was, for example, this is a class Shape, this is a class Circle that derives from Shape, etc, the more boring it was for them. I would throw in a very quick academic example after explaining the principle, then focus mainly on a real world problem that they can relate to.

If you don't fancy the thought of class room presenting, maybe you can just do the digging out of some of the companies code, a before and after, and a document attached explaining why it is you changed it in such a way, to conform to SOLID. People can then read it and study it in their own time. I did this post presentations and some people found that more useful. They were also uploaded to a company Wiki.

So happy to see more people willing to teach SOLID off their own back. Well done :).

This is almost exactly what I have in mind =D I'd love to see what you came up with - my email is erikforbes at gmail dot com. =) –  Erik Forbes Apr 12 '11 at 20:07
This mirrors my experience with it. I work on a team of approximately 20 developers, and there are maybe 2-3 of us with the drive to apply Agile principles who are really passionate about improving quality. We hold sessions, one hour each Thursday afternoon, where we go over an area of the product we develop to include ways to use it, and bugs we have fixed. Spending a few minutes in the ivory tower is ok, but I have found that discussions have to be grounded in reality to have any lasting impact on the audience. –  Snowman Apr 13 '11 at 1:05
I'd love to see what you've come up with also. Any chance you could upload it to a free file host (Mediafire etc.) for general viewing? –  CraigTP Apr 13 '11 at 10:45

Make them clean up a few messes that come out of not practicing SOLID principals. Object lessons last.

I should clarify that I'm not in a supervisory position over them - just a team-mate - so I can't exactly make them. ;) But good point nonetheless - that is indeed how I learned to apply them. –  Erik Forbes Apr 13 '11 at 13:12

Not the answer you're looking for? Browse other questions tagged or ask your own question.