How long does it take a novice software developer to decipher the cryptic error messages
generated by their favorite compiler?
Do more experienced developers process compiler error messages more quickly?
How long does it take to transition from being a novice to an experienced compiler user?
The compilerMonitor is a research tool that helps to answer these questions.
One hypothesis is that it takes too long time (perhaps months) to transition
from being a novice to an experienced compiler user. Better
error messages from the compiler could provide significant productivity gains.
Results that support the hypothesis will be data that suggest that the transition
time between a novice and an experienced compiler user is greater
than 40 hours of compiler usage. In other words, the transition period is so long that
improving the tool to minimize the transition time would be well worth the effort.
Results that negate the hypothesis will be data that suggest
that the transition time is less than 40 hours, ie, the transition time
What is the compilerMonitor?
The compilerMonitor is a CAUSE (Computer Aided USability Engineering) tool that monitors the developer's interaction with Sun Microsystem's javac.exe compiler (versions 1.3 and 1.4). The program is an executable (javacM.exe) that behaves just like javac.exe. In fact, javacM.exe passes all parameters straight through to javac.exe. You can even configure your favorite IDE (or ANT) to use javacM instead of javac.exe.
Specifically, the compilerMonitor persists a record of all javac error messages and the sources that caused/fixed the errors.
Data Generated by compilerMonitor
The compilerMonitor creates a directory named 'archive' directly beneath the installation directory.
All of the developer-javac interactions recorded by the compilerMonitor are stored
downstream from this archive directory. You will find text files that contain the
developer's compiler errors and copies of selected source files.
The textfiles' timestamps indicate when the compiler errors were coded,
discovered (as a result of compiling) and ultimately fixed (or perhaps not).
To save on disk space,
the compilerMonitor only stores a copy of a source file if
the file contained a compiler error or if a source file contained a fix for a compiler
Don't monkey with the archive/compilationDb directory. The compilerMonitor stores
zero-byte text files in this directory to indicate whether a particular file
compiled with errors on the previous invocation. It uses this information to determine
if a successfully compiled file is a fix (and thus stored in the archive) or not.
Strategy for collecting compilerMonitor Data
To answer the above questions in the 'Goals' section, it seems that we'll need two things:
A sufficiently clear picture of the main patterns of developer-compiler interacation
Time trials for how long it takes for developers of different experience levels to work through each pattern.
The patterns could be established by analyzing and collecting data from developers' daily coding.
Sequences of particular errors would be readily visible from this data.
For instance, if a developers changes a method signature and 'breaks' a number of invocations,
the trail of compiler error messages will show how he/she went about
fixing all the inconsistencies.
Perhaps we can
use something like Weka to analyze the data.
The second thing we'll need is the data for the time-trials.
Unlike the pattern data, this will require a more controlled setting.
Real-world interruptions (like trips to the john and conversations with one's neighbor)
would cloud any 'timed' data taken directly from the field. So, one tact would be to
create sample source code that generates particular compiler errors that emulate
the discovered patterns.
Then, developers of different levels of experience would be asked to work through the compiler errors in the sample source
What are CAUSE tools?
CAUSE tools help usability professionals analyze the interaction between humans and machines.
CAUSE stands for Computer Aided USability Engineering.
Put compilerMonitor-???.jar, regexp-1.2.jar and junit3.7.jar in your computer's CLASSPATH.
Once I figure out how to dynamically 'update' the classpath, this
last step will no longer be a requirement.
Drop the jar file compilermonitor-ant-???.jar into the lib directory under %ANT_HOME%.
NOTE: this jar must precede the ant.jar in the same directory,
because I hijacked org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFacory.
One way to do this is to make sure the compilermonitor-ant-???.jar
has a newer time stamp than ant.jar.
Sorry, I haven't yet loaded the source into CVS. To get the source, download compilerMonitor-all-???.zip.
compilerMonitor is developed mostly in java. It includes a small JVM launcher (javacM.exe) that was written in 'C' and works only on Win32. I made an attempt to isolate the Win32-specific stuff into overrideable classes. I'm interested in seeing how good a job I did.