<?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>I Like Parentheses (so get used to 'em) &#187; work</title>
	<atom:link href="http://blog.josh-peters.name/category/work/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.josh-peters.name</link>
	<description>“People who like this sort of thing will find it just the sort of thing they like.”—Abraham Lincoln</description>
	<lastBuildDate>Sat, 31 Jul 2010 05:04:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Java 5 Enums Are Cool!</title>
		<link>http://blog.josh-peters.name/2010/05/19-java-5-enums-are-cool/</link>
		<comments>http://blog.josh-peters.name/2010/05/19-java-5-enums-are-cool/#comments</comments>
		<pubDate>Thu, 20 May 2010 02:19:51 +0000</pubDate>
		<dc:creator>Josh Peters</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://blog.josh-peters.name/?p=718</guid>
		<description><![CDATA[Java 5 enums are powerful things. Anytime you need a limited list of values, you should consider an enum class (versus a String or int). Java 5 enums can have methods as well, which leads to some powerful combinations. As &#8230; <a href="http://blog.josh-peters.name/2010/05/19-java-5-enums-are-cool/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Java 5 enums are powerful things. Anytime you need a limited list of values, you should consider an enum class (versus a String or int). Java 5 enums can have methods as well, which leads to some powerful combinations.</p>
<p><span id="more-718"></span>
<p>As an example consider the following code:</p>
<div>
<pre><code>private static final int SPECIAL_CASE_1 = 1;
private static final int SPECIAL_CASE_2 = 2;
&#8230;
int someThing;
String param1;
String param2;
&#8230;
switch( someThing ) {
  case SPECIAL_CASE_1: {
    doSpecialCase1( param1 );
    break;
  }
  case SPECIAL_CASE_2: {
    doSpecialCase2( param2 );
  }
  default: doSomethingElse();
}</code></pre>
</div>
<p>There are some issues with the above code. <tt>case</tt> statements are easily screwed up (is <tt>SPECIAL_CASE_2</tt> <em>supposed</em> to also call <tt>doSomethingElse()</tt> or is that a bug? Also, adding new cases can lead to quite a lot of classes to update. For the times where a full-blown class hierarchy is overkill, an enum makes quite a lot of sense. Often, the methods <tt>doSpecialCase1</tt>, <tt>doSpecialCase2</tt>, <tt>doSomethingElse</tt> can be refactored into methods of the enumeration.</p>
<p>Here&#8217;s how we can accomplish this.</p>
<div>
<pre><code>public enum SpecialCaseHandler {
  SPECIAL_CASE_1,
  SPECIAL_CASE_2,
  DEFAULT_CASE
}</code></pre>
</div>
<p>This simple enum can be used to replace the type of the control variable <tt>someThing</tt>. Now the switch statement looks like this:</p>
<div>
<pre><code>SpecialCaseHandler someThing;
String param1;
String param2;
&#8230;
switch( someThing ) {
  case SPECIAL_CASE_1: {
    doSpecialCase1( param1 );
    break;
  }
  case SPECIAL_CASE_2: {
    doSpecialCase2( param2 );
  }
  default: doSomethingElse();
}</code></pre>
</div>
<p>On the surface, this doesn&#8217;t get us a whole lot. What would really be nice is if we could remove the <tt>switch</tt> statement altogether. To accomplish this will take a bit more magic.</p>
<p>We&#8217;ll begin our magic by defining an inner interface inside the <tt>enum</tt> itself. Since the above <tt>switch</tt> statement uses two separate String parameters, the interface will have to account for both parameters. In addition, our enum will need a field declared of that particular interface. It looks like this:</p>
<div>
<pre><code>public enum SpecialCaseHandler {
  &#8230;
  private MyRunnable myRunnable;
  &#8230;
  private interface MyRunnable {
    public void execute( String param1, String param2 );
  }
}</code></pre>
</div>
<p>Next, we&#8217;ll rework the enum members to use a non-default constructor that takes an instance of <tt>MyRunnable</tt>.</p>
<div>
<pre><code>public enum SpecialCaseHandler {
  SPECIAL_CASE_1( new MyRunnable() {
    public void execute( String param1, String param2 ) {
      // body of doSpecialCase1() goes here.
    }
  } ),
  SPECIAL_CASE_2( new MyRunnable() {
    public void execute( String param1, String param2 ) {
      // body of doSpecialCase2() goes here.
    }
  } ),
  DEFAULT_CASE( new MyRunnable() {
    public void execute( String param1, String param2 ) {
      // body of doSomethingElse() goes here.
    }
  } );
  &#8230;
}</code></pre>
</div>
<p>Now the original switch statement can be remove altogether, leaving this beautiful little call:</p>
<div>
<pre><code>someThing.execute( param1, param2 );</code></pre>
</div>
<p>But wait, you say, what if my caller class has some dependencies that prevent the methods <tt>doSpecialCase1</tt>, <tt>doSpecialCase2</tt>, and <tt> doSomethingElse</tt> from being refactored out of the caller class? The answer is simple, add additional input parameters to the <tt>MyRunnable</tt> <tt>execute</tt> method to take the dependencies as input.</p>
<p>That is, if <tt>doSomethingElse</tt> happens to use a database connection whereas <tt>doSpecialCase1</tt> uses a file handle, you&#8217;ll have to come up with some way to pass that off to the method call. I&#8217;ll leave that as an exercise to the reader.</p>
<p>I&#8217;m pretty pleased with the result: I&#8217;ve removed the <tt>switch</tt> block from my code and can pretty easily add in new cases to the enum. I think using enums really is a nice alternative to more rigorous inheritance in a lot of cases. Anytime a specific identifier is called for but not necessarily a super-reusable class, consider using an enum instead.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.josh-peters.name/2010/05/19-java-5-enums-are-cool/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Working with JAR files in Maven</title>
		<link>http://blog.josh-peters.name/2009/07/13-working-with-jar-files-in-maven/</link>
		<comments>http://blog.josh-peters.name/2009/07/13-working-with-jar-files-in-maven/#comments</comments>
		<pubDate>Mon, 13 Jul 2009 18:29:16 +0000</pubDate>
		<dc:creator>Josh Peters</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://blog.josh-peters.name/2009/07/13-working-with-jar-files-in-maven/</guid>
		<description><![CDATA[Apache Maven has become my build tool of choice at work. It seems that nearly every week I learn how to do something new with Maven (part of this is my inexperience, part is the plethora of awesome plug-ins). I&#8217;ve &#8230; <a href="http://blog.josh-peters.name/2009/07/13-working-with-jar-files-in-maven/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://maven.apache.org/">Apache Maven</a> has become my build tool of choice at work. It seems that nearly every week I learn how to do something new with Maven (part of this is my inexperience, part is the plethora of awesome plug-ins).</p>
<p>I&#8217;ve been working on a project lately that is a pretty simple management application that uses JPA in the data layer. One of the goals of this project is to provide a nightly process for parsing input files. I could have tackled this in a variety of ways. My first hope was to create an executable JAR file, but I quickly found that I couldn&#8217;t get very far due to a limitation/feature of JARs: one cannot modify the classpath via the command line interface. My project uses some platform-specific files, so I could not easily include them in the final package. My second attempt ended up working well: create a JAR file within my WAR and execute a class inside that particular JAR.</p>
<p>This project has quite a lot of dependencies: Spring MVC, Hibernate, JPA, Javamail, SQL Server, etc. If I were to create a command-line call to the java executable it would quickly fill up many, many lines in an editor. Fortunately, it&#8217;s easy to include the classpath inside the JAR manifest during the Maven package:</p>
<div>
<pre><code>
&lt;plugin&gt;
  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
  &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
  &lt;configuration&gt;
    &lt;archiveClasses&gt;true&lt;/archiveClasses&gt;
    &lt;archive&gt;
      &lt;manifest&gt;
        &lt;addClasspath&gt;true&lt;/addClasspath&gt;
        &lt;mainClass&gt;…&lt;/mainClass&gt;
      &lt;/manifest&gt;
    &lt;/archive&gt;
  &lt;/configuration&gt;
&lt;/plugin&gt;
</code></pre>
</div>
<p>The <code>&lt;addClassPath&gt;</code> bit tells Maven to include all of the other dependencies in the manifest file. This is a big deal, as it accomplishes two things: it takes care of me having to write a script to generate the classpath dynamically and it allows me to have a very reasonable length command line statement.</p>
<p>Thanks to letting Maven create a JAR file with its manifest managing the classpath, my resulting java command looks like this: <code>java -cp MyProject.jar:… MyProjectRunner</code> (where MyProjectRunner is a class that I want to execute).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.josh-peters.name/2009/07/13-working-with-jar-files-in-maven/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The BBC knows how to make web sites!</title>
		<link>http://blog.josh-peters.name/2009/01/29-the-bbc-knows-how-to-make-web-sites/</link>
		<comments>http://blog.josh-peters.name/2009/01/29-the-bbc-knows-how-to-make-web-sites/#comments</comments>
		<pubDate>Thu, 29 Jan 2009 23:24:44 +0000</pubDate>
		<dc:creator>Josh Peters</dc:creator>
				<category><![CDATA[technology]]></category>
		<category><![CDATA[w3c]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[information architecture]]></category>
		<category><![CDATA[web design]]></category>

		<guid isPermaLink="false">http://blog.josh-peters.name/?p=680</guid>
		<description><![CDATA[How the BBC makes web sites. Dang, the BBC has put a good deal of thought into information design. This is a great read for anyone interested in information architecture.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.bbc.co.uk/blogs/radiolabs/2009/01/how_we_make_websites.shtml">How the BBC makes web sites</a>. Dang, the BBC has put a good deal of thought into information design. This is a great read for anyone interested in information architecture.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.josh-peters.name/2009/01/29-the-bbc-knows-how-to-make-web-sites/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SLF4J</title>
		<link>http://blog.josh-peters.name/2009/01/12-slf4j/</link>
		<comments>http://blog.josh-peters.name/2009/01/12-slf4j/#comments</comments>
		<pubDate>Mon, 12 Jan 2009 15:35:32 +0000</pubDate>
		<dc:creator>Josh Peters</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://blog.josh-peters.name/2009/01/12-slf4j/</guid>
		<description><![CDATA[One of the dependencies for dbUnit on it is SLF4J (a.k.a. the Simple Logging Facade for Java).&#160; SLF4J aims to be a wrapper replacement for Java Commons Logging similar to Log4j.&#160; The biggest bonus for using SLF4J is the fact &#8230; <a href="http://blog.josh-peters.name/2009/01/12-slf4j/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>One of the dependencies for dbUnit on it is SLF4J (a.k.a. the Simple Logging Facade for Java).&nbsp; SLF4J aims to be a wrapper replacement for Java Commons Logging similar to Log4j.&nbsp; The biggest bonus for using SLF4J is the fact that at runtime you may use whatever logging implementation you choose.&nbsp; In addition, there&#8217;s a trick that one can do in a Maven build that will force all JCL commands to use SLF4J, which means that JCL can then be logged over Log4J!</p>
<p>Here&#8217;s how to replace JCL with SLF4J:</p>
<pre><code>&lt;dependency&gt;
  &lt;groupId&gt;commons-logging&lt;/groupId&gt;
  &lt;artifactId&gt;commons-logging&lt;/artifactId&gt;
  &lt;version&gt;99.0-does-not-exist&lt;/version&gt;
&lt;/dependency&gt;
&lt;dependency&gt;
  &lt;artifactId&gt;jcl-over-slf4j&lt;/artifactId&gt;
  &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
  &lt;version&gt;1.5.6&lt;/version&gt;
&lt;/dependency&gt;
&lt;dependency&gt;
  &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
  &lt;artifactId&gt;slf4j-log4j12&lt;/artifactId&gt;
  &lt;version&gt;1.5.6&lt;/version&gt;
  &lt;scope&gt;runtime&lt;/scope&gt;
&lt;/dependency&gt;
&lt;dependency&gt;
  &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
  &lt;artifactId&gt;slf4j-api&lt;/artifactId&gt;
  &lt;version&gt;1.5.6&lt;/version&gt;
&lt;/dependency&gt;
</code></pre>
<p>Here&#8217;s an explanation of what&#8217;s going on:</p>
<ol>
<li>The first dependency tells Maven that commons logging will be using a non-existent version.&nbsp; You&#8217;ll need to use an empty JAR file or find a repository that will serve you such an empty JAR.&nbsp; The trick is that the version number is ridiculously high and trumps all other versions of JCL.
<li>The second dependency tells Maven to use SLF4J to provide the API for JCL.&nbsp; All Java commons logging calls will then use the SLF4J runtime implementation to provide logging.
<li>The third dependency is the runtime implementation of SLF4J over log4j. In essence, the only calls to log4j are made through SLF4J.
<li>Finally, we&#8217;ll bring in the SLF4J API so <em>our code</em> can use SLF4J instead of JCL or log4j.</li>
</ol>
<p>Here&#8217;s an example of replacing log4j with SLF4J:</p>
<p><strong>Old Version</strong></p>
<pre><code>private static final org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger( Taco.class );</code></pre>
<p><strong>New Version</strong></p>
<pre><code>private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger( Taco.class );</code></pre>
<p>This one line change allows you to change out your runtime logger at will <img src='http://blog.josh-peters.name/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.josh-peters.name/2009/01/12-slf4j/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Context-driven testing</title>
		<link>http://blog.josh-peters.name/2009/01/02-context-driven-testing/</link>
		<comments>http://blog.josh-peters.name/2009/01/02-context-driven-testing/#comments</comments>
		<pubDate>Fri, 02 Jan 2009 21:02:09 +0000</pubDate>
		<dc:creator>Josh Peters</dc:creator>
				<category><![CDATA[best-practices]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[software development]]></category>
		<category><![CDATA[unit testing]]></category>

		<guid isPermaLink="false">http://blog.josh-peters.name/?p=671</guid>
		<description><![CDATA[Google&#8217;s Testing Blog introduced me to a presentation on Context-Driven Test Automation by Pete Schnieder of F5 Networks. It&#8217;s a good presentation that discusses some of the different perspectives with regards to unit testing and how to best involve those &#8230; <a href="http://blog.josh-peters.name/2009/01/02-context-driven-testing/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://googletesting.blogspot.com/">Google&#8217;s Testing Blog</a> introduced me to a <a href="http://docs.google.com/Present?docid=dczwht9g_236ccxj32fd">presentation on Context-Driven Test Automation</a> by Pete Schnieder of <a href="http://f5.com/">F5 Networks</a>.  It&#8217;s a good presentation that discusses some of the different perspectives with regards to unit testing and how to best involve those disparate groups in the process.  Slide 8 is a great chart describing the &#8220;contexts&#8221; and responsibilities therein.  Good stuff.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.josh-peters.name/2009/01/02-context-driven-testing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Inkscape 0.46 Rocks</title>
		<link>http://blog.josh-peters.name/2008/04/10-inkscape-046-rocks/</link>
		<comments>http://blog.josh-peters.name/2008/04/10-inkscape-046-rocks/#comments</comments>
		<pubDate>Thu, 10 Apr 2008 18:18:02 +0000</pubDate>
		<dc:creator>Josh Peters</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[right-brain]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://blog.josh-peters.name/2008/04/10-inkscape-046-rocks/</guid>
		<description><![CDATA[For the past year I&#8217;ve been using the pretty good Inkscape 0.45 for any vector drawing I had to do at work.&#160; I use Inkscape for three purposes: playing, diagramming, and flow-charting. The day after my 29th birthday, Inkscape hit &#8230; <a href="http://blog.josh-peters.name/2008/04/10-inkscape-046-rocks/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>For the past year I&#8217;ve been using the pretty good <a href="http://www.inkscape.org/">Inkscape</a> 0.45 for any vector drawing I had to do at work.&nbsp; I use <a href="http://www.inkscape.org/">Inkscape</a> for three purposes: playing, diagramming, and flow-charting.</p>
<p>The day after my 29th birthday, <a href="http://www.inkscape.org/">Inkscape</a> hit 0.46 and brought with it a ton of new features.&nbsp; Most of these features I could care less about (though it is fun to use the sculpt tool) but there is something new that just totally rocks my world.</p>
<p>As I mentioned recently, <a href="http://blog.josh-peters.name/2008/04/09-dreaming-in-code-nice-read/"><em>I finished the book Dreaming in Code</em></a>.&nbsp; In that book there&#8217;s a bit where one of the original Macintosh developers discussed <em>taking out</em> a text-editing feature from MacPaint for fear of it being used to do word processing instead of drawing.</p>
<p>I can understand why that was important to a program like MacPaint, but I&#8217;m quite happy that Inkscape does differently.</p>
<p>Here&#8217;s what I love about the new version: you can edit a text object <em>inside</em> of its group.&nbsp; I&#8217;m pretty sure this is new.&nbsp; What this means for me is this: I can create a complicated object (say a UML diagram), group it, move it around, and then edit its text <em>without ungrouping it</em>.</p>
<p>For me, this totally justifies the cost of upgrading to Inkscape 0.46.</p>
<p>Oh wait, the program is free <img src='http://blog.josh-peters.name/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.josh-peters.name/2008/04/10-inkscape-046-rocks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Better Living Through URL Rewriting</title>
		<link>http://blog.josh-peters.name/2008/02/18-better-living-through-url-rewriting/</link>
		<comments>http://blog.josh-peters.name/2008/02/18-better-living-through-url-rewriting/#comments</comments>
		<pubDate>Mon, 18 Feb 2008 22:20:05 +0000</pubDate>
		<dc:creator>Josh Peters</dc:creator>
				<category><![CDATA[http]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://blog.josh-peters.name/2008/02/18-better-living-through-url-rewriting/</guid>
		<description><![CDATA[I&#8217;ve mentioned URL Rewriting twice before (here and here if you&#8217;re curious). URL Rewriting is a great technology that makes Cool URIs much easier to obtain and manage.&#160; Essentially you run a filter on your web server that listens to &#8230; <a href="http://blog.josh-peters.name/2008/02/18-better-living-through-url-rewriting/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve mentioned URL Rewriting twice before (<a href="http://blog.josh-peters.name/2006/10/20-writing-a-rest-webservice-part-2-rest-requirements/">here</a> and <a href="http://blog.josh-peters.name/2008/02/12-cross-site-request-forgery/">here</a> if you&#8217;re curious).</p>
<p>URL Rewriting is a great technology that makes <a href="http://blog.josh-peters.name/2007/02/22-hypertext-style-cool-uris-dont-change/">Cool URIs</a> much easier to obtain and manage.&nbsp; Essentially you run a filter on your web server that listens to everything and can interpret various expressions as different requests.&nbsp; That sounds pretty vague and complicated so here&#8217;s an example: <samp>RewriteRule /favicon.ico /images/favicon.ico [RP]</samp>. In this example, an incoming request for <samp>/favicon.ico</samp> will be redirected to <samp>/images/facicon.ico</samp>. This lets you keep a tidier filesystem without breaking links for people.</p>
<p>URL Rewriting does a lot more than mere redirects though.&nbsp; You can redesign paths to contain variables in them <samp>RewriteRule /images/(\w|\d+)/blank.png /spambot/identify.php?id=$1</samp> is a way to uniquely identify someone with an alphanumeric id via a HTML image link. <a href="http://blog.josh-peters.name/2008/02/12-cross-site-request-forgery/">Like I said earlier</a>, the example above can allow someone to be identified in an image linked in the body of an email.</p>
<p>Today I realized that I can use URL Rewriting to save me a lot of trouble switching between development and production environments.</p>
<p>In this case, we can match a <em>condition</em> of the request and see what server is referring the URL to my server.&nbsp; In other words, a link from <a href="http://josh-peters.name/">http://josh-peters.name/</a> can be handled differently than a link from <a href="http://blog.josh-peters.name/">http://blog.josh-peters.name/</a> even though they both link to the same address (in this case, say http://example.org/foo).</p>
<p>The benefit is huge!&nbsp; I can push out the same markup to a development server as I do a production server and then simply redirect the development resources as needed.&nbsp; Currently I&#8217;m involved in a project where someone else is serving the pages and I provide the styling rules and scripting.&nbsp; I&#8217;ve setup the rewrite rules such that when someone comes from http://dev.example.com/ they are treated differently than from http://www.example.com/.&nbsp; No forking of the markup is needed, which translates into one less problem area for rolling out changes <img src='http://blog.josh-peters.name/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I love it when a plan comes together!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.josh-peters.name/2008/02/18-better-living-through-url-rewriting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Symbolic Links in Subversion</title>
		<link>http://blog.josh-peters.name/2008/01/18-symbolic-links-in-subversion/</link>
		<comments>http://blog.josh-peters.name/2008/01/18-symbolic-links-in-subversion/#comments</comments>
		<pubDate>Fri, 18 Jan 2008 18:30:23 +0000</pubDate>
		<dc:creator>Josh Peters</dc:creator>
				<category><![CDATA[subversion]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://blog.josh-peters.name/2008/01/18-symbolic-links-in-subversion/</guid>
		<description><![CDATA[My work SVN repository is taking a while to update (see here for details).&#160; So I&#8217;ll just write a bit about the latest neat feature I&#8217;ve been benefiting from in Subversion: svn:externals. The idea is an old one: link to &#8230; <a href="http://blog.josh-peters.name/2008/01/18-symbolic-links-in-subversion/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>My work SVN repository is taking a while to update (<a href="http://blog.josh-peters.name/2008/01/18-mixing-case-sensitivity-sucks/">see here</a> for details).&nbsp; So I&#8217;ll just write a bit about the latest neat feature I&#8217;ve been benefiting from in Subversion: <em>svn:externals</em>.</p>
<p>The idea is an old one: link to another folder (or file) in a repository.&nbsp; The benefits of doing so are <strong>wonderful</strong>.</p>
<p>For each JSP project the following are commonplace:</p>
<ul>
<li>the tag library
<li>a folder for dependencies
<li>a folder for Java source</li>
</ul>
<p>Now, I&#8217;ve been storing each of these in different parts of the repository.&nbsp; Given a project A its Java source exists in /source/branches/<em>projectName</em>/src, its <em>compile-time</em> dependencies in /source/branches/<em>projectName</em>/deps, and its tag library has been a SVN copy of the RELEASE tag of our jsp tag library.</p>
<p>What a mess it was: building the source was in a separate part of the repository (which aided things like testing and continuous integration) and one had to manually update a project when the JSP tag library had a new release.&nbsp; We also had to use a wonky build script I wrote in Ant to pull the resultant JAR file from the repository into the web project—it was annoying I tells ya!</p>
<p>Creating a new project now is much, much easier in Subversion: I just copy a template project and update its <em>svn:externals</em> property to point to the appropriate branch of my source tree.&nbsp; An update will then update the externals alongside the rest of the project, so my JSP tag library is always up-to-date, and a modification to the Ant build file means that compiling the web project is one step again.&nbsp; The best part: everything that was broken up <em>remains</em> broken up, which aids in the management of those resources.&nbsp; The JSP tags are a perfect example of this: someone who knows what they&#8217;re doing can work on them and update the RELEASE tag when they&#8217;re done.&nbsp; When someone who depends on those tag libraries does their next update (which is pretty much once a day at least) they <em>automatically</em> receive those changes <em>without the JSP tag library person getting involved</em> or (worse yet) invading my project in SVN.</p>
<p>Finally, since externals allows you to point to any SVN repository, you can remix and combine repositories really nicely.&nbsp; For instance, you can run a repo for web projects that links to the repo for Java sources which in turn links to the Spring Framework&#8217;s latest and greatest release as a dependency.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.josh-peters.name/2008/01/18-symbolic-links-in-subversion/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Learning Kuali</title>
		<link>http://blog.josh-peters.name/2007/11/29-office-training/</link>
		<comments>http://blog.josh-peters.name/2007/11/29-office-training/#comments</comments>
		<pubDate>Thu, 29 Nov 2007 23:55:41 +0000</pubDate>
		<dc:creator>Josh Peters</dc:creator>
				<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://blog.josh-peters.name/2007/11/29-office-training/</guid>
		<description><![CDATA[This week I&#8217;ve been in class learning instead of at my desk working. We&#8217;re adopting a new system at work that is quite complicated and has many, many parts to it. Since discovering Spring I can say that I&#8217;m less &#8230; <a href="http://blog.josh-peters.name/2007/11/29-office-training/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This week I&#8217;ve been in class learning instead of at my desk working.</p>
<p>We&#8217;re adopting a new system at work that is quite complicated and has many, many parts to it.  Since discovering Spring I can say that I&#8217;m less than impressed with a lot of the technologies within it, but it gets the job done (for some values of &#8220;job&#8221;).  Specifically the version of Apache Struts pales in comparison to what&#8217;s available now with SpringMVC, Web Flow, and even Struts 2.0 (and don&#8217;t get me started on the funky use of OJB).</p>
<p>Being in class makes me wish I was a paid consultant instead of a day-to-day worker.  Management listens much more to a consultant&#8217;s suggestions and looks up to them as informed gurus, as opposed to a peon who can&#8217;t fathom the vision that is being cast.  Ugh.</p>
<p>The class itself has been pretty good so far.  The instructor (from a company named <a href="http://www.implmentor.com/">ImplMentor</a>) is pretty knowledgeable and has been a good sport about many of my questions (though I wish the rest of the class would ask more questions).</p>
<p>Overall I&#8217;ve learned some interesting things and in a mere four days (plus two other days of a crash course and not something I want to do again anytime soon) I&#8217;ve become learned enough to be dangerous in the new system.</p>
<p>The biggest issue is that there&#8217;s a huge issue with plugging it into our campus that was either glossed over or blatantly ignored the first few times we had the <a href="http://www.rsmart.com/products/kuali">rSmart people</a> in to our campus: the <a href="http://www.kuali.org/">Kuali System</a> is a huge lock-in to Oracle, which we don&#8217;t use.  This is a big deal which will cause untold numbers of headaches in the future.</p>
<p>Ah well, keeps me gainfully employed I guess.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.josh-peters.name/2007/11/29-office-training/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Dealing with Stress</title>
		<link>http://blog.josh-peters.name/2007/11/09-dealing-with-stress/</link>
		<comments>http://blog.josh-peters.name/2007/11/09-dealing-with-stress/#comments</comments>
		<pubDate>Fri, 09 Nov 2007 17:05:50 +0000</pubDate>
		<dc:creator>Josh Peters</dc:creator>
				<category><![CDATA[God/spirituality]]></category>
		<category><![CDATA[PSA]]></category>
		<category><![CDATA[best-practices]]></category>
		<category><![CDATA[health]]></category>
		<category><![CDATA[introspection]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://blog.josh-peters.name/2007/11/09-dealing-with-stress/</guid>
		<description><![CDATA[Lately the workplace has been a bit stressful for reasons I won&#8217;t go into (though transparency is good and has its place). I&#8217;ve definitely been hard-pressed in some of my beliefs and training in respectful communication. If you&#8217;re a person &#8230; <a href="http://blog.josh-peters.name/2007/11/09-dealing-with-stress/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Lately the workplace has been a bit stressful for reasons I won&#8217;t go into (though transparency is good and has its place).</p>
<p>I&#8217;ve definitely been hard-pressed in some of my beliefs and <a href="http://www.equippingministries.org/index.php?id=10">training in respectful communication</a>.</p>
<p>If you&#8217;re a person who prays, please pray for me that I won&#8217;t let my frustration lead me to say or do something that is wrong.  I&#8217;ve been thinking a lot about Psalm 1 since there seems to be a bit of scoffing going around.  It&#8217;s something that is really hard to resist joining in on.</p>
<p>If you wanna hear more, send me email or talk to me in person.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.josh-peters.name/2007/11/09-dealing-with-stress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
