Code Quality Predicted Using Biometrics (vice.com) 122
An anonymous reader writes: Swiss researchers are unveiling "a not at all sinister-sounding system capable of predicting the quality of code produced by developers based on their biometric data," according to Motherboard. "By looking at the programmer as they program, rather than the code after the programmer is done writing it, the system described by the Zurich researchers finds code quality issues as the code is being produced... By using heart rate information, for example, they were able to quantify the difficulty a given programmer had in producing a piece of software. This information could then be used to identify likely sections of bad code..."
In a paper to be presented at an Austin engineering conference this week, the researchers write that "Delaying software quality concerns, such as defects or poor understandability of the code, increases the cost of fixing them," calling their system an improvement over code reviews, even automated ones. "Biometrics helped to automatically detect 50 percent of the bugs found in code reviews and outperformed traditional metrics in predicting all quality concerns found in code reviews."
On the other hand, Motherboard likened the stress level for programmers to "a coding interview that never ends where you also happen to be naked. "
In a paper to be presented at an Austin engineering conference this week, the researchers write that "Delaying software quality concerns, such as defects or poor understandability of the code, increases the cost of fixing them," calling their system an improvement over code reviews, even automated ones. "Biometrics helped to automatically detect 50 percent of the bugs found in code reviews and outperformed traditional metrics in predicting all quality concerns found in code reviews."
On the other hand, Motherboard likened the stress level for programmers to "a coding interview that never ends where you also happen to be naked. "
This is stupid (Score:1)
So the easy parts will have cleaner code than the hard parts? Uh...duh?
Re: (Score:1)
Someone who's unfamiliar with the code might not be able to tell at a glance which parts are easy and which parts are hard, especially in a large, complex CR.
Re:This is stupid (Score:4, Insightful)
So the easy parts will have cleaner code than the hard parts? Uh...duh?
Yes, but the point is that they are automatically detecting which parts are the easy parts so that you can focus your time doing code review on the parts that the developer struggled on and therefore are more likely to have bugs. You could also use this information to assign "too difficult" tasks to a different more experienced developer. It's interesting but I can't imagine anyone wanting to wear biometrics all day every day.
Re: (Score:3)
Btw, you are threading a very thin and dangerous line, when you are suggesting, that some more experienced developers should be loaded with tasks... in the first instance - the question is what those "less experienced" developers are doing in the company, if they are earning the same salary and making bugs!
Why would a "less experienced" junior developer be earning the same as a "more experienced" senior developer?
Basically - what are you suggesting is that it is ok to make more experienced developers more stressful... because clearly, if there are people who can't code, why would you even bother to keep them on expense on somebody else nerves?
That's not what I am suggesting at all. Rather I'm suggesting that you could detect when you gave someone a task that they weren't ready to tackle yet and would be better off giving it to someone with a little more experience. The person with the more experience should hopefully find the task easier and therefore not as stressful.
Re: (Score:2)
Most of the bugs I've fixed were made in easy(and repetitive) code sometimes by very relaxed developers...
I wonder how many of those bugs were because they were interrupted by their manager, and given another task for an hour or a few days. Then when they can back to finish the half-written code, they no longer have the short term memory of special conditions or corner cases that need to be handled.
The whole programming process is stressful.
Is it? I have a hard time imagining a less stressful job. I sit in a $1800 ergometric chair, listening to my favorite music, while I cut and paste from Stackoverflow. Sure, there are deadlines, but any job has th
Re: (Score:3)
if you can't code without the help of the internet, you are not a coder.
Whatever. I get paid for functionality, not originality.
Re: (Score:3)
If code is repetitive enough, there should be an app (developed) to do that.
Nobody follows patterns as well as a program. And, if the pattern needs changing, change the program that writes the code - it will rewrite the code for you in the new pattern in milliseconds.
lie detector (Score:2)
developer struggled on and therefore are more likely to have bugs
Not really. More likely that the developer thinks there might be bugs here, and might consider this part of code to be treated with care from now on. But more likely to have bugs? I think there is an equal, if not bigger, contributor of bugs from developer thinking something to be very simple whereas it turns out to be not-so-simple. This comes from lack of domain knowledge, lack of imagination/knowledge of all usage scenarios, unawareness of industry standards in this type of code etc.
Though it might work
Re: (Score:1)
Re:This is stupid (Score:4, Insightful)
The "whoosh" for me in this is that I develop the solutions to the hardest parts of my software problems when I am far far away from the keyboard. Sitting down and grinding out code is one thing, but elegant solutions to tough problems rarely come while staring at the screen.
Re:This is stupid (Score:5, Interesting)
The method doesn't measure if the code is easy or difficult, it measures if the programmer was over or under-qualified to write the particular code the programmer attempts to write.
If the coder struggled but the result turned out great then the method will still flag the code to be likely to be bad.
The method will also completely miss buggy code caused by the programmer not realizing that the problem is tricky and going for a way too simple solution.
It takes no effort to not add input validation. A biometric test won't help you out there.
I wonder if this method performs better than keeping track on how long time a particular code segment have been shown on screen. (Possibly compared to characters written/edits made?)
Spending too much time on a function could indicate that something tricky is attempted to be made, but also that effort might have been spent trying to fix the code.
Spending significantly less than average time looking at a function could indicate that bugs have been looked over.
In general I don't like using biometrics since it is hard to deal with noise caused by external factors. If the programmer has medical issues or is going through personal problems this will likely impact the result. Some code might appear to be tricky while the reality is that a wasp had entered the office when it was written.
Re:This is stupid (Score:5, Funny)
Re: (Score:2)
The method doesn't measure if the code is easy or difficult, it measures if the programmer was over or under-qualified to write the particular code the programmer attempts to write. If the coder struggled but the result turned out great then the method will still flag the code to be likely to be bad.
While you have pointed out the downsides to this type of metrics, the term "under-qualified" is a rather horrible way of describing the challenges that many good IT professionals strive to find in the workplace.
The words "challenging work environment" likely exist on your own resume, as they do with most people who are good at what they do and enjoy the challenge. I didn't get into IT because I enjoy sitting around a room babysitting boxes full of blinking lights and hard drives. I sure as hell don't stay
Re: (Score:2)
Re: (Score:2)
Then you've never worked on anything non trivial. Most likely because you aren't good enough to be trusted with it.
Re: (Score:3)
I would love to work on bigger projects, but there's a lot of red-tape to break into those.
Re: (Score:2)
Back in the day, we could predict how buggy a section of code was by two things:
1) Who wrote it. Some programmers always write buggy code, no matter how simple the problem they're trying to solve
2) How much logging / commented out print statements were in it. More debugging always meant the programmer was struggling to get it working and was afraid to clean it up when they thought they were done.
Re: (Score:1)
Re: (Score:1)
If the coder struggled but the result turned out great then the method will still flag the code to be likely to be bad. The method will also completely miss buggy code caused by the programmer not realizing that the problem is tricky and going for a way too simple solution.
I agree that these factors mean that the test cannot be reliably used to just identify potentially dangerous parts of code. But I think the results could reveal some interesting information about the programmer.
As you said - if we have data showing that a developer struggled with a particular area of code, but that area ends up being of high quality - then we can see that the developer likely has a great attention to detail, and is being thorough with his design and testing. That's good information to
Re:This is stupid (Score:4, Funny)
They will find out (Score:2, Funny)
that all my code is terrible.
Re: (Score:1)
that all my code is terrible.
Yes, ^^^^ this
Subjective (Score:5, Interesting)
Re: (Score:3)
The problem with code quality is that it is subjective. Some people (aka architecture astronauts) love complex, multi-tiered code with multiple classes and tons of inheritance. Others prefer the simplest code required to get the job done. Still others like some type of balance between the two. Code, much like art, cannot be judged because of this.
They aren't detecting code complexity, they are detecting which parts were complex/difficult for the programmer and therefore more likely to contain bugs. This might even indirectly detect readability. If something is "multi-tiered code with multiple classes" and that makes it easier to understand then the biometrics should detect that. On the other hand, if the "multi-tiered code with multiple classes" makes it overly complex and harder to understand then again, the biometrics should show that.
So, yes,
Re: (Score:2)
Code quality depends on the situation. On an embedded system with limited resources running from a battery it makes sense to make certain compromises that you wouldn't take on a desktop system. The problem with any system like this is that the PHB will run it without understanding that it needs tuning or interpreting, and act on the good/bad output.
Re: (Score:2)
Code quality depends on the situation. On an embedded system with limited resources running from a battery it makes sense to make certain compromises that you wouldn't take on a desktop system. The problem with any system like this is that the PHB will run it without understanding that it needs tuning or interpreting, and act on the good/bad output.
Yes, code quality depends on the situation but what you are describing is not what the biometrics are measuring. A better example might be that coding for embedded system is harder and more stressful but it could still be argued that if the programmer is stressed that he is more likely to make mistakes because that is really what they are measuring. More stress and/or more brain activity implies that it is not as "second nature" to the programmer and therefore harder and more accident prone. This is basi
Re: (Score:2)
While I agree that code quality is subjective, but everybody loves the simplest code required to get the job done. This simplest code will have the highest quality because it is the easiest to understand. If code is easy to understand it has a high quality.
Re: (Score:2)
Re: (Score:1)
Put those architecture astronauts in front of somebody else's code, and they will prefer the non-astronauts versions.
Re: (Score:2)
Personally, I think the code should work, and that others can read and understand it in order to make modifications. Sounds simple enough, yet so many people screw that up since they only focus on the first part. The second part presumably is either forgotten about or purposely skipped for some sort of misguided job security.
Re: (Score:2)
Code, much like art, cannot be judged because of this.
Code, much like everything else in life, will be judged - whether you think it is fair or not is irrelevant.
Re: (Score:2)
The problem with code quality is that it is subjective. Some people (aka architecture astronauts) love complex, multi-tiered code with multiple classes and tons of inheritance.
Bite your tongue. You show me an architect that uses tons of inheritance and I'll show you a paste-eater.
Unnecessary complexity is the greatest sin you can commit in engineering. Quality is NOT subjective.
Biometric Analysis is Inadequate (Score:1)
Obviously we need programmers to work in interactive debuggers at all times, and, when the environment detects a bug, it gives the developer an electric shock. The shock would be mild at first, but would increase in severity for each subsequent bug. After twenty bugs have been detected in a single day, the program could automatically terminate the employee and outsource the project to an offshore resource.
I'm sure this approach would increase both software quality and employee morale, just as it did at Milg
Re:Biometric Analysis is Inadequate (Score:5, Funny)
Obviously we need programmers to work in interactive debuggers at all times, and, when the environment detects a bug, it gives the developer an electric shock.
As a lead software tester in a former life (I currently do government IT work), I've always requested the use of a cattle prod when talking to the programmers about they think the user is supposed to do with the application and what I've proven user can do to crash the application. "Users don't do that!" isn't a valid excuse for not fixing a crash bug. My requests for the cattle prods were always denied by management.
Re: (Score:2)
On the rare occasions where I, as a user, have reported a repeatable crash in a program, the response has been "It crashes when you do that? Well, don't do that."
Re:Biometric Analysis is Inadequate (Score:5, Insightful)
"Users don't do that!"
I've heard that phrase from sales executives and non-technical managers, but never from a developer.
Disclaimer : 25yrs experience as a software-dev of various rankings, spent a lot of that time working with formalised test teams.
Re: (Score:2)
For sure. Most developers I know have their own personal battle scars from users doing weird, unexpected stuff to break things. "I don't need to validate this function input - it should always be valid coming in." "Yeah, well you should probably do it anyway." Sure enough, an exception ends up in the logs at some point.
Re: (Score:2)
Re: (Score:2)
I've proven user can do to crash the application.
Every bug fix should be accompanied by a cost/benefit analysis. E.g. entering a number for a person's age which is greater than 4 billion causes an error. Okay, is it worth fixing? Not unless you have a team of developers sitting around with nothing else to do.
Re: (Score:2)
Cows say moo. MOOOO! MOOOO! Moo cows MOOOO! Moo say the cows.
1:1: Syntax error near 'Cows' [esolangs.org]
Re: (Score:2)
It can not be forced. If the coder is producing happy fun brain chemicals when producing code it's because they a genetic tilt to that kind of mental activity, they get in the zone and the work is fluid. Sure they can head off in the wrong direction but they can change course and still produce the final quality outcome. So all in the brain chemicals, not that you can produce similar output by feeding those brain chemicals into another individual, those brain chemicals are a result of the happy fun thought
Re: (Score:1)
* Milgram
Doesn't detect bugs (Score:2)
It sounds like this method doesn't identify bugs, it identifies sections of code where the programmer was under stress. Those are likely candidates for sections of code where bugs can occur, but the developer likely already knew that. It doesn't help at all in figuring out exactly what errors there are in that stretch of code, and it won't help in deciding where to test because you should already be testing all the code. If you aren't, you've got bigger problems than merely bugs in the code and you likely w
Re: (Score:2)
Fake negative (Score:3)
I have the feeling that most bugs are produced by developers that overlook usual problems: not validating inputs is the best example. This is a well known problem, but it sill happens.
In such a case, the problem is that the developer just does not care. He/she will happily split bad code without altering any biometric signature.
Re: (Score:2)
Re: (Score:2)
I have the feeling that most bugs are produced by developers that overlook usual problems: not validating inputs is the best example. This is a well known problem, but it sill happens.
well said'); drop table students;
Re: (Score:2)
I have the feeling that most bugs are produced by developers that overlook usual problems: not validating inputs is the best example. This is a well known problem, but it sill happens.
well said'); drop table students;
Bobby? Is that you?!
Re:Fake negative (Score:4, Funny)
not validating inputs is the best example
but it sill happens.
There, you proved it!
Re: (Score:2)
I wonder how well it could detect the accumulation of technical debt or the lack of safety features.
Can they tell the difference between a programmer thinking "okay, I had better make item 0 in this state enum an error condition, so I can detect errors, which means I need to write some extra error handling code and the deadline is fast approaching" and "meh, there's no way that can ever happen". The former creates more stress and anxiety. Is stress and anxiety weighted positively?
Naked coding interviews (Score:5, Funny)
When I'm in a coding interview that never ends where I also happen to be naked, that tips me off right away that I'm dreaming. Seriously, I can walk through a doorway or climb through a window and suddenly all my clothes vanish at once and everyone is looking at me. So when this happens, I instantly know, aha, this is a dream. So I start telling people that I'm lucid dreaming, that they don't actually exist, and that I'm stuck in this fake dreamworld that I can't escape but where nothing I do or say really matters anyway.
Typically these nonexistent people will say, "Wow, it must suck to know you're trapped in a dream naked... but anyway how do you write a recursive function that can detect a cycle in a linked list?" Questions like that usually make me forget that I'm dreaming.
Re: (Score:2)
Cool story, bro.
Re: (Score:2)
anyway how do you write a recursive function that can detect a cycle in a linked list?"
I'll be honest, of the many bugs I've had in my code, managing to get a cycle in a linked list is one I've never had. I'm 100% perfect at not getting cycles in my linked lists. Wow, go me!
Re: (Score:2)
return "I found a cycle!";
}
There, done!
depends on the power balance (Score:2)
As a male, if I'm naked, I'm empowered, because I'm OK with being seen, and the viewers may not be (and, no, not because my body is gross; in fact, it is OK). Were I female, except for a limited subset, then the power is in the viewers hands, rather than mine.
Re: (Score:2)
You're empowered if people are pointing and making disapproving looks? Maybe while laughing at your 'shrinkage'? Doing something you're not ashamed of that others disapprove of doesn't automatically empower you; society has a counterbalancing force, generally the police enforcing 'disturbing the peace' type laws.
Now, if you mean being nude at work (casual fridays at Pornhub?), rather than in public, then, ignoring sexual harrassment issues, that'd only give you -- at most -- the power to get people to leave
Re: (Score:2)
The difference is that nude females are assumed to be "asking for it", while nude males are assumed to be just weird (outside of "proper" contexts).
Re: (Score:2)
If, however, the nude female actually is asking for it, she's wielding vastly more power than any man could ever dream of.
Re: (Score:1)
I argue that nude males are threatening rape while a nude female is 'harmless'. No man is going to complain that a nude female demanded sex. Except for "It couldn't happen to a nicer guy" (1974), men don't feel powerless against horny women.
Heart Rate Correlation (Score:2)
The heart rate increases were actually due to taking a moment to think about how to approach a problem... while slamming a Mt. Dew. Or taking a gulp of coffee. Whichever caffeine delivery vehicle is preferred.
Up Next (Score:2)
They just might be on to something! (Score:3)
Share your code! (Score:2)
Come one! Code quality assessment needs code quality check, that is code review, unit tests and the (usual) likes.
Do you want to save money? Make it opensource, put money in the opensource and you'll be paid back.
Share your code!
Why not just ask the developers? (Score:5, Insightful)
You know, if you asked me which bits of my code where the hardest to write, and likely to contain bugs, I can tell you. In fact, I usually comment on code reviews in this way to help direct a reviewer to the bits I think need attention. Being self-critical is a very useful skill, accepting your limitations, asking others to help.
False negatives? (Score:1)
What if you write really shitty code but you're really confident and sure of yourself while you do it? Certainly this type of system would be largely easily fooled by the same mechanisms many inexperienced coders use to fool themselves and their employers?
How about reading code? (Score:2)
Will the system recognize when I find a piece of code that's an illegible thousand line file filled with SQL queries and no comments as to their purpose? Can it predict when I've been given a task to modify this code and won't do a good job because it's like shitting on a pile of shit? Or is the idea that it will catch the perpetrator of this dung pile and hold them responsible? What if the person who wrote this turd station was completely comfortable shitting onto a keyboard and into a codebase? Their hear
You say... (Score:2)
next biometric: checking the bumps on your head... (Score:1)
Phrenology (Score:2)
This is more like Phrenology than anything else. It's absurd and pointless.
Just wrote a bitch of a piece of code (Score:2)
Just wrote a bitch of a piece of code. I aborted when I fully appreciated that the data model I was adopting simply stank. The crap code code is gone and a cleaner approach now results in actually readable code. The former surely caused my heart rate to rise. The latter to drop due to absolute boredom.
Would the Zurcher team take into consideration that some people actually see sense and backtrack? Or should good coders be visited by ties to be told what they already know?
We need unions to stop Biometrics / DNA BS (Score:2)
We need unions to stop Biometrics / DNA BS be for you need to have the rights to get the job and when you fail that DNA test will MC'd min wage job help you pay off that big student loan?
coding interview never ends where you also naked (Score:2)
So, a freelance, work-at-home job then. Or maybe it's just *that* dream again. Possibly both?
Is coding really that stressful? (Score:2)
"On the other hand, Motherboard likened the stress level for programmers to 'a coding interview that never ends where you also happen to be naked. '"
Really? I'm surprised by this. I almost never feel like this. To be sure, occasionally I get a little stressed out when something isn't working right, but for the most part I am quite relaxed and content while coding. And it's not like everything I do is easy either. I'm often the only guy in the shop who is willing to try something new.
It does seem like t
Not that far fetched (Score:1)
Bad code or complicated code? (Score:2)
I guess much bad code is just really complicated and the alternatives are different versions, one being as bad as the other one.