<?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/"
	>

<channel>
	<title>underbjerg.com</title>
	<atom:link href="http://www.underbjerg.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.underbjerg.com</link>
	<description>...a strange mix of photography, programming and dance</description>
	<pubDate>Sat, 27 Jun 2009 15:05:22 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>New York City and Frankie Manning</title>
		<link>http://www.underbjerg.com/2009/06/10/new-york-city-and-frankie-manning/</link>
		<comments>http://www.underbjerg.com/2009/06/10/new-york-city-and-frankie-manning/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 19:17:49 +0000</pubDate>
		<dc:creator>erik</dc:creator>
		
		<category><![CDATA[Lindy Hop]]></category>

		<category><![CDATA[Photography]]></category>

		<guid isPermaLink="false">http://www.underbjerg.com/?p=276</guid>
		<description><![CDATA[I recently had the pleasure of spending 7 days in New York City, in connection with Frankie95 - a festival to celebrate the life and 95th birthday of Frankie Manning, a Lindy Hop legend. Sadly, he passed away only weeks before thousands of dancers from around the world showed up in New York, which meant [...]]]></description>
			<content:encoded><![CDATA[<p>I recently had the pleasure of spending 7 days in New York City, in connection with <a href="http://www.frankie95.com">Frankie95</a> - a festival to celebrate the life and 95th birthday of <a href="http://www.frankiemanning.com/">Frankie Manning</a>, a Lindy Hop legend. Sadly, he passed away only weeks before thousands of dancers from around the world showed up in New York, which meant the event transformed into a memorial event, celebrating his life and the dance he helped create. There&#8217;s a really good short documentary <a href="http://www.thirteen.org/sundayarts/frankie-manning-never-stop-swinging/291">here</a>, about Lindy Hop and Frankie Manning in particular.</p>
<p>Frankie95 was absolutely fantastic, and in-between all the dancing, performances, and great bands, there was even time for some sightseeing around New York. I&#8217;ve uploaded a couple of pictures on Flickr (below), and you can see even more <a href="http://www.facebook.com/album.php?aid=121326&#038;id=773164936&#038;l=359df42c3f">here (sightseeing)</a> and <a href="http://www.facebook.com/album.php?aid=118588&#038;id=773164936&#038;l=aae8e68ad3">here (dancing)</a>.</p>
				<div id="gallery-f3c055a8" class="flickr-gallery photoset">
													<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3614766274"><img class="photo" title="Skyline" src="http://farm4.static.flickr.com/3600/3614766274_eb80f3a057_s.jpg" alt="Skyline" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3614766666"><img class="photo" title="Statue of Liberty sunset" src="http://farm4.static.flickr.com/3364/3614766666_517d3f1ec8_s.jpg" alt="Statue of Liberty sunset" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3614767272"><img class="photo" title="Empire Nite" src="http://farm4.static.flickr.com/3321/3614767272_910bcacebb_s.jpg" alt="Empire Nite" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3614767838"><img class="photo" title="Looking up" src="http://farm4.static.flickr.com/3604/3614767838_ee5b865451_s.jpg" alt="Looking up" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3614768268"><img class="photo" title="Trump Tower" src="http://farm3.static.flickr.com/2418/3614768268_6f904df112_s.jpg" alt="Trump Tower" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3628844097"><img class="photo" title="Firetruck action" src="http://farm4.static.flickr.com/3605/3628844097_628d4f770a_s.jpg" alt="Firetruck action" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3629657694"><img class="photo" title="NY skyline viewed from Brooklyn Bridge" src="http://farm4.static.flickr.com/3645/3629657694_d39bf5c891_s.jpg" alt="NY skyline viewed from Brooklyn Bridge" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3628845883"><img class="photo" title="Tina and Brooklyn bridge" src="http://farm4.static.flickr.com/3379/3628845883_9d8eb8d9cb_s.jpg" alt="Tina and Brooklyn bridge" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3629660232"><img class="photo" title="Brooklyn Bridge" src="http://farm3.static.flickr.com/2476/3629660232_e329275128_s.jpg" alt="Brooklyn Bridge" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3628842079"><img class="photo" title="NY from above" src="http://farm3.static.flickr.com/2434/3628842079_e56edd7d20_s.jpg" alt="NY from above" /></a>
								</div>
															<div class="flickr-thumb">
									<a href="http://flickr.com/photo.gne?id=3629652948"><img class="photo" title="Empire State slot machine" src="http://farm4.static.flickr.com/3359/3629652948_0b38a64910_s.jpg" alt="Empire State slot machine" /></a>
								</div>
												<div class="fg-clear"></div>
				</div>
												<div class="fg-clear"></div>
							<script type="text/javascript">
											jQuery(document).ready(function(){
							jQuery("#gallery-f3c055a8 .flickr-thumb img").flightbox();
						});
										
										//-->
				</script>
			
]]></content:encoded>
			<wfw:commentRss>http://www.underbjerg.com/2009/06/10/new-york-city-and-frankie-manning/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Unlocking an iPhone 3G from Telia</title>
		<link>http://www.underbjerg.com/2009/02/25/unlocking-an-iphone-3g-from-telia/</link>
		<comments>http://www.underbjerg.com/2009/02/25/unlocking-an-iphone-3g-from-telia/#comments</comments>
		<pubDate>Wed, 25 Feb 2009 18:53:39 +0000</pubDate>
		<dc:creator>erik</dc:creator>
		
		<category><![CDATA[Other]]></category>

		<guid isPermaLink="false">http://www.underbjerg.com/?p=100</guid>
		<description><![CDATA[Today I managed to properly unlock my iPhone 3G, which was previously locked to the Telia operator in Denmark. Due to the incompetence of Telia&#8217;s customer service, something which should have taken a couple of hours  took a total of 7(!) days, during which time my phone was not working. By sharing this, and [...]]]></description>
			<content:encoded><![CDATA[<p>Today I managed to properly unlock my iPhone 3G, which was previously locked to the Telia operator in Denmark. Due to the incompetence of Telia&#8217;s customer service, something which should have taken a couple of hours  took a total of 7(!) days, during which time my phone was not working. By sharing this, and the solution below, I hope others won&#8217;t have to waste so much time.<br />
<span id="more-100"></span><br />
After the lock-in period with Telia had expired (in Denmark that is 6 months by law), I called their customer service to have my iPhone unlocked, so I could use the SIM card from the operator I had switched to. The support person told me that he had now unlocked the iPhone, and all I had to do was connect it to iTunes, for the unlock to take effect.</p>
<p>But it didn&#8217;t work. The display still showed the &#8220;SIM locked&#8221;. To make a long story short, I then spent the next 5 days repeatedly calling customer service, where they listened to me tell them that whatever they&#8217;re doing wan&#8217;t working, and then made me wait 24 hours (the response time of their technical support), before telling me to try the same thing again. I must have gone through about 7-8 CS representatives, all of which kept telling me to try the same (incorrect) procedure.</p>
<p>What they SHOULD have told me, and what I found out after finally getting a technical support guy to call me, was to connect the iPhone to iTunes AND THEN hit the restore button to restore to factory defaults. After that, I was able to unlock the iPhone.</p>
<p>&#8230;.which lasted for 3 hours&#8230;.</p>
<p>After about 3 hours, I had to turn off the iPhone, and the phone was locked again! Imagine my disappointment. Fortunately, after some time I found out that resetting to factory defaults had also re-enabled the iPhone&#8217;s SIM PIN. So I was seeing &#8220;SIM locked&#8221; not because the phone was locked to the operator, but because I had not yet entered the PIN code. Restoring the phone once more, and going to &#8220;Settings&#8221;-&gt;&#8221;Phone&#8221;-&gt;&#8221;SIM PIN&#8221; allowed me to turn the SIM PIN code off, and everything was back to normal.</p>
<p>So the procedure should have been:</p>
<ol>
<li> Have Telia unlock the iPhone.</li>
<li>Connect to iTunes, and hit the restore button. Remember not to restore from a backup when it asks you - set up a &#8220;new&#8221; phone instead. We want to clear the operator settings.</li>
<li>Browse to &#8220;Settings&#8221;-&gt;&#8221;Phone&#8221;-&gt;&#8221;SIM PIN&#8221;, and flip the SIM PIN toggle, if you don&#8217;t want to enter the PIN code every time you turn your iPhone off and on again.</li>
</ol>
<p>I hope that helps someone. I am certainly never going to use Telia as an operator ever again. I prefer <a href="http://www.telmore.dk">Telmore</a>, which has always been completely reliable, and never caused me any grief.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.underbjerg.com/2009/02/25/unlocking-an-iphone-3g-from-telia/feed/</wfw:commentRss>
		</item>
		<item>
		<title>The Rod</title>
		<link>http://www.underbjerg.com/2009/02/08/the-rod/</link>
		<comments>http://www.underbjerg.com/2009/02/08/the-rod/#comments</comments>
		<pubDate>Sun, 08 Feb 2009 14:01:17 +0000</pubDate>
		<dc:creator>erik</dc:creator>
		
		<category><![CDATA[Photography]]></category>

		<guid isPermaLink="false">http://www.underbjerg.com/?p=76</guid>
		<description><![CDATA[Light is everything, as I re-discovered as a party yesterday, where a glow-row supplied hours of fun and entertainment:






]]></description>
			<content:encoded><![CDATA[<p>Light is everything, as I re-discovered as a party yesterday, where a glow-row supplied hours of fun and entertainment:</p>
<table>
<tr>
<td>						<div class="flickr-gallery image none"><a href="http://www.flickr.com/photos/wonderbjerg/3262497599"><img class="flickr small" title="Maria and The Rod" alt="Maria and The Rod" src="http://farm4.static.flickr.com/3430/3262497599_698af58e03_m.jpg" /></a></div>
					</td>
<td>						<div class="flickr-gallery image none"><a href="http://www.flickr.com/photos/wonderbjerg/3263323082"><img class="flickr small" title="Joan and The Rod" alt="Joan and The Rod" src="http://farm4.static.flickr.com/3359/3263323082_cdb26e2e7b_m.jpg" /></a></div>
					</td>
</tr>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.underbjerg.com/2009/02/08/the-rod/feed/</wfw:commentRss>
		</item>
		<item>
		<title>My Rails production setup</title>
		<link>http://www.underbjerg.com/2009/02/04/rails-production-setup/</link>
		<comments>http://www.underbjerg.com/2009/02/04/rails-production-setup/#comments</comments>
		<pubDate>Wed, 04 Feb 2009 10:13:46 +0000</pubDate>
		<dc:creator>erik</dc:creator>
		
		<category><![CDATA[Coding]]></category>

		<category><![CDATA[hexonet]]></category>

		<category><![CDATA[hosting]]></category>

		<category><![CDATA[monit]]></category>

		<category><![CDATA[newrelic]]></category>

		<category><![CDATA[passenger]]></category>

		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://www.underbjerg.com/?p=49</guid>
		<description><![CDATA[I&#8217;ve recently moved one of the products I&#8217;m maintaining to a new server, because it wasn&#8217;t performing as well as it was supposed to. In the process I&#8217;ve spent some time tweaking the server and simplifying the setup, and the following is an overview over some of the tools I&#8217;ve found most useful.

The application
I thought [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve recently moved one of the products I&#8217;m maintaining to a new server, because it wasn&#8217;t performing as well as it was supposed to. In the process I&#8217;ve spent some time tweaking the server and simplifying the setup, and the following is an overview over some of the tools I&#8217;ve found most useful.<br />
<span id="more-49"></span></p>
<h3>The application</h3>
<p>I thought it might be useful to give you a basic idea of what the application does: The application TidTilMere is a highly specialized administration app for Danish folk high-schools (højskoler). It is build around the idea of having a single place to store information on everyone the school has had contact with, and it therefore spans many different areas:</p>
<ul>
<li>Enrollment: &#8230;for courses (such as &#8220;fall &#8216;09&#8243;) and subjects (ex. &#8220;painting&#8221;)</li>
<li>Accommodation: Room booking and availability</li>
<li>Orders: Ordering of brochures and newsletter signup</li>
<li>Search: Find people based on complex criteria</li>
<li>Mass-mailing: Send template-based emails to people in a search result</li>
<li>Mail-merge: Documents can be produced from people/enrollments in a search result, based on uploaded templates in Word and RTF format.</li>
<li>CRM: A single place to store everyone the school has been in contact with, their contact information, and their relation to the school (including all of the above)</li>
</ul>
<p>The application is used on a daily basis by the schools staff (1-4 people), and has to be very responsive. It is not likely to win any awards for front-end design, but it gets the job done. If you want to know more (and happen to speak danish), you can visit <a href="http://www.tidtilmere.net" target="_blank">TidTilMere.net</a>.</p>
<p>With that out of the way, lets get to the setup.</p>
<h3>The server</h3>
<p>I&#8217;ve been hosting the application with <a href="http://www.hexonet.net" target="_blank">HEXONET</a> for the past two years, and have been very happy with them. The reason I went with them, was that they were hosting out of Germany, which meant lower round-trip-times than a server farm in the US (~20ms vs. ~150ms), and we wanted the application to be very responsive.</p>
<p>HEXONET only sell to companies (not individuals), but have a wide range of virtual server offerings. The few times I&#8217;ve needed to contact support, they&#8217;ve been quick in getting back to me. The old server was a &#8220;vServer Platinum Pro&#8221;, whereas the new server is a &#8220;dServer VNS Premium&#8221;, which translates into 28€ for a Debian-etch with 1500MHz CPU, 45GB HD, 1000GB traffic and 1024MB RAM (1536 MB burstable). You can see more options on their <a href="http://hexonet.net/price-list.php#prservers" target="_blank">feature/price list</a>.</p>
<p>If you need to service customers in the EU, I think HEXONET is a good option.</p>
<h3>Phusion Passenger (mod_rails)</h3>
<p>A couple of weeks ago i switched all my applications from Apache 2 + Mongrel to Apache 2 + <a href="http://www.modrails.com/">Passenger</a>, and I&#8217;m glad I did, because it is so much easier to install and maintain. I haven&#8217;t noticed any performance gains/hits, but the application is much easier to deploy and maintain now than it was before, and installation was simpler than getting Mongrel to work with Apache 2 through mod_proxy_balancer.</p>
<p>Passenger will automatically launch additional workers according to load, and will also relieve them of duty when they are no longer needed. A sideeffect of this, is that if no one is accessing your site for a period of 5 minutes (default), all the workers will be killed, and Passenger will have to instantiate a new worker + the rails environment when the next visitor comes by. This can take some time, and proved to be a little annoying for my users, because they were often doing other tasks for 5 minute periods. Fortunately, it is very easy to set up a cron job (or something similar) to poll your application every once in a while, to make sure a least one worker is alway ready:</p>
<pre># m h  dom mon dow   command
*/3 *  * * * wget -O /dev/null http://localhost:80/admin/login --no-check-certificate 2&gt;/dev/null</pre>
<p>I highly recommend giving Passenger a try.</p>
<h3>Ruby Enterprise Edition (REE)</h3>
<p>I use <a href="http://www.rubyenterpriseedition.com/">Ruby Enterprise Edition</a> together with Passenger, to improve performance and decrease memory consumption.</p>
<p>Recently though, comparisons <a href="http://www.rubyinside.com/ruby-implementation-shootout-a-bright-future-for-ruby-performance-1390.html">here</a> and <a href="http://antoniocangiano.com/2008/12/09/the-great-ruby-shootout-december-2008/">here</a> indicate that the tides may be changing, and that Ruby 1.9 or JRuby might be faster. For now, I&#8217;m sticking with REE, since Passenger doesn&#8217;t support JRuby yet, and Ruby 1.8.x is still what the Rails people recommends. I&#8217;m keeping my eye out though.</p>
<h3>Monit</h3>
<p><a href="http://mmonit.com/monit/">Monit</a> is a monitoring tool for Unix systems, that can monitor processes, files etc. It can both alert the administrator when something is wrong, and in many cases automatically correct the problem.</p>
<p>I found Monit to be crucial when I had my application on Mongrel, because a Mongrel instance would crash once in a while. Monit would then automatically restart the instance and notify me, without the users experiencing any down-time. Now that Passenger takes care of always having running workers, Monit rarely has to restart anything, but I still count on it for notifying me if anything out of the ordinary happens.</p>
<p>I use monit for monitoring my system for abnormal load, checking that apache, mysql and my mailer deamon are running (and automatically restart them if they are not), and for making sure that I don&#8217;t accidentally run out of disk space (this has happened once or twice, and took me longer-than-I-liked to pinpoint). This is an example from my monit configuration file, which also shows some of Monits power:</p>
<pre>set daemon  60 # Poll at 1-minute intervals

set alert erik@underbjerg.com

# Check for abnormal load
check system localhost
    if loadavg (1min) &gt; 4 for 3 cycles then alert
    if loadavg (5min) &gt; 3 for 3 cycles then alert
    if memory usage &gt; 90% then alert
    if cpu usage (user) &gt; 70% for 5 cycles then alert
    if cpu usage (system) &gt; 30% for 5 cycles then alert
    if cpu usage (wait) &gt; 20% for 5 cycles then alert

# Check apache2
check process apache with pidfile /var/run/apache2.pid
  start program = "/etc/init.d/apache2 start"
  stop program  = "/etc/init.d/apache2 stop"
  if cpu &gt; 60% for 2 cycles then alert
  if cpu &gt; 80% for 5 cycles then restart
  if totalmem &gt; 200.0 MB for 5 cycles then restart
  if children &gt; 250 then restart
  if loadavg(5min) greater than 10 for 8 cycles then stop
  if failed host localhost port 80 protocol http
     with timeout 15 seconds
     then restart
  if 3 restarts within 5 cycles then timeout
  group server

# Check that mysql is running
check process mysql with pidfile /var/run/mysqld/mysqld.pid
  start program = "/etc/init.d/mysql start"
  stop program = "/etc/init.d/mysql stop"

# Check that the ar_sendmail mailer daemon is running
check process ar_sendmail
  with pidfile /home/erik/apps/hojskole_sys/shared/log/ar_sendmail.pid
  start program = "/etc/init.d/ar_sendmail start" with uid erik and gid erik
  stop program = "/etc/init.d/ar_sendmail stop" with uid erik and gid erik
  if totalmem is greater than 65.0 MB for 2 cycles then restart      # eating up memory?
  if loadavg(5min) greater than 10 for 8 cycles then restart          # bad, bad, bad
  if 20 restarts within 20 cycles then timeout                        # something is wrong, call the sys-admin
  group ar_sendmail

# Check disk space
check device vzfs with path /
   if space usage &gt; 85% then alert
   group server</pre>
<p>So if you don&#8217;t already have a way to automatically check the health of server, I recommend giving Monit a try. Note that Monit is in no way specific to rails, so you should be able to use it for any kind of Unix server.</p>
<h3>New Relic</h3>
<p>The <a href="http://newrelic.com/" target="_blank">New Relic RPM</a> performance monitoring tool is a real gem, that I wish I had when I was trying to optimize performance two years ago. It is an amazing piece of software, that plugs right in to your rails app and gives you detailed breakdowns, for each browser request, of where time is spent. It&#8217;s incredibly easy to install, and you can start using it in development mode right away.</p>
<p>It was never been this easy to figure out exactly where to optimize your rails app.</p>
<div id="attachment_74" class="wp-caption alignnone" style="width: 310px"><a href="http://www.underbjerg.com/files/2009/02/newrelic_screenshot.png"><img class="size-medium wp-image-74" title="newrelic_screenshot" src="http://www.underbjerg.com/files/2009/02/newrelic_screenshot-300x240.png" alt="Screenshow of New Relic Lite" width="300" height="240" /></a><p class="wp-caption-text">Screenshot of New Relic Lite in production</p></div>
<p>New Relic is free to use in development mode on your local machine, where you can get extremely detailed info, and in production, where the Lite-edition gives you basic metrics for the last 30 minutes. If you want more metrics or longer time periods in production, you will have to buy a licence, which I think is fair, since the Lite edition is already so useful. So far, I&#8217;ve gotten tremendous results out of using the Lite edition on my local machine, where I have been able to find exactly the places that were slow, and in production, where I&#8217;ve been able to see how the system was performing under real load.</p>
<p>If you are running a Rails application in production, and if you are just the slightest bit interested in how it performs (why wouldn&#8217;t you be?), <a href="http://newrelic.com/get-RPM.html" target="_blank">download New Relic right now</a>.</p>
<h3>Thanks for reading</h3>
<p>I hope you have found it useful. Please feel free to leave any comments, suggestions or questions you might have, and I&#8217;ll try to answer them.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.underbjerg.com/2009/02/04/rails-production-setup/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Canon 24mm f/1.4 II review up at DP</title>
		<link>http://www.underbjerg.com/2009/01/27/canon-24mm-f14-ii-review-up-at-dp/</link>
		<comments>http://www.underbjerg.com/2009/01/27/canon-24mm-f14-ii-review-up-at-dp/#comments</comments>
		<pubDate>Tue, 27 Jan 2009 07:48:01 +0000</pubDate>
		<dc:creator>erik</dc:creator>
		
		<category><![CDATA[Photography]]></category>

		<guid isPermaLink="false">http://www.underbjerg.com/?p=45</guid>
		<description><![CDATA[I don&#8217;t normally just link to news elsewhere, but I&#8217;ve been waiting a long time for a review of the new Canon 24mm f/1.4 II lens, and it&#8217;s finally up at the Digital Picture.
The review shows the mark II as a significant improvement over the mark I in CA and sharpness as wider apertures (where [...]]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t normally just link to news elsewhere, but I&#8217;ve been waiting a long time for a review of the new Canon 24mm f/1.4 II lens, and it&#8217;s finally up at <a href="http://www.the-digital-picture.com/Reviews/Canon-EF-24mm-f-1.4-L-II-USM-Lens-Review.aspx">the Digital Picture</a>.</p>
<p>The review shows the mark II as a significant improvement over the mark I in CA and sharpness as wider apertures (where I&#8217;d planned on using it), and a lot of other good things. It will be a long time before I&#8217;m able to scrape enough money together for buying one of these babies, but they say patience is bliss.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.underbjerg.com/2009/01/27/canon-24mm-f14-ii-review-up-at-dp/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Site moved</title>
		<link>http://www.underbjerg.com/2008/12/21/site-moved/</link>
		<comments>http://www.underbjerg.com/2008/12/21/site-moved/#comments</comments>
		<pubDate>Sun, 21 Dec 2008 13:30:43 +0000</pubDate>
		<dc:creator>erik</dc:creator>
		
		<category><![CDATA[Other]]></category>

		<category><![CDATA[dreamhost]]></category>

		<category><![CDATA[hosting]]></category>

		<category><![CDATA[omnifocus]]></category>

		<category><![CDATA[passenger]]></category>

		<category><![CDATA[Ruby on Rails]]></category>

		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.underbjerg.info/?p=39</guid>
		<description><![CDATA[I&#8217;m almost done moving my sites from Site5 to Dreamhost, since I like their way of offering subversion better, and there was a few extra features that I thought was cool, such as webdav, which I now use to sync OmniFocus between devices, and Passenger to easily run Ruby on Rails applications.
In the process, I&#8217;ve [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m almost done moving my sites from Site5 to Dreamhost, since I like their way of offering subversion better, and there was a few extra features that I thought was cool, such as webdav, which I now use to sync OmniFocus between devices, and Passenger to easily run Ruby on Rails applications.</p>
<p>In the process, I&#8217;ve also decided to switch to Wordpress, since it has all the blog-related stuff I need, and not the extra weight of a lot of features I rarely use. Hopefully it will be easier to maintain sites for a few of my friends as well. I found upgrading a multi-site Drupal installation a tedious process. Dreamhost has a neat one-click managed install of Wordpress, where they automatically maintain and upgrade your Wordpress installation for you, if you can live without the ability to install custom plugins and themes. I&#8217;ve done a custom install, &#8217;cause I wanted some plugins for Flickr integration, but it will make offering my friends and family a basic Wordpress installation as simple as clicking a button.</p>
<p>Moving day is usually also a good time to clean out your closet, and there are a couple of things that I&#8217;ve let go when moving my site. First of all, I&#8217;ve shut down the photo galleries, since I hadn&#8217;t put anything in them for years, and I felt they were not relevant to what I do now. These days I use Flickr to expose photos to the world, and Facebook for friends. I&#8217;ve also not transferred a lot of posts from 2007 and earlier, and I&#8217;ve unfortunately not yet found a way to migrate comments from the old posts. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.underbjerg.com/2008/12/21/site-moved/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Ruby script for focal length statistics</title>
		<link>http://www.underbjerg.com/2008/12/11/ruby-script-for-focal-length-statistics/</link>
		<comments>http://www.underbjerg.com/2008/12/11/ruby-script-for-focal-length-statistics/#comments</comments>
		<pubDate>Thu, 11 Dec 2008 15:31:35 +0000</pubDate>
		<dc:creator>erik</dc:creator>
		
		<category><![CDATA[Photography]]></category>

		<category><![CDATA[ruby]]></category>

		<category><![CDATA[utilities]]></category>

		<guid isPermaLink="false">http://underbjerg.com/?p=5</guid>
		<description><![CDATA[I have wanted to get a fast prime lens for a while, but wasn&#8217;t sure whether to go for Canon&#8217;s 50mm f/1.2, 35mm f/1.4 or the new 24mm f/1.4 II to put on my EOS 50D. I had an idea that wider lens would support my style of photography better, because I often shoot dancing [...]]]></description>
			<content:encoded><![CDATA[<p>I have wanted to get a fast prime lens for a while, but wasn&#8217;t sure whether to go for Canon&#8217;s <a href="http://www.canon-europe.com/For_Home/Product_Finder/Cameras/EF_Lenses/Fixed_Focal_Length/EF_50mm_f12L_USM/index.asp">50mm f/1.2</a>, <a href="http://www.canon-europe.com/For_Home/Product_Finder/Cameras/EF_Lenses/Fixed_Focal_Length/EF_35mm_f14L_USM/index.asp">35mm f/1.4</a> or the new <a href="http://www.canon-europe.com/For_Home/Product_Finder/Cameras/EF_Lenses/Fixed_Focal_Length/EF_24mm_f1.4L_II_USM/index.asp">24mm f/1.4 II</a> to put on my EOS 50D. I had an idea that wider lens would support my style of photography better, because I often shoot dancing indoors, where it&#8217;s hard to get a good distance to the subject, but I had no hard data to back it up.</p>
<p>I use <a href="http://www.adobe.com/products/photoshoplightroom/">Adobe Lightroom</a> for almost all my image editing, and although it is a fantastic piece of software, and can show me picture counts by lens, camera, etc., it cannot show me how many pictures I&#8217;ve taken at various focal lenghts.</p>
<p>So I wrote a small Ruby script to do just that. It takes a folder and a result file name as arguments, and scans through the folder for any pictures that matches the file type (jpg or raw) and the camera model I&#8217;m interested in (to filter out the compact), and counts all the focal lengths used, and their frequency. It then stores the results in the result file in CSV format.</p>
<p>If you like, you can download <a href="/files/exif_reader.rb">the script here</a>. There is also an <a href="/files/results_2008.csv">example result file</a>, which shows a run of all the pictures I&#8217;ve taken in 2008. The script uses the <a href="http://miniexiftool.rubyforge.org/">mini_exiftool</a> gem that wraps the <a href="http://www.sno.phy.queensu.ca/~phil/exiftool/">exiftool</a> binary, so you&#8217;ll need both to run the script.</p>
<p>I just love how simple it is to put these kind of utilities together with Ruby. You are welcome to modify the script as you like, and I&#8217;d like to hear about any improvements or other cool stuff you come up with.</p>
<p>The image below shows a graph over the 6608 pictures I&#8217;ve have kept, taken with my Canon EF-S 17-55mm f/2.8 IS, over the last 1 1/2 years. This is the lens that I use for 75% of my pictures.</p>
<p><img src="/files/result_all_years.png" alt="" /></p>
<p>This shows a couple of interesting things (at least to me):</p>
<ul>
<li>I primarily use the lens at it extremes: 17mm and 55mm</li>
<li>I clearly prefer the wider focal lengths, from 17-35mm</li>
</ul>
<p>So now I am sure that it is the Canon 24mm f/1.4 II that should be on my wishlist - now I just have to save up for it <img src='http://www.underbjerg.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.underbjerg.com/2008/12/11/ruby-script-for-focal-length-statistics/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Anniversary Collection</title>
		<link>http://www.underbjerg.com/2008/11/02/anniversary-collection/</link>
		<comments>http://www.underbjerg.com/2008/11/02/anniversary-collection/#comments</comments>
		<pubDate>Sun, 02 Nov 2008 22:25:28 +0000</pubDate>
		<dc:creator>erik</dc:creator>
		
		<category><![CDATA[Lindy Hop]]></category>

		<category><![CDATA[Photography]]></category>

		<guid isPermaLink="false">http://underbjerg.com/?p=8</guid>
		<description><![CDATA[Today was the 5 year anniversary of our Swing Café at Studenterhuset in Copenhagen.
We were two who exhibited about 10 photographs each, and I did a slideshow of pictures from various Lindy Hop related events in Copenhagen and the rest of Europe, including Goodnight Sweetheart (GNSH), Herräng Dance Camp and CopHop.
You can view the video [...]]]></description>
			<content:encoded><![CDATA[<p>Today was the 5 year anniversary of our Swing Café at Studenterhuset in Copenhagen.</p>
<p>We were two who exhibited about 10 photographs each, and I did a slideshow of pictures from various Lindy Hop related events in Copenhagen and the rest of Europe, including Goodnight Sweetheart (GNSH), Herräng Dance Camp and CopHop.</p>
<p>You can view the video in <a href="/files/AnniversarySlideshow1024x768.mov">high-resolution</a> (~280MB) by clicking the image below. If you are on a slow connection, there&#8217;s also a lower resolution version available <a href="/files/AnniversarySlideshow640x480.mov">here</a> (~110MB).</p>
<p><a href="/files/AnniversarySlideshow1024x768.mov"><img src="/files/AnniversaryCollection.jpg" alt="" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.underbjerg.com/2008/11/02/anniversary-collection/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Canon EOS 50D and 400D high-ISO comparison</title>
		<link>http://www.underbjerg.com/2008/10/10/canon-eos-50d-and-400d-high-iso-comparison/</link>
		<comments>http://www.underbjerg.com/2008/10/10/canon-eos-50d-and-400d-high-iso-comparison/#comments</comments>
		<pubDate>Fri, 10 Oct 2008 22:08:10 +0000</pubDate>
		<dc:creator>erik</dc:creator>
		
		<category><![CDATA[Photography]]></category>

		<category><![CDATA[50d]]></category>

		<guid isPermaLink="false">http://underbjerg.com/?p=14</guid>
		<description><![CDATA[I just picked up my new EOS 50D today, and wanted to see how the low-light/high-iso performance of it was, compared to my 400D. I upgraded to the 50D because I was expecting it to be a much better low-light performer. I shoot a lot of dancy-photography, which usually happens indoors in lousy lighting conditions, [...]]]></description>
			<content:encoded><![CDATA[<p>I just picked up my new EOS 50D today, and wanted to see how the low-light/high-iso performance of it was, compared to my 400D. I upgraded to the 50D because I was expecting it to be a much better low-light performer. I shoot a lot of dancy-photography, which usually happens indoors in lousy lighting conditions, so I was hoping the 50D would be a massive improvement.</p>
<p>The following will be a small review of the Canon EOS 50D, focusing on the low-light performance. If you want to get a more technical or extensive review of the 50D, the following sites might be interesting to you:</p>
<ul>
<li><a href="http://www.dpreview.com/previews/canoneos50D/">DPR&#8217;s pre-view</a> and <a href="http://forums.dpreview.com/forums/forum.asp?forum=1019">forum</a></li>
<li><a href="http://rolandlim.wordpress.com/2008/09/30/canon-eos-50d-review/">Roland Lim&#8217;s thorough use-oriented review, and comparison with 40D and D3.</a></li>
</ul>
<p>For my own little test, I setup some items in a dark room, lit only by a single table-lamp. Don&#8217;t be fooled by the brightness of the pictures - to achieve that at ISO 100, a shutter speed of 2-3 seconds was needed. Seeing how the 50D would perform in this kind of setting was exactly what I wanted to know.</p>
<p><span id="more-14"></span></p>
<h2>Test of ISO 100 to 12800</h2>
<p>Below are test shots of ISO&#8217;s 100 through 12800. The images were all downloaded with DPP, at its default settings, and exported to JPG. Click on the images to view the large versions.</p>
<p>ISO 100:</p>
<p><a href="/files/50d_review/jpg_full/50D_1_100.JPG"><br />
<img src="/files/50d_review/jpg_medium/50D_1_100.jpg" alt="" /><br />
</a></p>
<p>ISO 200:</p>
<p><a href="/files/50d_review/jpg_full/50D_1_100.JPG"><br />
<img src="/files/50d_review/jpg_medium/50D_2_200.jpg" alt="" /><br />
</a></p>
<p>ISO 400:</p>
<p><a href="/files/50d_review/jpg_full/50D_1_100.JPG"><br />
<img src="/files/50d_review/jpg_medium/50D_3_400.jpg" alt="" /><br />
</a></p>
<p>ISO 800:</p>
<p><a href="/files/50d_review/jpg_full/50D_1_100.JPG"><br />
<img src="/files/50d_review/jpg_medium/50D_4_800.jpg" alt="" /><br />
</a></p>
<p>ISO 1600:</p>
<p><a href="/files/50d_review/jpg_full/50D_1_100.JPG"><br />
<img src="/files/50d_review/jpg_medium/50D_5_1600.jpg" alt="" /><br />
</a></p>
<p>ISO 3200:</p>
<p><a href="/files/50d_review/jpg_full/50D_1_100.JPG"><br />
<img src="/files/50d_review/jpg_medium/50D_6_3200.jpg" alt="" /><br />
</a></p>
<p>ISO 6400:</p>
<p><a href="/files/50d_review/jpg_full/50D_1_100.JPG"><br />
<img src="/files/50d_review/jpg_medium/50D_7_6400.jpg" alt="" /><br />
</a></p>
<p>ISO 12800:</p>
<p><a href="/files/50d_review/jpg_full/50D_1_100.JPG"><br />
<img src="/files/50d_review/jpg_medium/50D_8_12800.jpg" alt="" /><br />
</a></p>
<p>As you can see, the 50D performs pretty well up to ISO 1600-3200, but above that, visible noise starts to kick in. In some quick low-light test I did this evening, noise at ISO 3200 is a bit more apparent than in the sample shots above, but 1600 seems perfectly usable. Noise is most visible in the dark areas of the picture.</p>
<h2>Cropped photos</h2>
<p>Below I&#8217;ve compared images shot with the 50D with images shot with the 400D. Because of the higher resolution of the 50D, I have downsized the jpg&#8217;s in the second column to match those of the 400D native-resolution jpegs, to make it easy to compare. The third column contains the actual 100% crop of the 50D samples.</p>
<table border="0">
<tbody>
<tr>
<td>100 ISO, 400D, 100%</td>
<td>100 ISO, 50D, downsized</td>
<td>100 ISO, 50D, 100%</td>
</tr>
<tr>
<td><img src="/files/50d_review/jpg_crop/400D_100.jpg" alt="" /></td>
<td><img src="/files/50d_review/jpg_crop/50D_s_100.jpg" alt="" /></td>
<td><img src="/files/50d_review/jpg_crop/50D_100.jpg" alt="" /></td>
</tr>
<tr>
<td>200 ISO, 400D, 100%</td>
<td>200 ISO, 50D, downsized</td>
<td>200 ISO, 50D, 100%</td>
</tr>
<tr>
<td><img src="/files/50d_review/jpg_crop/400D_200.jpg" alt="" /></td>
<td><img src="/files/50d_review/jpg_crop/50D_s_200.jpg" alt="" /></td>
<td><img src="/files/50d_review/jpg_crop/50D_200.jpg" alt="" /></td>
</tr>
<tr>
<td>400 ISO, 400D, 100%</td>
<td>400 ISO, 50D, downsized</td>
<td>400 ISO, 50D, 100%</td>
</tr>
<tr>
<td><img src="/files/50d_review/jpg_crop/400D_400.jpg" alt="" /></td>
<td><img src="/files/50d_review/jpg_crop/50D_s_400.jpg" alt="" /></td>
<td><img src="/files/50d_review/jpg_crop/50D_400.jpg" alt="" /></td>
</tr>
<tr>
<td>800 ISO, 400D, 100%</td>
<td>800 ISO, 50D, downsized</td>
<td>800 ISO, 50D, 100%</td>
</tr>
<tr>
<td><img src="/files/50d_review/jpg_crop/400D_800.jpg" alt="" /></td>
<td><img src="/files/50d_review/jpg_crop/50D_s_800.jpg" alt="" /></td>
<td><img src="/files/50d_review/jpg_crop/50D_800.jpg" alt="" /></td>
</tr>
<tr>
<td>1600 ISO, 400D, 100%</td>
<td>1600 ISO, 50D, downsized</td>
<td>1600 ISO, 50D, 100%</td>
</tr>
<tr>
<td><img src="/files/50d_review/jpg_crop/400D_1600.jpg" alt="" /></td>
<td><img src="/files/50d_review/jpg_crop/50D_s_1600.jpg" alt="" /></td>
<td><img src="/files/50d_review/jpg_crop/50D_1600.jpg" alt="" /></td>
</tr>
<tr>
<td></td>
<td>3200 ISO, 50D, downsized</td>
<td>3200 ISO, 50D, 100%</td>
</tr>
<tr>
<td></td>
<td><img src="/files/50d_review/jpg_crop/50D_s_3200.jpg" alt="" /></td>
<td><img src="/files/50d_review/jpg_crop/50D_3200.jpg" alt="" /></td>
</tr>
<tr>
<td></td>
<td>6400 ISO, 50D, downsized</td>
<td>6400 ISO, 50D, 100%</td>
</tr>
<tr>
<td></td>
<td><img src="/files/50d_review/jpg_crop/50D_s_6400.jpg" alt="" /></td>
<td><img src="/files/50d_review/jpg_crop/50D_6400.jpg" alt="" /></td>
</tr>
<tr>
<td></td>
<td>12800 ISO, 50D, downsized</td>
<td>12800 ISO, 50D, 100%</td>
</tr>
<tr>
<td></td>
<td><img src="/files/50d_review/jpg_crop/50D_s_12800.jpg" alt="" /></td>
<td><img src="/files/50d_review/jpg_crop/50D_12800.jpg" alt="" /></td>
</tr>
</tbody>
</table>
<p>From these shots, you can see that the 50D clearly outperforms the 400D.</p>
<p>The 400D is fine up to about ISO 400, but at 800 visible noise starts to kick in, and at 1600 it&#8217;s too much for anything but an emergency shot. This is also my experience from using the camera.</p>
<p>The 50D, on the other hand, seems to have no visible noise up to around 1600 ISO, with ISO 3200 being usable, although with a little noise and loss of detail.</p>
<h2>Conclusion</h2>
<p>Compared to the 400D, which could only shoot good quality pictures up to 400 ISO, the 50D can shoot good quality pictures at 1600 ISO, and OK quality at 3200 ISO. That is 2-3 stops in light sensitivity, and means that a shot with the 400D that needed a 1/10 second exposure, can now be shot with a 1/40 or 1/80 second exposure.</p>
<p>For me, that can easily mean the difference between sufficiently freezing dancers in motion, or a big blurry blob where your subject was supposed to be, and I&#8217;m eager to test the camera more in real-life situations, to see if the &#8220;lab-tests&#8221; prove to be the same as results in the field.</p>
<p>Anyway, I hope you have found this useful, if you&#8217;re considering upgrading from the xxxD to the 50D.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.underbjerg.com/2008/10/10/canon-eos-50d-and-400d-high-iso-comparison/feed/</wfw:commentRss>
		</item>
		<item>
		<title>DRY(er) Ruby on Rails view templates</title>
		<link>http://www.underbjerg.com/2008/05/13/dryer-ruby-on-rails-view-templates/</link>
		<comments>http://www.underbjerg.com/2008/05/13/dryer-ruby-on-rails-view-templates/#comments</comments>
		<pubDate>Tue, 13 May 2008 09:00:01 +0000</pubDate>
		<dc:creator>erik</dc:creator>
		
		<category><![CDATA[Coding]]></category>

		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://underbjerg.com/?p=24</guid>
		<description><![CDATA[Something I keep coming across when working with Ruby on Rails view templates, is wrapping blocks of content in common DIV tags with certain properties, so I can easily style the application with CSS.
For example, a page can have multiple content boxes, and possibly a sidebar with a number of info boxes. What I used [...]]]></description>
			<content:encoded><![CDATA[<p>Something I keep coming across when working with Ruby on Rails view templates, is wrapping blocks of content in common DIV tags with certain properties, so I can easily style the application with CSS.</p>
<p>For example, a page can have multiple content boxes, and possibly a sidebar with a number of info boxes. What I used to do, was something like this:</p>
<pre>&lt;div id="sidebar"&gt;
  &lt;div class="infobox"&gt;
    Here is some help
  &lt;/div&gt;
&lt;/div&gt;
&lt;div class="content_box"&gt;
	&lt;%= render :partial =&gt; "table", :locals =&gt; {:people =&gt; @people} %&gt;
&lt;/div&gt;</pre>
<p>Instead, by looking at the implementaton of the content_tag_for ActionView helper, I was able to find a way to do this:</p>
<pre>&lt;% sidebar do %&gt;
  &lt;% infobox do %&gt;
    Here is some help
  &lt;% end %&gt;
&lt;% end %&gt;
&lt;% content_box do %&gt;
  &lt;%= render :partial =&gt; "table", :locals =&gt; {:people =&gt; @people} %&gt;
&lt;% end %&gt;</pre>
<p><span id="more-24"></span><br />
The &#8220;raw DIV tag approach&#8221; works, but there is a lot of repeated text strings (the ids and classes of the DIV tags), and if I some day want to add another stylesheet class to the content boxes, or maybe rename the content_box class to something else, I have to go though all of my view templates.</p>
<p>The second was made possible by adding methods similar to the following to my application_helper.rb:</p>
<pre>def content_box(&amp;block)
  concat content_tag(:div, capture(&amp;block), :class =&gt; "content_box"), block.binding
end</pre>
<p>What is does is essentially capturing the html output within the block given, and wrapping it in a DIV tag with the given parameters. That way, the ids and classes I want to use are defined in one place, and easily changed. I can even decide to wrap the contents of the content box in a different tag, such as a SPAN, if I want to at some point.</p>
<p>To me this approach is DRY(er), and looks more like the rails form helpers (which I think is a plus). I don&#8217;t know, however, if there are any performance-disadvantages to using this approach. Do you?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.underbjerg.com/2008/05/13/dryer-ruby-on-rails-view-templates/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
