Brendan Enrick

Daily Software Development

Software Craftsmanship at CodeMash Wednesday

If you’re attending CodeMash 2015, you should join me on Wednesday for my precompiler workshop (even if you attended my workshop last year). We’ll be spending the whole day improving our skills, learning about software craftsmanship, and pairing up on programming exercises designed to help you improve the way you learn and practice your coding skills.

If you’ve never attended a software craftsmanship event before, you really should. The entire goal is making sure that you have fun and are able to continue learning more after you leave the event.

For those lucky few of you staying in the Kalahari (still unlikely, since you would have to bribe someone to have even gotten one), I’ve included a set of directions for how to get straight to the Software Craftsmanship Precompiler.

SoftwareCraftsmanshipPrecompilerDirections

If you eat breakfast in the dining hall before the workshop, we’re just outside of there.

What to Bring

Bring a laptop if you have one.

Try to have an IDE to write some code in. Choose a language you’re familiar with or want to become more familiar with. It doesn’t matter!

Make sure that you have a testing framework and test runner of some kind. As long as you can write unit tests with it, you’re good.

If you’re not sure how to get these things set up, show up early and talk with us. We’ll help if we have the time and correct expertise or we’ll find someone who does!

Speaking at CodeMash 2015

I am very grateful to be speaking at my 6th CodeMash. I’ve again been selected to present a precompiler on Software Craftsmanship (a topic I am very passionate about). I hope that everyone can attend my workshops. I’ve got two of them again, so I’ll be spending a full day working with software craftsman coding. We’ll be focusing as always on practicing, pairing, testing, and applying all of these effectively. We’ll work through ways you can use practice to learn new concepts and patterns to improve your skills at building great software.

SpeakerSelection

Once again, Steve Smith and I will be presenting these Precompiler workshops together, so you’re sure to have a blast!

Our sessions are usually held back-to-back, so that you can attend the beginner session in the morning and follow it up with the intermediate session in the afternoon. Last year, our afternoon session had to have extra chairs and tables brought in for all of the extra people who showed up. My goal every year is to put on a workshop that will be the highpoint of your CodeMash! Join us for some great coding, learning, and practicing of your software skills.

If you’re in the Northeast Ohio area and want to learn more about software craftsmanship, you should check out HudsonSC. Our October meeting has been scheduled already. We meet on the third Wednesday of every month in Hudson, Ohio.

CodeMash 2014 Software Craftsmanship Precompiler Workshop

CodeMash 2.0.1.4 started as one of the coldest CodeMashes on record. On Monday, during the set up time for the event, the temperature in Sandusky dropped below negative ten degrees and the wind chill kept it feeling much colder. It was severely lacking in snow, but the cold was enough to cancel many of the Tuesday precompiler sessions whose speakers were not able to arrive at CodeMash on time to run the workshops.

The conference has grown to the point where it now has two initial days of workshops on Tuesday and Wednesday. Then the conference has two normal conference days filled with sessions. Considering that all of my favorite content is always the precompiler workshops on the first two days, I would love to see the conference have workshops through the entire event. I am usually one of the precompiler workshops speakers, so I might be a bit opinionated on that. From another viewpoint though, since I am one of the speakers during that time, I am often wishing I could attend workshops during the same time as mine! I love running the workshops though, so I gladly give up the other ones. I just need to figure out how to be in two plaes at once (future goal).

CodeMash Precompiler Workshop Details

For those who attended my and Steve’s Software Craftsmanship precompiler workshops on Wednesday, the weather was much more forgiving. Most people had arrived by that point, which meant that our attendance was also good. This was the fifth year that Steve and I had run this precompiler event at CodeMash. We adjust, change, and update the workshop every year. In the past, we had to teach a lot more about the basics of unit testing, but now more people have at least some knowledge of unit testing.

Over the years of doing this workshop here (and similar ones elsewhere), we've found a lot of good techniques and exercises for working with the attendees of the event. We try and experiement with lots of exercises and katas at conferences, events, and user groups, because we're looking for great ways to teach these types of events. When we run them, we are always trying to make sure that most of the event is spent coding. Through this, our goal is not to give an exercise to the attendees. Our goal is to teach them how they can continue their exercising and learning after they leave the event. That's our goal.

We use a few types of exercises: gateway exercises designed to teach you how to practice, guided exercises leading you down a path slowly with steps for freedom along the way, and open-ended exercises giving great freedom and possibilities in final implementations. As part of the open-ended exercise, we often attempt to use that as a plane up which to build a specific type of implementation. We will choose a principle or a pattern and use this plane as an area in which to practice following the principle or pattern. This shows the students how they can leverage programming exercises as places to learn new principles and patterns.

Beginning Software Craftsmanship Workshop

In the morning, we start out our session for beginners just learning software craftmanship. This course is for people familiar with programming (using any language) that want to learn more about software craftsmanship and work on programming exercises with their peers.

As we do every year, I started off the discussion by explaining software craftsmanship and giving an introduction to its concepts. I explain the software craftsmanship manifesto, what it means to developers, and how it relates to the agile manifest. Through this talk, I always make sure to emphasize the importance and reasons for deliberately practicing. As the entire audience will agree, when under a deadline they jump back to their poor practices they know aren't the best. Practice is how we drill ourselves to handle the situation in our own desired way. I make sure that the audience knows as well as discussing and working with others. If I can encourage more people to attend and start software craftsmanship groups, I would consider this talk a great success.

Introduction to Software Craftsmanship Slides

Once we had the reason for why we're all here, we start getting into some of the meat of the workshop. Steve then presented his well-honed talk on software principles. Most of them are designed for object oriented programming, but many are applicable to nearly any language or paradigm. Along the way he of course will cover SOLID, and the slides all contain images from our Software Craftsmanship Calendar. The 2014 edition of the Telerik Software Craftsmanship calendar is out, and everyone at CodeMash received a copy of the calendar.

Software Development Principles Slides

While Steve is wrapping up the end of his presentation, I start passing around sheets of paper (yes, real paper) containing a printing of the first exercise we'll be doing. For our first exercise, we were doing FizzBuzz an exercise that is simple enough that it gets people used to the idea of practicing. This is our gateway exercise. We use this to make sure that everyone is set up with their tools. As long as their setup allows them to write code and run tests, it should be good enough. We include some extra credit with these, so that most people can at least get close to finishing the first part of our exercises. Some people will finish the extra credit, which means that we can have nearly everyone reach a stage of accomplishment. 

We also ask that the entire group pair up, so that they can work on the exercise with others. This accomplishes quite a few things, including helping those who don't have a computer with them.

FizzBuzz Programming Exercise

Interrupting everyone's coding is always a challenge, but I make sure to do it nicely. A microphone helps with this! Now that everyone is set up, we take a break from the coding to talk about practices that we promote to the group. The first of these practices is testing. As is still the case, most people are testing or at least familiar with the practice. As a result, I cover this topic briefly making sure to emphasize the different types and their importance. There are still many groups forced to write integration tests instead of unit tests for example. We discuss how to avoid that situation in the afternoon when we discuss more good practices. 

The second practice that we discuss is continuous integration, however, since we don't have the time to set these up on everyone's computer, we only discuss this briefly and suggest that people try them.

The third practice is pairing, a practice that we've already had the group start in their first exercise. Not only do I cover the methods of pairing, but I point out all of the good pairing practices that everyone was using without thinking. I then point out the importance of changing partners and typists frequently. In their first programming exercise, very few people change who is typing. Since pairing is such a hard activity, we also make sure to cover all of the things that you can do to improve your pairing by changing the environment in which you're working.

Software Craftsmanship Practices Slides

The String Calculator is a guided exercise in which you only read one step at a time. Each step has parts to it, but you do them one at a time. This follows the normal scenario of receiving your requirements a piece at a time. It also keeps you following a plan and gives you a great chance to follow YAGNI. The students do well with this, and it's an exercise that does very well on paper, since you can fold the sheet over the future steps. 

String Calculator Programming Exercise

Intermediate Software Craftsmanship Agenda Workshop

After lunch, we started our second workshop. This one is a half-day workshop designed for people who attend the morning workshop or are already somewhat familiar with software craftsmanship, deliberate practice, or who just couldn't fit the morning session into their schedule. 

Steve starts off the talking in the afternoon discussing design patterns. Steve is an expert in design patterns and refactoring, so he's a great person to present this workshop with. Steve covers a lot of design patterns in this talk. You'll notice that a lot of these patterns have overlap and many of them stem directly from one or more of the principles mentioned in Steve's morning talk. This is not a session to miss!

Design Patterns Slides

Once we're done with the design pattersn talk, we make sure that we start everyone on an open-ended exercise. This year's was the greed dice game scoring exercise where you create code that will score the results of one roll in the greed dice game. It's a simple exercise, but can get a bit unwieldy if you're not refactoring or implementing a good design. We don't suggest that anyone try any specific design for their first attempt.

Greed Game Programming Exercise

We follow up this programming with even more programming practices to follow. I do this talk, which is about more advanced types of testing using mocks, fakes, stubs, etc. We want to make sure everyone knows how to do these. We sometimes do an exercise that can leverage these skills, but we did not this year. We instead showed a quick demo of doing this with a logging system that logs to the file system.

Advanced Testing Practices Slides

Back to Greed again for the final exercise of the day. We finish out the workshop asking everyone to program the Greed game scorer again. This gives the students the chance to attempt a more complex solution to the problem this time around. We had everyone attempt to implement a Rules Engine for the second attempt, which will allow them to follow the Open/Closed Principle.

Overall we received a lot of wonderful feedback from our students, and I hope that everyone who attended goes on to continue doing what we taught in that workshop. Thank you all for attending. Thanks CodeMash for putting on a wonderful event and inviting me and Steve to run one of your precompiler workshops. It is always a fantastic time! I look forward to seeing more of you there in the future. Have a great 2014!

Ball Flow Recap: CodeMash Coding Dojo

CodingDojoFloorDecalsThe coding dojo at CodeMash 2012 was a blast this year. I ran two events in the dojo: a group exercise doing the Gilded Rose kata and the Ball Flow agile game. I thought the gilded rose kata we did as a group exercise was a great success. We had a good group of people, which was impressive considering that even with floor decals, people had trouble finding the coding dojo.

The coding dojo at codemash is a great place for actually doing things at CodeMash. If you’re tired of sitting there having someone talk at you, head to the coding dojo. It’s a place for writing code, learning, experimenting, and having a great time. We did katas, programming exercises, and some educational games in the dojo this year. If you did not make it to the dojo this year, we hope to see you next year!

Ball Flow

The Ball Flow game is an Agile exercise where a team of people work together in an experiment in self organization. The team will do some estimation, some planning, some retrospectives, and they will be trying to continually improve their process while aspects outside of their control continue to change. The team has to adapt and figure out how to keep working together effectively.

Object of the game:

Pass each of the 20 balls to each person in the group.

Rules of the game:

  • A person may touch a ball more than once, but doing so isn’t ideal.
  • Two people may not be touching the ball at the same time.
  • You may not pass the ball to your nearest two neighbors
  • If the ball touches walls (including floor and ceiling) or any furniture it must start over.
  • The person who first picks up the ball must be the last to touch the ball.

What this group did

Our group started out by figuring that if they created an oblong shape, they could pass across pretty easily. They got in this shape and began passing around. They had two tall people stand back a step so that they could launch the ball over everyone else across the group. Their final pass went behind the backs of one side of the group back to the starting person who removed the ball from the game.

BallFlowCircle

BallFlowBasicForm

They spent some time planning and adjusting between each iteration. They made sure not to make big changes fearing the catastrophe that could occur. Each time they made modest improvements to their time.

BallFlowPlanning

As the game went on we added challenges, in one round we added a large number of pens that needed to be passed around as well.

In the final round we added in bags of potato chips, which were harder to throw across the room. Each time the group still managed to make slight adjustments to accommodate these changes and still slightly improve their times.

The CodeMash 2012 Ball Flow team was awesome! Great job everyone!

CodeMash 2012 Recap

Now that CodeMash is over, it’s about time that I deposited information about my experiences at CodeMash 2012 here.

This was my third time at this event that always offers great sessions, workshops, discussions, fun, and bacon.

I am honored to have again been given the chance to speak at CodeMash. I co-presented the Software Craftsmanship precompiler workshops with Steve Smith for the 3rd year running. This year, we broke our day-long workshop into 2 sections: one beginner session and one intermediate session.

Both sessions turned out really well. We had a lot of good verbal feedback from the attendees during the workshops, we had some of our morning people stick around for the afternoon, and I heard from other people that those who attended enjoyed the workshop.  I am really happy with how well it turned out. Thanks everyone who attended the sessions.

Beginning Software Craftsmanship

In the morning we did a beginner’s workshop that introduced the idea of Software Craftsmanship and what values go along with it. We discussed what people can do to get involved with their communities and realign their focus on building good, high quality software. As part of this, we show the group how they can work on improving their skills as Software Craftsmen through Katas and other programming exercises.

We had between 30 and 40 people attend the morning, beginner workshop, including a cobol programmer. We had the attendees mostly working on the Prime Factors Kata through the day. We started them doing the kata with little direction and asked that they do the work solo and without testing. We then had them do the kata again, but this time use testing to keep them on track designing their applications in a simpler way. In the third time doing the kata, we had everyone work in pairs on the kata to see how far they could get as a team using TDD.

Our main goal with the programming exercises in the morning is to have everyone leave with an understanding of pair programming, TDD, how to use programming exercises to hone their development skills, and we wanted them to leave motivated to work with their local communities to all become better at creating quality software. I believe we succeeded in our endeavor. The students talked about how the testing made the work easier and that pair programming was also much easier.

Intermediate Software Craftsmanship

The afternoon focused on some of the same ideas as the morning, but the people in the afternoon know about the values of software craftsmanship. We briefly reminded everyone, as I believe should be done. It’s important to remember and discuss why we do what we do. It gives us a chance to remember and reconsider everything we know and believe.

For this workshop, we had more than 50 people show up for the workshop, which meant that some people did not have table space for their laptops.

In the afternoon we did a few different exercises. One of them focusing on green-field development using good design patterns and practices to help reinforce how to use these effectively. The Greed kata is a great place to try out the strategy pattern as well as a few other good patterns. In the exercise, you continue to get more and more scoring rules added. Eventually, you want to get to following the Open/Closed Principle so that you’re not changing the existing code each time.

The other exercise we did is one which starts out with existing code to refactor. In the refactoring exercise we ask you to add a new feature. It then becomes your choice how to do it. You could just hack in an “if” statement. You could also take some time and refactor. Before you refactor, however, it’s usually a good idea to try to get some tests in place. To make things even more like real code, you need to perform a couple of careful refactorings before you can put your first tests in place. You also get to decide how many tests you want to write and how much to refactor when adding this new feature.

Future Events

If you want to take part in this or a future workshop, I am hoping that CodeMash will invite me back next year to do another great workshop or two. I am also hoping to do a free Software Engineering 101 event again in Cleveland.

My First CodeMash

As a late adopter of CodeMash I can say that version 2.0.1.0 was a great event. There were hundreds of developers there ready to learn and try new things. The intelligent, interesting people sparked many worthwhile conversations. If you’re in the area around Sandusky, Ohio, I highly recommend that you attend the next CodeMash.

Not Your Everyday Conference

I was very pleased with how things were handled with CodeMash. It didn’t feel like the standard “sit in your seat while someone talks at you for an hour”. I really think that involving people is the best way to spread knowledge. One of my favorite quotes touches on this perfectly.

Tell me and I forget. Teach me and I remember. Involve me and I learn.

I can’t say what it was like at every session at CodeMash, but the sessions I attended tried to include the audience when possible.

Software Craftsmanship Workshop

CodeMash has a precompiler the day before the event. The precompiler is a day with two time slots of four hours each. Steve Smith and I ran a workshop during that timeslot. Our Software Craftsmanship workshop went very well. We started by introducing everyone to the concept of Software Craftsmanship. At the end of the day I like to boil this down to people caring about writing good, clean software.

So how does one get better at writing good, clean software? Practice.

  • Write something small and write it well.
  • Try new approaches to a known problem to see if you can improve upon it.
  • Follow along with a known good solution and understand how someone else solves things.
  • Take some bad code and refactor it again and again.

In case you haven’t guessed the goal of our workshop was to give people some practice as well as show them how they can practice on their own in the future.

We started with the Bowling Game Kata from Uncle Bob Martin.  First we went through the slides discussing at each step what he was doing and why he was doing it. This is a great exercise because it lets you see what Uncle Bob does when he hits a wall and needs to back up. At one point in the Kata he realizes that the path he is going down is not correct. This shows you how to identify this situation and then how to resolve it.

After this quick introduction we had everyone dive in with their favorite language attempting to calculate the score of a bowling game.

We continued on with some other exercises including: discussion of followed by implementation of a Supermarket Pricing system and we ended with a bit of fun with FizzBuzz.

I hope those who attended enjoyed the experience, and I welcome everyone to come by our Hudson Software Craftsmanship meetings which meet on the third Wednesday of the month in Hudson , Ohio.

Coding Dojo

This year CodeMash also had a Coding Dojo dedicated to these exercises. Instructions were provided explaining the requirements of the exercises. Some are katas like the bowling game and others exercises to challenge you with creating a good, clean solution to a relatively simple problem.

We recommended people work in pairs with someone they didn’t know, but we had a few people working solo.

Sara Ford stopped by the coding dojo and it seems had a beef with my overuse of the word “kata”. If you’re interested, Steve Smith wrote an interesting response discussing coding katas. The bowling game is a kata to be followed along with and matched exactly. The more closely and exactly that one can match how UncleBob does the kata the better. Some of the other challenges presented there I probably should have titled as “exercises”. Next year, I’ll make sure to have more time to prepare the coding dojo. I hope to see you there.