I have long been a fan and proponent of Static Code Analysis. Take this -
- you have not yet compiled the code
- you have not yet created a successful build
- you have not yet deployed it on the environment - be it web app, or desktop or mobile
- you have not yet started testing it
And you get a fair amount of bugs before all these! without having to spend extra effort. How good that can be?
Static code analyzers are essentially language parsers with built-in as well as custom-addable rules/checks. These can check not only for simple naming conventions, whitespaces, comments, indentations, but also very serious stuff like potential memory leaks, fall through switch case, unreachable code, cyclomatic complexity.
For more, you can start with this guide:
http://en.wikipedia.org/wiki/Static_code_analysis
If you are on Java, then you have whole lot of great open source tools, any case, try this link:
http://en.wikipedia.org/wiki/List_of_tools_for_static_code_analysis
of course, keep your comments and queries coming, I will delve deeper into this in the coming posts..
Feb 15, 2010
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment