Chapter 29. Testing Improves Code

An example showing how writing some tests can help you to improve the code.

My favorite coding partner, Rich Garzaniti, and I were writing an object to control the printing of checks and EFT stubs from the C3 payroll system. We had a collection of Disclosure objects, each of which knew all the information required to print each document. Our next task was to split the creation of the actual print files into multiple concurrent processes. The disclosures were in the correct order for printing and check numbers had been assigned, so all we had to do was write a little code to split the collection into equal chunks ...

Get Extreme Programming Installed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.