<?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>frogcake.net &#187; David</title>
	<atom:link href="http://www.frogcake.net/blog/author/admin/feed" rel="self" type="application/rss+xml" />
	<link>http://www.frogcake.net/blog</link>
	<description></description>
	<lastBuildDate>Sun, 22 Jan 2012 21:22:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>TextMate for IntelliJ users</title>
		<link>http://www.frogcake.net/blog/2011/11/30/textmate-for-intellij-users</link>
		<comments>http://www.frogcake.net/blog/2011/11/30/textmate-for-intellij-users#comments</comments>
		<pubDate>Wed, 30 Nov 2011 13:55:47 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Geek]]></category>

		<guid isPermaLink="false">http://www.frogcake.net/blog/?p=1083</guid>
		<description><![CDATA[I use IntelliJ IDEA. I also use TextMate. The fact that I spend most of my day in IntelliJ means I&#8217;m used to IntelliJ&#8217;s keyboard mapping which happens to be slightly different from TextMate&#8217;s. The biggest difference I found was with the Home and End keys and the Delete Line mapping. So here&#8217;s how to [...]]]></description>
			<content:encoded><![CDATA[<p>I use <a href="http://www.jetbrains.com/idea/" >IntelliJ IDEA</a>. I also use <a href="http://macromates.com/" >TextMate</a>. The fact that I spend most of my day in IntelliJ means I&#8217;m used to IntelliJ&#8217;s keyboard mapping which happens to be slightly different from TextMate&#8217;s.</p>
<p>The biggest difference I found was with the Home and End keys and the Delete Line mapping. So here&#8217;s how to make TextMate work more like IntelliJ.</p>
<h4>Change Home and End keys</h4>
<p>From <a href="http://blog.macromates.com/2005/key-bindings-for-switchers/" >this old blog post</a>:<br/>
Create the custom KeyBindings folder (if it doesn&#8217;t already exist):</p>

<div class="wp_syntax" ><div class="code" ><pre class="bash"  style="font-family:monospace;" ><span style="color: #c20cb9; font-weight: bold;" >mkdir</span> ~<span style="color: #000000; font-weight: bold;" >/</span>Library<span style="color: #000000; font-weight: bold;" >/</span>KeyBindings</pre></div></div>

<p>Create a key bindings file called DefaultKeyBinding.dict in this directory with the following content:</p>

<div class="wp_syntax" ><div class="code" ><pre class="objc"  style="font-family:monospace;" ><span style="color: #002200;" >&#123;</span>
    <span style="color: #11740a; font-style: italic;" >/* home */</span>
    <span style="color: #bf1d1a;" >&quot;<span style="color: #2400d9;" >\U</span>F729&quot;</span>  <span style="color: #002200;" >=</span> <span style="color: #bf1d1a;" >&quot;moveToBeginningOfLine:&quot;</span>;
    <span style="color: #bf1d1a;" >&quot;$<span style="color: #2400d9;" >\U</span>F729&quot;</span> <span style="color: #002200;" >=</span> <span style="color: #bf1d1a;" >&quot;moveToBeginningOfLineAndModifySelection:&quot;</span>;
&nbsp;
    <span style="color: #11740a; font-style: italic;" >/* end */</span>
    <span style="color: #bf1d1a;" >&quot;<span style="color: #2400d9;" >\U</span>F72B&quot;</span>  <span style="color: #002200;" >=</span> <span style="color: #bf1d1a;" >&quot;moveToEndOfLine:&quot;</span>;
    <span style="color: #bf1d1a;" >&quot;$<span style="color: #2400d9;" >\U</span>F72B&quot;</span> <span style="color: #002200;" >=</span> <span style="color: #bf1d1a;" >&quot;moveToEndOfLineAndModifySelection:&quot;</span>;
&nbsp;
    <span style="color: #11740a; font-style: italic;" >/* page up/down */</span>
    <span style="color: #bf1d1a;" >&quot;<span style="color: #2400d9;" >\U</span>F72C&quot;</span>  <span style="color: #002200;" >=</span> <span style="color: #bf1d1a;" >&quot;pageUp:&quot;</span>;
    <span style="color: #bf1d1a;" >&quot;<span style="color: #2400d9;" >\U</span>F72D&quot;</span>  <span style="color: #002200;" >=</span> <span style="color: #bf1d1a;" >&quot;pageDown:&quot;</span>;
<span style="color: #002200;" >&#125;</span></pre></div></div>

<h4>Change Delete Line mapping</h4>
<p>Go to Bundles &gt; Bundle Editor &gt; Show Bundle Editor.<br/>
In text bundle, change Delete Line from CTRL+K to CMD+DELETE.<br/>
In the text bundle, Delete to Beginning of Line macro, click the X to remove the same binding.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.frogcake.net/blog/2011/11/30/textmate-for-intellij-users/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Le Mans 24 Heures Moto</title>
		<link>http://www.frogcake.net/blog/2011/11/04/le-mans-24-heures-moto</link>
		<comments>http://www.frogcake.net/blog/2011/11/04/le-mans-24-heures-moto#comments</comments>
		<pubDate>Fri, 04 Nov 2011 13:43:07 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Motorbikes]]></category>

		<guid isPermaLink="false">http://www.frogcake.net/blog/?p=1043</guid>
		<description><![CDATA[Originally published here. I went to Le Mans on the weekend. It was a bloody incredible experience. After meeting up with a couple of BMW GS&#8217;s, a Suzuki Bandit and a Harley(!) at 4am on Friday morning we got the 6am ferry from Dover to Calais and then took some nice roads south to Le [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.frogcake.net/blog/wp-content/uploads/2011/11/IMG0050-M1.jpg" ><img hspace="1em"  vspace="1em"  align="right"  class="alignright size-medium wp-image-1055"  title="IMG0050-M"  src="http://www.frogcake.net/blog/wp-content/uploads/2011/11/IMG0050-M1-300x225.jpg"  alt=""  width="300"  height="225"   style="float:right; margin:0 0 1em 1em; border:black 1px solid;"/></a>Originally published <a href="http://www.675.cc/675/viewtopic.php?f=71&amp;t=8130&amp;p=102346#p100805" >here</a>.</p>
<p>I went to Le Mans on the weekend. It was a bloody incredible experience.</p>
<p>After meeting up with a couple of BMW GS&#8217;s, a Suzuki Bandit and a Harley(!) at 4am on Friday morning we got the 6am ferry from Dover to Calais and then took some nice roads south to Le Mans arriving at the circuit at about 2pm.</p>
<p>Staying in the campsite was unlike anything I have ever experienced before. Anyone who&#8217;s been will know what I mean. For those who haven&#8217;t, you need to imagine something like Mad Max. The campsite is between the airfield and the circuit but you can barely hear the noise of either the aircraft or the race track due to the constant insane revving of motorbike engines in the camp. This literally goes on without stop from Thursday until Sunday. All through the day and night bike engines are screaming in torture being held at the limiter and having their cut-off switches flicked to produce flaming backfires. The French call it the Rupture. The noise is deafening. Some take the cans off their bikes and some attach home made garbage can trumpet attachments for extra awesomeness.</p>
<p>Other features of the campsite are flares, fires and massive amounts of alcohol and drunkenness. Oh and dust. Lots of dust that mixes with the smoke of the campfire and the early morning mist to produce a kind of smog that coats your bike/tent and floats across the circuit.</p>
<p>Oh yeah, the circuit. That&#8217;s right. The race that everyone is supposed to be there for. The racing is incredible. I do not know how these guys do it. It&#8217;s pretty surreal. As a spectator you watch the start and several laps. Then maybe have a wander round the circuit, watch a bit more and catch up on the positions then head back to camp for dinner. After dinner you wander back over to the circuit, and those guys are still flinging their bikes around the track, lifting the front wheel through the Dunlop bridge and overtaking into corners. Then you might watch a bit of the rock concert and then head back to the track. They&#8217;re still racing. It&#8217;s getting late so you head back to camp for more drinking / general madness and try to get a couple of hours sleep over the noise of the rupture. You get up early to watch the sunrise over the circuit AND THEY ARE STILL RACING! They haven&#8217;t slowed down AT ALL! An hour or so later you head back to the camp for breakfast / beer and later on walk back to the circuit to watch the final few hours of racing. OMG THEY ARE STILL GOING FLAT OUT! I don&#8217;t know how they do it for 24h. I know the riding is split between 3 or 4 riders but it&#8217;s still insane.</p>
<p>The whole thing was unreal. I got back home at 2am on Monday morning and I still haven&#8217;t fully recovered from the weekend. <img title="Smile"  src="http://www.675.cc/675/images/smilies/icon_e_smile.gif"  alt=":-)" /> Oh and the French loooved the Daytona. I&#8217;m not exaggerating when I say everyone who walked passed my bike in the campsite either turned to gaze at it or more often stopped and discussed it with their mates. The Harley barely got a glance. <img title="Smile"  src="http://www.675.cc/675/images/smilies/icon_e_smile.gif"  alt=":-)" /> I only saw a couple of other Daytonas although there were a few more Streets.</p>
<p>I&#8217;ll add some photos I took when I have had a chance to look at them but here&#8217;s a great video of this years race.</p>
<p><object width="500"  height="281" ><param name="movie"  value="http://www.youtube.com/v/Kv-ux8rEskc?version=3&#038;feature=oembed" /></param><param name="allowFullScreen"  value="true" /></param><param name="allowscriptaccess"  value="always" /></param><embed src="http://www.youtube.com/v/Kv-ux8rEskc?version=3&#038;feature=oembed"  type="application/x-shockwave-flash"  width="500"  height="281"  allowscriptaccess="always"  allowfullscreen="true" ></embed></object></p>
<p>A few pics. Full gallery is <a href="http://gallery.frogcake.net/Motorsport/Le-Mans-24-Heures-Moto-2011/19268439_6Zss3h" >here</a>.</p>

<div class="ngg-galleryoverview"  id="ngg-gallery-6-1043" >


	
	
		
	<div id="ngg-image-53"  class="ngg-gallery-thumbnail-box" >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.frogcake.net/blog/gallery/lemans_2011/img0019-l.jpg"  title="Check out the size of the sprocket on this BMW stunt bike."  rel="lightbox[set_6]" >
								<img title="img0019-l"  alt="img0019-l"  src="http://www.frogcake.net/blog/gallery/lemans_2011/thumbs/thumbs_img0019-l.jpg"  width="128"  height="128" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-54"  class="ngg-gallery-thumbnail-box" >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.frogcake.net/blog/gallery/lemans_2011/img0023-l.jpg"  title="My bike has never been so dirty."  rel="lightbox[set_6]" >
								<img title="img0023-l"  alt="img0023-l"  src="http://www.frogcake.net/blog/gallery/lemans_2011/thumbs/thumbs_img0023-l.jpg"  width="128"  height="128" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-55"  class="ngg-gallery-thumbnail-box" >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.frogcake.net/blog/gallery/lemans_2011/img0024-l.jpg"  title="You can see the main grandstand from our campsite."  rel="lightbox[set_6]" >
								<img title="img0024-l"  alt="img0024-l"  src="http://www.frogcake.net/blog/gallery/lemans_2011/thumbs/thumbs_img0024-l.jpg"  width="128"  height="128" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-56"  class="ngg-gallery-thumbnail-box" >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.frogcake.net/blog/gallery/lemans_2011/img0027-l.jpg"  title="Flares at night."  rel="lightbox[set_6]" >
								<img title="img0027-l"  alt="img0027-l"  src="http://www.frogcake.net/blog/gallery/lemans_2011/thumbs/thumbs_img0027-l.jpg"  width="128"  height="128" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-57"  class="ngg-gallery-thumbnail-box" >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.frogcake.net/blog/gallery/lemans_2011/img0031-l.jpg"  title="Before the start."  rel="lightbox[set_6]" >
								<img title="img0031-l"  alt="img0031-l"  src="http://www.frogcake.net/blog/gallery/lemans_2011/thumbs/thumbs_img0031-l.jpg"  width="128"  height="128" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-58"  class="ngg-gallery-thumbnail-box" >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.frogcake.net/blog/gallery/lemans_2011/img0047-l.jpg"  title="If you can get your bike back to the pits you can fix it and carry on racing."  rel="lightbox[set_6]" >
								<img title="img0047-l"  alt="img0047-l"  src="http://www.frogcake.net/blog/gallery/lemans_2011/thumbs/thumbs_img0047-l.jpg"  width="128"  height="128" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-59"  class="ngg-gallery-thumbnail-box" >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.frogcake.net/blog/gallery/lemans_2011/img0053-l.jpg"  title="They have a museum at the circuit (meanwhile the bikes are still racing outside)."  rel="lightbox[set_6]" >
								<img title="img0053-l"  alt="img0053-l"  src="http://www.frogcake.net/blog/gallery/lemans_2011/thumbs/thumbs_img0053-l.jpg"  width="128"  height="128" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-60"  class="ngg-gallery-thumbnail-box" >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.frogcake.net/blog/gallery/lemans_2011/img0062-l.jpg"  title="Problems with the Harley :-)"  rel="lightbox[set_6]" >
								<img title="img0062-l"  alt="img0062-l"  src="http://www.frogcake.net/blog/gallery/lemans_2011/thumbs/thumbs_img0062-l.jpg"  width="128"  height="128" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-61"  class="ngg-gallery-thumbnail-box" >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.frogcake.net/blog/gallery/lemans_2011/img0072-l.jpg"  title="Status Quo playing on Saturday night (meanwhile bikes still racing)."  rel="lightbox[set_6]" >
								<img title="img0072-l"  alt="img0072-l"  src="http://www.frogcake.net/blog/gallery/lemans_2011/thumbs/thumbs_img0072-l.jpg"  width="128"  height="128" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-62"  class="ngg-gallery-thumbnail-box" >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.frogcake.net/blog/gallery/lemans_2011/img0085-l.jpg"  title="Those two streaks of light are motorbikes."  rel="lightbox[set_6]" >
								<img title="img0085-l"  alt="img0085-l"  src="http://www.frogcake.net/blog/gallery/lemans_2011/thumbs/thumbs_img0085-l.jpg"  width="128"  height="128" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-63"  class="ngg-gallery-thumbnail-box" >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.frogcake.net/blog/gallery/lemans_2011/img0093-l.jpg"  title="Pit stop - fuel, tyres and rider change."  rel="lightbox[set_6]" >
								<img title="img0093-l"  alt="img0093-l"  src="http://www.frogcake.net/blog/gallery/lemans_2011/thumbs/thumbs_img0093-l.jpg"  width="128"  height="128" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-64"  class="ngg-gallery-thumbnail-box" >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.frogcake.net/blog/gallery/lemans_2011/img0096-l.jpg"  title="This is not really mist. It's mostly smoke from the camp fires."  rel="lightbox[set_6]" >
								<img title="img0096-l"  alt="img0096-l"  src="http://www.frogcake.net/blog/gallery/lemans_2011/thumbs/thumbs_img0096-l.jpg"  width="128"  height="128" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-65"  class="ngg-gallery-thumbnail-box" >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.frogcake.net/blog/gallery/lemans_2011/img0113-l.jpg"  title="Sunrise over the Dunlop bridge."  rel="lightbox[set_6]" >
								<img title="img0113-l"  alt="img0113-l"  src="http://www.frogcake.net/blog/gallery/lemans_2011/thumbs/thumbs_img0113-l.jpg"  width="128"  height="128" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-66"  class="ngg-gallery-thumbnail-box" >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.frogcake.net/blog/gallery/lemans_2011/img0114-l.jpg"  title="These guys have been racing for about 15 hours now."  rel="lightbox[set_6]" >
								<img title="img0114-l"  alt="img0114-l"  src="http://www.frogcake.net/blog/gallery/lemans_2011/thumbs/thumbs_img0114-l.jpg"  width="128"  height="128" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-67"  class="ngg-gallery-thumbnail-box" >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.frogcake.net/blog/gallery/lemans_2011/img0133-l.jpg"  title="Winners' celebration."  rel="lightbox[set_6]" >
								<img title="img0133-l"  alt="img0133-l"  src="http://www.frogcake.net/blog/gallery/lemans_2011/thumbs/thumbs_img0133-l.jpg"  width="128"  height="128" />
							</a>
		</div>
	</div>
	
		
 	 	
	
 	<div class="ngg-clear" ></div> 	
</div>


<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.frogcake.net/blog/2011/11/04/le-mans-24-heures-moto/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Devoxx &#8211; Project Coin, Defective Java and the Social Network</title>
		<link>http://www.frogcake.net/blog/2010/11/18/devoxx-project-coin-defective-java-and-the-social-network</link>
		<comments>http://www.frogcake.net/blog/2010/11/18/devoxx-project-coin-defective-java-and-the-social-network#comments</comments>
		<pubDate>Thu, 18 Nov 2010 23:17:39 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Geek]]></category>
		<category><![CDATA[devoxx]]></category>

		<guid isPermaLink="false">http://www.frogcake.net/blog/?p=1022</guid>
		<description><![CDATA[Joe Darcy and Maurizio Cimadamore gave a preview of the changes coming up in Project Coin. These are small changes to the Java language that will be added to Java 7. They all look pretty useful and include: Strings in switch Collection literals &#60;&#62; (generic type inference) Multicatch catch &#40;ClassNotFoundException &#124; NoSuchMethodException e&#41; &#123; // [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.frogcake.net/blog/wp-content/uploads/2010/11/LogoDevoxx150dpi.jpg" ><img hspace="1em"  vspace="1em"  align="right"  class="alignright size-medium wp-image-994"  title="LogoDevoxx150dpi"  src="http://www.frogcake.net/blog/wp-content/uploads/2010/11/LogoDevoxx150dpi-300x112.jpg"  alt=""  width="300"  height="112"   style="float:right; margin:0 0 1em 1em; border:black 1px solid;"/></a>Joe Darcy and Maurizio Cimadamore gave a preview of the changes coming up in <a href="http://openjdk.java.net/projects/coin/" >Project Coin</a>. These are small changes to the Java language that will be added to Java 7. They all look pretty useful and include:</p>
<ul>
<li>Strings in switch</li>
<li>Collection literals</li>
<li>&lt;&gt; (generic type inference)</li>
<li>Multicatch</li>
</ul>

<div class="wp_syntax" ><div class="code" ><pre class="java"  style="font-family:monospace;" ><span style="color: #000000; font-weight: bold;" >catch</span> <span style="color: #009900;" >&#40;</span><span style="color: #003399;" >ClassNotFoundException</span> <span style="color: #339933;" >|</span> <span style="color: #003399;" >NoSuchMethodException</span> e<span style="color: #009900;" >&#41;</span> <span style="color: #009900;" >&#123;</span>
    <span style="color: #666666; font-style: italic;" >// Do something</span>
    <span style="color: #000000; font-weight: bold;" >throw</span><span style="color: #009900;" >&#40;</span>e<span style="color: #009900;" >&#41;</span><span style="color: #339933;" >;</span>
<span style="color: #009900;" >&#125;</span></pre></div></div>

<p>Bill Pugh&#8217;s session was as popular as expected for his talk about defective code and how static analysis with <a href="http://findbugs.sourceforge.net/" >FindBugs</a> can help. I&#8217;ve heard Bill talk about this stuff before but this time he was emphasising that not all bugs are equal. All code has bugs but some mistakes don&#8217;t really matter.</p>
<p>Google&#8217;s code has over 1000 null pointer bugs but few if any NullPointerExceptions in running code are caused by these. You need to determine which bugs are worth your time to fix.</p>
<p>The most important bugs are generally those which can cost you money on the first day they manifest themselves and those bugs that occur silently. This is why Bill is a fan of runtime exceptions; if something unexpected happens, you want to know about it.</p>
<p>Devoxx is held in a massive cinema complex and so after all the talks today the organisers put on a showing of <a href="http://www.imdb.com/title/tt1285016/" ><em>The Social Network</em></a>, a movie about the founders of Facebook. I really enjoyed the film. All the performances were great and I really liked the soundtrack by Trent Reznor. You don&#8217;t need to be a geek to enjoy this film. I don&#8217;t know how much of it is actually true but it paints an interesting picture of Mark Zuckerberg and draws nice connections between our concepts of &#8216;friendship&#8217;.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.frogcake.net/blog/2010/11/18/devoxx-project-coin-defective-java-and-the-social-network/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Devoxx &#8211; Improve the performance of your Spring app</title>
		<link>http://www.frogcake.net/blog/2010/11/17/devoxx-improve-the-performance-of-your-spring-app</link>
		<comments>http://www.frogcake.net/blog/2010/11/17/devoxx-improve-the-performance-of-your-spring-app#comments</comments>
		<pubDate>Wed, 17 Nov 2010 21:43:49 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Geek]]></category>
		<category><![CDATA[devoxx]]></category>

		<guid isPermaLink="false">http://www.frogcake.net/blog/?p=1011</guid>
		<description><![CDATA[This talk by Costin Leau was about the new caching features in Spring 3.1. After going over some problems you can face when caching (stale data, thrashing, distributed caches) and different caching patterns he introduced the declarative caching of Spring 3.1. It uses AOP and can be declared on methods by adding the @Cacheable annotation. [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.frogcake.net/blog/wp-content/uploads/2010/11/LogoDevoxx150dpi.jpg" ><img hspace="1em"  vspace="1em"  align="right"  class="alignright size-medium wp-image-994"  title="LogoDevoxx150dpi"  src="http://www.frogcake.net/blog/wp-content/uploads/2010/11/LogoDevoxx150dpi-300x112.jpg"  alt=""  width="300"  height="112"   style="float:right; margin:0 0 1em 1em; border:black 1px solid;"/></a>This talk by Costin Leau was about the new caching features in Spring 3.1.</p>
<p>After going over some problems you can face when caching (stale data, thrashing, distributed caches) and different caching patterns he introduced the declarative caching of Spring 3.1.</p>
<p>It uses AOP and can be declared on methods by adding the @Cacheable annotation. This annotation caches a method&#8217;s return value using it&#8217;s parameters as the key although this can be customised.</p>
<p>Eg:</p>

<div class="wp_syntax" ><div class="code" ><pre class="java"  style="font-family:monospace;" >@Cacheable
<span style="color: #000000; font-weight: bold;" >public</span> <span style="color: #003399;" >Owner</span> loadOwner<span style="color: #009900;" >&#40;</span><span style="color: #000066; font-weight: bold;" >int</span> id<span style="color: #009900;" >&#41;</span><span style="color: #339933;" >;</span>
&nbsp;
@Cacheable<span style="color: #009900;" >&#40;</span><span style="color: #0000ff;" >&quot;owners&quot;</span><span style="color: #009900;" >&#41;</span>
<span style="color: #000000; font-weight: bold;" >public</span> <span style="color: #003399;" >Owner</span> loadOwner<span style="color: #009900;" >&#40;</span><span style="color: #000066; font-weight: bold;" >int</span> id<span style="color: #009900;" >&#41;</span><span style="color: #339933;" >;</span>
&nbsp;
<span style="color: #666666; font-style: italic;" >// Using Spring expression language</span>
@Cacheable<span style="color: #009900;" >&#40;</span>key<span style="color: #339933;" >=</span><span style="color: #0000ff;" >&quot;tag.name&quot;</span><span style="color: #009900;" >&#41;</span>
<span style="color: #000000; font-weight: bold;" >public</span> <span style="color: #003399;" >Owner</span> loadOwner<span style="color: #009900;" >&#40;</span>Tag tag, <span style="color: #003399;" >Date</span> created<span style="color: #009900;" >&#41;</span><span style="color: #339933;" >;</span>
&nbsp;
@Cacheable<span style="color: #009900;" >&#40;</span>key<span style="color: #339933;" >=</span><span style="color: #0000ff;" >&quot;T(someType).hash(name)&quot;</span><span style="color: #009900;" >&#41;</span>
<span style="color: #000000; font-weight: bold;" >public</span> <span style="color: #003399;" >Owner</span> loadOwner<span style="color: #009900;" >&#40;</span><span style="color: #003399;" >String</span> name<span style="color: #009900;" >&#41;</span><span style="color: #339933;" >;</span>
&nbsp;
<span style="color: #666666; font-style: italic;" >// Only cache on condition</span>
@Cacheable<span style="color: #009900;" >&#40;</span>condition<span style="color: #339933;" >=</span><span style="color: #0000ff;" >&quot;name &lt; 10&quot;</span><span style="color: #009900;" >&#41;</span>
<span style="color: #000000; font-weight: bold;" >public</span> <span style="color: #003399;" >Owner</span> loadOwner<span style="color: #009900;" >&#40;</span><span style="color: #003399;" >String</span> name, <span style="color: #003399;" >Date</span> created<span style="color: #009900;" >&#41;</span><span style="color: #339933;" >;</span></pre></div></div>

<p>The @CacheEvict annotation invalidates the cache:</p>

<div class="wp_syntax" ><div class="code" ><pre class="java"  style="font-family:monospace;" >@CacheEvict
<span style="color: #000000; font-weight: bold;" >public</span> <span style="color: #000066; font-weight: bold;" >void</span> deleteOwner<span style="color: #009900;" >&#40;</span><span style="color: #000066; font-weight: bold;" >int</span> id<span style="color: #009900;" >&#41;</span><span style="color: #339933;" >;</span>
&nbsp;
@CacheEvict<span style="color: #009900;" >&#40;</span><span style="color: #0000ff;" >&quot;owners&quot;</span>, key<span style="color: #339933;" >=</span><span style="color: #0000ff;" >&quot;id&quot;</span><span style="color: #009900;" >&#41;</span>
<span style="color: #000000; font-weight: bold;" >public</span> <span style="color: #000066; font-weight: bold;" >void</span> deleteOwner<span style="color: #009900;" >&#40;</span><span style="color: #000066; font-weight: bold;" >int</span> id, <span style="color: #000066; font-weight: bold;" >boolean</span> saveCopy<span style="color: #009900;" >&#41;</span><span style="color: #339933;" >;</span>
&nbsp;
@CacheEvict<span style="color: #009900;" >&#40;</span>name<span style="color: #339933;" >=</span><span style="color: #0000ff;" >&quot;owners&quot;</span>, allEntries<span style="color: #339933;" >=</span><span style="color: #000066; font-weight: bold;" >true</span><span style="color: #009900;" >&#41;</span>
<span style="color: #000000; font-weight: bold;" >public</span> <span style="color: #000066; font-weight: bold;" >void</span> batchUpdate<span style="color: #009900;" >&#40;</span><span style="color: #009900;" >&#41;</span></pre></div></div>

<p>You can also use your own stereotype annotations. Instead of spreading @Cacheable everywhere:</p>

<div class="wp_syntax" ><div class="code" ><pre class="java"  style="font-family:monospace;" >@Retention<span style="color: #009900;" >&#40;</span>RetentionPolicy.<span style="color: #006633;" >RUNTIME</span><span style="color: #009900;" >&#41;</span>
@Target<span style="color: #009900;" >&#40;</span><span style="color: #009900;" >&#123;</span>ElementType.<span style="color: #006633;" >METHOD</span><span style="color: #009900;" >&#125;</span><span style="color: #009900;" >&#41;</span>
@Cacheable<span style="color: #009900;" >&#40;</span><span style="color: #0000ff;" >&quot;results&quot;</span><span style="color: #009900;" >&#41;</span>
<span style="color: #000000; font-weight: bold;" >public</span> @<span style="color: #000000; font-weight: bold;" >interface</span> SlowService <span style="color: #009900;" >&#123;</span>
&nbsp;
<span style="color: #009900;" >&#125;</span>
&nbsp;
@SlowService
<span style="color: #000000; font-weight: bold;" >public</span> Source search<span style="color: #009900;" >&#40;</span><span style="color: #003399;" >String</span> tag<span style="color: #009900;" >&#41;</span> <span style="color: #009900;" >&#123;</span>...<span style="color: #009900;" >&#125;</span></pre></div></div>

<p>Spring is not a cache provider itself. You plug in your own cache provider (ehcache, JBoss Cache, etc).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.frogcake.net/blog/2010/11/17/devoxx-improve-the-performance-of-your-spring-app/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Devoxx &#8211; Performance Anxiety</title>
		<link>http://www.frogcake.net/blog/2010/11/17/devoxx-performance-anxiety</link>
		<comments>http://www.frogcake.net/blog/2010/11/17/devoxx-performance-anxiety#comments</comments>
		<pubDate>Wed, 17 Nov 2010 21:20:49 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Geek]]></category>
		<category><![CDATA[devoxx]]></category>

		<guid isPermaLink="false">http://www.frogcake.net/blog/?p=1008</guid>
		<description><![CDATA[I doubt Joshua Bloch suffers from performance anxiety but it was slightly ironic that there were some technical problems before he started his talk, titled Performance Anxiety, to an absolutely packed room at Devoxx today. I knew it would be a popular session so I got there early and so managed to find a seat, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.frogcake.net/blog/wp-content/uploads/2010/11/LogoDevoxx150dpi.jpg" ><img hspace="1em"  vspace="1em"  align="right"  class="alignright size-medium wp-image-994"  title="LogoDevoxx150dpi"  src="http://www.frogcake.net/blog/wp-content/uploads/2010/11/LogoDevoxx150dpi-300x112.jpg"  alt=""  width="300"  height="112"   style="float:right; margin:0 0 1em 1em; border:black 1px solid;"/></a>I doubt Joshua Bloch suffers from performance anxiety but it was slightly ironic that there were some technical problems before he started his talk, titled <em>Performance Anxiety</em>, to an absolutely packed room at Devoxx today. I knew it would be a popular session so I got there early and so managed to find a seat, unlike the others who sat on the steps or crowded the doorway.</p>
<p>His talk was about <em>microbenchmarking</em> &#8211; measuring the performance of a small piece of code as opposed to <em>profiling</em> an application.</p>
<p>In the good old days performance could be estimated simply by counting program instructions. Now it is simply impossible to do this because of the &#8216;abstraction gap&#8217;.  As code has become more and more complex it has become harder and harder to estimate and measure the performance.  Complexity and predictability are inversely related.</p>
<p>Even benchmarking code doesn&#8217;t really work with consecutive runs often showing a variance of 20%. The code and systems are so complex nobody really knows where this variance comes from.</p>
<p>The solution is to run a bunch of JVMs in sequence and then statistically analyse the data (mean, median, standard dev, etc).</p>
<p>Basically, benchmarking is really, really hard and most benchmarks are seriously broken. Either the results are unrelated to the test or the error bars exceed the measured values.</p>
<p><a href="http://code.google.com/p/caliper/" >Caliper</a> is microbenchmarking framework from Google which can help.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.frogcake.net/blog/2010/11/17/devoxx-performance-anxiety/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Devoxx &#8211; The Next Big JVM Language</title>
		<link>http://www.frogcake.net/blog/2010/11/17/devoxx-the-next-big-jvm-language</link>
		<comments>http://www.frogcake.net/blog/2010/11/17/devoxx-the-next-big-jvm-language#comments</comments>
		<pubDate>Wed, 17 Nov 2010 15:22:05 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Geek]]></category>
		<category><![CDATA[devoxx]]></category>

		<guid isPermaLink="false">http://www.frogcake.net/blog/?p=1006</guid>
		<description><![CDATA[Stephen Colebourne gave an entertaining talk to a packed room called The Next Big JVM Language. He went over the features of such new JVM languages as Groovy, Clojure, Scala and Fantom (which I&#8217;d never heard of). He seemed to be leaning toward Fantom as the language of choice before delivering the punchline that the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.frogcake.net/blog/wp-content/uploads/2010/11/LogoDevoxx150dpi.jpg" ><img hspace="1em"  vspace="1em"  align="right"  class="alignright size-medium wp-image-994"  title="LogoDevoxx150dpi"  src="http://www.frogcake.net/blog/wp-content/uploads/2010/11/LogoDevoxx150dpi-300x112.jpg"  alt=""  width="300"  height="112"   style="float:right; margin:0 0 1em 1em; border:black 1px solid;"/></a>Stephen Colebourne gave an entertaining talk to a packed room called The Next Big JVM Language. He went over the features of such new JVM languages as Groovy, Clojure, Scala and <a href="http://fantom.org/" >Fantom</a> (which I&#8217;d never heard of).</p>
<p>He seemed to be leaning toward Fantom as the language of choice before delivering the punchline that the best candidate for the Next Big Language might be a backwards incompatible version of Java itself.</p>
<p>I think I agree. Oracle should get rid of all that legacy crap in JDK 9.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.frogcake.net/blog/2010/11/17/devoxx-the-next-big-jvm-language/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Devoxx day two</title>
		<link>http://www.frogcake.net/blog/2010/11/16/devoxx-day-two</link>
		<comments>http://www.frogcake.net/blog/2010/11/16/devoxx-day-two#comments</comments>
		<pubDate>Tue, 16 Nov 2010 21:46:15 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Geek]]></category>
		<category><![CDATA[devoxx]]></category>

		<guid isPermaLink="false">http://www.frogcake.net/blog/?p=1000</guid>
		<description><![CDATA[A couple of pretty heavy-going sessions at Devoxx today. First up was Cassandra by Example with Jonathan Ellis one of the founders of Cassandra support company Riptano. I have already had some experience with Cassandra at both my previous and current jobs but it was good to go over the principals of Cassandra as well [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.frogcake.net/blog/wp-content/uploads/2010/11/LogoDevoxx150dpi.jpg" ><img hspace="1em"  vspace="1em"  align="right"  class="alignright size-medium wp-image-994"  title="LogoDevoxx150dpi"  src="http://www.frogcake.net/blog/wp-content/uploads/2010/11/LogoDevoxx150dpi-300x112.jpg"  alt=""  width="300"  height="112"   style="float:right; margin:0 0 1em 1em; border:black 1px solid;"/></a>A couple of pretty heavy-going sessions at Devoxx today. First up was Cassandra by Example with Jonathan Ellis one of the founders of Cassandra support company <a href="http://www.riptano.com/" >Riptano</a>.</p>
<p>I have already had some experience with Cassandra at both my <a href="http://www.openx.org" >previous</a> and <a href="http://www.amee.com" >current</a> jobs but it was good to go over the principals of Cassandra as well as seeing an example application deconstructed.</p>
<p>Cassandra&#8217;s strengths are:</p>
<ul>
<li>Scalability</li>
<li>Reliability</li>
<li>No single point of failure</li>
<li>Multiple data centre support</li>
<li>Integrated <a href="http://hadoop.apache.org/" >Hadoop</a> support (lets you run map reduce jobs on data in Cassandra without any ETL)</li>
</ul>
<p>Of course Cassandra is not ACID and has limited support for OLTP ad-hoc queries. However, companies that have really scaled traditional RDBMSs like MySQL or Oracle end up dispensing with these features anyway in order to achieve that scale.</p>
<p>Jonathan had an interesting quote from Twitter:</p>
<blockquote  style="margin:1em; padding:0 2em; background:url(http://www.frogcake.net/blog/wp-content/themes/panorama/images/quotes.gif) no-repeat left top; color:#888;margin:1em; padding:0 2em; background:url(http://www.frogcake.net/blog/wp-content/themes/panorama/images/quotes.gif) no-repeat left top; color:#888;"><p>It used to take 2 weeks to perform an ALTER TABLE on the tweets table</p></blockquote>
<p>This is  definitely something I can sympathise with. If you don&#8217;t plan ahead it can be easy to suddenly find your tables are so big they cannot be changed without serious pain, downtime or both.</p>
<p>When designing a relational schema we tend to think of objects and relationships. With Cassandra we need to think of objects and the queries we want to run against them. For each type of query you will need a column family (something <em>like</em> a table).</p>
<p>When choosing a key for rows, a natural key is best. If you need a surrogate key, use a UUID as integers may create collisions due to the distributed nature of Cassandra. <a href="http://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_.28MAC_address.29" >Version 1 UUIDs</a> can be sorted by time but if you don&#8217;t need time ordering, use <a href="http://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_.28random.29" >version 4 UUID</a>.</p>
<p>Using <a href="http://wiki.apache.org/cassandra/API" >Thrift</a> directly should be avoided at all costs in favour of higher level libraries like <a href="https://github.com/rantav/hector" >Hector</a>. There is a JPA implementation called <a href="http://code.google.com/p/kundera/" >Kundera</a> but this is based around Lucene so unless search is an important part of your application it may not be the best choice.</p>
<p>The afternoon was spent learning what&#8217;s new in Hibernate with Emmanuel Bernard from JBoss.</p>
<p>Fetch profiles can be defined and chosen at runtime, eg:</p>

<div class="wp_syntax" ><div class="code" ><pre class="java"  style="font-family:monospace;" >@<span style="color: #003399;" >Entity</span>
@FetchProfile<span style="color: #009900;" >&#40;</span>name <span style="color: #339933;" >=</span> <span style="color: #0000ff;" >&quot;all&quot;</span>,
    fetchOverrides <span style="color: #339933;" >=</span> <span style="color: #009900;" >&#123;</span>
        @FetchProfile.<span style="color: #006633;" >FetchOverride</span><span style="color: #009900;" >&#40;</span>
            entity <span style="color: #339933;" >=</span> Customer.<span style="color: #000000; font-weight: bold;" >class</span>,
            association <span style="color: #339933;" >=</span> <span style="color: #0000ff;" >&quot;orders&quot;</span>,
            mode <span style="color: #339933;" >=</span> FetchMode.<span style="color: #006633;" >JOIN</span><span style="color: #009900;" >&#41;</span>
        @FetchProfile.<span style="color: #006633;" >FetchOverride</span><span style="color: #009900;" >&#40;</span>
            entity <span style="color: #339933;" >=</span> Order.<span style="color: #000000; font-weight: bold;" >class</span>,
            association <span style="color: #339933;" >=</span> <span style="color: #0000ff;" >&quot;country&quot;</span>,
            mode <span style="color: #339933;" >=</span> FetchMode.<span style="color: #006633;" >JOIN</span><span style="color: #009900;" >&#41;</span>
<span style="color: #009900;" >&#125;</span><span style="color: #009900;" >&#41;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;" >public</span> <span style="color: #000000; font-weight: bold;" >class</span> Customer <span style="color: #009900;" >&#123;</span>
    @Id @GeneratedValue <span style="color: #000000; font-weight: bold;" >private</span> <span style="color: #000066; font-weight: bold;" >long</span> id<span style="color: #339933;" >;</span>
    <span style="color: #000000; font-weight: bold;" >private</span> <span style="color: #003399;" >String</span> name<span style="color: #339933;" >;</span>
    <span style="color: #000000; font-weight: bold;" >private</span> <span style="color: #000066; font-weight: bold;" >long</span> customerNumber<span style="color: #339933;" >;</span>
    @OneToMany <span style="color: #000000; font-weight: bold;" >private</span> Set<span style="color: #339933;" >&amp;</span>lt<span style="color: #339933;" >;</span>Order<span style="color: #339933;" >&amp;</span>gt<span style="color: #339933;" >;</span> orders<span style="color: #339933;" >;</span>
&nbsp;
<span style="color: #666666; font-style: italic;" >// standard getter/setter</span>
<span style="color: #009900;" >&#125;</span>
&nbsp;
Session session <span style="color: #339933;" >=</span> ...<span style="color: #339933;" >;</span>
session.<span style="color: #006633;" >enableFetchProfile</span><span style="color: #009900;" >&#40;</span> <span style="color: #0000ff;" >&quot;all&quot;</span> <span style="color: #009900;" >&#41;</span><span style="color: #339933;" >;</span>  <span style="color: #666666; font-style: italic;" >// name matches @FetchProfile name</span>
Customer customer <span style="color: #339933;" >=</span> <span style="color: #009900;" >&#40;</span>Customer<span style="color: #009900;" >&#41;</span> session.<span style="color: #006633;" >get</span><span style="color: #009900;" >&#40;</span> Customer.<span style="color: #000000; font-weight: bold;" >class</span>, customerId <span style="color: #009900;" >&#41;</span><span style="color: #339933;" >;</span>
session.<span style="color: #006633;" >disableFetchProfile</span><span style="color: #009900;" >&#40;</span> <span style="color: #0000ff;" >&quot;all&quot;</span> <span style="color: #009900;" >&#41;</span><span style="color: #339933;" >;</span> <span style="color: #666666; font-style: italic;" >// or just close the session</span></pre></div></div>

<p>A lot of time was spent on the Criteria API which lets you write object oriented, type-safe and strongly typed queries.</p>
<p>Hibernate Search provides lucene-based full text search for Hibernate and looks quite neat. You get transparent index synchronisation and support for clustering and loading of massive indexes.</p>
<p><a href="http://docs.jboss.org/envers/docs/index.html" >Hibernate Envers</a> also looks really interesting. This is a framework for dealing with historical data in Hibernate.</p>
<p>Entities are versioned and all changes (insert, update, delete) are audited transparently. The existing tables are unchanged but new audit tables are created for each entity. For example a Person table will get a Person_AUD table. This looks the same with the addition of revision number and revision type (add, delete, modify) columns.</p>
<p>You can look up by revision and query by revision or entity history. You can also define a RevisionEntity to add new fields atop the standard revision number and date.</p>
<p>It looks really helpful for auditing and dealing with historical data although there is of course a performance hit to inserts, updates and deletes as the audit table must be written to as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.frogcake.net/blog/2010/11/16/devoxx-day-two/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Devoxx day one</title>
		<link>http://www.frogcake.net/blog/2010/11/15/devoxx-day-one</link>
		<comments>http://www.frogcake.net/blog/2010/11/15/devoxx-day-one#comments</comments>
		<pubDate>Mon, 15 Nov 2010 23:08:46 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Geek]]></category>
		<category><![CDATA[devoxx]]></category>

		<guid isPermaLink="false">http://www.frogcake.net/blog/?p=993</guid>
		<description><![CDATA[Today was the first day of Devoxx, the European Java conference held in Antwerp. The first two days are actually the &#8216;University&#8217; sessions. These are longer, more in depth talks and the first one I went to was the &#8216;Productive Programmer&#8217; by Neal Ford from Thoughtworks. This was an interesting talk split into two sections, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.frogcake.net/blog/wp-content/uploads/2010/11/LogoDevoxx150dpi.jpg" ><img hspace="1em"  vspace="1em"  align="right"  class="alignright size-medium wp-image-994"  title="LogoDevoxx150dpi"  src="http://www.frogcake.net/blog/wp-content/uploads/2010/11/LogoDevoxx150dpi-300x112.jpg"  alt=""  width="300"  height="112"   style="float:right; margin:0 0 1em 1em; border:black 1px solid;"/></a>Today was the first day of Devoxx, the European Java conference held in Antwerp.</p>
<p>The first two days are actually the &#8216;University&#8217; sessions. These are longer, more in depth talks and the first one I went to was the &#8216;Productive Programmer&#8217; by Neal Ford from Thoughtworks.</p>
<p>This was an interesting talk split into two sections, the first dealing with the mechanics of productivity and the second consisting of a number of tips putting these principals into practice.</p>
<p>The overarching theme was that &#8220;any time you are doing simple repetitive stuff on behalf of your computer it is laughing at you&#8221;. This means don&#8217;t type the same commands over and over but it also means learning keyboard shortcuts for your IDE and OS.</p>
<p>Neal demonstrated the <a href="http://plugins.intellij.net/plugin/?id=1003" >Key Promoter plugin</a> for IntelliJ which will pop up keyboard shortcuts whenever you use a menu item instead. I already use the GOTO class shortcut in IntelliJ all the time but didn&#8217;t know you can just type the capital letters of a class and it will find it. For example type &#8216;mac&#8217; to find MyAwesomeClass.</p>
<p>Neal is so productive he doesn&#8217;t even bother to type the left hand side of statements in IntelliJ; he lets the IDE fill that in for him (using introduce variable). <img src="http://www.frogcake.net/blog/wp-includes/images/smilies/icon_smile.gif"  alt=":-)"  class="wp-smiley" /> </p>
<p>Neal also talked about a concept called &#8216;locus of attention&#8217; and the need to make your environment quiet to preserve your locus of attention. The higher the level of concentration, the denser the ideas, so turn off notifications, don&#8217;t keep email open all the time. Windows is the worst at stealing focus; &#8220;it is like a bored 3 year old&#8221;. Another reason why 80% of people here seem to have Macs&#8230; I quite like the idea of using something like <a href="http://www.lachoseinteractive.net/en/products/doodim/" >Doodim</a> to gradually dim everything on your desktop apart from the application you are working in.</p>
<p>The problem with using graphical tools to navigate a file system or class structure is that the hierarchies are too deep. Any time you know where you want to get to already it will be faster to search than to navigate. So make use of shortcuts like GOTO class or OSX menu item search.</p>
<p>Another neat idea was to use <a href="http://seleniumhq.org/" >Selenium</a> to record interactions for debugging web apps. Rather than having to repeatedly click through a sequence to get to where you need to be in the app, simply record the sequence using Selenium and play it back instantly. Even better: get your QA team to record a Selenium script to reproduce a bug and have them attach that to the JIRA ticket instead of a screenshot.</p>
<p>Neal suggests to always use a &#8216;real&#8217; programming language for scripting (groovy, ruby, php) instead of sed or awk. This allows your little tools to grow into assets and lets you add unit tests and refactor.</p>
<p>The second major session was an introduction to MongoDB by Alvin Richards. This was a pretty in depth session and as he said it was a bit like drinking from the firehose but I came away liking what I saw.</p>
<p>MongoDB belongs to the so-called NoSQL family of data stores and is &#8216;document oriented&#8217;. Documents are stored as binary JSON and the schema is not fixed. This makes it really easy for your schema to evolve with your application.</p>
<p>With MongoDB you get all this built in:</p>
<ul>
<li>Horizontal scaling</li>
<li>Simplified schema evolution</li>
<li>Simplified deployment and operation</li>
</ul>
<p>Reads can be scaled using replica sets. These are a cluster of servers where any node can be the primary and failover/recovery is handled automatically. All writes go to the primary node.</p>
<p>Writes can be scaled using automatic sharding. MongoDB&#8217;s sharding is transparent to the application code and migrations and rebalancing are handled automatically with no down-time(!)</p>
<p>You can write Map Reduce functions in JavaScript for MongoDB.</p>
<p>You can either use the low-level java library to talk to MongoDB or use <a href="http://code.google.com/p/morphia/" >Morphia</a> which provides a kind of O/R wrapper to map your POJOs. Morphia gives you Annotations like @Entity, @Transient, @Indexed, @PrePersist, @PreSave, @PostPersist, etc.</p>
<p>To backup MongoDB you can either use mongodump/mongorestore which gives you a binary dump that is not neccesarily consistent from start to finish or use fsync + lock from a slave and then snapshot the files.</p>
<p>It was a long day but a good start to the conference. Tomorrow I&#8217;m starting with another NoSQL data store: Cassandra.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.frogcake.net/blog/2010/11/15/devoxx-day-one/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My portfolio</title>
		<link>http://www.frogcake.net/blog/2010/08/07/my-portfolio</link>
		<comments>http://www.frogcake.net/blog/2010/08/07/my-portfolio#comments</comments>
		<pubDate>Sat, 07 Aug 2010 12:07:56 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Stuff]]></category>

		<guid isPermaLink="false">http://www.frogcake.net/blog/?p=987</guid>
		<description><![CDATA[My Kiva portfolio is looking pretty balanced. Possibly a little skewed towards Tajikistan retail.]]></description>
			<content:encoded><![CDATA[<p>My <a href="http://www.kiva.org/lender/frogcake" >Kiva</a> portfolio is looking pretty balanced. Possibly a little skewed towards Tajikistan retail.</p>
<p style="text-align: center;" ><a rel="lightbox"  href="http://www.frogcake.net/blog/wp-content/uploads/2010/08/portfolio.png" ><img hspace="auto"  class="aligncenter size-medium wp-image-989"  title="Kiva portfolio"  src="http://www.frogcake.net/blog/wp-content/uploads/2010/08/portfolio-300x215.png"  alt=""  width="300"  height="215"   style="display: block; margin-left: auto; margin-right: auto; border:black 1px solid;"/></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.frogcake.net/blog/2010/08/07/my-portfolio/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Car of tomorrow</title>
		<link>http://www.frogcake.net/blog/2010/07/17/car-of-tomorrow</link>
		<comments>http://www.frogcake.net/blog/2010/07/17/car-of-tomorrow#comments</comments>
		<pubDate>Sat, 17 Jul 2010 14:44:43 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Stuff]]></category>

		<guid isPermaLink="false">http://www.frogcake.net/blog/?p=979</guid>
		<description><![CDATA[Just look at this car. It looks like it belongs in the Jetsons or one of those &#8216;world of tomorrow&#8217; articles in a 1950&#8242;s edition of Popular Mechanics. There is also something unmistakeably French about it. In fact it is a Panhard CD from 1964 and it was designed to take on the Ferraris, Cobras [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.frogcake.net/blog/wp-content/uploads/2010/07/IMG_0051.jpg" ><img hspace="1em"  vspace="1em"  align="right"  class="alignright size-medium wp-image-980"  title="Panhard CD 3"  src="http://www.frogcake.net/blog/wp-content/uploads/2010/07/IMG_0051-300x199.jpg"  alt=""  width="300"  height="199"   style="float:right; margin:0 0 1em 1em; border:black 1px solid;"/></a>Just look at this car. It looks like it belongs in the Jetsons or one of those &#8216;world of tomorrow&#8217; articles in a 1950&#8242;s edition of <em>Popular Mechanics</em>. There is also something unmistakeably French about it.</p>
<p>In fact it is a Panhard CD from 1964 and it was designed to take on the Ferraris, Cobras and Fords at Le Mans. It was one of the most technically advanced cars ever built, employing aerodynamics that were years ahead of its time. Unfortunately it failed to finish the race. Panhard now makes military vehicles.</p>
<p>This was just one of the fabulous cars I saw at the Goodwood Festival of Speed the other week. It was the first time I had been but if you have even the slightest interest in racing cars I thoroughly recommend it.</p>
<p>I made a little video of some of the pictures I took. If you want to see more, <a href="http://gallery.frogcake.net/Motorsport/Goodwood-Festival-of-Speed/12803436_c5EEm#937521895_dHkEm" >check out the gallery</a>.</p>
<p><object width="425"  height="240" ><param name="movie"  value="http://cdn.smugmug.com/ria/ShizVidz-2010012201.swf" /><param name="allowFullScreen"  value="true" /><param name="flashVars"  value="s=ZT0xJmk9OTM3NTIxODk1Jms9ZEhrRW0mYT0xMjgwMzQzNl9jNUVFbSZ1PWZyb2djYWtlJnNlPTEmc289MSZoZGI9MSZzYj0xJmZzPTAmbD0xJg==" /><embed src="http://cdn.smugmug.com/ria/ShizVidz-2010012201.swf"  flashvars="s=ZT0xJmk9OTM3NTIxODk1Jms9ZEhrRW0mYT0xMjgwMzQzNl9jNUVFbSZ1PWZyb2djYWtlJnNlPTEmc289MSZoZGI9MSZzYj0xJmZzPTAmbD0xJg=="  width="425"  height="240"  type="application/x-shockwave-flash"  allowfullscreen="true" ></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.frogcake.net/blog/2010/07/17/car-of-tomorrow/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

