Tuesday, July 14, 2015

Learning Proper BDD / ATDD / TDD is at Your Disposal Now!

A couple years ago, I had a rare opportunity to learn TDD from some of the best craftsmen in our industry.  During that short time, I felt like I learned 2 years worth of training in just 5 months because they were so effective at training and were so good at what they do.  They were 8th light.  And although I am still not perfect at it and it's always a continual learning and correction process, I definitely got a jump start that most people don't normally have the opportunity to receive and soak in.

Now before this happened, I was already a follower of 8th light, Uncle Bob Martin, Craftsmanship, and all that Jazz.  It was just a stroke of pure luck that a new CTO came in and brought in the opportunity to work with and learn form 8th light developers.

And Ironically normally, 8th light doesn't typically go to .NET shops and at the time, I was working in an all .NET shop.  It was just by luck, that we got a new CTO that came in (another location) and brought in 8th light. 

I was working at one of the divisions of the company, while corporate was housed in LA, CA.  They brought in a couple 8th lighters to our division and a couple down in LA.  I was able to pair with a couple 8th Lighters who came on site at our location day-in-day-out for 5 months straight, every day.  
We got stories done with high quality.  We didn't rush.  We didn't take on more story points than we knew we could take on or that would rush us to complete code.  We might not have whipped together and finished 10 stories per sprint, we got probably 8 points done per iteration and done well and done right.

While others rushed to get stories done, or didn't get their stories done because they rushed and got themselves into a mess, we got very small stories done and did not look back.  When I say we didn't look back, it means the TDD cycle did what it was supposed to do.  It guided us, it allowed us insight into code that you'd otherwise not see if you just skipped TDD and went and wrote a bunch o code without it.  And I realized that it really did work, because I was guided by those who have already gone through pitfalls and have gotten Kent Beck's TDD process and intention right. 

What we saw was leaner code and naturally high code coverage, just as most TDD practitioners preach.  It was powerful and it was transforming to me during that time.

What's too bad is that nobody on my team was interested at the time in pairing with the guys from 8th light.  They had heard the preaching of Clean Code, TDD and all that, and knew of Uncle Bob Martin and even attended a couple of his talks.  But they decided to ignore the fact that 8th light was on board and continued to carry on providing "code & run business value" plagued with bugs and late night work and worse, did not yearn to learn anything new and here we had one of the rarest opportunities to do just that!  Nobody wanted anything to do with TDD.  I find it sad, because they really missed out.  Here was our employer brining in some of the best minds in the industry and learning and being mentored by them and they wanted nothing to do with it at this division.  They said 8th light was "luke warm" yet they hadn't even paired with them to take that temperature in the first place.

And because of this attitude, I didn't however get a chance to apply BDD there because the Architect at that place shot it down and told 8th light in a meeting initially that "no we aren't doing that" with no reason other than "he doesn't like it".  He did not want 8th light doing this "BDD stuff" and "8th Light here".  So Fitness or any kind of BDD framework or in memory database to isolate tests were both shot down immediately and basically we just shrugged and said ok nicely and continued on with the TDD because 8th light does not back down to TDD and that's a requirement with clients when they sign with them is that 8th light does TDD, that's how they do their work period.  So what we ended up doing was straight TDD, and skipped the BDD stuff.  


After leaving this company, I took several months off to clear my head.  In that time, you tend to loose some of the stuff you learned simply because you weren't pairing anymore daily.  There were hundreds of things I wrote down, and about half still stick my head.  Enough that gave me confidence that I know somewhat how to do TDD right.  But the other 50% that I lost, that is in my OneNote notes, are ones that are kinda hard to go back and read and remember just the situations I was in when I wrote them down when we were pairing.  

Now I know the value of BDD.  And I'm going back to try to practice it.  It's hard when you weren't able to really understand it.  Because BDD got shot down, I never got that learning process, and proper learning process through 8th light.

But what I'm here to tell you is that you can get some of these killer insights into TDD and BDD and just good architecture through Uncle Bob Martin's videos, particularly this list is what I suggest to check out first, in this order because this order really gets you into the path gradually:

Don't let the language matter.  They did those case studies in Java.  What's important is that you will learn proper BDD and TDD and that's what counts.

This took me back right in the chair.  It was so familiar the way Uncle Bob and Micah were pairing and the stuff they are sharing in those Java Case studies are as if I was back pairing with the 8th light guys again.  Because this is the approach they took with me also.  It was amazing...and here I have a reference back to that, a real reference in how we kinda approached things right here in videos from cleancoders.com.

As developers I can't tell you how grateful we should be to Uncle Bob and Micah for taking the time to create these Case Study vids.  I can tell you that if you watch, you will gain insight that you can't get elsewhere...unless you were to find others who know TDD well already which is very hard to find or get access to.

These are not free videos.  But I can tell you they're not that much and they're well worth the cost.  Don't let the word "free" prevent you from trying at least one of his videos.  I believe you'll find you'll be buying the rest in my list above and possibly more.  This is insight you will not get out on YouTube or other posts, trust me, these are on a league of their own.

Take the time to watch those case studies.  Watch them over and over again.  There are little subtleties in there that you don't wanna miss along with the explicit things they point out during those vids.

I can't express enough to developers out there the benefits you're going to gain.  Buy them.  I'm not here trying to sell for Uncle Bob.  These vids are highly impactful and that's based on my own experience before I even saw these vids and I can clarify that these vids are definitely impactful because it's exactly what I did when I paired with 8th light.  The questions they answer and techniques they bring about, a lot of times answered a shit load of questions I had when I was pairing with them and allowed me to really understand TDD better.

So go watch these videos!  TDD takes practice, time, and you must slow down and not give into the thought of rushing.  You have to tell your employer that hey, this is something that is worth while.  To do that you need to practice and learn it as fast as possible but again that only comes through practice and forcing yourself to stick with it at work for every story you complete at work.  

That usually means you will work after hours at first to bridge that gap..because you need to get the stories done but at the same time you don't know TDD.  It's hard at first.  And this is why I highly suggest watching these vids and coming back to them time and time again as a reference thereafter while you learn and get better at BDD and TDD.

And big thanks to Uncle Bob Martin, Micah Martin, and Corey Haines!

Wednesday, July 8, 2015

The Ultimate TDD Resource List

If you are doing true TDD on your team, please post on the @WeDoTDD twitter page.

I started that page fairly recently as I am compiling a list and this is the start of that.  So please post don't be shy I want to know if your company and team does it.  I want stats on this and hopefully those stats grow and give a better picture of the landscape for who is using it these days.  I know it's growing, that's definitely for sure but it's hard to guage who and how much.

I've worked very hard at learning TDD first in C# and now I'm doing it in all JavaScript these days... and have gained exponential benefits from it for sure.  

Along the way and as I continue on, I have compiled a list of growing resources.  I'd like to share those in a nice list people can kinda dive into in hopefully a simple and clear way.  

This blog post will grow Indefinitely

I'll add items to this list as I find good quality videos, posts, etc.  So keep this a favorite page that you ought to re-visit at times as it grows.

There are a ton of new resources popping up these days on TDD, those resources are growing exponentially I've noticed at a crazy rate.  So it gets hard to keep track of what's all out there on the subject..and which resources help more than others...sifting through that forest can be daunting as someone learning TDD.

This list has links that I feel are worth anyone's time who wants to learn more about TDD.  I'm careful what links I put up as I review the content in them carefully before I suggest them.  

I want people to be able to maximize their time and learn TDD ASAP.  But keep in mind, learning TDD ultimately takes persistence, hard work, and you'll eventually get there and I can tell you that you will love it.  All the haters of TDD usually base it on being informed and bad experiences with it but when done right, it works as described, and works wonders.  You just gotta learn it right from the right people and the right resources.

There is nothing better than to pair with someone who knows it on a daily basis.  That's how you ultimately get a team over that hump.  However, supplemented with these resources below along the way help also but don't think just watching these or reading these will get you to understand and be a Guru at TDD instantly.  

Again it takes work.  It really takes pairing with someone who knows it.  I will repeat that many times.

Also just because you've been burned by it or you saw it work against you, don't disregard it and give up.  There are a lot of places doing TDD wrong.  There are right ways to go about doing TDD.  And if you haven't been exposed to that I can totally understand the fight against it.  But please keep and open mind and start digging into the resources below.  And if you can find someone who knows it well and has had success with it and strive to pair with them.  

I am also color coding the links in this list to hopefully steer you to the best resources to dig into first.  All the links will be quality, but I feel there are some that I suggest to people to start with first as a newbie.  

Here's the legend:

General Learning Sites

Movement Against

OK, haters, go ahead and get it out of your system.  It's good for your health.  Don't keep it in, let it out.  Breath.

Now for those of you with a fresh open mind, listen to these, but take these with a grain of salt.  Meaning These are posts based on those who have been burned by TDD, or who haven't truly tried or understand it, or haven't been guided how to do it properly and thus they end up marching against it. 

TDD has evolved and already been proven, if done right.  But, these guys try to persuade otherwise again based off uninformed experiences or information.

Start Here       

       Definition of
      •  TDD - agile alliance

My appologize for the crappy formatting in the lists above.  They're not aligning as I see it in the blogger editor.  I plan on ditching blogger soon, and please don't use blogger, it's wysiwyg is absolutely horrible.  

This list will grow, will update it sometime this week; I have a lot already handy to list just didn't have time tonight to continue this post yet.