Agile, Development

Taking Baby Steps

babysteps1

Hi all,
On Monday, April 6 I participated in Taking Baby Steps MeetUp organized by Adi Bolboaca.

This was a nice technical experiment based on Pomodoro Technique and TDD – Test Driven Development.

We had to pair with a participant, write some code together in our preferred language, respecting some rules.
In the end we had a Retrospective with our main outcomes from the session.

What is it all about?

The rules seem long but are easy to remember:
Short: you are forced to commit every 2 minutes. If the test is not green you revert the code.

600_436032616

  1. Setup source control repository.
  2. Setup a timer for 2 minutes interval when you start.
  3. Write exactly one test
    A. If the timer rings and the test is red then revert and start over.
    B. If the test is green before timer rings then commit.
  4. Restart timer (no discussions in between timers)
  5. Refactor
    A. If the timer rings and the refactoring is not complete then revert and start over.
    B. If the refactoring is complete before the timer rings then commit.
  6. Restart the timer (no discussions in between timers)
  7. Go to 3.
  8. When session time is up delete the code.

The problem

We had to work on Tic Tac Toe problem with a clear indication that the purpose was to practice and not to solve it.

tictacttoe

2 minute Sprints, Retrospective after 25 minutes

After the first 25 minutes we had a Retrospective.
We had just 4 commits and lots of frustration for the reverted code smiley
At the question “What would you change?” the answer was unanimous: the sprint duration.

Everybody had the option to change duration to whatever they wanted.
Me and my pair went from 2 minutes to 3 minutes.

The Flow

Going up with 1 minute proved to be the right decision. We met our goals and had lots of commits.
At the next Retrospective, after 25 minutes we did 9 commits and 3 refactors.
No more code reverted.
We also took 2 sprints just for talking about next steps.

Even though our application did not do too many things, we were happy about the direction.
Basically we wanted to follow the TDD rule: start with the simplest test possible then refactor.

Delete Your Code Now! (Key Learnings)

After another session of 25 minutes, we suddenly heard a dreadful Star Trek voice calling us to “Delete your code now! Delete your code now!
We had to do that, so that we don’t get attached to code too much. Anyway it was only written for testing purposes.

Our main findings after this session:

600_436032630

  • Experiment to find the right timebox
  • Use this technique to attack a problem with high complexity
  • Find out your things to improve to yourself (typing speed, shortcuts, programming language, etc.)
  • Learn to use right meaningful names and improve iteratively
    My take: this technique helps a lot to Focus on doing exactly one thing at a time – and achieve the state of flow.

Further Reads

What do you think? Would you try such technique?

Adrian Suciu, 08th April 2014

Originally appeared in 1&1 Romania Academy internal Wall.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.