Wednesday, May 15, 2013

Trying out a Coding Dojo

We had our first Coding Dojo session, today.  I wanted to start a "Programming Dojo" and I found that some people had already been doing that for years, so I decided to use their wisdom :).  Here's a great video, linked from the same site. The guy making this gestures with the camera a lot.  If you get easily motion-sick, maybe you should just listen to it.

The idea is to have 2 people pair programming in front of a group, with the group kibitzing.  Techniques are discussed only in the context of code and programming is the path to learning in the coding dojo.  I'm introducing people, here, to functional programming concepts.  Here is the "kata" we used, today:

Kata: Person

Learning about "selector functions"

1. Write a "person" function, person(name, address, gender): 
  • it returns a "person"; something which can be used to retrieve the values
  • you man not create a new array, object, or string
  • you may use comparisons and control structures (if, for, while, switch, etc.)

2. Write person() without using comparisons or control structures


Shortly, we'll be moving on to lists and this kata will form a foundation for that.  This "person" isn't too much different from a cons-cell.

We're doing this at lunch, right now.  If it works out, I'll move it to evenings and invite people.

1 comment:

  1. The lesson was far more elemental than I initially expected, yet enlightening all the more so. I feel like the kid who signs up for karate because he wants to "kick-ass" and ends up painting the fence.

    ReplyDelete