<?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>Journeyman Programmer</title>
	<atom:link href="http://journeyman.ivystreetinc.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://journeyman.ivystreetinc.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Wed, 28 Jul 2010 12:53:35 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>A Neat Coding Trick: Add a Property Instead of a Parameter</title>
		<link>http://journeyman.ivystreetinc.com/?p=134</link>
		<comments>http://journeyman.ivystreetinc.com/?p=134#comments</comments>
		<pubDate>Wed, 28 Jul 2010 06:35:10 +0000</pubDate>
		<dc:creator>JourneyMan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://journeyman.ivystreetinc.com/?p=134</guid>
		<description><![CDATA[If you&#8217;ve ever had to work on a legacy application with a HUGE code base, you might get faced with this situation:
Manager: &#8220;Hey journeyman can you fix this address on this  page so that it knows to take a system configuration?&#8221;
Journeyman:  &#8220;Sure, give me a second for an estimate.&#8221;
You find the code:
public class AddressService [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve ever had to work on a legacy application with a HUGE code base, you might get faced with this situation:</p>
<p>Manager: &#8220;Hey journeyman can you fix this address on this  page so that it knows to take a system configuration?&#8221;</p>
<p>Journeyman:  &#8220;Sure, give me a second for an estimate.&#8221;</p>
<p>You find the code:</p>
<pre><span style="color: #000080;">public class AddressService {

      public String getFormattedAddress(Datasource ds, int yourFormat) {
           if (yourFormat == 1) { /* do this format */ }
           else { /* do this format */ }
           return addressString;</span></pre>
<pre><span style="color: #000080;">         }
 }</span></pre>
<p>Now go in and track down the code to change .   Hmm interesting function called getFormattedAddress().  Let&#8217;s see, before I touch it do a code search in Eclipse : used in 147 places!!!!!  Ugh . . .</p>
<p>You shan&#8217;t dare change the function call in ALL those places, nightmare, just for one of the calls.</p>
<p>So here&#8217;s one way to do avoid this messy situation:</p>
<ol>
<li>Add a new property, yourConfig, with getters and setters.</li>
<li>Override the function getFormattedAddress so that it takes your new parameter</li>
<li>Set that parameter in the overriding function.</li>
<li>Modify the original function to check the parameter, using a default if the value is empty.</li>
<li>Call the original function form the overriding function</li>
<li>Don&#8217;t forget to reset the default value!</li>
</ol>
<p>Something like this:</p>
<pre><span style="color: #000080;">public class AddressService {
      private String yourConfig = "";

      public String getFormattedAddress(Datasource ds, int yourFormat) {
           String localConfig =
                   (getYourConfig == "") ? "default" : getYourConfig();
           setYourConfig("");
           if (yourFormat == 1) { /* do this format +localConfig */ }
           else { /* do this format + localConfig */ }
           return addressString;</span></pre>
<pre><span style="color: #000080;">         }</span>
<pre style="padding-left: 30px;"><span style="color: #000080;">     public String getFormattedAddress(Datasource ds, int yourFormat, String inYourConfig) {
           setYourConfig(inYourConfig);
           return getFormattedAddress(ds,yourFormat);</span></pre>
<pre style="padding-left: 30px;"><span style="color: #000080;">     }

    public String setYourConfig(String inStr) {this.yourConfig = inStr;}</span><span style="color: #000080;">
    public void getYourConfig() {return this.yourConfig;}</span></pre>
<p><span style="color: #000080;"> }</span></pre>
<p>Now you can call the function from either its original state, or, pass in a config.</p>
]]></content:encoded>
			<wfw:commentRss>http://journeyman.ivystreetinc.com/?feed=rss2&amp;p=134</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Defaults: Hibernate Lazy; JPA Eager</title>
		<link>http://journeyman.ivystreetinc.com/?p=119</link>
		<comments>http://journeyman.ivystreetinc.com/?p=119#comments</comments>
		<pubDate>Wed, 09 Jun 2010 13:51:38 +0000</pubDate>
		<dc:creator>JourneyMan</dc:creator>
				<category><![CDATA[Domain]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://journeyman.ivystreetinc.com/?p=119</guid>
		<description><![CDATA[Now this is interesting.
We were trying to debug some Hibernate rich objects we had converted from hbm files to annotations, and the objects were blowing up.&#160; One of our more expertish developers with some Hibernate experience insisted that default fetching was lazy.&#160; We decided to accept that as the word and left certain objects with [...]]]></description>
			<content:encoded><![CDATA[<p>Now this is interesting.</p>
<p>We were trying to debug some Hibernate rich objects we had converted from hbm files to annotations, and the objects were blowing up.&nbsp; One of our more expertish developers with some Hibernate experience insisted that default fetching was lazy.&nbsp; We decided to accept that as the word and left certain objects with their hbms attributing their failure to annotations not doing something mysterious correctly.</p>
<p>Well, I started to write some unit and integration tests on one of the newer annotated objects and was stubbing the data out with HSQL.&nbsp; I noticed that there were errors in running the tests of the nature of&nbsp; failure to hydrate objects.&nbsp; It smelled like eager fetching.&nbsp; </p>
<p>So I made the fetching on the many-to-one relationships explicity lazy in an annotation.&nbsp; I couldn&#8217;t believe it.&nbsp; Searching through the documentation I found this.&nbsp; Who would have thought that Hibernate and JPA have taken two different approaches!</p>
<h1><font color="#000066"><i>Fetch strategies and types</i></font></h1>
<p><font color="#000066"><i>In native Hibernate, many-to-one association are lazy by default.<br />
This means that selecting a list of objects with an HQL query will not<br />
initialize the objects at the other end of the many-to-one association.<br />
In JPA the default fetch type is eager (i.e. non-lazy), with separate<br />
selects. This means that any JPAQL query for an entity that has<br />
many-to-one associations in it will result in an N+1 SELECTS problem<br />
even if those associations are not used. To eliminate the unnecessary<br />
queries, simply set the fetch type to LAZY using:</i></font></p>
<div class="code panel" style="border-width: 1px;">
<div class="codeContent panelContent">
<pre class="code-java">&lt;font color="#000066"&gt;&lt;i&gt; @ManyToOne(fetch=FetchType.LAZY)
&lt;/i&gt;&lt;/font&gt;</pre>
</div>
</div>
<p><font color="#000066"><i>Then, in any JPA query the association can be eagerly fetched using <tt>left join fetch</tt>.</i></font></p>
]]></content:encoded>
			<wfw:commentRss>http://journeyman.ivystreetinc.com/?feed=rss2&amp;p=119</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Simple PL/SQL Tokenizer</title>
		<link>http://journeyman.ivystreetinc.com/?p=109</link>
		<comments>http://journeyman.ivystreetinc.com/?p=109#comments</comments>
		<pubDate>Fri, 12 Feb 2010 21:27:34 +0000</pubDate>
		<dc:creator>JourneyMan</dc:creator>
				<category><![CDATA[Database]]></category>

		<guid isPermaLink="false">http://journeyman.ivystreetinc.com/?p=109</guid>
		<description><![CDATA[DECLARE&#160;&#160; tokenString&#160;&#160;&#160;&#160;&#160; VARCHAR2 (256) := &#8216;Jim,Jerry,Jordan&#8217;;&#160;&#160; tokenLength&#160;&#160;&#160;&#160;&#160; NUMBER := 0;&#160;&#160; tokenDelimiter&#160;&#160; VARCHAR2 (1) := &#8216;,&#8217;;&#160;&#160; tokenChar&#160;&#160;&#160;&#160;&#160;&#160;&#160; VARCHAR2 (1) := &#8221;;&#160;&#160; tokenIzed&#160;&#160;&#160;&#160;&#160;&#160;&#160; VARCHAR (30) := &#8221;;BEGIN&#160;&#160; SELECT LENGTH (tokenString) INTO tokenLength FROM DUAL;
&#160;&#160; FOR i IN 1 .. tokenLength&#160;&#160; LOOP&#160;&#160;&#160;&#160;&#160; SELECT SUBSTR (tokenString, i, 1) INTO tokenChar FROM DUAL;
&#160;&#160;&#160;&#160;&#160; IF tokenChar = tokenDelimiter OR i = [...]]]></description>
			<content:encoded><![CDATA[<p>DECLARE<br />&nbsp;&nbsp; tokenString&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; VARCHAR2 (256) := &#8216;Jim,Jerry,Jordan&#8217;;<br />&nbsp;&nbsp; tokenLength&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NUMBER := 0;<br />&nbsp;&nbsp; tokenDelimiter&nbsp;&nbsp; VARCHAR2 (1) := &#8216;,&#8217;;<br />&nbsp;&nbsp; tokenChar&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; VARCHAR2 (1) := &#8221;;<br />&nbsp;&nbsp; tokenIzed&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; VARCHAR (30) := &#8221;;<br />BEGIN<br />&nbsp;&nbsp; SELECT LENGTH (tokenString) INTO tokenLength FROM DUAL;</p>
<p>&nbsp;&nbsp; FOR i IN 1 .. tokenLength<br />&nbsp;&nbsp; LOOP<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SELECT SUBSTR (tokenString, i, 1) INTO tokenChar FROM DUAL;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IF tokenChar = tokenDelimiter OR i = tokenLength<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; THEN<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IF i = tokenLength<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; THEN<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tokenIzed := tokenIzed || tokenChar;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END IF;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8211;&gt; DO YOUR INTERESTING STUFF HERE<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DBMS_OUTPUT.PUT_LINE (tokenIzed);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tokenIzed := &#8221;;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ELSE<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tokenIzed := tokenIzed || tokenChar;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END IF;<br />&nbsp;&nbsp; END LOOP;<br />END;</p>
]]></content:encoded>
			<wfw:commentRss>http://journeyman.ivystreetinc.com/?feed=rss2&amp;p=109</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tech Republic: Spamaholics</title>
		<link>http://journeyman.ivystreetinc.com/?p=104</link>
		<comments>http://journeyman.ivystreetinc.com/?p=104#comments</comments>
		<pubDate>Thu, 11 Feb 2010 12:52:52 +0000</pubDate>
		<dc:creator>JourneyMan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://journeyman.ivystreetinc.com/?p=104</guid>
		<description><![CDATA[I read articles on Tech Republic from time to time.  They&#8217;re . . . . OK.  But I don&#8217;t remember signing up for this kind of email notification.  You&#8217;d think a self proclaimed tech site would show a little more ethical behavior.  Just goes to show you, their opinions are motivated. [...]]]></description>
			<content:encoded><![CDATA[<p>I read articles on Tech Republic from time to time.  They&#8217;re . . . . OK.  But I don&#8217;t remember signing up for this kind of email notification.  You&#8217;d think a self proclaimed tech site would show a little more ethical behavior.  Just goes to show you, their opinions are motivated.  Here&#8217;s my recent inbox. WTF.</p>
<p><img src="http://journeyman.ivystreetinc.com/wp-content/uploads/2010/02/Tech-SpamPublic.gif" alt="Tech SpamPublic" title="Tech SpamPublic" width="400"  class="alignnone size-full wp-image-105" /></p>
]]></content:encoded>
			<wfw:commentRss>http://journeyman.ivystreetinc.com/?feed=rss2&amp;p=104</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ORACLE: Batch Commits</title>
		<link>http://journeyman.ivystreetinc.com/?p=81</link>
		<comments>http://journeyman.ivystreetinc.com/?p=81#comments</comments>
		<pubDate>Thu, 31 Dec 2009 23:16:51 +0000</pubDate>
		<dc:creator>JourneyMan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://journeyman.ivystreetinc.com/?p=81</guid>
		<description><![CDATA[I had to write an Oracle script template for work to kind of create a guideline for our developers since we are getting inputs from ourselves, DBA standards, and business requirements from our BA&#8217;s and customers.
Anyway, one thing they wanted was batch commits . . . so I wrote this quick little piece:
It creates a [...]]]></description>
			<content:encoded><![CDATA[<p>I had to write an Oracle script template for work to kind of create a guideline for our developers since we are getting inputs from ourselves, DBA standards, and business requirements from our BA&#8217;s and customers.</p>
<p>Anyway, one thing they wanted was batch commits . . . so I wrote this quick little piece:</p>
<p>It creates a temp table, populates it, and puts a DBMS_OUTPUT line for whatever number I set the commit at . . . pretty self explanatory.</p>
<p><span style="color: #333399;">CREATE   GLOBAL  TEMPORARY TABLE temp_Cursor_Count  (<br />
testNumber Number(10)<br />
) ON COMMIT PRESERVE ROWS;<br />
commit;</span></p>
<p><span style="color: #333399;">DECLARE</span></p>
<p><span style="color: #333399;">curVariable Number;</span></p>
<p><span style="color: #333399;">cursorCount Number(10) := 0;<br />
cursorCommit Number(10) := 1000;<br />
cursorMod Number(10) := 1;</span></p>
<p><span style="color: #333399;">CURSOR tt is<br />
select * from temp_Cursor_Count;</span></p>
<p><span style="color: #333399;">begin</span></p>
<p><span style="color: #333399;">&#8211;populate temp table<br />
For i in 1..9999<br />
Loop<br />
insert into temp_Cursor_Count(testNumber) values (i);<br />
end loop;<br />
commit;</span></p>
<p><span style="color: #333399;">FOR record_tt IN tt LOOP<br />
&#8211;INITIALIZE Cursor values<br />
curVariable      :=record_tt.testNumber;</span></p>
<p><span style="color: #333399;">cursorCount := cursorCount + 1;</span></p>
<p><span style="color: #333399;">select MOD(cursorCount,cursorCommit) into cursorMod from dual;</span></p>
<p><span style="color: #333399;">if cursorMod=0 then<br />
&#8211;Normally this is where your COMMIT would occur.<br />
DBMS_OUTPUT.PUT_LINE(cursorCount);<br />
end if;</span></p>
<p><span style="color: #333399;">END LOOP;<br />
end;</span></p>
<p><span style="color: #333399;">truncate table temp_Cursor_Count;<br />
commit;<br />
drop table temp_Cursor_Count;<br />
commit;</span></p>
]]></content:encoded>
			<wfw:commentRss>http://journeyman.ivystreetinc.com/?feed=rss2&amp;p=81</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TDD:  Design for the Conditions</title>
		<link>http://journeyman.ivystreetinc.com/?p=71</link>
		<comments>http://journeyman.ivystreetinc.com/?p=71#comments</comments>
		<pubDate>Wed, 16 Dec 2009 13:14:13 +0000</pubDate>
		<dc:creator>JourneyMan</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://journeyman.ivystreetinc.com/?p=71</guid>
		<description><![CDATA[I am not a proponent of TDD, but I will admit it has its place.  And sometimes that place is not to use it, if the ultimate outcome will be of less value to the purpose of your software.
Some reasons not to use TDD if the conditions warrant are:

More code is higher risk for bugs.  [...]]]></description>
			<content:encoded><![CDATA[<p>I am not a proponent of TDD, but I will admit it has its place.  And sometimes that place is not to use it, if the ultimate outcome will be of less value to the purpose of your software.</p>
<p>Some reasons not to use TDD if the conditions warrant are:</p>
<ul>
<li>More code is higher risk for bugs.  Bottom line.</li>
<li>More expensive.  TDD translates into stories/function points/developer time.  I don&#8217;t care what anyone says, I still like TAD a little better to get repeatable regressive costs over time.</li>
</ul>
<p>Use TDD if you are designing things that will benefit from it.  Don&#8217;t if it will not.</p>
<p><strong>Object Design?</strong></p>
<p>TDD is a <span id="lw_1260966867_0">design pattern</span>, nothing more nothing less.  While I have read a few books about TDD . . . I wonder, if true TDD people refuse to do up front object design.  The methodology demands refactoring; and therefore following a Fowler idea that design will emerge, TDD practitioners must let objects emerge via refactoring.  I mean, if they are TRULY doing TDD that&#8217;s what they would do.</p>
<p><strong>Timeboxing is Agile&#8217;s David</strong></p>
<p>Its an interesting experiment to me; I do refactors and look for patterns.  Then I pull them out if needed.  Unless I come up with an estimate, and the project deadline and my manager says &#8220;no way jsut build it quick.&#8221;  If you get on one of those projects using TDD (I was on one) a LOT of spaghetti code, with lots of test cases, gets written.  Its about as bug proof as any other design style, that is, in those conditions TDD brings no value.</p>
<p>I think its a failure of a lot of Agile methods . . . ignores the reality of timeboxed projects.  I have never worked on anything but; even being relatively young as my first computer class was on a Tandy PET and my first Basic program on a Vic 20.</p>
<p><strong>A Use Case Where TDD would Fail &#8211; SUV Analogy<br />
</strong></p>
<p>I am actually using TDD do do some PL/SQL conversion scripts right now.   I have to do it old school; and its taking time.  Sometimes I just write the conditions.  Since the scripts are throw away it we can&#8217;t store the unit tests in any sort of DB repository (but that would be great for stored procs etc.).  I ran into a bit of a problem though . . . <em><strong>that writing code in TDD style sometimes causes more problems, depending on what you are trying to accomplish.</strong></em></p>
<p>Talking with a friend I came up with this real-life analogy of where TDD would fail.</p>
<p>TDD thinks it addresses quality but one thing it introduces is possible defects  due to itself.   You have to make a judgement call based on your input factors of time, money, and risk as to whether its worth it to use this design pattern.  For example, it would absolutely be worth it if designing space shuttle software.  And, you had an unlimited budget.</p>
<p>But here&#8217;s an analogy where it would fail:</p>
<p>Suppose you are designing an SUV for extreme conditions.  In one case, it&#8217;s a highly wet cool condition and in another, is a hot temperature condition.</p>
<p>The designers decide that testing of everything is very important.  So they design in a hole in the engine that let&#8217;s you test sludge buildup in one of the cylinders:  you unscrew something and get a physical look.  Basically, a test has become part of the design.</p>
<p>But now the cylinder head is weakened because of the test.  You have introduced a few failure conditions:  possible weakened gasket that will let in contamination and cause engine failure.</p>
<ul>
<li>In the wet condition this may be worth while.  Sludge buildup and moisture may be something causes buildup and there would be value to check the state of the cylinder periodically to make sure you don&#8217;t need to run a cleaning process, etc.</li>
<li>But in the hot condition, the gasket could keep failing and contaminants could be introduced via the testing port.  The strategy is just follow a maintenance schedule (TAD &#8211; test after), which you would have done anyway, because everyone has to do maintenance.</li>
</ul>
<p>It&#8217;s just a hypothetical but there are a ton of other things in our life just like this.  Vehicles are easy . . . even now they are building all kinds of testing into the vehicles as part of the design (TDD): emissions, mixture, electric etc.  The payoff is that this is very expensive to pay for, and also in increase costs due to specialized maintenance because your every day Joe or Jane auto mechanic can&#8217;t work on their own vehicle.  Do vehicles really last any longer?  I&#8217;d argue that they do not.  TDD just extended the period between maintenance&#8217;s &#8212; i.e. you paid for your time up front instead of over time.</p>
<p>I&#8217;m not motivated enough to throw away a methodology if it may be useful, and TDD can teach us some things, but I guess the mantra is:  &#8220;<em><strong>TDD: do it only if necessary.</strong></em>&#8220;</p>
]]></content:encoded>
			<wfw:commentRss>http://journeyman.ivystreetinc.com/?feed=rss2&amp;p=71</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Folder or Path as a Drive Letter on Windows XP</title>
		<link>http://journeyman.ivystreetinc.com/?p=59</link>
		<comments>http://journeyman.ivystreetinc.com/?p=59#comments</comments>
		<pubDate>Thu, 03 Dec 2009 17:09:05 +0000</pubDate>
		<dc:creator>JourneyMan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://journeyman.ivystreetinc.com/?p=59</guid>
		<description><![CDATA[I was creating a setup of PortableApps on my XP machine with some of the great stuff you can port around in that framework: Open Office, VLC etc. without installing them into the OS.  I didn&#8217;t have a USB drive with me, and thought hey, maybe I can just make a virtual drive from [...]]]></description>
			<content:encoded><![CDATA[<p>I was creating a setup of PortableApps on my XP machine with some of the great stuff you can port around in that framework: Open Office, VLC etc. without installing them into the OS.  I didn&#8217;t have a USB drive with me, and thought hey, maybe I can just make a virtual drive from a folder and load the apps into that (I&#8217;ve done this using Cygwin in my development environment).</p>
<p>So I started digging through the commands and found SUBST.  It associates a path with a drive letter.</p>
<p>Just open up a command line and type in the following syntax:</p>
<p><code><br />subst (virtual drive letter): (actual path)<br /></code></p>
<p>So, for instance, say I want to mount a folder &#8220;\\atlas\shrugged&#8221; from a network drive as drive letter &#8220;q:&#8221; on my local -<br /><code><br />subst q: \\atlas\shrugged<br /></code></p>
<p>And a local folder as &#8220;x:&#8221; -<br /><code><br />subst x: C:\journeyman<br /></code></p>
<p>Disconnecting the virtual drives is simple enough, use the &#8220;/d&#8221; flag for delete:<br /><code><br />subst x: /d<br /></code></p>
<p>I haven&#8217;t found a ton of use cases for this yet, but it&#8217;s a nice little command line tool for any automated tasks you might think of someday.</p>
<p>Funny enough, when I was going through the PortableApps setup it now allows you to install to a folder &#8212; as I remember the older versions needed a drive &#8212; chuckle.  <img src='http://journeyman.ivystreetinc.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://journeyman.ivystreetinc.com/?feed=rss2&amp;p=59</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Updating Eclipse Projects From Java 1.5 to Java 1.6</title>
		<link>http://journeyman.ivystreetinc.com/?p=49</link>
		<comments>http://journeyman.ivystreetinc.com/?p=49#comments</comments>
		<pubDate>Fri, 13 Nov 2009 18:15:03 +0000</pubDate>
		<dc:creator>JourneyMan</dc:creator>
				<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://journeyman.ivystreetinc.com/?p=49</guid>
		<description><![CDATA[When you are updating from jdk 1.5 to jdk 1.6 in Eclipse 3.5, make sure you hit all of these  touchpoints:

On your machine, install jdk 1.6 and change your environment path variables to point to the 1.6 directories.
In Eclipse, Under Windows-&#62;Preferences-&#62;Java-&#62;Installed JREs make sure jdk 1.6 is  added, and select it.
In Eclipse, Under Windows-&#62;Preferences-&#62;Java-&#62;Build Path-&#62;Classpath [...]]]></description>
			<content:encoded><![CDATA[<div>When you are updating from jdk 1.5 to jdk 1.6 in Eclipse 3.5, make sure you hit all of these  touchpoints:</div>
<ul>
<li>On your machine, install jdk 1.6 and change your environment path variables to point to the 1.6 directories.</li>
<li>In Eclipse, Under Windows-&gt;Preferences-&gt;Java-&gt;Installed JREs make sure jdk 1.6 is  added, and select it.</li>
<li>In Eclipse, Under Windows-&gt;Preferences-&gt;Java-&gt;Build Path-&gt;Classpath Variables make sure jdk 1.6 is added for JRE_LIB and JRE_SRC.</li>
<li>In Eclipse, Under Windows-&gt;Preferences-&gt;Java-&gt;Compiler set compliance level to 1.6.</li>
<li>In Eclipse, Under Windows-&gt;Preferences-&gt;Ant-&gt;Runtime set classpath variables 1.6.</li>
<li>Update your JBoss server/web server to use the 1.6 runtime.</li>
<li>In each project, change the compiler, the classpaths, the facets, and the runtimes for your servers (as applicable) to use jdk 1.6.</li>
</ul>
<p>Then you should be good to go.  Build using both the Eclipse and the Ant methods to test . . . remember, the Hudson build server (or any build process) uses the ant scripts so if you check in the app with broken scripts you&#8217;ve checked in a bug!</p>
]]></content:encoded>
			<wfw:commentRss>http://journeyman.ivystreetinc.com/?feed=rss2&amp;p=49</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Wikipedia One Up Isn&#8217;t Sufficient For Your Resume</title>
		<link>http://journeyman.ivystreetinc.com/?p=45</link>
		<comments>http://journeyman.ivystreetinc.com/?p=45#comments</comments>
		<pubDate>Fri, 13 Nov 2009 12:51:21 +0000</pubDate>
		<dc:creator>JourneyMan</dc:creator>
				<category><![CDATA[Workplace]]></category>

		<guid isPermaLink="false">http://journeyman.ivystreetinc.com/?p=45</guid>
		<description><![CDATA[It&#8217;s not in the nature of most people, developers even more so with our huge egos, to admit we don&#8217;t know something.  But if you have a life outside of your compiler, you know that some things can&#8217;t be read about; they have to be experienced.
For a while recently at a place called Ingenix (United [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s not in the nature of most people, developers even more so with our huge egos, to admit we don&#8217;t know something.  But if you have a life outside of your compiler, you know that some things can&#8217;t be read about; they have to be experienced.</p>
<p>For a while recently at a place called Ingenix (United Health Group) I was a development manager dropping in Scrum and Agile practices.  I came to a few realizations:</p>
<ul>
<li>Many say they know how to do Agile, but they do not.  They have not experienced it, and they have read to little about it and reinterpreted what they read into their own understanding (thus learning nothing).</li>
<li>The struggle at most organizations is to get the correct tooling to support doing Agile.  This can be CI servers or even the availability of freakin&#8217; meeting rooms.  Without these basic simple things the modern practices of Agile, or any new way of doing things, will fail.  Again it ties back to the simple pattern of learning just enough to be dangerous, but not enough to really understand.</li>
</ul>
<p>Simple as that.</p>
<p>This stuff is difficult too.  If you want to use Maven on a project, it can take months.  Try telling a VP you want to drop his investment in CVS to switch to Mercurial.  Sit in a scrum with scrum-inexperienced team and watch the waste of time add up.  At my first United gig the scrum master made us report to the business in non technical terms for 45 minutes each day.  We were not allowed to talk to each other as developers . . . we had to do it after, another 15-30 minutes.  Yeah . . a big WTF &#8230; One hour everyday of meetings versus the old waterfall one hour every week?  And this person was certified!  (Maybe sometime I&#8217;ll discuss the &#8220;spirit&#8221; of all this, which seems to be more dangerous than just plain ignorance of methodology.)</p>
<p>I am currently working a gig trying to assist a bit in adding Agile practices to their structure, but it has been near impossible.  People get all pissy if you try to &#8220;coach&#8221; them as to simple meanings of things.  And then, they say the processes fail.</p>
<p>Examples:</p>
<ul>
<li>One developer started listing things like &#8220;gather requirements for migration&#8221; and &#8220;code daos&#8221; as spikes.  Spikes are proof of concepts, not actual tasks.  Spikes are like &#8220;see if Mercurial will offer something that CVS can&#8217;t.&#8221;  Etc.  I got my head bit off.</li>
<li>TDD.  Oh how I hate it for fuzzy logic workflow/user gesture driven software.  But you ask any of the developers around my current place and they are &#8220;experts&#8221; on TDD.  &#8220;Yeah we&#8217;re writing unit tests.&#8221;  That&#8217;s not TDD!  If they have not done it for real, just read a one-up wikipedia page, then nothing is brought to the table.  TDD is a design methodology &#8211; you write a test, then write code that breaks it, then fix the test with the code.  Its not by any means the same thing test-after-development; and it has to actually be experienced day in and day out to fully appreciate its pro&#8217;s and cons.</li>
<li>Same with pairing.  Pair all day for a few weeks, see what that&#8217;s like.  Pair when you do not want to pair, pair with someone you do not like . . . until you do, its just something you read.</li>
</ul>
<p>My advice is this: remain open minded about these until you&#8217;ve actually experienced these things. If you lie about it you are damaging the project and the relationships around you at your gig.    After all, we are supposed to be the modern day rationalists, right?</p>
]]></content:encoded>
			<wfw:commentRss>http://journeyman.ivystreetinc.com/?feed=rss2&amp;p=45</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Darcs Distributed Version Control</title>
		<link>http://journeyman.ivystreetinc.com/?p=3</link>
		<comments>http://journeyman.ivystreetinc.com/?p=3#comments</comments>
		<pubDate>Fri, 06 Nov 2009 15:33:17 +0000</pubDate>
		<dc:creator>JourneyMan</dc:creator>
				<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://journeyman.neovocis.com/?p=3</guid>
		<description><![CDATA[In my search for easy to use technology I decided to use the darcs distributed revision control code repository to maintain some of my work-usbstick-website&#8211;home files.
What darcs is:

It&#8217;s an easy to use, distributed, code repository.  It falls into the same category as Mercurial,GIT or Bazaar.
Distributed?  Yes, patches are exchanged between repositories and there is no [...]]]></description>
			<content:encoded><![CDATA[<p>In my search for easy to use technology I decided to use the <a href="http://darcs.net/">darcs</a> distributed revision control code repository to maintain some of my work-usbstick-website&#8211;home files.</p>
<p><strong>What darcs is:</strong></p>
<ul>
<li>It&#8217;s an easy to use, distributed, code repository.  It falls into the same category as Mercurial,GIT or Bazaar.</li>
<li>Distributed?  Yes, patches are exchanged between repositories and there is no one single &#8220;mother&#8221;repository.</li>
<li>Super lightweight; runs locally, super portable, cross platform, and easy to learn. The download is 4 megs.</li>
<li>A great introduction to the world of distributed reversion control.</li>
<li>Doesn&#8217;t do anything to your existing folder and file structures (non-invasive).</li>
</ul>
<p><strong>What is a distributed respository?</strong></p>
<p>Hmmm . . .this definition is different depending on where you look.  Even as of this date (nov 6 2009) Wikipedia doesn&#8217;t have a good definition.</p>
<p>Here is my definition:</p>
<ul>
<li>Not tied to a central repository.</li>
<li>It&#8217;s faster.</li>
<li>Easier to branch.</li>
<li>Work offline and still create commits.</li>
<li>Distributed backups &#8212; everything is a  working copy.</li>
<li>Collaboration between developers without checking into central copy.</li>
<li>It can run locally, easily (especially darcs).</li>
<li>Useful if you are working on a module with a small team within a larger team, and want to revision/track changes with each other but not the full build.</li>
</ul>
<p>I think subversion is a rock solid repository, and quite honestly, I am not a proponent of using technology for its own sake.  The simpler the better. But the future seems to be distributed repositories and maybe with teams working remotely from each other, the advance of SOA, etc. these types of tools will make more sense.  I suggest trying out darcs just because it gives you an idea very quickly what these are all about.</p>
<p><strong>Repository Workflow</strong></p>
<ol>
<li>Clone a repository to your own repository.</li>
<li>Work in the clone &#8212; which is now your working copy.</li>
<li>Check in and out of your working copy from your IDE/cmd line.</li>
<li>When you are ready, commit those changes to another (or original) repository.</li>
</ol>
<p>One way to look at this is, the &#8220;central&#8221; repository is the build server&#8217;s repository, and you have your own.  But just remember, the only thing central about that repository is that everyone agrees its the place where production bound code must end up.</p>
<p>Maybe this sounds disturbing.</p>
<p>In the &#8220;old&#8221; days the shops were so used to having copies of everything out of fear of a developer &#8220;getting hit by a bus&#8221; (which is code for: corporate culture does not trust anyone at all).    Honestly, I have yet to see that scenario. But it does lead us to something I haven&#8217;t seen discussed too much:</p>
<p><strong>Best Practices Using Distributed Reversion Control</strong></p>
<p>I haven&#8217;t thought about this much until now, but here are some of the guidelines I use for a distributed system.</p>
<ul>
<li>Refresh/rebuild in the morning.</li>
<li>Check in when you get a meaningful amount of work done.</li>
<li>Physically back up your directories</li>
<li>Exchange your patches with your team (distributed backups).</li>
</ul>
<p>Sometime when working in a continuous build environments, I will check things in with my feature sets turned off . . . but usually not, if they are not ready.  Also, you can keep a backup of workin progress in another of your own distributed repositories on a network drive (in addition to your local).</p>
<p><strong>Back to Darcs</strong><br />
The scenario I describe here would be using darcs to sync files from an html blog between your local machine and a usb stick.  Let&#8217;s assume you have some files at x:\usb\blog and locally, you want to work on them at c:\local\blog. (I actually use this method for a tiddlywiki &#8220;getting things done&#8221; piece.)</p>
<p>Download <a href="http://darcs.net/">darcs</a> and decompress to a desired location.  Add the directory to your path.</p>
<p>Create your first repository.  Navigate to x:\usb\blog and type:</p>
<p><code>darcs init</code></p>
<p>Next, recursively add all the files and folders from there:</p>
<p><code>darcs add -r *</code></p>
<p>Notice that it skipped all the _darcs files created from the init command!</p>
<p>Run this:</p>
<p><code>darcs whatsnew</code></p>
<p>And you can see all the new files and folders you added.  But we haven&#8217;t saved yet, we have to do this:</p>
<p><code>darcs record -a</code></p>
<p>You get asked a few questions (which can be set on the command line as you get better with the tool) and its all checked in!</p>
<p>Time to get a copy of this repo to the local.</p>
<p>Navigate to c:\local\blog (which should be empty) and type:</p>
<p><code>darcs get x:\usb\blog</code></p>
<p>You have a local copy!  Make changes in your existing files there (on c:\local\blog) and when you are ready, check in your changes:</p>
<p><code>darcs record -a</code></p>
<p>And then run this to propogate those changes to your usb stick &#8212; first change directories to x:\usb\blog and run:</p>
<p><code>darcs pull c:\local\blog</code></p>
<p>And both repositories are sync&#8217;d up.  I wrote a little batch file in my case to automate this.</p>
<p>You are probably wondering why in the world I would want to do such a thing.  Well, I can access the files in my tiddlywiki from several spots, and I don&#8217;t want a brute force copy over of the file least I lose information.  I need the granular capability  Also I also use it to branch &#8212; for instance at year end &#8212; very easy!!!</p>
<p>Of course there are a whole slew of other functions but that&#8217;ll do.  Darcs is the simplest tool to get your feet wet in the world of distributed version control.</p>
]]></content:encoded>
			<wfw:commentRss>http://journeyman.ivystreetinc.com/?feed=rss2&amp;p=3</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
