Named parameters with default values can help unit tests

Introduction I find myself using default values much more in unit tests than in production code.  That is, I do it more often, and use more parameters with defaults per method.  This isn't because default values are bad, but they are often particularly useful when setting data up for unit tests.  It makes the tests … Continue reading Named parameters with default values can help unit tests

An introduction to integers and floating point numbers

Integers on a computer are simple and behave in predictable ways.  Floating point numbers are not and don’t always respectively –  I’ll explain what they are and why below.  Working with floating point numbers is also slightly like cleaning up after my dogs, which I will also explain below. Integers Integers are a bit like … Continue reading An introduction to integers and floating point numbers

Balancing big picture and details when coding, testing and documenting

Introduction I very much hope that this avoids being a rant.  I also hope it avoids being self-indulgently clever rather than being helpful.  Finally, I understand that people learn in different ways; I think I like images and like to get the big picture before getting into detail.  Other people like to be led along … Continue reading Balancing big picture and details when coding, testing and documenting