<?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/"
	>

<channel>
	<title></title>
	<atom:link href="http://thoughtloft.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://thoughtloft.net</link>
	<description></description>
	<pubDate>Wed, 23 Sep 2009 14:35:02 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Google Chrome update</title>
		<link>http://thoughtloft.net/2009/09/23/google-chrome-update/</link>
		<comments>http://thoughtloft.net/2009/09/23/google-chrome-update/#comments</comments>
		<pubDate>Wed, 23 Sep 2009 14:35:02 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
		
		<category><![CDATA[Technology]]></category>

		<category><![CDATA[Tools]]></category>

		<category><![CDATA[google]]></category>

		<category><![CDATA[google chrome]]></category>

		<category><![CDATA[new features]]></category>

		<guid isPermaLink="false">http://thoughtloft.net/?p=262</guid>
		<description><![CDATA[I was pleasantly surprised yesterday when I noticed a subtle update to Google Chrome.  The New Tab page got a makeover, adding dynamic customization capability.  Other updates include faster javascript, a more informative Omnibox (i.e. the search/URL bar), and support for themes.  From what I&#8217;ve noticed so far Chrome is noticeably snappier. [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright" title="Google Chrome" src="http://blogs.learnnc.org/instructify/files/2009/07/google-chrome-logo.jpg" alt="" width="258" height="184" />I was pleasantly surprised yesterday when I noticed a subtle update to Google Chrome.  The New Tab page got a makeover, adding dynamic customization capability.  Other updates include faster javascript, a more informative Omnibox (i.e. the search/URL bar), and support for themes.  From what I&#8217;ve noticed so far Chrome is noticeably snappier.  While I like the original Chrome theme I also think <a href="https://tools.google.com/chrome/intl/en/themes/theme_glossyblue.html">Glossy Blue</a> is quite attractive.</p>
<p>Google has more details about the update on the <a href="http://googleblog.blogspot.com/2009/09/google-chrome-after-year-sporting-new.html">Chrome Blog</a></p>
]]></content:encoded>
			<wfw:commentRss>http://thoughtloft.net/2009/09/23/google-chrome-update/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Google Calendar adds Sporting Events</title>
		<link>http://thoughtloft.net/2009/09/08/google-calendar-adds-sporting-events/</link>
		<comments>http://thoughtloft.net/2009/09/08/google-calendar-adds-sporting-events/#comments</comments>
		<pubDate>Wed, 09 Sep 2009 02:14:23 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
		
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://thoughtloft.net/?p=247</guid>
		<description><![CDATA[Being a big college football fan I was excited to see Google Calendars add Sports Calendars.  You will probably see the standard Google new feature red text in the upper right-hand corner that looks like this: 
If you click on the link you will see an Interesting Calendars.  From here you will see a Sports [...]]]></description>
			<content:encoded><![CDATA[<p>Being a big college football fan I was excited to see Google Calendars add <strong>Sports Calendars</strong>.  You will probably see the standard Google new feature red text in the upper right-hand corner that looks like this: <img class="alignnone size-medium wp-image-252" title="Sports Calendar New Feature" src="http://thoughtloft.net/wp-content/uploads/2009/09/gcal_sports1-300x20.gif" alt="Sports Calendar New Feature" width="300" height="20" /></p>
<p>If you click on the link you will see an <strong>Interesting Calendars</strong>.  From here you will see a Sports tab which gives you a choice of half a dozen sports.  I chose to add the NCAA Football calendar.</p>
<p><img class="alignleft size-full wp-image-249" title="Interesting Calendars &gt; Sports" src="http://thoughtloft.net/wp-content/uploads/2009/09/int_cals.gif" alt="Interesting Calendars &gt; Sports" width="285" height="192" /></p>
]]></content:encoded>
			<wfw:commentRss>http://thoughtloft.net/2009/09/08/google-calendar-adds-sporting-events/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Call external functions in any XSLT context</title>
		<link>http://thoughtloft.net/2009/09/04/doing-things-in-xslt-without-affecting-the-output-tree/</link>
		<comments>http://thoughtloft.net/2009/09/04/doing-things-in-xslt-without-affecting-the-output-tree/#comments</comments>
		<pubDate>Fri, 04 Sep 2009 13:51:06 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
		
		<category><![CDATA[Code]]></category>

		<category><![CDATA[In The Trenches]]></category>

		<category><![CDATA[XSLT]]></category>

		<guid isPermaLink="false">http://thoughtloft.net/?p=240</guid>
		<description><![CDATA[Recently, I ran into a problem in an XSLT script that was preventing me from writing a file from within a template processing an attribute node.  I am writing a script that takes a single XML file that references other XML files with relative paths as input (a DITA map file to be exact) [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, I ran into a problem in an XSLT script that was preventing me from writing a file from within a template processing an attribute node.  I am writing a script that takes a single XML file that references other XML files with relative paths as input (a DITA map file to be exact) and crawls the &#8220;file reference tree&#8221;, processing all files along the way.  Since the majority of the files are XML this is a classic single input multiple output XSLT problem&#8230;.for the most part.  Some of the referenced files are graphics such as PNGs, JPGs, and GIFs.  XSLT and XPath do not provide any capability to copy these file types so I chose to write an external Java class and call it from the XSLT script.  XSLT purists might even say I shouldn&#8217;t be doing such a thing but I&#8217;m trying to accomplish this whole process with a single script to avoid having to track things in any intermediate XML.  The simple Java class has one static method copyFile() that takes two arguments for the source location and destination location.</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;xsl:stylesheet</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;2.0&quot;</span>  ...</span>
<span style="color: #009900;">                         <span style="color: #000066;">xmlns:cf</span>=<span style="color: #ff0000;">&quot;com.mypackage.CopyFile&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
&nbsp;
...
&nbsp;
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;xsl:template</span> <span style="color: #000066;">match</span>=<span style="color: #ff0000;">&quot;@someattribute&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;xsl:value-of</span> <span style="color: #000066;">select</span>=<span style="color: #ff0000;">&quot;cf:copyFile(string($src),string($dst))&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/xsl:template<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
...
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/xsl:stylesheet<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>The main issue with what I was doing centered around the fact that the template where I needed to perform the file write was in the XSLT context of an attribute.  Saxon complained with the following error:</p>
<p>XTDE0410: An attribute node (audience) cannot be created after the children of the<br />
 containing element</p>
<p>I quickly realized that because I was using <xsl:value-of select=""/> to run the custom function that I was doing something illegal in terms of what I was appending to the output tree.  So I got tricky and wrapped the copyFile() call in an <xsl:message> tag.  To my surprise this actually worked.  Since <xsl:message> does not affect the output tree it allows you to do pretty much anything and continue the XSLT thread.</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;xsl:message<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;xsl:value-of</span> <span style="color: #000066;">select</span>=<span style="color: #ff0000;">&quot;cf:copyFile(string($src),string($dst))&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/xsl:message<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://thoughtloft.net/2009/09/04/doing-things-in-xslt-without-affecting-the-output-tree/feed/</wfw:commentRss>
		</item>
		<item>
		<title>5 tips for processing your RSS inbox to zero</title>
		<link>http://thoughtloft.net/2009/07/29/5-tips-for-processing-your-rss-inbox-to-zero/</link>
		<comments>http://thoughtloft.net/2009/07/29/5-tips-for-processing-your-rss-inbox-to-zero/#comments</comments>
		<pubDate>Wed, 29 Jul 2009 18:06:21 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
		
		<category><![CDATA[Productivity]]></category>

		<category><![CDATA[keyboard shortcuts]]></category>

		<category><![CDATA[RSS]]></category>

		<guid isPermaLink="false">http://thoughtloft.net/?p=197</guid>
		<description><![CDATA[Are you one of those people who feels compelled to read every story that comes through your RSS reader?  Do you find yourself spending more time in Google Reader, Feedly, or some other RSS tool than you should.  It occurred to me recently that I might be able to apply the GTD concept of [...]]]></description>
			<content:encoded><![CDATA[<p>Are you one of those people who feels compelled to read every story that comes through your RSS reader?  Do you find yourself spending more time in Google Reader, Feedly, or some other RSS tool than you should.  It occurred to me recently that I might be able to apply the GTD concept of &#8220;<strong>processing to zero</strong>&#8221; to my RSS reader inbox.  So I thought I would share some of the initial ideas that I&#8217;ve been using for the past few weeks to mitigate wasted time and see if they reverberated with anyone else.</p>
<p>Since I have a full time job, I don&#8217;t have a lot of time to spend sifting through the barrage of RSS articles that come in on a daily basis.  I find it&#8217;s more information than I care to deal with on a daily basis.  Sometimes it seems downright futile to try and get the unread count to zero.  But I think that recognizing subtle differences between an email inbox and an RSS inbox might help better manage the amount of information you&#8217;re actually processing in full.</p>
<h4>The RSS inbox: how is it different from an email inbox?<br />
</h4>
<p>For starters, the more RSS feeds you subscribe to the more posts you will get.  So <strong>make sure that you&#8217;re subscribed to feeds that give relevant information for you</strong>.  If not, unsubscribe.  The type of sources you subscribe to can also affect the amount of information that lands in your RSS inbox.  <strong>Blogs or news sources can churn out magnitudes more content per day than a private blog with a single author</strong>.   Subscribing to too many of the high-volume feeds can fill up your RSS inbox very quickly.  So limit the number of high volume feeds to 1 or 2 if possible.  Let&#8217;s take a look at what we can do to process all of the information more efficiently</p>
<h4><strong>1. Determine your goal<br />
 </strong></h4>
<p>The relevance of these methods depends on who you are and what you&#8217;re trying to get out of the information flowing into your RSS reader.  If you&#8217;re just casually trying to keep up to date with the latest technology trends or news then you may want to easy back on the throttle of a clockwork system like I&#8217;ve described.  However, if you&#8217;re a blogger or reading information relevant to your job you may want to take it very seriously so that you get a good return on your investment (i.e. that previous time we never have enough of).   If you&#8217;re in the first group then you may take these tips more lightly than if you&#8217;re in the second group.  <strong>Decide what type of RSS user you are</strong>.</p>
<h4><strong>2. Take it or leave it<br />
 </strong></h4>
<p>For the sake of this article, let&#8217;s suppose you&#8217;re an average developer who uses an RSS reader.  There are probably more new posts coming into your RSS reader than your email inbox.  Chances are that a good chunk of the information flowing in has less bearing on your success from day to day as a developer.  So you could potentially ignore quite a bit of it and save your time for only the articles that you know will be of interest.  This means that <strong>you are not obligated to read everything.</strong> I know, this can be hard!  But just like GTD has a maximum of 2 minutes to process each task we should set a fixed amount of time per post or article.  30 seconds or less should be sufficient to read the title and the description or first few paragraphs to get an idea for whether or not the article meets our internal definition definition of &#8220;interesting&#8221; or &#8220;relevant&#8221;.  If it doesn&#8217;t pass, move on.</p>
<h4><strong>3. Set your limits</strong></h4>
<p>Now how do we process what we think is potentially relevant?  <strong>Give yourself a set amount of time per day to process through actionables.</strong> To keep yourself from falling into the black hole of reading articles all day use a timer or some reminder to let you know when time is up and move on to whatever else you do.  It may also be a good idea to schedule the time you process the same every day.  Put it on your calendar.  Whatever.  Just be consistent and you will reinforce the habit.</p>
<h4><strong>4. Process once per day</strong><br class="spacer_" /></h4>
<p>While you&#8217;re processing or reading through actionables more stuff is going to keep pouring in.  <strong>Avoid the temptation to try and keep up with the constant flow of information</strong>.  Process through your feeds one by one and once you&#8217;re done, stop.  Don&#8217;t go back and try to catch up on what happened in the last 3-5 minutes.  That&#8217;s what tomorrow is for.</p>
<h4>5. Use keyboard shortcuts</h4>
<p>I&#8217;m a big fan of keyboard shortcuts and use them whenever I can.  In fact, I&#8217;ve been known to choose applications based on whether they support keyboard shortcuts or not.  <strong>Find a reader that supports keyboard shortcuts and you&#8217;ll find you can process quicker and more efficiently</strong>.</p>
<p>As someone who practices GTD for email and other tasks daily (I try my best anyways), this type of system maps well onto RSS readers.  Others may think it&#8217;s overkill.  I&#8217;m still working it out myself but I&#8217;ve definitely noticed improvements in the last several months from staying within the guidelines I&#8217;ve described.  Do you find this system may be useful for you as well? Are already practicing a similar approach?  Or do you think it&#8217;s overkill?  Leave a comment and let me know what you think.</p>
<p>Related Posts:</p>
<ul>
<li><a href="http://thoughtloft.net/2009/06/16/3-ways-to-improve-gtd-implementations/" target="_blank">3 ways to improve GTD implementations</a></li>
</ul>
<p><br class="spacer_" /></p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><span class="zem-script more-related pretty-attribution"><br />
<script src="http://static.zemanta.com/readside/loader.js" type="text/javascript"></script><br />
<br />
 </span></div>
]]></content:encoded>
			<wfw:commentRss>http://thoughtloft.net/2009/07/29/5-tips-for-processing-your-rss-inbox-to-zero/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Color Scheme Designer</title>
		<link>http://thoughtloft.net/2009/07/20/color-scheme-designer/</link>
		<comments>http://thoughtloft.net/2009/07/20/color-scheme-designer/#comments</comments>
		<pubDate>Mon, 20 Jul 2009 19:43:24 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
		
		<category><![CDATA[Tools]]></category>

		<category><![CDATA[color]]></category>

		<category><![CDATA[graphics]]></category>

		<category><![CDATA[web design]]></category>

		<guid isPermaLink="false">http://thoughtloft.net/?p=202</guid>
		<description><![CDATA[Lately I&#8217;ve been ramping my Web design skills back up in order to get a couple of websites up and running for my wife&#8217;s businesses.  Color schemes are one thing that are not one of my stronger suites.   I always find it difficult to put together a group of colors that I&#8217;m happy [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright" title="Color Wheel" src="http://kimberlywinston.files.wordpress.com/2008/09/colorwheel1.jpg" alt="" width="134" height="134" />Lately I&#8217;ve been ramping my Web design skills back up in order to get a couple of websites up and running for my wife&#8217;s businesses.  Color schemes are one thing that are not one of my stronger suites.   I always find it difficult to put together a group of colors that I&#8217;m happy with.  There are plenty of free <a title="ColourMod" href="http://colourmod.com/" target="_blank">color pickers</a> and even some <a title="ColorLab" href="http://visibone.com/colorlab/" target="_blank">color scheme tools</a>.   However, none of them seem to be an all-encompassing tool that does it all.</p>
<p>That is, until I read a <a title="Color Scheme Designer at DevLounge.net" href="http://www.devlounge.net/design/on-css-colors/comment-page-1#comment-180072" target="_blank">recent post</a> over at <a title="DevLounge.net" href="http://devloung.net" target="_blank">devloung.net</a> that mentions a tool called <a title="Color Scheme Designer" href="http://colorschemedesigner.com" target="_blank">Color Scheme Designer</a>.   This tool has it all from the rich, user-friendly interface (including super-helpful tooltips) to the example web pages that let you see your color scheme in action.  Add to that the ability to enable different color models (e.g. mono, compliment, triad, and others) as well as &#8220;undo/redo&#8221; multiple times.  It even has &#8220;vision simulations&#8221; that let you test your scheme for different levels of color blindness.  I could waste hours playing with Color Scheme Designer!</p>
<p>Do you use any color tools that you can&#8217;t live without?</p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><span class="zem-script more-related pretty-attribution"><br />
<script src="http://static.zemanta.com/readside/loader.js" type="text/javascript"></script><br />
</span></div>
]]></content:encoded>
			<wfw:commentRss>http://thoughtloft.net/2009/07/20/color-scheme-designer/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Master the Firefox search engine bar with keyboard shortcuts</title>
		<link>http://thoughtloft.net/2009/07/09/master-the-firefox-search-engine-bar-with-keyboard-shortcuts/</link>
		<comments>http://thoughtloft.net/2009/07/09/master-the-firefox-search-engine-bar-with-keyboard-shortcuts/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 03:25:57 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
		
		<category><![CDATA[Productivity]]></category>

		<category><![CDATA[Firefox]]></category>

		<category><![CDATA[Keyboard shortcut]]></category>

		<guid isPermaLink="false">http://thoughtloft.net/?p=160</guid>
		<description><![CDATA[More efficiently change search engines in Firefox's search bar and keyboard shortcuts]]></description>
			<content:encoded><![CDATA[<div id="attachment_182" class="wp-caption alignright" style="width: 286px"><img class="size-full wp-image-182" style="margin-top: 10px;" title="Firefox Search Bar" src="http://thoughtloft.net/wp-content/uploads/2009/07/ffsearchbar1.jpg" alt="Firefox Search Bar" width="276" height="34" /><p class="wp-caption-text">Firefox search bar</p></div>
<p>I think the <em>search bar</em> is fantastic feature of Firefox.   However, I have found that pointing and clicking to change search engines is a real pain.  I&#8217;ll show you how you can switch search engines with lightning speed using some simple keyboard shortcuts.</p>
<p><strong> Highlight the search bar</strong></p>
<p>You can highlight the search bar by pressing<em> Cmd-K</em> (Mac)  or  <em>Ctrl-K</em> (Win).  Once it&#8217;s highlighted type your search terms and hit <em>Enter </em>to perform the search with the selected search engine.</p>
<p><strong>Change search engines</strong></p>
<p>A simple way to change the search engine is to press <em>Cmd-Up/Cmd-Down</em> (Mac) or <em>Ctrl-Up/Ctrl-Down</em> (Win).  This will change the search engine icon to the left of the search field.  It&#8217;s quick but it&#8217;s sometimes hard to tell what the search engine is just by the icon.  Sure, after a while you&#8217;ll remember which is which but I&#8217;m not a huge fan.  This is where the next shortcut comes in handy.</p>
<p><strong>Change search engines the lazy and efficient way</strong></p>
<p>If you&#8217;d rather do a find-as-you-type style search over the search engines you can press <em>Opt-Up/Opt-Down</em> (Mac) or  <em>Alt-Up/Alt-Down </em>(Win).  This will pop up the list of search engines as if you&#8217;d clicked on the search engine icon with the mouse.  Now type the first letter of the search engine you want to change to and it will automatically be highlighted.  If you have more than one search engine that begins with the same first letter just keep pressing the same letter key until you&#8217;ve highlighted the one you want.  Press <em>Enter</em> to select and engine.</p>
<div id="attachment_172" class="wp-caption alignright" style="width: 294px"><img class="size-full wp-image-172 " title="firefox search bar expanded list" src="http://thoughtloft.net/wp-content/uploads/2009/07/ffsearchbar_expanded.jpg" alt="firefox search bar expanded list" width="284" height="271" /><p class="wp-caption-text">Search bar with engine list expanded</p></div>
<p><strong>Reordering search engines.  keep most used at the top and least used at the bottom.</strong></p>
<p>It might be helpful to keep your most used search engines at the top of the list for easier navigation.  To reorder the search engine list, click on the search engine icon to expose the drop-down list (or use one of the keyboard shortcuts described above).  Click on <strong>Manage Search Engines</strong>.  Drag the engines around to arrange them as you like.</p>
<p><strong>Wordpress note</strong></p>
<p>I&#8217;m using the Advanced TinyMCE editor in Wordpress and <em>Cmd-K</em> is either bound to some action inside the editor or simply doesn&#8217;t work when your cursor is inside the editor field.  Press <em>Tab</em> to change the focus and then press <em>Cmd-K</em> to activate the search bar field.</p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><span class="zem-script more-related pretty-attribution"><br />
<script src="http://static.zemanta.com/readside/loader.js" type="text/javascript"></script><br />
</span></div>
]]></content:encoded>
			<wfw:commentRss>http://thoughtloft.net/2009/07/09/master-the-firefox-search-engine-bar-with-keyboard-shortcuts/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Ant copy and move directories recursively (without ant-contrib)</title>
		<link>http://thoughtloft.net/2009/07/06/ant-copy-and-move-directories-recursively-without-ant-contrib/</link>
		<comments>http://thoughtloft.net/2009/07/06/ant-copy-and-move-directories-recursively-without-ant-contrib/#comments</comments>
		<pubDate>Tue, 07 Jul 2009 03:34:39 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
		
		<category><![CDATA[Code]]></category>

		<category><![CDATA[ant]]></category>

		<category><![CDATA[automation]]></category>

		<category><![CDATA[copy]]></category>

		<category><![CDATA[move]]></category>

		<category><![CDATA[scripts]]></category>

		<guid isPermaLink="false">http://thoughtloft.net/?p=85</guid>
		<description><![CDATA[As a corollary to the recent post I made about trying to recursively moving or copying directories with Ant, this post shows you how to do so without the use of the third-party ant-contrib library.  The trick is understanding Ant&#8217;s wildcard syntax used in the  type, which can be rather confusing.  
Previously, [...]]]></description>
			<content:encoded><![CDATA[<p>As a corollary to the <a href="http://thoughtloft.net/2009/06/23/move-or-copy-a-set-of-directories-using-ant/">recent post</a> I made about trying to recursively moving or copying directories with Ant, this post shows you how to do so without the use of the third-party ant-contrib library.  The trick is understanding Ant&#8217;s wildcard syntax used in the <fileset> type, which can be rather confusing.  </p>
<p><a href="http://thoughtloft.net/2009/06/23/move-or-copy-a-set-of-directories-using-ant/">Previously</a>, I was trying to move a directory and all of its contents recursively to another directory using the following target</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;">&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;target</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;move.dirs&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
&nbsp;
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;move</span> <span style="color: #000066;">todir</span>=<span style="color: #ff0000;">&quot;backups&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fileset</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;.&quot;</span> <span style="color: #000066;">includes</span>=<span style="color: #ff0000;">&quot;*incremental*&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/move<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/target<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>The result was a non-recursive copy of the first level of directories with &#8216;incremental&#8217; in the directory name.  The only way I could accomplish a deep copy or move at the time was to use ant-contrib&#8217;s <foreach> task to iterate over all files recursively.  As I discovered after playing with my original script (above) a bit more, this is unnecessary.</p>
<p>By modifying the wildcard syntax in my original target I am able get what I want.</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;">&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;target</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;move.dir&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
&nbsp;
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;move</span> <span style="color: #000066;">todir</span>=<span style="color: #ff0000;">&quot;backups&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fileset</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;.&quot;</span> <span style="color: #000066;">includes</span>=<span style="color: #ff0000;">&quot;**/*incremental*/&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/move<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/target<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>So, the additional &#8216;**/&#8217; at the beginning  and a trailing &#8216;/&#8217; at the end of the includes attribute value is all that is necessary.  All directories (and their contents) with &#8216;incremental&#8217; in the name will be moved to a directory called &#8216;backups/&#8217;.  The same will work for the <copy> task.  I won&#8217;t go into the details about how this syntax works but you can read about it <a href="http://ant.apache.org/manual/dirtasks.html">here</a>.</p>
<p>Related Post: <a href="http://thoughtloft.net/2009/06/23/move-or-copy-a-set-of-directories-using-ant/">Move or copy a set of directories using Ant</a></p>
]]></content:encoded>
			<wfw:commentRss>http://thoughtloft.net/2009/07/06/ant-copy-and-move-directories-recursively-without-ant-contrib/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Gmail adds drag and drop labels</title>
		<link>http://thoughtloft.net/2009/07/01/gmail-adds-drag-and-drop-labels/</link>
		<comments>http://thoughtloft.net/2009/07/01/gmail-adds-drag-and-drop-labels/#comments</comments>
		<pubDate>Thu, 02 Jul 2009 02:26:43 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
		
		<category><![CDATA[Productivity]]></category>

		<category><![CDATA[Technology]]></category>

		<category><![CDATA[gmail]]></category>

		<category><![CDATA[google]]></category>

		<category><![CDATA[new features]]></category>

		<guid isPermaLink="false">http://thoughtloft.net/?p=129</guid>
		<description><![CDATA[Today the Gmail team quietly made a minor change in its interface with respect to labels.  The label panel moved to a more permanent position below the Inbox and Sent Mail &#8220;folders&#8221; and above Contacts and Tasks.  The list of labels has also been shortened, allowing a user to drag and drop more frequently used [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_130" class="wp-caption alignright" style="width: 228px"><img class="size-medium wp-image-130" title="dadlabels" src="http://thoughtloft.net/wp-content/uploads/2009/07/dadlabels-218x300.png" alt="Gmail drag-and-drop labels" width="218" height="300" /><p class="wp-caption-text">Gmail drag-and-drop labels</p></div>
<p>Today the Gmail team quietly made a minor change in its interface with respect to labels.  The label panel moved to a more permanent position below the Inbox and Sent Mail &#8220;folders&#8221; and above Contacts and Tasks.  The list of labels has also been shortened, allowing a user to drag and drop more frequently used labels in and out of the list.  Emails can now be dragged and dropped on top of labels like a more traditional thick client email system such as Outlook or Thunderbird.</p>
<p>I first noticed something suspicious today when my label list, normally on the right side of the interface thanks to a Gmail Labs tweak, moved to the left side.  After trying several times to move it back to the right side I gave up.  I figured there was a glitch or a bug or they simply disabled the tweak.  When I checked my mail tonight I got a very helpful bubble that explained the changes.  This may give some insight into how the team phased the change in to the interface, disabling the tweak first, then rolling out the update.  I&#8217;m intrigued by their update model.</p>
]]></content:encoded>
			<wfw:commentRss>http://thoughtloft.net/2009/07/01/gmail-adds-drag-and-drop-labels/feed/</wfw:commentRss>
		</item>
		<item>
		<title>5 Questions to Ask When Negotiating Car Maintenance</title>
		<link>http://thoughtloft.net/2009/06/27/5-questions-to-ask-when-negotiating-car-maintenance/</link>
		<comments>http://thoughtloft.net/2009/06/27/5-questions-to-ask-when-negotiating-car-maintenance/#comments</comments>
		<pubDate>Sat, 27 Jun 2009 18:54:14 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
		
		<category><![CDATA[Financial]]></category>

		<guid isPermaLink="false">http://thoughtloft.net/?p=112</guid>
		<description><![CDATA[This morning I took our newest car, a 2007 Hyundai Santa Fe, to the mechanic for an oil change. And, of course, when I got the call from the mechanic a couple of hours later there was that awkward moment of silence after they eek out a pleasant, but forced, greeting, and before they rattle [...]]]></description>
			<content:encoded><![CDATA[<p>This morning I took our newest car, a 2007 Hyundai Santa Fe, to the mechanic for an oil change. And, of course, when I got the call from the mechanic a couple of hours later there was that awkward moment of silence after they eek out a pleasant, but forced, greeting, and before they rattle off the laundry list things that need attention. This time, most of the items in the list were 30K mile maintenance things that are necessary in order to keep the warranty on the car valid (i.e. transmission fluid flush, air filter, etc.). All of this totaled about $360, which I&#8217;m borderline OK with. I&#8217;m a believer in spending money to do routine maintenance upfront rather than waiting until it&#8217;s too late when the cost of repairs exceeds the cost of maintenance.</p>
<p>But the list didn&#8217;t end there. I didn&#8217;t expect to hear that I needed new tires. And oh yeah, I should also realign the tires to extend the life of the tires that I have. After all the car is just shy of 30K miles (most tires should last at least 50K miles). The tires still have good tread everywhere except the inside (where I can&#8217;t easily see, of course). Why did they not notice the misalignment before now? I was told this could&#8217;ve been caused by an event in the last three thousand miles or so that threw the alignment out of whack, causing the tires to wear unevenly on the inside. My wife tells me she may or may not have hit a curb recently. Financially it&#8217;s not possible for me to do all of the routine maintenance AND get new tires right now. So, time to start asking questions.</p>
<p>I argued very politely with the salesperson for 10 or 15 minutes about whether or not it&#8217;s crucial that I get new tires. An alignment would cost $90 and give me another three to four thousand miles on my existing tires. When I pressed for as much information as I could I found out a couple of interesting bits. Are the tires in dire need of replacement <i>today</i>? Would I pass a state inspection?&nbsp;&nbsp;&nbsp;The answer, of course, is that they&#8217;re fine probably for another three to four thousand miles.</p>
<p>While inquiring about tire prices I found out that tire alignment is included for free when you buy new tires. When I pointed out that I could drive the tires closer to their end-of-life and get a free tire alignment when I buy new tires there was a three or four second pause on the other line. &#8220;GOTCHA! &#8220;, I thought to myself. Here is where I believe I caught them trying to make a little extra money off of me. I like this shop a lot and they&#8217;ve been working on my cars for almost 10 years now. I&#8217;ve never felt like I was getting screwed until now. Granted, I&#8217;m not dealing with the usual salesperson who I feel is very honest with me. This person is younger, newer, and I can tell he doesn&#8217;t quite grasp customer loyalty yet.</p>
<p>This is a prime example of why it is so important to haggle with salespeople when it comes to things about which you&#8217;re not an expert. It pays to spend that extra time, whether it&#8217;s 15 minutes or multiple phone calls that might exceed an hour, to get all the information straight in your head before committing to repairs. More often than not you will feel pressured by a salesperson to do something you&#8217;re not financially comfortable doing at that moment over the phone. This is especially true with repairs, where you need your car, washing machine, or air conditioner fixed as soon as possible to return life to normal. And service salespersons know this. So, before you agree to just get it taken care of, be sure you know what you&#8217;re getting and whether or not you actually need it now.</p>
<p>Here are 5 questions that you should ask yourself or the car shop before agreeing to repairs:</p>
<ol>
<li><b><span style="font-weight: normal;"><b>Is it absolutely necessary right now?</b> How much longer could you wait before the part in question will break? Sometimes you can simply let a part break before actually fixing it.</span></b></li>
<li><span style="font-weight: normal;"><b>Would waiting cost more in the long run?</b> If you wait on the repair, what&#8217;s the potential risk for more damage? Could it lead to breaking an even more expensive part? Sometimes the cheapest maintenance can actually prevent damage to some of the most expensive parts.<br /></span></li>
<li><span style="font-weight: normal;"><b>Are some services included for free when you replace a part?</b> As I found out, tire alignment is included with new tires. So it doesn&#8217;t make sense to pay for it now when I know that I&#8217;m going to have to buy new tires soon anyways.<br /></span></li>
<li><span style="font-weight: normal;"><b>How long is the warranty on their work?</b> This can depend on the service but it&#8217;s always good to know.<br /></span></li>
<li><span style="font-weight: normal;"><b>Can they cut a percentage off of the price?</b>&nbsp;&nbsp;When the price tag is large it never hurts to ask. Always wait until they&#8217;ve quoted you a final price before you play this card. Use your customer loyalty (if relevant) as evidence that your continued patronage is worth a small discount.<br /></span></li>
</ol>
<p><span style="font-weight: normal;">What else would you ask your mechanic or salesperson?</span></p>
<p><i>Update: The salesperson called back to let me know my car was done. He also let me know that he talked with his manager about my concern that I was never notified of a problem with the alignment before now. They are supposedly going to work to get the cost of tires down as close to cost as they can. It pays to ask questions : )</i></p>
]]></content:encoded>
			<wfw:commentRss>http://thoughtloft.net/2009/06/27/5-questions-to-ask-when-negotiating-car-maintenance/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Move or copy a set of directories using Ant</title>
		<link>http://thoughtloft.net/2009/06/23/move-or-copy-a-set-of-directories-using-ant/</link>
		<comments>http://thoughtloft.net/2009/06/23/move-or-copy-a-set-of-directories-using-ant/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 01:55:14 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
		
		<category><![CDATA[Code]]></category>

		<category><![CDATA[ant]]></category>

		<category><![CDATA[automation]]></category>

		<category><![CDATA[scripts]]></category>

		<guid isPermaLink="false">http://thoughtloft.net/?p=47</guid>
		<description><![CDATA[I&#8217;m often baffled by the way some tasks work in Ant.  Today, I needed to move a set of directories to another directory based on a &#60;fileset&#62; wildcard expression.  My first, seemingly intuitive attempt was to use the &#60;move&#62; task and specify a &#60;fileset&#62; with an includes expression.  Let&#8217;s suppose I want [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m often baffled by the way some tasks work in Ant.  Today, I needed to move a set of directories to another directory based on a <code>&lt;fileset&gt;</code> wildcard expression.  My first, seemingly intuitive attempt was to use the <code>&lt;move&gt;</code> task and specify a <code>&lt;fileset&gt;</code> with an <code>includes</code> expression.  Let&#8217;s suppose I want to move a set of incremental backup directories that all have the keyword &#8220;incremental&#8221; in the name:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;">backup-incremental1
backup-incremental2
backup-incremental3</pre></div></div>

<p>It seems intuitive to use the following Ant <code>move</code> task to move these directories into another directory called <code>backups/</code></p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;target</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;move.dirs&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mkdir</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;backups&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
&nbsp;
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;move</span> <span style="color: #000066;">todir</span>=<span style="color: #ff0000;">&quot;backups&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fileset</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;.&quot;</span> <span style="color: #000066;">includes</span>=<span style="color: #ff0000;">&quot;*incremental*&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/move<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/target<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>For some reason this only copies the root directory without recursively copying its contents.  Ant gives a message that looks like the following:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">[move] Moved 3 empty directories to 3 empty directories under Sandbox/ant/backups</pre></div></div>

<p>After going through several iterations (emphatically gesturing at the monitor along the way) I finally realized that the core <code>&lt;move&gt;</code> and <code>&lt;copy&gt;</code> Ant tasks cannot do this.  At least, not that I could figure out.  Instead, you have to use the <a href="http://ant-contrib.sourceforge.net/">ant-contrib</a> library&#8217;s <a href="http://ant-contrib.sourceforge.net/tasks/tasks/foreach.html"><code>&lt;foreach&gt;</code></a> element to iterate over each directory and call a separate target that will actually move the directory:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;target</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;move.dirs&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mkdir</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;backups&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
&nbsp;
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;foreach</span> <span style="color: #000066;">param</span>=<span style="color: #ff0000;">&quot;dir&quot;</span> <span style="color: #000066;">target</span>=<span style="color: #ff0000;">&quot;move.inc.backups&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;path<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fileset</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;.&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;include</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;*incremental*&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/fileset<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/path<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/foreach<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/target<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;target</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;move.inc.backups&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;move</span> <span style="color: #000066;">todir</span>=<span style="color: #ff0000;">&quot;backups&quot;</span> <span style="color: #000066;">file</span>=<span style="color: #ff0000;">&quot;$dir&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/target<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Why is this so?  I&#8217;m still trying to figure out if there are any vanilla Ant solutions to this problem.  I will be sure to post what I find in the future.  For now I will just accept this as another one of many quirks in Ant.  I love Ant for its simplicity and the ability to cobble together scripts quickly to automate tasks.  But on the other hand, sometimes Ant lacks the intuitive nature of scripting languages like python or ruby.</p>
<p>If you have any alternatives to the method I presented here, please feel free to post them in the comments.</p>
<p>Update: To move or copy directories recursively without ant-contrib see this more recent post <a href=" http://thoughtloft.net/2009/07/06/ant-copy-and-move-directories-recursively-without-ant-contrib/">Ant copy and move directories recursively without ant-contrib</a></p>
]]></content:encoded>
			<wfw:commentRss>http://thoughtloft.net/2009/06/23/move-or-copy-a-set-of-directories-using-ant/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
