Microsoft's anti-bug breakthrough: Wire devs to BRAIN SCANNERS
Clippy: It looks your hands are shaking, are you sure you want to commit this code?
Microsoft is developing a new approach to splatting bugs in software before they take down production systems.
It involves wiring up programmers to sensors that record brain activity, track eye movement, and test how sweaty the engineers are.
If the developer is stressed – bingo, they're probably reading some rather hairy code. And, while writing software, similar signals could indicate the devs are themselves introducing bugs and security flaws while under pressure.
This new technique was outlined in an academic paper from Microsoft Research and University of Zurich researchers: Using Psycho-Physiological Measures to Assess Task Difficulty in Software Development [PDF].
By wiring up 15 developers with an "eye-tracker, an electrodermal activity sensor, and an electroencephalography sensor" the researchers were able to successfully predict how difficult a programmer found a particular program's code to read.
Each developer was proficient in C# and had at least two years of software development experience, Redmond said. The experiment took 1.5 hours and each Microsoftie was "remunerated with a single license for their choice of Microsoft consumer software".
Fancy yourself as a proficient code blagger? Not in Microsoft's future
During the experiment, Microsoft showed each developer two C# programs and asked them questions to test their comprehension of the code. They cleaned up the data taken from the body sensors attached to the developers and fed it into a machine learning classification toolkit – a Naive Bayes classifier – to help find links between the data and the task difficulty.
"Using all of the task data, a classifier trained on the three sensors achieves 64.99 percent precision and 64.58 percent recall when predicting our norminalized task difficulty measure for new participants," the researchers wrote in the study, publicized today.
"The performance increases to 84.38 percent precision and 69.79 percent recall when predicting new tasks, likely because the classifier has had a chance to see the participant in action on other tasks. For predicting participant-task pairs, the precision and recall both settle at 67.71 percent."
Microsoft is hopeful that approaches like this could help it better spot when software developers are tussling with a problem, and in doing so help organizations provide better training and project management to their various developers.
"Now that we have shown that these classifiers can be built, researchers can leverage them to develop novel programming support tools, allowing them to potentially intervene in time to stop bugs from entering the code," they write.
As for the future, one researcher said in a Microsoft blog post there is one thing "I’ve thought about [that] can help absent-minded developers, such as those who just came back from lunch and aren’t paying much attention to their code. If we reduce the contrast on the display and make the fonts harder to read, the developer will be forced to apply more brainpower to read and understand the code and will be less likely to slip up as a result."
The Register dutifully simulated this experience by having a few pints at lunchtime, but upon coming back and finding the contrast on our screen poor and the fonts blurry we confess that our writing did not improve. Hic. ®
Sponsored: DevOps and continuous delivery