<?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>Soapbox Rants and Raves &#187; Software Development</title>
	<atom:link href="http://www.beilers.com/category/software-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.beilers.com</link>
	<description>Crazy Thoughts on Software Development and Life in General</description>
	<lastBuildDate>Tue, 10 Jan 2012 05:02:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Good Bye Code Reviews, Pair Programming is the Silver Bullet&#8230;.</title>
		<link>http://www.beilers.com/2011/12/good-bye-code-reviews-pair-programming-is-the-silver-bullet/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=good-bye-code-reviews-pair-programming-is-the-silver-bullet</link>
		<comments>http://www.beilers.com/2011/12/good-bye-code-reviews-pair-programming-is-the-silver-bullet/#comments</comments>
		<pubDate>Thu, 29 Dec 2011 05:01:00 +0000</pubDate>
		<dc:creator>Phil</dc:creator>
				<category><![CDATA[Continuous Integration]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.beilers.com/?p=838</guid>
		<description><![CDATA[I actually wrote this post last March, but never got a chance to publish it. That pretty much sums up my year!!! I don&#8217;t think I was ever really happy with the way it flowed or the exact point I wanted to make. However, after working with some different teams this past year, I&#8217;m even [...]]]></description>
			<content:encoded><![CDATA[<table style="background-color: #ffc; border-color: black; border-width: 1px; border-style: solid;">
<tbody>
<tr>
<td>
<address>I actually wrote this post last March, but never got a chance to publish it. That pretty much sums up my year!!! I don&#8217;t think I was ever really happy with the way it flowed or the exact point I wanted to make. However, after working with some different teams this past year, I&#8217;m even more convinced that code reviews and standards should exist and be enforced. Good topic for another post!</address>
</td>
</tr>
</tbody>
</table>
<p><a href="http://www.extremeprogramming.org/rules.html"><img class="alignright size-full wp-image-891" style="border-style: initial; border-color: initial; margin-left: 5px; margin-right: 5px;" title="XPLogo" src="http://www.beilers.com/wp-content/uploads/2011/03/XPLogo.png" alt="" width="122" height="78" /></a><span id="internal-source-marker_0.674008569214493" style="font-size: 11pt; font-family: Arial; color: #000000; background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">I might have said this in a previous post, but I believe that many developers use Agile as an excuse to avoid following institutionalized processes. They prefer to make up their own extremely lightweight methodology, doing only the activities they enjoy or <em>believe</em> they have time for. By adopting an Agile process, many claim they can eliminate the need for analysis, design, and even code reviews! Personally, I don&#8217;t believe this was the intention of the Agile methodology. However, given the substantial number of quality gates and sign-offs that organizations </span><span style="font-size: 11pt; font-family: Arial; color: #000000; background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">institute to ensure the elimination of mistakes, it is no wonder that Agile becomes the easiest method to subvert corporate mandates and </span><span style="font-family: Arial; font-size: 15px; white-space: pre-wrap;">deliver software. I completely understand the theory and goal of these mandates, but it does seem that by the time they are institutionalized, the overhead of the process is more complicated than the actual business to be solved! And before anyone corrects my association of Agile and Pair-programming, I do realize that Pair-programming is a tenant of Extreme Programming, not Agile. Unfortunately, many </span><span style="font-family: Arial; font-size: 15px; white-space: pre-wrap;">people seem to commingle the Extreme Programming principles with Agile; XP tends to generate negative connotations in some groups, while Agile is complete accepted.</span></p>
<p><a href="http://geekandpoke.typepad.com/geekandpoke/2010/01/pair-programming.html"><img class="size-full wp-image-883 alignright" style="margin-left: 5px; margin-right: 5px;" title="Pair Programming" src="http://www.beilers.com/wp-content/uploads/2011/03/pairprogramming.png" alt="" width="200" height="96" /></a></p>
<div style="background-color: transparent; font-family: 'Times New Roman'; font-size: medium;"><span style="font-family: Arial;"><span style="font-size: 15px; white-space: pre-wrap;">Not so recently, a coworker sent me a question, wondering if I thought that </span></span><em style="font-family: Arial; font-size: 15px; white-space: pre-wrap;">Pair-programming eliminated the need for code reviews</em><span style="font-family: Arial;"><span style="font-size: 15px; white-space: pre-wrap;">. I have actually heard this claim by several Agile teams in the past, using pair programming as an approach to avoid the code review process. There are several reasons that developers are quick to forgo code reviews, I believe the two most prevalent reasons are:</span></span></div>
<div style="background-color: transparent; font-family: 'Times New Roman'; font-size: medium;">
<ol style="font-family: 'Times New Roman'; font-size: medium;">
<li style="list-style-type: decimal; font-size: 11pt; font-family: Arial; color: #000000; background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"><span style="font-size: 11pt; font-family: Arial; color: #000000; background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Code reviews are done as an SDLC requirement; not because the development team actually desires to conduct them or finds value in them.</span></li>
<li style="list-style-type: decimal; font-size: 11pt; font-family: Arial; color: #000000; background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"><span style="font-size: 11pt; font-family: Arial; color: #000000; background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">The vast majority of code reviews are completely ineffective; there is no preparation, no structured process, and no follow through on findings.</span></li>
</ol>
<p style="font-family: 'Times New Roman'; font-size: medium;"><span style="font-size: 11pt; font-family: Arial; color: #000000; background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><a href="http://www.beilers.com/wp-content/uploads/2011/03/documents.png"><img class="size-full wp-image-884 alignleft" style="margin-left: 5px; margin-right: 5px;" title="documents" src="http://www.beilers.com/wp-content/uploads/2011/03/documents.png" alt="" width="200" height="175" /></a>There is actually a lot of Internet discussion on this subject; I have included a few links at the bottom of this post which I found interesting. None of them changed my personal views, in that code reviews cannot (should not) be eliminated from the process. One point that I would concede, is that pair-programming could make the code review process easier, assuming that fewer issues will be discovered during the review.</span></p>
<p style="font-family: 'Times New Roman'; font-size: medium;"><span style="font-family: Arial;"><span style="font-size: 15px; white-space: pre-wrap;">I believe that code reviews should be a &#8220;continuous process&#8221; during the entire development cycle; whereas most people consider the code review to be a process point. Some believe that the review is something that happens at the end of development, after the code is completed, after it has been tested; typically when it too late in the process to make corrections. </span></span><span style="font-family: Arial; font-size: 15px; white-space: pre-wrap;">I feel that code reviews are a never ending cycle of four basic activities, all contributing to the overall quality of the code base.</span></p>
<p style="font-family: 'Times New Roman'; font-size: medium;"><span style="font-size: 11pt; font-family: Arial; color: #000000; background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><a href="http://www.beilers.com/wp-content/uploads/2011/04/process.png"><img class="alignright size-full wp-image-895" title="process" src="http://www.beilers.com/wp-content/uploads/2011/04/process.png" alt="" width="300" height="240" /></a></span></p>
<ol>
<li style="list-style-type: decimal; font-size: 11pt; font-family: Arial; color: #000000; background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"><span style="font-size: 11pt; font-family: Arial; color: #000000; background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: Arial;"><span style="font-size: 11pt; white-space: pre-wrap;">The easiest and cheapest process is through automation. There are two basic solutions, the IDE and a Continuous Integration Server. Your IDE can be one of the most effective tools. Eclipse can be configured </span><span style="font-size: 11pt; white-space: pre-wrap;">to share coding standards and validations across the development team, eliminating numerous bad practices at </span><span style="font-size: 15px; white-space: pre-wrap;">their</span><span style="font-size: 11pt; white-space: pre-wrap;"> point origin</span></span><span style="font-family: Arial;"><span style="font-size: 11pt; white-space: pre-wrap;">. Tools such as Checkstyle, PMD, and FindBugs can easily be </span></span><span style="font-family: Arial;"><span style="font-size: 11pt; white-space: pre-wrap;">incorporated into your IDE. These same validations (rules) can also be utilized by your Continuous Integration server, providing the final conformance </span><span style="font-size: 15px; white-space: pre-wrap;">checks</span><span style="font-size: 11pt; white-space: pre-wrap;">. Automation eliminates almost all of the </span></span><em>soft</em> <span style="font-family: Arial;"><span style="font-size: 11pt; white-space: pre-wrap;">issues from the review process and even promotes better coding practices.</span></span></span></li>
<li style="list-style-type: decimal; font-size: 11pt; font-family: Arial; color: #000000; background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"><span style="font-size: 11pt; font-family: Arial; color: #000000; background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-size: 11pt; white-space: pre-wrap; font-family: Arial;">Pair-programming is a very valuable technique and I enjoy the collaboration and education that happens during the process. However, I&#8217;m not sure that pair-programming works on all teams, there needs to be a real sense of </span><span style="font-size: 15px; white-space: pre-wrap; font-family: Arial;">openness</span><span style="font-family: Arial;"> and cooperation for the pairing to be effective. And there lies the real issue, if the pair is very cohesive in their approach, you have the problem of &#8220;</span><em style="color: #000000; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; white-space: pre-wrap; text-decoration: none;"><span style="font-family: Arial;">group think&#8221;.</span></em><span style="font-family: Arial;"><span style="font-size: 11pt; white-space: pre-wrap;"> If everyone is thinking the same way, it will be much harder to discover issues outside of their common perspective. I believe that code reviews can be more effective when conducted by people who are not wed to the design and/or implementation; an external perspective is always valuable to the process. </span></span><span style="font-family: Arial;"><span style="font-size: 11pt; white-space: pre-wrap;">Another small problem is related to traceability, without the review, there are no review artifacts or documentation to support the process. Next you have the practicality of the schedule. Assuming that you can eliminate the code review process by requiring pair-</span><span style="font-size: 15px; white-space: pre-wrap;">programming</span><span style="font-size: 11pt; white-space: pre-wrap;">, how do you mandate or assure that it happens? Was all of the code written </span></span><em style="color: #000000; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; white-space: pre-wrap; text-decoration: none;">together</em><span style="font-family: Arial;"><span style="font-size: 11pt; white-space: pre-wrap;"> by the pair? I find it really hard to believe that 100% of the code will be written </span></span><em style="color: #000000; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; white-space: pre-wrap; text-decoration: none;">completely</em><span style="font-family: Arial;"><span style="font-size: 11pt; white-space: pre-wrap;"> by the pair. Given all of the demands placed on people, with meetings, vacations, kids, etc; it would not leave many <em>shared</em> hours for pair to </span></span><span style="font-size: 15px; white-space: pre-wrap;">write</span><span style="font-size: 11pt; white-space: pre-wrap;"> code. It does not seem practical to mandate that no code will be written outside of the paring. So do you only review the code that was not written by the pair? Sounds complicated! All that we accomplished was removing a &#8220;learning opportunity&#8221; from everyone on the team, including the developer that wrote the code!</span></span></li>
<li style="list-style-type: decimal; font-size: 11pt; font-family: Arial; color: #000000; background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"><span style="font-size: 11pt; font-family: Arial; color: #000000; background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">I&#8217;m not sure that &#8220;Continuous Review&#8221; is an officially documented concept, but it is a technique that I have used successfully over the years. Continuous Review is fairly simple, but is potentially time-consuming and highly prone to apathy. The process is extremely trivial; before accepting changes from your teammates, simply review the change set in your IDE. It can be quickly accomplished using the Team View found within Eclipse. You can walk through each commit and its associated files before updating your work area. By spending this small amount of time throughout the development process (each day), you can help ensure that everyone is on the same page; even ensuring that the code is in sync with the design. You get a very good sense of the overall heath and progress of the project, just by watching the commit stream. Unfortunately, not many developers seem to adopt this role, as it takes a serious commitment and can also cause tension, when the team is not as cohesive as it should be (some developers might feel like they are being monitored).</span></li>
<li style="list-style-type: decimal; font-size: 11pt; font-family: Arial; color: #000000; background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline;"><span style="font-size: 11pt; font-family: Arial; color: #000000; background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: Arial;"><span style="font-size: 11pt; white-space: pre-wrap;">The final and most common piece of the review process is the traditional “code review”. It has been my experience that this type of review is generally the most ineffective. Even with years of published guidelines, which could actually make the process effective, they are typically tossed out due to the lack of time and management guidance</span><span style="font-size: 11pt; white-space: pre-wrap;">. I have blogged on this subject in the past. These reviews turn out to be more of a <em>code presentation</em> rather than a review. This will unfortunately be the first time that many of the participants will have actually seen the code!  No time is allocated for participant preparation. Worse yet, no time is ever allocated for the correction of discovered issues. The <em>reviews </em>are always performed late in the development cycle or during the testing cycle, simply to satisfy an SDLC deliverable. I believe many developers have been conditioned into disrespecting code reviews, simply because they become just another meeting, which produces very little value.</span></span></span></li>
</ol>
<p><span style="font-size: 11pt; font-family: Arial; color: #000000; background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><img class="size-full wp-image-885 alignright" title="inspect" src="http://www.beilers.com/wp-content/uploads/2011/03/inspect.png" alt="" width="170" height="113" /></span><span style="font-family: Arial;"><span style="font-size: 15px; white-space: pre-wrap;">I might sound like I’m against code reviews, far from it. I am against the </span></span><em style="font-family: Arial; font-size: 15px; white-space: pre-wrap;">traditional </em><span style="font-family: Arial;"><span style="font-size: 15px; white-space: pre-wrap;">code process that focuses on developer selected code, typically presented during a meeting. I recently reviewed the Crucible tool from Atlassian. The tool is far from perfect, but is ideal for managing asynchronous, distributed code reviews. Automated tools provide a variety of methods for selecting the code to be included in the review process, such as querying by user id or change ticket number.  The selected changes are then assigned to a collection of developers and the process begins. Each developer is notified via email that they have been assigned a collection of code to review.  When </span><em style="font-size: 15px; white-space: pre-wrap;">convenient</em><span style="font-size: 15px; white-space: pre-wrap;"> for the reviewer, they log into the tool and are presented the files to review. Crucible actually tracks your progress through each file, giving progress feedback to the review coordinator, indicating that progress is underway.  The developer is presented the change sets and can add comments directly into the code. Each comment can be categorized as an issue or suggestion. I think Crucible is an great tool, but provides absolutely no reporting capabilities. I have talked with Atlassian and they seem to have absolutely no interest in generating meaningful reports. Even the simplest report, which would show all of the issues found during the review is not possible to produce. I’m a huge Atlassian fan, but this lack of functionality completely boggles my brain.  In today’s evidence driven SDLC world, the documentation from the code review is actually more important the code review itself!</span></span></p>
<p><span style="font-family: Arial;"><span style="font-size: 15px; white-space: pre-wrap;">Obviously, I don&#8217;t think code reviews should </span></span><em style="font-family: Arial; font-size: 15px; white-space: pre-wrap;">ever </em><span style="font-family: Arial;"><span style="font-size: 15px; white-space: pre-wrap;">be eliminated from the process. I also believe it is possible to achieve real </span><em style="font-size: 15px; white-space: pre-wrap;">value</em><span style="font-size: 15px; white-space: pre-wrap;"> from them, with very little overhead. Hopefully someday, I will actually be able to prove it!</span></span></p>
</div>
<div><a href="http://stackoverflow.com/questions/564882/if-you-pair-program-do-you-still-need-a-peer-review" target="_blank"><img class="alignleft size-full wp-image-889" title="stackoverflow" src="http://www.beilers.com/wp-content/uploads/2011/03/stackoverflow.png" alt="" width="64" height="74" /></a></div>
<div>
<p><a href="http://www.codinghorror.com/blog/2007/11/pair-programming-vs-code-reviews.html" target="_blank"><img class="alignnone size-full wp-image-888" title="angrycode" src="http://www.beilers.com/wp-content/uploads/2011/03/angrycode.png" alt="" width="75" height="71" /></a><a href="http://www.awkwardcoder.com/index.php/2010/08/27/10-ways-to-kill-pair-programming/" target="_blank"><img class="alignnone size-medium wp-image-887" title="awkward" src="http://www.beilers.com/wp-content/uploads/2011/03/awkward-300x63.png" alt="" width="300" height="63" /></a><a href="http://www.google.com/webhp?hl=en&amp;tab=ww#hl=en&amp;sugexp=gsis&amp;xhr=t&amp;q=pair+programming+eliminate+code+reviews&amp;cp=39&amp;qe=cGFpciBwcm9ncmFtbWluZyBlbGltaW5hdGUgY29kZSByZXZpZXdz&amp;qesig=OZq0Nw5m9Gq9Um-FW0v4AQ&amp;pkc=AFgZ2tkKaP-fgq1IAz8gCo1kpcRM1vEpiNIVo0F5nCqojq4ixVx-viwfUuxjU2aw0v066wn0i5sBNeOvR4NEOm7WNH6oKrJeug&amp;pf=p&amp;sclient=psy&amp;site=webhp&amp;source=hp&amp;aq=f&amp;aqi=&amp;aql=&amp;oq=pair+programming+eliminate+code+reviews&amp;pbx=1&amp;bav=on.2,or.r_gc.r_pw.&amp;fp=87b61fcb467d957c" target="_blank"><img class="alignnone size-full wp-image-890" title="google" src="http://www.beilers.com/wp-content/uploads/2011/03/google.png" alt="" width="177" height="74" /></a></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.beilers.com/2011/12/good-bye-code-reviews-pair-programming-is-the-silver-bullet/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Tired of reading blogs? Try Listening to some podcasts&#8230;</title>
		<link>http://www.beilers.com/2011/03/tired-of-reading-blogs-try-listening-to-some-podcasts/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=tired-of-reading-blogs-try-listening-to-some-podcasts</link>
		<comments>http://www.beilers.com/2011/03/tired-of-reading-blogs-try-listening-to-some-podcasts/#comments</comments>
		<pubDate>Tue, 29 Mar 2011 04:01:33 +0000</pubDate>
		<dc:creator>Phil</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.beilers.com/?p=862</guid>
		<description><![CDATA[During my time off, I decided to start listening to some technical podcasts. I assume this makes me a complete geek, but since I increased my running distance to three miles per day, it turned out to be a very good use of my time. I believe podcasts can be an excellent source of information [...]]]></description>
			<content:encoded><![CDATA[<p><img style="float: right;" src="http://www.beilers.com/wp-content/uploads/2011/03/listen_logo.png" alt="" width="48" height="48" />During my time off, I decided to start listening to some technical podcasts. I assume this makes me a complete geek, but since I increased my running distance to three miles per day, it turned out to be a very good use of my time. I believe podcasts can be an excellent source of information and even entertainment. The best strategy is to listen to different topics, topics that you don&#8217;t encounter everyday. A person can only read so many blogs! If you are like me, you probably only read blogs which are related to your personal interests. Seems completely normal, but how do you ever get exposed to different technologies or techniques? Unless you change companies or completely refresh your team every 6 to 12 months, your learning environment can become very stale. Listening to different topics is an great way to re-energize your brain and kick start your creative thought processing; at least it does for me!</p>
<p>Several months ago, I discovered <a href="http://www.hanselman.com/blog/AboutMe.aspx" target="_blank">Scott Hanselman</a>. He happens to work for Microsoft, but don&#8217;t hold that against him. He records several podcasts each week or so; I subscribe to two of them and they are both excellent. Scott focuses on a variety of software development issues and technologies. <a href="http://www.hanselminutes.com/archives.aspx" target="_blank">Hanselminutes </a> is more technology oriented, while <a href="http://thisdeveloperslife.com/" target="_blank">This Developers Life</a> covers a variety of personal issue, from motivation, drive, to the Egyptian Revolution. I highly recommend going back and listening to all of the old <em>This Developer&#8217;s Life</em> episodes; I can&#8217;t tell you how insightful and reflective they are. As an added bonus, you get to hear some rather interesting musical choices! The people that he interviews are so interesting and have some really funny commentary. You will hear stories from different types of developers, both famous and infamous. You will learn how they navigated through their careers, sometimes successfully and other times, not so well. All I can say, is they are definitely worth the time! I hope you enjoy them as much as I did.</p>
<p><a href="http://www.hanselminutes.com/archives.aspx " target="_blank"><img src="http://www.beilers.com/wp-content/uploads/2011/03/handelminutes.png" alt="" width="361" height="110" /></a></p>
<div style="background-color: transparent; font-family: 'Times New Roman'; font-size: medium;"><a href="http://thisdeveloperslife.com/" target="_blank"><img src="http://www.beilers.com/wp-content/uploads/2011/03/developerslife.png" alt="" width="473" height="86" /></a></div>
<div>
<p>Interesting Podcast Topics from Hanselminutes&#8230;</p>
</div>
<div style="background-color: transparent; font-family: 'Times New Roman'; font-size: medium;">
<p><span style="font-size: 11pt; font-family: Arial; color: #000099; background-color: transparent; font-weight: normal; font-style: normal; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;"><a href="http://www.hanselminutes.com/default.aspx?showID=275" target="_blank"></a><a href="http://www.hanselminutes.com/default.aspx?showID=263" target="_blank"><img style="margin-left: 5px; margin-right: 5px;" src="http://www.beilers.com/wp-content/uploads/2011/03/kayak.png" alt="" width="75" height="70" /></a><a href="http://www.hanselminutes.com/default.aspx?showID=275" target="_blank"><img src="http://www.beilers.com/wp-content/uploads/2011/03/jquery.jpg" alt="" width="73" height="73" /></a><a href="http://www.hanselminutes.com/default.aspx?showID=276" target="_blank"></a><a href="http://www.hanselminutes.com/default.aspx?showID=276" target="_blank"><img src="http://www.beilers.com/wp-content/uploads/2011/03/SElogo.png" alt="" width="75" height="70" /></a><a href="http://www.hanselminutes.com/default.aspx?showID=274" target="_blank"><img src="http://www.beilers.com/wp-content/uploads/2011/03/appharbor.png" alt="" width="73" height="73" /></a><a href="http://www.hanselminutes.com/default.aspx?showID=278" target="_blank"><img class="size-full wp-image-867 alignnone" title="VSTS" src="http://www.beilers.com/wp-content/uploads/2011/03/VSTS.jpg" alt="" width="121" height="75" /></a></span></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.beilers.com/2011/03/tired-of-reading-blogs-try-listening-to-some-podcasts/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Upgraded Web Browsing&#8230;. Firefox 4 and Chrome 10&#8230;</title>
		<link>http://www.beilers.com/2011/03/upgraded-web-browsing-firefox-4-and-chrome-10/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=upgraded-web-browsing-firefox-4-and-chrome-10</link>
		<comments>http://www.beilers.com/2011/03/upgraded-web-browsing-firefox-4-and-chrome-10/#comments</comments>
		<pubDate>Tue, 15 Mar 2011 15:49:18 +0000</pubDate>
		<dc:creator>Phil</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.beilers.com/?p=825</guid>
		<description><![CDATA[This might seem a little off topic, but the web browser could be considered one of your primary development tools. Just think how much time you actually spend in a browser:  researching, reading, testing, debugging, or simply wasting time! After playing with a few Chrome Extensions, I realized just how much more efficient I could be.  I [...]]]></description>
			<content:encoded><![CDATA[<p>This might seem a little off topic, but the web browser could be considered one of your primary development tools. Just think how much time you actually spend in a browser:  researching, reading, testing, debugging, or simply wasting time! After playing with a few Chrome Extensions, I realized just how much more efficient I could be.  I liked the way Chrome integrates information and makes it useful, which is essentially <a href="http://www.google.com/corporate/" target="_blank">Google&#8217;s Mission</a>.</p>
<p>I had been a loyal Firefox user for many years. Firefox provided a nice <em>cross-platform</em> experience between Windows and Linux, and was highly extensible. This extensibility was one of the early benefits of Firefox, the ability to add new behavior to the browser through &#8220;Add-ons&#8221;. Amazingly, I was never a big &#8220;Add-on&#8221; user, I used a few of them, but did not take advantage or even explore what they could do for me. I used the <a href="https://addons.mozilla.org/en-US/firefox/addon/delicious-bookmarks/" target="_blank">Delicious Add-on</a> for my bookmarking needs, but recently moved to the <a href="https://addons.mozilla.org/en-US/firefox/addon/diigo-web-highlighter-and-stic/" target="_blank">Diigo Add-on</a>. I also use <a href="https://addons.mozilla.org/en-US/firefox/addon/firefox-sync/" target="_blank">Firefox Sync</a> for browser synchronization, including my tabs, bookmarks, history, etc. For posting to my blog, I&#8217;m a huge fan of the <a href="https://addons.mozilla.org/en-US/firefox/addon/scribefire-blog-editor/" target="_blank">ScribeFire Add-on</a>.  If you happen to do web page development, you have to try the <a href="https://addons.mozilla.org/en-US/firefox/addon/firebug/" target="_blank">Firebug Add-on</a>. That is basically the extent of my Add-on usage, I did not ask too much from my browser!</p>
<p><img style="border: 5px solid white; float: left;" src="http://www.beilers.com/wp-content/uploads/2011/03/firefox1.png" alt="" width="700" height="178" /></p>
<p>Before jumping ship, I upgraded all of my machines to the Firefox 4 Beta. There were numerous technical improvements, but I was primarily focused on pure usability and how the browser could help me be more efficient. Start-up time was one of my biggest Firefox complaints; the browser seemed to have a tendency to bog down over time. The new version seems to have gone through a pretty dramatic user interface overhaul and addressed multiple performance issues, including start-up.</p>
<p><img style="float: right; border: 5px solid white;" src="http://www.beilers.com/wp-content/uploads/2011/03/BrowserShare.png" alt="" width="300" height="300" /></p>
<p>I was pretty happy with the UI changes, preferring the new, but controversial new tab location. The tabs are now located over-top of the navigation tool-bar; there was apparently quite a bit of debate on this little change! I prefer having two control rows at the top of the browser window, one row for tabs and the another row for navigation, apps, and widgets. I have seen a lot of content about these &#8220;web apps&#8221;, but it seems a little like pure marketing to me! The Firefox implementation, <a href="http://techdows.com/2010/07/how-to-turn-websites-into-app-tabs-in-firefox.html" target="_blank">App Tabs</a>, appear to be little more than a <em>space </em>saving short-cut; however, I can see them providing value for highly used web sites.</p>
<p>I had installed Chrome a couple of years ago, but was not too excited by it; I saw no compelling reason to change browsers. Wikipedia has an interesting graph of web browser <a href="http://en.wikipedia.org/wiki/Google_Chrome" target="_blank">usage</a>; I was really amazed to see how the Chrome market share has taken off in the last twelve months. Even on my own blog, Chrome accounts for almost 25% of the traffic. I installed the newest version of Chrome last week and was <em>immediately</em> hooked. Unfortunately, I have become a true Google convert. It started with the purchase of my Android phone and there was no looking back. I am not saying that the following activities can or cannot be done in Firefox, I&#8217;m simply saying that I like everything better in Chrome!</p>
<p><img style="float: left; border: 5px solid white;" src="http://www.beilers.com/wp-content/uploads/2011/03/webapp.png" alt="" width="600" height="239" />A simple, but extremely cool feature is the &#8220;New Tab&#8221; behavior. It obviously opens a new tab, but its contents are quite different than you would expect. It is basically divided into three sections, Apps, Most visited, and Recently closed. Under the Apps section, you will see the Web Store icon; does everyone need to have their own app store these days? Anyway, the Web Store is a very well done site, that makes searching and installing new <em>behavior</em> extremely easy, using either applications or extensions.</p>
<p>Applications seem like fancy bookmarks, but from my reading, they can be (are) a lot more sophisticated. I looked at the <a href="https://chrome.google.com/webstore/detail/omeengfjefdmhnkojnfmncpfdbhnecea" target="_blank">SlideRocket</a> app, it was genuinely cool&#8230; however, you can also run the <em>app </em>in Firefox! The <em>app</em> concept seems analogous to a <em>rich user interface </em>experience, one that performs like a real desktop application, rather than a collection of old-fashioned HTML pages.</p>
<p><img style="border: 5px solid white; float: right;" src="http://www.beilers.com/wp-content/uploads/2011/03/ChromeExtensions.png" alt="" width="414" height="77" />My favorite feature of Chrome has to be the Extensions. Extensions add additional behavior to the browser itself. You can see from the picture to the right, I have added quite a few of them! They integrate into the Navigation Bar and look very nice, consuming minimal space while providing significant functionality. They look similar to the icons found in cell phones; many of the extensions have little indicators that track the number of items you need to address. You can find extensions for all of the standard Google tools: Gmail, Reader, Calendar, and even eBay. The Calendar extension is extremely helpful; it will tell you how long until your next appointment and when you mouse over it, it shows you the event details. The WP Stats is another personal favorite; it tells me how many people have looked at my site! Clicking on some icons will navigate you into the corresponding website, much like a short cut. Other icons have specific behavior, such as showing you detailed web site access statistics or an enhanced view of your search history. My favorite blogging tool, ScribeFire is also available in Chrome, but the spell checker is not working! I like the placement and interaction of the Chrome extensions much better than the traditional Firefox &#8220;Add-on&#8221; view, which is typically at the bottom of the browser window; Chrome make the extensions feel more integrated with the browser and part of the actual user experience.</p>
<p>My final Chrome praise is the synchronization with my Google account. It is pretty cool to watch an extension get automatically installed on my Windows machine, simply by installing it on my Linux machine. No restart or refresh required, it just automatically shows up!  I did notice one small oddity, I still had to <em>configure </em>the extension on the Windows machine. This seems rather strange, maybe it is a bug&#8230;. I assumed that Chrome would save each of the extension&#8217;s settings and synchronize them too. Even with this little shortcoming, there is no going back to Firefox for me, I hope you give it a try too!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.beilers.com/2011/03/upgraded-web-browsing-firefox-4-and-chrome-10/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>TDD is too hard&#8230;</title>
		<link>http://www.beilers.com/2011/03/tdd-is-too-hard/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=tdd-is-too-hard</link>
		<comments>http://www.beilers.com/2011/03/tdd-is-too-hard/#comments</comments>
		<pubDate>Thu, 03 Mar 2011 19:11:44 +0000</pubDate>
		<dc:creator>Phil</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Testing]]></category>

		<guid isPermaLink="false">http://www.beilers.com/?p=814</guid>
		<description><![CDATA[Earlier this year, I participated in a meeting to recommend testing best practices. Being fairly passionate about TDD, and working in an environment where unit testing is fundamentally an afterthought, I assumed the group would certainly recommended TDD as a best practice. Amazingly, TDD failed to get the official endorsement. Many of the committee members [...]]]></description>
			<content:encoded><![CDATA[<div>
<div><a href="http://thinkfirst.org/" target="_blank"><img style="float: right; margin-top: 10px; margin-bottom: 10px; margin-left: 10px;" src="http://www.beilers.com/wp-content/uploads/2011/03/moz-screenshot.png" alt="" /></a>Earlier this year, I participated in a meeting to recommend testing best practices. Being fairly passionate about TDD, and working in an environment where unit testing is fundamentally an afterthought, I assumed the group would certainly recommended TDD as a best practice. Amazingly, TDD failed to get the official endorsement. Many of the committee members stated that TDD was too hard and required too much up front work. Too hard? Really? I was very surprised by their rational, especially since many of them were seasoned developers. The image to the right has nothing to do with software development, but I love the message! I thought there was a rather subtle correlation to TDD: Thinking first can prevent problems. <em>Think First</em> is probably a little misleading, surely, everyone claims to <em>think</em> before embarking on a task. For me, the <em>real</em> value behind TDD is the <em>thought</em> process; I like to connect <em>thinking</em> with the design process, not the coding process</div>
<div>I had the opportunity to participate in a SD Times webinar on Wednesday called &#8220;<a href="http://www.sdtimes.com/content/resources.aspx?ShowOnlyResourceID=418" target="_blank">Leaders of Agile: Practical Agile with Test-Driven Development</a>&#8221; by <a href="http://www.threeriversinstitute.org/blog/" target="_blank">Kent Beck</a> and <span class="description"><a href="http://blog.ploeh.dk/" target="_blank">Mark Seemann</a>.  I took some notes on points I thought were relevant to truly adopting TDD.</span></div>
<p><span class="description"> </span></p>
</div>
<table style="border-collapse: collapse;" border="1" width="90%" align="center">
<tbody>
<tr align="center" bgcolor="lightgrey">
<td>Concept</td>
<td>Observation</td>
</tr>
<tr align="left">
<td valign="top">Write a little test, write a little code, iterate.<br />
- Don&#8217;t spend hours writing code<br />
- TDD tells you where you stand</td>
<td valign="top">I have worked with a lot of developers that literally spent hours writing code without ever executing it. Once they <em>feel</em> like they are done coding, they start to think about testing. Many times, this testing is done in the same manner as their development, which I will describe as &#8220;without a plan&#8221;.  Some even avoid structured, assertion-based testing frameworks, they simply spin up the container and execute the code. This approach will certainly work, but would you really say this is the most effective approach? You end up with a huge pile of un-validated, un-executed code.  Unless you are perfect and never make mistakes, you have no clue how many bugs are buried in the code. Even worse, if you discover a design problem or a more elegant approach, how much code will you have to change or toss away? This is not to say that refactoring or eliminating code is bad. The point is, this effort could have been minimized or even prevented by <em>thinking first</em>. Another benefit of starting from the test perspective, is you always know where you stand in the process; the test works or it does not. If the test does not work, you are probably <em>not</em> done.</td>
</tr>
<tr align="left">
<td valign="top">TDD allows you to defer design decisions<br />
- Refactoring and Retrofitting<br />
- Working test first, Design as you go</td>
<td valign="top">If you think about TDD from an iterative perspective, you are basically working from the outside in. You can almost compare it to the Object Oriented principle of encapsulation, hiding or postponing design decisions.  Unit test should be focused on the <em>behavior</em> of the class, not the actual <em>implementation</em>. Because the unit test is focused on behavior, you have the opportunity to defer some of the design/implementation decisions to a later iteration. This later iteration might only be a couple of hours later, but, by <em>thinking first</em> about the desired behavior and interaction, you are not required to commit to an actual design or implementation.  Obviously refactoring can be a big part of TDD and is hopefully not considered a deterrent. Refactoring does have a cost; I believe this cost is justified and minimized by the confidence provided by a good unit test suite and the long term supportability of a elegant design.</td>
</tr>
<tr align="left">
<td valign="top">TDD = API Design</td>
<td valign="top">For me, TDD is more about the design process than the actual unit test. TDD forces me to concentrate on how the class will be utilized, enabling me to focus on the requirements of the class, implementing no more functionality than is actually necessary. Implementing the class first, you are basically guessing at the API, only imagining how the class could be used. Adding and subtracting methods as you go, based on how you feel the class might be invoked. I have to believe that this approach will generally not result in the cleanest API. Focusing on the external interaction and dependencies provides a simpler and more exact view of the actual implementation requirements.</td>
</tr>
<tr align="left">
<td valign="top">Tests are First Class Citizens.</td>
<td>This one is very near and dear to my heart. I can&#8217;t tell you how many times developers have pushed back on the enforcement of coding standards and quality as it pertains to the unit test suite. Why would anyone want to allow or encourage bad coding practices in the unit test code, that are not allowed in the <em>real</em> code? Do developers have a quality switch that can be turned on and off? Writing good, clean code over here, and sloppy code over there? It should be all about consistency and supportability. Unit tests need to be as understandable and maintainable as the mainline code; they will be maintained as long as the mainline code and over time, could provide more value (comprehension) than the mainline code.</td>
</tr>
<tr align="left">
<td valign="top">Testable = Loosely Coupled</td>
<td valign="top">Testability is another topic I find very interesting. I just love the <a href="http://code.google.com/p/testability-explorer/" target="_blank">Testability Explorer</a> tool, but was never able to get others excited about this concept. If not designed effectively, unit tests have the potential to become a roadblock of change. Unfortunately, the same point can be made about the actual code; there are certain designs and implementation that can impede future change. The goal is to use patterns and tools that support change, such as dependency injection. Some people think that TDD can encourage coding without thinking; I have the complete opposite view, thinking first, to establish the design. It is my opinion that TDD is just one small tool that helps flush out designs; doing so without significant overhead and simultaneously building a safety net.</td>
</tr>
</tbody>
</table>
<p> </p>
<div>
<div>I was not sure how these &#8220;virtual conferences&#8221; actually worked, but this one was very well organized and seemed to go off perfectly. I was very impressed with both of the speakers and recommend subscribing to their blogs. They each made numerous points, but I wanted to share a point from each of them that I found encouraging.  I will probably paraphrase them poorly, but hopefully you get the point!</div>
</div>
<p> </p>
<table style="border-collapse: collapse;" border="1" width="90%" align="center">
<tbody>
<tr align="center" bgcolor="lightgrey">
<td>Speaker</td>
<td valign="top">Thoughts&#8230;</td>
</tr>
<tr align="left">
<td valign="top">Kent Beck &#8211; &#8220;Everything is hard. You need to be eager and willing to learn.&#8221;</td>
<td valign="top">I thought it was refreshing to hear the words, &#8220;eager and willing&#8221;.  Unfortunately, we are not always eager and willing! You can&#8217;t force anyone to learn or change. There has to be a willingness; we need to be open-minded to absorb and process new thoughts. The benefits are not always immediate and may cause some pain, but in the end, learning is what makes us better.</td>
</tr>
<tr align="left">
<td valign="top">Mark Seemann &#8211; &#8220;I tend to do a lot of thinking.&#8221;</td>
<td valign="top">I thought this was great! I never hear people say they <em>do a lot of thinking</em>. Many of us tend to jump into the fire, probably because we are not given sufficient time to evaluate at the situation. My challenge to you, demand the time, take the time. Think First!</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.beilers.com/2011/03/tdd-is-too-hard/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Build Evolution: Ant to Maven &#8211; A simple exercise&#8230;</title>
		<link>http://www.beilers.com/2011/03/build-evolution-ant-to-maven-a-simple-exercise/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=build-evolution-ant-to-maven-a-simple-exercise</link>
		<comments>http://www.beilers.com/2011/03/build-evolution-ant-to-maven-a-simple-exercise/#comments</comments>
		<pubDate>Tue, 01 Mar 2011 11:08:39 +0000</pubDate>
		<dc:creator>Phil</dc:creator>
				<category><![CDATA[Continuous Integration]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.beilers.com/?p=801</guid>
		<description><![CDATA[I typically end up taking the role of &#8220;build guy&#8221; and I have no idea why! It is probably a control thing; I like to be able to fix problems and make improvements. I have been an Ant-man for many years, and was proficient in the &#8220;Art of Make&#8221; before that. I never gave Maven [...]]]></description>
			<content:encoded><![CDATA[<div><a href="http://maven.apache.org/" target="_blank"><img style="float: left; margin-top: 10px; margin-bottom: 10px; margin-right: 10px;" src="http://www.beilers.com/wp-content/uploads/2011/02/moz-screenshot.png" alt="" /></a>I typically end up taking the role of &#8220;build guy&#8221; and I have no idea why! It is probably a control thing; I like to be able to fix problems and make improvements. I have been an Ant-man for many years, and was proficient in the &#8220;Art of Make&#8221; before that. I never gave Maven a chance, as it always <em>seemed</em> like it was too complicated for adoption by corporate projects. Ant <em>can</em> be very simple and quick; some might even throw the word <em>dirty</em> in there! <a href="http://ant.apache.org/" target="_blank"><img style="float: right; margin-top: 10px; margin-bottom: 10px; margin-left: 10px;" src="http://www.beilers.com/wp-content/uploads/2011/02/moz-screenshot-1.png" alt="" /></a>Unfortunately, I have seen (hopefully not created!) some of the most horrific Ant build systems imaginable. Many times, it is a developer&#8217;s &#8220;first time effort&#8221; that becomes the project&#8217;s permanent build system. Because I had the opportunity to work on many different Ant-based projects, I gained experience by using and evaluating many different approaches. I believe that real problem with Ant, is not necessarily Ant itself, but the lack of standards and structure it provides. Ant allows each developer (or project) to invent its own Ant Philosophy. Once you are familiar with the Ant &#8220;programming style&#8221;, you can script just about anything, any way you want, manipulating files located in any direct structure, located anywhere on the network. Ant is a very powerful and flexible tool. Unfortunately, the more <em>inventive</em> the Ant Philosophy is, the more brittle and complicated the scripts <em>can</em> become. Ant XML also seems to be an excellent &#8220;cut and paste&#8221; candidate. New team members, with little time or understanding of Ant or the specific philosophy implemented, find duplicating targets the safest method to implement change. Another shortcoming of <a href="http://ant.apache.org/ivy/" target="_blank"><img style="float: left; margin-top: 10px; margin-bottom: 10px; margin-right: 10px;" src="http://www.beilers.com/wp-content/uploads/2011/02/moz-screenshot-3.png" alt="" /></a>Ant is dependency management. This problem is easily solved and have blogged about it numerous times in the past. I believe that the use of a dependency management tool, such as Ivy, is an evolutionary step taken by &#8220;build guys&#8221;. Sadly, many developers don&#8217;t seem to be interested in dependency management. They don&#8217;t like the dependency on the dependency management tool and would rather just manage them within the project. For me, the value of the central repository and structurally documented, versioned dependencies cannot be undervalued.</div>
<p>I have probably described many of the same experiences you have encountered with Ant-based projects; they can be even more exaggerated when you start managing multiple projects. One possible evolution path is to define a &#8220;standard&#8221; directory structure and develop a collection of &#8220;shared&#8221; Ant scripts that work with the standard directory structure. This allows each individual project&#8217;s build XML to be little more than a set of properties. This is exactly where we ended up, utilizing an Ivy-like externalized repository for build scriptlets and Ant&#8217;s URL import capability. Hold on, a standard directory structure with reusable build components? Almost sounds like some other tool&#8230;</p>
<table style="border-collapse: collapse;" border="1" width="90%" align="center">
<tbody>
<tr align="center" bgcolor="lightgrey">
<td>The Experiment&#8230;</td>
</tr>
<tr align="left">
<td>Being an Eclipse guy, I was curious how to combine an Eclipse Web Tools Platform (WTP) project with a Maven project. My ultimate goal was to setup a Jenkins Continuous Integration Server, that monitored a Maven-based project on GitHub, and develop the code within Eclipse and utilizing a Dynamic Web Project facet. Historically, my projects were managed by Hudson using Free-style jobs; they were always Ant-based and extracted from a Subversion repository. I had worked on quite a few web applications using this pattern, so it seemed like a pretty good starting point! I had started a toy project to manage encrypted data a couple of years ago and never put it under version control, it was a perfect candidate for this experiment.</td>
</tr>
</tbody>
</table>
<p>Changing a project&#8217;s build tool has a rather large impact and needs be considered from multiple perspectives. I have approached the problem by breaking it down into five (5) different spaces. This might not be the optimal or preferred approach, but does show the high-level differences and addresses the major build challenges. Surely, my next project will be done completely differently, but you have to start learning somewhere!</p>
<table style="border-collapse: collapse;" border="1" width="90%" align="center">
<tbody>
<tr bgcolor="lightgrey">
<td><strong>Perspective</strong></td>
<td><strong>Changes</strong></td>
</tr>
<tr>
<td valign="top">Dependencies</td>
<td>To end up with an application that compiles in Eclipse, this change and the next have to be done in parallel. The easiest approach is to create a POM and focus on the dependencies section. If you are already using Ivy to manage your dependencies, this will not be that big of a change. Using a public Maven repository like <a href="http://mvnrepository.com/" target="_blank">MVN Repository</a> to locate dependencies is very simple and saves a ton of time. The easiest way to create a POM is to let Eclipse make it for you; you will need to install the <a href="http://maven.apache.org/eclipse-plugin.html" target="_blank">Maven plug-in</a> first.  Once you have your project loaded into Eclipse, simply &#8220;Enable Dependency Management&#8221; in your project&#8217;s properties. You can also add dependencies directly from the  plug-in; I&#8217;m a little old school and prefer to edit the POM manually, but either approach works fine.</td>
</tr>
<tr>
<td valign="top">Local Development</td>
<td><img style="float: right; margin-top: 10px; margin-bottom: 10px; margin-left: 10px;" src="http://www.beilers.com/wp-content/uploads/2011/02/moz-screenshot-10.png" alt="" />I never liked the required Maven directory structure; I must have subconsciously adopted the <em>Eclipse</em> project structure as my personal standard. Converting the project&#8217;s directory structure was trivial and soon realized it was not that big deal after all; I aways separate my source and test files anyway. The main difference is everything lives under the source root, including the WebContent directory. I&#8217;m not sure what the &#8220;preferred&#8221; process is for loading a Maven project into Eclipse, probably using the Maven <a href="http://maven.apache.org/plugins/maven-eclipse-plugin/" target="_blank">Eclipse Plug-in</a>, which will create the appropriate Eclipse property files. Since I was doing a conversion, I don&#8217;t think this plug-in would be too helpful. Because I&#8217;m fairly Eclipse savvy, I simply wired everything up myself. Having the Eclipse <a href="http://maven.apache.org/eclipse-plugin.html" target="_blank">Maven Plug-in</a> will enable your dependencies  to be automatically added to the build path. <img style="float: left; margin-top: 10px; margin-bottom: 10px; margin-right: 10px;" src="http://www.beilers.com/wp-content/uploads/2011/02/moz-screenshot-14.png" alt="" width="558" height="186" />With the addition of the Eclipse &#8220;Deployment Assembly&#8221; options dialog, it is extremely easy manually configure your project. You need to have a Faceted Dynamic Web Module for the &#8220;Deployment Assembly&#8221; option to be visible, but that should be a fairly simple property change as well. At this point, you should have a fully functional, locally deployable web application.</td>
</tr>
<tr>
<td valign="top">The Build</td>
<td><img style="float: left; margin-top: 10px; margin-bottom: 10px; margin-right: 10px;" src="http://www.beilers.com/wp-content/uploads/2011/02/moz-screenshot-16.png" alt="" />Now we can ignore Eclipse, and focus on building our WAR file using Maven. Even with the minimalist POM shown to the left (plus your dependencies section), it is possible to compile the code and create a basic WAR file. Use <em>mvn compile</em> to ensure that your code compiles. Using the Maven<em> package</em> goal, the source code is compiled, the unit tests are compiled and executed, and the WAR file is built. All of this functionality, without writing one line of XML! <img style="float: right; margin-top: 10px; margin-bottom: 10px; margin-left: 10px;" src="http://www.beilers.com/wp-content/uploads/2011/02/moz-screenshot-18.png" alt="" /> One of the more time consuming parts of an Ant-based build is integrating all of the &#8220;extras&#8221; typically associated with a project, making them available to the continuous integration server. The extras include: unit test execution, code coverage metrics, and quality verification tools such as Checkstyle, PMD, and FindBugs. This tools are all typically easy to setup, but every project implements them slightly different and never put the results into a standard place! The general process for adding new behavior (tools) to a build appears to be the same for most tools. You simply add the plug-in to the POM and configure it to fire the appropriate goals at the appropriate time in the Maven lifecycle. Ant does not have this lifecycle concept, but it seems like a very elegant way to add behavior into the build. From the following example, I added the Checkstyle tool to the POM. The &lt;executions&gt; section controls what and when the plug-in will be executed. In this example, the <em>check</em> goal will be executed during the <em>compile</em> phase of the build process. Simply executing the <em>compile</em> goal, will cause Checkstyle to be invoked as well. This seems like a very clean integration technique, one that does not cause refactoring ripples.</p>
<p>The Cobertura integration is another very good example. I have been a fan of the Clover code coverage for many years. Since losing access to Clover, I needed to look for an open-source alternative,  and had never tried EMMA or Cobertura. They both seemed like capable tools, but I had more success integrating Cobertura with Jenkins. I&#8217;m highlighting this point, as doing code coverage with Ant and Clover can sometimes be a little tricky and usually messy. The Cobertura plug-in takes compete responsibility for instrumenting the code, executing the unit test, and generating the report; completely non-intrusive.</td>
</tr>
<tr>
<td valign="top">Continuous Integration</td>
<td><img class="alignleft" style="margin-top: 10px; margin-bottom: 10px; margin-right: 10px;" src="http://www.beilers.com/wp-content/uploads/2011/02/moz-screenshot-20.png" alt="" width="552" height="111" />Most development teams also want their project monitored by a Continuous Integration (CI) process. Modern CI tools such as Hudson/Jenkins provide excellent dashboards for reporting a variety of quality metrics. As I previously stated, it is rather time consuming to develop and test the Ant XML required to generate and publish these metrics; combine that with configuring each CI server job to capture these metrics and you have added a fair amount of overhead. <img class="alignright" style="margin-top: 10px; margin-bottom: 10px; margin-left: 10px;" src="http://www.beilers.com/wp-content/uploads/2011/02/moz-screenshot-19.png" alt="" width="492" height="218" />I knew there was support for Maven-based projects within Hudson/Jenkins, but never took the time to understand why it would be beneficial. The main benefit is right there in the description, had I bothered to read it! Configuring a Maven-based job is little more than clicking a few check boxes. No need configure them in Jenkins, using the information provided by Maven, it is basically automatic. This is one interesting aspect of the Hudson-Jenkins fork. Sonatype, the creator of the Nexus Maven Repository manager and the Eclipse Maven plug-in, have chosen the Hudson side of the battle. I wonder what this means for Maven support on the Jenkins side. Obviously, it will not go away, but that might end up being a Hudson advantage in the long run. I still believe that the Jenkins community will quickly out pace the Hudson community.</td>
</tr>
<tr>
<td valign="top">Deployment</td>
<td>I&#8217;m not going into much detail on this point, other than to say that I would like to see the deployment process completely separated from the build process, maybe even done by two different people or organizations. I have seen too many projects combine building and deploying into one system, creating artificial dependencies, time consuming, unreliable, and unmaintainable deployment processes. I have also experienced complete deployment overkill, causing simple deployments to take over thirty (30) minutes, with no real guarantee that it would be successful. Hopefully teams (developer and operations) will strive for a minimal deployment overhead/process, one that provides just enough security and control to enable continuous, rapid deployments.</td>
</tr>
</tbody>
</table>
<p>I have barely touched upon the real power of Maven and know that some people are going to say my requirements are too simple to be valid. I&#8217;m sure there are projects far more complicated than mine, but I do feel that this project is highly representative of the 80-20 rule. If developer&#8217;s can have a little self control, conform, and do what is required verses what would be really cool, simple Maven POMs should satisfy a large number of corporate projects <em>with very little overhead</em>. That is the goal, correct?  I can even see using Maven for my toy projects; why do I want to waste time writing and maintaining a bunch of useless build scripts? I never realized that you could <em>ease</em> into Maven; I think that is the real point of the post! And, it is not actually a huge investment.</p>
<p>When I was Googling for this topic, I found many interesting articles. I truly believe the biggest reason preventing teams from evolving and adopting new approaches is simply fear, fear of change and the unknown. I still think Maven is a rather large &#8220;pill to swallow&#8221;, but have now experienced enough value to continue investing time into this technology. I took the <em>typical developer </em>approach and dove into Maven with little preparation or understanding&#8230; I would not suggest this approach, unless you to have lots of time to waste! If you are unfamiliar with Maven, I hope the following collection of articles will provide a quick overview of the basic concepts. I realize that some of them are a little old, but you should start with the Maven basics, and those really have not changed.</p>
<p><a href="http://www.javaworld.com/javaworld/jw-12-2005/jw-1205-maven.html" target="_blank">An Introduction to Maven2</a><br />
<a href="http://www.build-doctor.com/2010/06/22/when-to-use-maven/" target="_blank">Should you move to Maven2</a><br />
<a href="http://javamoods.blogspot.com/2010/02/maven-vs-ant-stop-battle.html" target="_blank">Maven vs Ant: Stop the Battle</a><br />
<a href="http://www.sonatype.com/people/2010/08/how-to-migrate-from-ant-to-maven-project-structure/" target="_blank">How to Migrate from Ant to Maven: Project Structure</a><br />
<a href="http://www.sonatype.com/people/2011/02/top-ten-reasons-to-move-to-maven-3/" target="_blank">Top Ten Reasons to Move to Maven 3</a><br />
<a href="http://www.sonatype.com/people/2010/01/maven-over-ant-ivy-a-team-perspective-by-les-hazlewood/" target="_blank">Maven over Ant + Ivy</a><br />
<a href="http://www.slideshare.net/wakaleo/automated-deployment-with-maven-going-the-whole-nine-yards" target="_blank">Automated Deployment with Maven &#8211; Going the whole nine yards</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.beilers.com/2011/03/build-evolution-ant-to-maven-a-simple-exercise/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Interview Question &#8211; Name Five reasons Java is not Object Oriented?</title>
		<link>http://www.beilers.com/2011/02/interview-question-name-five-reasons-java-is-not-object-oriented/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=interview-question-name-five-reasons-java-is-not-object-oriented</link>
		<comments>http://www.beilers.com/2011/02/interview-question-name-five-reasons-java-is-not-object-oriented/#comments</comments>
		<pubDate>Fri, 04 Feb 2011 17:53:53 +0000</pubDate>
		<dc:creator>Phil</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.beilers.com/2011/02/interview-question-name-five-reasons-java-is-not-object-oriented/</guid>
		<description><![CDATA[I thought it would be a really good idea to share interesting interview questions, especially the ones that caught me off guard! I found this title to be a very interesting question&#8230; I&#8217;m not sure it was intended as an open-ended question, as I don&#8217;t think there is a right or wrong answer. It really [...]]]></description>
			<content:encoded><![CDATA[<p><img style="max-width: 800px; float: left; margin-top: 10px; margin-bottom: 10px; margin-right: 10px;" src="http://www.beilers.com/wp-content/uploads/2011/02/interview.png" />I thought it would be a really good idea to share interesting interview questions, especially the ones that caught me off guard!</p>
<p>I found this title to be a very interesting question&#8230; I&#8217;m not sure it was intended as an open-ended question, as I don&#8217;t think there is a right or wrong answer. It really depends on your perspective. Are you looking at it from a purely <i>technical</i> or <i>logical</i> (modeling/solution) perspective?&nbsp;&nbsp; Even though I might be considered very technical, I prefer to stay out of the really low level stuff. Sure it is fun, to get down to the bare metal once in a while, but I get more enjoyment out of the thought process. Claiming to be a very Object Oriented person and stumbling on this question really bothered me&#8230; I came home and did some Googling, but really never found the answers that seemed to live up my expectations. Next, I sent an mail to one of my <a target="_blank" href="http://www.toms.net/">pals</a> who just loves the nuts and bolts&#8230; In his typically witty way, he rattled off: int, float, boolean, double, long, and char. A completely valid answer! He then have me six other bullets which I have merged into the table below and tried to expand upon.</p>
<table style="border-collapse: collapse;" width="90%" align="center" border="1">
<tbody>
<tr bgcolor="lightgrey">
<td><strong>Reason</strong></td>
<td><b>Explanation</b></td>
</tr>
<tr>
<td valign="top">Primitives</td>
<td>The interviewer lead me with this one, which it is actually pretty obvious when you think about it! This is really not disputable, primitives are not truly objects. I think for historical reasons, namely performance and ease of use, developers were pushed to primitives. With modern JVMs and <a target="_blank" href="http://download.oracle.com/javase/1.5.0/docs/guide/language/autoboxing.html">Java 1.5 autoboxing</a>, I feel like this flaw is slightly minimized. However, from a purest OO perspective this is a valid reason.</td>
</tr>
<tr>
<td valign="top">Constructors</td>
<td>The interviewer also talked about the limitation where constructors can only return an instance of itself, the specific class; which has lead to the creation of <a target="_blank" href="http://en.wikipedia.org/wiki/Factory_method_pattern">factory patterns</a> and <a target="_blank" href="http://en.wikipedia.org/wiki/Dependency_injection">DI frameworks</a>. Having been a <a target="_blank" href="http://www.springsource.org/">Spring Framework</a> fanatic for so many years, I have probably developed a different style of programming which as shielded me from this issue. With some of the more&nbsp; dynamic OO languages, you can apparently return a different type instance from the constructor. I need to study some more on this, but did find an interesting <a target="_blank" href="http://stackoverflow.com/questions/4888786/how-can-i-change-the-return-value-of-a-class-constructor-in-ruby">Ruby thread</a>.&nbsp; Ruby is definitely on my learning list, so I have to stop blogging! </td>
</tr>
<tr>
<td valign="top">First Class Objects</td>
<td>This reason takes us to pure object orientation. I&#8217;m going to gloss over this a little and let you read more on your own as I did today, try this <a target="_blank" href="http://en.wikipedia.org/wiki/Function_object">simple search</a>. One of the more obvious distinctions, would probably be the meta data / class model provided by Java.</td>
</tr>
<tr>
<td valign="top">Statics</td>
<td>This is actually one of my pet peeves. I am a no fan of static methods.&nbsp; For me it is simple, statics equal functions which equal non object oriented. I have always bought into the DI propaganda which states that static objects and methods are untestable, which I fundamentally agree with. However, I did recently discover there are are several mocking frameworks that can actually mock out static classes and methods. This is pretty cool, but unnecessary in my preferred design and implementation style.</td>
</tr>
<tr>
<td valign="top">No Multiple Inheritance</td>
<td>Coming from a C++ background, this was always a big discussion point. I generally did not recommend multiple inheritance, as it was tricky and usually implemented (and even modeled) inappropriately. I was much more interested in inheriting behavior rather than state. If I remember correctly, this is where it got interesting using C++.&nbsp; Java Interfaces do a little bit to address this issue, but there is typically no why to elegantly solve the problem without a little code duplication and/or helper classes.</td>
</tr>
<tr>
<td valign="top">Strings</td>
<td>My nuts and bolt friend gave me this one; not sure where he was going, but obviously the Java String class is its own unique creation. Personally, I was always bummed by the lack of a mutable String class. I might have prefer to see non-mutability implemented via subclasses, or something like the Collections.unmodifiableCollection() method. How about that, another static method reference! Maybe this would have been a little better, stringInstance.getImutable()!</td>
</tr>
<tr>
<td valign="top">Limited Operator Overloading</td>
<td>Having done a lot of C++ in my early programming career, I found elegance in operator overloading and saw it as a void in Java. But, I do have to agree with the reason it was left out of Java, &#8220;it was used incorrectly to many times in C++&#8221;. Unfortunately, you can use any tool incorrectly; it might have been nice to let us decide if and how to use some of these features, rather than eliminate them. I did find an interesting thread on <a target="_blank" href="http://stackoverflow.com/questions/77718/java-operator-overload">StackOverflow</a>, so I will keep my thoughts short!</td>
</tr>
<tr>
<td valign="top">JNI</td>
<td>This was another bullet from my nuts and bolt friend. In my opinion, <a target="_blank" href="http://en.wikipedia.org/wiki/Java_Native_Interface">JNI</a> was more of a Java after thought, &#8220;bolted-on&#8221; to simply to take advantage of existing solutions and provide some level of extensibility. I have not used JNI for many years, and all I can remember is procedural nature of our solution. I don&#8217;t remember details, other than it was ugly! You could also say that ugly is not object oriented!</td>
</tr>
<tr>
<td valign="top">Package Level Scope</td>
<td>Late breaking addition. I personally never liked the &#8220;package&#8221; level scoping provided by Java.&nbsp; How is this object oriented? You are basically breaking the class level encapsulation, allowing all classes in that package access&#8230; This always felt like a little implementation hack to me&#8230; not one of my favorites!</td>
</tr>
</tbody>
</table>
<p>My thoughts might not be completely baked, but I need to keep on moving; so please let me know if you think I missed the point! Generally speaking, I have been very happy with Java as a implementation language. All languages have their warts, and Java is no different. The vast number of tools and frameworks allow Java applications to be effectively developed, tested, and deployed.&nbsp; I also believe that Java is pretty forgiving, allowing developers of all levels to build solutions; from being barely object oriented to insanely obscure. Hopefully, we end up in the middle with simple elegance. I hope to have the opportunity to explore some of these Java flaws in a Ruby, so please check back and see what I have learned!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.beilers.com/2011/02/interview-question-name-five-reasons-java-is-not-object-oriented/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Eclipse Project Configurations &#8211;  Shared or Personal?</title>
		<link>http://www.beilers.com/2010/07/eclipse-project-configurations-shared-or-personal/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=eclipse-project-configurations-shared-or-personal</link>
		<comments>http://www.beilers.com/2010/07/eclipse-project-configurations-shared-or-personal/#comments</comments>
		<pubDate>Tue, 20 Jul 2010 04:01:07 +0000</pubDate>
		<dc:creator>Phil</dc:creator>
				<category><![CDATA[Continuous Integration]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.beilers.com/?p=755</guid>
		<description><![CDATA[To be honest, this was not a topic I was actually planning to write about. However, because I received a couple of interesting comments on a recent blog entry, Unfriendly Developer Practices, I thought I should clarify my position. Question of the Day Should your IDE (Eclipse) configuration files be checked in as part of [...]]]></description>
			<content:encoded><![CDATA[<p>To be honest, this was not a topic I was actually planning to write about. However, because I received a couple of interesting comments on a recent blog entry, <a href="http://www.beilers.com/2010/07/unfriendly-developer-pactices-adding-uncessary-environmental-complexities/" target="_blank">Unfriendly Developer Practices</a>, I thought I should clarify my position.</p>
<table style="border-collapse: collapse;" border="1" width="90%" align="center">
<tbody>
<tr align="center" bgcolor="lightgrey">
<td><strong>Question of the Day</strong></td>
</tr>
<tr align="center">
<td>Should your IDE (Eclipse) configuration files be checked in as part of your project?</td>
</tr>
</tbody>
</table>
<p>One of the comments suggested that there should be should be <strong>no</strong> dependency between the build system and the IDE. Another person suggested the disconnect between the IDE and the build system creates a convenient place for dependency inconsistencies to develop unchecked.</p>
<p>I completely agree with <em>both </em>of those statements and have seen <em>both </em>problems manifested several times. However, there are two simple tools can make this a non-issue: Continuous Integration and Dependency Management.</p>
<ul>
<li><a href="http://martinfowler.com/articles/continuousIntegration.html" target="_blank">Continuous Integration</a> is obvious; if that <em>lazy </em>developer forgets to check in a dependency or update the build scripts, the build fails. Not perfect, but the problem is immediately detected and the relevant people are notified of the situation. The problem can be resolved within minutes.</li>
<li>The <a href="http://en.wikipedia.org/wiki/Silver_bullet#Idiomatic_usage" target="_blank">Silver Bullet</a> for me, was the addition of the <a href="http://ant.apache.org/ivy/" target="_blank">Ivy Dependency Management</a> tool into our build process. Because the build system and IDE share the same dependency configuration, the project&#8217;s dependencies were now managed in single place. Using the <a href="http://ant.apache.org/ivy/ivyde/" target="_blank">IvyDE</a> plug-in, Eclipse simply worked, with no additional configuration. Using the externalized dependencies and basic Ant targets, the project could create a robust, change resilient build system. To achieve this level of robustness, I took advantage of the <a href="http://ant.apache.org/ivy/history/2.0.0/use/postresolvetask.html" target="_blank">Ivy post resolve tasks</a>. It was not until I discovered how easily they could isolate the build scripts from the actual dependencies, did it all come together. The real beauty of this approach is that no files (dependencies) are directly referenced. The post resolve tasks create variables which contain all of the <em>appropriate</em> files; the build script can then treat these variables generically, without concern. Nice and clean!</li>
</ul>
<p>It was an unstated, fundamental requirement to have no &#8220;direct&#8221; dependency on Eclipse; such that we could all revert back to the wonderful world of Emacs tomorrow, should the need arise. I don&#8217;t think <em>which </em>IDE a project chooses to use, is really that important. I am apparently an Eclipse snob; but all I <em>really </em>care about is having Emacs key-bindings! If a majority of the team works on the same platform, I do believe there is <strong>real value</strong> around this <strong>continuity</strong>; that just happens to be Eclipse for me!</p>
<p>I have several other reasons for checking in configuration files:</p>
<ul>
<li>It quickly highlights wrong doing! If a developer checks in something specific to their environment, they will break everyone on the team. My goal is for complete project neutrality: check out on any machine, in any directory, and the project is guaranteed to build and deploy.  Additionally, check the project out in Eclipse and it should build with no issues, within minutes.</li>
<li>Not all developer&#8217;s actually care about tools. Some developers simply want their environment setup for them. They have no desire to figure out how Eclipse formats code when you save a file or how to configure and run quality checks after each build; implementing business solutions is their primary concern.</li>
<li>Enhanced team productivity. If everyone&#8217;s world (environment) is the same, it is so much easier to spin up a new developer or help a teammate with a problem. Would you really want each developer to go through the discovery process of setting up the project? In the big picture, isn&#8217;t this really just wasted time?</li>
<li>Helping to ensuring quality coding practices and standards. We also check in the Checkstyle, PMD, and Findbugs configuration and rule sets. Taking advantage of the sharable configuration files, both the Eclipse plug-ins and Ant tasks work from the same rule sets, ensuring complete consistency across the team, no matter where the rules are executed.</li>
</ul>
<p>I appreciate all of the recent comments; thanks for taking the time to reply. They enable me think about and reconsider the decisions I have made, giving me yet another opportunity to learn from my mistakes!  As far as Eclipse configuration files are concerned, I strongly believe there is far <strong>more project value</strong> gained by including them, as compared to <em>requiring </em>each developer manage their own environment. One final note, I have no issue with developers <em>wanting </em>to manage their own world, more power to them!  I would hope that these efforts would be to make the overall, shared environment a little better; after all, everyone should be contributing to all aspects of the project! The real point is that everyone <em>should not be required</em> to configure a project, unless they really want or need to.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.beilers.com/2010/07/eclipse-project-configurations-shared-or-personal/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Self-destructive Tendencies and Root Cause Analysis</title>
		<link>http://www.beilers.com/2010/07/self-destructive-tendencies-and-root-cause-analysis/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=self-destructive-tendencies-and-root-cause-analysis</link>
		<comments>http://www.beilers.com/2010/07/self-destructive-tendencies-and-root-cause-analysis/#comments</comments>
		<pubDate>Mon, 19 Jul 2010 04:01:41 +0000</pubDate>
		<dc:creator>Phil</dc:creator>
				<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.beilers.com/?p=750</guid>
		<description><![CDATA[One of my favor blogs, 37Signals, had an interesting post. It quoted Ed Catmull, President of Pixar, on the topic of creative vision and leadership. The full interview can be read here; it is actually rather interesting. What caught my attention was the quote concerning self-destructive tendencies, &#8220;if everyone is trying to prevent error, it [...]]]></description>
			<content:encoded><![CDATA[<p>One of my favor blogs, <a href="http://37signals.com/svn" target="_blank">37Signals</a>, had an interesting post. It quoted <a href="http://37signals.com/svn/posts/2440-we-all-know-the-saying-its-better-to-ask-f" target="_blank">Ed Catmull, President of Pixar</a>, on the topic of creative vision and leadership. The full interview can be <a href="http://www.scottberkun.com/blog/2010/inside-pixars-leadership/" target="_blank">read here</a>; it is actually rather interesting. What caught my attention was the quote concerning self-destructive tendencies, &#8220;<em>if everyone is trying to prevent error, it screws things up. It’s better<br />
to fix problems than to prevent them</em>&#8220;.</p>
<p><img style="max-width: 800px; float: left; margin-top: 10px; margin-bottom: 10px; margin-right: 10px;" src="http://www.beilers.com/wp-content/uploads/2010/07/Why.png" alt="" width="152" height="147" />Unfortunately, it seems that in our current economic environment, it is more important to prevent mistakes rather than take action to address the underlying problems. This strategy can even be taken to the extreme, putting so many gates into the process, that it actually makes it impossible to move forward. It becomes difficult to fix existing issues and nearly impossible to development new functionality. The number of signatures and the amount of evidence required to prevent errors has become more of an accountability tool, rather than a quality tool.</p>
<p>Writing this post made me think of another technique that we always seem to overlook, the &#8220;<a href="http://www.google.com/search?q=5+whys&amp;ie=utf-8&amp;oe=utf-8&amp;aq=t&amp;rls=org.mozilla:en-US:official&amp;client=firefox-a" target="_blank">5 Whys</a>&#8220;. If you are like me and have not looked at this lately, it is perfect time for a refresher! Just click the link!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.beilers.com/2010/07/self-destructive-tendencies-and-root-cause-analysis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unfriendly Developer Pactices &#8211; Adding uncessary environmental complexities</title>
		<link>http://www.beilers.com/2010/07/unfriendly-developer-pactices-adding-uncessary-environmental-complexities/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=unfriendly-developer-pactices-adding-uncessary-environmental-complexities</link>
		<comments>http://www.beilers.com/2010/07/unfriendly-developer-pactices-adding-uncessary-environmental-complexities/#comments</comments>
		<pubDate>Sun, 11 Jul 2010 19:10:51 +0000</pubDate>
		<dc:creator>Phil</dc:creator>
				<category><![CDATA[Continuous Integration]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Testing]]></category>

		<guid isPermaLink="false">http://www.beilers.com/?p=744</guid>
		<description><![CDATA[A couple of years ago, I began focusing on construction and deployment complexities. I had just joined a new team and began looking for the commonalities between their architectures and environments. Needless to say, they were all different. The most disturbing issue was the amount of effort required for a new developer to start working [...]]]></description>
			<content:encoded><![CDATA[<p>A couple of years ago, I began focusing on construction and deployment complexities. I had just joined a new team and began looking for the commonalities between their architectures and environments. Needless to say, they were all different. The most disturbing issue was the amount of effort required for a new developer to start working with an application. If there was any project documentation, it was probably out of date; resulting in hours or even days of trial and error to actually build and deploy the system. In this post, I&#8217;m talking about is building and deploying J2EE applications.  The following list represents the top developer <i>unfriendly</i> practices I have observed.</p>
<table style="border-collapse: collapse;" align="center" border="1" width="90%">
<tbody>
<tr align="center" bgcolor="lightgrey">
<td><b>Developer Unfriendly Practices</b></td>
</tr>
<tr>
<td>
<ol>
<li><img style="max-width: 800px; float: right; margin-top: 10px; margin-bottom: 10px; margin-left: 10px;" src="http://www.beilers.com/wp-content/uploads/2010/07/black-box.png" />Without first running a <i>setup </i>task in <a target="_blank" href="http://ant.apache.org/">Ant</a>, the project does not build in <a target="_blank" href="http://www.eclipse.org/">Eclipse</a>.</li>
<li>The Eclipse .project and .classpath files are not checked into version control system with the source.</li>
<li>The project&#8217;s Ant scripts are generic and non-deterministic; they have to be edited for your individual environment before building the project. </li>
<li>The project requires specific libraries or packages to be installed on your machine before it can be built.</li>
<li>Eclipse project not configured as an <a target="_blank" href="http://www.eclipse.org/webtools/">WTP</a> project.</li>
<li>Minimal <a target="_blank" href="http://www.junit.org/">jUnits</a> and no <a target="_blank" href="http://martinfowler.com/articles/continuousIntegration.html">continuous integration</a>.</li>
<li><a target="_blank" href="http://docs.sun.com/source/819-0215/containers.html">J2EE container</a> dependencies built into the project.</li>
</ol>
</td>
</tr>
</tbody>
</table>
<p>After experiencing these challenges, I began a quest of environmental simplification. I understand there are numerous reasons why projects end up with these unfriendly  characteristics,&nbsp; but leaving them unaddressed was just not in my character! I made it my personal mission to ensure that each project that I worked on, I would try to leave it in a <i>little </i>better shape than when I arrived. This is a never ending activity; I hope that those that come after me will have a similar philosophy and continue my quest. It is amazing how easy and fast an application can atrophy, eliminating all of the positive changes that had been previously applied. To keep things simple, I came up with following three project requirements. I try to weave some aspect of them into the development process and architecture of each project that I work on.</p>
<table style="border-collapse: collapse;" align="center" border="1" width="60%">
<tbody>
<tr align="center" bgcolor="lightgrey">
<td><b>Project Principles</b></td>
</tr>
<tr>
<td><img style="max-width: 800px; float: right; margin-top: 10px; margin-bottom: 10px; margin-left: 10px;" src="http://www.beilers.com/wp-content/uploads/2010/07/ruler.png" />
<ol>
<li>Self-Containment, No External Configuration.</li>
<li>Environmental Awareness</li>
<li>Change Resilient</li>
</ol>
</td>
</tr>
</tbody>
</table>
<p>I hope that most of these principles seem like common sense and are nothing new. Much like many of the <a target="_blank" href="http://martinfowler.com/bliki/PrinciplesOfXP.html">XP principals</a>, they are <i>not </i>new or revolutionary, just good reminders of often overlooked practices. I will try to elaborate on each principal in a future post, hopefully, in the near future!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.beilers.com/2010/07/unfriendly-developer-pactices-adding-uncessary-environmental-complexities/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Ant 1.8, Reusable XML Scriptlets, and Ivy for Self-Containment</title>
		<link>http://www.beilers.com/2010/07/ant-1-8-and-reusable-xml-scriptlets-and-self-containment/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=ant-1-8-and-reusable-xml-scriptlets-and-self-containment</link>
		<comments>http://www.beilers.com/2010/07/ant-1-8-and-reusable-xml-scriptlets-and-self-containment/#comments</comments>
		<pubDate>Mon, 05 Jul 2010 13:33:54 +0000</pubDate>
		<dc:creator>Phil</dc:creator>
				<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.beilers.com/?p=729</guid>
		<description><![CDATA[I started reading about EasyAnt sometime ago on the Ivy developer forums. It was a very interesting concept, storing reusable Ant targets in your Ivy Repository and pulling them into projects at build time. Ivy works great for jar files, so why not Ant build scripts?  I have a set of Ant scripts in my [...]]]></description>
			<content:encoded><![CDATA[<p><img style="max-width: 800px; float: left; margin-top: 10px; margin-bottom: 10px; margin-right: 10px;" src="http://www.beilers.com/wp-content/uploads/2010/07/toolbox.png" alt="" />I started reading about <a href="http://www.easyant.org/" target="_blank">EasyAnt</a> sometime ago on the Ivy developer forums. It was a very interesting concept, storing reusable Ant targets in your Ivy Repository and pulling them into projects at build time. Ivy works great for jar files, so why not Ant build scripts?  I have a set of Ant scripts in my toolbox that seem to get copied from project to project; it bothers me every time I copy them! We gave EasyAnt a quick look, but it had one show stopper; it required every developer and builder to have EasyAnt installed (rather than just Ant). This is a little thing, but when you are working with dozens of projects and hundreds of developers, it seemed like too much of a hurdle.  I wanted Ant to be the only installation requirement and be &#8220;self contained&#8221;. Just type &#8220;ant&#8230;&#8221; Nice and simple.</p>
<p>I started addressing the problem my making templates out of my scripts and placing them into a Subversion repository. They could easily be included into a project using the Ant &lt;get&gt; task. A little ugly, but it worked well enough. It did required us to land the XML files in the project directory, such that they could be &#8220;imported&#8221; into the running build.  Once again, not a problem if you remember to use SVN ignore on the .ant directory; we might have been able to put them in /tmp, but never tried it.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;property name=&quot;ant.xml.location&quot; value=&quot;http://svn:1234/Ivy/Ant/Common/trunk/main/1.0/xml&quot; /&gt;
&lt;mkdir dir=&quot;.ant&quot; /&gt;
&lt;get src=&quot;${ant.xml.location}/ant.ivy.xml&quot; dest=&quot;${basedir}/.ant/ant.ivy.xml&quot; usetimestamp=&quot;true&quot; /&gt;
&lt;get src=&quot;${ant.xml.location}/ant.checkstyle.xml&quot; dest=&quot;${basedir}/.ant/ant.checkstyle.xml&quot; usetimestamp=&quot;true&quot; /&gt;

&lt;import file=&quot;.ant/ant.ivy.xml&quot; /&gt;
&lt;import file=&quot;.ant/ant.checkstyle.xml&quot; /&gt;
</pre>
<p>With Ant 1.8, you can actually accomplish this in a much cleaner method. Look at the <a href="http://ant.apache.org/manual/Tasks/import.html" target="_blank">import task</a> for some quick examples. Our first test was a very simple implementation, but worked like a champ.</p>
<p>I personally like to break my Ant scripts into multiple files, each with it own purpose. Some of my coworkers hate this approach and would prefer a single XML file. In the long run, the multi-file approach seems easier to support, especially when you factor in multiple maintainers. You would never put all of your Java code in a single class, why would you put all of your XML in a single file?  I will ultimately create a single file to import; it will import all of the individual XML files. This should make the consumers of the templates a little happier!</p>
<pre class="brush: xml; title: ; notranslate">
&lt;property name=&quot;ant.xml.location&quot; value=&quot;http://svn:1234/Ivy/Ant/Common/trunk/main/1.0/xml&quot; /&gt;
&lt;import&gt;
       &lt;url url=&quot;${ant.xml.location}/ant.ivy.xml&quot; /&gt;
       &lt;url url=&quot;${ant.xml.location}/ant.checkstyle.xml&quot; /&gt;
       &lt;url url=&quot;${ant.xml.location}/ant.pmd.xml&quot; /&gt;
       &lt;url url=&quot;${ant.xml.location}/ant.clover.xml&quot; /&gt;
       &lt;url url=&quot;${ant.xml.location}/ant.findbugs.xml&quot; /&gt;
       &lt;url url=&quot;${ant.xml.location}/ant.testability.xml&quot; /&gt;
&lt;/import&gt;
</pre>
<p>I think the <a href="http://ant.apache.org/manual/Types/resources.html#javaresource" target="_blank">javaresource</a> approach would be the perfect way to solve my problem. Unfortunately, I could not find any way to combine a remote URL with a classpath attribute. It is a neat little trick to remember, maybe this feature could be added to the next version of Ant.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;import&gt;
    &lt;javaresource name=&quot;common/targets.xml&quot;&gt;
      &lt;classpath location=&quot;common.jar&quot;&gt;
&lt;!--  &lt;url url=&quot;http://somewhere/common.jar/&gt; --&gt;
    &lt;/classpath&gt;
  &lt;/javaresource&gt;
&lt;/import&gt;
</pre>
<p>One final word about completeness. My personal goal is to make the build system completely self-contained, meaning no external dependencies (outside of Ivy), no custom Ant installations, no Ant-lib requirements, or any manual configuration. Ideally, a developer should be able to check out the project from the version control system and get to work. It should automatically build and execute from Eclipse, and as long as Ant is installed, the developer should just be able to type Ant &lt;target&gt; to accomplish where ever is required.</p>
<p>I have been changing all of my templates to make use of the ivy:cachepath and ivy:cachefileset tasks. In prior Ant implementations, I used Ivy <em>retrieve</em> to access all of the dependencies; my new goal is to only use files from the Ivy cache. Additionally, I think the Ant templates should do their own Ivy dependency management. Now applications teams only need to worry about their own dependencies, not what is required by the environment or build system. The follow example demonstrates how to add Clover to the build process, and ensure that the Clover license is added to your class path, all without really knowing where the files are&#8230; Pretty cool!</p>
<pre class="brush: xml; title: ; notranslate">
&lt;ivy:cachepath pathid=&quot;classpath.CLOVER&quot; conf=&quot;runtime&quot; organisation=&quot;atlassian&quot; module=&quot;clover&quot; revision=&quot;3.0.2&quot; inline=&quot;true&quot; /&gt;
&lt;ivy:cachefileset setid=&quot;fileset.CLOVER&quot; conf=&quot;license&quot; organisation=&quot;atlassian&quot; module=&quot;clover&quot; revision=&quot;3.0.2&quot; inline=&quot;true&quot; /&gt;
&lt;pathconvert pathsep=&quot;${line.separator}-&gt; &quot; property=&quot;clover.license.path&quot; refid=&quot;fileset.CLOVER&quot; setonempty=&quot;&quot; /&gt;
&lt;dirname file=&quot;${clover.license.path}&quot; property=&quot;clover.license.dir&quot; /&gt;

&lt;taskdef resource=&quot;cloverlib.xml&quot;&gt;
     &lt;classpath&gt;
          &lt;path refid=&quot;classpath.CLOVER&quot; /&gt;
          &lt;path location=&quot;${clover.license.dir}&quot; /&gt;
      &lt;/classpath&gt;
&lt;/taskdef&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.beilers.com/2010/07/ant-1-8-and-reusable-xml-scriptlets-and-self-containment/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

