Monthly Archives: May 2008

Foundations of Programming – pt 8 – Back to Basics: Exceptions

Exceptions are such powerful constructs that developers can get a little overwhelmed and far too defensive when dealing with them. This is unfortunate because exceptions actually represent a key opportunity for developers to make their system considerably more robust. In … Continue reading 

Posted in Foundations | 14 Comments

Signing Requests (or anything) with Hashes

It’s common practice to use hashes for signing purposes. For example, you can take a hash (MD5, SHA1, it doesn’t really matter) of a file’s byte contents and use that hash to ensure the file hasn’t been modified. It’s also … Continue reading 

Posted in Uncategorized | 3 Comments

Beyond Mocks – the Partial

It’s a litlte easy to get carried away with mocking when you first start doing it in conjuction with unit tests. Mocks are unbelivably flexible/powerful. However, to get the most out of them, you really need to be able to … Continue reading 

Posted in Uncategorized | 6 Comments

What arrays and pointers have in common – or – Why arrays start at zero

Every now and again someone asks why do array indexes start at zero rather than one? It’s a good question, because the 1st item in the array is…well..the 1st, not the 0th. Although the answer is easily found on the … Continue reading 

Posted in Uncategorized | 4 Comments

Foundations of Programming – pt 7 – Addendum

I’ve made two additions to Part 7. The first is based on a suggestion by Greg to talk about a common cause of memory leaks – events and delegates. The second is about deterministic finalization Memory Leaks with EventsThere’s one … Continue reading 

Posted in Foundations | 2 Comments