Skip to content

Commit

Permalink
Pair with Me + Pairing posts
Browse files Browse the repository at this point in the history
  • Loading branch information
marksim committed Apr 25, 2013
1 parent 4389d9b commit efc777f
Show file tree
Hide file tree
Showing 6 changed files with 86 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .rvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
rvm use ruby-1.9.3-p0
rvm use 1.9.3
5 changes: 4 additions & 1 deletion sass/custom/_colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
// To give it a try, uncomment some of the lines below rebuild your blog, and see how it works.
// If you need a handy color picker try http://hslpicker.com

$page-bg: #FFF;
$header-bg: #DEDEDE;
$title-color: #1488B0;
//$header-bg: #263347;
//$subtitle-color: lighten($header-bg, 58);
//$nav-bg: desaturate(lighten(#8fc17a, 18), 5);
Expand All @@ -16,7 +19,7 @@


/* To use the light Solarized highlighting theme uncomment the following line */
//$solarized: light;
$solarized: light;

/* If you want to tweak the Solarized colors you can do that here */
//$base03: #002b36; //darkest blue
Expand Down
3 changes: 2 additions & 1 deletion source/_includes/asides/pairwithme.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<section>
<a href="http://twitter.com/home?status=@marksim+wanna+pair+with+me+on+a+problem?" title="Pair program with me!"><img src="http://pairprogramwith.me/badge.png" alt="Pair program with me!" /></a>
<a href="https://kiwiirc.com/client/irc.freenode.net/pairwithme" title="Pair program with me!"><img src="http://pairprogramwith.me/badge.png" alt="Pair program with me!" /></a>
<br/>
<strong>9:00pm-10:00pm CDT Monday, Tuesday and Wednesday</strong>
</section>
17 changes: 17 additions & 0 deletions source/_posts/2013-04-24-creating-a-culture-of-pairing.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
layout: post
title: "Pairing as a Life Habit"
date: 2013-04-24 09:33
comments: true
categories:
---

I'm interested in creating a culture of pairing... not just in my workplace, but in my life. I want to be able to pair with people in order to improve on the skills I alread have. This is seen clearly in the relatively new [#pairwithme](http://www.pairprogramwith.me/) 'micro-movement' that is happening on [twitter](https://twitter.com/search?q=%23pairwithme&src=typd). It shows that people want to learn from each other and improve their craft.

But it doesn't have to apply solely to programming. Last weekend I "paired" with a neighbor to fix my lawnmower. He is a bit more mechanically inclined than I was, but it took both of our efforts and problem solving to diagnose and fix the problem. All in all, a worthwhile time where I improved both my relationship with Ben and my ability to cut my grass. He got something out of it too, he felt great and is excited to tackle more mechanical projects. This is exactly the same reasons we talk about the benefits pairing in the first place.

It makes me wonder how we can do this in other areas of our lives. Maybe it doesn't look quite as analogous as fixing a mower does to solving a [puzzlenode](http://puzzlenode.com) problem, but could it look like something? What if we "paired" with our spouse to work through a problem we're having with our kids? What would that actually look like? It seems like now it looks like a lot of yelling and saying "you don't understand me" -- maybe it could look different. Maybe it could look like sitting down, trying to define the problem ('I feel like Josh is out of control', 'Our kids watch too much TV', 'It seems like Karen is having trouble listening') and then talk through possible ways to address it. I think the key here is that it doesn't have to be a fix. There is not One Right Answer, but simply a way to attack the problem. Isn't that what pairing is anyway? Sometimes you don't get to the end of a problem when you pair, but sometimes you do. It's much more about helping each other move forward in attacking it.

All that to say, I intend to begin looking for ways to pair in my life, including my professional life, by setting aside time to do so. For my programming, that means 9-10 CDT on Monday, Tuesday and Wednesday nights. There will be exceptions, but that's my goal for the next month. I'd like to see my TDD improve, as well as my ability to work alongside others.

See you on [irc.freenode.com/#pairwithme](https://kiwiirc.com/client/irc.freenode.net/pairwithme)!
30 changes: 30 additions & 0 deletions source/_posts/2013-04-24-tdd-and-pairing-ideas.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
layout: post
title: "TDD and Pairing Ideas"
date: 2013-04-24 10:10
comments: true
categories:
---

When pairing, especially remotely with someone you don't work professionally with, it is sometimes helpful to have some ideas about how to go about getting the session going or what to do. This is just a set of ideas that might get the ball rolling.

# Problems to work on

* [PuzzleNode](http://puzzlenode.com) - 15 shortish (30 minutes to 4 hour) problems. Great for pairing.
* [Conway's Game of Life](http://coderetreat.org/gol) - Can implement a basic version quickly. Lots of ideas for restrictions on this site.
* [TDD Katas](http://osherove.com/tdd-kata-1/) - Can be done in 30 minutes alone.
* [Dominion](http://riograndegames.com/uploads/Game/Game_278_gameRules.pdf) - A larger problem, but it will tease out larger design issues that you don't get with smaller systems.
* [Build a Twitter](http://twitter.com) - Simple system that can be extended. Adding a UI and continuing strict TDD is very interesting since you might be able to TDD the core system, but have more difficulty with the surrounding. Are there ways to mitigate the risks of using a framework as a shell? Are there ways to make the shell "swappable" -- not so you'd actually swap, but so you have loose coupling?

# Ideas to practice

* [Ping Pong](http://coderetreat.org/facilitating/activities/ping-pong) - Pair back and forth, one writes a failing test, one makes it pass, then writes the next failing test, and so on.
* [Various Limitations](http://coderetreat.org/facilitating/activity-catalog) - No loops, no conditionals, limit lines per method, no voice communication (or typing out in chat... only communication is through code)
* [TDD As If You Mean It](http://cumulative-hypotheses.org/2011/08/30/tdd-as-if-you-meant-it/) - Strict TDD that involves real tests before code and strict refactoring rules. This can be combined with any other limitation or idea, but it's so difficult (And rewarding) that it's okay to Just Do This.

# Tools

* Vim + tmux - [how to tmux](http://pivotallabs.com/how-we-use-tmux-for-remote-pair-programming/) &middot; [tmux basics screencast](http://www.youtube.com/watch?v=wKEGA8oEWXw) &middot; [Syme](https://syme.herokuapp.com/)
* Screen Sharing - [ScreenHero](http://screenhero.com) &middot; [Google+](http://plus.google.com) (read only)
* Audio - [Skype](http://skype.com) &middot; [Google+](http://plus.google.com)
* Find Pairs - [RubyPairs](http://rubypair.com/) &middot; [IRC #pairwithme](https://kiwiirc.com/client/irc.freenode.net/pairwithme) &middot; [Twitter #pairwithme](http://pair-with-me.herokuapp.com/)
32 changes: 32 additions & 0 deletions source/_posts/2013-04-25-tic-tac-toe-tdd.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
layout: post
title: "Tic Tac Toe TDD"
date: 2013-04-25 10:26
comments: true
categories: tdd
---

I spent a little (longer than I thought... maybe 2 hours?) implementing Tic-Tac-Toe in the TDD As If You Mean It style. Ended up with a VERY different implementation than I ever would have done if I just "started coding" -- everything was only in one class, including the AI to "play" against itself.

<script src="https://gist.github.com/marksim/5460578.js"></script>

Observations:

* It was quite different to implement things inside the test method. I ended up coding like

{% codeblock %}
it "does something..." do
player = Player.new

def player.something
# do work
end

player.something.should be_true
end
{% endcodeblock %}

* It was difficult to not refactor as I went. Many times I would see the duplication and want to refactor immediately. I resisted this urge until I felt the implementation was done, then refactored out duplication, ensuring that the tests continued to pass after each change.
* I'm still not quite sure how you're supposed to improve design without breaking the rules. Doing pure method move seems limiting and doesn't allow for you to see duplication. The only thing I could think of is that there can be additional refactoring after you're "done"

All in all, a very interesting exercise. I want to do it now on something broader, and eventually on something that has a core with a wrapper so that the core is purely TDD'd and the wrapper is thin, but swappable. I think Dominion is my next big attempt.

0 comments on commit efc777f

Please sign in to comment.