Since last December, my friend Ivan Sanchez invited me to help him organize a Coding Dojo in London, at Skills Matter. We’ve only had a few sessions so far, but it’s been great fun going to regular Dojo sessions again, since I left Brazil 1 year ago. In the last session, I did a prepared Kata in Ruby, using RSpec and Ivan did a great job of summarizing some of the lessons learned in his blog.

Our next session will be next Thursday, February 12th and you have to subscribe on the Skills Matter website if you want to attend. To join our discussions of which problems to tackle, which languages to use, join our mailing list. We’re also publishing the source code from the sessions on Github, and some of the sessions are being published as podcasts/videos on the Skills Matter website. I hope to see some of you on Thursday!

Post to Twitter

It’s been a while since I don’t post here, but today Caelum published the video of my talk (with Frankie) at Falando em Agile, last October. It is in Portuguese, so you may not understand a lot of what we’re saying, but it was fun to share our experiences with the Brazilian Agile community. Enjoy and Happy New Year!

Post to Twitter

The new version of Synthesis 0.2.1 was just released and the great news is that my experimental work with visualizations was integrated into the master branch! Just sudo gem update synthesis to grab the latest version.

Why Visualizations?

“…reducing the volume and increasing the value of test code by connecting the dots.”

As George pointed out in his first post about Synthesis, it helps you to connect the dots of your tests, to increase your confidence in the system. I like to think of it as a mock coverage tool. When you use a mock in your test, you’re explicitly stating what interaction you expect to happen. How do you really know that the actual object will behave as you expect? You probably need a unit test around it to guarantee it does what it should. Synthesis helps you connect those dots, breaking your build when a mocked expectation is not met in the “real world”.

By using it in a real project, I noticed that the textual output was getting quite verbose. While coding, I was usually only interested in the failure expectations, but when I stopped to look at the whole output, I noticed there were a lot of interesting information hidden in there. If only I could have a better representation of that information…. that’s exactly what software visualization is all about! I had to dig into Synthesis internals to understand how to hook a different report formatter, but the end result ended up being quite good:

Generating Visualizations

To generate such a visualization, first make sure you have sexp_processor installed (sudo gem install sexp_processor) you need to configure your Synthesis rake task to use the dot formatter:

Synthesis::Task.new do |t|
  t.adapter = :rspec
  t.pattern = 'spec/**/*_spec.rb'
  t.formatter = :dot  t.formatter_out = 'synthesis.dot'end

This will create a synthesis.dot file that can be used to generate a Graphviz image. You can download and install Graphviz for your prefered platform (there’s even a Mac OS X version), but all you need is the command line dot tool to generate your visualization. Just execute:

dot -Tpng -o synthesis.png synthesis.dot

This will create a synthesis.png image file that will show your tested expectations in green, and untested expectations in red. You can generate other output files by changing the -T option (try ps, pdf for a higher quality). There are still a lot of things to improve in the formatter and any feedback is welcome, but it proved to show some interesting information in my last project, as you can depict in the following picture (notice that the app is mainly composed of 2 subsystems that don’t share dependencies):

Synthesis Visualization

Tip: Running Synthesis with Rails

Recently, when trying to use Synthesis in a Rails project, I had some problems that took me a while to figure out. As always, the solution was quite small, so I thought it would be nice to share it with everyone. To run Synthesis on a Rails project, make sure you add the following lines to your Synthesis rake task:

Synthesis::Task.new do |t|
  RAILS_ENV = "test"  Rake::Task['environment'].invoke # This may make your build slower. Use only if needed  t.pattern = 'test/**/*_test.rb'
end

Give Synthesis a try in your project and let us know how it goes. You might be disappointed in the beginning about how many expectations you’re not testing, but even if not all of them really require a test, it is still a very valuable information to have. Let me know if you have any issues with the dot formatter as well, as I’m sure there are a lot of kinks to be sorted out. Feedback is always welcome!

Post to Twitter

The last conference I attended in October was Falando em Agile (Talking about Agile), a 2-day conference organized by Caelum. First of all I need to thank all the organizers for inviting me to speak and for putting together such a great conference.

Conference Badges

The content was very mixed, with some people focusing on the management aspects of Agile, while others highlighting the importance of the technical side (with some in between, as well as interesting experience reports). About 200 participants showed up with great questions and experiences, which impressed me and showed how much Agile has grown in Brazil since last year.

David Anderson gave the opening keynote, which focused on his “Recipe for Success”. I find he’s a very opinionated speaker and he can get me both agreeing and disagreeing with him at the same time, which is interesting because we can always learn something. At the same time that I don’t believe in a recipe for success, I strongly agree with his points about how the focus on quality leads to fast delivery, focusing on the engineering aspects to build quality in.

The second talk was mine and Frankie’s about Agile adoption anti-patterns that we noticed in our experiences applying Agile in the “real world”. I think the presentation went really well and the feedback we got was very positive. A lot of people came to talk to us during the break to tell us they’ve identified themselves in a lot of our examples, and that they liked to see us talking about what didn’t work instead of the bright/good things we like about Agile. The slides are available here (in Portuguese).

After lunch, Adail gave a talk about Agile thinking, showing tools such as mind maps and theory of constraints trees. After that, the guys from SEA Technology presented a very interested case study of their attempts of applying Agile in a government project in Brasília. Very interesting to hear their experiences and how it’s possible to apply Agile even in the most adverse environments.

José Papo gave a talk about different types of contract and how their are suitable (or most commonly not suitable) for Agile. The closing talk of the day was given by my friend Guilherme Chapiewski about Agile Leadership. It was interesting to see that he gathered a lot of topics on the subject from different sources and his own experience, arguing about the conflicts of being a leader that provides technical versus process guidelines. I’ve been recently reading a lot about Lean, and my current thinking goes much towards a Chief Engineer role, with a strong technical background, but at the same point with a holistic view of the product and what is value from the customer’s perspective. I missed this topic from his talk, but it was overall really good.

The second day started with traffic again, so I missed Alexandre Magno’s talk about Scrum in PMI environments. Danilo Bardusco gave a great experience report of how they are adopting Scrum at Globo.com, the largest media company in Brazil. I think this kind of experience report is really important for people who are starting with Agile, because it shows how hard it is to change a company’s culture and some of the problems they might find on the way. The last talk before lunch was given by Prof. Fabio Kon and Daniel Cukier: they are both members of AgilCoop (which I’m also part of) and gave a great summary of Linda Rising’s and Mary Lynn’s book “Fearless Change”, showing patterns for introducing new ideas.

Because of the short lunch break (only 1 hour), I was late to watch Daniel Wildt’s talk about his experiences as an Agile coach at Dell. Antonio Carlos from Yahoo!, gave an interesting talk about the importance and the responsibilities of a Product Owner (which I would generalize as the customer in general). The closing keynote was from my co-worker Philip Calçado, where he shared his experience in 2 different projects where bad management decisions made an Agile adoption less successful. I particularly liked his point that “Agile is about inspecting and adapting, but you need to understand what you are doing”. Dropping practices or putting others in place without understanding why they are important may be more harmful to the team.

Overall the conference was really good and I enjoyed seeing my friends and meeting new people enthusiastic about Agile. I was really impressed with how Agile has grown in Brazil since last year. Next year’s conference is promising to be even better and I’m looking forward to participate again.

Post to Twitter

Continuing the series of conference reports, me and Frankie spend a day in Buenos Aires, Argentina to present a Lego(tm) Game we developed to teach some Lean practices and principles at Agiles 2008. The conference was held during the full week of 20-25 October, including three concurrent 2-day Certified Scrum Master trainings and Mary and Tom’s 2 day course on Lean Software Development.

Agiles 2008 - Buenos Aires

Unfortunately, we were not able to stay for the whole week, but spending one day gave us a pretty good impression of how Agile is growing in Latin America. The conference had about 400 participants during these 5 days and they had to reject some of the 900 interested due to logistics constraints. As happened in the US and Europe, the major driver for Agile adoption is being Scrum and, as more people start adopting it, the more problems are uncovered about how they can improve on the “technical” engineering practices.

Agiles 2008 - Buenos Aires

Mary’s opening keynote was exactly about that: how important it is to look at the engineering side of Agile to make its success sustainable. This was the same talk she gave at Agile 2008, highlighting the successes and failures (Plank Roads) of our short software engineering history. I thought it was much better than the last time I saw it, and she managed to convey her message in a much more clear way: focusing on processes/life-cycle has been fragile, while strong technical and engineering practices has shown success throughout our history.

Me presenting

Our workshop went really well: the number of participants and their level of knowledge on Lean matched exactly what we had in mind when we developed it. I’m not going to describe the dynamics of the session, because Frankie already did a good job in doing that. Suffice it to say that the feedback we received was great and that we already have some changes to make it even better. I’m also making the slides available here, although you would have to participate on the hands-on exercises to fully understand it.

Lego Houses

I think the overall message of our session was to show how some of the Lean practices work in practice, but also highlight the importance of Systems Thinking and the principles behind the practices. Blindly applying a practice may give you marginal results, but to fully embrace a Lean philosophy you need to keep learning and improving. There’s not an easy recipe to success.

After a good lunch (with Argentinian steak and some Brazilian friends), we went back to the venue and didn’t have a lot of time to watch any other session, so we rushed to the airport. Next year’s conference is promissing to be even bigger, and besides wanting to stay for the whole week, I hope to see more Brazilians sharing their Agile experiences with the Latin American community.

Post to Twitter

I’ve finally settled down in London and took some time to start the conference reports from the last couple of weeks. The first one I attended in São Paulo was Rails Summit Latin America. It was very well attended (500+ participants) and organized. I should give a special thanks to Fabio Akita and Locaweb for putting such a great conference together!

The conference started a bit earlier to me, when we went out with the other “foreigner speakers” (that’s how non-Brazilians are called in the airport…) to eat Feijoada and drink Caipirinha! Lots of fun! It was really cool to hang out with George, Jay, Obie, Desi, Dr. Nic, Chris, David Chelimsky, Luis Lavena, Akita, and Tim.

The first day of the conference started with DHH’s remote Q&A session, which was OK but nothing new or exciting. The following talk was really good: Chad Fowler gave an inspiring keynote about “Being Remarkable” which was a good summary of his book, plus his skills as a presenter and a good deck of slides (and videos). Very good!

Me and George skiped lunch to rehearse and give some final touches on our presentation about REST. I thought the presentation flowed very well, and it ended up being the only technical session on the main stage during the first day, even though we didn’t show any code: our goal was to talk about REST as an architectural style, basically summing up the great work of Fielding and the good practices that people on the REST community have been talking about. We also wanted to talk about other alternatives to building services on the internet. The slides are available here (we added some notes to make it easier to follow our train of thought).

Dr. Nic gave a funny and entertaining presentation about contributing to Open Source projects and the “Path to Awesomeness”. The first day finished with Chris’ keynote, which was very similar to the one he presented at Ruby Hoedown. If you’re interested, watch it on Confreaks. After his talk, Fabio moderated the Birds of a Feather session (which was more like Lightning Talks), and I was very surprised to see a lot of people stepping up to talk in their 5 minutes slot. The topics ranged from politics to organizing a study group, with special kudos to the Phusion guys who showed a Brainf*ck interpreter in Ruby. Of course, the day couldn’t finish without a rodízio of Brazilian steak at the churrascaria.

On the second day, I experienced the great joy of São Paulo traffic and didn’t made it to watch the Phusion guys’ presentation. I’ve heard from a lot of people it was great and that they gave a great talk about scalability (as well as a lesson on how to use Keynote properly). I arrived during Charles Nutter and Thomas Enebo’s talk about JRuby. It was held remotely and I know Akita had a lot of work to get the environment working. In the end, we still experienced some latency issues but the demos worked out quite OK. After that, Jay gave an interesting talk about the “Immaturity of Testing”, which was rooted in a last-minute presentation we put together for the UK ThoughtWorks Away Day back in June with George. It was great to see how much the discussions from our internal session enhanced the overall message and how Jay managed to put it all together in a nice format. I think a lot of people learned from the pros and cons that he discussed.

After lunch, the ‘testing’ theme continued with David Chelimsky presenting a double talk on RSpec and Cucumber, the gem that’s being developed by Aslak right now and will eventually replace RSpec’s current Story Runner. I wasn’t present during the second half, because I was preparing to present next about my lessons learned about testing. The slides (in Portuguese) are also available and I received some good feedback about it from the brazilians who prefered to watch me instead of David :-)

I stayed around the Brazilian track to watch my friend Fabio Kung present on JRuby and give a real-life demo of his experiments with JMagLev. After that, we all went to watch the closing keynote, by Obie Fernandez. It was a great talk about the Hashrocket way, which was heavily based on their way of applying Agile. In the end, he managed to get standing ovation from some folks in the audience. The last day finished with a lot of champagne and free beer, closing two days of networking, fun, Ruby, and Rails.

My overall impressions from the conference were very positive. It was great to see how much the Brazilian Rails community has grown over the past year. When Fabio and I organized the first RejectConf, back in 2007, we managed to get 100 people to show up in a Saturday and that triggered a lot of other small local conferences throughout Brazil. Seing everyone together for the first time, was a great chance to do the usual networking, and to share our experiences working with Ruby and Rails. I suspect next year’s conference will be even better. See you there!

Post to Twitter

I’m back from a 2 week “conference season” in Brazil and Argentina, but before I share my experiences on those conferences, I want to talk about my first session at the São Paulo Coding Dojo since I left in February. It was very unusual and pleasant for different reasons: first of all, George had arrived in Brazil for Rails Summit Latin America and I took him to the session; second, it was held at one of the participant’s house, instead of the usual venue at the University of São Paulo (which made it possible to add a taste of fresh baked pizzas to the retrospective); third, we decided to try out a different session format called, in lack of a better name, ÃœberDojo which I will try to describe in this post. Hugo has already explained how they came up with the new format in his blog.

In an ÃœberDojo, the setup is different than a regular session: there are more than one laptop and no projector. The number of laptops may vary depending on the number of participants, but we were 14 and decided to have 4 pairs, so 4 laptops were available. We laid out the laptops in 2 tables and chose 2 different problems to be solved in 2 different languages. We would go with Python and Ruby, but George argued in favour of having different programming paradigms to enrich the discussions, so we ended up coding in Ruby and Haskell. The problems we chose were already familiar to most of the participants since the goal of the session was to try out the new format rather than solving a difficult problem or learning a new language: Minesweeper and Bank OCR were the chosen problems.

The dynamics of the session are similar to a Randori session, but with multiple pairs coding at the same time. We used a fixed timebox of 7 minutes to switch the pairs (when the round is over, the driver leaves the pair, the observer becomes pilot, and a new observer joins from the audience). The big difference in this format is that it’s impossible for everyone to follow the same train of thought, and there’s always more people than seats available so there’s a lot more chatting happening. When a new member joins the pair, it’s very likely that he will have almost no previous experience with the code being developed (similar to a real-life environment?), so everyone can exercise their ability to read and write readable code. In the original idea, people who were not coding were not supposed to follow what the other pairs were doing, but we ended up helping other pairs with less knowledge on the languages and/or environment. I have to admit I sometimes tried to stick around one of the pair stations because the approach to the solution and the discussions were getting interesting :-)

At the end we held our usual retrospective with food (a lot of pizza) and everyone seemed to have enjoyed the session. I particularly felt the energy and the innovation happening and was very excited with the results. We coded for more than 1:30 hours and it was very hard for me to leave the code unfinished. Although it was a lot of fun, I think for this kind of session to be successful, the participants need to be familiar with a Dojo session and its dynamics (TDD and Pair Programming in particular). Hugo was also a very good moderator, using a pairing matrix to keep track of who was pairing with who, to keep at least one experienced member on each pair, and to put different people in different pairs at each round. The code from that session is available at GitHub.

I see some benefits to trying out this type of session. Solving the same problems in different languages (and paradigms) made it possible to have a rich discussion at the end. For example: when solving the Bank OCR problem in Haskell, pattern matching made it easy to make progress on the first steps, while the Ruby version was getting stuck with a lot of nested if/else statements. Another benefit of this type of session is that you can cope with programmers in different levels of experience. In a traditional Dojo session, you always go as fast as your least experienced participant. In this session, you have different streams of development happening at the same time, so a faster pair can make more progress on their turn. Finally, I think this environment is much more similar to what you might encounter in “real-life”: you develop code for others to read and you have to understand what others were doing while you were absent.

I hope you try out this format in your Dojo and share your experiences. What other types of session are you trying out in your local Dojos? Would you have a better name for this new session format? Leave your comments!

Post to Twitter

This is a common question that usually comes up when I talk about Coding Dojos, that I found it would be useful to share it with everyone:

“Where can I find problems to solve on my Coding Dojo?”

At the São Paulo Coding Dojo, we tend to choose problems from different sources, and we keep track of the sources in a wiki. Since this page hasn’t changed for a while, I’m publishing the current version here so others can benefit:

The list is not supposed to be exhaustive, but there’s quite a lot in there to keep you busy for a while. I should highlight that both UVa and SPOJ accept code submissions so you can get feedback about whether your solution works or not. SPOJ, in particular, accepts a wide variety of languages (such as Ruby, Python, Java, C, Brainf**k, and even Whitespace)

For those interested in starting a Coding Dojo, there are some easier problems that we usually use when the audience is new to the whole Dojo concept. Also, they are not hard so the focus is not on solving the problem, but actually learning the interactions and flow of a Coding Dojo session (TDD, pair programming, or sometimes to learn a new language):

I hope this is helpful and, for more information about the São Paulo Coding Dojo, follow our blog, join our discussion list (for the Portuguese speakers), read our paper or some of our session reports in the Coding Dojo wiki (in English). Enjoy!

Post to Twitter

One of the best resources about Pair Programming to date is Laurie Williams’ book “Pair Programming Illuminated“, as well as all the research she’s been conducting on the subject. At Agile 2008 I was lucky enough to meet her personally and present my experience report in the same slot as her’s. She showed us a video that was produced to teach Pair Programming to students at the North Carolina State University.

Although targeted to the University environment, the video is great and shares some important lessons about the Do’s and Don’ts of Pair Programming. If you replace references to teacher and teaching assistant (TA) with tech lead or project manager, I’m sure most of the advices will make perfect sense.

The video is really well produced and is worth watching and sharing. Please take the time to check it out and learn from someone who’s been not only doing Pair Programming, but also teaching and publishing research on the subject.

Post to Twitter

My last session report on the series will be about the second half of the double session I attended on Friday afternoon, which was much more informative and funny. Kenji showed (with live translation) a 30 minutes japanese video about how a former Toyota leader conducted a plant transformation at a Sanyo cellphone factory in Japan.

It started with the successor of Taichi Ohno walking around the production line, followed by a bunch of people, and pointing out a lot of visible waste: unfinished products, piles of partially finished packages, and part-empty boxes. It really demonstrates the Toyota’s practice of Genchi Genbutsu, or “go and see for yourself”. By showing to the plant workers the visible wastes, he even claimed not having seen so much waste in a while :-)

His first approach to transform the plant was to physically reduce the production line size. He arrived on the next day and started to rip out the conveyor belt. The plant manager ran scared to the scene to see what was going on and was asked to get a stair and remove one of the signs hanging from the ceiling that read “Packaging Area”. The idea was to make the size of the production line smaller, so that people would have less space between then. That would require less people: the ones still working would have to do the job of more than one person, and the others could be moved to another department (such as product development).

As you would expect, the changes introduced some temporary chaos into the work place. Not everyone was happy with doing more than one job and the plant manager was worried they wouldn’t make their deadlines. After a heated discussion, he decided to go back to the old layout. However, he allowed that one of the workers participated in another improvement experiment: she would have to work alone in a work cell (yatai), doing the job who was previously performed by 6 or 7 people in the old production line.

At first, the time she took to assemble the cell phone was 2 minutes slower than the production line takt time. However, as she became more proficient, she started to suggest kaizen improvements, such as: raising the table and moving the pieces around to be closer to the place where they would be needed. Within 5 days, she managed to beat the productivity of the production line. The improvement was celebrated by the company’s leaders in an internal event, and she claimed that she felt that she could still improve and become faster.

My mains lessons from watching the video and seeing a lean transformation in practice were:

  • Any change introduces a temporary period of chaos, which may cause the process to be reverted before the benefits are realized. Read more about the subject searching for Virginia Satir‘s work.
  • Respect for People is clearly shown in the video, as the transformation leader stands besides the worker to support her while she is learning the new skills.
  • The differences between Western and Eastern cultures: even though she was unhappy at first with the fact that she would have to do the job of 6 people, she respectfully acknowledged the new job and gave her best. It’s also clear that the Japanese have a more holistic view: companies collaborate with each other to improve the country’s industry as a whole. One of the “incentives” raised by the transformation leader was that if the quality of their products didn’t improve, their jobs would move to China.

This is the end of my Agile 2008 session reports. I hope it proves to be helpful for those who couldn’t attend the conference. Feel free to contact me or leave comments if you want to take these discussions further.

Post to Twitter


© 2007-2009 Danilo Sato | Powered by Wordpress

Page optimized by WP Minify WordPress Plugin