<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-US">
  <id>tag:matharvard.ca,2009:/posts</id>
  <link type="text/html" rel="alternate" href="http://matharvard.ca" />
  
  <title>Mat Harvard</title>
  <updated>2009-11-01T23:55:00-08:00</updated>
  <link rel="self" href="http://feeds.feedburner.com/matharvard" type="application/atom+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><entry>
    <id>tag:matharvard.ca,2009:Post/41</id>
    <published>2009-11-01T23:58:46-08:00</published>
    <updated>2009-11-01T23:58:46-08:00</updated>
    <link type="text/html" rel="alternate" href="http://matharvard.ca/posts/41-experimental-caching" />
    <title>Experimental Caching</title>
    <content type="html">&lt;p&gt;I&amp;#x27;ve added some caching around the site to speed things up a bit. The biggest hang time right now is when &lt;a href="http://modrails.com/"&gt;Passenger&lt;/a&gt; starts up (as my site doesn&amp;#x27;t receive a whole lot of traffic, it goes sleepy mode often). Hopefully it makes a difference, but we&amp;#x27;ll see!&lt;/p&gt;</content>
    <author>
      <name>Mat Harvard</name>
      <email>mat dot harvard at gmail dot com</email>
    </author>
  </entry>
  <entry>
    <id>tag:matharvard.ca,2009:Post/40</id>
    <published>2009-10-25T16:06:38-07:00</published>
    <updated>2009-10-25T16:06:38-07:00</updated>
    <link type="text/html" rel="alternate" href="http://matharvard.ca/posts/40-preview-your-comments" />
    <title>Preview Your Comments</title>
    <content type="html">&lt;p&gt;You&amp;#x27;re now able to preview your comments! I spent a little while today fiddling with JavaScript and Rails to get it working nicely. It&amp;#x27;s really easy to use, just type your comment, hit the preview button, it will apply all my formatting rules to it, the form will be hidden, and a preview pane will appear with your fancy comment in it. The preview pane allows you to save your comment, or to edit it some more.&lt;/p&gt;</content>
    <author>
      <name>Mat Harvard</name>
      <email>mat dot harvard at gmail dot com</email>
    </author>
  </entry>
  <entry>
    <id>tag:matharvard.ca,2009:Post/39</id>
    <published>2009-10-24T01:18:58-07:00</published>
    <updated>2009-10-24T01:39:42-07:00</updated>
    <link type="text/html" rel="alternate" href="http://matharvard.ca/posts/39-the-orange-seed" />
    <title>The Orange Seed</title>
    <content type="html">&lt;p&gt;Silent as a ninja, &lt;a href="http://theorangeseed.com/"&gt;The Orange Seed&lt;/a&gt; makes its debut. &lt;strong&gt;Who:&lt;/strong&gt; Richard Neary, Sunny Hundal and my self. &lt;strong&gt;What:&lt;/strong&gt; A tumblelog. &lt;strong&gt;Where:&lt;/strong&gt; &lt;a href="http://theorangeseed.com/"&gt;http://theorangeseed.com/&lt;/a&gt;. &lt;strong&gt;When:&lt;/strong&gt; October 22nd to infinity. &lt;strong&gt;Why:&lt;/strong&gt; I&amp;#x27;ve always wanted a tumblelog, and having one written in Rails is even cooler.&lt;/p&gt;

&lt;p&gt;The source code is available on &lt;a href="http://github.com/matharvard/theorangeseed"&gt;GitHub&lt;/a&gt;!&lt;/p&gt;</content>
    <author>
      <name>Mat Harvard</name>
      <email>mat dot harvard at gmail dot com</email>
    </author>
  </entry>
  <entry>
    <id>tag:matharvard.ca,2009:Post/38</id>
    <published>2009-10-23T20:24:29-07:00</published>
    <updated>2009-11-01T22:52:55-08:00</updated>
    <link type="text/html" rel="alternate" href="http://matharvard.ca/posts/38-thinking-about-sphinx" />
    <title>Thinking About Sphinx</title>
    <content type="html">&lt;p&gt;I just finished installing Sphinx on my slice, and setting up Thinking Sphinx on my website. Previously I was just using a simple &lt;code&gt;search&lt;/code&gt; method in my &lt;code&gt;Post&lt;/code&gt; model, but it was always a little on the slow side, especially now since I&amp;#x27;ve started to publish more posts. Getting Sphinx running on my development machine was simple thanks to &lt;a href="http://www.viget.com/extend/installing-sphinx-on-os-x-leopard/"&gt;this article&lt;/a&gt;. Installing it on the slice was also easy (&lt;code&gt;./configure; make; make install&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;The only down-side was the need to manually index and start the Sphinx server. Hello &lt;code&gt;crontab&lt;/code&gt;, &lt;code&gt;rake&lt;/code&gt; and &lt;code&gt;capistrano&lt;/code&gt;.&lt;/p&gt; Capistrano is mainly just for utility, so I can quickly start/stop/index from my local machine.

&lt;p&gt;I put these tasks under the &lt;code&gt;deploy&lt;/code&gt; namespace:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;desc &amp;quot;Index Sphinx&amp;quot;
task :sphinx_index do
  run &amp;quot;/opt/ruby-enterprise-1.8.7-20090928/bin/rake -f /var/www/matharvard.ca/current/Rakefile thinking_sphinx:index RAILS_ENV=production&amp;quot;
end

desc &amp;quot;Start Sphinx&amp;quot;
task :sphinx_start do
  run &amp;quot;/opt/ruby-enterprise-1.8.7-20090928/bin/rake -f /var/www/matharvard.ca/current/Rakefile thinking_sphinx:start RAILS_ENV=production&amp;quot;
end

desc &amp;quot;Stop Sphinx&amp;quot;
task :sphinx_stop do
  run &amp;quot;/opt/ruby-enterprise-1.8.7-20090928/bin/rake -f /var/www/matharvard.ca/current/Rakefile thinking_sphinx:stop RAILS_ENV=production&amp;quot;
end
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Here&amp;#x27;s the line in my &lt;code&gt;crontab&lt;/code&gt; file.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;* 0 * * * /opt/ruby-enterprise-1.8.7-20090928/bin/rake -f /var/www/matharvard.ca/current/Rakefile thinking_sphinx:index 
RAILS_ENV=production
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This runs the &lt;code&gt;rake&lt;/code&gt; command every day at midnight. As you can see, I&amp;#x27;m using &lt;a href="http://www.rubyenterpriseedition.com/"&gt;Ruby Enterprise Edition&lt;/a&gt;, though it probably won&amp;#x27;t make a difference if I used regular Ruby for this.&lt;/p&gt;

&lt;p&gt;I also had to switch from &lt;a href="http://www.sqlite.org/"&gt;SQLite3&lt;/a&gt; to &lt;a href="http://mysql.com/"&gt;MySQL&lt;/a&gt;, in order to use Sphinx, which was easily accomplished by &lt;a href="http://github.com/adamwiggins/yaml_db"&gt;YamlDb&lt;/a&gt;!</content>
    <author>
      <name>Mat Harvard</name>
      <email>mat dot harvard at gmail dot com</email>
    </author>
  </entry>
  <entry>
    <id>tag:matharvard.ca,2009:Post/37</id>
    <published>2009-10-21T23:54:08-07:00</published>
    <updated>2009-10-23T01:44:48-07:00</updated>
    <link type="text/html" rel="alternate" href="http://matharvard.ca/posts/37-updated-design" />
    <title>Updated Design</title>
    <content type="html">&lt;p&gt;Since Apple just released a bunch of new products, I thought it would be right for me to release my latest product. So here it is, a new design! It doesn&amp;#x27;t quite deserve the term &amp;ldquo;product&amp;rdquo;, I know.&lt;/p&gt;

&lt;p&gt;The only product I&amp;#x27;m working on is a tumblelog, which I&amp;#x27;ve hinted to in previous posts. Everything is basically complete, it just needs a final polishing before it&amp;#x27;s good to go. Look for it by the end of this week.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; Currently experimenting with my recently listened tracks from &lt;a href="http://last.fm/user/matharvard"&gt;Last.fm&lt;/a&gt; in the sidebar. It&amp;#x27;s parsing the feed and displaying it at the moment, but I might experiment with aggregation if it impacts performance too much (which it seems to be doing). &lt;strong&gt;Update Two:&lt;/strong&gt; It was too slow, working on an aggregator.&lt;/p&gt;</content>
    <author>
      <name>Mat Harvard</name>
      <email>mat dot harvard at gmail dot com</email>
    </author>
  </entry>
</feed>
