SoylentNews
SoylentNews is people
https://soylentnews.org/

Title    Code Analyzer Turned Out to be Smarter Than One of its Creators
Date    Monday October 23 2017, @06:48AM
Author    martyb
Topic   
from the MY-code-is-perfect! dept.
https://soylentnews.org/article.pl?sid=17/10/22/1312224

Andrey_Karpov writes:

I am really astonished by the capabilities of static code analysis. The tool surprised me the other day as it turned out to be smarter and more attentive than I am. I found I must be careful when working with static analysis tools. Code reported by the analyzer often looks fine and I'm tempted to discard the warning as a false positive and move on. I fell into this trap and failed to spot bugs...Even I, one of the PVS-Studio developers.

So, appreciate and use static code analyzers! They will help save your time and nerve cells.

[Ed note: I debated running this story as there was an element of self-promotion (aka Bin Spam), but the submitter has been with the site for a while and has posted informative comments. Besides, I know there have been far too many times when I've seen a compiler complain about some section of my code and I'm thinking there is nothing wrong with it — and then I, finally, see my mistake. Anyone have samples of code where you just knew the compiler or static analyzer was wrong, only to find out otherwise? --martyb]


Original Submission

Links

  1. "Andrey_Karpov" - http://www.viva64.com/
  2. "I fell into this trap" - https://www.viva64.com/en/b/0535/
  3. "static code analyzers" - https://en.wikipedia.org/wiki/Static_program_analysis
  4. "Original Submission" - https://soylentnews.org/submit.pl?op=viewsub&subid=22876

© Copyright 2026 - SoylentNews, All Rights Reserved

printed from SoylentNews, Code Analyzer Turned Out to be Smarter Than One of its Creators on 2026-01-23 08:38:48