<?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>Chad Sturtz</title>
	<atom:link href="http://chadsturtz.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://chadsturtz.com</link>
	<description>A Journey Through Software</description>
	<lastBuildDate>Fri, 02 Jul 2010 20:48:44 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Why I need Yammer</title>
		<link>http://chadsturtz.com/2010/07/why-i-need-yammer/</link>
		<comments>http://chadsturtz.com/2010/07/why-i-need-yammer/#comments</comments>
		<pubDate>Fri, 02 Jul 2010 20:48:44 +0000</pubDate>
		<dc:creator>Chad</dc:creator>
				<category><![CDATA[People]]></category>
		<category><![CDATA[teamwork]]></category>

		<guid isPermaLink="false">http://chadsturtz.com/?p=122</guid>
		<description><![CDATA[Q: Why do I need Yammer?
A:  It&#8217;s simple&#8230; I want access to my fellow software engineers and technologists that live on the other side of boundaries that get created around other Departments, Products, Business Units, and Acquisitions.
True story. I had to quickly come up to speed on a technology I had not been introduced to previously. [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fchadsturtz.com%2F2010%2F07%2Fwhy-i-need-yammer%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fchadsturtz.com%2F2010%2F07%2Fwhy-i-need-yammer%2F" height="61" width="51" /></a></div><p><strong>Q</strong>: Why do I need Yammer?</p>
<p><strong>A</strong>:  It&#8217;s simple&#8230;<strong> </strong>I want access to my fellow software engineers and technologists that live on the other side of boundaries that get created around other Departments, Products, Business Units, and Acquisitions.</p>
<p>True story. I had to quickly come up to speed on a technology I had not been introduced to previously.  I took the normal approach of aggressively searching online to find examples, white papers, blogs, anything to help.  Time was running out, and while I had learned a lot in a short amount of time, I wanted a little help connecting all of the dots and selecting what I needed to focus on to complete my task in a timely manner.  I needed 15 minutes with an expert in this technology to guide me down the right path, because I didn&#8217;t have time to go down the wrong one.</p>
<p>I jumped on Yammer and put out a call for help.  A development manager responded with the name of a person who he knew to be experienced with this technology.  He introduced us over email and a few minutes later, I was getting exactly what I needed.</p>
]]></content:encoded>
			<wfw:commentRss>http://chadsturtz.com/2010/07/why-i-need-yammer/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Why you&#8217;re not ready for Agile: The real top 10 list</title>
		<link>http://chadsturtz.com/2010/07/why-youre-not-ready-for-agile-the-real-top-10/</link>
		<comments>http://chadsturtz.com/2010/07/why-youre-not-ready-for-agile-the-real-top-10/#comments</comments>
		<pubDate>Thu, 01 Jul 2010 19:25:38 +0000</pubDate>
		<dc:creator>Chad</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[People]]></category>

		<guid isPermaLink="false">http://chadsturtz.com/?p=115</guid>
		<description><![CDATA[The real 10 reasons your organization isn't ready for Agile.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fchadsturtz.com%2F2010%2F07%2Fwhy-youre-not-ready-for-agile-the-real-top-10%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fchadsturtz.com%2F2010%2F07%2Fwhy-youre-not-ready-for-agile-the-real-top-10%2F" height="61" width="51" /></a></div><p>We&#8217;ve all seen too many blogs and articles along the lines of &#8220;10 reasons you&#8217;re organization isn&#8217;t ready for Agile&#8221;.  I believe that buried under all of those &#8216;reasons&#8217; are fundamental problems that will keep your organization from reaching any high level of productivity.  Here it is, the real top 10 list:</p>
<p>1. you&#8217;re not hiring the right people</p>
<p>2. you&#8217;re not hiring the right people</p>
<p>3. you&#8217;re not hiring the right people</p>
<p>4. you&#8217;re not hiring the right people</p>
<p>5. you&#8217;re not hiring the right people</p>
<p>6. you&#8217;re not hiring the right people</p>
<p>7. you&#8217;re not hiring the right people</p>
<p>8. you&#8217;re not hiring the right people</p>
<p>9. you&#8217;re not hiring the right people</p>
<p>10. you&#8217;re not hiring the right people</p>
<p>Hopefully this comprehensive list will help you and your organization.  Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://chadsturtz.com/2010/07/why-youre-not-ready-for-agile-the-real-top-10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Statistic: LOC:Test</title>
		<link>http://chadsturtz.com/2010/06/statistic-loctest/</link>
		<comments>http://chadsturtz.com/2010/06/statistic-loctest/#comments</comments>
		<pubDate>Mon, 21 Jun 2010 17:11:43 +0000</pubDate>
		<dc:creator>Chad</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[TDD]]></category>

		<guid isPermaLink="false">http://chadsturtz.com/?p=105</guid>
		<description><![CDATA[Trying to find the ratio of lines of code to number of tests]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fchadsturtz.com%2F2010%2F06%2Fstatistic-loctest%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fchadsturtz.com%2F2010%2F06%2Fstatistic-loctest%2F" height="61" width="51" /></a></div><p>For pure curiosity reasons, I wanted to know the ratio of lines of code to unit tests.  I&#8217;m writing all production code in Java and tests in Groovy.</p>
<h3>LOC</h3>
<p>Finding the lines of code:    grep -v -r &#8211;include=&#8221;*.java&#8221; &#8220;^[[:space]]*$&#8221; * | wc -l</p>
<h3>Number of Tests</h3>
<p>grep -r &#8211;include=&#8221;*Test.groovy&#8221; &#8220;@Test&#8221; * | wc -l</p>
<h3>Results</h3>
<p>LOC: 706, Tests: 82</p>
<p>This yields a ratio of:   <strong>8.6 to 1</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://chadsturtz.com/2010/06/statistic-loctest/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Be more Productive with these GMail tips</title>
		<link>http://chadsturtz.com/2010/05/be-more-productive-with-these-gmail-tips/</link>
		<comments>http://chadsturtz.com/2010/05/be-more-productive-with-these-gmail-tips/#comments</comments>
		<pubDate>Thu, 20 May 2010 17:23:00 +0000</pubDate>
		<dc:creator>Chad</dc:creator>
				<category><![CDATA[Misc]]></category>

		<guid isPermaLink="false">http://chadsturtz.com/?p=100</guid>
		<description><![CDATA[GMail Tips]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fchadsturtz.com%2F2010%2F05%2Fbe-more-productive-with-these-gmail-tips%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fchadsturtz.com%2F2010%2F05%2Fbe-more-productive-with-these-gmail-tips%2F" height="61" width="51" /></a></div><p><strong>1. Skip Inbox</strong></p>
<p>When filtering incoming mail, if it&#8217;s not something you need to read as soon as you have time, just tell it to skip the inbox.  This will cause the email to be immediately archived, but keeps it marked as unread.  This works especially well for many of the automated emails you receive from companies and websites (like Facebook) and gets you one step closer to Inbox Zero.</p>
<p><strong>2. Hide Read Lables</strong></p>
<p>Go into Settings and then to Labs.  Find &#8220;Hide Read Labels&#8221;, and enable it.  This causes labels that don&#8217;t contain any unread email to be hidden from view.  It keeps your screen a little less cluttered and allows you to focus on new emails.  Your labels are still very easy to reach, just start typing the label name in the search bar and it will pop up as one of the auto-fill options.</p>
<p><strong>More to come as i figure them out!</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://chadsturtz.com/2010/05/be-more-productive-with-these-gmail-tips/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Test Top-Down, Code Bottom-Up</title>
		<link>http://chadsturtz.com/2010/05/test-top-down-code-bottom-up/</link>
		<comments>http://chadsturtz.com/2010/05/test-top-down-code-bottom-up/#comments</comments>
		<pubDate>Wed, 12 May 2010 14:41:17 +0000</pubDate>
		<dc:creator>Chad</dc:creator>
				<category><![CDATA[TDD]]></category>

		<guid isPermaLink="false">http://chadsturtz.com/?p=96</guid>
		<description><![CDATA[A lesson learned in TDD]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fchadsturtz.com%2F2010%2F05%2Ftest-top-down-code-bottom-up%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fchadsturtz.com%2F2010%2F05%2Ftest-top-down-code-bottom-up%2F" height="61" width="51" /></a></div><p>I&#8217;ve actually been coding a lot at work recently.  The system I&#8217;m building at the low end interacts with a Web Service to retrieve data.  At the high end, it reports this data in custom forms and at configurable intervals.  I&#8217;m building a few different API layers in between.  A small, convenience API that interacts directly with the Web Service to simplify gathering of data.  On top of that, I have several more wrapper-style APIs that allow the developer to work with the generic data types as wrapper objects for what they really represent.  On top of those is the framework for forming and sending off the data to another system.</p>
<p>In this situation, I knew what the system must do, but not the exact details of how it would work at the lower levels.  I did enough work on a POC interaction with the Web Service to know that the basic direction I wanted to go was possible.  At first I took straight to developing the lowest level API, as that&#8217;s where I had my most detailed requirements.  From the knowledge I gained doing the POC, I had enough to start there.  However, in the end this hurt more than it helped.</p>
<p>After TDDing my way through several of the requirements I had of the low level API, I found myself in a sticky situation.<br />
1. Too many tests tied too closely to implementation<br />
2. I felt like I was progressing a little slowly, having to stop and think too long about what needed done next<br />
3. I ended up having to heavily refactor about 2-days worth of code because the tests I came up with, did not reflect the true needs of the system</p>
<p>Luckily at that point, I realized right away that my lack of higher-level tests were allowing me to steer the system off path.  I needed these higher level tests to drive the requirements for the behavior of the lower level API.  So, I started fresh, writing a single acceptance level test that defined a small feature of the system.  I continued to work my way down writing more tests until I couldn&#8217;t write a smaller more precise test without controlling the implementation details.  That was my cue to start coding, and get all those tests I had written to pass.</p>
<p>The results..<br />
1. Just enough code to meet the requirements.  No more, no less.<br />
2. Fewer tests tied directly to implementation details<br />
3. A thin, vertical slice of functionality</p>
]]></content:encoded>
			<wfw:commentRss>http://chadsturtz.com/2010/05/test-top-down-code-bottom-up/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Friday Brown Bag: Reducing Feedback Cycles</title>
		<link>http://chadsturtz.com/2010/04/friday-brown-bag-reducing-feedback-cycles/</link>
		<comments>http://chadsturtz.com/2010/04/friday-brown-bag-reducing-feedback-cycles/#comments</comments>
		<pubDate>Mon, 19 Apr 2010 16:36:22 +0000</pubDate>
		<dc:creator>Chad</dc:creator>
				<category><![CDATA[presentations]]></category>

		<guid isPermaLink="false">http://chadsturtz.com/?p=87</guid>
		<description><![CDATA[This past Friday (the 16th), I did a brown bag presentation on reducing feedback cycles on software development projects.  Slides here:  http://bit.ly/bORrkW.  Unfortunately, the slides contain only talking points.. the real value came from the discussion.  Also.. while we did record the audio, it contained some discussion specific to internal projects/processes [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fchadsturtz.com%2F2010%2F04%2Ffriday-brown-bag-reducing-feedback-cycles%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fchadsturtz.com%2F2010%2F04%2Ffriday-brown-bag-reducing-feedback-cycles%2F" height="61" width="51" /></a></div><p>This past Friday (the 16th), I did a brown bag presentation on reducing feedback cycles on software development projects.  Slides here:  <a href="http://bit.ly/bORrkW">http://bit.ly/bORrkW</a>.  Unfortunately, the slides contain only talking points.. the real value came from the discussion.  Also.. while we did record the audio, it contained some discussion specific to internal projects/processes that I&#8217;m not going to share.  </p>
<p>First of all, I want to mention that a lot of the conversation went back to the Cost of Change curve.  Take my code compilation example.  Finding a compilation error in real-time will (theoretically) make the cost of fixing the error cheaper than finding it after a day of coding.  The example was that using an IDE that performed real-time compilation was a much shorter feedback cycle than going to a command prompt and running your build manually.  The other notable example that builds on the Cost of Change Curve was scheduled code reviews (montly/weekly/etc) vs. pair programming.</p>
<p>One of the final feedback cycles I presented was that of the completeness of an individual feature of the system.  We talked about the Cost of Change Curve here as well, but most of the discussion focused on what other things we may get by reducing this feedback cycle.  </p>
<p>I began by talking about how a single feature progresses through the Waterfall process.  Pointing out that you won&#8217;t get feedback on the completeness of a single feature until you&#8217;ve reached the Validation phase where your QA has had a chance to test the feature.  This gives us a feedback cycle of the length of time between when dev initially started on this feature and when it was tested during the Validation phase.  How long are we talking here?  Months probably.</p>
<p>So, now it&#8217;s time to ask how one would reduce that feedback cycle.  In order to do that, we need to bring the validation phase closer to the point at which development began on this feature.  Since the traditional Waterfall approach moves the entire software system from phase to phase, it&#8217;s not possible without re-defining the process.  </p>
<p>We then took a look at this feedback cycle in Scrum.  Sometime after the start of a sprint, you start development on one of the user stories you&#8217;ve selected (aka feature).  Considering the goal is to deliver this feature at the end of the sprint, at some point you&#8217;re going to validate this feature, completing the feedback cycle.  So, here, the feedback cycle is at most 1 sprint.</p>
<p>We continued the discussion down the path of what things we get by reducing the feedback cycle in this way.  The most profound impact is on our feature estimation  because the feedback cycle on feature estimation accuracy is directly tied to the feedback cycle on feature completeness.  Now that we&#8217;re attempting to complete individual features within a single sprint, we&#8217;ll also get feedback on our estimation of that feature within the same sprint.  </p>
<p>We spent some time talking about what you can do with this information.  Essentially it means that you can better estimate the remaining features of the system.  This in turn gives you a more accurate project schedule, which in turn allows you to confidently discuss project timeline and budget predictions with stakeholders and customers.  Also, when someone asks what features won&#8217;t make the deadline, you&#8217;ll be able to answer that question and others like it.</p>
<p>Hopefully that&#8217;s enough text here for you to get a feel of the presentation.  Feedback cycles is a broad topic.  In this presentation I hit some things at a very high level and went a little more detailed on others.  My goal was simply to communicate that reducing any feedback cycle is beneficial (some to a much smaller degree than others).  I also needed to address a wide audience: devs, qa, project managers, etc.  While I did get some great feedback from a few of the attendees, I do remember seeing a few faces that looked lost.  Maybe I&#8217;ll follow up with those people.</p>
]]></content:encoded>
			<wfw:commentRss>http://chadsturtz.com/2010/04/friday-brown-bag-reducing-feedback-cycles/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Joda Time: Find the amount of time between two dates</title>
		<link>http://chadsturtz.com/2010/03/joda-time-find-the-amount-of-time-between-two-dates/</link>
		<comments>http://chadsturtz.com/2010/03/joda-time-find-the-amount-of-time-between-two-dates/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 21:37:30 +0000</pubDate>
		<dc:creator>Chad</dc:creator>
				<category><![CDATA[Groovy]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://chadsturtz.com/?p=75</guid>
		<description><![CDATA[A Joda Time example for finding the difference in time between two dates.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fchadsturtz.com%2F2010%2F03%2Fjoda-time-find-the-amount-of-time-between-two-dates%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fchadsturtz.com%2F2010%2F03%2Fjoda-time-find-the-amount-of-time-between-two-dates%2F" height="61" width="51" /></a></div><p><a href="http://today.java.net/pub/a/today/2008/09/18/jsr-310-new-java-date-time-api.html">Joda Time</a> is a Date/Time API proposed for Java SE 7.  Below, I have a Groovy script that uses the 1.6 Joda Time library to find the difference between two dates.</p>
<pre>
 import org.joda.time.*
    ...
 def i = new Interval(startDate.getTime(),endDate.getTime())
 def p = i.toPeriod()

 println "Time Difference: " + p.getSeconds() + "." + p.getMillis() + " Seconds"</pre>
<p><br/><br />
In addition to Seconds and Milliseconds, you can get the number of Days, Hours, Minutes, Months, Weeks, and Years.</p>
]]></content:encoded>
			<wfw:commentRss>http://chadsturtz.com/2010/03/joda-time-find-the-amount-of-time-between-two-dates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Basic MSI Project: Setup.exe Custom Command-Line Arguments</title>
		<link>http://chadsturtz.com/2010/02/basic-msi-project-setup-exe-custom-command-line-arguments/</link>
		<comments>http://chadsturtz.com/2010/02/basic-msi-project-setup-exe-custom-command-line-arguments/#comments</comments>
		<pubDate>Thu, 11 Feb 2010 19:28:18 +0000</pubDate>
		<dc:creator>Chad</dc:creator>
				<category><![CDATA[InstallShield]]></category>

		<guid isPermaLink="false">http://chadsturtz.com/?p=53</guid>
		<description><![CDATA[This one eluded me for way too long considering how straight-forward it is.  So, in an effort to help others who may have the same question, I thought I&#8217;d write it down..
Problem: For a Basic MSI Project in InstallShield 2009, I need to pass in 1 or more custom command-line arguments to use during installation/un-installation/etc.

Step [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fchadsturtz.com%2F2010%2F02%2Fbasic-msi-project-setup-exe-custom-command-line-arguments%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fchadsturtz.com%2F2010%2F02%2Fbasic-msi-project-setup-exe-custom-command-line-arguments%2F" height="61" width="51" /></a></div><p>This one eluded me for way too long considering how straight-forward it is.  So, in an effort to help others who may have the same question, I thought I&#8217;d write it down..</p>
<p><strong>Problem:</strong> For a Basic MSI Project in InstallShield 2009, I need to pass in 1 or more custom command-line arguments to use during installation/un-installation/etc.<br />
<br/><br/><br />
<h2><strong>Step 1 &#8211; Accessing your custom command-line arguments</strong></h2>
<p>First, accessing these values are as easy as accessing other variables in InstallShield.  All you need to do is use the format [MYARGUMENTNAME].  So, for example, if you want to use one of the arguments when invoking an executable from a custom action, it may look like this image below.  My custom action is invoking an executable called <strong>myapp.exe</strong> and I am accessing a custom command line argument named <strong>FILENAME</strong> to use as part of the invocation of my executable.</p>
<p><img class="size-full wp-image-54 alignnone" title="example1" src="http://chadsturtz.com/wp-content/uploads/2010/02/example1.PNG" alt="example1" width="786" height="405" /><br />
<br/><br/><br />
<h2><strong>Step 2 &#8211; Passing in your custom command-line arguments</strong></h2>
<p>It&#8217;s really this simple.. each argument needs to be preceeded by a /v and wrapped in quotes.  Continuing the example above, here is how I pass in my custom command line argument named FILENAME:</p>
<pre>     <em>setup.exe /v"FILENAME=\"myfile.txt\""
</em></pre>
<p><em> </em></p>
<p>This would result in my custom action invoking my executable as follows:   <em>myapp.exe -f myfile.txt</em></p>
<p>To be clear on multiple custom command-line arguments, the following example adds a second argument to my example above:</p>
<pre>     <em>setup.exe /v"FILENAME=\"myfile.txt\"" /vSECONDARGUMENT=\"value2\""
</em></pre>
<p><br/></p>
]]></content:encoded>
			<wfw:commentRss>http://chadsturtz.com/2010/02/basic-msi-project-setup-exe-custom-command-line-arguments/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My 10 Favorite Android Apps</title>
		<link>http://chadsturtz.com/2010/01/my-10-favorite-android-apps/</link>
		<comments>http://chadsturtz.com/2010/01/my-10-favorite-android-apps/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 14:55:08 +0000</pubDate>
		<dc:creator>Chad</dc:creator>
				<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://chadsturtz.com/?p=46</guid>
		<description><![CDATA[I&#8217;ve had my new phone for a week.. a Motorola Droid. Without including any games, here are my top 10 favorite apps so far.  I&#8217;m curious how this list will change over the coming months.
1. Google Maps Navigation &#8211; This is the free app from Google that transforms your phone into a mobile GPS Navigation unit.
2. Seesmic [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fchadsturtz.com%2F2010%2F01%2Fmy-10-favorite-android-apps%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fchadsturtz.com%2F2010%2F01%2Fmy-10-favorite-android-apps%2F" height="61" width="51" /></a></div><p>I&#8217;ve had my new phone for a week.. a Motorola Droid. Without including any games, here are my top 10 favorite apps so far.  I&#8217;m curious how this list will change over the coming months.</p>
<p>1. <strong>Google Maps Navigation</strong> &#8211; This is the free app from Google that transforms your phone into a mobile GPS Navigation unit.</p>
<p>2. <strong>Seesmic</strong> &#8211; Twitter client</p>
<p>3. <strong>GMail</strong> &#8211; Do i have to spell it out?</p>
<p>4. <strong>Pandora</strong> &#8211; Music, like last.fm, but much better.</p>
<p>5. <strong>Facebook</strong> for Android</p>
<p>6. <strong>Flashlight</strong> &#8211; I have the version that just turns your screen bright white.. not the version that uses the phone&#8217;s camera&#8217;s LED flash bulbs.</p>
<p>7. <strong>Calendar</strong> &#8211; Syncs to your Google calendar.</p>
<p>8. <strong>FourSquare</strong> &#8211; Location based social application, allowing you to &#8216;check-in&#8217; at venues.</p>
<p>9. <strong>WorldTour</strong> &#8211; Retrieves images to be used as your wallpaper from all over the world.  Can be set up to randomly change every 30 minutes, or choose a static site.</p>
<p>10. <strong>Yammer</strong> &#8211; A client for Yammer (much like Twitter except for internal corporate use).</p>
]]></content:encoded>
			<wfw:commentRss>http://chadsturtz.com/2010/01/my-10-favorite-android-apps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Replacing new with a Transparent Factory</title>
		<link>http://chadsturtz.com/2009/12/replacing-new-with-a-transparent-factory/</link>
		<comments>http://chadsturtz.com/2009/12/replacing-new-with-a-transparent-factory/#comments</comments>
		<pubDate>Tue, 22 Dec 2009 17:31:42 +0000</pubDate>
		<dc:creator>Chad</dc:creator>
				<category><![CDATA[Groovy]]></category>

		<guid isPermaLink="false">http://chadsturtz.com/?p=33</guid>
		<description><![CDATA[Overriding getAt and using a Transparent Factory to create the feeling of instantiation of an Interface or Abstract Class]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fchadsturtz.com%2F2009%2F12%2Freplacing-new-with-a-transparent-factory%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fchadsturtz.com%2F2009%2F12%2Freplacing-new-with-a-transparent-factory%2F" height="61" width="51" /></a></div><p>A little while back, I decided I would try and come up with some fun things to try and accomplish in Groovy and blog about them.  The primary goal being to learn more about the Groovy language.</p>
<p>The adventure I chose for this post was to somehow make the use of a Factory transparent by allowing what appeared to be the instantiation of an Interface or Abstract Class.  I looked for ways to override the new keyword so that when new was used with an Interface or Abstract Class, it would call a factory behind the scenes.  I figured out that I could not override the new keyword, but ended up finding <a href="http://groovyconsole.appspot.com/script/49002">this</a> example of overriding the getAt method as a way of constructing an object.  I thought this was very innovative and it be best to use this approach for the task at hand.</p>
<p>In this code segment, you can see I have an interface <em>Animal</em>, two implementations, <em>Dog</em> and <em>Cat</em>, along with a factory <em>AnimalFactory</em>.  Now, the factory here is not very useful.  It simply calls the first constructor of the Class passed in as a parameter to its only method, <em>create()</em>.  However, the focus in this post is how we can transparently use a factory, not the logic used by the factory itself.</p>
<pre>    interface Animal {
     def talk();
    }

    class Dog implements Animal {
     def talk() {"bark"}
    }

    class Cat implements Animal {
     def talk() {"meow"}
    }

    class AnimalFactory {
     static Object create(Class c) {
      c.getConstructors()[0].newInstance()
     }
    }</pre>
<p><br/><br />
This following segment is where the magic happens.  First, I&#8217;m creating a static method on all classes called <em>registerFactory()</em> that allows us to register a factory with an Interface or Abstract class.  The second thing i&#8217;m doing is what you saw in the example I linked to above by <a href="http://groovyconsole.appspot.com/author/Alex%20Tkachman">Alex Tkachman</a>, where we override the static getAt method, allowing us to use square brackets for object instantiation.</p>
<pre>    Class.metaClass.static.registerFactory = { clazz -&gt;
     delegate.metaClass.static.getClassFactory = { -&gt; clazz}
    }
    Class.metaClass.static.getAt = { c -&gt; delegate.classFactory.create(c)}</pre>
<p><br/><br />
Now, you can see an example of using the registerFactory() method and instantiating an object through the getAt method on an interface.</p>
<pre>    Animal.registerFactory(AnimalFactory)

    def c = Animal[Cat]
    c.talk()</pre>
<p><br/><br />
Finally, the output from this previous segment is shown below.</p>
<pre>    Result: meow</pre>
<p><br/><br />
I thought about taking this post even further and making the factory more useful by trying out some dynamic constructor invocation based on the arguments passed in through the square brackets, but I think I&#8217;ll save that for later.  For now, I hope you can see past my useless factory implementation.</p>
]]></content:encoded>
			<wfw:commentRss>http://chadsturtz.com/2009/12/replacing-new-with-a-transparent-factory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
