Circular Adventures III: A Distance Apart

“Distance has the same effect on the mind as on the eye.” ― Samuel Johnson, The History of Rasselas, Prince of Abissinia In previous episodes of this series, I’ve only focused on circular problems involving a single index into a ring buffer. Today, I want to extend the scope to use-cases involving two indices. At […]

Code Kata 2: The “Average” Developer

You might be tempted to think that calculating the average of two integers is a trivial thing. If you think that it is as easy as this:

you are wrong. But don’t be depressed — you are in good company. Code like this is written every day — not just by average developers. (Task#1: […]

Single-step your code!

I was so proud: after I had gotten rid of some minor compile-time issues (ie. typos), my unit tests ran over my newly written code without any errors. Granted, the changes I made comprised less than 500 lines, but still, it meant something to me. Feeling happy and content, I hummed R. Kelly’s “The World’s […]