Deirdre Saoirse Moen

Sounds Like Weird

Moving Sucks

07 May 2006

Not that this will surprise anyone, but moving sucks.

The one good thing about moving is the re-evaluation of what one has vs. what one really wants.

The one bad thing about moving is the time and energy for the re-evaluation of what one has vs. what one really wants.

We should be finished by Monday. I’ll be SO happy when it’s Tuesday.

Read More

SDForum Ruby Conference, day 2

23 April 2006

Chris Wanstrath offers a pretty complete transcription of a very flawed talk by Alex Chaffee. There were some really interesting talks, but one thing I was hoping for in the domain-specific language talk was, you know, an actual example for creating a DSL.

(edited to add)
I have been meaning to write up notes about the conference (rather than just a few criticisms), but I haven’t gotten to it yet. Tonight’s out, so probably tomorrow.

Read More

SDForum's Ruby Conference

22 April 2006

If you’re going to have a technical conference that’s one or two full days, I have two key concepts for you:

1) Power available to everyone.
2) A place for everyone to put their laptop that makes notetaking convenient.

There were these devices invented many thousands of years ago, though it seems novel to this group: tables. Sure, you can’t pack as many people into the room, but people will actually learn more if they’re not fussing about looking for power.

While the chairs are wonderfully comfy, I’d rather have tables and power.

Should you be planning an event, the standard parlance is “classroom seating” rather than “theater seating.” This will cut the capacity of the room approximately in half, but everyone will be a lot happier.

Read More

Now the h2 of Deirdres

21 April 2006

When search engines first came about, I was typically the top ranked Deirdre. However, other Deirdres have become active on the net, so as recently as a few months ago, I was the #4-ranked Deirdre.

I’m currently the #2 rank on Google for Deirdre.

Even though Saoirse is fairly commonly seen without the word Deirdre, nearly all the ranks for both terms together are me (except for some people in Ireland named Deirdre associated with the the newspaper (Saoirse) from Sinn Féin.

Read More

Nasty Little Bugses

13 April 2006

So, it happened that I was doing a rails project where I needed joins in paginate and I wound up discovering something unexpected: foo.id came through as the id for one of the join tables.

The way around that is to find_by_sql instead, and to avoid a similar problem, something like:

def self.find_my_foos(for_which_bar)
  find_by_sql("select foos.* from foos, bars where foos.bar_id =
   bars.id and bars.name = #{for_which_bar} order by foos.position")
end

This does have a side effect of not pre-loading the joins correctly, so that may not be the best solution for your case, but it does fix the larger issue.

Read More

Rails, moving stuff from one db to another

07 April 2006

Sometimes, you want ActiveRecord to do all the heavy lifting of data conversion. Plus, then you can use all the stuff you want during the conversion.

#!/usr/local/bin/ruby

Copies stuff from old mysql db to new postgres db, including changing of icky

old int fields to shiny booleans.

require ‘rubygems’
require_gem ‘activerecord’

require ‘../app/models/survey.rb’
require ‘../app/models/topic.rb’

Read database config via YAML

@dbs = YAML::load(ERB.new(IO.read(“../config/database.yml”)).result)

connect to old db.

curr_db = @dbs[‘production-mysql’]
ActiveRecord::Base.establishconnection(:adapter => currdb[“adapter”],
:database => curr_db[“database”],
:host => curr_db[“host”],
:username => curr_db[“username”],
:password => curr_db[“password”])

read in all the records

@surveys = Survey.find(:all)

close the db

ActiveRecord::Base.remove_connection

change to postgres db.

curr_db = @dbs[‘production’]
ActiveRecord::Base.establishconnection(:adapter => currdb[“adapter”],
:database => curr_db[“database”],
:host => curr_db[“host”],
:username => curr_db[“username”],
:password => curr_db[“password”])

for survey in @surveys
s = survey.clone
s.save
end

close the db

ActiveRecord::Base.remove_connection

Read More

Galoot Aspirations, Class 1

01 April 2006

One of the first things you learn in a woodworking handtool class is how to sharpen. Unfortunately, this turns a lot of people off.

Instead, our teacher asks for experienced volunteers, who come in before the class and sharpen some of the school’s planes, then the newbies get to start with a tuned plane. Great idea!

Anyhow, my planes still aren’t sharp, but at least I have the success of having learned to flatten (and having flattened) one side of a board with an already-working plane.

We did lose one student, who decided to go over to a power tools class. He could not understand why anyone would pay the money for a Lie-Nielsen plane (and god forbid he should learn about any of the modern infill planemaker’s prices), nor could he understand why anyone (::cough:: Anant ::cough::) would ship planes that were miserably unflat.

Thus, a lot of the drudgery of getting one’s tools in shape was distinctly unappealing to him. While I sympathize, it’s something you need to do only once, really.

I’m sure I’ll get the shipping grease off the Record planes pretty quickly, though.

Read More

Using a Sessions Table in Ruby on Rails

12 March 2006

A few days ago, I changed the table name of the wrong table (without realizing it, of course). Suddenly, my rails app wouldn’t start at all, and no errors in the development log. Naturally, I had a client demo in less than an hour….

What I’d done is change the name of the sessions table to something other than what was in environment.rb.

So, if you happen to have this problem, that’s one place to look.

Read More

Chloe Wins It

09 March 2006

My mother is a huge fan of Project Runway, despite not really being a fashion afficianado (though she does have a humongous wardrobe).

As a teenager, I took several classes in tailoring because, at that time, there really weren’t as many options for someone large (especially not someone who was just big, not fat).

Anyhow, one of the things I’ve learned over the years of sewing and knitting is that the fit of a shoulder is critical. For example, one of the typical problems of a blouse (or shirt) from today’s ready-to-wear is that if one lifts one’s arms, the sides of the blouse/shirt lifts. This is bad fit.

So, getting back to Project Runway.

Santino has no idea how to make a garment’s shoulders. Therefore, sleeves also elude him. Some people have said they didn’t understand the comments about Santino’s outfits being poorly made (or poorly fitting). Well, go back and look at all the garments he did — and how he (failed to) managed shoulders and/or sleeves. Now, granted, he designs around this limitation, but I’d like to believe that the next Great American Designer could actually make a suit that didn’t require being pinned to another designer. Ugh.

I’m really glad Chloe won. You did good, girl. Some people didn’t like the first dress. I thought it was stunning.

Daniel V. may have a job, since Michael Kors offered one. I’m sure we’ll see more of his work — his white coat was, imho, stunning.

Read More