I noticed that Ron Jeffries had written about a kata I hadn’t tried before, so I decided to try it. The exercise involves evaluating a polynomial of one variable at a single point. For example: 5x3 + 4x2 + 19x + 3 at the point x = 5 evaluates to 823. Check my arithmetic if you like. How does one write this incrementally and test-first? First things first: if you’ve never tried it, and especially if you’re new to test-first programming, then try it yourself. Take small steps and never wr...| The Code Whisperer
In my evolutionary design practice, I consider removing duplication one of the three fundamental moves.1 Accordingly, I practise this move daily and trust it as a primary tactic for understanding the needs of the design. I would like to share a little example with you. We encountered this example during a session of Evolutionary Design Without* Tests. We’re adding a feature to the Point of Sale system: adding provincial sales tax to each item as the shopper purchases it. The system already ...| The Code Whisperer