Tracking Compilation Errors

Posted April 7, 2010 by Joshua Kerievsky

False Green in Eclipse

For many years, I've found students in a situation I call False Green.

Yes, the above green bar appears to be green. Only it is an illusion. The bar was green when the tests were run, but that was a while ago. Now, as you can see from all those little pink marks on the side of the IDE, there are a LOT of compilation errors. If the tests were run, they would be red since the code won't even compile.

False Green Session

False Green Graphs

Because it isn't easy to capture all of a student's compilation errors, our graphs of student work didn't illustrate this problem. So even though a student could spend many minutes with compilation errors, our graph (as shown on the right) didn't show any problems. We didn't like that. In particular, we did not want students to think that everything was okay. In fact, when you have compilation errors, the code doesn't work, can't be shipped or used. You have Work-In-Progress. These days, thanks to movements like Kanban, we like to visualize Work-In-Progress. So our programming team (including John Tangney, Mike Bria, Alan Harriman, Keith Ray and yours truly) decided to dig deep and create a way to record and show compilation data.

Visualizing Compilation Errors

Pink Session
We now record all compilation errors while students work on an exercise. As you can see above, the time spent with compilation problems is now denoted by a large pink rectangle. This feature is currently supported in our Java and C++ Agile eLearning with C# support available in a few months. Since introducing support for visualizing compilation errors, we've found that students work harder to avoid large amounts of time "in-the-pink."

A New Graph

To help students, we made a new, complementary graph that is even more explicit about compilation errors. This new graph, which appears below the main graph, shows both compilation errors and test run data: Test and Compilation Chart

As you can see in the legend below the graph, we display regular compilation errors using pink circles and what we call a "compilation rash" using pink triangles. In this example, the long pink line with triangles, illustrates the very long period in which a student worked to remove compilation errors. Our software automatically labeled that line as a compilation rash because there were many compilation errors that took many manual steps to remove. To see compilation error details, a student can mouse over any point on the line to reveal data like this: Compilation Errors Popup

The Limited Red Society

Programmers who have mastered the ability to limit the time they spend in the red, whether that is from failing tests or compilation errors, are members of what we call The Limited Red Society. We will be holding tutorials on this topic at various 2010 Agile conferences around the world, including:

For now, we'll leave you with a look at a student's performance on one of our most challenging exercises: Real World Session