Main

January 2007

January 28, 2007

Kata Eight: Conflicting Objectives

Why do we write code? At one level, we’re trying to solve some particular problem, to add some kind of value to the world. But often there are also secondary objectives: the code has to solve the problem, and it also has to be fast, or easy to maintain, or extend, or whatever. So let’s look at that.

Continue reading "Kata Eight: Conflicting Objectives" »

Kata Nine: Back to the CheckOut

Back to the supermarket. This week, we’ll implement the code for a checkout system that handles pricing schemes such as "apples cost 50 cents, three apples cost $1.30."

Continue reading "Kata Nine: Back to the CheckOut" »

Kata Ten: Hashes vs. Classes

If we’re programming business applications in a language such as Java or C#, we’re used to constructing and using classes to manipulate our business objects. Is this always the right way to go, or would a less formal approach serves us well sometimes?

Continue reading "Kata Ten: Hashes vs. Classes" »

Kata Eleven - Sorting it Out

Just because we need to sort something doesn’t necessarily mean we need to use a conventional sorting algorithm.

Continue reading "Kata Eleven - Sorting it Out" »

Kata Twelve: Best Sellers

Consider the implementation of a top-ten best sellers list for a high volume web store.

Continue reading "Kata Twelve: Best Sellers" »

Kata Thirteen: Counting Code Lines

Counting lines of code in Java source is not quite as simple as it seems.

Continue reading "Kata Thirteen: Counting Code Lines" »

Kata Fourteen: Tom Swift Under Milk Wood

Trigrams can be used to mutate text into new, surreal, forms. But what heuristics do we apply to get a reasonable result?

Continue reading "Kata Fourteen: Tom Swift Under Milk Wood" »

Kata Sixteen: Business Rules

How can you tame a wild (and changing) set of business rules?

Continue reading "Kata Sixteen: Business Rules" »

Kata Seventeen: More Business Processing

The rules that specify the overall processing of an order can be complex too, particularly as they often involve waiting around for things to happen.

Continue reading "Kata Seventeen: More Business Processing" »

Kata Eighteen: Transitive Dependencies

Let’s write some code that calculates how dependencies propagate between things such as classes in a program.

Continue reading "Kata Eighteen: Transitive Dependencies" »