Bits and Pieces

Don’t Test Private Methods

I often get the question when teaching developers test driven development (TDD), “How do you test private method?” The short answer is you don’t, but there’s also a longer answer that Michael Feathers gave in his book, Working Effectively with Legacy Code. Certainly, you could test private methods, and I’ve seen developers do all sorts …

Read More
Rants

More Reasons Why Agile Works

Clearly, the success rate of Agile projects is higher on average than Waterfall projects. I propose that we can trace some of this success back to technical practices. In Waterfall development, there was no incentive to write good code. Developers got once chance to write a feature and once it works the feature was never …

Read More
Bits and Pieces

Go Deep Rather than Wide

When defining, building, and testing a system, we can go deep or wide. Deep means taking a vertical slice that provides functionality across layers of a system, end to end, which enables a feature. For example, we may enable a user to log in, which would include the client-side UI all the way to the …

Read More
Bits and Pieces

Don’t Write for Reuse

Reuse. This was the promise of object-oriented programming. Back in the early 1990’s we were told to move from C to C++ because it promoted reuse. That was wrong. The way to reuse code is through delegation, by calling a piece of code. Delegation has been around since assembly language so OO languages didn’t introduce …

Read More