<?xml version="1.0"?>
<rss version="2.0">
<channel>
  <title>Simon Brown - checkstyle tag</title>
  <link>http://www.simongbrown.com/blog/tags/checkstyle/</link>
  <description>Coding the architecture</description>
  <language>en</language>
  <copyright>Simon Brown</copyright>
  <lastBuildDate>Tue, 06 May 2008 13:33:00 GMT</lastBuildDate>
  <generator>Pebble (http://pebble.sourceforge.net)</generator>
  <docs>http://backend.userland.com/rss</docs>
  
  
  <item>
    <title>Java best practices</title>
    <link>http://www.simongbrown.com/blog/2005/08/24/java_best_practices.html</link>
    
      
        <description>
          &lt;p&gt;
At &lt;a href=&#034;http://www.evolution.net&#034;&gt;Evolution&lt;/a&gt; we hold regular special interest group meetings that are open to our staff and clients. Last night, I ran a session about Java best practices. It&#039;s an age old topic, yet somehow still remains to be timely. Here&#039;s an interesting quote from a blog entry entitled &lt;a href=&#034;http://technology.amis.nl/blog/index.php?p=695&#034;&gt;On Software Engineering&lt;/a&gt; (emphasis mine).
&lt;/p&gt;

&lt;blockquote&gt;
On August 4 we had a session on software engineering. The aim of the session was to share knowledge and experience about the way we develop software and to discuss the importance of doing it a certain way. After the break we had a workshop that briefly touched the different parts of the software development process.
&lt;br /&gt;&lt;br /&gt;
The quiz on current real-life practices raised a lot of discussion. While we all recognize the importance of source control, automation of manual tasks, testing, documentation and proper incident management &lt;b&gt;many of us fail in a proper implementation of these practices&lt;/b&gt;.
&lt;/blockquote&gt;

&lt;p&gt;
I think that&#039;s so true and ultimately it comes down to time pressures. Of course, it&#039;s easy to argue that it&#039;s worth a small upfront effort to adopt some of the practices (particularly automation) since they will reduce time pressures further downstream. But that&#039;s a different story.
&lt;/p&gt;

&lt;p&gt;
Anyway, the session itself consisted of two parts. The first was an overview of the key best practices we adopted on my last development project, including automated unit testing with JUnit, continuous integration with CruiseControl and &lt;a href=&#034;http://www.simongbrown.com/blog/2005/04/07/project_blog_success.html&#034;&gt;project blogs&lt;/a&gt; with Pebble. The second half was more of a roundtable discussion about other best practices that we are using, including code quality checking (e.g. Checkstyle and PMD), code coverage (e.g. Clover) and automated acceptance testing (e.g. HttpUnit and Canoo WebTest). As a consultant, listening to other people talk about their own projects and experiences is part of the fun and we had quite an engaging session, washed down with a beer or two.
&lt;/p&gt;

&lt;p&gt;
If anybody is interested, a copy of the slides can be found &lt;a href=&#034;http://www.simongbrown.com/blog/files/20050823-javabestpractices.pdf&#034;&gt;here&lt;/a&gt; and if you have any questions, just fire me off an e-mail to the address on the last slide.
&lt;/p&gt;

&lt;div align=&#034;center&#034;&gt;
&lt;a href=&#034;http://www.simongbrown.com/blog/files/20050823-javabestpractices.pdf&#034;&gt;&lt;img src=&#034;http://www.simongbrown.com/blog/images/2005/20050823-javabestpractices.gif&#034; alt=&#034;Java best practices slides&#034; border=&#034;none&#034; /&gt;&lt;/a&gt;
&lt;/div&gt;

&lt;p&gt;
If you&#039;re in London and would like me to come and talk to your team about this sort of stuff, again, just drop me a mail. I&#039;m looking forward to our .NET session on the same topics.
&lt;/p&gt;
        </description>
      
      
    
    
    <enclosure url="http://www.simongbrown.com/blog/files/20050823-javabestpractices.pdf" length="3364285" type="application/pdf" />
    
    
    <category>Java</category>
    
    <comments>http://www.simongbrown.com/blog/2005/08/24/java_best_practices.html#comments</comments>
    <guid isPermaLink="true">http://www.simongbrown.com/blog/2005/08/24/java_best_practices.html</guid>
    <pubDate>Wed, 24 Aug 2005 21:49:18 GMT</pubDate>
  </item>
  
  <item>
    <title>JSIG</title>
    <link>http://www.simongbrown.com/blog/2005/07/15/jsig.html</link>
    
      
        <description>
          &lt;p&gt;
Now that I&#039;m back in London, I popped down to the London JSIG this lunchtime for &lt;a href=&#034;http://209.235.197.109/seminars/2005/London/15July2005.html&#034;&gt;The Need For Speed: The Ins and Outs of Profiling Java Applications&lt;/a&gt;, presented by &lt;a href=&#034;http://www.enerjy.com&#034;&gt;Enerjy&lt;/a&gt;.
&lt;/p&gt;

&lt;p&gt;
First up was a look at their Java profiling application. Enerjy told us that in a study commissioned by Sun Microsystems, 50% of projects didn&#039;t even consider using a profiling tool. I was quite surprised by this figure - 50% actually sounds on the low side! Aside from whether profiling is estimated and planned for, typically profiling is only used in a reactive rather than proactive manner. I&#039;m still unsure how profiling can be become a normal part of development, but I suspect that other things need to happen beforehand. For example, continuous performance monitoring still doesn&#039;t happen on many projects and without this, it&#039;s hard to figure out whether you need to profile your app. Some good advice was to get the non-functional requirements agreed as soon as possible.
&lt;/p&gt;

&lt;p&gt;
The other thing that Enerjy said is that memory leaks are one of the primary causes for poor performance in J2EE applications. While this is true to some degree, I think that there are far bigger contributors, such as incorrect transaction boundaries or too many remote calls. Anyway, back to the profiling tool, it does the usual memory/CPU/thread profiling and has some nice hooks into IDEs such as Eclipse. Seemed to work well although I didn&#039;t really understand what this provides over other tools like OptimizeIt, JProbe or &lt;a href=&#034;http://weblogs.java.net/blog/simongbrown/archive/2005/02/jprofiler_minir_1.html&#034;&gt;JProfiler&lt;/a&gt;. Oh, and no support for Mac OS X. ;-)
&lt;/p&gt;

&lt;p&gt;
After lunch (good pizza!) was a look at their code analysis tool. The presentation started with a look at why many software projects fail and the key factor that came out here was poor code quality. Again, this is one contributing factor, but (IMHO) there are other bigger factors such as a lack of process, failing to manage client expectations, failing to manage changing requirements, etc. One good point made was that code reviews are not typically estimated and planned for. I agree with this.
&lt;/p&gt;

&lt;p&gt;
Back to the tool and, again, it seemed to work well and integrate nicely with Eclipse. From a functional perspective, the tool lets you perform automatic reviews to ensure that code is following well known and industry accepted standards. Here, we&#039;re talking about things like the Sun coding conventions and some of the best practices highlighted by books such as &#034;Effective Java&#034;. So how does it compare to the open source tools like &lt;a href=&#034;http://pmd.sourceforge.net/&#034;&gt;PMD&lt;/a&gt;, &lt;a href=&#034;http://checkstyle.sourceforge.net/&#034;&gt;Checkstyle&lt;/a&gt; and even the rules built into Eclipse itself? One example cited was that you can write your own rules as Java classes. Well, &lt;a href=&#034;http://pmd.sourceforge.net/howtowritearule.html&#034;&gt;you can do that with PMD&lt;/a&gt;. I think that rather than waiting for the inevitable question, it may have been better to address this head-on. For me, there&#039;s nothing revolutionary here, although both tools will be interesting to keep an eye on. Overall, an interesting session.
&lt;/p&gt;
        </description>
      
      
    
    
    
    <category>Java</category>
    
    <comments>http://www.simongbrown.com/blog/2005/07/15/jsig.html#comments</comments>
    <guid isPermaLink="true">http://www.simongbrown.com/blog/2005/07/15/jsig.html</guid>
    <pubDate>Fri, 15 Jul 2005 16:10:06 GMT</pubDate>
  </item>
  
  </channel>
</rss>
