Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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.

share|improve this question

migrated from stackoverflow.com Apr 12 '11 at 19:38

This question came from our site for professional and enthusiast programmers.

    
Please refer programmers.stackexchange.com/questions/155852/… for more on S.O.L.I.D principles –  Lijo Aug 2 '12 at 13:15

3 Answers 3

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 :).

share|improve this answer
    
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. =) –  BrightUmbra Apr 12 '11 at 20:07
1  
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

DimeCasts have a bunch of webcasts featuring the SOLID principles, and at ~10 minutes each not too heavy.

They are using C# on Visual Studio.

As a start, you can go through each video in turn and have a discussion session about it - it will allow you to explain why the principle is important and also show how it is applied.

share|improve this answer
    
I have seen these screencasts - good stuff. Thanks for reminding me. =) –  BrightUmbra Apr 13 '11 at 13:12
    
Solid! Thanks for the link to DimeCasts. –  systemovich Dec 4 '11 at 23:54

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

share|improve this answer
    
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. –  BrightUmbra Apr 13 '11 at 13:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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