Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Bug Programming

Wiring Programmers To Prevent Buggy Code 116

mikejuk (1801200) writes "Microsoft Researcher Andrew Begel, together with academic and industry colleagues have been trying to detect when developers are struggling as they work, in order to prevent bugs before they are introduced into code. A paper presented at the 36th International Conference on Software Engineering, reports on a study conducted with 15 professional programmers to see how well an eye-tracker, an electrodermal activity (EDA) sensor, and an electroencephalography (EEG) sensor could be used to predict whether developers would find a task difficult. Difficult tasks are potential bug generators and finding a task difficult is the programming equivalent of going to sleep at the wheel. Going beyond this initial investigation researchers now need to decide how to support developers who are finding their work difficult. What isn't known yet is how developers will react if their actions are approaching bug-potential levels and an intervention is deemed necessary. Presumably the nature of the intervention also has to be worked out. So next time you sit down at your coding station consider that in the future they may be wanting to wire you up just to make sure you aren't a source of bugs. And what could possibly be the intervention?"
This discussion has been archived. No new comments can be posted.

Wiring Programmers To Prevent Buggy Code

Comments Filter:
  • by hsthompson69 ( 1674722 ) on Sunday August 10, 2014 @02:12PM (#47642767)

    ...make sure you go back to the business guy who create the requirements being coded at the time, hook him up to an EEG, and see if he wrote a buggy spec :) ...for bonus points, put the EEG on the manager who just said they're going to measure productivity in LOC.

    If we could detect stupid with an EEG, programmers would probably be the least useful people to put it on.

  • by danlip ( 737336 ) on Sunday August 10, 2014 @02:14PM (#47642779)

    The last thing I need when I am focused of a difficult chunk of code is Clippy popping up and breaking my focus. Some tasks are just much harder than others. I think any decent coder knows when they are struggling and increases their focus or grabs someone on their team to help. Bad coders may not, but bad coders are always bad coders, and no tools will help someone who just can't get it or just doesn't care.

  • by neiras ( 723124 ) on Sunday August 10, 2014 @02:22PM (#47642819)

    Doing hard or unfamiliar tasks is one way we improve and grow. Mistakes improve our understanding of a domain.

    Flagging code for extra review based on "struggle detection" *might* be useful. Sadly, we all know that we'd end up with clueless management punishing or even firing good people because they were stretching to meet a goal.

  • by petes_PoV ( 912422 ) on Sunday August 10, 2014 @02:25PM (#47642831)

    Bugs come when people lose track of the big picture. When they lose concentration and focus - just like when jugglers drop the ball.

    If you want to reduce the incidence of avoidable bugs, get rid of the distractions. Ones such as other people interrupting, phones ringing, asynchronous non job-related alerts going off (fire alarms excepted) and the administrivia associated with the programming environment. Maybe even unplug them from their "entertainment", too.

    There will always be non-avoidable bugs: ones where the programmer is simply making a mistake, isn't up to the task in hand or has been given a bad brief or wrong information.

  • by UrsaMajor987 ( 3604759 ) on Sunday August 10, 2014 @02:25PM (#47642833)
    Just as easy to put a bug in simple code while you are blissed out on something else.
  • by linebackn ( 131821 ) on Sunday August 10, 2014 @02:29PM (#47642845)

    consider that in the future they may be wanting to wire you up just to make sure you aren't a source of bugs

    While completely ignoring that the specs handed down from the higher-ups are gibberish, contradictory, and physically impossible garbage. But, you know, that is not a possible source of bugs now is it?

    Someone should first wire up management to zap them every time they get an idea for a "brilliant" addition.

  • by Rhaban ( 987410 ) on Sunday August 10, 2014 @02:44PM (#47642917)

    Difficulty act as a motivator, and helps developpers to focus. Most bugs I've seen (or caused) are on easy, boring tasks.

  • Yes (Score:5, Insightful)

    by mveloso ( 325617 ) on Sunday August 10, 2014 @03:12PM (#47643009)

    Bugs mostly come from when you're not paying attention, or you forgot something.

    If you've doing difficult coding then writing code is the last thing you doing be doing. By the time you get to writing code it shouldn't be difficult anymore.

  • by s.petry ( 762400 ) on Sunday August 10, 2014 @04:29PM (#47643355)

    That they continue to try and blame programmers for problems that management creates should bother people. Yes, this is a rewording of the same article. The only way to sell this alchemy (I would not even call it pseudo science) is by continually bleating out the theme "programmers are baaaad and we can detect them being baaaaad".

    Lets just say (though its impossible for them to do) that they can isolate every possible variable that would cause fluctuations in EEGs, heart rates, and everything else they want to track biometrically. How on earth do they plan to track and correlate that data without either knowing or directing everything you eat, drink, and touch (including shampoo, soap, and hand lotion).

    Even better, how do they plan to either direct or track all of your personal interactions which can impact those same things. If they can't, then the numbers are skewed and we don't have any science, you only have biases.

    Oh, I can see it now. "Monty. We know your dad died yesterday but you are performing sub par and your heart rate is elevated higher than we expect, so we are going to have to let you go. We can't have a repeat of your three days of sub par performance when your wife divorced you five years ago."

    Now lets look at some of the great Microsoft Management decisions, and decide who's to blame: Programmer or Management. Lync can not copy/paste data. Do you really think a programmer didn't notice the lack of basic function and point it out? Windows 8, and in fact Microsoft's whole "One UI" strategy is management driven. Zune, was actually a decent device but management killed the program. Programmers said Win8 was not ready, Management released it (as they did with Vista, ME, countless back office products, etc..). Programmers have had fixes for security ready only to have them pulled by management for various reasons. "Can't fix that IIS back door because someone's code may break" is frigging hilarious, but how many times have we read just that from Microsoft management?

    That list could get really really long, so here is the point. Why are they not hooking management up to these things and putting them under pressure instead of the programmers? Probably for the same reason I start with, which is that this is alchemy and not science.

  • How about this. (Score:4, Insightful)

    by aepervius ( 535155 ) on Sunday August 10, 2014 @04:38PM (#47643417)
    Hire older programmer which learned a lot and do less buggy code in average, rather than every few year a generation of youngling which suffer from NIH and must relearn everything the older knew, just because you can underpay them for long hours (or even instead of outsourcing). Yeah I know, controversial shit.
  • by Anonymous Coward on Sunday August 10, 2014 @06:07PM (#47643771)

    The procedure is just a variant of letting the programmer write a piece of code and then hook him/her up to a polygraph and interrogate her/him if the code has any bugs, and if it does, in which source file and line number....

    "Does this code have any bugs?"

    "Yes, like all non-trivial programs, this program has bugs too."

    "Where is the bug?"

    "If I knew, I would have fixed the bug already. But that's not the point. There's always one more bug that haven't been found yet."

Those who can, do; those who can't, write. Those who can't write work for the Bell Labs Record.

Working...