Recently, during a discussion on unit testing, I made an inadvertent comment about how unit testing is like desk-checking a function. That comment was treated with a set of blank stares from the room. It looks like desk-checking is no longer something that is taught in comp-sci education these days. After explaining what it was, I felt like the engineers in the room were having similar moments I had when a senior engineer would talk about their early days with punch cards just after I entered the field. I guess times have changed…
What followed was a very interesting discussion on what Unit Testing is, why it is important and how Mocking fills in one of the last gaps in function oriented testing. Through this discussion, I had my final Unit Testing light bulb moment and it all came together and went from an abstract best-practice to an absolutely sane and necessary best practice. This article puts out a unified view on what Unit Testing is, is not, and how one can conceptualize unit tests.
Continue reading “Desk-Checks, Control Flow Graphs and Unit Testing”
Software defects generally fall into two primary classifications: defects that represent functional misses of a new implementation, or defects that are regressions in the behaviour of the system due to some change. This paper discusses a major reduction in the Time-To-Fix for regressions. In a previous role I lead a team of engineers in implementing this system.
To improve the Time-To-Fix, it was ultimately determined that we needed to resolve two problems that accounted for the majority of the time developers spent dealing with regressions:
- Reduce effort to isolate the regression. Early effort on bug analysis can be greatly accelerated if the guess-work on which change causes the regression is removed. Using bisection provides an absolute level of confidence of the regression trigger. There is no guessing or supposition. I have written on the use of bisection in preference of code diving in this blog post.
- Ensure that the regression goes to the correct team the first time. Reduction of the bouncing around of the defect report is achieved by identifying the engineer who regressed the issue and ensuring that it is fixed by that person or team. In particular breaking the attempt to reproduce, debug, re-queue cycle prevents days of wasted engineering time.
We implemented and deployed the system described between 2008 and 2010. Read on for more information.
Continue reading “Using Regression Isolation to Decimate Bug Time-to-Fix”
Identifying regressions via bisection is one of those software debugging techniques that I find under utilized and under appreciated in the software industry. Bisection can be used to isolate changes in anything from BIOS updates to software updates to source code changes. This article provides a backgrounder on what bisection is, and how it is useful in identifying points where a regression has been introduced.
This is the first in a set of three posts covering regressions.
Continue reading “A Visual Primer on Regression Isolation via Bisection”