<?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</title>
	<atom:link href="http://philip.yurchuk.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://philip.yurchuk.com</link>
	<description>Software Development Blog</description>
	<lastBuildDate>Sat, 18 Feb 2012 04:04:35 +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 person.</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;()
// Note: if you're using Talend, you can't statically type this and must use this:
// def productsCategoriesMap = new HashMap&lt;String, GPathResult&gt;()
// Loop through all the products. Note that the root 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.
	productsCategoriesMap[&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>For Talend users, I had to use tGroovyFile instead of tGroovy because it was complaining about a missing library.<sup><a href="http://philip.yurchuk.com/2012/01/24/merging-xml-files-with-groovy-and-talend/#footnote_2_176" id="identifier_2_176" class="footnote-link footnote-identifier-link" title="Yes, I tried adding tLibraryLoad, but it didn&amp;#8217;t help and I got no response on the forums.">3</a></sup> You&#8217;ll also want to change the hard coded file paths to use context variables. </p>
<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><li id="footnote_2_176" class="footnote">Yes, I tried adding tLibraryLoad, but it didn&#8217;t help and I got no response on the forums.</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>The Paperless Business Card</title>
		<link>http://philip.yurchuk.com/2011/10/03/the-paperless-business-card/</link>
		<comments>http://philip.yurchuk.com/2011/10/03/the-paperless-business-card/#comments</comments>
		<pubDate>Tue, 04 Oct 2011 06:42:23 +0000</pubDate>
		<dc:creator>Philip Yurchuk</dc:creator>
				<category><![CDATA[Marketing]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[branding]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[qr]]></category>

		<guid isPermaLink="false">http://philip.yurchuk.com/?p=158</guid>
		<description><![CDATA[<p>I have come up with a simple idea that will have a positive, global environmental impact. I&#8217;m talking about the end of the business card as we know it. Have you ever had a box of 500, maybe 1,000 business cards, handed out a few, then thrown the rest away when your title or [...]]]></description>
			<content:encoded><![CDATA[<p>I have come up with a simple idea that will have a <strong>positive, global environmental impact.</strong> I&#8217;m talking about the <strong>end of the business card</strong> as we know it. Have you ever had a box of 500, maybe 1,000 business cards, handed out a few, then thrown the rest away when your title or contact info changed? Maybe you&#8217;ve done that a few times, or several. How much did that cost you? How did it impact the environment? How did you feel when you threw them away? What if no one ever did that again? Here&#8217;s a story about how we can make that happen.</p>
<p>A good friend of mine was asking for advice about business cards. He was going to be traveling in Europe for 6 weeks, meeting a ton of people, and wanted something that would stand out, something creative and memorable. But he also didn&#8217;t have a lot of time. My answer was simple. First, when you&#8217;re traveling for an extended period of time, hitting a lot of locations, you want to keep it light. The last thing you need is to lug around is a box of business cards.</p>
<p>My advice was to create a single, sturdy business card that simply had a QR code on it. People would scan it with their phones and you&#8217;d take it back. It&#8217;s both memorable and green, which I think a lot of Europeans would respond positively to. Especially the, ahem, female Europeans whose acquaintance he wanted to make. Moreover, <strong>it goes right into their contacts</strong>, saving them the trouble of transferring it, which won&#8217;t happen if it gets lost (even at the bottom of a purse).</p>
<p>Then another thought hit me &#8211; why do you need the card? You can have it as an image on your phone! Their phone photographs your phone and you&#8217;re done. To test this out, I went to an online QR code generator, capable of making a vCard/meCard. I took out my relatively new HTC Evo 4G and photographed the screen.</p>
<p>Nothing happened.</p>
<p>Turns out, even though Japanese cell phones have had built-in QR code readers for several years,<sup><a href="http://philip.yurchuk.com/2011/10/03/the-paperless-business-card/#footnote_0_158" id="identifier_0_158" class="footnote-link footnote-identifier-link" title="This article, published in 2004, stated that 60% of all mobile phones came with QR code readers: http://www.hypulp.com/entries/more_qr_codes.php">1</a></sup> Google and Apple still want you to download a separate barcode reader app for this.<sup><a href="http://philip.yurchuk.com/2011/10/03/the-paperless-business-card/#footnote_1_158" id="identifier_1_158" class="footnote-link footnote-identifier-link" title="Some carriers provide this. A friend of mine has a Windows Phone 7 device and AT&amp;amp;T bundled a barcode reader with it.">2</a></sup> I&#8217;ve been seeing these codes all over the place: business cards, movie posters, real estate signs. I&#8217;m sure you have as well, although maybe you didn&#8217;t notice them or know what they were called. I was quite surprised to learn that they all rely on a 3rd party app.</p>
<p>All you need to read a QR code is a camera and bit of processing power. There are several free readers for iPhone, Android, Blackberry, Windows Phone 7, Palm OS, and probably several others. You can create several images representing each virtual business card you want to share: work, personal, work + personal, etc.. You can store them in a folder in your photo gallery app, or use it as your phone&#8217;s background image so it can be viewed and captured without even unlocking the phone.</p>
<p><strong>Breaking Down The Branding Defense</strong><br />
I know, many people use business cards as part of their branding. My brother <a href="http://david.yurchuk.com">David</a> is a talented graphic designer who has done this for many clients. But as I sort through a stack of about 30 collected business cards, very few people are doing this. What I&#8217;m seeing:</p>
<ul>
<li>1/3 are nice. Here I include the traditional Fortune 500 business cards. Those have good layout, fonts, print and paper quality, and enforce the brand message (solid, traditional), but don&#8217;t differentiate them. Maybe 2 or 3 actually looked kinda cool, but none blew me away.</li>
<li>1/3 are meh. They don&#8217;t look like they were created by experienced designers, more like professional amateurs. Or, as is often the case, the client&#8217;s choice overruled the designer&#8217;s.</li>
<li>1/3 are just bad. Cheap paper and printing, ugly design. These actually hurt the person who hands them out.</li>
</ul>
<p>While it&#8217;s a small sample size, it feels about right. Most people think their card helps them, but most people are wrong. The best defense for paper business cards is that your potential clients are primarily dumbphone owners. For most professionals, that&#8217;s a pretty small group. If you take down their info instead of giving yours, you gain a measure of control over the transaction. If that&#8217;s not feasible, you can ask your designer about small batch printing and eco-friendly materials.</p>
<p>In contrast, what does the paperless business card say about you or your company? At a minimum, it says you&#8217;re tech savvy, even cutting edge, and that you&#8217;re environmentally conscious. Some don&#8217;t care about the environment, but I can&#8217;t think of cases where that mindset makes you look bad.</p>
<p><strong>Resources</strong><br />
You&#8217;re sold, right? So, where to go from here? First, make one or more QR codes. You can do that here:<sup><a href="http://philip.yurchuk.com/2011/10/03/the-paperless-business-card/#footnote_2_158" id="identifier_2_158" class="footnote-link footnote-identifier-link" title="I&amp;#8217;m not associated with any of these companies, people, or products.">3</a></sup></p>
<p><a href="http://keremerkan.net/qr-code-and-2d-code-generator/">QR Code and 2D Code Generator</a><br />
Allows you to create many different QR codes, including vCards and meCards. You can also choose format. I chose PNG (an image file, like GIF or JPEG), then saved it and mailed to to my phone.</p>
<p><a href="http://zxing.appspot.com/generator/">ZXing QR Code Generator</a><br />
From the maker of the free, open source Barcode Reader app. I tested this with a couple generators and it works fine with contacts. It also generates QR codes for you from your contact list, although I don&#8217;t know how compliant they are with the vCard or meCard formats.</p>
<p><a href="http://code.google.com/apis/chart/infographics/docs/qr_codes.html">Google Infographics<br />
</a>Allows developers to create QR codes with a simple HTTP GET or POST request.</p>
<p>Google will find you many more options. After that, you need to find one for your phone. Instead listing them here, just go to your favorite app store. There are many quality, free apps to choose from. My only caveat is that I first tried Google Goggles and discovered it can&#8217;t read embedded phone numbers (I tried two different generators, and both vCards and meCards). Pretty major limitation for getting contact info.</p>
<p><strong>How to Help</strong><br />
If you want to help, request that your phone maker or carrier provide this feature <strong>natively</strong>.</p>
<p><a href="http://code.google.com/p/android/issues/detail?id=12737&amp;q=qr%20code&amp;colspec=ID%20Type%20Status%20Owner%20Summary%20Stars">Android barcode reader integration</a> &#8211; You can directly vote for this feature in Android by &#8220;starring&#8221; this request.</p>
<p><a href="http://www.apple.com/feedback/iphone.html">iPhone Feedback Form</a> &#8211; Ask Apple for QR code reader to be integrated into the camera.</p>
<p><strong>Postscript: Alternatives</strong><br />
There are alternatives to QR codes. One is near field communication  (NFC), but most phones, including my relatively new HTC Evo 4G, don&#8217;t  have an NFC chip/antenna. Another is the app <a href="http://bu.mp">Bump</a>.  Bump&#8217;s mechanism is extremely clever, and the company appears to have  some brilliant, highly credentialed people working there. I think it&#8217;s a  good idea and it&#8217;s on my phone. However, it&#8217;s only available for iOS  and Android, and the Android version is missing some critical features  like multiple contact cards or custom contact cards (it uses Android&#8217;s  contact info, which doesn&#8217;t have a field for your web site). And, of  course, neither works with printed advertisements like movie posters.</p>
<ol class="footnotes"><li id="footnote_0_158" class="footnote">This article, published in 2004, stated that 60% of all mobile phones came with QR code readers: http://www.hypulp.com/entries/more_qr_codes.php</li><li id="footnote_1_158" class="footnote">Some carriers provide this. A friend of mine has a Windows Phone 7 device and AT&amp;T bundled a barcode reader with it.</li><li id="footnote_2_158" class="footnote">I&#8217;m not associated with any of these companies, people, or products.</li></ol>]]></content:encoded>
			<wfw:commentRss>http://philip.yurchuk.com/2011/10/03/the-paperless-business-card/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>Tech Startup Wiki</title>
		<link>http://philip.yurchuk.com/2011/04/28/tech-startup-wiki/</link>
		<comments>http://philip.yurchuk.com/2011/04/28/tech-startup-wiki/#comments</comments>
		<pubDate>Thu, 28 Apr 2011 07:28:40 +0000</pubDate>
		<dc:creator>Philip Yurchuk</dc:creator>
				<category><![CDATA[Career]]></category>
		<category><![CDATA[startups]]></category>

		<guid isPermaLink="false">http://philip.yurchuk.com/?p=102</guid>
		<description><![CDATA[<p>I&#8217;ve created a Tech Startup Wiki on Wikispaces. Right now it&#8217;s just a list of books and web sites for those interested in tech startups. Please check it out and contribute if you can.</p> ]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve created a <a href="http://techstartups.wikispaces.com">Tech Startup Wiki</a> on Wikispaces. Right now it&#8217;s just a list of books and web sites for those interested in tech startups. Please check it out and contribute if you can.</p>
]]></content:encoded>
			<wfw:commentRss>http://philip.yurchuk.com/2011/04/28/tech-startup-wiki/feed/</wfw:commentRss>
		<slash:comments>0</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>Survey Hurdles And Incentives</title>
		<link>http://philip.yurchuk.com/2009/05/15/survey-hurdles-and-incentives/</link>
		<comments>http://philip.yurchuk.com/2009/05/15/survey-hurdles-and-incentives/#comments</comments>
		<pubDate>Sat, 16 May 2009 06:20:11 +0000</pubDate>
		<dc:creator>Philip Yurchuk</dc:creator>
				<category><![CDATA[Marketing]]></category>
		<category><![CDATA[surveys]]></category>
		<category><![CDATA[usability]]></category>

		<guid isPermaLink="false">http://philip.yurchuk.com/?p=37</guid>
		<description><![CDATA[<p>I just quit another survey before completing it, this one from Rhapsody. I like Rhapsody, and I don&#8217;t mind giving them my opinions to improve their service (or even to keep it the same). However, my time is valuable, and I can&#8217;t waste it on sites that don&#8217;t institute the simplest of usability measures. [...]]]></description>
			<content:encoded><![CDATA[<p>I just quit another survey before completing it, this one from Rhapsody. I like Rhapsody, and I don&#8217;t mind giving them my opinions to improve their service (or even to keep it the same). However, my time is valuable, and I can&#8217;t waste it on sites that don&#8217;t institute the simplest of usability measures. For example, if I leave a question blank, and there is a very reasonable conversion for blank (like zero or n/a), don&#8217;t come back to me with &#8220;answer all questions properly.&#8221; They didn&#8217;t even highlight which question they had a problem with or what, specifically, was wrong. The second time I got that message, I just closed the tab. They said the survey would take 10-15 minutes. Well guess what? If you coded it nicely, it&#8217;d only take us 5.</p>
<p>This is similar to telemarketers who give phone surveys and, because of some stupid rule set up by their management, must tell you what the numbers 1 through 5 represent for every single question. At that point, I&#8217;m thinking 1 for slightly annoyed, 2 for really annoyed, 3 for angry, 4 for hanging up right now&#8230;</p>
<p>And offering a chance of winning a single $100 Amazon gift card (which seems to be a new survey standard) is really no incentive at all. If you really want to incentivize, why not say 100 people will get a free month of Rhapsody to Go? Wouldn&#8217;t that improve your image without costing you much, since it&#8217;s your survey to begin with?</p>
<p>Look, for many topics, I&#8217;m a guy who actually cares. I&#8217;m happy to give you my opinions and insights. Please stop making me care less. </p>
]]></content:encoded>
			<wfw:commentRss>http://philip.yurchuk.com/2009/05/15/survey-hurdles-and-incentives/feed/</wfw:commentRss>
		<slash:comments>0</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>1</slash:comments>
		</item>
	</channel>
</rss>

