Jordan Brock

Unplanned

Feb 04, 2006

Sometimes you wake up with a list of things to do in the day. Things that you need to do. Today my list included such wonderful activities as washing the dogs, getting my eyes tested, washing the car, doing some food shopping and other little chores here and there. Of course, these plans never work out.

I get back from walking the dogs, have some breakfast, put the dogs into the car to take them to get washed and I notice the front tyre of the car looking a little flat. “Oh well, I’d better pump that up at the petrol station” I think to myself.

I reverse the car and something is wrong. Of course, the mini supposedly has the wonderful auto flat sensing warning light, so I wonder why that’s not doing what it was supposed to do. We’ve got the special run flat tyres that let you drive on them, so it’s not the biggest problem, but of course, my immediate thoughts are on the $300 it will be to replace the tyre.

So I head off to Bob Jane to get a new tyre fitted. After some confusion about whether or not they can be repaired, and some other issues about the age of my tyres, it becomes apparent that I need to replace the tyres. All four of them! And what are the only tyres available?

For $1400!

Sigh!

So we end the day about 1 house repayment behind where we started. Totally unplanned of course.

SVN Tips

Feb 01, 2006

Another post as a reference item for me.

Setting up a subversion project

Create the trunk, tags and branches subdirectories. bq.

svn import /path/to/project http://server.com/svn/path -m "Initial Upload" 
svn checkout http://server.com/svn/path/trunk project name

Then some general housekeeping for Rails apps and subversion: bq.

svn remove log/*
svn commit -m "Removing Logs" 
svn update
svn propset svn:ignore "*.log" log/
svn commit -m "Ignoring Logfiles" 

Easy comma delimited files

Jan 18, 2006

From ~:caboose

  # this is used directly on models only
  # Usage: Customer.to_tab_delimited
  def self.to_tab_delimited(path = nil, columns = nil, options = nil)
    columns ||= self.column_names
    File.open(File.expand_path(path || "./#{table_name}.txt", RAILS_ROOT), 'w') do |file|
      file.puts(columns.join("\t"))
      # Notice this is very close to what the Array#to_tab_delimited below does, except Array only calls itself, meaning
      # it only exports it's own contents. 
      self.find(:all, options).each do |rec| 
        row = columns.inject([]) do |arr, col|
          if rec[col].is_a?(String)
            arr << rec[col].gsub(/[\t\n]/, ' ')
          else
            arr << rec[col]
          end
        end
        file.puts(row.join("\t"))
      end
    end
  end
end

Biblio

Jan 12, 2006

The other day there was a post by Seth Godin in which he talked about the opportunity for an online bibliography creator that allowed you to just enter the ISBN for a book, and it would automatically find all of the relevant information for you, incorporate it into a bibliography, which you could then share with whomever you wanted to. I was sort of looking for some project where I could incorporate Amazon Web Services and also start using Google AdSense. So this project basically slapped me in the head and said “Build Me”.

The upshot of all of that is that I did. Checkout Biblio - Online Bibliography Creator. It’s all very basic at the moment, but you can search for a book, build a bibliography and print it out in 5 different citation styles. There’s alot of things I need to add to it: Search by Book Name, Manual Citation Entry (for sources not listed on Amazon), other Citation types (articles, web pages, journals etc etc). Still, it’s a start.

I built it relatively quickly in RubyOnRails. I have spent most of the past few months pretty much back in the world of ASP.Net and C# for a couple of projects that I’m working on - GradDirect (I’m subcontracting for IBC) and on a new site for KVM Australia which is just about getting ready to launch (man, talking about WebCentral is a whole new post .. sigh). The upshot of it all was that I had slipped out of the RubyOnRails space, and I had forgotten just how damn cool it is. Good to know that she fits back on like a smooth glove.

Anyway, check out Biblio. Kick the tyres and leave a comment about what you thought of it.

Competition

Dec 09, 2005

GYM (Google, Yahoo and Microsoft) are pulling out all of the stops to create the best service based websites. While we’ve had web based email for quite a while (Hotmail etc), it took gmail to really get the ball rolling.

Then they launched gMaps, which microsoft basically copied (and relatively poorly I might add) with their Virtual Earth site. Now, they’ve really thrown down the gauntlet with Windows Live Local. I haven’t had much of a play around with it, but they have “Bird’s Eye Imagery”, which is just stunning.

I mean, do you want to see Carol and Marc’s house?