<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-16292303</id><updated>2011-11-22T07:52:40.232-08:00</updated><category term='kata dojo focused practice software'/><category term='software pairing TDD testing commit focus'/><title type='text'>Pursuit of the Software Craft</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://kbaribeau.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16292303/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://kbaribeau.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Kevin Baribeau</name><uri>http://www.blogger.com/profile/13491337278092065363</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>3</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-16292303.post-8136727358074598756</id><published>2009-05-03T10:57:00.000-07:00</published><updated>2009-05-03T10:59:39.227-07:00</updated><title type='text'>Moving to wordpress</title><content type='html'>I've moved this blog over to wordpress.  Feature-wise, it appears to be the superior platform.&lt;br /&gt;&lt;br /&gt;There are still a few things I don't like about it, but it appears to be customizable enough that I can fix them as I have time.&lt;br /&gt;&lt;br /&gt;Anyway, I've imported all (ok, both) of the posts from this blog over there, and put a new post up.&lt;br /&gt;&lt;br /&gt;Please update your feed readers to point to http://kbaribeau.wordpress.com/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16292303-8136727358074598756?l=kbaribeau.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbaribeau.blogspot.com/feeds/8136727358074598756/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16292303&amp;postID=8136727358074598756' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16292303/posts/default/8136727358074598756'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16292303/posts/default/8136727358074598756'/><link rel='alternate' type='text/html' href='http://kbaribeau.blogspot.com/2009/05/moving-to-wordpress.html' title='Moving to wordpress'/><author><name>Kevin Baribeau</name><uri>http://www.blogger.com/profile/13491337278092065363</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16292303.post-3383904651303958777</id><published>2009-03-19T22:18:00.001-07:00</published><updated>2009-03-20T07:50:54.745-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='software pairing TDD testing commit focus'/><title type='text'>Hard Problems</title><content type='html'>I ran into a hard problem today at work.  Here it is:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Given two strings, check that the first does not contain a sequence of 3 consecutive letters that are also contained in the second.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Look easy?  It should.  I don't know of very many easier problems.  After implementing it though, I can't truthfully say that it was easy for me.  But, I don't think the lessons I learned today are easy either.&lt;span style="font-weight: bold;"&gt;  &lt;/span&gt;As far as I can tell, I made three mistakes:&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Lesson #1: Be careful when picking your test cases&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;It's easy to pick a test case that's either too hard, or too easy to implement.  If you pick a test case that's too easy, you and your pair risk getting bored.  Oddly enough, this is almost never a problem unless you're actively trying to avoid picking a test case that's too hard.&lt;br /&gt;&lt;br /&gt;So, if you're bored, then your tests are too easy... how do you tell when your tests are too hard?  Well, that's another hard problem.  I don't think I've nailed this down completely yet, but here are some clues I've learned to spot:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;It takes more than one try to get your newest test to pass&lt;br /&gt;&lt;/li&gt;&lt;li&gt;When you do get your test to pass, another test fails&lt;/li&gt;&lt;li&gt;Your pair doesn't understand what you just did&lt;/li&gt;&lt;li&gt;You find yourself wanting to refactor against a red bar&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;My advice when you run into &lt;span style="font-style: italic;"&gt;any&lt;/span&gt; of these indicators is to stop.  Stop writing code.  Revert to a green bar.  Now you have two options:  Refactor, to make things easier; or pick a different test.&lt;br /&gt;&lt;br /&gt;Sound easy?  Try it.  There's two reason why it's not.&lt;br /&gt;&lt;br /&gt;First &lt;span style="font-weight: bold;"&gt;it's hard to admit when you've picked a test case that's too hard to implement.&lt;/span&gt;  We're programmers (craftsmen if you will), it's our job to solve hard problems.  We take pride in our ability to do so.  We &lt;span style="font-style: italic;"&gt;want&lt;/span&gt; to make that next test case work.  Taking a step backward and reverting the code you just wrote (that doesn't work) is an admission that you've made a mistake.  Admitting this mistake is especially hard to do when you're working on an "easy" problem.&lt;br /&gt;&lt;br /&gt;Second, &lt;span style="font-weight: bold;"&gt;both of these options require you to THINK&lt;/span&gt;.  It's tempting to think that if you tweak a conditional here or extract a method there you'll see a green bar soon.  This rarely turns out to be the case.  Even the easiest problem is going to require you to stop and think about the solution; probably more than you expected to.&lt;br /&gt;&lt;br /&gt;If you run into this, Stop.  Think about the problem.  Discuss it with your pair.  Then, take another crack at it.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Lesson #2: Commit Often&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Today&lt;span style="font-weight: bold;"&gt;, &lt;/span&gt;my pair and I ran into all of the clues listed above, and failed to stop.  It was at this point that we got burned by lesson #2.  We realized what was going on, and wanted to revert to our last green bar.  We hadn't committed in 90 minutes.  We were stuck with broken code.  Oops.&lt;br /&gt;&lt;br /&gt;I don't have a strong opinion on when you should commit.  Ideally, I would say you should commit on every green bar, or after every refactor step; whichever is easiest to remember for you.  Of course, some teams are cursed with long running unit tests.  Since you don't want to commit without running your tests; this makes it difficult to commit so frequently.  Do what you can to keep your tests running quickly, but in the meantime, find some balance between committing often and not letting your tests slow you down.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Lesson #3: Focus on your work -- No Distractions&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Today, during the "embarrassing pairing session", I had an interesting email thread zipping through my phone, which dutifully beeped at me every few minutes.  Every once in a while I'd try to keep up with it, meanwhile completely losing my focus on the problem and relying on my pair to get me back up to speed when I was done.&lt;br /&gt;&lt;br /&gt;Please, be wary of checking your email or other distractions when pairing on a problem.  If you're not at the keybaord, your job is (among other things) to help figure out the next test, watch for warning signs like the ones I listed above, and maintain code quality.  You probabaly can't (I know I can't) do any of these things while checking your email, or carrying on a casual conversation with a friend.  Also, respect your pair.  If they're working, you should be too.  They're going to resent you if you don't pull your weight.&lt;span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16292303-3383904651303958777?l=kbaribeau.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbaribeau.blogspot.com/feeds/3383904651303958777/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16292303&amp;postID=3383904651303958777' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16292303/posts/default/3383904651303958777'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16292303/posts/default/3383904651303958777'/><link rel='alternate' type='text/html' href='http://kbaribeau.blogspot.com/2009/03/hard-problems.html' title='Hard Problems'/><author><name>Kevin Baribeau</name><uri>http://www.blogger.com/profile/13491337278092065363</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16292303.post-5423648050670906148</id><published>2009-03-03T21:10:00.000-08:00</published><updated>2009-03-03T22:11:31.066-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='kata dojo focused practice software'/><title type='text'>Focused Practice</title><content type='html'>&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;br /&gt;We all want to be better at what we do, right?  But how do we go about improving our skills? I think the answer is the same, whether you're an aspiring software developer, musician, martial artist, or whatever.  The key is &lt;span style="font-style: italic;"&gt;focused practice&lt;/span&gt;.  You need to put time into developing your skill.  You can't &lt;span style="font-style: italic;"&gt;just&lt;/span&gt; put time in either.  It has to be focused time.  This is time where you're consciously thinking about your craft, critically analyzing your work, and looking for ways to improve it.&lt;br /&gt;&lt;br /&gt;Some of this possible during your day-to-day life; but in my experience, you always get better results by setting aside a special block of time to work on a skill.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Code Katas&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The best way I've found to apply this to software is through code katas.  A code kata is a problem simple enough that developers of any skill-level should be able to solve them.  A kata is also small enough to solve in a reasonable period of time.  My learning process currently goes something like this.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Pick a skill I want to improve at.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Pick a kata to solve, and a language to solve it in.&lt;/li&gt;&lt;li&gt;Solve the kata while focusing on how to apply that skill to the kata.&lt;/li&gt;&lt;/ol&gt;For example, let's say I wanted to work on my TDD-fu.  I would pick a kata that I knew reasonably well; in my case that's the bowling problem.  I would pick a language that I knew well, and had a good testing framework; that would be java and junit.  I would then implement a solution while thinking about things like...&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;How much code am I writing per test?  Should I be writing more? Less?&lt;/li&gt;&lt;li&gt;Is my test naming clear?&lt;/li&gt;&lt;li&gt;Am I remembering to think about refactoring every time I see a green bar?&lt;/li&gt;&lt;li&gt;Am I aware enough of what's going on to know when I've made a mistake and chosen a bad test?&lt;/li&gt;&lt;/ul&gt;You can use code katas to improve your skills with just about any technique related to software development.  Just to name a few, they work well for improving your pairing practices, new languages, writing good OO code, and learning new tools.  You just have to pick a focus.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A Coding Dojo&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;There's been lots of success stories recently about coding dojos.&lt;span style="font-weight: bold;"&gt;  &lt;/span&gt;A dojo gives us a social context in which to work on our katas with other like-minded people.  It's a great mechanism to get feedback on your work, but the downside I've found is that a lot of people are intimidated by this.  I think the best way to deal with it is just to work on a kata in your own time until you're comfortable with it, and then bite the bullet and seek some feedback.&lt;br /&gt;&lt;br /&gt;You can find more information about code katas and dojos at &lt;a href="http://codingdojo.org/"&gt;http://codingdojo.org&lt;/a&gt;.  See the kata catalogue if you just want to get started.  There is another list of problems I've found useful &lt;a href="http://sites.google.com/site/tddproblems/"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16292303-5423648050670906148?l=kbaribeau.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kbaribeau.blogspot.com/feeds/5423648050670906148/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16292303&amp;postID=5423648050670906148' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16292303/posts/default/5423648050670906148'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16292303/posts/default/5423648050670906148'/><link rel='alternate' type='text/html' href='http://kbaribeau.blogspot.com/2009/03/focused-practice-we-all-want-to-be.html' title='Focused Practice'/><author><name>Kevin Baribeau</name><uri>http://www.blogger.com/profile/13491337278092065363</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry></feed>
