Archive for November, 2008

Writing better java code

Thursday, November 13th, 2008

We all want to write better code.   We all appreciate tools that make writing better code easier.   And we all want what we want free of charge.   So, what does the world of opensource have avaliable to help us java coders write better code?

The good folks at Java-Source.net have compiled a nice page showing many of the choices.   I used that as my starting point, surfed around a bit, and decided that three tools work very nicely:  PMD, CheckStyles and FindBugs.   I found this article by Frank Kelly very helpful.

All three tools work as Eclipse pluggins which is important to me as MyEclipse is my IDE of choice.  They install using the Eclipse software update (under the Help menu).   See their sites for more details.   Once you have the pluggins installed, you go to your project properties and make each one active.   Your project will rebuild, and from then on, ever time you save, you’ll see a list of warnings about your code.   Right out of the box you’ll have a great set of rules applied to your code that will have you writing better code in no time.   Each of them are customizable.   You can turn off rules that you don’t care to follow and add rules of your own.

I’ve created an Intro to PMD and Checkstyles Screencast so you can see them in action.

(more…)

One more java blog

Thursday, November 13th, 2008

What does the world need?   Why one more java blog of course!   :)

I figure it’s time to start giving back.   I’ve been developing software for 24 years and have seen a lot in my day.   Nothing compares to the power of the internet.   Whenever I need to know or learn something, it’s off to google I go and there is a wealth of information — most all of it provided for free by folks sharing what they’ve learned (or created).

This blog just represents my efforts to give back as well.   If I’m able to shorten someone else’s learning curve as others have shortened mine — then I’ll have considered myself succsessful.

Leebase