My Code Series showcases my code samples and programming methodologies with various languages and tools.

My emphasis is are as follows:

  • Code quality over speed - but speed is expected to increase over time
  • Make it work first then optimize - always review after initial solution
  • Test driven development - every line of code should be tested
  • Varying languages and tools - key to good craftsmanship
  • Unlicenced - for everyone to use and study

As a reader you should have some basic programming skills, and comfortable reading unit tests.

Checkout

tdd code checkout

This kata comes from here.

I realized doing this post after the code was written is quite difficult, as a lot of the juicy details stuff got refactored away. So please ask me if you don’t understand any section!

Premise:

Given a bunch of items, their price per item, and a special bulk discount...

Continue reading...