<?xml version="1.0" encoding="UTF-8"?>
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
  <title>SamGranieri.com - Home</title>
  <id>tag:www.samgranieri.com,2008:mephisto/</id>
  <generator uri="http://mephistoblog.com" version="0.7.3">Mephisto Noh-Varr</generator>
  <link href="http://www.samgranieri.com/feed/atom.xml" rel="self" type="application/atom+xml"/>
  <link href="http://www.samgranieri.com/" rel="alternate" type="text/html"/>
  <updated>2008-05-29T19:47:59Z</updated>
  <entry xml:base="http://www.samgranieri.com/">
    <author>
      <name>sam</name>
    </author>
    <id>tag:www.samgranieri.com,2008-05-29:54</id>
    <published>2008-05-29T19:47:59Z</published>
    <updated>2008-05-29T19:47:59Z</updated>
    <link href="http://www.samgranieri.com/2008/5/29/coolest-railscast-yet-episode-111-advanced-search-form" rel="alternate" type="text/html"/>
    <title>Coolest Railscast Yet: Episode 111: Advanced Search Form</title>
<content type="html">
            &lt;p&gt;I've tried &lt;strong&gt;all sorts&lt;/strong&gt; of stuff to get advanced searches working well. This is some excellent ruby code for extracting parameters from a search form. &lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;&lt;a href=&quot;http://railscasts.com/episodes/111&quot;&gt;Episode 111: Advanced Search Form&lt;/a&gt;: &quot;If you need to create an advanced search with a lot of fields, it may not be ideal to use a GET request as I showed in episode 37. In this episode I will show you how to handle this by creating a Search resource.&quot;&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;(Via &lt;a href=&quot;http://www.railscasts.com&quot;&gt;Railscasts&lt;/a&gt;.)&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.samgranieri.com/">
    <author>
      <name>sam</name>
    </author>
    <id>tag:www.samgranieri.com,2008-05-29:53</id>
    <published>2008-05-29T19:20:57Z</published>
    <updated>2008-05-29T19:21:31Z</updated>
    <link href="http://www.samgranieri.com/2008/5/29/testing-marsedit" rel="alternate" type="text/html"/>
    <title>Testing MarsEdit</title>
<content type="html">
            &lt;p&gt;Time to see if MarsEdit Actually Works..&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Updated&lt;/strong&gt;: Damn, it does work!&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.samgranieri.com/">
    <author>
      <name>sam</name>
    </author>
    <id>tag:www.samgranieri.com,2008-03-07:42</id>
    <published>2008-03-07T19:36:35Z</published>
    <updated>2008-03-07T19:37:46Z</updated>
    <link href="http://www.samgranieri.com/2008/3/7/time-to-do-some-iphone-development-but-one-thing-is-missing-git" rel="alternate" type="text/html"/>
    <title>Time to do some iPhone development. But one thing is missing. Git!</title>
<content type="html">
            &lt;p&gt;I downloaded the iPhone SDK last night (once the site wasn't swamped). It looks pretty cool so far, and it's a good excuse to actually use Objective-C after using Ruby and C# professionally for the past couple of years (Notwithstanding all the proprietary stuff I had to use at Hewitt Associates) &lt;/p&gt;

&lt;p&gt;Xcode's gotten leaps and bounds better in the past couple of years. I definitely applaud the tools team at &lt;a href=&quot;http://www.apple.com&quot;&gt;Apple&lt;/a&gt; for the hard work. However, one thing that's a little bit disappointing is the version control systems that Apple integrates with Xcode: Subversion, CVS, and Perforce. &lt;/p&gt;

&lt;p&gt;I think it would be a huge boon if they could add in Git (and, oh what the heck, Mercurial) so that coders can use their favorite VCSs in xcode. &lt;/p&gt;

&lt;p&gt;Ok, I think I can manage by using git with the command line at the xcode project structure, but where's the fun in that? Who really likes context switching these days? &lt;/p&gt;

&lt;p&gt;Apple, please integrate git and mercurial into Xcode by the WWDC, at least.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.samgranieri.com/">
    <author>
      <name>sam</name>
    </author>
    <id>tag:www.samgranieri.com,2008-03-04:41</id>
    <published>2008-03-04T14:29:00Z</published>
    <updated>2008-03-05T03:57:03Z</updated>
    <link href="http://www.samgranieri.com/2008/3/4/obamas-viral-videos" rel="alternate" type="text/html"/>
    <title>Obama's viral videos</title>
<content type="html">
            &lt;p&gt;This is absolutely amazing. These videos are great&lt;/p&gt;

&lt;p&gt;&amp;lt;object height=&quot;355&quot; width=&quot;425&quot;&gt;&amp;lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/-_gcQVfEvEg&quot;&gt;&amp;lt;/param&gt;&amp;lt;param name=&quot;wmode&quot; value=&quot;transparent&quot;&gt;&amp;lt;/param&gt;&amp;lt;embed type=&quot;application/x-shockwave-flash&quot; src=&quot;http://www.youtube.com/v/-_gcQVfEvEg&quot; height=&quot;355&quot; wmode=&quot;transparent&quot; width=&quot;425&quot;&gt;&amp;lt;/embed&gt;&amp;lt;/object&gt;&lt;/p&gt;

&lt;p&gt;&amp;lt;object height=&quot;355&quot; width=&quot;425&quot;&gt;&amp;lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/jjXyqcx-mYY&quot;&gt;&amp;lt;/param&gt;&amp;lt;param name=&quot;wmode&quot; value=&quot;transparent&quot;&gt;&amp;lt;/param&gt;&amp;lt;embed type=&quot;application/x-shockwave-flash&quot; src=&quot;http://www.youtube.com/v/jjXyqcx-mYY&quot; height=&quot;355&quot; wmode=&quot;transparent&quot; width=&quot;425&quot;&gt;&amp;lt;/embed&gt;&amp;lt;/object&gt;&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.samgranieri.com/">
    <author>
      <name>sam</name>
    </author>
    <id>tag:www.samgranieri.com,2008-02-24:38</id>
    <published>2008-02-24T22:32:00Z</published>
    <updated>2008-02-24T22:49:35Z</updated>
    <link href="http://www.samgranieri.com/2008/2/24/frustrations-with-rspec" rel="alternate" type="text/html"/>
    <title>Frustrations with rSpec</title>
<content type="html">
            &lt;p&gt;I'm working on the new blog, and I'm having some trouble with rSpec testing controllers and nested routes. &lt;/p&gt;

&lt;p&gt;Here's my routes file&lt;/p&gt;

&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;ActionController::Routing::Routes.draw do |map|
  map.root :controller =&gt; &quot;frontpage&quot;
  map.resources :posts, :has_many =&gt; :comments 
end 
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;And here is some of the controller specs I'm trying to test&lt;/p&gt;

&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;require File.dirname(__FILE__) + '/../spec_helper'

describe CommentsController do
  describe &quot;handling GET /posts/1/comments&quot; do

    before(:each) do
      @comment = mock_model(Comment)
      Comment.stub!(:find).and_return(@comment)
      @post = mock_model(Post)
      @post.stub!(:comments)
      @post.comments.stub!(:find).and_return([@comment])
      Post.stub!(:find).and_return(@post)
    end

    def do_get
      get :index, :post_id =&gt;@post.id 
    end

    it &quot;should be successful&quot; do
      do_get
      response.should be_success
    end

    it &quot;should render index template&quot; do
      do_get
      response.should render_template('index')
    end

    it &quot;should find all comments&quot; do
      Comment.should_receive(:find).with(:all).and_return([@comment])
      do_get
    end

    it &quot;should assign the found comments for the view&quot; do
      do_get
      assigns[:comments].should == [@comment]
    end
  end&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Here's the controller&lt;/p&gt;

&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;class CommentsController &amp;lt; ApplicationController
  # GET /comments
  # GET /comments.xml
  before_filter :load_post

  def index
    @comments = @post.comments.find(:all)

    respond_to do |format|
      format.html # index.html.erb
      format.xml  { render :xml =&gt; @comments }
    end
  end
  protected 
  def load_post
    @post = Post.find(params[:post_id])
  end
end
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Everything works, except for one spec: &lt;/p&gt;

&lt;p&gt;When I try to run the spec on &quot;it should find all comments&quot; I get this error&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Mock 'Class' expected :find with (:all) once, but received it 0 times
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I don't know what to do. I'm trying to understand what I'm doing. Mocks and Stubs are a big leap of faith for someone who grew up using full blown fixtures. I hope my other specs aren't passing due to dumb luck or something like that. &lt;/p&gt;

&lt;p&gt;Should I wait and try to do this in the Stories? Is it useful to to rSpec mocks and stubs for a nested resource? &lt;/p&gt;

&lt;p&gt;Any ideas? Fire away in the comments. &lt;/p&gt;

&lt;p&gt;BTW, I'm using the great article &lt;a href=&quot;http://www.akitaonrails.com/2007/12/12/rolling-with-rails-2-0-the-first-full-tutorial&quot;&gt;Rolling on Rails with Rails2.0 from Akita on Rails&lt;/a&gt; as a starting point for my new blog. &lt;/p&gt;

&lt;p&gt;Thanks for the great article!&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.samgranieri.com/">
    <author>
      <name>sam</name>
    </author>
    <id>tag:www.samgranieri.com,2008-02-24:37</id>
    <published>2008-02-24T22:05:14Z</published>
    <updated>2008-02-24T22:23:28Z</updated>
    <link href="http://www.samgranieri.com/2008/2/24/welcome-back-saturday-night-live" rel="alternate" type="text/html"/>
    <title>Welcome Back Saturday Night Live!</title>
<content type="html">
            &lt;p&gt;It's about time that &lt;a href=&quot;http://www.nbc.com/Saturday_Night_Live/&quot;&gt;Saturday Night Live&lt;/a&gt; came back on the air. &lt;/p&gt;

&lt;p&gt;They've missed a lot of good comedy with the 2008 Presidential Race. &lt;/p&gt;

&lt;p&gt;Here's where they left off last fall. &lt;/p&gt;

&lt;p&gt;&amp;lt;object height=&quot;355&quot; width=&quot;425&quot;&gt;&amp;lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/pd8_Fjj2uuk&amp;amp;rel=1&quot;&gt;&amp;lt;/param&gt;&amp;lt;param name=&quot;wmode&quot; value=&quot;transparent&quot;&gt;&amp;lt;/param&gt;&amp;lt;embed type=&quot;application/x-shockwave-flash&quot; src=&quot;http://www.youtube.com/v/pd8_Fjj2uuk&amp;amp;rel=1&quot; height=&quot;355&quot; wmode=&quot;transparent&quot; width=&quot;425&quot;&gt;&amp;lt;/embed&gt;&amp;lt;/object&gt;&lt;/p&gt;

&lt;p&gt;And here's the return of former cast member Tina Fey, with her emphatic endorsement of Hillary Clinton. &lt;/p&gt;

&lt;p&gt;&amp;lt;object height=&quot;355&quot; width=&quot;425&quot;&gt;&amp;lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/q0u-W8upxoU&amp;amp;rel=1&quot;&gt;&amp;lt;/param&gt;&amp;lt;param name=&quot;wmode&quot; value=&quot;transparent&quot;&gt;&amp;lt;/param&gt;&amp;lt;embed type=&quot;application/x-shockwave-flash&quot; src=&quot;http://www.youtube.com/v/q0u-W8upxoU&amp;amp;rel=1&quot; height=&quot;355&quot; wmode=&quot;transparent&quot; width=&quot;425&quot;&gt;&amp;lt;/embed&gt;&amp;lt;/object&gt;&lt;/p&gt;

&lt;p&gt;Earlier, they made fun of the debate that was recently held in Texas. Here's a clip&lt;/p&gt;

&lt;p&gt;&amp;lt;object height=&quot;355&quot; width=&quot;425&quot;&gt;&amp;lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/XLZ18U1Txnc&amp;amp;rel=1&quot;&gt;&amp;lt;/param&gt;&amp;lt;param name=&quot;wmode&quot; value=&quot;transparent&quot;&gt;&amp;lt;/param&gt;&amp;lt;embed type=&quot;application/x-shockwave-flash&quot; src=&quot;http://www.youtube.com/v/XLZ18U1Txnc&amp;amp;rel=1&quot; height=&quot;355&quot; wmode=&quot;transparent&quot; width=&quot;425&quot;&gt;&amp;lt;/embed&gt;&amp;lt;/object&gt;&lt;/p&gt;

&lt;p&gt;I'm really not sure what I think of having &lt;a href=&quot;http://en.wikipedia.org/wiki/Fred_Armisen&quot;&gt;Fred Armisen&lt;/a&gt; &lt;a href=&quot;http://www.huffingtonpost.com/2008/02/23/fauxbama-finally-fred-a_n_88146.html&quot;&gt;playing Barack Obama&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I think i'll have to start DVRing SNL. &lt;/p&gt;

&lt;p&gt;Till Later, &lt;/p&gt;

&lt;p&gt;Sam&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.samgranieri.com/">
    <author>
      <name>sam</name>
    </author>
    <id>tag:www.samgranieri.com,2008-02-21:35</id>
    <published>2008-02-21T23:05:55Z</published>
    <updated>2008-02-21T23:55:27Z</updated>
    <link href="http://www.samgranieri.com/2008/2/21/planned-features-on-the-new-blog" rel="alternate" type="text/html"/>
    <title>Planned Features on the new blog</title>
<content type="html">
            &lt;p&gt;The most important thing for me on my new blog is composing articles. I like doing quick posts from the iPhone, and also posting from Textmate. &lt;/p&gt;

&lt;p&gt;I have to rejigger/reinvent/fork/whatever the Textmate blogging bundle to accommodate ActiveResource based posting. Shouldn't be too terribly hard. &lt;/p&gt;

&lt;p&gt;Also, if I have an inspiration to write, I'd like to be able to post on it from my iPhone. 
I'm going to come up with a separate interface so that it's lean, mean, and fast. &lt;/p&gt;

&lt;p&gt;The textmate bundle for blogging is the most interesting feature so far. I'm getting back into my concepts of programming languages class at DePaul by learning how to write grammars and mini-languages. For those of you who dont know what I'm talking about, think back to grade school when you had to dialog sentences. &lt;/p&gt;

&lt;p&gt;Now think of the different things you have to do on a part of a sentence. It's complicated, but fun. &lt;/p&gt;

&lt;p&gt;More progress to come on this later. &lt;/p&gt;

&lt;p&gt;Till next time, &lt;/p&gt;

&lt;p&gt;Sam&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.samgranieri.com/">
    <author>
      <name>sam</name>
    </author>
    <id>tag:www.samgranieri.com,2008-02-21:33</id>
    <published>2008-02-21T02:04:18Z</published>
    <updated>2008-02-21T02:12:15Z</updated>
    <link href="http://www.samgranieri.com/2008/2/21/running-rake-tasks-inside-of-rspec-stories" rel="alternate" type="text/html"/>
    <title>Running Rake tasks inside of rSpec Stories. </title>
<content type="html">
            &lt;p&gt;I've started using &lt;a href=&quot;http://www.rspec.info&quot;&gt;rSpec&lt;/a&gt; at work for my project. I like it because it just seems better to use than Test::Unit. It also looks nicer. &lt;/p&gt;

&lt;p&gt;Anyway, my project at work involves converting data from and old database into a new one by way of CSV files. Its long and tedious, and there are hundreds of thousands of rows hitting several models involved. &lt;/p&gt;

&lt;p&gt;Inevitably, something will bomb during the process. I've I've developed a process where I can selectively extract a participant based off of their employee number and create a folder filled with their csv files. However, I wasn't really doing any testing on it at this point. We're using rSpec for model testing, and after watching the &lt;a href=&quot;http://peepcode.com/products/rspec-user-stories&quot;&gt;rSpec User Story PeepCode&lt;/a&gt;, I decided to give it a whirl for on my file conversion process. &lt;/p&gt;

&lt;p&gt;I start my file conversion process on a single employee by invoking a rake task. It's basically a batch job. &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;rake conversion:selective_import id=12345
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;In order to set this up via rSpec stories, first you need to set up the rspec helper file located in RAILS_ROOT/stories/helper.rb. Insert these lines. &lt;/p&gt;

&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
require 'tasks/rails'
load &quot;lib/tasks/conversion/tables/001_employee.rake&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;You need to manually load a the rake tasks you need for some reason I haven't figured out yet.&lt;/p&gt;

&lt;p&gt;Next up, in the story's .rb file, you need to make it look like this&lt;/p&gt;

&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;require File.expand_path(File.dirname(__FILE__) + &quot;../../../helper&quot;)
with_steps_for(:conversion) do
  run File.join(File.dirname(__FILE__), &quot;conversion_story&quot;), :type =&gt; RailsStory
end&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Astute readers may wonder why the file is buried so far down: I'm trying to create many stories and i'm organizing them by folder. Here's the edited output from tree&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;|-- all.rb
|-- helper.rb
|-- scenarios
|   |-- conversion
|   |   |-- conversion_story
|   |   `-- conversion_story.rb
`-- steps
    `-- conversion.rb
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;My conversion steps look like this: &lt;/p&gt;

&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;steps_for(:conversion) do

  Given &quot;a employee number $employee_number&quot; do |employee_number|
    @emp_no = employee_number
  end

  Given &quot;is extracted&quot; do
    #look for the employee's extract in the folder
    #if you dont find it, then run the extraction task
  end

  When &quot;I nuke the database&quot; do
    Rake::Task['conversion:nuke'].invoke
  end

  When &quot;I nuke the employee&quot; do
    ENV['id']=@emp_no
    Rake::Task['conversion:selective_nuke'].invoke
  end

  When &quot;I reset the employee&quot; do
    ENV['id']=@emp_no
    Rake::Task['conversion:selective_reset'].invoke
  end

  When &quot;I convert the employee&quot; do
    ENV['id']=@emp_no
    Rake::Task['conversion:selective_import'].invoke
  end

  Then &quot;there should only be 1 employee&quot; do
    Employee.count.should == 1
  end
end&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Obviously, the code at this point is a work in progress, but so far, so good. &lt;/p&gt;

&lt;p&gt;Here's the story&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Story: File conversion test

    As a user
    I want to convert an employee with 
    So that I can verify that their is only one

  Scenario:  42582

    Given an employee number 42582

        When I nuke the database
        And I convert the employee

        Then there should only be 1 employee
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I hope all of you have enjoyed this rSpec tutorial with Rake.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.samgranieri.com/">
    <author>
      <name>sam</name>
    </author>
    <id>tag:www.samgranieri.com,2008-02-21:32</id>
    <published>2008-02-21T01:42:27Z</published>
    <updated>2008-02-21T01:45:52Z</updated>
    <link href="http://www.samgranieri.com/2008/2/21/john-mccain-s-farting" rel="alternate" type="text/html"/>
    <title>John McCain's prank call of Hillary Clinton</title>
<content type="html">
            &lt;p&gt;You gotta love the fine folks at &lt;a href=&quot;http://www.barelypolitical.com&quot;&gt;Barely Political&lt;/a&gt; for their fine work and irreverence during this election year. &lt;/p&gt;

&lt;p&gt;I just found a mock video they did of &lt;a href=&quot;http://www.johnmccain.com/&quot;&gt;John McCain&lt;/a&gt; prank calling &lt;a href=&quot;http://hillaryclinton.com&quot;&gt;Hillary Clinton&lt;/a&gt;. It's a complete riot!&lt;/p&gt;

&lt;p&gt;&amp;lt;object height=&quot;355&quot; width=&quot;425&quot;&gt;&amp;lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/dnLCK3knuY8&amp;amp;rel=1&quot;&gt;&amp;lt;/param&gt;&amp;lt;param name=&quot;wmode&quot; value=&quot;transparent&quot;&gt;&amp;lt;/param&gt;&amp;lt;embed type=&quot;application/x-shockwave-flash&quot; src=&quot;http://www.youtube.com/v/dnLCK3knuY8&amp;amp;rel=1&quot; height=&quot;355&quot; wmode=&quot;transparent&quot; width=&quot;425&quot;&gt;&amp;lt;/embed&gt;&amp;lt;/object&gt;&lt;/p&gt;

&lt;p&gt;Now, I know what you're thinking: Where's &lt;a href=&quot;http://www,barackobama.com&quot;&gt;Barack?&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The good people at Barely Political made a funny video about a conference call between him, Clinton, and John Edwards. You simply have to see it to believe it. &lt;/p&gt;

&lt;p&gt;&amp;lt;object height=&quot;355&quot; width=&quot;425&quot;&gt;&amp;lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/hgUQl75hUVs&amp;amp;rel=1&quot;&gt;&amp;lt;/param&gt;&amp;lt;param name=&quot;wmode&quot; value=&quot;transparent&quot;&gt;&amp;lt;/param&gt;&amp;lt;embed type=&quot;application/x-shockwave-flash&quot; src=&quot;http://www.youtube.com/v/hgUQl75hUVs&amp;amp;rel=1&quot; height=&quot;355&quot; wmode=&quot;transparent&quot; width=&quot;425&quot;&gt;&amp;lt;/embed&gt;&amp;lt;/object&gt;&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.samgranieri.com/">
    <author>
      <name>sam</name>
    </author>
    <id>tag:www.samgranieri.com,2008-02-19:29</id>
    <published>2008-02-19T16:40:26Z</published>
    <updated>2008-02-19T16:40:26Z</updated>
    <link href="http://www.samgranieri.com/2008/2/19/microsoft-excel-still-has-a-y2k-problem-kinda" rel="alternate" type="text/html"/>
    <title>Microsoft Excel still has a Y2K problem (Kinda)</title>
<content type="html">
            &lt;p&gt;At work, I have to convert a lot of data from csv files into ActiveRecord objects on a sql server box. For some exasperating reason, ActiveRecord and SQL Server dont like dates that are in 2 digit format.&lt;/p&gt;

&lt;p&gt;Fine. &lt;/p&gt;

&lt;p&gt;I'll simply go and reformat all the csvs to change their date format from mm/dd/yy to mm/dd/yyyy. &lt;/p&gt;

&lt;p&gt;I close the excel document. &lt;/p&gt;

&lt;p&gt;Then when I need to reopen it, Excel shows dates in the mm/dd/yyyy format in mm/dd/yy !!!&lt;/p&gt;

&lt;p&gt;I wish you could tell excel to stop being helpful in ths regard. It's really really really frustrating. &lt;/p&gt;

&lt;p&gt;/END OF RANT&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.samgranieri.com/">
    <author>
      <name>sam</name>
    </author>
    <id>tag:www.samgranieri.com,2008-02-19:28</id>
    <published>2008-02-19T06:10:14Z</published>
    <updated>2008-02-19T06:10:14Z</updated>
    <link href="http://www.samgranieri.com/2008/2/19/i-cant-believe-i-missed-this-daley-rant" rel="alternate" type="text/html"/>
    <title>I cant believe I missed this Daley rant!</title>
<content type="html">
            &lt;p&gt;Seriously, give Hizzoner an oscar. &lt;/p&gt;

&lt;p&gt;&amp;lt;object height=&quot;355&quot; width=&quot;425&quot;&gt;&amp;lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/2ashM23pslk&amp;amp;rel=1&quot;&gt;&amp;lt;/param&gt;&amp;lt;param name=&quot;wmode&quot; value=&quot;transparent&quot;&gt;&amp;lt;/param&gt;&amp;lt;embed type=&quot;application/x-shockwave-flash&quot; src=&quot;http://www.youtube.com/v/2ashM23pslk&amp;amp;rel=1&quot; height=&quot;355&quot; wmode=&quot;transparent&quot; width=&quot;425&quot;&gt;&amp;lt;/embed&gt;&amp;lt;/object&gt;&lt;/p&gt;

&lt;p&gt;This is a &lt;strong&gt;difficult&lt;/strong&gt; vote!!!&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.samgranieri.com/">
    <author>
      <name>sam</name>
    </author>
    <id>tag:www.samgranieri.com,2008-02-19:26</id>
    <published>2008-02-19T03:17:17Z</published>
    <updated>2008-02-19T05:35:10Z</updated>
    <link href="http://www.samgranieri.com/2008/2/19/ron-burgundy-man-myth-legend" rel="alternate" type="text/html"/>
    <title>Ron Burgundy. Man. Myth. Legend. Symbol of San Diego?</title>
<content type="html">
            &lt;p&gt;A while back, I was interviewing for jobs, and a firm called &lt;a href=&quot;http://mirrorplacement.com&quot;&gt;mirRoR Placement&lt;/a&gt; gave me a call. They only place Ruby on Rails Jobs. They were pretty helpful, and good to talk to. The one reason I'm blogging about them now is &lt;a href=&quot;http://www.imdb.com/title/tt0357413/&quot;&gt;Ron Burgundy&lt;/a&gt;. Yes, THE Ron Burgundy. &lt;/p&gt;

&lt;p&gt;mirRoR Placement has different logos for jobs in different cities. Chicago gets the &lt;a href=&quot;http://mirrorplacement.com/jobs/location/chicago&quot;&gt;Sears Tower&lt;/a&gt;, San Francisco gets the &lt;a href=&quot;http://mirrorplacement.com/jobs/location/san+francisco&quot;&gt;Golden Gate bridge&lt;/a&gt;, so on and so forth. Then I saw a job their ad for San Diego, and couldn't help laughing my ass off. They chose Ron Burgundy as the logo for San Diego!&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://mirrorplacement.com/images/job_location_sandiego.gif&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Personally, I don't know what I'd use for a logo for San Diego. I'll never be able to think about that city without cracking a smile, thanks to Anchorman.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.samgranieri.com/">
    <author>
      <name>sam</name>
    </author>
    <id>tag:www.samgranieri.com,2008-02-19:25</id>
    <published>2008-02-19T02:28:09Z</published>
    <updated>2008-02-19T05:33:55Z</updated>
    <link href="http://www.samgranieri.com/2008/2/19/mephisto-is-now-beefed-up-with-the-essential-javascripts-for-code-highlighting" rel="alternate" type="text/html"/>
    <title>OH HI, I HELP WIF YOUR FORMATTING </title>
<content type="html">
            &lt;p&gt;I think I'm starting to get the hang of using Javascript now. I finally managed to preformatted text and code to look like it does when I use &lt;a href=&quot;http://www.macromates.com&quot;&gt;Textmate&lt;/a&gt;. I'm partial to Vibrant Ink&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;I CAN HAZ JAVASCRIPTZ
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;And this is going to be some ruby code.&lt;/p&gt;

&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;def lolcat
  puts &quot;I'm in ur textmate, Editing ur code&quot;
end
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;If you think I'm not making any sense, you're obviously not familiar with the &lt;a href=&quot;http://icanhascheezburger.com/&quot;&gt;LOLCAT site&lt;/a&gt;. Its a complete &lt;a href=&quot;http://en.wikipedia.org/wiki/Lolcat&quot;&gt;riot&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://icanhascheezburger.com/2007/01/11/i-can-has-cheezburger/&quot;&gt;&lt;img src=&quot;http://icanhascheezburger.files.wordpress.com/2007/01/i-can-has-cheezburger.jpg&quot; alt=&quot;I CAN HAS CHEEZBURGER?&quot; /&gt;&lt;/a&gt;&lt;br /&gt;moar &lt;a href=&quot;http://icanhascheezburger.com&quot;&gt;humorous pics&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For comedy: &lt;/p&gt;

&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;class RickJames
  def initialize(args)
    puts &quot;I'm Rick James, Bitch&quot;
  end  
end&lt;/code&gt;&lt;/pre&gt;

&lt;blockquote&gt;
    &lt;p&gt;Hold up, aren't you supposed to be eating your own dogfood with the new blog system your'e cooking up? &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Yes, I am. I was just frustrated by not getting this stylesheet code highlighting to work. &lt;/p&gt;

&lt;p&gt;All I needed to do was to go to &lt;a href=&quot;http://www.danwebb.net/&quot;&gt;Dan Webb's website&lt;/a&gt; and you'll get everything you need. &lt;/p&gt;

&lt;p&gt;You'll need to download his &lt;a href=&quot;http://svn.danwebb.net/external/CodeHighlighter/trunk/&quot;&gt;code highlighter&lt;/a&gt; plugin, and also maybe the &lt;a href=&quot;http://svn.danwebb.net/external/lowpro/&quot;&gt;LowPro&lt;/a&gt; framework. You know the drill with subversion: &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;svn export http://svn.danwebb.net/external/lowpro/ (wherever you put this code)
svn export http://svn.danwebb.net/external/CodeHighlighter/trunk/ (wherever you put this code)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;You do not need to go and install any of the code macros or filtered stuff that mephisto requires. &lt;/p&gt;

&lt;p&gt;Also, earlier I was going to port blog pinging and other stuff to Fullerton. Well, I just signed up for &lt;a href=&quot;http://feeds.feedburner.com/samgranieri&quot;&gt;Feedburner&lt;/a&gt;, so I managed to abstract away some of the work I need to do on my new blog.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.samgranieri.com/">
    <author>
      <name>sam</name>
    </author>
    <id>tag:www.samgranieri.com,2008-02-18:24</id>
    <published>2008-02-18T17:01:14Z</published>
    <updated>2008-02-18T17:05:08Z</updated>
    <link href="http://www.samgranieri.com/2008/2/18/one-day-s-progress-writing-the-new-blog" rel="alternate" type="text/html"/>
    <title>One day's progress writing the new blog</title>
<content type="html">
            &lt;p&gt;I'm happily working away on my new blog on my free time. I think I'm going to call it Fullerton, after the El stop I get on to ride to work every day. &lt;/p&gt;

&lt;p&gt;Fullerton right now is very bare. I can post articles, and that's it. I've spent a lot of time trying to get the css working. The only data structure I have at this point is Articles. I have two controllers, articles, and frontpage. This morning I figured out how to get Atom feed helpers working in rails. So now I can get RSS syndication going. &lt;/p&gt;

&lt;p&gt;I wonder which feed format is better to use: RSS or Atom? Should I provide both? Seems like a worthwhile endeavor. &lt;/p&gt;

&lt;p&gt;I really like being able to type blog entries in Textmate and then having it post them out to Mephisto. I'm going to have to replicate this feature in Fullerton. &lt;/p&gt;

&lt;p&gt;Luckily, ActiveResource provides me with a restful web service, replacing the balky ActionWebService. I have to fork off the Blogging textmate bundle (or create a new one) to enable Restful blogging. &lt;/p&gt;

&lt;p&gt;So here's a thought:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;POST http://localhost:3000/articles 
(active resource formatted xml, with authentication)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;All I plan on doing at this point is the standard CRUD with active resource. &lt;/p&gt;

&lt;p&gt;I hope to get that up and running today. Stay tuned.&lt;/p&gt;

&lt;p&gt;On the design front, I have Markdown enabled for writing. Next up, I need to get vibrant ink styled filtered text macros enabled.&lt;/p&gt;

&lt;p&gt;Routing wise, i'll have to get permalinks setup, and learn the real way to do rails routing. I've been getting by on just using Resources for now. &lt;/p&gt;

&lt;p&gt;Another feature I hope to add is a tag cloud. That's later down the line&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.samgranieri.com/">
    <author>
      <name>sam</name>
    </author>
    <id>tag:www.samgranieri.com,2008-02-17:23</id>
    <published>2008-02-17T23:58:00Z</published>
    <updated>2008-02-18T13:27:00Z</updated>
    <link href="http://www.samgranieri.com/2008/2/17/i-m-going-to-write-my-own-blog-system-in-rails" rel="alternate" type="text/html"/>
    <title>I'm going to write my own blog system in rails.</title>
<content type="html">
            &lt;p&gt;I think I've outgrown Mephisto. I have to manage three Mephisto installations(including this blog), but it's turning into kind of a hassle. &lt;/p&gt;

&lt;p&gt;I also want to fully learn more about the rails framework, beyond what I currently know. &lt;/p&gt;

&lt;p&gt;In fact, I'm following the advice of &lt;a href=&quot;http://nubyonrails.com/articles/about-this-blog-memcached&quot;&gt;Geoff Grosenbach&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
    &lt;p&gt;I’ll add to this and say that every beginning Rails developer should write their own blog software. It’s a great learning experience and you can try things that aren’t possible with just an app running on localhost. It’s also a great environment for learning without the pressure of a mission-critical app. When you’re working for a client and deploying an important application, you’ll have made all the beginner mistakes on your own time (hopefully).&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now, I'm no beginner. I've first learned about Rails while bored at work in December 2005, then later that night I dipped my toe into the framework on my windows machine following the classic &lt;a href=&quot;http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html&quot;&gt;Rollling with Ruby on Rails articles&lt;/a&gt;
I've been using rails professionally since september 2006. &lt;/p&gt;

&lt;p&gt;I'm not the only one who's doing a new rails blog. Josh Susser &lt;a href=&quot;http://blog.hasmanythrough.com/2008/1/24/one-hundred-two-hosts-three-engines&quot;&gt;said it best recently&lt;/a&gt;, &lt;/p&gt;

&lt;blockquote&gt;
    &lt;p&gt;Mephisto is a solid piece of software, but it's too big for me, and that makes it hard to modify to do what I want. It's development has also lagged - no new release in over a year! And, I wanted something that ran on Rails 2&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Mephisto actually runs on Rails 2.0 right now. And the development of the framework has accelerated, somewhat. &lt;/p&gt;

&lt;p&gt;Rick's actually moved development of Mephisto over to git. git://activereload.net/mephisto.git&lt;/p&gt;

&lt;p&gt;I think this is a good sign. &lt;/p&gt;

&lt;p&gt;Regardless, Mephisto is sometimes kind of bloated. &lt;/p&gt;

&lt;p&gt;My goals on my new blog software. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I'm going to use Rspec the entire time. &lt;/li&gt;
&lt;li&gt;I also want to be able to type blog entries from Textmate and post to the server. &lt;/li&gt;
&lt;li&gt;Seeing how the ActionWebservice is gone, I think i'll have to use ActiveResource, and also modify Textmate's blogging bundle to accommodate ActiveResource for blogging. &lt;/li&gt;
&lt;li&gt;Code Macros&lt;/li&gt;
&lt;li&gt;Flickr Integration&lt;/li&gt;
&lt;li&gt;Tag Clouds&lt;/li&gt;
&lt;li&gt;Delicious integration&lt;/li&gt;
&lt;li&gt;Built in thickbox javascripts&lt;/li&gt;
&lt;li&gt;Markdown/html/Textile posting&lt;/li&gt;
&lt;li&gt;Pinging to other weblog services.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And lastly, I have to pick a name. &lt;/p&gt;

&lt;p&gt;I'm developing this in Git, but I wont make the repo public until it's somewhat usable&lt;/p&gt;
          </content>  </entry>
</feed>
