Home =>  Articles =>  Test First Challenge: Introduction

Test First Challenge: Introduction
Charlie Poole
January, 2002

Bill Wake created the Test-first Challenge as a way for people to practice test-first. He provided a set of tests that drive the development of a simple spreadsheet application. A number of people who frequent the extreme programming list wrote code in response to Bill's tests. My solutions are here.

Part 1
This part gets the whole thing started. We develop basic mechanisms for storing and retrieving the raw contents of cells.

Part 2
Here we develop the ability to parse simple constant expressions. I changed things several times as I was developing the parser, so this part is in four different installments.

Refactoring Interlude
After so much code being added, some refactoring was called for, so I did it. I also comment on the amount of change and whether it's worthwhile.

Part 3
This adds cell references to the formulas we evaluate. That introduces the problem of circular references, which we solve.

Part 4
Here we adapt the design to a 2-D table model which may or may not help when we come to doing a GUI front end.