Coding Dojo

Edit on Github

About this Kata

This is the famous “ [Hello World] “ program. Hello World is perhaps the first Kata – it predates even the term “kata”. But people have been doing Hello World as effectively a kata for over thirty years. The seminal book [The C Programming Language] has created the tradition of making it the first program in any new language, environment, or methodology. So it follows that the first kata should be Hello World.

Good for teaching: Katas themselves, TDD , MockObjects , ensuring the environment is set up correctly.

Problem Description

The first thing the computer wants to do is to greet the outside world, the most basic form of interaction. The task is simple: print the phrase “Hello, World!” on the display. As a Kata, Hello World should be completed using TDD and whatever other methodology you normally use. Mock objects should probably be used to stub out the user display.

This teaches the kata method in the simplest possible terms. It’s also useful for ensuring that the environment is correctly set up. Before a dojo, the organizer could do Hello World, just to make sure computer, compiler, and projector are set up correctly.

Suggested Test Cases

There’s only one test case: get “Hello, World!” on whatever output.

Comments from those who are working on this Kata

(Comment from RonRomero ) I solved this one using the concept of just testing the engine, and making the UI a thin (non-tested) veneer. The writeup is [on my blog.] I’m thinking I might want to try it again with mock objects.