News for hackers. Stuff that matters.
Re:Why Don't Software Developers Use Static Analysis Tools t... by crdoconnor on Friday June 26, 2015 @06:58AM (#9783486)
Mainly because most of the tool reports freely mix critical issues with stuff that is just opinionated bullshit (e.g. 80 character length lines).

When the output is as long as your arm and you have pick through it with a fine toothcomb to find the things that matter (and even they aren't necessarily causes of bugs), the whole idea becomes substantially less appealing.

Re:Why Don't Software Developers Use Static Analysis Tools t... by SloopJon on Friday June 26, 2015 @08:46AM (#9783918)
"Out of the 20 people we interviewed, 14 people expressed the negative impacts of poorly presented output. ... Some of our participants felt, however, that false positives and large volumes of warnings would be less burdensome if the way the output is presented was more user-friendly and intuitive."

Sounds like you're in the majority.

Re:Why Don't Software Developers Use Static Analysis Tools t... by virmundi on Friday June 26, 2015 @10:26AM (#9784558)
I'm with you. I used FindBugs within Eclipse, just fine. But on my current project they (the company) tuned Sonar to be extreme. Every opinion is a Major bug at least and breaks the build. I like to have lines like this:

Something s = function(....); return s;

This allows me to put a break point if I need one in the future. Unfortunately Sonar is configured to say this is a Major bug. It breaks the build until I have "return function(...)." Every damn time! Now I use (assert s != null);

If a company can come up with a default configuration that Jenkins or Bamboo can pull, great! I love it. Until then I literally have to push to SVN and wait for the Sonar nag email.

Re:Why Don't Software Developers Use Static Analysis Tools t... by karmakaze on Friday June 26, 2015 @01:41PM (#9786422)
I found that specific Sonar issue to be bogus. In addition to breakpoints, sometimes the 's' has is meaningful name that ties the function call with the return value.
Re:Why Don't Software Developers Use Static Analysis Tools t... by falcolas on Friday June 26, 2015 @08:47AM (#9783919)
Guessing you're referring to the infamous Python PEP-8 limitation. Most linters let you trivially change this line length in a way which either affects the linter permanently, or on a per-project basis.

For example, you can get very fine grained control over pylint by asking it to generate a config file, and reading through it (it's remarkably well commented).

Re:Why Don't Software Developers Use Static Analysis Tools t... by omouse on Friday June 26, 2015 @09:37AM (#9784205)
You still have to go through the config and enable/disable things for your project. That's the biggest barrier; the lack of good default configs to use for flake8 and pylint. If Google or Microsoft or someone else supplied one, I'd just take it and drop it into every project. One less headache to worry about.
Re:Why Don't Software Developers Use Static Analysis Tools t... by falcolas on Friday June 26, 2015 @09:43AM (#9784237)
That's a remarkably low barrier to entry. Not to mention that the coding standard they are enforcing is based on the official language coding standards - that makes them very reasonable defaults.
Re:Why Don't Software Developers Use Static Analysis Tools t... by omouse on Friday June 26, 2015 @10:09AM (#9784435)
Yep it is and yet the coworkers don't want to do anything about setting up the infrastructure for static analysis or code checking of any kind. It's an attitude I've encountered at many other companies which is unfortunate.

I think it boils down to being timid and not wanting to impose one standard on others which reduces the importance of coding standards to tabs vs spaces -_-'

Re:Why Don't Software Developers Use Static Analysis Tools t... by crdoconnor on Friday June 26, 2015 @10:54AM (#9784822)
The effort:reward ratio is still out of whack here, though. Linters are relatively limited in usefulness at the best of times (compared to tests, for instance).

Linters that can't rank rule violations sensibly, have bad defaults and opinionated stylistic rules quickly become more trouble than they're worth.

If somebody comes out with a better linter, though, that isn't verbose and just catches truly problematic code consistently without needing a ton of customization, I'll use that for sure.

Re:Why Don't Software Developers Use Static Analysis Tools t... by Hello71 on Friday June 26, 2015 @07:25AM (#9783580)
what tools? afaik, none of the tools mentioned in the article warn on whitespace or line length. FindBugs certainly does not.
Re:Why Don't Software Developers Use Static Analysis Tools t... by AnimalMuppet on Friday June 26, 2015 @12:03PM (#9785531)
I've used Klocwork. It will tell you all kinds of nitpicking stuff, but you can get it out of your face very easily, and just look at the stuff that you think is important.

But if you're in virmundi's situation, that's more a people problem than a technical one, and no tool will save you there.

Re:Why Don't Software Developers Use Static Analysis Tools t... by yeahdude on Friday June 26, 2015 @07:00AM (#9783493)
grep -v
Re:Why Don't Software Developers Use Static Analysis Tools t... by rjaco31 on Friday June 26, 2015 @07:08AM (#9783517)
if you have to make a dozen of grep to exclude trivial results, it might be a hint there's something wrong with the pertinence of your output or the customizability of your tool
Re:Why Don't Software Developers Use Static Analysis Tools t... by nadams on Friday June 26, 2015 @09:38AM (#9784209)
I found most tools very verbose but I've yet to use a tool where it doesn't have the ability to exclude certain warnings.
Re:Why Don't Software Developers Use Static Analysis Tools t... by yeahdude on Friday June 26, 2015 @07:21AM (#9783567)
From another perspective, hacking often involves making broken things work better.
Re:Why Don't Software Developers Use Static Analysis Tools t... by crdoconnor on Friday June 26, 2015 @08:34AM (#9783859)
From yet another perspective: don't use broken tools.
Re:Why Don't Software Developers Use Static Analysis Tools t... by yeahdude on Friday June 26, 2015 @03:59PM (#9787362)
I keep forgetting this one: don't offer help to complainers.
Re:Why Don't Software Developers Use Static Analysis Tools t... by crdoconnor on Saturday June 27, 2015 @02:48AM (#9789340)
If the help constitutes telling people about this wonderful new tool you've just discovered called grep, perhaps that's for the best.