Coding Dojo learning process – Velocity

Posted by caike on June 29, 2010

In our most recent Coding Dojo session here in Orlando I realized something really interesting about our team’s velocity. I feel like other people doing Coding Dojos may have realized this as well, so I’ll try and put it into words properly.

Briefly, below is how we run our sessions:

Planning

The Coding Dojo session starts with an initial planning involving the problem we picked. Stand up style, focused on early results and the-simplest-thing-that-could-possibly-work kinda features. We usually take about 10 minutes and write down some things on the board.

Our goal at the planning is to set up expectations. Everyone involved in the planning gets to make suggestions (add/remove/renegotiate goals). We also decide on an initial design (classes, methods, test cases, etc.).

Coding

Coding @ Colab

We start coding, 7 minutes a pair, and try not to have too many interruptions. Everyone gets a shot and this usually takes us from 40 to 50 minutes, depending on the number of people attending.

Half-time

Coding stops and we talk about what we have done so far.

A little retrospective about the code and how close/far we are from our initial expectations. If we think we can add things, we usually do. Maybe we think we should replace things, or even remove some.

More coding

Another round of test-driven development with a 7 minute pairing cycle.

Done coding

Once everyone gets a shot, that’s it.

We avoid making further changes once the last 7 minutes has been over with.

Retrospective

Retrospective

The way we do this is as a both technical and social retrospective. Usually ends up being pretty much social. We talk about things that worked well and things that need improvement.

Velocity

On a real life project, back on the planning meeting, setting up expectations usually involves making estimates.

Most agile teams agree on estimating using story points rather than hours. I see this as a valid approach, mostly because you get to let each member of the team make their own point <-> time association.

Velocity does not mean productivity, thus, greater velocity does not mean greater productivity. The focus here is consistency.

Consistency is knowing that every [S, a time-scope ] you have potentially shippable software, with additional business value to the product.

The question during planning should be something along the lines of:

“Out of all of these things that the team agreed on being delivered by the end of the iteration, how much of each should we be able to have ?”

Then, try and settle on the simplest thing that could resemble what the client has in mind. You still have room to impress him with something really cool – and by cool I mean simple.

By the end of the iteration, when the team should be about done with the things they estimated, the client should be seeing and using the software.

Even when I write code for fun, I like to set clear goals based on my velocity. For things that are still unclear, or if I’m not familiar with some technology involved, I reduce my scope and try to extract the first thing that would made me simply go “oh, that’s cool.”

The client, on the other hand, should be worried about the first thing that goes “$” (is there a sound for money?).

By reducing the scope with a client, we’re also reducing the time the client spends thinking about features he will probably never need.

We could tell him “YAGNI !!”.

That would sound totally extra-terrestrial, but totally awesome.

Learning your velocity

Learning your velocity

Since the people attending the Orlando Coding Dojo have been pretty much the same lately, with a few variations, we’ve been able to meet our expectations and always end the session with tests passing and working software.

It wasn’t always like this, though.

In the first few sessions we had no idea of how much work we were able to accomplish as a team. We would end our sessions kinda frustrated, because we weren’t able to meet our expectations.

The same thing happens with other Coding Dojo groups who are just getting started and also with agile teams in the first few iterations on real life projects.

Even without writing down estimates (in points or hours), but because we are constantly planning and running retrospectives to improve our process, we are becoming more familiar with our actual velocity.

This means we are able to have about 6-9 people, who don’t even work professionally on the same technology, agreeing on something and getting it done in about 2 hours. I find this fantastic!

Software development is a continuous learning process. Learning your team’s velocity (and your own velocity when you go solo), enables you to deliver early, deliver often and deliver always.

ftp upload in one command

Posted by caike on March 04, 2010

As part of a backup routine, I had to upload a file to an ftp server. It actually took me some time to figure out how to do this with one command, so I thought I’d post it here:

curl -sS -T ${FILE_PATH}/${FILE_NAME} --ftp-pasv \
ftp://${FTP_USER}:${FTP_PWD}@${FTP_URL}/${FILE_NAME}

This example is uploading the file to the ftp server using silent mode (-s) and showing errors when they occur (-S), while connecting to the server in passive mode (–ftp-pasv).

Refactoring at ORUG 2

Posted by caike on January 19, 2010

Here is the slides for the Refactoring talk I did last Thursday at the Orlando Ruby User Group meeting. In case you want to hear me speaking along with the slides, I’ve put it up on vcasmo also.

Autotesting PHP applications (and others) 3

Posted by caike on January 12, 2010

So you’ve probably heard of ZenTest/Autotest, right?

In case you haven’t, it is a Ruby gem that (among other things) automatically runs your tests whenever it notices that a file in you project has changed. It’s a great productivity boost, because it saves you from having to run your tests each time you make a change to your program. The perfect tool if you are doing TDD.

So I wanted to get this autotest functionality going for projects in other languages – like PHP, for example – but apparently ZenTest/Autotest only works within Ruby projects.

Talking to the EnvyLabs’ guys I was told about Watchr, a Ruby gem that monitors files matched by a regular expression and triggers a user defined command whenever a file changes. That’s enough to get you started in an autotest-like tool for PHP – or just about any other language.

I’ve setup an example PHP project of Watchr playing an autotest role in a PHP project:

The source code from this example can be seen at http://github.com/caike/watchr_running_php

AppleScript for my Rails terminal tabs

Posted by caike on December 10, 2009

While working on a Rails project I always have at least 4 different Terminal tabs that I use for

  1. spork server
  2. autospec
  3. ./script/server
  4. command line stuff (generators and general shell commands)

Setting up the tabs all the time is kind of a boring and repetitive task. This truly deserved some automation and it was the perfect excuse for writing my first AppleScript.

After some googling around I came up with this bash/AppleScript to do these tasks for me (and also open up TextMate):

#!/bin/bash

if [ $# -ne 1 ]; then
    PATHDIR=`pwd`
else
    PATHDIR=$1
fi

/usr/bin/osascript <<EOF
on new_terminal_tab()
	tell application "System Events" to tell process "Terminal" \
        to keystroke "t" using command down
end new_terminal_tab

set actions to {"spork rspec", "autospec", "./script/server"}

tell application "Terminal"
	do script with command "cd $PATHDIR && mate . && clear" \
	in selected tab of the front window
	repeat with action in actions
		my new_terminal_tab()
		do script with command "cd $PATHDIR && " & action \
		in selected tab of the front window
		if action contains "spork" then
			delay 7
		end if
	end repeat
end tell
EOF

If only I had used the right search words I would have found Nick Rutherfor had been through the same situation.


Performance Optimization WordPress Plugins by W3 EDGE