10 November 2013

CodeCopTour Weeks 8 and 9

Today ends the tenth week of my Software Craftsmanship tour. I visited several companies, paired with many developers and discussed with even more people about our craft. My memories are blurry, there is just too much to keep track of. Fortunately I use a large notebook to collect thoughts and findings during my tour and it helps me to continue my diary about the recent weeks of my tour. As I need to catch up with three weeks by now, this one is going to be brief.

Week 8
Container ShipI started the eighth week of my tour visiting Codeship, a Vienna based startup offering hosted Continuous Integration and Continuous Deployment solutions for many technologies and hosting platforms. Together with Codeship's development lead Clemens Helm I worked on a feature deep inside the Codeship's Ruby on Rails core. Clemens, of "Testing Tuesday" fame, created a guiding test with Cucumber and then switched to RSpec unit tests for the details. It was a great pairing experience despite that my Ruby skills have degraded considerably causing me to slow down Clemens a bit. Between pairing I joined the Codeship team playing some rounds of tabletop football and improved my skills there as well ;-)

Then I spent three days at Irian, a Java Enterprise consultancy famous for co-founding the Apache MyFaces project. I worked with Jan Zarnikov on a new application in TypeScript. TypeScript, the new open source language from Microsoft, was designed for application-scale JavaScript development and compiles to plain JavaScript. I had never heard of it (it was just created last year) and Jan was concerned if I would be able to work with it. But I had no problems and we made good progress. Jan had prepared all the details in advance and we were just banging out the first version of a touch enabled learning game, driving the whole development by tests. It was awesome! Typescript looked cool and was easy to work with, just the development environment and infrastructure (outside of Visual Studio) needs to catch up.

Dojo Week 9
The following Monday I facilitated an in-house Code Retreat for two development teams. Although there were only ten participants, the final retrospective showed many learnings, which was proof for me that the Code Retreat was useful for them. I want to point out how great this Vienna based company is. Running Code Retreats as part of developer education is awesome and I only know a few companies that do things like that.

kata exhibicion XIX Cpto. Espana Karate ShinkyokushinkaiThe rest of the week I attended the Agile Testing Days 2013, an annual European conference. I had been invited by the organizers to run the Coding Dojos each afternoon of the conference. I chose three different katas for the Dojos to keep things interesting. I started with Refactoring the Tennis Kata, a kata designed by Emily Bache. The provided source code of scoring a Tennis game was awful but had a comprehensive suite of automated tests which allowed the participants to focus entirely on refactoring. All seats were taken and we had a great Dojo with good discussions in the end. The following day I helped the participants to Design Test Cases for the Gilded Rose Kata, originally made up by Terry Hughes and modified by Emily Bache. The prepared code base contained some (spaghetti-) business logic but no tests. The participants were asked to add test cases. Again we had a great Dojo with good discussions in the end. For the third Dojo I had prepared the exercise of TDD as if you meant it, as proposed by Keith Braithwaite. I considered it a difficult exercise and the participants were struggling with the concept in the beginning. After some time they made progress and even skipped the break to enjoy pair programming for additional 25 minutes. Obviously they meant it ;-)

I did not pair program with anybody during this week, but learned many new things in the conference sessions and taught a few things to the participants of the Coding Dojos. I had great discussions in the evenings with like minded people and made some new friends as well. Food was provided at the conference venue and travel cost was refunded by the conference organizers. All these facts come pretty close to the requirements for my Journeyman Tour ;-)

6 November 2013

How to sell a Journeyman Tour to Management

I have been asked by several fellow craftsmen how to sell my Journeyman Tour to management. When preparing my tour I had to help people willing to host me to convince their bosses that my visit would be a good idea. Here are some points you might use to justify a Journeyman visit.

Corey Haines did not write anything about convincing management in his Journeyman blog back in 2008. Earlier this year I sent him an email asking for an advice. Although I believe Corey is a busy man, he answered my question. Here is what he wrote:

I'm afraid that I don't have a lot of advice on pre-selling the idea to management. I stayed away from companies that had trouble figuring out the value of having me there. Especially at the beginning, a lot of companies were a bit worried about the idea of having someone in. I just started without them. One major advice I have that is based on my experience is to just start. I didn't really plan things out too far in advance, especially at the beginning. If you just start going to some of the places that you do know, then others might start to turn their attitudes around. Make sure that you blog, do videos, etc, to get the word out of what you are doing. That way, companies will have something to focus on when they are making the decision. (Corey Haines, private mail, 29th of July 2013)

Curia - A red outsiderStart with companies who understand the idea.
So the first plan is not to convince management but just start with companies who understand the idea. This surely works if you travel a large enough area, as Daniel Temme's tour around Germany shows. So try to travel an area as large as possible.

Ask startups and small companies to host you.
As far as I noticed, small companies are more likely to host you. I started my tour with two startups, Blossom and letsplay.io because their founders just agreed to my visit without any questions. Especially the lean startup movement is open to the ideas of learning and continuous improvement. People running one-man businesses who are not permanently working at the customer's site seem to be more open to visits as well, e.g. Lunifera or sdguide.org.

Show that you are valuable.
As I want to stay in Vienna and the Journeyman concept is hardly known here, I have to convince some companies. Obviously there are benefits in having an outsider in your team for a few days. I start the "convincing" with describing my skills and enclose a current version of my CV that shows my experience and my willingness to teach, for example I list my talks at local user groups.

Looking for a New PerspectiveAn outsider has a fresh perspective.
Even an outsider can provide valuable input. This is the main argument used by German coach Ralf Westphal who did a Journeyman tour this spring. This input might be some piece of code or just a second opinion during pair programming. As an outsider I am not affected by organisational blindness and can reflect on structures, assumptions, conventions and behaviour without adhering to company policy or any personal interests. I can share my views on coding, design, architecture, development process and anything I see during my visit. My host will benefit from my visit.

Help with Agile practices.
Related to a fresh perspective, I offer to help my hosts with Agile practices like TDD or pair programming. I will not run workshops or give polished presentations, but obviously I will practice with my pairing partner. I also offer to give a short presentation about the Journeyman concept and Software Craftsmanship in general which I have given several times since the beginning of my tour.

My friend Thomas Sundberg pointed out that managers of development teams who want to introduce pair programming or TDD into their teams should be interested in hosting Journeymen. By working closely with someone who has experience in pair programming, the developers will get a first impression of how it is done. This is especially valuable if they have absolutely no prior experience.

Knowledge is spread effectively using Pair Programming.
All the things said about outside view are even more true in the small world of a (programming) pair. As much as you hope to learn by pairing from a stranger, as much the stranger will learn from you. As the Code Cop I love unit testing and clean code. I do not know the domain I will be working in, but I know testing. My pair will know his or her domain, but maybe not how to create a good unit test, so we will work together on the domain with good tests. The same is true for clean code. One of my hosts invited me for exactly these reasons. The managers of the development department had tried to grow an atmosphere of professionalism and supported pair programming and TDD but the development culture had not changed. Of course my visit did not change it either, but at least I told the developers the same things their managers had been telling them and a few developers experienced these things while pair programming with me.

MegaphonSpread the word about your tour.
As Corey said in his email, it is crucial to show what you are doing. It probably helps if you are well known like Corey or Ralf, but it is not necessary. I did not write any technical books nor do I speak regularly at conferences. I just started my tour with writing about my idea and added smaller posts on the way. People who wanted to pair with me showed my blog to their boss to explain the concept. I got invited to Germany based on the fuzz I created on Twitter. You should tell everyone about your tour in advance, present it at local user groups. You need to do some marketing. For example Ralf Westphal had his tour published in a high-circulation developer magazine and got much more offers than he had planned for.

You need a champion vouching for you.
In my experience the most important fact is the "mole" inside the company. Someone who understands the idea and wants to work with you. In the end he or she has to convince management and possibly vouch for you to be admitted. This person is a like-minded individual, someone whom you know from user groups or conferences. Especially Craftsmanship related activities like Coding Dojos, Code Retreats or Software Craftsmanship conferences are the right place to meet these people. As Daniel Temme wrote, his tour was based on people he had met during the SoCraTes 2013 conferences a week before. Saying that it is high time to say a big thank you to all the people that believed in me and convinced their managers that I would bring value to their organisations. Thank you all, you rock!

27 October 2013

CodeCopTour Week 7

I think it would speed things up if I cover two weeks of my Pair Programming Tour in one swoop, as I did two weeks ago. I want to share some insights besides the usual diary, so I need to increase my writing throughput. On the other hand I do not like going faster because writing a blog post takes as long as it takes. Although I know people who do speed blogging, the OCD part of my personality does not like short-cuts, obviously.

Model CityLast week I was hosted by Thomas Baldauf of the Austrian Environment Agency. I did not know Thomas but had got his name from a friend. After a short email he immediately agreed to host me without any questions which surprised me a lot. Unfortunately Thomas, the lead of the development team, did not have time to work with me in person but had prepared some developers from his team for my visit. I worked with Nexhat Gashi on a small feature of their newest web application which is based on JSF technology. I did not know JSF before I started my tour, but saw it all the time when pairing with people. Probably I will be fluent with JSF until end of November ;-)

I also worked with Martin Lackner whom I knew as long time attendee of our Eclipse DemoCamps in Vienna. Martin, an Eclipse platform veteran, worked on an MDA prototype using Xtext. I had worked with the older versions 0.7 and 1.0 before and he had prepared all the nitty-gritty details in the previous week. I reviewed his DSL and probably spoilt all his fun by proposing a different, shorter syntax. We moved forward very fast. In only one day we created a technical language to define entities and aggregates, together with full editor support, code completion, validation and proper formatting. Such is the power of Xtext - I love it. If you do not know Xtext, I really encourage you to check it out. The Eclipse Xtext project has excellent documentation and many examples which provide a starting point to get your DSL up and running in no time.

Free Lunch
My LunchThe only compensation I asked for pairing was food and beverages throughout the day. It worked out well - till now I have been provided with free lunch every day. All my hosts were very polite and offered me coffee or drinks and asked me for my preferences when choosing places to eat. I never asked for anything special but went for lunch where my partners went. I visited take-away noodle stores, staff canteens and fancy restaurants. Having lunch with many people, together with the various places in Vienna I have been to, was a culinary trip of its own.

The two weeks I spent away from home, I stayed in a hotel. The host company refunded me 600 Euro for my expenses per week. It was a nice hotel, expensive but comfortable. The money was sufficient because I saved on food, eating in the company canteen now and then. Staying in a hotel and working all day was acceptable for the two weeks, and I enjoyed the rich breakfast buffet including bacon and scrambled eggs. But I would not like to stay in a hotel for extended periods of time. I am not a travelling person and I never worked like that. I enjoy going home after work, where connectivity is good and wireless network is free ;-)

Can PL/SQL be Clean?
At the end of the week I spoke at the Austrian Oracle User Group. The organizer had planned an event focusing on clean development and three friends had recommended me to him independently. I agreed to give a presentation but was not sure about the topic I should talk about. For talking to an Oracle user group, the first thing that came to my mind was PL/SQL, Oracle's database language. I have seen horrible pieces of PL/SQL and the question was if it can be written in a clean way? According to Michael Feathers, the author of Working Effectively with Legacy Code, "clean code looks like it was written by someone who cares." I presented his quote as first rule of clean code. Continuing the discussion I listed several books about clean code, including Code Complete by Steve McConnell. Steve said to "write programs for people first, computers second", which I defined as second rule of clean code. Following both rules it was obvious that even PL/SQL can be written in a clean way. I got good feedback on my presentation, especially that it was very entertaining, so I encourage you to check out the slides on Slideshare.