Archive for the 'Agile' Category

Datemi feedback: che domande mi fareste?

Wednesday, September 9th, 2009

Per il prossimo Agile Day ho proposto una breve sessione intitolata “La mia esperienza di coaching”. Da due anni e mezzo sono “coach” per il team Orione in Sourcesense, e mi piacerebbe parlare di quello che ho imparato in questo periodo. Il ruolo del coach è molto meno documentato rispetto al ruolo dello sviluppatore. L’unico libro specifico sull’argomento che conosco è quello di Rachel Davies che è uscito da poco. E’ un ruolo che poche persone conoscono e ancora meno persone ricoprono.

Per questo sarebbe bello se le persone che hanno questo ruolo o ambiscono ad averlo si confrontassero. Dunque chiedo: indipendentemente dal fatto che la mia sessione all’Agile Day venga approvata, che domande mi faresti? Di cosa ti piacerebbe che io parlassi? Qual è il tuo requisito per la mia sessione?

Codice parlante al Bergamo XP UG

Tuesday, September 1st, 2009

Ho il piacere di essere invitato al Bergamo XP User Group per raccontare il materiale del mio post sul codice parlante. La serata è questo giovedì 3 settembre, e il luogo è (pare) la sede di Softcare a Torre de’ Roveri.

A collection of technological katas

Monday, July 20th, 2009

I have this idea, of exploiting the kata concept for learning and teaching more than just the traditional areas of TDD and refactoring. I already put some of this in action in my university courses, where I encourage students to perform katas as a means to learn some technology; for instance Ruby on Rails.

Here is a collection of ideas for katas that stress the mastery of some technique or technology, rather than pure algorithmic or TDD/refactoring skill. All of these katas are to be performed in your favourite programming language, with your tools of choice.

[Web] Write a blog application in 30 minutes. For extra points:

  • users should be able to comment
  • the data should be validated (i.e., no empty entries)

[Web, DB] Write a web app that shows a table of data, with pagination. The data can be in a static, big table that simulates a database. For extra points:

  • Clicking on a column header reorders the table according to the column you clicked on.
  • Get data from a real database

[Web, DB] Write a standard CRUD. With validation. Writing to a real database.

[DDD, ATs, Fitnesse] Write the domain model for a Monopoly game (idea from Craig Larman’s book)

  • Write acceptance tests using a tool like Fitnesse or Cucumber

[Web, Gui, SVG, TDD] Plot a function. Begin with a fixed function, such as sin(x). Then make it so that the user can specify an arbitrary function. The rendering technology can be anything you like: for instance, ascii graphics, SVG, Gnuplot, jQuery + canvas tag, … Be sure to apply TDD. Try to develop a working solution without ever looking at it until the end! (Not that I recommend working like this in real work. This is an exercise; in real work I would frequently check that my application really works, expecially when the app is visual and/or I don’t master the technology.)

[Web, sockets, TCP] Write a tiny web server. It should serve files from its working directory (but should not allow the users to browse outside of its working directory!)

[Web, sockets, TCP] Write a chat server.

[Distributed programming] Write a messaging service with guaranteed delivery. Suppose you need to send a message to a remote service. You have a faulty communication channel, that can lose messages without warning. The remote service may also fail during the processing of the message, or before or after the processing of the message. Your system should guarantee that eventually the message will be delivered successfully. You should also guarantee that the message is not processed more than once on the receiving end. You must design the protocol that the two endpoint use. You decide the format of the messages.

[Distributed programming] Write a system that performs a distributed transaction. Simulate a database service and a payment service. Your system should accept a “Transaction” order, that simulates the fact that a User buys something. The system should let the user pay, and then record in the database that he successfully paid. Both the database service and the payment service fail 1/4th of the time. Your system should guarantee that it can never happen that the user has paid, but we don’t record this fact, or that the user is recorded to have paid when in fact they didn’t.

[Algorithmics] Anagram server: write a service that finds anagrams of a given word or phrase.

[Parsing] Basic interpreter: write an interpreter for a simple Basic language, such as the one in the Commodore 64 of yore.

[Parsing, DDD] Text adventure: write a game that plays a simple text adventure.

[Parsing, algorithmics] Format subsets of HTML. For instance, your input is an arbitrary HTML table; your output should be an ascii rendering of the table.

The Power of Questions

Wednesday, May 27th, 2009

I’m looking for ways to make my coaching more effective. One important thing is to get people to find their solutions, rather than impose my views. Francesco once warned me that the coach does not ask questions in a Socratic way, for the purpose to get them to reach the solution that the coach has in mind. At the time I thought that would be rather difficult to do. Now I see that the Socratic dialogue smacks of manipulation and rethoric.

Not so long ago I asked a question that sounded like “do you think your choice was the best thing to do, or the easiest thing to do?” What a loaded question. It’s clear that my poor team member had no other choice than to agree that he chose the easy (and worse) thing. This is not the way I wanted the conversation to go. The question was not a very useful one; it was in fact a more embarassing way of chiding someone.

Not all questions need to be so false and rethoric. Last Monday we had a retrospective, and I asked questions like

  • I’d like to know how many pomodori we spent last iteration. And I would like to tell how many we spent on coding, and how many on non-coding (i.e., overhead) activities. How can we make it so that we can answer these questions?

Now this is a lot of questions. There are questions that I, as the person formally responsible for the team’s output, think I should be able to answer (the ones about the effort spent.) These questions explain the reasons why there should be a tracking activity at all.

Then there is the question to the team. How do we get to the point we can answer these questions? I’m not telling them “I propose we use this tool”. I’m asking for input. In fact, I’m asking them to tune their process so that it’s easy to answer this question. And I’m explaining why I’m asking them to spend effort on this. (In fact the information is *almost* all there; we just have to tune the process one little bit.)

As I was pondering how much you can achieve by just asking the right questions, I came across this beautiful little book, The Art Of Powerful Questions, which expands on the theme of honest, non-manipulative, insight-generating, mind-expanding questions. They are a precious tool for a coach, but indeed for anybody who wants to have constructive meetings and discussions.

Growing an XP team

Thursday, April 9th, 2009

I was invited to speak at Better Software 2009, a conference that will happen in Florence on May 6 and 7. I will talk about “Growing a Team”, which is what happened in my professional life in the last two years. I will talk about what happens when you decide you *really* want a team that works well. I will not say “when you decide you want an *agile* team”; that is not the goal. The goal is to have a *great* team, in the sense that James Shore explains. Of course, the best way I know to go in that direction is to do Extreme Programming.

My team started in 2007 with 3 people, and has grown to 12-13 people today. The growth has been along more dimensions other than size, of course. We’ve all learned a lot in these two years; the way we worked two years ago is not the same as how we work now.

I’m flattered that I was invited, given the company I will be in: look at the speakers! I’m very much looking forward to this conference. I hope to see you too.

No Essap this Summer

Monday, April 6th, 2009

We had three great editions from 2006 to 2008. But this year I no longer have the time to help organize the School. Vieri, who was an organizer last year, moved to Dublin. Federico is not, understandably, willing to organize without our help.

What happened? Well, what happened to me is that I’m coaching a team of 12 people, and it’s more than enough to keep me busy. On top of that, I’m teaching a brand new class at Insubria this year.

I hope I will have more time to do an Essap in 2010.

Not wishful thinking

Tuesday, March 17th, 2009

I read in this blog post many comments along the line of “In my experience, you don’t need to do X to succeed”, where X is any agile practice such as standup meetings or TDD. Well that’s true. In fact, you don’t need to stand upright to get from A to B. Toddlers around the age of 12 months often are quite skilled at zipping around the room on all fours. But around that age they start experimenting with standing up. At first they fall, and it takes quite a while for them to feel confident, walking on two feet. Yet, once they learn, they find they can cover much greater distances with ease.

Yesterday I was chatting with a collegue around the coffee machine. We were talking about the difference between proper unit tests, and integration tests. The view about testing that most outsiders have, is that all you need is machinery that allows you to record what your code does and play it back. Things around the lines of Selenium. My point is that the most important thing a programmer needs is to learn how to write clean, testable code. Selenium and similar tools are useful, but secondary; what a programmer needs the most is to learn how to do it right, not write a new tool.

My collegue said to me that writing clean code in the sense that I mean is wishful thinking. I told him no, just look into the code that our team is checking in… it’s not wishful thinking, it’s about learning a new level of skill. I’m on that journey.

Results Day 2009 — Il mio contributo

Friday, January 30th, 2009

English summary: during the last Italian Agile Day the one concrete action that was proposed during the retrospective was to post what concrete successes we would be able to obtain in the next two months. This is my contribution.

Che cosa è cambiato fra il 21 novembre 2008 e il 30 gennaio 2009?

Tommaso Torti ha proposto, durante l’ultimo Agile Day, di raccontarci di lì a due mesi che risultati concreti abbiamo ottenuto nel miglioramento della nostra vita lavorativa.

Una cosa che ho fatto è stato di ridurre i miei impegni di prevendita e altro, e concentrarmi con più attenzione nelle vicende del nostro team in Sourcesense. Il team a questo punto è cresciuto a 12 persone (oggi 13), ed è stato impegnato in questo periodo su due clienti.

(more…)

I value simplicity

Wednesday, January 28th, 2009

I’ve been trying for some time to put my finger on the uneasy feeling I have when I talk with or read from good, skilled, mainstream Java programmers. I think my uneasiness comes from a fundamental, basic, philosophic difference in values. I value simplicity. Of the 5 (or 7) XP values, this is the one that for me does not even need explaining. I think “surely everybody values simplicity, don’t they?” In fact, it seems not everybody does.

It’s always difficult for me to keep my blood pressure down when we’re talking about Maven, for instance. Maven solves a difficult problem, namely the problem of mantaining a collection of Java application modules and libraries across different source code repositories and servers. As a result, Maven is extremely complex. From the complexity come the many problems that Maven has: it’s slow; it’s difficult to understand; it’s difficult to debug when things go wrong. For that matter, things often go wrong with Maven, again as a result of it being so complex; in fact, complexity leads to fragility.

Given this preamble, I think you understand why I regard Maven’s complexity as a major, show-stopping problem. But, to my unending surprise, Maven fans don’t regard this as a problem. They regard Maven’s complexity as a minor problem, if even that. A necessary evil, perhaps, which they don’t think it necessary to spend much effort to reduce.

Now Maven is just an example; a controversial one at that, since in fact many good Java programmer dislike it. But the same arguments could be made against most if not all Java major frameworks; Spring comes to mind, and Hibernate, too. They’re way more complex than necessary; they fail for reasons that require divine, or at least guru, intervention to solve.

I have different values. I value simplicity. Less parts mean less things that can go wrong, less things to understand. I like it when things work correctly from the start. I like it when the defaults allow me to use something in a basic way with no configuration at all. I like it when simple things can be done in a simple way, so that difficult things become possible.

We stand on the shoulders of giants. Me, I admire the works of the Algol patriarchs, Dijkstra, Wirth and Hoare. And I admire the works of the Unix patriarchs, Kernighan, Ritchie, Pike and McIlroy. And the works of the XP patriarchs: Beck, Jeffries, Cunningham. And the works of the Smalltalk patriarch, Kay. All of them valued simplicity.

Hoare, Wirth and Dijkstra deserted the IFIP Working Group 2.1 because they thought the specification for Algol 68 was way too complex; it ruined the beauty and simplicity of Algol 60. They produced a famous minority report about their disagreement.

Kent Beck explicitly named simplicity as one of the 4 (now 5) values of XP. The XP method is simple to explain; it does not try to write down every single detail of what I as a programmer should do. Yet it contains just enough guidance; it’s precise and clear enough.

The Unix patriarchs valued simplicity. The VMS patriarchs didn’t, and as a consequence neither did Windows NT. A clear example is the difference in the API for creating a new process. In Windows you have

BOOL WINAPI CreateProcess(
  __in_opt     LPCTSTR lpApplicationName,
  __inout_opt  LPTSTR lpCommandLine,
  __in_opt     LPSECURITY_ATTRIBUTES lpProcessAttributes,
  __in_opt     LPSECURITY_ATTRIBUTES lpThreadAttributes,
  __in         BOOL bInheritHandles,
  __in         DWORD dwCreationFlags,
  __in_opt     LPVOID lpEnvironment,
  __in_opt     LPCTSTR lpCurrentDirectory,
  __in         LPSTARTUPINFO lpStartupInfo,
  __out        LPPROCESS_INFORMATION lpProcessInformation
);

It has 10 parameters, many of which are structures with tens of other parameters. In Unix you have

pid_t fork(void);

It has zero parameters. All the things you can do with the complex and monolithic CreateProcess, in Unix you can do with smaller, simpler, modular calls.

It’s difficult to work together when we have a disagreement on fundamental values. For this reason it’s important that we recognize what values are important to us. Let’s talk about them, put them in the open, respectfully discuss about them. At least we will know what to expect of each other, so that working together in a fruitful way becomes a possibility, in spite of our differences.

What is a coach doing all the time?

Monday, January 19th, 2009

Lately I was chatting with a collegue, an experienced agile developer who is just now beginning to work as an XP coach. He said to me “It’s difficult to picture what a coach does all day — it is much simpler when I am a developer.”

I also felt that way at times. When I first spent so much time away from the code, that I was not able to provide any significant technical help anymore, it hurt. There is also a danger that the coach drifts away from doing useful work for the team. There’s so much email to be done, so many things to coordinate, so many things that beg your attention. It’s important to keep your focus on the work of the team.

So, what is it that a coach is doing all the time? I wrote down a list, so that whenever I find myself doing something not on this list, I know I may not be doing my job well.

  • Coach developers, customers and other collegues about agile values, principles and practices.
  • Write iteration reports.
  • Update and tidy up the team documentation (aka wiki gardening).
  • Mantain data about team performance: stories, effort, code metrics.
  • Train junior developers.
  • Ensure the team keeps up the practices they gave themselves.
  • Encourage developers. Invent or find new things to keep work fresh and fun.
  • Provide feedback.
  • Lead retrospectives.
  • Pay attention. Observe the process. See what the developers are doing, and how they are doing it.

Anything else?