found findbugs

I recently found findbugs, a static analysis tool for Java. I ran it on mdb2mysql and was surprised to only find one “serious” bug, a possible null pointer deference. I think it was actually a false positive since the value in question was checked against being null, but switching the code block to a try catch is the more stylistically correct way to handle it. Other than that there were a few performance issues with the way I put the sql statements together; I should have known better than to just concatenate strings without using StringBuffer explicitly. The beauty of static analysis is that findbugs can scan the code and find these little things as the code is being developed and remind me to tie up loose ends and sort out dirty code. I can see that using it and other tools should help me become a better programer.

However, most of the issues I need to tackle are not ones that static analysis will uncover: inelegant code, method misuse, unnecessary variables. A lot of these things are technically correct in that they work and can’t throw any errors, but that doesn’t mean they are easy to understand and maintain or that they are the most efficient way  to achieve the goal of the program.

And of course  that ignores the all issues of UI design. Currently both the CLI and GUI of mdb2mysql need lots of work; the program is functional, but the GUI is missing many “GUI” features such as tab focus switching, execute/next input  with ‘enter’ from text input, additionally I would like to eliminate the modal dialogs. The CLI also is extremely clunky; there are branches that trap the user into irreversible action were the only options are to move forward or kill the application.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s