<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" version="2.0">

<channel>
	<title>casperfabricius.com</title>
	
	<link>http://casperfabricius.com/site</link>
	<description>expert ruby on rails development</description>
	<lastBuildDate>Sun, 06 Jun 2010 08:43:31 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/FingerprintsOfCasperFabricius" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="fingerprintsofcasperfabricius" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Delayed Job with i18n</title>
		<link>http://casperfabricius.com/site/2010/06/06/delayed-job-with-i18n/</link>
		<comments>http://casperfabricius.com/site/2010/06/06/delayed-job-with-i18n/#comments</comments>
		<pubDate>Sun, 06 Jun 2010 08:43:31 +0000</pubDate>
		<dc:creator>Casper Fabricius</dc:creator>
				<category><![CDATA[rails]]></category>

	<!-- AutoMeta Start -->
	<category>locale</category>
	<category>delayed</category>
	<category>usermailer</category>
	<category>message</category>
	<category>send_later_with_i18n</category>
	<category>send_later</category>
	<category>recipient</category>
	<category>darebusters</category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://casperfabricius.com/site/?p=325</guid>
		<description><![CDATA[I have darebusters.com running on Heroku and I have a worker running Delayed Job (DJ) activated. This allows me to handle heavy tasks such as video processing and payment transactions asynchronously, so the dynos can get right back to serving requests.
I also use DJ to send out emails, and a typical asynchronous call sending a [...]]]></description>
			<content:encoded><![CDATA[<p>I have <a href="http://darebusters.com/">darebusters.com</a> running on <a href="http://heroku.com/">Heroku</a> and I have a worker running <a href="http://github.com/tobi/delayed_job">Delayed Job</a> (DJ) activated. This allows me to handle heavy tasks such as video processing and payment transactions asynchronously, so the dynos can get right back to serving requests.</p>
<p>I also use DJ to send out emails, and a typical asynchronous call sending a message from one user to another &#8211; scheduling a delayed job &#8211; used to look like this:</p>
<pre><code>UserMailer.send_later(
  :deliver_message,
   @recipient,
  current_user,
  params[:message]
)
</code></pre>
<p>Since darebusters.com is an internationalized website currently offering users the choice between English and German, this has proved a slight challenge, however. We have the usual internationalization (i18n) bells and whistles: Flags to select the language, and remembering the user&#8217;s language selection in session, cookie and in the users database table. By default, a delayed job will simply run with the default locale of the site. It has no way of accessing the context it was invoked in, so it cannot set the locale from session or cookie. The job only knows what it can work it from the arguments it was created with.</p>
<p><span id="more-325"></span></p>
<p>It looks like an easy problem to solve. DJ shouldn&#8217;t have to know about locales, the code should just set <code>I18n.locale</code> from <code>@recipient.locale</code>. That&#8217;s exactly how I initially thought I had solved it: In the <code>UserMailer.message</code> method I set the locale, and then passed parameters to render the mail. The catch is, however, that I use <a href="http://blog.andischacke.com/2009/10/localized-actionmailer-templates-for.html">a slight hack</a> to get support for localized ActionMailer templates, i.e. when the locale is set to <code>de</code> it will render the <code>message.de.text.plain.erb</code> view rather than the <code>message.en.text.plain.erb</code> view. The template to render is selected <i>before</i> <code>UserMailer.message</code> is invoked, so at that time it&#8217;s too late to set the correct locale. In fact, I needed the entire job to run in a locale specified when the job as scheduled.</p>
<p>For this purpose, I created a custom delayed method to be invoked by DJ: LocalizedJob.</p>
<p><script src="http://gist.github.com/427425.js?file=localized_job.rb"></script></p>
<p>This code should be placed in <code>/lib/</code>. I want the <code>send_later_with_i18n</code> to be available on all objects just like DJ&#8217;s own <code>send_later</code>, so I also also created an initializer to extend the <code>Object</code> class:</p>
<p><script src="http://gist.github.com/427428.js?file=delayed_job.rb"></script></p>
<p>This code should be placed in <code>/config/initializers/</code>. I am now able to replace all my <code>send_later</code> calls with <code>send_later_with_i18n</code> calls, storing the required locale with job to be extracted when it&#8217;s run:</p>
<pre><code>UserMailer.send_later_with_i18n(
  :deliver_message,
  @recipient.locale,
  @recipient,
  current_user,
  params[:message]
)
</code></pre>
<p>So on darebusters.com, Germans get all their mails in German &#8211; no matter what locale the sender used (although the actual message written by the sender is of course not translated ;) &#8211; and everyone else gets mails in English. Now that was a real Ruby fairytale.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/FingerprintsOfCasperFabricius?a=2zWemC8_KO0:LjevXuNYfRo:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/FingerprintsOfCasperFabricius?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/FingerprintsOfCasperFabricius?a=2zWemC8_KO0:LjevXuNYfRo:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/FingerprintsOfCasperFabricius?i=2zWemC8_KO0:LjevXuNYfRo:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/FingerprintsOfCasperFabricius?a=2zWemC8_KO0:LjevXuNYfRo:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/FingerprintsOfCasperFabricius?i=2zWemC8_KO0:LjevXuNYfRo:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://casperfabricius.com/site/2010/06/06/delayed-job-with-i18n/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IronRuby on Rails</title>
		<link>http://casperfabricius.com/site/2010/05/30/ironruby-on-rails/</link>
		<comments>http://casperfabricius.com/site/2010/05/30/ironruby-on-rails/#comments</comments>
		<pubDate>Sun, 30 May 2010 12:14:34 +0000</pubDate>
		<dc:creator>Casper Fabricius</dc:creator>
				<category><![CDATA[ironruby]]></category>

	<!-- AutoMeta Start -->
	<category>ironruby</category>
	<category>mvc</category>
	<category>iis7</category>
	<category>webforms</category>
	<category>rack</category>
	<category>obvious</category>
	<category>readable</category>
	<category>asp</category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://casperfabricius.com/site/?p=319</guid>
		<description><![CDATA[Rails, say hello to .NET.
IronRuby went 1.0 at April 12th, and it runs Ruby on Rails for real. I demonstrated it myself to a packed room of (mostly) .NET developers at Community Day. There was a lot of buzz around IronRuby more than two years ago &#8211; back then, the hype around Ruby on Rails [...]]]></description>
			<content:encoded><![CDATA[<p>Rails, say hello to .NET.</p>
<p><a href="http://ironruby.net/">IronRuby</a> went 1.0 at April 12th, and it runs <a href="http://rubyonrails.org/">Ruby on Rails</a> for real. I demonstrated it myself to a packed room of (mostly) .NET developers at <a href="http://communityday.in/copenhagen">Community Day</a>. There was a lot of buzz around IronRuby more than two years ago &#8211; back then, the hype around Ruby on Rails was at its peak and the .NET developers wanted in. It took a lot longer for IronRuby to go gold than many of us had hoped, and meanwhile <a href="http://www.asp.net/mvc">ASP.NET MVC</a> made its entry. Many ASP.NET developers were aware that the &#8220;webform&#8221; abstraction with its events, viewstate etc. is leaky and broken, and when Microsoft finally presented this &#8220;official&#8221; alternative to webforms they rallied to it and rejoiced, for now they had their own Rails-clone, but with a proper programming language and thorough IDE-support.</p>
<p>My presentation compared ASP.NET MVC to Ruby on Rails. The conclusion is ambiguous. I thought I&#8217;d be able to crush ASP.NET MVC with the pure greatness of Ruby and Rails, making it obvious to everyone which was the better framework and language. While Rails do support a lot things that ASP.NET MVC is nowhere near of having, the latter does &#8211; at least with the recently released version 2 &#8211; have the central elements of a proper MVC framework in place. What&#8217;s more surprising is that C# 4.0 is so much less clunky than C# 1.0, so in some comparisons of syntax Ruby is not even the obvious winner when it comes to readability. Take this example:</p>
<p><script src="http://gist.github.com/418971.js?file=gistfile1.builder"></script></p>
<p><script src="http://gist.github.com/418973.js?file=gistfile1.cs"></script></p>
<p>Before <a href="http://msdn.microsoft.com/en-us/netframework/aa904594.aspx">LINQ</a>, C# would have never been able to map a collection in a such an elegant manner.  In my biased opinion, I still find the Ruby version prettier and more readable, but the fact is that C# is not that far behind. It&#8217;s another syntax paradigm for sure, but it&#8217;s compact and it&#8217;s readable &#8211; that&#8217;s not bad at all.</p>
<p><span id="more-319"></span></p>
<p>So I understand if Ruby and Rails doesn&#8217;t have the appeal to .NET developers now as it had a few years ago &#8211; back when they where stuck with C# 2.0 and broken webforms. That said, there is of course no doubt that our favorite programming language, framework and community has a lot to offer anyone brave enough to try it out. Previously that required .NET developers to get involved with foreign things such as Apache server and perhaps even Linux servers (!) if they wanted to deploy their Rails project &#8211; but with IronRuby and the very cool <a href="http://vimeo.com/11150305">Rack-implementation for IIS7</a> it is now painless to run Rails and other Ruby web frameworks (such as <a href="http://www.sinatrarb.com/">Sinatra</a>) on a Windows server. And even better, seen from a .NET developer&#8217;s perspective, it&#8217;s as easy as pie to call into the .NET framework and custom .NET libraries from Rails:</p>
<p><script src="http://gist.github.com/418984.js?file=gistfile1.builder"></script></p>
<p>IronRuby is also good news for Rails-developers. It opens up the the market for selling Rails-applications to al the companies engaged to Microsoft-technology and the .NET platform, and heaven knows there&#8217;s a lot of them here in Denmark. We can develop the sites locally on our beloved Macs using SQLite or MySQL as a database, and then deploy to Windows to run on IIS7 and SQL Server &#8211; all thanks to Rack and ActiveRecord.</p>
<p>I&#8217;m exited about IronRuby, and I hope some of .NET developers in the Microsoft companies are too. If you need any help getting up and running with IronRuby on Rails, just let me know.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/FingerprintsOfCasperFabricius?a=hWMGqV7iiks:EsZig_ZJcVE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/FingerprintsOfCasperFabricius?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/FingerprintsOfCasperFabricius?a=hWMGqV7iiks:EsZig_ZJcVE:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/FingerprintsOfCasperFabricius?i=hWMGqV7iiks:EsZig_ZJcVE:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/FingerprintsOfCasperFabricius?a=hWMGqV7iiks:EsZig_ZJcVE:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/FingerprintsOfCasperFabricius?i=hWMGqV7iiks:EsZig_ZJcVE:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://casperfabricius.com/site/2010/05/30/ironruby-on-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bundler and Rails 3 environments</title>
		<link>http://casperfabricius.com/site/2010/04/17/bundler-and-rails-3-environments/</link>
		<comments>http://casperfabricius.com/site/2010/04/17/bundler-and-rails-3-environments/#comments</comments>
		<pubDate>Sat, 17 Apr 2010 13:50:44 +0000</pubDate>
		<dc:creator>Casper Fabricius</dc:creator>
				<category><![CDATA[deployment]]></category>
		<category><![CDATA[rails]]></category>

	<!-- AutoMeta Start -->
	<category>bundler</category>
	<category>bundler</category>
	<category>environments</category>
	<category>gem</category>
	<category>debug</category>
	<category>debug</category>
	<category>beta</category>
	<category>gems</category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://casperfabricius.com/site/?p=312</guid>
		<description><![CDATA[I usually write very long blog posts. Not this time! This is just a small tip, the first of hopefully many learnings I&#8217;ll make as I am working with my first project in Rails 3.
Bundler (Github &#124; Website) is the new way to manage gem dependencies in Rails and other Ruby applications. If you haven&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>I usually write very long blog posts. Not this time! This is just a small tip, the first of hopefully many learnings I&#8217;ll make as I am working with my first project in Rails 3.</p>
<p>Bundler (<a href="http://github.com/carlhuda/bundler">Github</a> | <a href="http://gembundler.com">Website</a>) is the new way to manage gem dependencies in Rails and other Ruby applications. If you haven&#8217;t heard about it, there is (of course) a <a href="http://railscasts.com/episodes/201-bundler">great introduction at Railcasts</a>. It&#8217;s pretty easy and straight-forward to use, especially if you are used to the <code>config.gem</code> format of Rails.</p>
<p>However, one very common use case in Bundler&#8217;s <code>Gemfile</code> that is not explicitly documented anywhere I&#8217;ve seen, is how to configure gems to be installed in <i>both development and test environments, but not in staging and production environments</i>. You have probably seen the examples of how you can assign a gem to a specific environment using the <code>:group</code> option or method. So you&#8217;d probably write something like this:</p>
<pre>
group :test do
  gem "rspec-rails", ">= 2.0.0.beta.1"
end

group :development do
  gem "ruby-debug"
end
</pre>
<p><span id="more-312"></span></p>
<p>The gems you don&#8217;t need on the server are usually all those related to testing, debugging and perhaps generating fake data and so on. But wait a minute. You also need the RSpec in the development environment so you can use it&#8217;s generators, right? And you need Ruby Debug in the test environment so you can put breakpoints in your tests.</p>
<p>Luckily there is a very easy, and &#8211; once you know it &#8211; obvious solution to this: You can pass multiple environments to the </code>group</code> method, just like this:</p>
<pre>
group :development, :test do
  gem "rspec-rails", ">= 2.0.0.beta.1"
  gem "ruby-debug"
end
</pre>
<p>And that's probably the only grouping of gems you'll need in many Rails projects. Most gems installed and required in all environments, and a few just in the development and test environments. Happy Rails 3 coding.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/FingerprintsOfCasperFabricius?a=uuebgUtW_lk:sjdKuRvi9Uw:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/FingerprintsOfCasperFabricius?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/FingerprintsOfCasperFabricius?a=uuebgUtW_lk:sjdKuRvi9Uw:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/FingerprintsOfCasperFabricius?i=uuebgUtW_lk:sjdKuRvi9Uw:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/FingerprintsOfCasperFabricius?a=uuebgUtW_lk:sjdKuRvi9Uw:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/FingerprintsOfCasperFabricius?i=uuebgUtW_lk:sjdKuRvi9Uw:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://casperfabricius.com/site/2010/04/17/bundler-and-rails-3-environments/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>The culture of development communities: Ruby vs. .NET</title>
		<link>http://casperfabricius.com/site/2010/03/19/the-culture-of-development-communities-ruby-vs-net/</link>
		<comments>http://casperfabricius.com/site/2010/03/19/the-culture-of-development-communities-ruby-vs-net/#comments</comments>
		<pubDate>Fri, 19 Mar 2010 03:49:56 +0000</pubDate>
		<dc:creator>Casper Fabricius</dc:creator>
		<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/home/cfp/casperfabricius.com/site/wp-content/plugins/autometa/autometa.php</b> on line <b>324</b><br />
		<category><![CDATA[other]]></category>

	<!-- AutoMeta Start -->
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://casperfabricius.com/site/?p=301</guid>
		<description><![CDATA[I have worked professionally with Ruby on Rails for the past 4 years and definitely consider myself a part of the Ruby community. Before that, however, I was a .NET consultant for many years &#8211; in fact I worked with .NET from the early betas and I was very exited about replacing VBScript and classic [...]]]></description>
			<content:encoded><![CDATA[<p>I have worked professionally with <a href="http://rubyonrails.com">Ruby on Rails</a> for the past 4 years and definitely consider myself a part of the Ruby community. Before that, however, I was a .NET consultant for many years &#8211; in fact I worked with .NET from the early betas and I was very exited about replacing VBScript and classic ASP with C# and ASP.NET. Being at <a href="http://visitmix.com">MIX 10</a> &#8211; Microsoft&#8217;s conference for developers and designers working with web and mobile technologies &#8211; has made me realize both how much the .NET community has changed since I left it &#8211; and how much it hasn&#8217;t. In this article I outline the differences in culture in the Ruby and .NET development communities as I perceive them, and voice my opinion on what could be changed.</p>
<p>I have a good friend named <a href="http://oliverkofoed.com">Oliver Kofoed</a> who is a brilliant .NET developer. Oliver is an entrepreneur and has written the entire backend for <a href="http://nonoba.com">Nonoba</a> and <a href="http://player.io">Player IO</a>, he has written his own object-relational mapper (ORM), templating system, multiplayer game server, content management system and so on. He has also been toying with several experimental .NET languages over the years (such as Boo) and even worked a bit on one of his own. Oliver is both curious and passionate about development, and he was in fact the one who initially told me about Ruby on Rails &#8211; I owe you one, Oliver ;)</p>
<p>I occasionally nudge Oliver about releasing some of his work as open source, but it has yet to happen. I don&#8217;t think Oliver mind sharing his stuff with the community, but the fact is that it takes a lot of work to prepare your code for open sourcing, especially if you haven&#8217;t build it with that in mind from the beginning. You need to take anything out that&#8217;s specific to your own applications, you have to write at least some documentation and you probably also have to make the code a bit more configurable and modular. To make that effort you need to get something in return from the community &#8211; you have to be reasonably sure that your efforts will be appreciated and that your peers will respect you for sharing valuable code with them.</p>
<p><span id="more-301"></span></p>
<p>The best way to get a name in the Ruby community is to release a piece of open source software that help other people get their work done. Ruby on Rails is a pretty good example of this. In fact, in a typical stack for running a Rails-based website, not a single piece of software is proprietary. From the operating system and programming language, the database and the web server to the web framework, gems and plugins used in the application, everything is free and open source. To be fair, the .NET framework is also free, limited versions of the development IDEs and the SQL server database are free and I believe it is currently even possible to get free hosting on <a href="http://windowsazure.com">Windows Azure</a>. But none of these things are open source and that makes an important difference in the perception of the importance of open sourcing in the eyes of .NET developers, I believe. When most of your stack is closed source, you don&#8217;t see the need to share your own source with anyone else either.</p>
<p>There is of course lots of great open source projects within the .NET community: NUnit, Log4Net, NAnt, NHibernate (I&#8217;m not sure why I can only think of ports of open source Java projects right now) and also some great &#8220;higher-level&#8221; open source projects such as <a href="http://umbraco.org">Umbraco</a>. Many of these has existed for a long time, but it&#8217;s a relatively new thing that Microsoft has started releasing parts of their own projects as open source with <a href="http://asp.net/mvc">ASP.NET MVC</a> &#8211; a web framework that&#8217;s essentially a port of Ruby on Rails (minus the ActiveRecord ORM) to .NET done by some of Microsoft&#8217;s best developers &#8211; as the prime example. This is awesome, and ASP.NET MVC is deservingly winning a lot .NET developers over from the broken notion of &#8220;web forms&#8221;. I&#8217;m not sure how easy it is to build and share plugins for ASP.NET MVC, but hopefully the project will help more .NET developers to realize the value of sharing code. In the Ruby world we have <a href="http://github.com">Github</a> for sharing and collaborating on open source projects, and <a href="http://codeplex.com">Codeplex</a> might be able to do the same for .NET &#8211; or .NET developers could start using git, but that&#8217;s a different story.</p>
<p>ASP.NET MVC also endorses test-driven development, which is another key differentiator when comparing the Ruby and .NET communities. To be honest, I think some .NET developers have even harder seeing the value of testing than of open sourcing. They use a static language after all, so the compiler &#8220;tests&#8221; that all is good, right? Wrong. Even without tests, problems with wrong types and nil-reference exceptions (&#8220;null&#8221; is called &#8220;nil&#8221; in Ruby) are usually easily found and fixed in Ruby. What needs to be tested is intend. Business logic. Calculations. Complicated SQL queries. Redirects. The flow of the application. Test-driven development (TDD) forces the developer to think before he acts, and later it gives him the freedom to refactor without the fear of breaking existing functionality. I understand any developer who feel it is a waste of time to write tests <i>after</i> you have written the actual production code &#8211; it&#8217;s not, but it feels like it. TDD gives the pleasure of accomplishing hundreds of small steps in the fail-pass test cycle every day, and I hope the popularity of the ASP.NET MVC will push .NET developers more in this direction.</p>
<p>I have of course attended all sessions related to Ruby at MIX10 (all three of them), and Microsoft&#8217;s prime example of what to use <a href="http://ironruby.net/">IronRuby</a> (the .NET implementation of Ruby) for seems to be testing. They love to show off RSpec and Cucumber, and yes, those are cool testing frameworks, but will it really make .NET developers write their test code in a language different from the production code? To me, IronRuby is the .NET developer&#8217;s chance to spread the love and magic of Ruby in their Microsoft-centric companies, and just like Rails has been the killer app for the traditional C-version of Ruby, I believe this fantastic web framework can also be the driver of a wide adoption of IronRuby. ASP.NET MVC will be the segway for this, because MVC and Rails have so much in common, that when you understand one, you understand them both &#8211; provided you also know C# and Ruby, that is.</p>
<p>Yes, I said &#8220;the love and magic of Ruby&#8221;. If you think it sounds cheesy, that&#8217;s because it is, but the fact is that I&#8217;ve seen several slides at MIX10 with statements such as &#8220;Ruby is love&#8221; and &#8220;We love Ruby on Rails&#8221;. Ruby is a pretty programming language, and Rails is an awesome framework &#8211; but really working with Ruby is all about being passionate about programming, being curious about new technology and have a desire to be on the &#8220;cutting edge&#8221;. I&#8217;m not saying that .NET developers are not those things, but I&#8217;ll make this claim: The ratio of highly passionate developers actively seeking the cutting edge of software development is higher in the Ruby community than in the .NET community. There is some very simple reasons for this: First of all, the Ruby community is smaller and has a smaller customer base, which leaves less room for &#8230; let&#8217;s say &#8220;average&#8221; developers. Second, almost everyone in the Ruby community comes from a different technical background and has made an active choice to switch to Ruby. C# is a language taught in schools, there are certifications and programs, and in some environments I believe you&#8217;d hardly even consider the alternatives. This again leaves more room for the &#8220;average&#8221; developer who is by no means a bad programmer or person, but who is not building and seeking out new things on the cutting edge. To him, programming is more a job than a passion, and he might even do something else with his spare time than sit in front of the computer.</p>
<p>The point I am trying to make is this: Ruby has a community consisting almost entirely of early adopters, while .NET has many followers in the community. This is not necessarily a problem &#8211; in fact it can be very pragmatic not to be on the cutting edge. On the other hand, .NET developers are missing out on a lot of the good stuff by waiting for Microsoft to tell them what to do. As an example, my impression from MIX10 is that the javascript framework jQuery is still a very new thing to many .NET developers, while it is something we have used for years in the Ruby community. I was learning about jQuery at a Rails-conference two years ago, and back then I felt <i>I</i> was late in the game. What&#8217;s interesting is that Ruby on Rails is in  fact pretty tightly integrated with another javascript framework &#8211; Prototype (much too tightly in fact, but that has been remedied in Rails 3) &#8211; but we were so blown away by the productivity and community surrounding jQuery that we switched anyway. The fact that Rails is open source and that Ruby is a dynamic language that allows any code to be changed, overridden and monkeypatched, allowed someone to quickly release a plugin that modified all places where Rails currently generates Prototype-specific javascript. Sure, ASP.NET MVC is also open source, but if someone wanted to make a fundemental change such as the one in this example, they would probably have to release a separate branch of the framework the with modified code, since a plugin wouldn&#8217;t be able to modify the statically typed and compiled code.</p>
<p>The Ruby community is not perfect. Some think we are arrogant. I can think of at least <a href="http://loudthinking.com">one person</a> about which this is true, and perhaps you think I&#8217;m another good example after having read this. I am actually impressed with how humble and down-to-earth the VIP&#8217;s of the .NET community seemed to at MIX10. Another thing you could say about us is that we are trying to avoid dealing with real-world problems by going into Ruby. We leave the .NET developers to maintain and extend existing enterprise solutions built on Microsoft technology, while we go out and build entrepreneurial web apps from scratch. Personally, I like being curious, passionate and on the cutting edge, but it might not be for everyone. Are you a passionate developer?</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/FingerprintsOfCasperFabricius?a=-PmUJEVtv3Y:q1ATDaS05y4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/FingerprintsOfCasperFabricius?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/FingerprintsOfCasperFabricius?a=-PmUJEVtv3Y:q1ATDaS05y4:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/FingerprintsOfCasperFabricius?i=-PmUJEVtv3Y:q1ATDaS05y4:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/FingerprintsOfCasperFabricius?a=-PmUJEVtv3Y:q1ATDaS05y4:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/FingerprintsOfCasperFabricius?i=-PmUJEVtv3Y:q1ATDaS05y4:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://casperfabricius.com/site/2010/03/19/the-culture-of-development-communities-ruby-vs-net/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Curiosities of HTML5</title>
		<link>http://casperfabricius.com/site/2010/03/16/curiosities-of-html5/</link>
		<comments>http://casperfabricius.com/site/2010/03/16/curiosities-of-html5/#comments</comments>
		<pubDate>Tue, 16 Mar 2010 20:48:55 +0000</pubDate>
		<dc:creator>Casper Fabricius</dc:creator>
		<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/home/cfp/casperfabricius.com/site/wp-content/plugins/autometa/autometa.php</b> on line <b>324</b><br />
		<category><![CDATA[other]]></category>

	<!-- AutoMeta Start -->
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://casperfabricius.com/site/?p=293</guid>
		<description><![CDATA[Molly Holzschlag talked about HTML5 (yes, apparently the convention is no space between HTML and 5) at the MIX 10 conference. I didn&#8217;t get any ground-breaking knowledge into the workings of, say, the &#60;video /&#62; tag, but I did get some insights into what&#8217;s happening with HTML5 that I&#8217;d like to share. For a more [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://molly.com/">Molly Holzschlag</a> talked about <a href="http://en.wikipedia.org/wiki/HTML5">HTML5</a> (yes, apparently the convention is no space between <i>HTML</i> and <i>5</i>) at the <a href="http://live.visitmix.com/">MIX 10 conference</a>. I didn&#8217;t get any ground-breaking knowledge into the workings of, say, the <code>&lt;video /&gt;</code> tag, but I did get some insights into what&#8217;s happening with HTML5 that I&#8217;d like to share. For a more technical reference to HTML5, Holzschlag recommended <a href="http://diveintohtml5.org/">Dive into HTML5</a>.</p>
<div class="photo left"><a href="http://flickr.com/photos/rasmusluckow/3275526654/"><img src="http://farm5.static.flickr.com/4042/4437909529_fd94b5f2c3_m_d.jpg" alt="MIX 10 keynote graphics" /><br />
</a>
<div class="caption">&copy; 2010 <a href="http://www.flickr.com/photos/mixevent/">MIX</a></div>
</div>
<p>You might have noticed that I did not link <i>HTML5</i> to <a href="http://dev.w3.org/html5/spec/Overview.html">W3C&#8217;s specification</a> of the language, but rather to the Wikipedia entry. The reason for that is not just the entry on Wikipedia is much easier to read than any academical spec, but also that W3C&#8217;s spec is not necessarily the official spec &#8211; or least not the <i>only</i> recognized spec. Molly Holzschlag explained how members of the XHTML 2.0 working group in 2004 grew tired of the slow progress and seemingly wrong direction of what was at the time supposed to be the next generation of HTML, and formed their own working group known as <a href="http://www.whatwg.org/">WHAT-WG</a>. These &#8220;cowboys&#8221;, as Holzschlag likes to call them, very quickly (that is, they did in less than a year!) reached consensus on a new spec and further managed to get all the major browser vendors on board. As a result, W3C eventually shut down their XHTML 2 working group and started their own HTML5 working which adapts and formalizes the WHAT-WG spec into the the long legal specs we know and love &#8230; right.</p>
<p><span id="more-293"></span></p>
<p>So what is HTML5, really? Is it just the a couple of new tags and features such as built-in client-side form validation? That&#8217;s a big part of it, but to be more specific, Holzschlag explained, the term <i>HTML5</i> covers at least three things: The &#8220;cowboy-spec&#8221; by WHAT-WG, the &#8220;approved&#8221; spec by W3C, and then the &#8220;umbrella&#8221; technology that everybody else talks about. Just as <i>AJAX</i> as a term covers much than sending asynchronous javascript and XML, HTML5 has almost become synonymous with &#8220;Web 3.0&#8243; and covers everything that the next generations of browsers will support. And that&#8217;s fine, as long as we realize what we are talking about when we say HTML5.</p>
<p>In the Thuesday morning keynote Microsoft announced great enthusiasm about HTML5 in <a href="http://ie.microsoft.com/testdrive/">Internet Explorer 9</a>. They are dedicated to get the same markup work across all browsers, but at the same time they are completely in line with an interesting thing Molly Holzschlag said: &#8220;Implementation always trumps specification&#8221;. So the IE9 team made a tool that crawled the 7000 biggest websites on the Internet and analyzed what features currently missing in IE8 are used the most. So in a very pragmatic way, IE9 will support what people already use and introduce all the new aspects of HTML5.</p>
<p>If you speak Danish, make sure you <a href="http://danielfrost.dk/post/Frosts-Podcast-show-e28093-special-MIX-edition-Dag-1.aspx">check out the podcast</a> <a href="http://danielfrost.dk/">Daniel Frost</a> has recorded here at MIX featuring me and two other developers talking about our experiences from the first day of the conference.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/FingerprintsOfCasperFabricius?a=l_9UXcZ_Jqw:FA1xuvBh1P4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/FingerprintsOfCasperFabricius?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/FingerprintsOfCasperFabricius?a=l_9UXcZ_Jqw:FA1xuvBh1P4:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/FingerprintsOfCasperFabricius?i=l_9UXcZ_Jqw:FA1xuvBh1P4:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/FingerprintsOfCasperFabricius?a=l_9UXcZ_Jqw:FA1xuvBh1P4:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/FingerprintsOfCasperFabricius?i=l_9UXcZ_Jqw:FA1xuvBh1P4:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://casperfabricius.com/site/2010/03/16/curiosities-of-html5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Community Day ‘10 is coming up</title>
		<link>http://casperfabricius.com/site/2010/02/19/community-day-10-is-coming-up/</link>
		<comments>http://casperfabricius.com/site/2010/02/19/community-day-10-is-coming-up/#comments</comments>
		<pubDate>Fri, 19 Feb 2010 21:59:17 +0000</pubDate>
		<dc:creator>Casper Fabricius</dc:creator>
		<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/home/cfp/casperfabricius.com/site/wp-content/plugins/autometa/autometa.php</b> on line <b>324</b><br />
		<category><![CDATA[ironruby]]></category>
		<category><![CDATA[rails]]></category>

	<!-- AutoMeta Start -->
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://casperfabricius.com/site/?p=282</guid>
		<description><![CDATA[I did a well-received talk on ActiveRecord at last year&#8217;s Community Day. Community Day &#8216;09 was the first of its kind in Copenhagen, and it was quite successful in bringing developers with different technical backgrounds together as well as attracting students &#8211; probably because of the free beer :)
Community Day in Copenhagen is back again [...]]]></description>
			<content:encoded><![CDATA[<p>I did a well-received talk on ActiveRecord at <a href="http://casperfabricius.com/site/2009/05/31/community-day-2009-in-copenhagen/">last year&#8217;s Community Day</a>. Community Day &#8216;09 was the first of its kind in Copenhagen, and it was quite successful in bringing developers with different technical backgrounds together as well as attracting students &#8211; probably because of the free beer :)</p>
<p><a href="http://communityday.in/copenhagen/">Community Day in Copenhagen</a> is back again this year, so reserve May 27 if you are near Copenhagen and like free tech-talks, networking and beer. This year <a href="http://danielfrost.dk/">Daniel Frost</a>, the Microsoft evangelist that makes it happen, has involved me and several other developers actively in the planning of the day. With CD &#8216;10 we have raised the level of ambition &#8211; bigger venue, more people, more talks and if course more fun.</p>
<p>We will have <a href="http://communityday.in/copenhagen/Home/Agenda">20 sessions</a> distributed on four concurrent tracks covering a surprisingly wide number of topics &#8211; very few of the talks are on Microsoft-technologies, in fact so few that we might loose a few of those .NET consultants who thinks anything non-MS are not worth listening to ;) Still, if you are doing anything at all related to the web (and most of us are, right?) you will surely find topics such as HTML 5, Single Sign On, Azure, Advanced jQuery etc. interesting.</p>
<p><span id="more-282"></span></p>
<p>I will be giving a talk with the rather bold title &#8220;Replace ASP.NET with IronRuby on Rails&#8221;. It will give me an excuse to seriously dive into IronRuby and how to make a Rails site talk fluently with .NET libraries and assemblies. Coming from a serious amount of ASP.NET development myself, I really think a lot of web-based .NET projects could benefit from Ruby on Rails. The only time I was really happy with ASP.NET was when I switched to that from classic ASP &#8211; but since then, it hasn&#8217;t evolved that much. Granted, ASP.NET MVC has rescued developers from the annyoing &#8220;webform&#8221; structure, but it still has a long way to go.</p>
<p>I&#8217;m getting ahead of myself here, come watch the session &#8211; <a href="http://cd10.eventbrite.com">sign up for Community Day &#8216;10 now</a>!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/FingerprintsOfCasperFabricius?a=h30aBnhE598:eBh04vQW5IQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/FingerprintsOfCasperFabricius?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/FingerprintsOfCasperFabricius?a=h30aBnhE598:eBh04vQW5IQ:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/FingerprintsOfCasperFabricius?i=h30aBnhE598:eBh04vQW5IQ:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/FingerprintsOfCasperFabricius?a=h30aBnhE598:eBh04vQW5IQ:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/FingerprintsOfCasperFabricius?i=h30aBnhE598:eBh04vQW5IQ:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://casperfabricius.com/site/2010/02/19/community-day-10-is-coming-up/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Multiple Ruby versions with RVM</title>
		<link>http://casperfabricius.com/site/2010/01/24/multiple-ruby-versions-with-rvm/</link>
		<comments>http://casperfabricius.com/site/2010/01/24/multiple-ruby-versions-with-rvm/#comments</comments>
		<pubDate>Sun, 24 Jan 2010 11:47:47 +0000</pubDate>
		<dc:creator>Casper Fabricius</dc:creator>
		<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/home/cfp/casperfabricius.com/site/wp-content/plugins/autometa/autometa.php</b> on line <b>324</b><br />
		<category><![CDATA[rails]]></category>

	<!-- AutoMeta Start -->
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://casperfabricius.com/site/?p=276</guid>
		<description><![CDATA[Rails 3 is just around the corner. It is optimized for the better performance and superior features of Ruby 1.9, but it also plays nicely with version 1.8.7. Ruby 1.8.6, on the other hand, cannot run Rails 3. This might not be a problem for you at all. If you are on a Mac, you [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://github.com/rails/rails/">Rails 3</a> is just around the corner. It is optimized for the better performance and superior features of Ruby 1.9, but it also plays nicely with version 1.8.7. Ruby 1.8.6, on the other hand, cannot run Rails 3. This might not be a problem for you at all. If you are on a Mac, you were probably faced with Ruby 1.8.7 last year at the latest, when the upgrade to Snow Leopard changed the built-in Ruby version from 1.8.6 to 1.8.7. Most applications built for 1.8.6 runs fine on 1.8.7 &#8211; but many servers and deployment environments still runs only 1.8.6.</p>
<p>For me, the situation is like this: My standard version of Ruby on my development machine is 1.8.7. I deploy to many different environments, some (the ones I have a degree of control over) runs 1.8.7 and others (such as Heroku and some customer&#8217;s servers) runs 1.8.6. I can test and code away happily only to get some ugly exceptions when I deploy because I have called <code>count</code> on an array instead of <code>length</code>. Further, I also want to play with the new features of Ruby 1.9 and run Rails 3 on it. And that&#8217;s not to mention that I also use alternative Ruby implementations such as JRuby for projects where I need to tap into Java libraries.</p>
<p><span id="more-276"></span></p>
<p>So that&#8217;s at least four different versions and implementations of Ruby I want to use at various times. I need to compile gems separately for each of them, and I don&#8217;t want them to clutter up my default and very functional Ruby 1.8.7 installation which I still use most of the time. </p>
<p><a href="http://rvm.beginrescueend.com/">Ruby Version Manager</a> (rvm) to the rescue! This very welcome open source project allows us to easily install, manage and switch between multiple Ruby versions and implementations with a single command. The software itself is also easy to install:</p>
<pre><code>
sudo gem install rvm
rvm-install
</code></pre>
<p>Once you have followed the instructions and pasted the line of script into the correct file and restarted (or sourced) your shell, I recommend that you upgrade to the edge version of rvm by running this command:</p>
<pre><code>
rvm update --head
</code></pre>
<p>This gives you access to the newest versions of the installation scripts, and that is needed if you for instance want to install JRuby:</p>
<pre><code>
rvm install jruby
rvm jruby
</code></pre>
<p>That second line is all you need to switch between ruby implementations &#8211; here we switch to JRuby. Note that this is <i>not</i> a system-wide change &#8211; the switch is done simply by changing a few environment variables in your current shell so <code>ruby</code>, <code>rake</code> and so on now refers to the JRuby versions.</p>
<p>One gotcha is that gem will installed the wrong place if you have the <code>—user-install</code> flag in your <code>.gemrc</code> file. The only current resolution I know is to remove the flag.</p>
<p>Never the less, I will highly recommend that you install Ruby Version Manager and play with different Ruby version and implementations &#8211; it has never been easier.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/FingerprintsOfCasperFabricius?a=XWXren7EhTs:BGTN6XPR4AU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/FingerprintsOfCasperFabricius?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/FingerprintsOfCasperFabricius?a=XWXren7EhTs:BGTN6XPR4AU:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/FingerprintsOfCasperFabricius?i=XWXren7EhTs:BGTN6XPR4AU:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/FingerprintsOfCasperFabricius?a=XWXren7EhTs:BGTN6XPR4AU:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/FingerprintsOfCasperFabricius?i=XWXren7EhTs:BGTN6XPR4AU:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://casperfabricius.com/site/2010/01/24/multiple-ruby-versions-with-rvm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Happy New Year</title>
		<link>http://casperfabricius.com/site/2010/01/01/happy-new-year-2/</link>
		<comments>http://casperfabricius.com/site/2010/01/01/happy-new-year-2/#comments</comments>
		<pubDate>Fri, 01 Jan 2010 15:14:26 +0000</pubDate>
		<dc:creator>Casper Fabricius</dc:creator>
		<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/home/cfp/casperfabricius.com/site/wp-content/plugins/autometa/autometa.php</b> on line <b>324</b><br />
		<category><![CDATA[rails]]></category>

	<!-- AutoMeta Start -->
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://casperfabricius.com/site/?p=270</guid>
		<description><![CDATA[
Enjoy the new decade &#8211; take care of our world.
]]></description>
			<content:encoded><![CDATA[<p><object width="400" height="225"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=8456985&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=8456985&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="225"></embed></object></p>
<p>Enjoy the new decade &#8211; take care of our world.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/FingerprintsOfCasperFabricius?a=8pKRxDoaSao:l5AiDKwmtCw:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/FingerprintsOfCasperFabricius?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/FingerprintsOfCasperFabricius?a=8pKRxDoaSao:l5AiDKwmtCw:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/FingerprintsOfCasperFabricius?i=8pKRxDoaSao:l5AiDKwmtCw:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/FingerprintsOfCasperFabricius?a=8pKRxDoaSao:l5AiDKwmtCw:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/FingerprintsOfCasperFabricius?i=8pKRxDoaSao:l5AiDKwmtCw:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://casperfabricius.com/site/2010/01/01/happy-new-year-2/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Introducing darebusters.com</title>
		<link>http://casperfabricius.com/site/2009/12/28/introducing-darebusters/</link>
		<comments>http://casperfabricius.com/site/2009/12/28/introducing-darebusters/#comments</comments>
		<pubDate>Mon, 28 Dec 2009 12:24:21 +0000</pubDate>
		<dc:creator>Casper Fabricius</dc:creator>
		<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/home/cfp/casperfabricius.com/site/wp-content/plugins/autometa/autometa.php</b> on line <b>324</b><br />
		<category><![CDATA[rails]]></category>

	<!-- AutoMeta Start -->
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://casperfabricius.com/site/?p=265</guid>
		<description><![CDATA[Most of us enjoy getting a link to something entertaining once in a while. In the early days of the World Wide Web, we send each other funny pictures via emails &#8211; today, we share our favorite videos via Twitter, Facebook and other social media. Most of these are so called &#8220;user-generated content&#8221; &#8211; that [...]]]></description>
			<content:encoded><![CDATA[<p>Most of us enjoy getting a link to something entertaining once in a while. In the early days of the World Wide Web, we send each other funny pictures via emails &#8211; today, we share our favorite videos via Twitter, Facebook and other social media. Most of these are so called &#8220;user-generated content&#8221; &#8211; that is; videos made by you and me for our own amusement and to get some feedback from other people. Many videos are &#8211; to put it nicely &#8211; mediocre, but the ones that spread and go viral are usually really good. Not because they necessarily feature great talent or professionalism, but simply because they are so damn entertaining.</p>
<p>For some reason &#8211; and I am sure people with a bit more insight into the human psyche than me can tell you exactly why &#8211; videos where people do something really stupid, disgusting, dangerous or daring are amongst the most popular. But what reward do the people who makes these videos get for their hard work? A lot of views and comments on Youtube? That&#8217;s nice, sure, but couldn&#8217;t we get something even better if the makers actually earned some money on entertaining the rest of us?</p>
<p><span id="more-265"></span></p>
<p><a href="http://darebusters.com">darebusters.com</a> is where this is happening right now. We have created a platform where people who wants to show how truly talented or crazy they are rewarded for their hard work in cash &#8211; we call them darebusters. darebusters.com is not the next Youtube or Vimeo &#8211; rather, it is intended to be a sprouting community of people with crazy ideas for dares, people willing to sponsor those dares on video and &#8211; of course &#8211; the darebusters making it all happen.</p>
<p>Here is how it works: A darebuster uploads a teaser video where he explains what kind of dare he has in mind &#8211; or a user suggests a dare for somebody else to complete. Either way, the dare now has a certain time period to collect the required amount of money through micropayments from other users who thinks that idea is cool enough to support. When the amount is reached, the darebuster must now complete the dare and the ratings the completion video receives decides how much money the he gets out of it.</p>
<p>The business model for darebusters.com is simple &#8211; there is no subscription fee or price tag for watching specific videos. Rather, users are required to sponsor a dare at least every two weeks to continually have access to all completion videos. This way, the users decides which dares are really worth making and a higher quality of entertainment is reached.</p>
<p>I am a founding partner of darebusters.com and I have developed the entire site in Ruby on Rails during the last couple of months (well, except for the fantastic graphical design). We are currently testing the site in a closed beta, but if you signup for a beta invitation or contact me, we will let you in to play around with it: <a href="http://darebusters.com">darebusters.com</a>.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/FingerprintsOfCasperFabricius?a=-_dytSeOJDQ:OYLPW9zvsAo:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/FingerprintsOfCasperFabricius?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/FingerprintsOfCasperFabricius?a=-_dytSeOJDQ:OYLPW9zvsAo:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/FingerprintsOfCasperFabricius?i=-_dytSeOJDQ:OYLPW9zvsAo:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/FingerprintsOfCasperFabricius?a=-_dytSeOJDQ:OYLPW9zvsAo:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/FingerprintsOfCasperFabricius?i=-_dytSeOJDQ:OYLPW9zvsAo:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://casperfabricius.com/site/2009/12/28/introducing-darebusters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get a copy of all outgoing ActionMailer emails</title>
		<link>http://casperfabricius.com/site/2009/11/06/get-a-copy-of-all-outgoing-actionmailer-emails/</link>
		<comments>http://casperfabricius.com/site/2009/11/06/get-a-copy-of-all-outgoing-actionmailer-emails/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 17:21:38 +0000</pubDate>
		<dc:creator>Casper Fabricius</dc:creator>
		<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/home/cfp/casperfabricius.com/site/wp-content/plugins/autometa/autometa.php</b> on line <b>324</b><br />
		<category><![CDATA[rails]]></category>

	<!-- AutoMeta Start -->
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://casperfabricius.com/site/?p=259</guid>
		<description><![CDATA[People care about emails. They don&#8217;t like to be bothered with emails they find unimportant, especially not if they are sent by mistake, have the wrong content or looks weird.
Many of the applications we build send out a lot of emails, and for some, it is a critical part of the system. Lokalebasen is such [...]]]></description>
			<content:encoded><![CDATA[<p>People care about emails. They don&#8217;t like to be bothered with emails they find unimportant, especially not if they are sent by mistake, have the wrong content or looks weird.</p>
<p>Many of the applications we build send out a lot of emails, and for some, it is a critical part of the system. <a href="http://www.lokalebasen.dk/">Lokalebasen</a> is such an application, and the people behind wanted to monitor all outgoing mail, whether generated by a page request, a cron job, an administrator or anything else.</p>
<p>I built a clever little monkey-patch for the Ruby on Rails ActionMailer that makes sure that all outgoing emails has a certain email address put on BCC. This is not visible to the recipient, but it allows you to keep an archive of all outgoing mail, which is certainly useful &#8211; especially for support and bug-tracking.</p>
<p><span id="more-259"></span></p>
<p>Drop this into your lib-folder (remember to change the email address):</p>
<p><script src="http://gist.github.com/227365.js"></script></p>
<p>- and be sure to enable it by adding this line to environment/production.rb (you probably don&#8217;t want to BCC mails sent in development and test mode):</p>
<p><code>
<pre>ActionMailer::Base.send(:include, BccAllMails)</pre>
<p></code></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/FingerprintsOfCasperFabricius?a=J0pJmI2fW9A:XgVg482_T6Q:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/FingerprintsOfCasperFabricius?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/FingerprintsOfCasperFabricius?a=J0pJmI2fW9A:XgVg482_T6Q:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/FingerprintsOfCasperFabricius?i=J0pJmI2fW9A:XgVg482_T6Q:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/FingerprintsOfCasperFabricius?a=J0pJmI2fW9A:XgVg482_T6Q:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/FingerprintsOfCasperFabricius?i=J0pJmI2fW9A:XgVg482_T6Q:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://casperfabricius.com/site/2009/11/06/get-a-copy-of-all-outgoing-actionmailer-emails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
