Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Implementation Patterns: static analisys

 
Gian Franco
blacksmith
Ranch Hand
Posts: 979
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Kent Beck,

First of all, thanks for visiting JavaRanch, it's truly an honour
to converse with you.

Secondly my question...do you have any preferred static analysis tools
you use, in order to help daily coding activities comply to the patterns listed in your book?

Kind regards,

Gian
 
Kent Beck
author
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Gian Franco,

I don't use any coding rule tools in my daily work. I think that it is my responsibility to make my code communicate as clearly as possible, so I assume that any deviations from "the rules" are there for a good reason.

Regards,

Kent Beck
Three Rivers Institute
 
Gian Franco
blacksmith
Ranch Hand
Posts: 979
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Kent Beck:
I don't use any coding rule tools in my daily work. I think that it is my responsibility to make my code communicate as clearly as possible, so I assume that any deviations from "the rules" are there for a good reason.


I see, I have to admit here that I haven't achieved that level of proficiency yet, and static analysis tools help to improve my work's quality.

Gian
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmm. I find it interesting that you referred to static analysis tools as "coding rule" tools. Personally, I see them as information rather than rules.
 
Gian Franco
blacksmith
Ranch Hand
Posts: 979
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
static analysis tools like pmd and checkstyle capture many of the most important aspects of coding in rules...so these are I guess "coding rule" tools...

Maybe "coding rule" tool doesn't cover the whole gamut of static analysis tools?
[ December 18, 2007: Message edited by: Gian Franco ]
 
Kent Beck
author
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys,

I'm sorry if I sounded high and mighty. I don't always get my code right and I can use help finding ugly spots. When I code in Smalltalk I use a tool called Smalllint. In Eclipse I use the built in code rules. For awareness of larger-scale issues I use Structure 101. My favorite technique, though, is pairing. If someone else understands what I'm writing, then I am usually on the right track.

Regards,

Kent Beck
Three Rivers Institute
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Gian Franco:
static analysis tools like pmd and checkstyle capture many of the most important aspects of coding in rules...so these are I guess "coding rule" tools...

Well, even if PMD/Checkstyle talks about "rules", they're not really rules if you don't enforce them. To me they're more like indicators. If something shows up on the radar, I realize that I need to pay some attention to investigate. It may turn out that it's just a flock or birds and birds are OK so no need to shoot them down.
 
Gian Franco
blacksmith
Ranch Hand
Posts: 979
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Lasse Koskela:

Well, even if PMD/Checkstyle talks about "rules", they're not really rules if you don't enforce them. To me they're more like indicators. If something shows up on the radar, I realize that I need to pay some attention to investigate. It may turn out that it's just a flock or birds and birds are OK so no need to shoot them down.


True, and it totally depends on each individual team as to what extent the "rules" are indeed considered as such, if necessary treat them as binding, and as a consequence enforce them accordingly.
 
Walter Bernstein
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The best static analsys tool I know is IntelliJ (Inspections + Metrics Reloaded plugin). That stuff really improves my code.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic