4 ms·
There are some tools that can help with this, such as Findbugs, for java. Obviously it can't find any bug but it matches against certain patterns to determine i
by devs1010 15y ago
There are some tools that can help with this, such as Findbugs, for java. Obviously it can't find any bug but it matches against certain patterns to determine if some anti-patterns exist in a project.
- chris_dcosta 15y agoHow do you find bugs in perfectly good code, that does something efficiently and correctly but it's just the wrong thing? Think about a piece of javascript that takes an image and replaces another with it. The problem is not the code, it's the incorrect image. That kind of bug - for that's what it is - could never be determined without resorting to creating a set of instructions that would do the same thing. You would have to write something that behaved in the way you wanted you other code to behave in order to test against it. This would be the perfectly idiotic suggestion of an accountant or auditor whose desire was to improve the bottom line without understanding the mechanisms.
- kls 15y agoThere is another way around it, tracking who wrote the original code, and then tracking tickets marked as bug in which that code was modified could give a picture of who is producing bugs. It may not be a 100% accurate solution, but if a tool could seamlessly integrate ticket management with development code, that was changed to fix a bug, could be accurately tracked.
- devs1010 15y agoI think the main purpose of these is to catch the buggy code before it even gets checked in, not to assign blame to a developer
- devs1010 15y agoThese tools generally don't work for dynamic languages, only for static languages, like Java. Also, as I said, its far from perfect, however even the Intellij IDE that I use has some features like this and makes some helpful suggestions. For example, if you needlessly reassign a variable (reassign it twice before it could be read by anything) it catches this, it catches some of the mistakes that developers tend to make when they've been hacking away for hours and are not paying close attention and thus helps to clean up the code.