<?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>BrutalBits Blog</title>
	<atom:link href="http://brutalbits.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://brutalbits.com/blog</link>
	<description>Tech, Code, Java, Rails, Android, and occasionally derisive rants</description>
	<lastBuildDate>Fri, 16 Mar 2012 05:31:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Ubuntu clone with git &#8216;hung up unexpectedly&#8217; problem solved</title>
		<link>http://brutalbits.com/blog/2012/03/ubuntu-clone-with-git-hung-up-unexpectedly-problem-solved/</link>
		<comments>http://brutalbits.com/blog/2012/03/ubuntu-clone-with-git-hung-up-unexpectedly-problem-solved/#comments</comments>
		<pubDate>Fri, 16 Mar 2012 05:30:09 +0000</pubDate>
		<dc:creator>joff</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[vcs]]></category>

		<guid isPermaLink="false">http://brutalbits.com/blog/?p=127</guid>
		<description><![CDATA[I was experiencing a very strange issue where I was unable to clone or pull from some repositories on github. It would only be for some (larger) respositories, and I could sometimes pull them fine using the https:// protocol, but not using the git:// or ssh:// protocols. What I would see in the output, is &#8230; </p><p><a class="more-link block-button" href="http://brutalbits.com/blog/2012/03/ubuntu-clone-with-git-hung-up-unexpectedly-problem-solved/">Continue reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>I was experiencing a very strange issue where I was unable to clone or pull from some repositories on github. It would only be for some (larger) respositories, and I could sometimes pull them fine using the https:// protocol, but not using the git:// or ssh:// protocols.</p>
<p>What I would see in the output, is that git would contact the remote server, and just hang for several minutes, before giving, rather cryptically, the <code>'remote end hung up unexpectedly'</code> message. Doing a &#8216;git pull&#8217; on an existing repo would give me <code>'error: RPC failed; result=56, HTTP code = 0'</code></p>
<p>I could clone the same repos fine on my OSX workstation, and on other Ubuntu linux boxes, so something weird was definitely up.</p>
<p>I suspected it was some sort of low-level networking issue, and after trying many things, came upon the solution:</p>
<p>My <strong>MTU size</strong> was set to &#8216;automatic&#8217;, and had defaulted to <strong>1500</strong>. Apparently this can sometimes cause TCP connections to hang in some network environments!</p>
<p>I set my MTU size to <strong>1492</strong> on my network adapter (Under Edit Connections&#8230; in the UI) and <em>everything started to work as expected!</em> Huzzah.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://brutalbits.com/blog/2012/03/ubuntu-clone-with-git-hung-up-unexpectedly-problem-solved/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Brew: the future of package management on OSX? Hope not.</title>
		<link>http://brutalbits.com/blog/2011/11/brew-the-future-of-package-management-on-osx-hope-not/</link>
		<comments>http://brutalbits.com/blog/2011/11/brew-the-future-of-package-management-on-osx-hope-not/#comments</comments>
		<pubDate>Mon, 14 Nov 2011 05:48:22 +0000</pubDate>
		<dc:creator>joff</dc:creator>
				<category><![CDATA[OSX]]></category>
		<category><![CDATA[Rants]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[brew]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[rant]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://brutalbits.com/blog/?p=122</guid>
		<description><![CDATA[Warning: This might come off a little ranty. You know, it might just be that some people need to install older-than-the-bleeding edge versions of software. Some of us have stable production systems, that for whatever reason, don&#8217;t always run the latest, nightly-build-sure-it&#8217;ll-be-fine-no-really versions of everything. Turns out to to this using &#8220;brew&#8221;, you have to &#8230; </p><p><a class="more-link block-button" href="http://brutalbits.com/blog/2011/11/brew-the-future-of-package-management-on-osx-hope-not/">Continue reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>Warning: This might come off a little ranty.</p>
<p>You know, it might just be that some people need to install older-than-the-bleeding edge versions of software. Some of us have stable production systems, that for whatever reason, don&#8217;t always run the latest, nightly-build-sure-it&#8217;ll-be-fine-no-really versions of everything.</p>
<p>Turns out to to this using &#8220;brew&#8221;, you have to go through some quite odd contortions</p>
<ol>
<li>Install brew (would assume you&#8217;ve already done this at least)</li>
<li><code>brew update</code> (this makes sure you have the /usr/local/.git directory)</li>
<li><code>brew versions rabbitmq</code> (I&#8217;m looking for 1.7.2 of RabbitMQ in this case)</li>
<li>Copy down the <strong>git commit hash</strong> of the version I want.</li>
<li><code>git checkout -b temp_branch <strong>$GITHASH</strong></code></li>
<li><code>brew install rabbitmq</code></li>
<li><code>git checkout master</code></li>
<li><code>git branch -d temp_branch</code></li>
</ol>
<p>Clearly something like &#8216;<em>brew install rabbitmq &#8211;version=1.7.2&#8242;</em> is far too difficult.</p>
<p>Also, what the hell is with brew littering the root of /usr/local with it&#8217;s junk? Is there something wrong with something clean like /usr/local/brew?</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://brutalbits.com/blog/2011/11/brew-the-future-of-package-management-on-osx-hope-not/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Modern Java</title>
		<link>http://brutalbits.com/blog/2011/03/modern-java/</link>
		<comments>http://brutalbits.com/blog/2011/03/modern-java/#comments</comments>
		<pubDate>Thu, 31 Mar 2011 03:08:08 +0000</pubDate>
		<dc:creator>joff</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://brutalbits.com/blog/?p=1</guid>
		<description><![CDATA[While it&#8217;s something I&#8217;ve been intending to do for quite a while now, I&#8217;ve finally managed to actually start using the Guava Libraries. This is a superset project which includes the Google Collections libraries, which are a huge improvement over the traditional J2SE Collections API. It allows for very quick construction of collections objects: e.g. &#8230; </p><p><a class="more-link block-button" href="http://brutalbits.com/blog/2011/03/modern-java/">Continue reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>While it&#8217;s something I&#8217;ve been intending to do for quite a while now, I&#8217;ve finally managed to actually start using the <a href="http://code.google.com/p/guava-libraries/" target="_blank">Guava Libraries</a>. This is a superset project which includes the Google Collections libraries, which are a huge improvement over the traditional J2SE Collections API.</p>
<p>It allows for very quick construction of collections objects: e.g.</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">final</span> List<span style="color: #339933;">&lt;</span>MyThing<span style="color: #339933;">&gt;</span> empty <span style="color: #339933;">=</span> Lists.<span style="color: #006633;">newArrayList</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">final</span> List<span style="color: #339933;">&lt;</span>String<span style="color: #339933;">&gt;</span> populated <span style="color: #339933;">=</span> Lists.<span style="color: #006633;">newArrayList</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;a&quot;</span>, <span style="color: #0000ff;">&quot;b&quot;</span>, <span style="color: #0000ff;">&quot;c&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">final</span> Map<span style="color: #339933;">&lt;</span>Integer,MyThing<span style="color: #339933;">&gt;</span> myMap <span style="color: #339933;">=</span> ImmutableMap.<span style="color: #006633;">of</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span>, object1, <span style="color: #cc66cc;">2</span>, object2, <span style="color: #cc66cc;">3</span>, object3<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>How about functions on lists?</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">final</span> <span style="color: #003399;">List</span> spamList <span style="color: #339933;">=</span> Lists.<span style="color: #006633;">transform</span><span style="color: #009900;">&#40;</span>customers, <span style="color: #000000; font-weight: bold;">new</span> Function<span style="color: #339933;">&lt;</span>Customer,EmailAddress<span style="color: #339933;">&gt;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">public</span> EmailAddress apply<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">final</span> Customer customer<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
         <span style="color: #000000; font-weight: bold;">return</span> customer.<span style="color: #006633;">getEmail</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>There is also a whole lot of other good stuff included, for I/O, Primitives utilities, String manipulation, Networking and concurrency.</p>
<p>Here is a link to <a href="http://www.tfnico.com/presentations/google-guava" target="_blank">some good resources</a>.</p>
<p>Also, I just wanted to link to <a href="http://www.opengamma.com/blog/2011/jsr-310-experience" target="_blank">this article on JSR-310</a>, which is the API that has arisen out of the very excellent <a href="http://joda-time.sourceforge.net/" target="_blank">Joda Date/Time library</a>, which I endorse and use very heavily.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://brutalbits.com/blog/2011/03/modern-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Recovering lost IntelliJ IDEA shelved changesets</title>
		<link>http://brutalbits.com/blog/2009/07/recovering-lost-intellij-idea-shelved-changesets-2/</link>
		<comments>http://brutalbits.com/blog/2009/07/recovering-lost-intellij-idea-shelved-changesets-2/#comments</comments>
		<pubDate>Mon, 27 Jul 2009 04:26:34 +0000</pubDate>
		<dc:creator>joff</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[ide]]></category>
		<category><![CDATA[idea]]></category>
		<category><![CDATA[oh frack]]></category>
		<category><![CDATA[vcs]]></category>

		<guid isPermaLink="false">http://meatload.net/?p=115</guid>
		<description><![CDATA[Imagine the following scenario: You are moving your beloved project out from a subdirectory of an svn repository, into it&#8217;s own brand spanking new repository. You have about 3 days worth of large refactorings to the codebase waiting in the wings, with most of the tests passing, but not quite ready for commit to the &#8230; </p><p><a class="more-link block-button" href="http://brutalbits.com/blog/2009/07/recovering-lost-intellij-idea-shelved-changesets-2/">Continue reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>Imagine the following scenario:</p>
<ul>
<li>You are moving your beloved project out from a subdirectory of an svn repository, into it&#8217;s own brand spanking new repository.</li>
<li>You have about 3 days worth of large refactorings to the codebase waiting in the wings, with most of the tests passing, but not quite ready for commit to the trunk</li>
<li>You use IDEA&#8217;s <em>shelve</em> feature to put those changes into safe keeping, so you can make changes and commits to the repository in preparation for the move</li>
<li>You manage to successfully migrate the svn repository across, managing to keep all the history (yay)</li>
<li>You then open the new (and renamed) project in IDEA, <strong>and all of your shelved changes are gone</strong></li>
</ul>
<p><em>Gulp.</em></p>
<p>Luckily, IDEA never deletes any of the shelved changesets, and conveniently stores them in unified .diff format in <tt>$USERDIR$.IntelliJIdea80configshelf</tt></p>
<p>Also, conveniently, there&#8217;s the &#8216;Version Control -&gt; Apply Patch&#8217; menu item, so you don&#8217;t have to worry about mucking about with the *nix patch command line tool.</p>
<p>Day saved. Hurrah!</p>
<p>** Perhaps this sort of thing is a good argument for using a Distributed VCS system, like git or mercurial or monotone et al. You would normally be doing lots of small commits to your local repository, without necessarily worrying about breaking trunk for everybody, and your changes stay safe</p>
]]></content:encoded>
			<wfw:commentRss>http://brutalbits.com/blog/2009/07/recovering-lost-intellij-idea-shelved-changesets-2/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Selenium testing RichFaces comboBox controls</title>
		<link>http://brutalbits.com/blog/2009/04/selenium-testing-richfaces-combobox-controls-2/</link>
		<comments>http://brutalbits.com/blog/2009/04/selenium-testing-richfaces-combobox-controls-2/#comments</comments>
		<pubDate>Thu, 16 Apr 2009 08:17:02 +0000</pubDate>
		<dc:creator>joff</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[richfaces]]></category>
		<category><![CDATA[seam]]></category>
		<category><![CDATA[selenium]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://meatload.net/?p=76</guid>
		<description><![CDATA[Ok, so I&#8217;ve spent the last day and a half chasing down a really weird bug I was seeing with our Selenium integration tests. Basically, we had a RichFaces rich:comboBox component &#8211; which gives you a thing that looks like a drop down combo box, but also allows you to type free-form text into it. &#8230; </p><p><a class="more-link block-button" href="http://brutalbits.com/blog/2009/04/selenium-testing-richfaces-combobox-controls-2/">Continue reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>Ok, so I&#8217;ve spent the last day and a half chasing down a really weird bug I was seeing with our <a href="http://seleniumhq.org" target="_blank">Selenium</a> integration tests.</p>
<p>Basically, we had a <a href="http://jboss.org/jbossrichfaces" target="_blank">RichFaces</a> rich:comboBox component &#8211; which gives you a thing that looks like a drop down combo box, but also allows you to type free-form text into it. It does fancy things like auto-completion, etc.</p>
<p>What I had was an ajaxValidator that would trigger when the &#8220;onblur&#8221; event was fired at the component. This was working fine when I&#8217;d try it manually, i.e. I could type something into the field, hit tab (or click away from the field or whatever), and the validation would update, showing that the field now had a value (instead of complaining about not having one).</p>
<p><strong>However</strong>, when I tested it using Selenium, using <em>selenium.type()</em> I could see the input appear in the text box, but the validation message would never go away.</p>
<p>Something with the event system in the combo box is way messed up, and you should test it using something like:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">selenium.<span style="color: #006633;">typeKeys</span><span style="color: #009900;">&#40;</span> your_elementcomboboxField, <span style="color: #0000ff;">&quot;Some text&quot;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
selenium.<span style="color: #006633;">fireEvent</span><span style="color: #009900;">&#40;</span> your_elementcomboboxField, <span style="color: #0000ff;">&quot;blur&quot;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>This simulates a user actually typing each letter in, like a human would do, rather than just setting the field value. You then fire the <em>onblur</em> event, so simulate the user leaving the field.</p>
]]></content:encoded>
			<wfw:commentRss>http://brutalbits.com/blog/2009/04/selenium-testing-richfaces-combobox-controls-2/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

