Content Analysis is King
Notes for my presentation at DiBi Conference 2010.
Slides on Slideshare
Links
Notes for my presentation at DiBi Conference 2010.
Slides on Slideshare
Links
I struggled with STI with Sequel as there is very little documentation on using plugins, let alone this specific one. It turns out it is incredibly trivial, but did require trawling through the code base to figure it out.
In your super class you need to activate the plugin (Sequel::Plugins::SingleTableInheritance), and specify the column name to be used to hold the name of the specific class for each object. In this case the super class is called Fruit, and the field I am using is object_type
class Fruit < Sequel::Model
plugin :single_table_inheritance, :object_type
end
It’s really important that the field name is a symbol. If it is a string it will go bang.
Obviously you need to create the field object_type in your database table fruits as some kind of text field long enough to hold the name of the superclass and any subclass.
Your subclasses are trivial, simply extend your superclass.
class Apple < Fruit
end
Hope this helps someone!
Yahoo!’s recent atrocity of hiring lap dancers for geeks at their Taiwan hack day was the cause of a flurry of activity on the web and caused some people who don’t often talk out on women in tech issues to speak up. That’s a great thing, but did it really take this unbelievable event to get the world to sit up and listen?
What worries me more is that this may be the new bar by which the attitude towards women in tech is judged. Whilst the norm (outside of this event) seems to be fairly innocuous and less explicit (few female speakers / attendees, general hyper-masculine attitude, pink laptops, etc) this is clearly way out there. The danger is that by focusing on not doing such incredibly insensitive activities we loose track of where the real battlefield should be. That by focusing on not objectifying women we stop focusing on ensuring we feel more involved.