Stories
Slash Boxes
Comments

SoylentNews is people

posted by martyb on Monday June 26 2017, @11:08PM   Printer-friendly
from the He's-checking-his-list,-he's-checking-it-twice... dept.

Unreal Engine continues to develop as new code is added and previously written code is changed. What is the inevitable consequence of ongoing development in a project? The emergence of new bugs in the code that a programmer wants to identify as early as possible. One of the ways to reduce the number of errors is the use of a static analyzer like PVS-Studio. Moreover, the analyzer is not only evolving, but also constantly learning to look for new error patterns, some of which we will discuss in this article. If you care about code quality, this article is for you.

[I debated running this story as it was specific to Unreal Engine and PVS-Studio. Stepping back and looking at the larger picture of static code analysis, there seems to be plenty of room for discussion. What, if any, static code analyzers have you used? How helpful were they? Was it effective in finding [obscure] bugs? How much time did running the analysis consume? Was it an automated part of your build process? How many false positives did you run into compared to actual bugs. On an entirely different perspective, is it easier to find coding errors in compiled code or interpreted? --martyb]


Original Submission

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 3, Insightful) by DutchUncle on Tuesday June 27 2017, @05:50PM (1 child)

    by DutchUncle (5370) on Tuesday June 27 2017, @05:50PM (#532042)

    "Welcome to Lake Wobegon, where all the women are strong, all the men are good-looking, and all the children are above average."

    In direct contrast to an oft-stated issue in the linked articles from PVS-Studio: I think I'm an above-average programmer (or, maybe, architect). I also turn on all of the compiler warnings, and I run a syntax checker, and I run static analysis, because I know I make typing errors while getting those great ideas down into the keyboard. I do not feel that this indicates any weakness on my part, any more than using high-level languages instead of coding in assembler. The suggestion that programmers are too vain to use power tools seems silly. Even better, I'd rather have the impersonal computer-power-backed analyzer point out something questionable *before* the collegial code review.

    Starting Score:    1  point
    Moderation   +1  
       Insightful=1, Total=1
    Extra 'Insightful' Modifier   0  
    Karma-Bonus Modifier   +1  

    Total Score:   3  
  • (Score: 2) by driverless on Wednesday June 28 2017, @10:56AM

    by driverless (4770) on Wednesday June 28 2017, @10:56AM (#532366)

    The suggestion that programmers are too vain to use power tools seems silly.

    Actually it's way too accurate. You're very much the exception to the rule. Most developers know they're way above average, and don't need code analysis tools or even compiler warnings.

    A few years ago I had a discussion with a very well-known OSS software guy who said that he wrote great code and didn't need checking tools. I ran some representative samples of his code through gcc -Wall and... cppcheck, I think. Some of it wouldn't even compile with a newer version of gcc that enforced proper checks on things like function parameters, it was that bad. It worked by accident, not by design.