Encapsulating More than Just Resources with Test Context Classes

In my last article, I explored automatic resource management in Scala by developing test context classes to reliably manage resources in functional tests. I have explored the topic of test context classes a few times, and each time I focused on using these classes purely for resource management. In this…

Automatic Resource Management in Scala: Revisiting Test Context Classes

I have written previously about how I like to use what I call call context classes for functional tests in order to encapsulate test setup, reliably cleanup resources at the end of a test, and to promote code reuse across tests. I started by writing about using disposable objects for…

Should We Write a Unit Test or an End-to-End Test?

The debate over whether to write a unit test or an end-to-end test for an aspect of a software system is something I've encountered a number of times. It most often arises as a philosophical discussion along the lines of: If we can only write one test for this feature,…

My Initial Impressions of Scala

I am going to be using the Scala programming language for some upcoming projects. This will be my first time using a functional programming language and my first time developing for the JVM. Up to this point in my career, I've primarily used C++ and C#. I'm looking forward to…

Interviews for Programmers Should Involve Code Review

I have been part of the interviewing team for my employer for over a decade. Over this time, I've conducted hundreds of technical interviews for programmers. By far the best advice I've ever read on technical interviewing is Joel Spolsky's The Guerrilla Guide to Interviewing. This is an essay I've…

The Most Difficult Bug I Have Encountered

I was asked, recently, to recount the most difficult bug that I have ever encountered. I have worked on distributed systems for some time, including a multi-threaded, distributed system written in C++, which is used in diverse and demanding industrial environments. So, needless to say, I’ve encountered more than…

Be More Productive By Not Finishing Your Work

When I complete something that I'm working on, rather than calling it a day, I usually start on the next thing. Not in the hopes of finishing a great deal more work, usually it is just to get a feel for what is in store next. Nothing is more fulfilling…

Considering Time in a Streaming Data System

For over a decade, I have worked on infrastructure software for streaming data systems. My experience includes developing and supporting time-series databases, publish-subscribe messaging systems for streaming data, and software for reliable event-data collection. As they are embraced by web companies for making operational and business decisions on-the-order of minutes…

Test Driven Career Development

I started this blog a year ago with the intention of sharing some of my work. I think it has gone roughly according to plan. I'm satisfied that I averaged an essay a month — that feels about right for me. Looking back, there are things I would change, but…

In Defence of Testing One Thing Per Test Method

In my last post, I described why I prefer tests that test only one thing. Naturally, this can lead to a lot of test methods with a fair amount of repetitive code. I presented a technique for programmatically generating tests when doing so by hand would be tedious or error…