<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Get Elastic&#187; Tom Manning</title>
	<atom:link href="http://www.getelastic.com/author/tom-manning/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.getelastic.com</link>
	<description>#1 Subscribed Ecommerce Blog</description>
	<lastBuildDate>Thu, 11 Mar 2010 11:08:25 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Checkstyle and PMD &#8211; Helping you write code for people, not machines</title>
		<link>http://www.getelastic.com/checkstyle-and-pmd-helping-you-write-code-for-people-not-machines/</link>
		<comments>http://www.getelastic.com/checkstyle-and-pmd-helping-you-write-code-for-people-not-machines/#comments</comments>
		<pubDate>Mon, 12 Mar 2007 15:59:42 +0000</pubDate>
		<dc:creator>Tom Manning</dc:creator>
				<category><![CDATA[Ecommerce Development]]></category>

		<guid isPermaLink="false">http://www.getelastic.com/checkstyle-and-pmd-helping-you-write-code-for-people-not-machines/</guid>
		<description><![CDATA[A mistake that many junior developers make is to think that they&#8217;re writing code for the computer to understand, but computers don&#8217;t understand anything. They process. And computers can process some amazing messes without a hiccup. No, the entity that has to understand the code is the poor programmer (often yourself, weeks or months later) [...]]]></description>
			<content:encoded><![CDATA[<p>A mistake that many junior developers make is to think that they&#8217;re writing code for the <em>computer</em> to understand, but computers don&#8217;t <em>understand </em>anything. They process. And computers can process some amazing messes without a hiccup. No, the entity that has to <em>understand </em>the code is the poor programmer (often yourself, weeks or months later) who has to maintain the code.</p>
<p>One of the very easiest things that a programmer can do to help make his code more readable and easier to understand is to adhere to some standard best practices and a rigid format. But let&#8217;s be honest&#8230;. that&#8217;s really hard to do when you&#8217;re in a hurry (and we&#8217;re always in a hurry). Eclipse offers limited support for formatting, but it doesn&#8217;t go far enough. That&#8217;s where a couple of my favorite tools come in: Checkstyle and PMD. These tools will force you into submission and remind you to correct your bad habits. So, what are they, and how do they work?</p>
<p><span id="more-200"></span></p>
<p>PMD (slogan: Don&#8217;t shoot the messenger) and Checkstyle are two fantastic customizable tools that both offer Eclipse plugins to help out a developer who might otherwise, um, forget to keep things in check. Some definitions are in order.  <a href="http://pmd.sourceforge.net/">PMD</a> is a tool that checks your code for possible bugs, overcomplicated methods, duplicate code &#8211; that kind of thing. Why it&#8217;s called PMD remains a bit of a mystery. <a href="http://checkstyle.sourceforge.net/">Checkstyle</a> makes sure that your code adheres to a particular format, via means of a configuration file.</p>
<p>I have to be honest here. The first time I was introduced to these plugins I wanted to throw them out within 10 minutes. I absolutely <em>loathed </em>them<em>. </em>How dare it tell me that my method was &#8220;too complex&#8221;? How annoying to be reminded to enter a space after that bracket! But over time I came to appreciate the consistency of my code. It was nice to have that not-so-subtle reminder that I ought to consider refactoring to make my method a bit cleaner, a bit shorter.</p>
<p>Having used these tools now for several months, I really miss them when using an IDE that doesn&#8217;t have them installed. I highly recommend them to every Java developer. They need a little customizing so that they enforce the rules you or your organization care about, but the payoff of having nice, clean, professional-looking code is well worth the initial pain of having a tool force you to squash all your bad habits. So install them, try them out. You&#8217;ll thank yourself when a few weeks later you have to understand what you wrote.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.getelastic.com/checkstyle-and-pmd-helping-you-write-code-for-people-not-machines/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Developer Notebook &#8211; Eclipse Change Sets</title>
		<link>http://www.getelastic.com/developer-notes-eclipse-change-sets/</link>
		<comments>http://www.getelastic.com/developer-notes-eclipse-change-sets/#comments</comments>
		<pubDate>Fri, 09 Feb 2007 20:10:13 +0000</pubDate>
		<dc:creator>Tom Manning</dc:creator>
				<category><![CDATA[Ecommerce Development]]></category>

		<guid isPermaLink="false">http://getelastic.com/developers-notebook-eclipse-change-sets/</guid>
		<description><![CDATA[An often-overlooked feature in Eclipse 3.2 is support for Change Sets in the Team functionality. What are Change Sets, you ask? Well, picture this oft-occurring developer scenario:You&#8217;re in the middle of working on an import feature (aren&#8217;t they all?), let&#8217;s call it FeatureX, happily coding away and hoping to be awarded FeatureImplementorOfTheYear, when suddenly an [...]]]></description>
			<content:encoded><![CDATA[<p>An often-overlooked feature in Eclipse 3.2 is support for Change Sets in the Team functionality. What are Change Sets, you ask? Well, picture this oft-occurring developer scenario:You&#8217;re in the middle of working on an import feature (aren&#8217;t they all?), let&#8217;s call it FeatureX, happily coding away and hoping to be awarded FeatureImplementorOfTheYear, when suddenly an &#8220;emergency issue&#8221; is dropped into your lap. You have to drop everything you&#8217;re working on and attack this Feature Y. But here&#8217;s the problem: you&#8217;ve modified 20 source files already, and they&#8217;re not ready to check in! Implementing this &#8220;Emergency issue&#8221; is going to require modifying another dozen or so files and when it comes time to commit your FeatureY, how do you remember which files were modified for which feature?</p>
<p><span id="more-139"></span></p>
<p>Here you have a few possibilities:</p>
<ul>
<li>Checkout a new copy of your branch from CVS/SVN and implement FeatureY on that local copy (not very efficient).</li>
<li>Write down or otherwise commit to memory every file you changed for FeatureX and every file for Feature Y, then make sure you only commit the right ones when it&#8217;s time to do so. (good luck!)</li>
<li>Use Eclipse&#8217;s &#8220;Change Set&#8221; functionality to &#8220;tag&#8221; the files for FeatureX and don&#8217;t worry about them &#8211; Eclipse will remember them for you!</li>
</ul>
<p>Here&#8217;s how it works:</p>
<ol>
<li>Before you start work on Feature Y, perform a Synchronize on your Project(s). Select &#8220;outgoing mode&#8221; and click the little button on the the right of the Synchronize toolbar to enable Change Sets (it&#8217;s greyed out if you&#8217;re in &#8220;incoming/outgoing mode&#8221;, and don&#8217;t even think about using it for &#8220;incoming&#8221; mode because it will take forever).</li>
<li>Select the files that were modified for FeatureX, then right-click them and select &#8220;Add to&#8230; New Change Set&#8221;. In the dialog box that pops up, give the change set a name (say, FeatureX), and if you like, give it a CVS commit message, then press OK.</li>
<li>Notice that Ecliipse has now segregated your Synchronize view to show files that are part of your new Change Set independently of the Project&#8217;s other changes (if any).</li>
</ol>
<p>Now you can merrily go about working on Feature Y, content in the knowledge that next time you do a Synchronize, as long as your implementation of FeatureY didn&#8217;t modify the same files as FeatureX then Eclipse will keep track of which changes belong to which feature.</p>
<p>Change sets aren&#8217;t perfect, and they&#8217;re not the right tool in all cases, but sometimes they&#8217;re just what a time-crunched developer needs.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.getelastic.com/developer-notes-eclipse-change-sets/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
