<?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>Lavezzo.com &#187; Cville JUG</title>
	<atom:link href="http://www.lavezzo.com/blog/category/cville-jug/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lavezzo.com/blog</link>
	<description>Family, IT, Africa, Business</description>
	<lastBuildDate>Wed, 07 Jul 2010 23:29:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Groovy: Simple file download from URL &#8211; Fixed</title>
		<link>http://www.lavezzo.com/blog/2010/04/url-encoding-for-grails/</link>
		<comments>http://www.lavezzo.com/blog/2010/04/url-encoding-for-grails/#comments</comments>
		<pubDate>Mon, 26 Apr 2010 12:00:43 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[Cville JUG]]></category>
		<category><![CDATA[Groovy]]></category>

		<guid isPermaLink="false">http://www.lavezzo.com/blog/?p=105</guid>
		<description><![CDATA[The Grails app I&#8217;m working on right now has some cookbook code that takes a list of URLs and downloads the file each URL points to into a staging directory for other code to work on them. There are a couple dozen similar examples on groovy/grails blogs on the net: def downloadFiles = { sourceUrls-&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>The Grails app I&#8217;m working on right now has some cookbook code that takes a list of URLs and downloads the file each URL points to into a staging directory for other code to work on them. There are a couple dozen similar examples on groovy/grails blogs on the net:</p>
<pre class="brush: js">def downloadFiles = { sourceUrls-&gt;
 def stagingDir = "/tmp/stagingdir"
 new File(stagingDir).mkdirs()
 sourceUrls.each { sourceUrl -&gt;
   def filename = sourceUrl.tokenize('/')[-1]
   def file = new FileOutputStream("$stagingDir/$filename")
   def out = new BufferedOutputStream(file)
   out &lt;&lt; new URL(sourceUrl).openStream()
   out.close()
 }
}

downloadFiles(
 ["http://lavezzo.com/saic/mvnBuildLifecycle.png",
 "http://lavezzo.com/saic/settings.xml"
 ])</pre>
<p>Looks reasonable, right?</p>
<p>What happens if we call it like this?</p>
<pre class="brush: js">
downloadFiles(
 ["http://lavezzo.com/saic/mvnBuildLifecycle.png",
 "http://lavezzo.com/saic/I have a space.png"
 ])
</pre>
<p>Disaster! <em> java.net.URL</em> can&#8217;t handle spaces? Now normally, if I were writing the URLs I&#8217;d just add in my own %20s and call it a day. But in this case that array of URL strings is the output of an XmlSlurper pointed at an html file. I have no control over the spaces in that file.<em> java.net.URLEncoder </em>seems like a good place to look, but it turns out that class is intended for use when composing links for html files. It substitutes a <em>+</em> for spaces, which don&#8217;t work in<em> java.net.URL</em>. <em>java.net.URI</em>&#8216;s documentation mentions that it encodes non-US-ASCII characters but not with the<em> URI(String str)</em> constructor. Again, this class seems to assume that you are making this URL yourself and can enter the protocol, port, hostname, etc each in its own constructor argument.</p>
<p>Well it was hard for me to believe but the answer was to separate out JUST the http portion of the URL string I collected from the web page and pass those into the <em>URI(String scheme, String ssp, String fragment) </em>constructor and then call URI&#8217;s <em>toURL() </em>method.  Some Groovy array manipulation convienences made it a little easier:</p>
<pre class="brush: js">def downloadFiles = { sourceUrls-&gt;
 def stagingDir = "/tmp/stagingdir"
 new File(stagingDir).mkdirs()
 sourceUrls.each { sourceUrl -&gt;
   def filename = sourceUrl.tokenize('/')[-1]
   def file = new FileOutputStream("$stagingDir/$filename")
   def protocolUrlTokens = sourceUrl.tokenize(':')
   def sourceUrlAsURI = new URI(protocolUrlTokens[0],
       protocolUrlTokens[1..(protocolUrlTokens.size-1)].join(":"), "")
   def out = new BufferedOutputStream(file)
   out &lt;&lt; sourceUrlAsURI.toURL().openStream()
   out.close()
 }
}

downloadFiles(
 ["http://lavezzo.com/saic/mvnBuildLifecycle.png",
 "http://lavezzo.com/saic/I have a space.png"
 ])</pre>
<p>It looks silly to be splitting out the http just to put it back together in the constructor.  Seems like a simple point of improvement in the one argument constructor to URI to parse the String for protocol and then use the three argument constructor internally.</p>
<p>In Charlottesville, Virginia<br />
Jeff</p>
<p>[Ed: Now with <a href="http://alexgorbatchev.com/wiki/SyntaxHighlighter">SyntaxHighlighter</a> goodness]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lavezzo.com/blog/2010/04/url-encoding-for-grails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>beCamp 2010 is April 30 &amp; May 1st</title>
		<link>http://www.lavezzo.com/blog/2010/04/becamp-2010-is-april-30-may-1st/</link>
		<comments>http://www.lavezzo.com/blog/2010/04/becamp-2010-is-april-30-may-1st/#comments</comments>
		<pubDate>Wed, 21 Apr 2010 15:16:54 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[Cville JUG]]></category>
		<category><![CDATA[Miscellany]]></category>
		<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://www.lavezzo.com/blog/?p=126</guid>
		<description><![CDATA[Since the Java Users Group fizzled out a few years ago, there haven&#8217;t been a lot of networking opportunities for programmers in town. Now that&#8217;s probably the least reason why you should pay attention to beCamp 2010. beCamp 2010 is almost here! April 30th and May 1st are just four weeks away! If you’re a [...]]]></description>
			<content:encoded><![CDATA[<p>Since the Java Users Group fizzled out a few years ago, there haven&#8217;t been a lot of networking opportunities for programmers in town.  Now that&#8217;s probably the least reason why you should pay attention to <a href="http://barcamp.org/beCamp2010">beCamp 2010</a>.</p>
<blockquote><p>beCamp 2010 is almost here! April 30th and May 1st are just four weeks away!</p>
<p>If you’re a geek in or around the Charlottesville metroplex or even if you’re merely tech-curious, this is the event you don’t want to miss. <a href="http://barcamp.org/beCamp2008">beCamp</a> is Charlottesville’s version of the BarCamp unconference phenomenon—organized on the fly by attendees, for attendees. Realizing that the most energizing parts of any tech conference are the ad hoc conversations that take place in the hallways between the sessions, beCamp facilitates these types of interactions for an entire event.</p></blockquote>
<p>So if you&#8217;re a programmer (or &#8220;geek&#8221; or &#8220;tech-curious&#8221;) in Charlottesville and NOT trekking to Reston for <a href="http://www.nofluffjuststuff.com/conference/reston/2010/04/home">No Fluff Just Stuff</a> Sign up and show up.  I have some experience with the Open-Spaces-Technology philosophy of conference and the results are consistently interesting and unexpected.</p>
<p>In Charlottesville, Virginia, United States<br />
Jeff Lavezzo</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lavezzo.com/blog/2010/04/becamp-2010-is-april-30-may-1st/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Charlottesville Tech-job-market</title>
		<link>http://www.lavezzo.com/blog/2009/09/charlottesville-tech-job-market/</link>
		<comments>http://www.lavezzo.com/blog/2009/09/charlottesville-tech-job-market/#comments</comments>
		<pubDate>Mon, 07 Sep 2009 00:14:03 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[Cville JUG]]></category>
		<category><![CDATA[Miscellany]]></category>
		<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://www.lavezzo.com/blog/?p=43</guid>
		<description><![CDATA[I&#8217;ve found myself about half a dozen times over the last 6 months sending friends or friends-of-friends info on companies in town who hire programmers, software testers, tech-writers or project managers. Before I send it out one more time, I thought I&#8217;d put it up here for general reference and to solicit comments. I&#8217;m going [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve found myself about half a dozen times over the last 6 months sending friends or friends-of-friends info on companies in town who hire programmers, software testers, tech-writers or project managers.  Before I send it out one more time, I thought I&#8217;d put it up here for general reference and to solicit comments.  I&#8217;m going to quickly put it up without fully linking each company trusting that you all can use Google as well as I can.</p>
<h4>Charlottesville Tech Companies in no particular order</h4>
<ul>
<li><a href="http://www.ccri.com">Commonwealth Computer Research</a></li>
<li><a href="http://www.opensourceconnections.com/">OpenSource Connections</a></li>
<li><a href="http://www.pqa.com">Perrin Quarles Associates</a> </li>
<li><a href="http://www.scholarone.com/">ScholarOne</a> (now owned by Thomson Scientific)</li>
<li><a href="http://www.hotelicopter.com/">Hotelicopter</a></li>
<li><a href="http://www.dominiondigital.com/">Dominion Digital</a></li>
<li><a href="http://lucidimagination.com">Lucid Imagination</a></li>
<li><a href="http://www.snl.com">SNL Financial</a></li>
<li><a href="http://perronerobotics.com">Perrone Robotics</a></li>
<li><a href="http://www.meddius.com/">Meddius</a> health care tech</li>
<li>University of Virginia</li>
<li>and separately: the University of Virginia Medical Center</li>
</ul>
<p>These government contractors have offices all over so be sure to specify Charlottesville:</p>
<ul>
<li><a href="http://jobs.saic.com">SAIC</a></li>
<li> Booz Allen Hamilton</li>
<li> CACI</li>
<li> Pragmatics</li>
<li> Northrop Grumman</li>
<li><a href="http://www.generaldynamics.com/">General Dynamics</a></li>
</ul>
<p>When finding jobs by going directly to company websites, remember that a company busy enough to need to hire may be busy enough not to be able to get a job on their site. If a site doesn&#8217;t have a job you&#8217;re looking for, use their website to find out the name of a manager in the department you&#8217;d like to work or just call the front desk and ask for the name of the person in charge of developers, tech writers, testing, hiring project managers, etc. Ask for the HR manager. Ask if they&#8217;re hiring now or expect to in the near future.  Do some research ahead of time so you have some idea of what their industry is like so you can ask informed questions. Then you can follow this sequence:</p>
<ol>
<li>Give them a reason to expect your Coverletter (and resume)</li>
<li>Write a coverletter that makes them want to read your resume</li>
<li>Write a resume (<em>customize it for each job</em>) that makes them want to give you an interview</li>
<li>Interview so they know they can work with you</li>
</ol>
<p>That last point is often important.  A lack of domain experience can be made up for in a month on the job.  Being someone no one can get along with is really unlikely to be corrected.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lavezzo.com/blog/2009/09/charlottesville-tech-job-market/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why We Like Charlottesville</title>
		<link>http://www.lavezzo.com/blog/2006/03/why-we-like-charlottesville/</link>
		<comments>http://www.lavezzo.com/blog/2006/03/why-we-like-charlottesville/#comments</comments>
		<pubDate>Thu, 23 Mar 2006 14:05:02 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
				<category><![CDATA[Cville JUG]]></category>
		<category><![CDATA[Miscellany]]></category>
		<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://www.lavezzo.com/blog/?p=12</guid>
		<description><![CDATA[There was a discussion yesterday on the Charlottesville Java Users Group email list about how many people take pay cuts when moving to Charlottesville, and how they couldn&#8217;t be happier with the choice. Mostly people cited &#8220;Quality of Life&#8221; listing things like &#8220;10 minute commute&#8221; times, etc. as why they&#8217;re happier. For Tici and I [...]]]></description>
			<content:encoded><![CDATA[<p>There was a discussion yesterday on the <a href="http://www.cvillejug.org/">Charlottesville Java Users Group</a> email list about how many people take pay cuts when moving to Charlottesville, and how they couldn&#8217;t be happier with the choice. Mostly people cited &#8220;Quality of Life&#8221; listing things like &#8220;10  minute commute&#8221; times, etc. as why they&#8217;re happier.</p>
<p>For Tici and I today includes one of those &#8220;Quality of Life&#8221; events. As you may know, Tici&#8217;s very interested in Montessori education methods and is considering getting trained in it and at least getting a job as a classroom assistant.  Turns out one of the preeminent authors on the subject lives and works in Charlottesville, Angeline S. Lillard is a professor at UVA.  Before we even knew that she was local, we&#8217;d picked up a copy of her book <a href="http://www.montessori-science.org/">Montessori: The Science Behind The Genius</a>. Turns out as part of the <a href=http://vabook.org>Virginia Festival of the Book</a> events this week, she&#8217;s speaking tonight at our local Barnes &#038; Noble.</p>
<p><img src="http://www.montessori-science.org/images/Lillard-Montessori-Science-Genius.jpg" alt="Angeline Stoll Lillard - Montessori The Science Behind the Genius" /></p>
<p>It&#8217;s at 6pm, so Tici will go by herself while I stay with the kids. Maybe I&#8217;ll get her to post a summary here tomorrow.</p>
<p>In Charlottesville &#8220;Quality of Life&#8221;, Virginia (US):<br />
Jeff Lavezzo</p>
<p>PS: Mostly, I wrote this post because a search for LIllard&#8217;s book brings up her website in about 15th place. I hope more links like this one and ones from vabook.org help improve her ranking.  Of course, I&#8217;d like to help her improve her site to make it worth visiting, but eh&#8230;  I am already over subscribed.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lavezzo.com/blog/2006/03/why-we-like-charlottesville/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
