<?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>Philip Yurchuk &#187; Software</title>
	<atom:link href="http://philip.yurchuk.com/category/software/feed/" rel="self" type="application/rss+xml" />
	<link>http://philip.yurchuk.com</link>
	<description>Software Development Blog</description>
	<lastBuildDate>Wed, 25 Jan 2012 10:07:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>Merging XML Files With Groovy</title>
		<link>http://philip.yurchuk.com/2012/01/24/merging-xml-files-with-groovy-and-talend/</link>
		<comments>http://philip.yurchuk.com/2012/01/24/merging-xml-files-with-groovy-and-talend/#comments</comments>
		<pubDate>Wed, 25 Jan 2012 02:36:23 +0000</pubDate>
		<dc:creator>Philip Yurchuk</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[groovy]]></category>
		<category><![CDATA[talend]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://philip.yurchuk.com/?p=176</guid>
		<description><![CDATA[<p>I needed to generate an XML file from database tables and the plan was to use Talend Open Studio. Talend is an ETL tool that generates data integration jobs in Java. The community edition is free and I&#8217;d been using it for several other data tasks for an ecommerce client. Overall, I think it&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>I needed to generate an XML file from database tables and the plan was to use <a href="http://www.talend.com/download_form.php?cont=gen&#038;src=HomePage">Talend Open Studio</a>. Talend is an ETL tool that generates data integration jobs in Java. The community edition is free and I&#8217;d been using it for several other data tasks for an ecommerce client. Overall, I think it&#8217;s quicker than hand coding in Java, but you can still dip into Java code if you need to and embed the jobs in other programs.</p>
<p>Unfortunately, it&#8217;s not so good when it comes to generating moderately complex XML files. By moderately complex, I mean lists of lists like this:</p>
<pre class="wp-code-highlight prettyprint">
&lt;products&gt;
  &lt;product id=&quot;1&quot;&gt;
    &lt;categories&gt;
      &lt;category id=&quot;1&quot; /&gt;
      &lt;category id=&quot;2&quot; /&gt;
    &lt;/categories&gt;
    &lt;skus&gt;
      &lt;sku&gt;12345&lt;/sku&gt;
      &lt;sku&gt;67890&lt;/sku&gt;
    &lt;/skus&gt;
  &lt;/product&gt;
&lt;products&gt;
</pre>
<p>Talend can do this, it&#8217;s just obscenely slow for larger file sizes. By &#8220;larger&#8221; I mean a few MB. It appears this is due to their use of DOM4J instead a SAX parser. Why a few megs of XML data takes up so much memory I don&#8217;t know, but that&#8217;s the case.<sup><a href="http://philip.yurchuk.com/2012/01/24/merging-xml-files-with-groovy-and-talend/#footnote_0_176" id="identifier_0_176" class="footnote-link footnote-identifier-link" title="I note that loading an 8MB XML file has caused Chrome to use tons of memory and crash the tab, so there must be a complexity I&amp;#8217;m missing.">1</a></sup></p>
<p>Talend converts columnar data to XML, so you have to do it in two passes:</p>
<p>Products/Categories (category is the loop element):</p>
<pre class="wp-code-highlight prettyprint">
&lt;products&gt;
  &lt;product id=&quot;1&quot;&gt;
    &lt;categories&gt;
      &lt;category id=&quot;1&quot; /&gt;
      &lt;category id=&quot;2&quot; /&gt;
    &lt;/categories&gt;
  &lt;/product&gt;
&lt;products&gt;
</pre>
<p>Products/SKUs (sku is the loop element):</p>
<pre class="wp-code-highlight prettyprint">
&lt;products&gt;
  &lt;product id=&quot;1&quot;&gt;
    &lt;skus&gt;
      &lt;sku&gt;12345&lt;/sku&gt;
      &lt;sku&gt;67890&lt;/sku&gt;
    &lt;/skus&gt;
  &lt;/product&gt;
&lt;products&gt;
</pre>
<p>I noticed when when generating these files individually, Talend is really fast, around 1,000 rows/second on my machine.<sup><a href="http://philip.yurchuk.com/2012/01/24/merging-xml-files-with-groovy-and-talend/#footnote_1_176" id="identifier_1_176" class="footnote-link footnote-identifier-link" title="Core i7 quad 1.6, 6GB RAM, SSD.">2</a></sup> But when you instruct it to combine the files (really append the second file to the first, joining on the product ID), it slows down to about 1 row/sec for a 5,000 row job. Yes, 1,000 times slower. Again, it&#8217;s all due to the file size, as when I restricted it to 350 rows it ran at ~120 rows/s. The problem was that in production I need to process about 18K rows and it gets exponentially slower.</p>
<p>The solution is to generate two separate files, then merge them using a SAX parser. I&#8217;m just starting to use Groovy, which Talend supports, and was assuming it would be faster to develop in that language over Java. Well, if it didn&#8217;t require a ton of trial and error to overcome poor documentation, maybe it would have. Hopefully this heavily commented code makes it easier for the next guy.</p>
<pre class="wp-code-highlight prettyprint">package com.madeupname
package com.madeupname

import groovy.util.slurpersupport.GPathResult;
import groovy.xml.StreamingMarkupBuilder;

// If there is no match in the products/categories file, use this empty node
def emptyCategoriesXML = '''&lt;sites&gt;
&lt;categories&gt;
	&lt;category /&gt;
&lt;/categories&gt;
'''

// Uses a SAX parser, less memory and overhead than a DOM parser (XmlParser)
// parse() method returns a GPathResult, which allows you to traverse and
// manipulate  an XML file or snippet using dot (.) notation.
def xs = new XmlSlurper()
// Main products file with SKU list
def productsSKUs = xs.parse(new File('/Data/ProductSKU.xml'))
// Products file with list of categories
def productsCategories = xs.parse(new File('/Data/ProductCategory.xml'))
def emptyCategories = xs.parseText(emptyCategoriesXML)
// Output file
File output = new File('/Data/Products.xml')

// Store category nodes into a Map for fast retrieval later. Key is product ID.
HashMap&lt;String, GPathResult&gt; productsCategoriesMap = new HashMap&lt;String, GPathResult&gt;()
// Loop through all the products. Note that the roote category is products
// (plural), but the GPathResult you get from XmlSlurper assumes you're already
// in the root category. That's why it's not productsCategories.products.product.each
productsCategories.product.each {
	// Note you must put the id in a String (Groovy style shown here)
	// in order to have a String key.
	productsCategories[&quot;${it.@id}&quot;] = it
}

// This allows you to use a DSL to write the file. Note that you are not
// actually doing the work specified in the closure until you start writing it.
new StreamingMarkupBuilder().bind {
	// mkp is a special markup namespace for use within this closure. There
	// are other methods as well, see the docs.
	mkp.xmlDeclaration([&quot;version&quot;:&quot;1.0&quot;, &quot;encoding&quot;:&quot;UTF-16LE&quot;])
	// My root category
	products {
		// Loop through each product and append (insert) the categories
		// node to the product node with the same product id.
		productsSKUs.product.each {
			if (productsCategoriesMap[&quot;${it.@id}&quot;] != null) {
				it.appendNode(productsCategoriesMap[&quot;${it.@id}&quot;].sites)
			} else {
				it.appendNode(emptyCategories)
			}
			// Note this is not System.out, it merely ensures the
			// GPathResult is printed when written.
			out &lt;&lt; it
		}
	}
// Here we actually write the file, executing the above closure.
// Note how I specify the character set to match the declaration.
} .writeTo(output.newWriter(&quot;UTF-16LE&quot;))
</pre>
<p>To save you some time, here are the links to the relevant documentation:</p>
<p><a href="http://groovy.codehaus.org/api/groovy/util/XmlSlurper.html">http://groovy.codehaus.org/api/groovy/util/XmlSlurper.html</a><br />
<a href="http://groovy.codehaus.org/api/groovy/util/slurpersupport/GPathResult.html">http://groovy.codehaus.org/api/groovy/util/slurpersupport/GPathResult.html</a><br />
<a href="http://groovy.codehaus.org/gapi/groovy/xml/StreamingMarkupBuilder.html">http://groovy.codehaus.org/gapi/groovy/xml/StreamingMarkupBuilder.html</a><br />
<a href="http://groovy.codehaus.org/api/index.html?groovy/xml/MarkupBuilderHelper.html">http://groovy.codehaus.org/api/index.html?groovy/xml/MarkupBuilderHelper.html</a></p>
<p>Apologies for complaining about the docs, but I like Groovy and want to see adoption spread. To do that, it has to make the hard things easy. None the docs I read (above JavaDocs, all the XML walk throughs on the official site, and relevant chapters of <em>Programming Groovy</em>) went go beyond the basics of generating XML from scratch (and the JavaDocs are particularly lacking). Groovy could really benefit from a good cookbook site (maybe nowadays that&#8217;s Stack Overflow) and most of all, annotated API documentation like <a href="http://www.php.net/manual/en/">PHP has had for years</a>. I found those user contributed notes to be priceless when I was learning it. I think a wiki with comments would be a great home for the Groovy API reference docs.</p>
<ol class="footnotes"><li id="footnote_0_176" class="footnote">I note that loading an 8MB XML file has caused Chrome to use tons of memory and crash the tab, so there must be a complexity I&#8217;m missing.</li><li id="footnote_1_176" class="footnote">Core i7 quad 1.6, 6GB RAM, SSD.</li></ol>]]></content:encoded>
			<wfw:commentRss>http://philip.yurchuk.com/2012/01/24/merging-xml-files-with-groovy-and-talend/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Optimal JVM settings for STS</title>
		<link>http://philip.yurchuk.com/2011/08/15/optimal-jvm-settings-for-sts/</link>
		<comments>http://philip.yurchuk.com/2011/08/15/optimal-jvm-settings-for-sts/#comments</comments>
		<pubDate>Mon, 15 Aug 2011 08:23:40 +0000</pubDate>
		<dc:creator>Philip Yurchuk</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[jvm]]></category>
		<category><![CDATA[spring]]></category>
		<category><![CDATA[sts]]></category>

		<guid isPermaLink="false">http://philip.yurchuk.com/?p=146</guid>
		<description><![CDATA[<p>I recently switched from Eclipse 3.6 to STS 2.7.1 (based on Eclipse 3.7). Ditching my old .project and workspace settings files along with the move has made for a smoother experience; it seems these files get corrupted over time,1 and I&#8217;m too lazy to do the research to fix them. However, the upgrade resulted [...]]]></description>
			<content:encoded><![CDATA[<p>I recently switched from Eclipse 3.6 to STS 2.7.1 (based on Eclipse 3.7). Ditching my old .project and workspace settings files along with the move has made for a smoother experience; it seems these files get corrupted over time,<sup><a href="http://philip.yurchuk.com/2011/08/15/optimal-jvm-settings-for-sts/#footnote_0_146" id="identifier_0_146" class="footnote-link footnote-identifier-link" title="I&amp;#8217;ve had issues with things like web deployment assemblies, not prompting for workspace on startup, etc.">1</a></sup> and I&#8217;m too lazy to do the research to fix them. However, the upgrade resulted in performance issues. For instance, it hung for ~10 seconds every time I saved web.xml, and there were various random pauses. It&#8217;s not the hardware: I&#8217;m on a Core i7 Quad with 6GB RAM running  Win7 x64. I realize you are getting more tooling with STS, but performance was much worse than I experienced with 3.6.</p>
<p>Well, it had slipped my mind that I had updated my 3.6 eclipse.ini settings with those I had found in an excellent <a href="http://stackoverflow.com/questions/142357/what-are-the-best-jvm-settings-for-eclipse/3275659#3275659">Stack Overflow answer</a> from VonC on optimal JVM settings for Eclipse. It hasn&#8217;t been updated for 3.7 (nor does it mention STS), but after some experimenting and research it appears to work well for it. Here are my settings, and below I add some commentary on what they do, which is missing from the original answer (although I still suggest you read that, as it covers other situations/issues that may affect you). Keep in mind I&#8217;m not a JVM tuning expert, YMMV, etc. Here are the contents of my sts.ini:</p>
<blockquote><p>-vm<br />
C:/Java/SDKs/jdk1.6.0_24x64/bin/javaw.exe<br />
-startup<br />
plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar<br />
&#8211;launcher.library<br />
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.100.v20110502<br />
-product<br />
com.springsource.sts.ide<br />
&#8211;launcher.defaultAction<br />
openFile<br />
&#8211;launcher.XXMaxPermSize<br />
384M<br />
-vmargs<br />
-Dosgi.requiredJavaVersion=1.6<br />
-Xmn128m<br />
-Xms256m<br />
-Xmx768m<br />
-Xss4m<br />
-XX:PermSize=128m<br />
-XX:MaxPermSize=384m<br />
-XX:CompileThreshold=1000<br />
-XX:+CMSIncrementalPacing<br />
-XX:+UnlockExperimentalVMOptions<br />
-XX:+UseG1GC<br />
-XX:+UseFastAccessorMethods</p></blockquote>
<p><strong>-XX:CompileThreshold=1000</strong><br />
This is the number of method invocations/branches before  compiling. This is normally set to 10,000, so we&#8217;re changing it dramatically, but the original suggestion was leading to errors so I raised it. You will notice on startup that it takes longer, and your CPU usage jumps. However, your performance after that is much better. Those 10s save times for web.xml? Gone after this. I&#8217;m willing to take a hit at the beginning for better productivity while coding.</p>
<p><strong>-XX:ReservedCodeCacheSize=64m</strong><br />
Related to the above, I was getting the error &#8220;Unhandled event loop exception / out of space  in CodeCache for adapters&#8221; due to setting the compile threshold to 5. This is another solution to that problem, and may be redundant.</p>
<p><strong>-Xss4m</strong><br />
This is stack size, and was previously set to 1MB, now up to 4MB per thread. Doing this will increase the overall memory used.</p>
<p><strong>-XX:+UnlockExperimentalVMOptions<br />
-XX:+UseG1GC<br />
-XX:+UseFastAccessorMethods</strong><br />
These enable parallel garbage collection. I saw my CPU utilization reach 100% after this, which is rare on a Core i7 Quad. It felt like I was finally using it to its potential.</p>
<p>Again, I&#8217;m not an expert. I&#8217;ve found it&#8217;s more sluggish at first, but response times quickly improve. For me, it&#8217;s a clear net gain. Not documented are the things I turned off in preferences because I wasn&#8217;t using them (Maven is disconnected, etc.). Visit Windows &gt;&gt; Preferences and filter on startup, see if there&#8217;s anything you can get rid of. Finally, I must give credit to my sources outside the original article:</p>
<p><a href="http://ugosan.org/speeding-up-eclipse-a-bit-with-unlockexperimentalvmoptions/">http://ugosan.org/speeding-up-eclipse-a-bit-with-unlockexperimentalvmoptions/</a><br />
<a href="http://www.oracle.com/technetwork/java/gc-tuning-5-138395.html"></a></p>
<p><a href="http://www.oracle.com/technetwork/java/gc-tuning-5-138395.html">http://www.oracle.com/technetwork/java/gc-tuning-5-138395.html</a><br />
<a href="http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html"></a></p>
<p><a href="http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html">http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html</a><br />
<a href="http://performance.netbeans.org/howto/jvmswitches/"></a></p>
<p><a href="http://performance.netbeans.org/howto/jvmswitches/">http://performance.netbeans.org/howto/jvmswitches/</a></p>
<ol class="footnotes"><li id="footnote_0_146" class="footnote">I&#8217;ve had issues with things like web deployment assemblies, not prompting for workspace on startup, etc.</li></ol>]]></content:encoded>
			<wfw:commentRss>http://philip.yurchuk.com/2011/08/15/optimal-jvm-settings-for-sts/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>CC3260MT.DLL Is TiVo</title>
		<link>http://philip.yurchuk.com/2011/01/17/cc3260mt-dll-is-tivo/</link>
		<comments>http://philip.yurchuk.com/2011/01/17/cc3260mt-dll-is-tivo/#comments</comments>
		<pubDate>Tue, 18 Jan 2011 02:49:45 +0000</pubDate>
		<dc:creator>Philip Yurchuk</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[spyware]]></category>

		<guid isPermaLink="false">http://philip.yurchuk.com/?p=98</guid>
		<description><![CDATA[<p>I was trying to launch a Tomcat instance in Eclipse and it complained that port 8080 was in use. This scared me, since to my knowledge nothing else used that port. Was it spyware? I visited http://localhost:8080 and saw:</p> <p>Access violation at address 32658D8F in module 'CC3260MT.DLL'. Read of address 00000000</p> <p>No, it&#8217;s not [...]]]></description>
			<content:encoded><![CDATA[<p>I was trying to launch a Tomcat instance in Eclipse and it complained that port 8080 was in use. This scared me, since to my knowledge nothing else used that port. Was it spyware? I visited http://localhost:8080 and saw:</p>
<p><code>Access violation at address 32658D8F in module 'CC3260MT.DLL'. Read of address 00000000</code></p>
<p>No, it&#8217;s not spyware, it&#8217;s TiVo. Specifically the TiVo desktop server (Bonjour, I believe it&#8217;s called.). Pulling up the interface and pausing the server frees up the port. Shame on TiVo for using a very popular port for developers, but I guess we can change the port in Eclipse/Tomcat/Jetty if we need to. Now back to work&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://philip.yurchuk.com/2011/01/17/cc3260mt-dll-is-tivo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Revert A File with WinCVS</title>
		<link>http://philip.yurchuk.com/2010/10/29/revert-a-file-with-wincvs/</link>
		<comments>http://philip.yurchuk.com/2010/10/29/revert-a-file-with-wincvs/#comments</comments>
		<pubDate>Fri, 29 Oct 2010 23:30:46 +0000</pubDate>
		<dc:creator>Philip Yurchuk</dc:creator>
				<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://philip.yurchuk.com/?p=82</guid>
		<description><![CDATA[<p>For some reason, searching for &#8220;wincvs revert&#8221; in Google doesn&#8217;t immediately show http://cvsgui.sourceforge.net/newfaq.htm#reversion, which it absolutely should. It explains what you have to do, but to make it extra clear here is a screen grab:</p> <p></p> <p>You can replace HEAD with another version like 1.12.</p> <p>BTW, if you&#8217;re on Windows and using Eclipse, WinCVS [...]]]></description>
			<content:encoded><![CDATA[<p>For some reason, searching for &#8220;wincvs revert&#8221; in Google doesn&#8217;t immediately show <a href="http://cvsgui.sourceforge.net/newfaq.htm#reversion">http://cvsgui.sourceforge.net/newfaq.htm#reversion</a>, which it absolutely should. It explains what you have to do, but to make it extra clear here is a screen grab:</p>
<p><a href="http://philip.yurchuk.com/wp-content/uploads/2010/10/wincvs-revert.png"><img class="alignnone size-full wp-image-83" title="wincvs-revert" src="http://philip.yurchuk.com/wp-content/uploads/2010/10/wincvs-revert.png" alt="" width="462" height="383" /></a></p>
<p>You can replace HEAD with another version like 1.12.</p>
<p>BTW, if you&#8217;re on Windows and using Eclipse, WinCVS is a great support tool for Eclipse&#8217;s broken CVS support.<sup><a href="http://philip.yurchuk.com/2010/10/29/revert-a-file-with-wincvs/#footnote_0_82" id="identifier_0_82" class="footnote-link footnote-identifier-link" title="It uses CVSNT so it&amp;#8217;s compatible with Eclipse&amp;#8217;s working directories; using Cygwin&amp;#8217;s CVS can cause problems as it&amp;#8217;s not really compatible with CVSNT. ">1</a></sup> I can get history/logs for files and revert to previous versions. Eclipse remote history has been broken for me through several upgrades/reinstalls and will only revert to a tag, not a specified file version.<sup><a href="http://philip.yurchuk.com/2010/10/29/revert-a-file-with-wincvs/#footnote_1_82" id="identifier_1_82" class="footnote-link footnote-identifier-link" title="I assume that would work if remote history worked, though.">2</a></sup></p>
<p>The only real issue I have with WinCVS is that its help system doesn&#8217;t provide any. Expect things like &#8220;Merge options dialog allows the user to change the merge options.&#8221; Still, I&#8217;m grateful for the effort and can&#8217;t complain about the price.</p>
<ol class="footnotes"><li id="footnote_0_82" class="footnote">It uses CVSNT so it&#8217;s compatible with Eclipse&#8217;s working directories; using Cygwin&#8217;s CVS can cause problems as it&#8217;s not really compatible with CVSNT. </li><li id="footnote_1_82" class="footnote">I assume that would work if remote history worked, though.</li></ol>]]></content:encoded>
			<wfw:commentRss>http://philip.yurchuk.com/2010/10/29/revert-a-file-with-wincvs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why You Should Keep Your Launch Dates Secret</title>
		<link>http://philip.yurchuk.com/2009/09/13/why-apple-keeps-its-launch-dates-secret/</link>
		<comments>http://philip.yurchuk.com/2009/09/13/why-apple-keeps-its-launch-dates-secret/#comments</comments>
		<pubDate>Sun, 13 Sep 2009 07:31:26 +0000</pubDate>
		<dc:creator>Philip Yurchuk</dc:creator>
				<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://philip.yurchuk.com/?p=62</guid>
		<description><![CDATA[<p>It occurred to me that by keeping launch dates secret, Apple never appears to suck at software estimation. Microsoft gives a date, sails right past it, and everyone is up in arms about it.</p> <p>A better question is why doesn&#8217;t MS keep things secret? Or all software companies, for that matter? I know with [...]]]></description>
			<content:encoded><![CDATA[<p>It occurred to me that by keeping launch dates secret, Apple never appears to suck at software estimation. Microsoft gives a date, sails right past it, and everyone is up in arms about it.</p>
<p>A better question is why doesn&#8217;t MS keep things secret? Or all software companies, for that matter? I know with sales, everyone wants to know when the next version is out so they can hold off on buying the current one. Or the sales person tries to keep you from buying their competitor&#8217;s product because their next version will be much better. But everyone knows there&#8217;s no guarantee of that happening, and there&#8217;s a potential opportunity cost in waiting. And since the estimates that drive the schedule were done by the wrong people at the wrong time, without being updated,<sup><a href="http://philip.yurchuk.com/2009/09/13/why-apple-keeps-its-launch-dates-secret/#footnote_0_62" id="identifier_0_62" class="footnote-link footnote-identifier-link" title="See the Estimation section of Facts and Fallacies of Software Engineering.">1</a></sup> you&#8217;ll probably be waiting longer than they claim.</p>
<p>I think the best policy would be to launch whenever it&#8217;s ready, and everyone who purchased within the last 60 days &#8211; or better yet, has a support contract &#8211; gets the new version for free.</p>
<p>Of course, this only applies to software. For hardware, you&#8217;re forced to apply common sense: do I need this right now? Does it do what need at a fair price? Or you can visit http://buyersguide.macrumors.com/ and hope they&#8217;re right. </p>
<ol class="footnotes"><li id="footnote_0_62" class="footnote">See the Estimation section of <a href="http://www.amazon.com/gp/product/0321117425?ie=UTF8&amp;tag=thcrte-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0321117425"><em>Facts and Fallacies of Software Engineering</em></a>.</li></ol>]]></content:encoded>
			<wfw:commentRss>http://philip.yurchuk.com/2009/09/13/why-apple-keeps-its-launch-dates-secret/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Deleting (undeletable) Tasks In Eclipse</title>
		<link>http://philip.yurchuk.com/2009/07/11/deleting-undeletable-tasks-in-eclipse/</link>
		<comments>http://philip.yurchuk.com/2009/07/11/deleting-undeletable-tasks-in-eclipse/#comments</comments>
		<pubDate>Sat, 11 Jul 2009 11:27:03 +0000</pubDate>
		<dc:creator>Philip Yurchuk</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[eclipse]]></category>

		<guid isPermaLink="false">http://philip.yurchuk.com/?p=41</guid>
		<description><![CDATA[<p>I recently had some more frustration with Eclipse, with no solution on the web, so I&#8217;m posting mine.</p> <p>The problem:</p> <p>I had an auto-generated task (TODO) from creating a class that implemented an interface. At some point, I noticed the task comment was gone, but the task indicator (checkbox icon) was still there. Probably [...]]]></description>
			<content:encoded><![CDATA[<p>I recently had some more frustration with Eclipse, with no solution on the web, so I&#8217;m posting mine.</p>
<p><strong>The problem</strong>:</p>
<p>I had an auto-generated task (TODO) from creating a class that implemented an interface. At some point, I noticed the task comment was gone, but the task indicator (checkbox icon) was still there. Probably because I have it set to reformat on save, but maybe I deleted the task comment without hitting the task button (or both). Anyway, I could not clear it no matter what:</p>
<ul>
<li>Double clicking the icon didn&#8217;t work since it couldn&#8217;t find the comment.</li>
<li>Clicking the &#8220;Clean and Redetect Tasks&#8221; button did nothing.</li>
<li>Restarting Eclipse (which I do more often than a Windows admin reboots), did naught.</li>
<li>The Task View displayed the offending tasks, but the Delete option was greyed out. Selecting the task and hitting delete 3 million times while cursing furiously at the screen brought no justice.</li>
</ul>
<p><strong>The solution</strong>:</p>
<ol>
<li>Go to Window &gt;&gt; Preferences, then Java/Compiler/Task Tags. Select the TODO task tag, or whatever accursed tag haunts you.</li>
<li>Click Remove. When it threatens a rebuild, call it&#8217;s bluff (that is, agree). When it&#8217;s done (and it took its sweet time), the offending tasks will be gone. Rejoice!</li>
<li>Click New&#8230; and restore the TODO tag. All legitimate TODO tasks will be restored.  <a title="Jabberwocky" href="http://en.wikipedia.org/wiki/Jabberwocky">Callooh! Callay!</a></li>
</ol>
<p>keywords: can&#8217;t delete tasks, task tags, eclipse 3.4, mylyn </p>
]]></content:encoded>
			<wfw:commentRss>http://philip.yurchuk.com/2009/07/11/deleting-undeletable-tasks-in-eclipse/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>A Tivo Wishlist For Those Without Tivo</title>
		<link>http://philip.yurchuk.com/2009/05/05/a-tivo-wishlist-for-those-without-tivo/</link>
		<comments>http://philip.yurchuk.com/2009/05/05/a-tivo-wishlist-for-those-without-tivo/#comments</comments>
		<pubDate>Wed, 06 May 2009 00:10:42 +0000</pubDate>
		<dc:creator>Philip Yurchuk</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[ideas]]></category>
		<category><![CDATA[usability]]></category>

		<guid isPermaLink="false">http://philip.yurchuk.com/?p=36</guid>
		<description><![CDATA[<p>I had this idea and considered creating it as a service, but I&#8217;ve got my own web startup going and don&#8217;t need the distraction. Several sites, such as Zap2it, TV Guide, and TitanTV (beta) already have the infrastructure (as well as the TV listings I&#8217;d have to license) so hopefully this won&#8217;t be too [...]]]></description>
			<content:encoded><![CDATA[<p>I had this idea and considered creating it as a service, but I&#8217;ve got my own web startup going and don&#8217;t need the distraction. Several sites, such as <a href="http://Zap2it.com">Zap2it</a>, <a href="http://tvguide.com/listings">TV Guide</a>, and <a href="http://beta.titantv.com">TitanTV</a> (beta) already have the infrastructure (as well as the TV listings I&#8217;d have to license) so hopefully this won&#8217;t be too hard for one of them to implement.</p>
<p>I&#8217;m looking for a clone of the <a href="http://www.tivo.com/mytivo/howto/getthemostoutoftv/howto_create_wishlist_search.html">Tivo Wishlist</a>. The difference is that instead of recording, you get email alerts. I imagine if you have a DVR/PVR that is internet programmable, the service could take advantage of that, but I&#8217;ve got my cable company&#8217;s DVR (Scientific Atlanta) like most people and must program it with the remote. So this provides a wishlist feature for everyone without a Tivo, which I think is compelling.</p>
<p>The search features of current TV listings sites are missing critical fields for a wishlist to work (not to mention the email reminder part). Filtering (both inclusive and exclusive) by genre and channel are required.</p>
<p>Here are a couple strong (IMHO) use cases:</p>
<ul>
<li>You want to be notified if anyone on a list of people is scheduled to be on a talk show. You enter description:&#8221;Quentin Tarantino, Kevin Smith, Judd Apatow&#8221; and genre: talk and every time any of them appear on a talk show you&#8217;re notified. If Tarantino&#8217;s <em>Reservoir Dogs </em>is played on HBO, nothing happens.</li>
<li>You&#8217;re planning a vacation and you want to record travel shows about various places. You enter keywords:&#8221;Prague,Tokyo,Paris&#8221; and interest:travel (or perhaps channels:travel,discovery,tlc,pbs) and you get notified for any travel shows relevant to you.</li>
</ul>
<p>Of course, the above would be done via a nice GUI/query builder.</p>
<p>When you get your email, there would be links to hide/exclude shows in the future, which is useful for anything that gets rerun frequently (especially basic cable shows).</p>
<p>You can monetize this through targeted ads, since the user is telling you what he/she wants.</p>
<p>Another service would be to send a post-mortem email that includes links to the shows you want on Hulu, YouTube, the network&#8217;s website, etc. after they&#8217;ve been uploaded.Â  At that point you&#8217;re much closer to a real Tivo service and could possibly charge for it. Possibly.</p>
<p>I should point out that <a href="http://http://www3.tivo.com/tivo-tco/search/advanced/show.do">Tivo&#8217;s own advanced search</a> is great and includes categories (and subs) and is open to the public.</p>
<p>And if you are only interested in the talk show part, you can set a calendar reminder to check the <a href="http://www.interbridge.com/lineups.html">talk show lineups page</a> once a week. However, I&#8217;d much rather have something automated that allows me to set it and forget it.Â  I could probably whip up a script to parse that page and run it as a service/cron job to notify me when there&#8217;s a match, but still, it would only work for talk shows. And parsing poorly formed HTML is a pain.</p>
<p>No, the easiest solution is to convince someone else to implement it for me <img src='http://philip.yurchuk.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>Update: If you want to see Yahoo TV implement this, <a title="Actor/Keyword wishlist" href="http://suggestions.yahoo.com/detail/?prop=tv&amp;fid=143805">upvote it here</a>.</strong> </p>
]]></content:encoded>
			<wfw:commentRss>http://philip.yurchuk.com/2009/05/05/a-tivo-wishlist-for-those-without-tivo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Should Apple Buy Sun?</title>
		<link>http://philip.yurchuk.com/2009/03/27/should-apple-buy-sun/</link>
		<comments>http://philip.yurchuk.com/2009/03/27/should-apple-buy-sun/#comments</comments>
		<pubDate>Fri, 27 Mar 2009 08:17:05 +0000</pubDate>
		<dc:creator>Philip Yurchuk</dc:creator>
				<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://philip.yurchuk.com/?p=34</guid>
		<description><![CDATA[<p>That question was posed on the LAJUG mailing list in a response to a rumor about IBM buying Sun. I think it&#8217;s clear that Apple doesn&#8217;t really want to get into enterprise computing. Their entry, the OS X Server, at that price point, shows they are not serious about it.</p> <p>This may sound ridiculous, [...]]]></description>
			<content:encoded><![CDATA[<p>That question was posed on the LAJUG mailing list in a response to a rumor about IBM buying Sun. I think it&#8217;s clear that Apple doesn&#8217;t really want to get into enterprise computing. Their entry, the OS X Server, at that price point, shows they are not serious about it.</p>
<p>This may sound ridiculous, but I believe Apple doesn&#8217;t think enterprise computing is a <strong>cool </strong>enough market to enter. They really seem to love being in the spotlight with consumer products. And the fact that the art and entertainment industries use their stuff. It&#8217;s glamorous and I don&#8217;t blame them for it.</p>
<p>Because of all that, acquiring Sun, or even merging with them, doesn&#8217;t make strategic sense. The only major synergy would be Apple&#8217;s GUI and integration from their server OS added to Solaris. Sun would lose training income driven by an OS that&#8217;s unwieldy to manage, but they could charge for it as a product. It would certainly save their customers money on admin labor costs. However, they could probably license that from Apple and avoid a fruitless merger.</p>
<p>In addition, Sun is a bigger pill to swallow than most realize. IBM is much better suited for them. And despite heavy list traffic on the subject, I haven&#8217;t heard anyone voice their opposition to the idea. </p>
]]></content:encoded>
			<wfw:commentRss>http://philip.yurchuk.com/2009/03/27/should-apple-buy-sun/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I Want a Java Example Project Directory</title>
		<link>http://philip.yurchuk.com/2009/02/27/i-want-a-java-example-project-directory/</link>
		<comments>http://philip.yurchuk.com/2009/02/27/i-want-a-java-example-project-directory/#comments</comments>
		<pubDate>Fri, 27 Feb 2009 09:55:11 +0000</pubDate>
		<dc:creator>Philip Yurchuk</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[integration]]></category>

		<guid isPermaLink="false">http://philip.yurchuk.com/?p=30</guid>
		<description><![CDATA[<p>I&#8217;m starting a new project with some new (to me) technologies and finding the start up process &#8211; setting up my IDE and build script to play nice together &#8211; to be somewhat frustrating. I kept thinking to myself, &#8220;Somebody already solved this; wouldn&#8217;t it be great if I could grab their project and [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m starting a new project with some new (to me) technologies and finding the start up process &#8211; setting up my IDE and build script to play nice together &#8211; to be somewhat frustrating. I kept thinking to myself, &#8220;Somebody already solved this; wouldn&#8217;t it be great if I could grab their project and just start coding?&#8221;</p>
<p>My idea is for a directory of Java example projects.<sup><a href="http://philip.yurchuk.com/2009/02/27/i-want-a-java-example-project-directory/#footnote_0_30" id="identifier_0_30" class="footnote-link footnote-identifier-link" title="You don&amp;#8217;t need to host the projects themselves when there are already sites like code.google.com and Source Forge.">1</a></sup> It would make it easy to search projects by stack: IDE, tools, frameworks, libraries, and app server. Projects would include the minimum to show the integration points. The directory would also have basic social features: a way to vote up projects and a forum for discussing integration, setup, and architecture best practices. This is probably something a CMS expert could tackle fairly easily.</p>
<p>I admit there are a few problems with this idea. People expect to thrash around during project startup. They learn from it. When it&#8217;s over, they start doing real work. They probably don&#8217;t want to share their lessons learned. Those that do are typically evangelists for a particular framework. Spring, as an integration framework, comes to mind with its Pet Clinic and Pet Store examples. Hibernate&#8217;s Caveat Emptor is probably the best example app I&#8217;ve seen. AppFuse also demonstrates integration, although earlier versions seemed more explicit (the new version built with Maven seems to hide a lot of the details).</p>
<p>However, these apps don&#8217;t cover IDE configuration, and the IDE/build tool mismatch problem is where most of the difficulty lies. The most important IDE features, IMHO, are incremental building for syntax checking, and debugging. So you have this natural duplication of effort. The IDE/build script conversion tools (in either direction) seem narrow in scope; granted, I&#8217;m limiting myself to Eclipse/Flex Builder to/from Ant. I don&#8217;t know if full integration between the IDE and the build tool is the answer, but it would certainly go a long way in making things easier.</p>
<p>In the meantime, however, a project directory would be a welcome resource. </p>
<ol class="footnotes"><li id="footnote_0_30" class="footnote">You don&#8217;t need to host the projects themselves when there are already sites like code.google.com and Source Forge.</li></ol>]]></content:encoded>
			<wfw:commentRss>http://philip.yurchuk.com/2009/02/27/i-want-a-java-example-project-directory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>When Do You Stop Adding Unit Tests?</title>
		<link>http://philip.yurchuk.com/2009/02/07/when-do-you-stop-adding-unit-tests/</link>
		<comments>http://philip.yurchuk.com/2009/02/07/when-do-you-stop-adding-unit-tests/#comments</comments>
		<pubDate>Sat, 07 Feb 2009 12:20:03 +0000</pubDate>
		<dc:creator>Philip Yurchuk</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[unit testing]]></category>

		<guid isPermaLink="false">http://philip.yurchuk.com/?p=28</guid>
		<description><![CDATA[<p>Joel Spolsky recently posted a transcript of a conversation he and Jeff Atwood had on the Stack Overflow podcast.  It&#8217;s a nice reminder to think about the situations where unit tests add value and where they add maintenance hassle.</p> <p>The takeaway was that there are a few places where code coverage makes a lot [...]]]></description>
			<content:encoded><![CDATA[<p>Joel Spolsky recently posted a <a title="Stack Overflow podcast transcript" href=" http://www.joelonsoftware.com/items/2009/01/31.html">transcript of a conversation</a> he and Jeff Atwood had on the Stack Overflow podcast.  It&#8217;s a nice reminder to think about the situations where unit tests add value and where they add maintenance hassle.</p>
<p>The takeaway was that there are a few places where code coverage makes a lot of sense because change is rare and breakage has a big negative impact. These include APIs, especially plugin architectures where others are depending on the contract of your code, and mature business logic that should rarely change. You really want to think about the number of people or LOC that are depending on that code to work.</p>
<p>In contrast, there are a lot <strong>more </strong>places where you&#8217;re slowing down your coders and their ability to respond to customer needs.</p>
<p>Another contradiction Spolsky suggests: many of the same agile programmers who espouse <a href="http://en.wikipedia.org/wiki/YAGNI">YAGNI</a> require an arbitrary percentage for code coverage (often close to 100%). Shouldn&#8217;t YAGNI also apply to unit tests?</p>
<p>I believe the key is simply thinking about what you&#8217;re doing. Here are some guidelines:</p>
<ul>
<li>If it&#8217;s foundation code (frameworks, libraries, etc. &#8211; anything that gets called a lot) write the tests.</li>
<li>If you&#8217;re about to refactor the code, write the tests.</li>
<li>Even if you&#8217;re not going to write the test, channel the spirit of Test First Development &#8211; design the code so that it&#8217;s easy to unit test should you have to later on.</li>
</ul>
<p>I realize this might sound obvious, but a) not everyone agrees with this, and b) sometimes you can lose sight of what&#8217;s &#8220;obvious&#8221; when others are persuasively defending blind adherence to &#8220;principles&#8221;.</p>
]]></content:encoded>
			<wfw:commentRss>http://philip.yurchuk.com/2009/02/07/when-do-you-stop-adding-unit-tests/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

