<?xml version="1.0" encoding="UTF-8"?>
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
  <title>blog.omdb-beta.org - Home</title>
  <id>tag:blog.omdb-beta.org,2008:mephisto/</id>
  <generator version="0.7.2" uri="http://mephistoblog.com">Mephisto Noh-Varr</generator>
  <link href="http://blog.omdb-beta.org/feed/atom.xml" rel="self" type="application/atom+xml"/>
  <link href="http://blog.omdb-beta.org/" rel="alternate" type="text/html"/>
  <updated>2007-10-19T11:16:50Z</updated>
  <entry xml:base="http://blog.omdb-beta.org/">
    <author>
      <name>benjamin</name>
    </author>
    <id>tag:blog.omdb-beta.org,2007-09-20:556</id>
    <published>2007-09-20T16:20:00Z</published>
    <updated>2007-10-19T11:16:50Z</updated>
    <link href="http://blog.omdb-beta.org/2007/9/20/railsconfeurope-slides" rel="alternate" type="text/html"/>
    <title>RailsConfEurope slides</title>
<content type="html">
            &lt;p&gt;I did a short session at this years RailsConfEurope, talking about the way the page caching is working on omdb. We decided to use page caching wherever possible, and with &lt;span class='caps'&gt;REST&lt;/span&gt; in mind, page caching will become more important. I did enjoy RailsConf, looking forward to next years conference, again in Berlin. Here are my slides&lt;/p&gt;


	&lt;p&gt;&lt;a href='http://blog.omdb-beta.org/assets/2007/9/20/070905.RailsConf.BenjaminKrause.Caching.pdf'&gt;Caching in a multilanguge environment&lt;/a&gt;&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://blog.omdb-beta.org/">
    <author>
      <name>benjamin</name>
    </author>
    <id>tag:blog.omdb-beta.org,2007-09-14:494</id>
    <published>2007-09-14T19:57:00Z</published>
    <updated>2007-09-14T20:08:12Z</updated>
    <link href="http://blog.omdb-beta.org/2007/9/14/bratwurst-sold-out" rel="alternate" type="text/html"/>
    <title>Bratwurst sold out</title>
<content type="html">
            &lt;p&gt;Just like the &lt;a href='http://www.railsconfeurope.com/'&gt;RailsConfEurope&lt;/a&gt;, &lt;a href='http://www.bratwurst-on-rails.com/'&gt;BratwurstOnRails&lt;/a&gt; is a sell out. Well, actually the Event is free, but after more than 400 registrations, we had to close down the sign up. We hit our capacity limit for the venue. We&#8217;re blown away by how many people are interested in a pre-conf socializing event, and we hope to start a tradition here :)&lt;/p&gt;


	&lt;p&gt;Thanks to &lt;a href='http://www.paperplanes.de/'&gt;Mathias&lt;/a&gt;, &lt;a href='http://www.workingwithrails.com/person/5459-florian-g-rsdorf'&gt;Florian&lt;/a&gt; and &lt;a href='http://www.amaveo.de/'&gt;Andrea&lt;/a&gt; for their help and support during the organisation. See you all on sunday.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://blog.omdb-beta.org/">
    <author>
      <name>benjamin</name>
    </author>
    <id>tag:blog.omdb-beta.org,2007-07-29:227</id>
    <published>2007-07-29T10:44:00Z</published>
    <updated>2007-09-03T16:23:00Z</updated>
    <link href="http://blog.omdb-beta.org/2007/7/29/tracking-down-a-memory-leak-in-ferret-0-11-4" rel="alternate" type="text/html"/>
    <title>Tracking down a memory leak in Ferret 0.11.4</title>
<content type="html">
            &lt;p&gt;We recently discovered a unnatural growth of our mongrel servers. Starting with about 70megs of memory, each mongrel process will have more than 200megs just a couple of hours later. We first blamed rmagick for the leak, as there are some reports circulating about possible leaks in rmagick.&lt;/p&gt;


	&lt;p&gt;Gathering data about the memory usage of rails is quite simple, using &lt;a href='http://blog.evanweaver.com/pages/bleak_house'&gt;bleak house&lt;/a&gt;, which uses a specially patched version of ruby. It can create nifty images about the object/memory usage of any ruby application. After some requests, we cannot find any memory leak in rmagick, but created this scary result, requesting several search pages.&lt;/p&gt;


&lt;div&gt;
&lt;a href='http://blog.omdb-beta.org/assets/2007/7/29/objects_by_controller.png'&gt;
  &lt;img src='http://blog.omdb-beta.org/assets/2007/7/29/controller_stats_thumb.png' alt='' /&gt;
&lt;/a&gt;
&lt;div&gt;the green line is the memory usage&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;

	&lt;p&gt;omdb uses ferret on a lot of occasions. All edit movie dialogs are dependent on ferret, and even the &#8216;similar movies&#8217; feature is just a complex ferret search statement. First of all we tried to isolate a search query, that will leak. Some of the more basic queries (like searching for people by name) were not affected. We focused on the movie-search, trying to find out, what causes the leak. Our first guess was, that some IndexReader or Writer was not closed properly, so old indexes still remains in the memory. The memory growth was quite huge, consuming almost 10megs every 10 requests. After some checking &#8211; and even rewriting our searcher class to purely rely on Ferret::Searcher, not on Ferret::Index::Index anymore &#8211; we couldn&#8217;t find any abandoned index.&lt;/p&gt;


	&lt;p&gt;So we took another look at the bleak house results. The number of objects in the search controller are consistent, there is no growth in the number of opened objects. The memory is jumping every 10 requests, but we fired our &lt;a href='http://curl.haxx.se/'&gt;curl&lt;/a&gt; requests to just one action, so there is no reason, why the memory is growing every 10th request. Looking at the special memory report of bleak house, we found, that the memory usage is growing linearly.&lt;/p&gt;


&lt;div&gt;
&lt;a href='http://blog.omdb-beta.org/assets/2007/7/29/memory_usage_in_kilobytes.png'&gt;
  &lt;img src='http://blog.omdb-beta.org/assets/2007/7/29/memory_usage_thumb.png' alt='' /&gt;
&lt;/a&gt;
&lt;/div&gt;
&lt;br /&gt;

	&lt;p&gt;We decided to remote all custom omdb ferret code and try to build the search using just the Ferret &lt;span class='caps'&gt;API&lt;/span&gt;. We added feature by feature, but long time, no leak. Just after we&#8217;ve added our custom analyzers, the leak appeared again. omdb uses a lot of different analyzers, not only per language, but per field. To use the right analyzer for each field/language, we&#8217;re using the PerFieldAnalyzer, which allows us to specify how we want each field to be analyzed. So the leak was not inside the IndexReader or Writer, but part of the analysis process. We managed to extract the problem to this &lt;a href='http://pastie.caboo.se/83195'&gt;simple script&lt;/a&gt;, that will consume lots and lots of memory, if you run it.&lt;/p&gt;


	&lt;p&gt;First we thought the MappingFilter is the problem, but it&#8217;s actually the PerFieldAnalyzer, that is leaking memory. If you just use StandardAnalyzers, the leak is marginal, but adding big character-mapping tables &#8211; maybe even to a lot of different fields &#8211; will result in the big memory consumption we&#8217;re experiencing.&lt;/p&gt;


	&lt;p&gt;The fix is trivial, the problem with the PerFieldAnalyzer is located in the C code of Ferret, so we just need to implement our own PerFieldAnalyzer, that is written in ruby. We&#8217;ve &lt;a href='http://pastie.caboo.se/83194'&gt;created a small Analyzer&lt;/a&gt; that will do the same as the build-in PerFieldAnalyzer.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://blog.omdb-beta.org/">
    <author>
      <name>benjamin</name>
    </author>
    <id>tag:blog.omdb-beta.org,2007-07-15:146</id>
    <published>2007-07-15T13:28:00Z</published>
    <updated>2007-09-03T16:26:23Z</updated>
    <link href="http://blog.omdb-beta.org/2007/7/15/setup-a-local-copy-of-omdb" rel="alternate" type="text/html"/>
    <title>setup a local copy of omdb</title>
<content type="html">
            &lt;p&gt;We&#8217;ve added a page on how to setup a copy of omdb.org on your local machine. The source code of omdb was released under the terms of the &lt;span class='caps'&gt;MIT&lt;/span&gt; License at this years &lt;a href='http://rails-konferenz.de/'&gt;Rails Konferenz&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;&lt;a href='http://bugs.omdb.org/wiki/InstallFromSubversion'&gt;http://bugs.omdb.org/wiki/InstallFromSubversion&lt;/a&gt;&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://blog.omdb-beta.org/">
    <author>
      <name>benjamin</name>
    </author>
    <id>tag:blog.omdb-beta.org,2007-07-06:53</id>
    <published>2007-07-06T14:43:00Z</published>
    <updated>2007-07-20T21:16:14Z</updated>
    <link href="http://blog.omdb-beta.org/2007/7/6/rails-1-1-6-and-ruby-1-8-6" rel="alternate" type="text/html"/>
    <title>rails 1.1.6 and ruby 1.8.6</title>
<content type="html">
            &lt;p&gt;While trying to install omdb on a fresh MacBookPro, we experienced strange error messages from active record. We just tried to access the database and got errors like this:&lt;/p&gt;

&lt;code&gt;
ArgumentError: wrong number of arguments (1 for 0)
        from .../activerecord-1.14.4/lib/active_record/vendor/mysql.rb:551:in `initialize'
        from .../activerecord-1.14.4/lib/active_record/vendor/mysql.rb:551:in `new'
        from .../activerecord-1.14.4/lib/active_record/vendor/mysql.rb:551:in `scramble41'
        from .../activerecord-1.14.4/lib/active_record/vendor/mysql.rb:141:in `real_connect'
&lt;/code&gt;

&lt;br /&gt;
&lt;br /&gt;

&lt;p&gt;It seems that the constructor for SHA1 has changed in ruby 1.8.6 and therefore the rails 1.1.6 mysql adaptor is broken, giving this error message. So what's the conclusion? Simply make sure you're using ruby 1.8.5. If you're using Mac and Darwinports, see this &lt;a href='http://www.stephenchu.com/2006/12/specifying-ruby-184-to-install-using.html'&gt;post&lt;/a&gt; on how to do this. The subversion-revision you need is &lt;a href='http://trac.macosforge.org/projects/macports/browser/trunk/dports/lang/ruby/?rev=21127'&gt;21127&lt;/a&gt;.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://blog.omdb-beta.org/">
    <author>
      <name>benjamin</name>
    </author>
    <id>tag:blog.omdb-beta.org,2007-06-19:22</id>
    <published>2007-06-19T11:15:00Z</published>
    <updated>2007-09-14T19:40:05Z</updated>
    <link href="http://blog.omdb-beta.org/2007/6/19/ferret-talk" rel="alternate" type="text/html"/>
    <title>ferret talk @ berlin ruby ug</title>
<content type="html">
            &lt;p&gt;A few weeks ago, I did a talk at the &lt;a href='http://www.rug-b.com/'&gt;berlin ruby user group&lt;/a&gt; about ferret and the ferret implementation at omdb. We&#8217;re happy with the way ferret fits into omdb, and a lot of our experiences (especially the background indexing) is now part of Jens&#8217; &lt;a href='http://projects.jkraemer.net/acts_as_ferret/wiki'&gt;acts_as_ferret plugin&lt;/a&gt; for Rails. If you&#8217;re planning to work with ferret, grab a copy of &lt;a href='http://lucenebook.com/'&gt;Lucene in Action&lt;/a&gt;, over at &lt;a href='http://www.manning.com/hatcher2/'&gt;Manning&lt;/a&gt;. It&#8217;s a great book and all the details about Analyzers and Tokenizers is very useful to understand the way Ferret works.&lt;/p&gt;


	&lt;p&gt;Here&#8217;re the &lt;a href='http://blog.omdb-beta.org/assets/2007/4/8/070405.RoR.UG.Bln.Ferret.pdf'&gt;sildes&lt;/a&gt; of the talk. If you&#8217;re going to Rails Konferenz or Rails Conf Europe, be sure to attend Jens talk about acts_as_ferret.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://blog.omdb-beta.org/">
    <author>
      <name>benjamin</name>
    </author>
    <id>tag:blog.omdb-beta.org,2007-06-19:48</id>
    <published>2007-06-19T11:06:00Z</published>
    <updated>2007-07-16T07:35:37Z</updated>
    <link href="http://blog.omdb-beta.org/2007/6/19/talking-at-the-german-railsconf" rel="alternate" type="text/html"/>
    <title>Talking at the german RailsConf</title>
<content type="html">
            &lt;p&gt;The unofficial german &lt;a href='http://www.rails-konferenz.de'&gt;Rails Konferenz&lt;/a&gt; is this Friday. They asked me to talk about omdb and the conclusions we had come to after developing with Rails since the days of Rails 0.14. We&#8217;re looking forward seeing some of the german rails pioneers over in Frankfurt. I&#8217;ll add the slides here as soon as the conference is over.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://blog.omdb-beta.org/">
    <author>
      <name>benjamin</name>
    </author>
    <id>tag:blog.omdb-beta.org,2007-04-27:47</id>
    <published>2007-04-27T15:44:00Z</published>
    <updated>2007-06-03T15:15:37Z</updated>
    <link href="http://blog.omdb-beta.org/2007/4/27/embed-omdb-movie-information" rel="alternate" type="text/html"/>
    <title>embed omdb movie information</title>
<content type="html">
            &lt;p&gt;We've added a new feature to allow you to embed some movie information in you personal blog or website. here is a preview.&lt;/p&gt;

&lt;div&gt;
&amp;lt;object height='420' width='440'&gt;&amp;lt;param name='movie' value='http://www.omdb.org/flash/movie_facts.swf?movie=285'&gt;&amp;lt;/param&gt;&amp;lt;param name='wmode' value='transparent'&gt;&amp;lt;/param&gt;&amp;lt;embed type='application/x-shockwave-flash' src='http://www.omdb.org/flash/movie_facts.swf?movie=285' height='420' wmode='transparent' width='440'&gt;&amp;lt;/embed&gt;&amp;lt;/object&gt;
&lt;/div&gt;
          </content>  </entry>
  <entry xml:base="http://blog.omdb-beta.org/">
    <author>
      <name>benjamin</name>
    </author>
    <id>tag:blog.omdb-beta.org,2007-03-22:21</id>
    <published>2007-03-22T11:04:00Z</published>
    <updated>2007-06-03T15:14:47Z</updated>
    <link href="http://blog.omdb-beta.org/2007/3/22/one-year-in-the-making" rel="alternate" type="text/html"/>
    <title>One year in the making</title>
<content type="html">
            &lt;p&gt;It&#8217;s one year ago now, that the first subversion-checkin was transfered to the omdb-svn. You can see all the details on that histroic event right here&lt;/p&gt;


	&lt;p&gt;&lt;a href='http://bugs.omdb.org/changeset/1'&gt;http://bugs.omdb.org/changeset/1&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;I actually started coding some three month earlier, building a prototype with less functionality and without a real layout. The interface was ugly, most of our current usability wasn&#8217;t even thought of. This is a screenshot how omdb looked like back in April of 2006, the first layout we wanted to implement.&lt;/p&gt;


&lt;div&gt;
&lt;img src='http://blog.omdb-beta.org/assets/2007/3/22/scribble_v02_copy.jpg' /&gt;
&lt;/div&gt;
&lt;br /&gt;

	&lt;p&gt;Thanks to &lt;a href='http://www.pixtur.de/'&gt;Thomas&lt;/a&gt; for doing most of the Interface-related work back then. After that several People worked on the Layout, including &lt;a href='http://www.spoonlight.com/'&gt;Sheila&lt;/a&gt; and &lt;a href='http://www.namics.com/'&gt;Namics&lt;/a&gt;.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://blog.omdb-beta.org/">
    <author>
      <name>benjamin</name>
    </author>
    <id>tag:blog.omdb-beta.org,2007-03-14:20</id>
    <published>2007-03-14T14:44:00Z</published>
    <updated>2007-06-03T15:15:05Z</updated>
    <link href="http://blog.omdb-beta.org/2007/3/14/encyclopedia-page" rel="alternate" type="text/html"/>
    <title>Encyclopedia Page</title>
<content type="html">
            &lt;p&gt;I&#8217;m not a designer. It&#8217;s been a long and hard way to get to the current omdb design and interface. And I&#8217;ve always avoided to implement the main pages for our four main sections Movies, People, Companies and Encyclopedia. Last Sunday, on my way to Princeton, I finally came up with a design for the Encyclopedia Page i&#8217;m quite satisfied with.&lt;/p&gt;


	&lt;p&gt;&lt;a href='http://www.omdb.org/encyclopedia'&gt;http://www.omdb.org/encyclopedia&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;Now we need to finalize the &lt;a href='http://www.omdb.org/movie'&gt;Movie Page&lt;/a&gt;, the &lt;a href='http://www.omdb.org/person'&gt;People Page&lt;/a&gt; and the &lt;a href='http://www.omdb.org/company'&gt;Company Page&lt;/a&gt;. I&#8217;ll go back to europe next Sunday, maybe there&#8217;s enough time to finalize these pages.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://blog.omdb-beta.org/">
    <author>
      <name>benjamin</name>
    </author>
    <id>tag:blog.omdb-beta.org,2007-03-08:19</id>
    <published>2007-03-08T21:01:00Z</published>
    <updated>2007-06-03T15:15:45Z</updated>
    <link href="http://blog.omdb-beta.org/2007/3/8/safari-ajax-and-utf8" rel="alternate" type="text/html"/>
    <title>Safari, AJAX and UTF8</title>
<content type="html">
            &lt;p&gt;The Lightbox-Popups we&#8217;re using did not work with Safari, at least until now. All &lt;span class='caps'&gt;UTF8&lt;/span&gt; characters were broken, even though Firefox and &lt;span class='caps'&gt;IE7&lt;/span&gt; were showing them correctly. Searching the web offers some standard solutions, however, we implemented our own few lines of code, as some of the solutions did not work the way we want. We&#8217;ve implemented a after_filter like that.&lt;/p&gt;


	&lt;pre&gt;&lt;code&gt;def add_utf8_header
  content_type = @headers[&quot;Content-Type&quot;] || ( request.xhr? ? 'text/javascript' : 'text/html' )
  if /^text\//.match(content_type)
    @headers[&quot;Content-Type&quot;] = &quot;#{content_type}; charset=utf-8&quot; 
  end
end&lt;/code&gt;&lt;/pre&gt;


	&lt;p&gt;Right now it&#8217;s working fine with all major browsers. However, our first attempt &#8211; adding a AddDefaultCharset option to apache &#8211; did not work.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://blog.omdb-beta.org/">
    <author>
      <name>benjamin</name>
    </author>
    <id>tag:blog.omdb-beta.org,2007-02-28:17</id>
    <published>2007-02-28T20:04:00Z</published>
    <updated>2007-04-27T15:40:07Z</updated>
    <link href="http://blog.omdb-beta.org/2007/2/28/2007-02-28-created-a-blog-entry" rel="alternate" type="text/html"/>
    <title>2007-02-28 created a blog entry</title>
<content type="html">
            &lt;p&gt;Today we finished our logging system, partially based on Brandon Keepers &lt;a href='http://opensoul.org/2006/07/21/acts_as_audited/'&gt;acts_as_audited&lt;/a&gt;. During the closed beta phase our editors created 16501 People, 5028 Categories (Plot Keywords, Genres, etc.), 1352 Movies, 937 Companies and 510 Jobs. All of these objects without any log-information. To keep our history consistent with all soon-to-be created objects, each of these old objects needed at least one logentry. So today we created 20.000 logentries, one &lt;em&gt;created something&lt;/em&gt; entry per object. I guess we can officially call the 2007-02-28 the day, omdb has been  created.&lt;/p&gt;


	&lt;p&gt;So what&#8217;s left to do? We still have a bunch of errors in our testcases, nothing serious, but a few of them need special attention. And we&#8217;re waiting for the 1.0 release of ferret, due by the end of this week. But generally spoken, we&#8217;re ready to launch.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://blog.omdb-beta.org/">
    <author>
      <name>benjamin</name>
    </author>
    <id>tag:blog.omdb-beta.org,2007-02-14:15</id>
    <published>2007-02-14T17:14:00Z</published>
    <updated>2007-02-14T22:28:46Z</updated>
    <link href="http://blog.omdb-beta.org/2007/2/14/another-update" rel="alternate" type="text/html"/>
    <title>Another Update..</title>
<content type="html">
            &lt;p&gt;Time for the last few updates before going live. Most importantly we improved the search stability by using &lt;a href='http://backgroundrb.rubyforge.org/'&gt;backgroundrb&lt;/a&gt; to serialize all indexing requests. While &lt;a href='http://ferret.davebalmain.com/trac/'&gt;Dave&lt;/a&gt; announced that ferret 1.0 will be released soon, we encountered a number of problems with the ferret index if you have several threads writing to the index. Backgroundrb eliminated that problem and we&#8217;re now quite happy with our 0.10.14 ferret index.&lt;/p&gt;


	&lt;p&gt;We also included the first version of logging on &#8216;who changed what information for which movie&#8217;. By now only a few selected people are able to enter and edit movie data on omdb.org. This is part of our closed beta test that will soon be finished. We now need a way of keeping track of all the changes of a movie and we want to be able to provide &lt;span class='caps'&gt;RSS&lt;/span&gt; feeds.&lt;/p&gt;


	&lt;p&gt;We first checked out &lt;a href='http://ar-versioned.rubyforge.org/'&gt;acts_as_versioned&lt;/a&gt; and &lt;a href='http://opensoul.org/2006/7/21/acts_as_audited'&gt;acts_as_audited&lt;/a&gt;, but both solutions are not what we were looking for. Mostly, because both cannot keep track of changes in relations. Most of the movie data is based on relations (casts/crew-information, categories, plot keywords, production companies and so on). We decided to implement our own logging mechanism that will log all these changes. It is partially based on acts_as_audited, thanks to Brandon for the plugin. Here&#8217;s a preview of what it might look like:&lt;/p&gt;


	&lt;p&gt;&lt;a href='http://www.omdb-beta.org/movie/70/history'&gt;http://www.omdb-beta.org/movie/70/history&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;Some things are left to do though, e.g. we need to include all of the wiki/abstract changes into the log. Wiki/abstracts are still using acts_as_versioned. Furthermore the log is not that nifty, we need to work on the design. I&#8217;m sure a few bugs will still be in the code but if anyone is interested in such a plugin, we&#8217;ll see if we can extract it.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://blog.omdb-beta.org/">
    <author>
      <name>benjamin</name>
    </author>
    <id>tag:blog.omdb-beta.org,2007-01-28:14</id>
    <published>2007-01-28T20:17:00Z</published>
    <updated>2007-09-03T16:24:33Z</updated>
    <link href="http://blog.omdb-beta.org/2007/1/28/livetabs-plugin" rel="alternate" type="text/html"/>
    <title>livetabs plugin</title>
<content type="html">
            &lt;p&gt;A lot of dialogs on omdb have tabbed content that you can switch via Javascript. We&#8217;ve created a small plugin to extract that functionality.&lt;/p&gt;


	&lt;p&gt;The &#8216;livetabs&#8217; plugin for Rails makes it easy to add any number of tabs and tabbed content, that the user can switch via javascript. To install the plugin, use rails plugin script&lt;/p&gt;


	&lt;pre&gt;&lt;code&gt;script/plugin install http://svn.omdb-beta.org/plugins/livetabs&lt;/code&gt;&lt;/pre&gt;


	&lt;p&gt;Next you need to copy the javascript, stylesheets and images to your rails public folder. Right now the plugin has just one skin, that is the current omdb-tab-layout. To copy these assets, type&lt;/p&gt;


	&lt;pre&gt;&lt;code&gt;rake livetabs:install:default&lt;/code&gt;&lt;/pre&gt;


	&lt;p&gt;To use the tabs, simply add a line like that to your view:&lt;/p&gt;


	&lt;pre&gt;&lt;code&gt;&amp;lt;%= livetabs &quot;One&quot;, &quot;Two&quot;, &quot;Three&quot; %&amp;gt;&lt;/code&gt;&lt;/pre&gt;


	&lt;p&gt;Which will you give three tabs. You can use any number of tabs of course. The pluin will look for partials named like the name of the tab, so in this case for a _one.rhtml, _two.rhtml and _three.rhtml. If you use spaces in your tab names, they will be transformed to underscores. So a tab names &#8220;Recent News&#8221; will look for a partial called _recent_news.rhtml.&lt;/p&gt;


	&lt;p&gt;You need to include the default javascripts (javascript_include_tag :defaults) and the livetabs stylesheets (stylesheet_link_tag &#8216;livetabs&#8217;) in your layout.&lt;/p&gt;


	&lt;p&gt;Here is a small preview, how the tabs will look like.&lt;/p&gt;


&lt;div&gt; &lt;img src='http://blog.omdb-beta.org/assets/2007/1/28/livetab_example.jpg' alt='' /&gt;&lt;/div&gt;
          </content>  </entry>
  <entry xml:base="http://blog.omdb-beta.org/">
    <author>
      <name>benjamin</name>
    </author>
    <id>tag:blog.omdb-beta.org,2007-01-16:13</id>
    <published>2007-01-16T10:53:00Z</published>
    <updated>2007-01-17T21:46:31Z</updated>
    <link href="http://blog.omdb-beta.org/2007/1/16/brad_pitt" rel="alternate" type="text/html"/>
    <title>Mr. Pitt and Mr. Brosnan</title>
<content type="html">
            &lt;p&gt;One of the great features of &lt;a href='http://macromates.com/'&gt;textmate&lt;/a&gt;, that i got used to so quickly, is the way you load files. If you want to edit the movie_controller, just press cmd-t, enter &#8216;mo co&#8217; and the movie_controller.rb file will be right there for you to select. This is something i wanted to add to omdb, if you add for example actors to a movie.&lt;/p&gt;


	&lt;p&gt;Its already possible to add someone like &lt;strong&gt;Brad Pitt&lt;/strong&gt; as an actor by simply searching for &#8216;br pi&#8217; in the appropriate add-actor dialog. omdb will find Brad, however, you will get results for &lt;strong&gt;Pierce Brosnan&lt;/strong&gt; or &lt;strong&gt;Pieter Jan Brugge&lt;/strong&gt; as well. Entering the phrases &#8216;br&#8217; and &#8216;pi&#8217; should make sure, you don&#8217;t want to find Pierce Brosnan, otherwise you would have entered &#8216;pi br&#8217; not &#8216;br pi&#8217;. :-)&lt;/p&gt;


	&lt;p&gt;With the wonderful magic of &lt;a href='http://ferret.davebalmain.com/trac/'&gt;ferret&lt;/a&gt;, you can do exactly that (you need to upgrade to at least 0.10.14). Take a look at the following example:&lt;/p&gt;


	&lt;pre&gt;&lt;code&gt;require 'rubygems'
require 'ferret'
i = Ferret::I.new
i &amp;lt;&amp;lt; {:name =&amp;gt; 'Janice Joplin'}
i &amp;lt;&amp;lt; {:name =&amp;gt; 'James Joyce'}
i &amp;lt;&amp;lt; {:name =&amp;gt; 'John Jarrett'}&lt;/code&gt;&lt;/pre&gt;


	&lt;p&gt;Now here&#8217;s the query to make sure you find only two of the people.&lt;/p&gt;


	&lt;pre&gt;&lt;code&gt;include Ferret::Search::Spans
puts i.search(SpanNearQuery.new(:clauses =&amp;gt; [
  SpanPrefixQuery.new(:name, 'ja'),
  SpanPrefixQuery.new(:name, 'jo')
], :in_order =&amp;gt; true)).to_s(:name)&lt;/code&gt;&lt;/pre&gt;


	&lt;p&gt;You just get 2 hits (3 hits with ferret versions prior to 0.10.14). omdb will make use of it in the near future, improving the usabilty even more.&lt;/p&gt;
          </content>  </entry>
</feed>
