Three Bowling Kata Design Reviews

Learn software design by comparing, fixing and expanding three Bowling Kata solutions

Note

Are you interested in Francesco Cirillo's solution?
If you are interested in Francesco’s solution, see the video course in which he develops the Bowling Kata in TDD with no IFs. It is a totally different solution from the ones you will see today.


About the Training

In this session, Francesco Cirillo reviews three different design solutions to the Bowling Kata. This Kata is about developing an application that can calculate the score of a bowling match.

Training Info

Length
2 hours

Language
English

Delivery Options
Live online, onsite, in-house, recorded video.


Preview Three Bowling Kata Video
Preview Three Bowling Kata Video
Preview Three Bowling Kata Video
Preview Three Bowling Kata Video
Preview Three Bowling Kata Video
Preview Three Bowling Kata Video

The Story Behind this Session

Francesco Cirillo tells the story behind the Bowling Kata Anti-If Challenge.

"Why the Bowling Kata? Robert Martin provided a solution in 2005 to demonstrate how he applies TDD. Robert Martin's solution is considered by many as a 'procedural solution.' The result of applying the 'IF Strategy' several times to deal with new tests.

Damir, one of the participants in my software design mentoring programme, one day asked me: 'I would like to see how you would develop the Bowling Kata in TDD without IFs. As you might know I created the Anti-IF Campaign several years ago. And so I accepted the challenge.

I heard of this Kata but I really didn't know much about it and so I did a bit of Googling to see alternative solutions. And what you will see in this video is exactly what I did to prepare myself to develop my own solution to the Bowling Kata. What I liked in those solutions and what I didn't like. My attempts to fix proposed design solutions even if I didn't like them. Or my way to expand what I considered a nice design idea."


Nicole Lemke

Software Manager, 4flow AG

If you not only want to know what “Object-Oriented Programming” means, but are also interested in its origins and what it can achieve, start here, at the very beginning. Let Francesco take you on a journey. Learn about the essence of good objects and write good stories that those objects can tell.


Annotated References

Here you can find the references used in the session commented by Francesco Cirillo:

  • Bowling Genius - Absolutely the first and fundamental resource for someone like me who has never bowled. Do you want to know if you did it right? Bowling Genius knows that :)
  • But Uncle Bob - Here you can find the link to the original PowerPoint slideshow made by Robert Martin.

Solution #01: TDD (IF procedural)

Solution #02: UP+TDD (Frame Hierarchy)

Solution #03: UP+TDD (Decentralized Parser)

New Requests


Carlo Garatti

Software Engineer, Oracle

If your question is about how to write valuable software, this program is for you!! Through one-on-one lessons with Francesco you will learn how to fit the right techniques and tools in the exact phases of the software development cycle. You will fix and apply these ideas in real cases. And, last but not least, in an enjoyable way!


Event Programme

Introduction

  • The Role of the Software Designer
  • Why the Bowling Kata Challenge
  • My preparation for this Kata
  • What did I do?
  • What is a Kata?
  • What are we going to do today?
  • What is TDD?
  • My expectations...

The Bowling Kata: Requirements

Robert Martin's Solution (TDD/IFs)

  • The first four tests
  • Pomodoro #2 Starts
  • The IF Strategy makes the system more complex
  • Deep hierarchies don't help abstractions emerge
  • A dynamic interpretation
  • Let me write one more test... we found a bug!
  • Matteo Vaccari's new requests: do we Embrace Change?
  • What did I learn from Martin (TDD)?
  • 1. Scenarios are important: why the bug!
  • 2. TDD is not enough?!

Ron Jeffries' Solution (UP/TDD)

  • "Mining the Bowling Game" (2006)
  • "##The Design Idea"
  • @OpenFrame :: AddRolls - Communication Diagram
  • @OpenFrame :: Calc Score - Communication Diagram
  • @Strike :: Calc Score - Communication Diagram
  • Solution assessment
  • We don't like asymmetries
  • The FinalFrame problem
  • @Last Frame Spike :: Calc Score - Communication Diagram
  • Pomodoro #3 Starts
  • Let's fix those asymmetries

Cirillo's Modified Jeffries' Solution (UP/TDD)

  • Solution assessment and Class Diagram
  • Metaphor: A 6502 language
  • Voucher Time :)
  • A 6502 assembly program
  • A "roll language" program
  • Better "instruction" names
  • @Mixed Game :: AddRolls - Communication Diagram
  • @Mixed Game :: Calc Score [Create AST] - Communication Diagram
  • @Mixed Game :: Calc Score [Calculation] - Communication Diagram
  • Solution assessment and Class Diagram
  • What did I learn from Jeffries (UP/TDD)?
  • 1. How important separation of concerns is in OO
  • 2. Looking for metaphors/analogies

Cirillo's Expanded Martin's "Quick" Solution (UP)

  • Martin's Class Diagram
  • High-Level Messaging
  • Expanded Solution
  • Roll becomes a real Object
  • No more "global variables"
  • Let's get rif of two IFs
  • Voucher Time :)
  • Result Pattern
  • Pomodoro #4 Starts
  • Solution assessment
  • What did I learn? Cirillo's Expanded Quick Solution (UP)
  • 1. Favour code over diagrams
  • 2. Turn low-level messages into high-level messages

Marco Testa's Solution (UP/TDD)

  • @Mixed Game :: AddRolls [Create Game] - Communication Diagram
  • @Mixed Game :: AddRolls [AddRoll]
  • Solution assessment and Class Diagram

NOTES FOR MY CHALLENGE

Q&A


Become the Software Developer you want to be

Watch the video of the Session


About the Trainer

Francesco Cirillo

Francesco Cirillo has worked at the forefront of the software industry for more than 30 years. In a career spanning startups, corporations and freelance consulting, he has mentored thousands of professionals, developers, managers and software teams.

In the 1990s he worked as a Senior Consultant and Mentor for Sun Microsystem, expert in Software Architectures and Software Development Processes and Java and Object-Oriented Evangelist.

Francesco is one of the pioneers of Agile Methods. He started working on XP and TDD in 1999. He was chosen by Kent Beck to develop the XP community in Europe and as reviewer of the second edition of the book Extreme Programming Explained. In 2000 he created XPLabs, the first company in Europe to offer comprehensive services on XP: software development, training and consulting.

In 2007 he created the Anti-IF Campaign to raise awareness in the international community of software developers to apply good design principles to grow software in a sustainable way.

Since 2008 Francesco stopped actively working on Agile Methods and started to develop RRP, a new method of software development. In 2013 he created Cirillo Consulting based in Berlin to offer professional training and consulting on productivity and software development.

Francesco invented the Pomodoro® Technique, a renowned time-management method used by millions of people all over the world, while being a university student looking for a way to get more done in less time.

Read the Francesco Cirillo's complete profile.


Price & Conditions

Please be aware that all information discussed in the video/event is copyrighted. For more information, see our terms and conditions.


Marco Isella

Software Engineer

Francesco has changed the way I work, and more.


Upcoming Sessions

At the moment there are no upcoming sessions scheduled. If you are interested in a session, please contact us.


Useful Resources

Three Bowling Kata Reviews

Learn software design by comparing, fixing and expanding three Bowling Kata solutions. In this session, Francesco Cirillo reviews three different...

The Bowling Kata Challenge Solution

Have you ever noticed how many IFs have been used in Bob Martin's Bowling Kata solution? "Is this an effective...

The Anti-IF Workshop

Learn how to replace the 'IF Strategy' with more effective design strategies that will enable you to reduce the complexity...


FAQ

Got a question? Here's answers to common ones.

No, sessions are not currently recorded. In the future, we will make a video course series for Pomodoro® Training Programme. If you're interested in our video course, please send us an email (support@francescocirillo.com)

Do you have a question not listed here?

Pomodoro® Web App

The Pomodoro® Timer Web App will be your time tutor and help you stay focused so you can get more...

Pomodoro® Sheets

To help you get started, check out the official templates of the Pomodoro Technique that you can download and print....

Pomodoro® Training Programme

Interruptions and procrastination are one of the most dangerous productivity killers. How to deal with the Predator while we're working...