Sunday, November 15, 2015

What It's Like Attending a Code Retreat

   (pic I took after code retreat ended @ 8thLight)

Yesterday, I attended my first code retreat in Chicago.  I wondered why I didn't look into doing this before.  Probably (and ironically) because I was too busy practicing TDD at home and at work :).  I say ironically because that's exactly what you do in a code retreat, you TDD!

So going to a code retreat was one of the best things I've done yet and will continue to do so.  I have attended user group meetings, stuff like that which are great, and you talk a lot of code and meet a lot of people but where and when do you actually get a chance to pair with other people and continue on your journey to become a better craftsman?

The difference between a meet up and a code retreat is you really feel like you've gained a lot more when you go to a code retreat IMO.

I figured it had to be worth the time.  After all, yesterday was National Code Retreat Day. After all, Corey Haines will there and a bunch of Software Craftsman.  I realized that this is something I should have been going to years ago.

A Bit About 8thLight

The code retreat was hosted by a great company, 8th Light.  

A large part of 8th Light's culture lies in practices such as TDD and pair programming as well as Software Craftsmanship.  8th Light has played a big role in defining and pushing Software Craftsmanship throughout the world, including a most recent Conference @SCNA which is an event that they run which started years ago.

Here's the breakdown of what I saw in terms of "People"

   (picture borrowed via Corey Haines Twitter Post)

remember these are only my best guesses / ball park:
  • Approx 40 developers total
  • A handful of 8th Lighters.  I don't know, mabye 6?  My guess is that most are already in good hands by working at 8th light to begin with so might not make sense to see a lot of them there
  • 35% of the developers hadn't done TDD before
  • Corey Haines was there..and I personally got some great advice about outside-in vs. inside-out that I'll talk about in my next blog post
National Code Retreat Day

check out #gdcr15 on twitter for chatter and pics.
Yesterday was Global Code Retreat Day.  This happens every year.  

The idea of a code retreat started with Corey Haines (@coreyhaines )

Corey also has a nice video on where he BDD'd some of the original code retreats website, or at least used that site as the use case for teaching outside-in test driven development in that video.

There were 143 code retreats yesterday running around the globe yesterday and that number has been increasing year after year.  

Don't Fret it

Even though I am fairly decent at TDD (so I think ;)) I am always looking to improve and have room to improve.   So even knowing a bit of TDD, I was a little apprehensive the day before, as I've only been coding .NET and lately all Node.js which I plan on continuing on with.  JavaScript is my passion (for the time being at least), however there are other great languages out there such as Go, Clojure, Ruby that I'd like to play more with.  I know there's a crap load of Ruby. 

I was thinking how the heck will I be efficient at a code retreat coding something like Ruby, or Go, or Clojure if I've never played with it yet?  I thought if I don't find a pair who does JavaScript, will I be a bottleneck?  And when the retreat started I found I wasn't the only one who had those thoughts.

So what did I do on the way there? In my SUV, I listened to a YouTube vid on Ruby and realize how freakin nice and easy that language is.  Which means I'll probably now play with it much more just for the sake of being diverse as well.  Node.js is great and all, but Go, Ruby, and Clojure are just as awesome.  Some might argue though Ruby is going bye bye (I'm sure I'll get hit over the head by some for saying that:)).  Doesn't mean I wouldn't code in it or enjoy coding in it though.

What Ended Up Happening?

The host of the retreat ended up encouraging everyone to find partners who programmed in the programming language you are most comfortable with.  Well for me, that's Node.js at the moment and I really didn't wanna do .NET TBH :).  Luckily, a lot of people do JavaScript obviously so it wasn't hard to find pairs that day.  

The host also recommended though to try one language you're curious about and purposely pair with someone who knows a language you don't.  So I found a fella who codes at Sumaritan Ministries.  They do TDD there as well.  They're into a lot of CoffeeScript so he drove during Ping Pong and I implemented to make some of his tests pass.  CoffeeScript is pretty elegant, so it was a lot of fun to work with.

What ended up happening is that most the time devs came and used my existing Node.js test setup with WebStorm, and we coded Mocha.js + Chai.js tests so I was right at home with it and they liked that too.

45 Minute Sessions, then Switch Pairs

You can't get any better than this.  Being able to pair with multiple people on one day.

You bring your laptop.  8th Light already had huge Mac Monitors, and most all had Macbook Pros there so we just hooked up to the monitors, add a couple extra keyboards to each monitor so we can both have a keyboard and you're off pairing.

For me, I love to pair.  I love to TDD all the time.  And what's great about a code retreat is the following:

1) You're practicing by doing a code Kata together with your pair, very simplistic and small scoped segments of code
2) You're doing TDD the whole day
3) You rotate pairs every 45 minutes
4) You delete your code after every 45 minutes and start over with a new pair
5) If you don't like the code you wrote with a previous pair don't worry, you are forced to scrap any code you wrote anyway

Which provides a lot of pluses:

1) With the next pair, you are expected not to think back necessarily how you just implemented production code with the last pair, but encouraged to rethink how to approach the problem, and with new constraints dictated by the code retreat format
2) Any embarrassing code, is gone :).  It's like starting fresh, meeting a new person again, and starting from scratch with your ideas and theirs
3) You learn a lot both code but also approaches to Test Driven or clean code and get a chance to utilize different test frameworks
4) You aren't just shaking hands and having one casual conversation like you would at a meet up, you're having many conversations and your'e coding with people.  This is networking at its best
5) You get to share how you code and share ideas and also gain insight and other ideas from people since they have their code running on their laptop as well
6) The point of a code retreat is not that you can finish the problem.  In fact they design it so you can't!  Nobody finished the Conway's Game of Life Kata Yesterday, not even close.  
7) Everyone there had passion to learn, that's important

What's the Goal?

The point of the retreat is that you slow yourself down a bit and learn.  You don't rush.  All the things we should be doing in our jobs that many employers don't encourage but should be.  And you therefore learn how to become a better coder as a result.

You focus on clean code, simple design principals, and TDD. 

You learn about the 4 Rules of Simple Design   It's the total opposite of a Hackathon..just was looking for lately.

You continue practicing TDD with people who have different experiences and levels of doing it.  

What If I don't know TDD?

Fortunately I got lucky and was able to learn a ton from some guys at 8th Light who I was able to pair with at a previous company for a few months.  However, most people don't get that stroke of luck.  And I call that a huge stroke of luck because as far as I was told at the time, 8th Light doesn't usually go to .NET shops at least not as much (anyone correct me if wrong).

And even so I still have a lot I can improve on and learn as stated earlier.  Before that though, I was like everyone else, trying to self teach myself TDD and it's not easy at first. 

So the best advice I can give any programmer is that: Pairing is the way to go.  By paring,  you work with people who know it well already and want to share their knowledge.  And so I felt that I learned 2 years of proper TDD and design in just 4-5 months.  I didn't learn everything by any means but enough to really make a dent in the way I program and deliver code.


So the format of code retreat facilitates the concept of mentoring.

Not everyone is a TDD master at a code retreat.  There are always a handful of people looking to be engaged in the retreat, and so what do we do?  Those who know TDD pair up with those who don't. Mentoring!  And it's so nice to see devs who have a passion to learn it just as continue to strive to get better and better at it myself as well.

If you do not know TDD but have a passion to learn, this would be a great place to start if your current place of employment doesn't TDD or if you are trying to self teach.  It's better to learn from others with TDD, you'll bridge that gap quicker and learn the right ways to TDD.

So go!  I can tell you right now from my first experience at the retreat you have nothing to sweat.  So what if you don't know it.  The worst case would be, you'd be the one writing the code to make the test that your partner writes pass.  So they'll write the tests, you'll see how that's done, and you'll immediately start seeing the benefits of TDD, trust me.  Even if this is your first time seeing and doing it with them.

We're all In It Together to Share & Learn

The environment is friendly at a code retreat.  Nobody is stuck on themselves, and everyone is very open and listens well to each other.  It's a give and take, and it works very well.

Those of you who are new to TDD.  Devs who do TDD are generally very nice.  I have yet to meet a fellow pair programmer doing TDD who wasn't.  Devs who do TDD do not going to think badly of you if you don't know anything, they want you to learn and succeed.  This is part of Software Craftsmanship.  If anything they're Software Craftsman which means they want to mentor people.  

Software Craftsmanship

See..that's the entire mindset that the Software Craftsmanship movement is all about which people are embracing more and more.  Devs who TDD have already embraced that fully so you're in good hands.  See the Software Craftsmanship Manifesto for more info on what formally defines a software craftsman in terms of this particular movement to better our industry.

Where Do I Go From Here?

Well currently I'm looking to land myself onto a culture and team that is very into TDD's where I belong and have wanted to be for a while now.  Finding those teams is hard.  They exist, but for me in terms of Chicago, they're not in the Suburbs.  They are typically downtown.  So looking there for employment is the best place if you're in Chicago and want to find some Software Craftsman doing TDD.   TDD is just not prevalent yet in the burbs of Chicago. 

I am working on things in the meantime

Eventually I'll expose info that's going to help many people find shops like this, events, people, you name it.  I hope to get that done in the next year or so.  Once that site is running, I'll post a blog post about it and I'd like your feedback.

so, if you or your team does TDD, please follow @WeDoTDD on Twitter, highly appreciate it.