June 30th, 2010[XP 2010] Report of first half-day (Tuesday)
Tuesday was the first day of the XP2010 Conference, being held in beautiful Trondheim, Norway. I was on a morning flight from Oslo and only managed to arrive at the venue in the afternoon. It was nice to see a lot of my friends again – so far, I managed to count 8 Brazilians, which is probably the highest number in XP conferences so far :-)
Functional Programming with XP – Amanda Laucher
The first talk I attended in the afternoon was from my friend Amanda Laucher. She presented on an interesting topic, discussing how Functional Programming languages and concepts can relate to today’s Agile practices and principles. Some of the lessons that I took away from her session were:
- Functional Programming and Testing: she talked about different aspects of Functional Programming and how you can approach testing them. Things like: testing for lazyness, testing monads, minimizing side-effects, testing on strong vs. weak typed languages, testing on static vs. dynamic typed languages (and useful tools like quickcheck). Even though I don’t have a lot of professional experience in FP languages, one particular topic resonated quite strong with my experience: “you need to know FP before you TDD in FP”. On our Coding Dojo in São Paulo, we learned a similar lesson when trying to TDD algorithms: you need to have an idea of how to solve the problem before you drive your solution with TDD. If you don’t know how to solve your problem, TDD won’t give you the solution.
- How to learn a new language: I really liked Amanda’s pragmatic approach to learning new languages. I particularly liked her reference to the Functional Koans, specifically designed to teach you features of a new language by giving you failing tests that you need to understand and fix. This approach separates the learning of the language, from the learning of the testing tool, or TDD. This is a problem I found when trying to learn a new language by first looking for the testing frameworks available, before understanding the languages’ constructs and concepts.
System Metaphor revisited: The lost XP practice – Joshua Kerievsky
My second session of the day was Joshua Kerievsky’s take on the System Metaphor, an XP practice that he asked on his review of Kent Beck’s second edition of the XP book to be removed, and that has been later applied with great success on Industrial Logic’s main product.
He first talked about metaphors in general: how they link a source domain to a target domain, how they’re always partial, and how people need to have experienced the metaphor in the source in order to apply it to the target. He also briefly compared the role of a System Metaphor with the Ubiquitous Language, as described by Eric Evans on Domain-Driven Design (this is something I came across a while ago too). Finally, Joshua described the benefits of a System Metaphor, summarising them on the three I’s:
- Illumination: when the chosen metaphor is good, it will provide illumination into aspects of the system design, clarifying unfamiliar design via a familiar domain. It will help describe not only static structure, but also the runtime behaviour of the system. I particularly liked how he described two ways of understanding the Composite pattern using concepts from the music metaphor.
- Inspiration: a good metaphor will also provide inspiration for new ideas. It provides a system of names from which these ideas may flourish. You might consider ideas from the source domain and evaluate how to apply them to the target. The only thing you need to be careful is that the metaphor is partial, so stretching it to fit your situation might not always be a good idea.
- Integrity: when the source has a rich, familiar set of related parts, it will provide more integrity when applying it to your target. It will also have more integrity when the mapping between the source and the target is strong. If integrity is high, mixing other metaphors won’t weaken the overall structure.
What I found interesting on Industrial Logic’s use of the System Metaphor is that it is visible to the users of the system. If you’re taking one of their eLearning courses, you can see and interact with concepts from the music metaphor such as albums and playlists. The previous examples I’ve heard about uses of the System Metaphor were internal to the team and the business stakeholders, to improve communication. You can read more about how they discovered and applied the music metaphor here.
Conference reception – Nidaros Cathedral
The first day ended with an organ concert at the beautiful Nidaros Cathedral, followed by the conference reception with drinks and food at the Archbishops Residence and Palace Museum.