There are five simple Kata’s and you have 25 minutes to complete them all. So, read them over, and start your timer.

Kata 1 — Apply Surname to Given First Names

Write a program that asks for the user’s name and then writes that name to the monitor with either “Ms.” or “Mr.” in front, depending if the name is for a female or male. List of names below:

Female Names Male Names
Belle Beast
Anna Kristoff
Jack Sally

Kata 2 — Name Echo

Write a program that asks for user’s name (First Last) and then writes it back with the first name as entered, and the second name all in capital letters.

Kata 3 — Convert String to a Letter per Line

Write a program where the user enters a string, and the program writes it to the monitor/console with one character per line.

Kata 4 — Area of a Circle

Write a program that calculates the area of a circle from its radius. The radius will be an integer read in from the keyboard.

Kata 5 — Change Counter

Write a program that reads in a number of pennies. The program will write out the number of dollars and cents.

My Thoughts

Overall, this was a great exercise, it really forced me to think on my feet. While the exercises were easy, they each had their little nuances. I suggest do these Katas with one or more programmers. Not as a race, but to see what variances exists.  For example, one programmer was able to answer Exercise 5 in ONE LINE! It took me several more.

Below are the differences between me and a co-worker. This was based on our thought process. I was going for quick … Array, For Each, set surname, and print to console.log(). Co-worker was thinking about pulling from a “dictionary” so he created a separate method. Interesting differences based on such a simple process. We both completed the exercise, but essentially different processes.