In the words of Michael Feathers, legacy code is code without tests. My corollary to this is that code coverage is a legacy metric — best applied to these very same legacy systems with poor, inconsistent, or absent testing practices.…
Automatic vs. automated
Modern software systems involve plenty of automation, especially in testing, deployment, and operations. However, there is a world of difference between automatic and automated processes. Automation can be an insidious half measure which creates the illusion of agility while actually…
Worst practices: exceptions
There are no best practices. But there are some pretty bad ones when it comes to exceptions. Hans-Eric Grönlund wrote about some of them and I agree with his list. Here are a few more: Breaking the contract Languages like…
Zero-One-Infinity (for tests)
The Zero-One-Infinity rule is a computer science adage from Willem van der Poel meant to compel software designers to avoid arbitrary limits. In thinking about this recently, I’ve come to appreciate zero-one-infinity as a useful heuristic for certain categories of…
Async pasts
When did asynchronous programming originate? I’m no historian, but one contender for the earliest roots of async would be Melvin Conway‘s coroutines. His 1963 paper “Design of a Separable Transition-Diagram Compiler” introduces coroutines and notes that they “can greatly simplify…
Wake up again (and again)!
Previously, I wrote about a simple way to change slow, time-sensitive tests into fast, no-wait tests using some async tricks. However, the example shown only works well when the underlying slowness involves a one-shot action. What if instead you are…
The battle of async methods
In a contest between async proper, Task.Run, and dedicated threads, who will win? Let’s gather some data points for a specific scenario and find out! Today’s benchmark will make use of a trivial single process WCF named pipes application using…
Long haul: two years later
When I presented my thoughts on long-haul testing for PNSQC in 2013, I had been steeped in the methodology for probably five years. It’s now two years later; what has changed? One thing I noticed while researching back then which…
ContinueWith slowly
Previously I discussed the hidden costs of ‘async’ and even discussed a benchmark within the comments. Here is another interesting benchmark on a case that I’ve seen come up a few times. Which of these do you think is faster?…
SSD and … sync I/O?
Walter Bright (via Andrei Alexandrescu) says, “Measuring gives you a leg up on experts who are too good to measure.” Today I’ll present some measurements that might be a bit surprising. In the old days of mechanical spinning disks, the…