Page 1 of 1

OLV Coding Standards

Posted: Sun Oct 23, 2011 2:17 am
by Fred
In the last 48 hours I've really worked over the code for consistency of style in particular.

Results are down from 1825 style errors to just 1179. I'll be doing more work on this tomorrow with a view to having it near perfect before Ben starts on it again on Monday.

The current achievement is "no whitespace errors" meaning that the formatting of the entire project is near perfect.

Once we reach the utopia of perfectly clean code, the game plan will be to keep it that way! Self review before commits is probably the best plan, ie, prevention rather than correction. I'll probably start reviewing code post other people's commits and correcting errors as they go so as to maintain a strong record.

This visual stuff must come first as once it is done other work is infinitely easier to achieve.

I'd like to see the other metrics made much better too. Particularly the CCN stuff and other complexity measures. CPD should be reduced a fair bit and findbugs reports should be mostly eliminated too. We'll see what I can achieve tomorrow before I hit the sack. It's 3:16am now :-)

Let's make OLV a shining example of everything that all FOSS projects should be!

Fred.

Re: OLV Coding Standards

Posted: Sun Oct 23, 2011 4:12 pm
by BenFenner
A consistent Eclipse auto-format style that we can all share would go a long way in keeping things formatted properly.

I've used them in the past and I love them. Maybe we can find one to download, or I could try my hand at making one. I've always liked how it will automatically format the white space, and split up long condition statements for earlier line wrapping, and I think they can even force variable declarations to the bottom (something I much prefer when working with Java).

Re: OLV Coding Standards

Posted: Mon Oct 24, 2011 12:45 am
by Fred
Sounds like you're going to hate what I did, then! :-/

Never the less, it's fairly consistent now, slightly faster, slightly more robust, more readable, smaller by one file and quite a few lines, etc.

She's all yours again as of now! :-)

mvn site:site to make sure you don't introduce new dirtiness :-)

449 is the current checkstyle count, down from 1800 or so.

I've been at it ALL weekend! :-)

Fred.