<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>
<channel>
	<title>Comments for Matthew Lang</title>
	<atom:link href="http://matthewlang.co.uk/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://matthewlang.co.uk</link>
	<description>A journal on ruby and rails development.</description>
	<pubDate>Wed, 07 Jan 2009 09:47:53 +0000</pubDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Comment on New Website For Mind Mapping: MindMapSwitch by Knowledge Management using Mind Mapping &#8212; iPhone Tricks, Tips and Hacks</title>
		<link>http://matthewlang.co.uk/general/new-website-for-mind-mapping-mindmapswitch/comment-page-1/#comment-143</link>
		<dc:creator>Knowledge Management using Mind Mapping &#8212; iPhone Tricks, Tips and Hacks</dc:creator>
		<pubDate>Mon, 29 Dec 2008 22:19:18 +0000</pubDate>
		<guid isPermaLink="false">http://matthewlang.co.uk/?p=495#comment-143</guid>
		<description>[...] New Website For Mind Mapping: MindMapSwitch     Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages. [...]</description>
		<content:encoded><![CDATA[<p>[...] New Website For Mind Mapping: MindMapSwitch     Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Blog Action Day 08 by kouji haiku</title>
		<link>http://matthewlang.co.uk/general/blog-action-day-08/comment-page-1/#comment-37</link>
		<dc:creator>kouji haiku</dc:creator>
		<pubDate>Wed, 15 Oct 2008 10:35:20 +0000</pubDate>
		<guid isPermaLink="false">http://matthewlang.co.uk/?p=335#comment-37</guid>
		<description>those are cool sites you mention. :)  for now, i turn to sites like freerice, kiva, and goodsearch, as ways to help alleviate poverty online.

saw this post via the front page of blog action day. it's great that you're participating. :)</description>
		<content:encoded><![CDATA[<p>those are cool sites you mention. <img src='http://matthewlang.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  for now, i turn to sites like freerice, kiva, and goodsearch, as ways to help alleviate poverty online.</p>
<p>saw this post via the front page of blog action day. it&#8217;s great that you&#8217;re participating. <img src='http://matthewlang.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Using Single Table Inheritance Is Okay by Matthew</title>
		<link>http://matthewlang.co.uk/ruby/using-single-table-inheritance-is-okay/comment-page-1/#comment-26</link>
		<dc:creator>Matthew</dc:creator>
		<pubDate>Fri, 19 Sep 2008 18:32:19 +0000</pubDate>
		<guid isPermaLink="false">http://matthewlang.co.uk/?p=231#comment-26</guid>
		<description>Thanks for all the comments people!

Looks like most people that have commented generally favour STI as a feature in the Rails framework.</description>
		<content:encoded><![CDATA[<p>Thanks for all the comments people!</p>
<p>Looks like most people that have commented generally favour STI as a feature in the Rails framework.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Using Single Table Inheritance Is Okay by Aron Pilhofer</title>
		<link>http://matthewlang.co.uk/ruby/using-single-table-inheritance-is-okay/comment-page-1/#comment-25</link>
		<dc:creator>Aron Pilhofer</dc:creator>
		<pubDate>Fri, 19 Sep 2008 13:24:56 +0000</pubDate>
		<guid isPermaLink="false">http://matthewlang.co.uk/?p=231#comment-25</guid>
		<description>Bingo Davey: STI performance issues, such as they are, have nothing to do with Rails/ActiveRecord per se. You could always split out your types into separate tables, and in doing so, achieve better performance on those individual tables. But of course that is obliterated the minute you need to do a nasty join to reassociate those objects in your application.

Properly indexed, STI should actually provide a substantial performance boost over some combination of join tables. I have not tested this, but based on my experiences with MySQL and other dbs over the years, I'd feel pretty confident in that statement.</description>
		<content:encoded><![CDATA[<p>Bingo Davey: STI performance issues, such as they are, have nothing to do with Rails/ActiveRecord per se. You could always split out your types into separate tables, and in doing so, achieve better performance on those individual tables. But of course that is obliterated the minute you need to do a nasty join to reassociate those objects in your application.</p>
<p>Properly indexed, STI should actually provide a substantial performance boost over some combination of join tables. I have not tested this, but based on my experiences with MySQL and other dbs over the years, I&#8217;d feel pretty confident in that statement.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Using Single Table Inheritance Is Okay by A Fresh Cup &#187; Blog Archive &#187; Double Shot #295</title>
		<link>http://matthewlang.co.uk/ruby/using-single-table-inheritance-is-okay/comment-page-1/#comment-24</link>
		<dc:creator>A Fresh Cup &#187; Blog Archive &#187; Double Shot #295</dc:creator>
		<pubDate>Fri, 19 Sep 2008 10:37:15 +0000</pubDate>
		<guid isPermaLink="false">http://matthewlang.co.uk/?p=231#comment-24</guid>
		<description>[...] Using Single Table Inheritance is OK - A counterpoint to some of the Rails advice I pointed to yesterday. [...]</description>
		<content:encoded><![CDATA[<p>[...] Using Single Table Inheritance is OK - A counterpoint to some of the Rails advice I pointed to yesterday. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Using Single Table Inheritance Is Okay by Davey D</title>
		<link>http://matthewlang.co.uk/ruby/using-single-table-inheritance-is-okay/comment-page-1/#comment-23</link>
		<dc:creator>Davey D</dc:creator>
		<pubDate>Thu, 18 Sep 2008 22:03:08 +0000</pubDate>
		<guid isPermaLink="false">http://matthewlang.co.uk/?p=231#comment-23</guid>
		<description>Whilst I am not a big fan of STI if your table in question will have a lot of selects and inserts, there are ways of alleviating this at the DB layer:-

- Composite keys across the type column, although be sure to get them the right way round as they are read from left to right.

- Partitioning is another option although you will have to use mysql 5.1 if you are a mysql user which is still in beta.</description>
		<content:encoded><![CDATA[<p>Whilst I am not a big fan of STI if your table in question will have a lot of selects and inserts, there are ways of alleviating this at the DB layer:-</p>
<p>- Composite keys across the type column, although be sure to get them the right way round as they are read from left to right.</p>
<p>- Partitioning is another option although you will have to use mysql 5.1 if you are a mysql user which is still in beta.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Using Single Table Inheritance Is Okay by Xavier Shay</title>
		<link>http://matthewlang.co.uk/ruby/using-single-table-inheritance-is-okay/comment-page-1/#comment-22</link>
		<dc:creator>Xavier Shay</dc:creator>
		<pubDate>Thu, 18 Sep 2008 21:05:11 +0000</pubDate>
		<guid isPermaLink="false">http://matthewlang.co.uk/?p=231#comment-22</guid>
		<description>We are using MySQL and have converted our type column to an 'enum' type and have appropriate indexes where necessary. Performance really isn't a problem.</description>
		<content:encoded><![CDATA[<p>We are using MySQL and have converted our type column to an &#8216;enum&#8217; type and have appropriate indexes where necessary. Performance really isn&#8217;t a problem.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Using Single Table Inheritance Is Okay by BJ Clark</title>
		<link>http://matthewlang.co.uk/ruby/using-single-table-inheritance-is-okay/comment-page-1/#comment-21</link>
		<dc:creator>BJ Clark</dc:creator>
		<pubDate>Thu, 18 Sep 2008 17:07:53 +0000</pubDate>
		<guid isPermaLink="false">http://matthewlang.co.uk/?p=231#comment-21</guid>
		<description>The real problem is that anyone that thinks that something is never the right thing to use is completely wrong.

There will always be times when STI is a good choice.

What about when you have different types of users? Say, Students, Teachers, Administrators. They have the same information in the db, no extra columns. But they are definitely going to need different functionality between them. If you split them into 3 tables, you have to do 3 queries (or some nasty join) to check for simple things like permission to some other resource.

STI is not only useful, but it DRYs up LOTS of lines of duplicate code, something which the author seems to hold in high regard. 


The biggest problem with the linked article is that it makes all these giant proclamations that aren't always true. There's lots of problems with it, like you should only have 2 instance variables per controller action? WTF? How did he come up with that? Maybe in whatever it is that he does that might apply, but to say that in no rails app is it ever necessary to have more than 2 instance variables per controller action is completely false.</description>
		<content:encoded><![CDATA[<p>The real problem is that anyone that thinks that something is never the right thing to use is completely wrong.</p>
<p>There will always be times when STI is a good choice.</p>
<p>What about when you have different types of users? Say, Students, Teachers, Administrators. They have the same information in the db, no extra columns. But they are definitely going to need different functionality between them. If you split them into 3 tables, you have to do 3 queries (or some nasty join) to check for simple things like permission to some other resource.</p>
<p>STI is not only useful, but it DRYs up LOTS of lines of duplicate code, something which the author seems to hold in high regard. </p>
<p>The biggest problem with the linked article is that it makes all these giant proclamations that aren&#8217;t always true. There&#8217;s lots of problems with it, like you should only have 2 instance variables per controller action? WTF? How did he come up with that? Maybe in whatever it is that he does that might apply, but to say that in no rails app is it ever necessary to have more than 2 instance variables per controller action is completely false.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Using Single Table Inheritance Is Okay by Christian</title>
		<link>http://matthewlang.co.uk/ruby/using-single-table-inheritance-is-okay/comment-page-1/#comment-20</link>
		<dc:creator>Christian</dc:creator>
		<pubDate>Thu, 18 Sep 2008 14:30:43 +0000</pubDate>
		<guid isPermaLink="false">http://matthewlang.co.uk/?p=231#comment-20</guid>
		<description>The problem is ActiveRecord makes more elegant forms of inheritance mapping impossible. Table per class &#38; Table per Concrete class.</description>
		<content:encoded><![CDATA[<p>The problem is ActiveRecord makes more elegant forms of inheritance mapping impossible. Table per class &amp; Table per Concrete class.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Using Single Table Inheritance Is Okay by Mike Woodhouse</title>
		<link>http://matthewlang.co.uk/ruby/using-single-table-inheritance-is-okay/comment-page-1/#comment-19</link>
		<dc:creator>Mike Woodhouse</dc:creator>
		<pubDate>Thu, 18 Sep 2008 13:07:22 +0000</pubDate>
		<guid isPermaLink="false">http://matthewlang.co.uk/?p=231#comment-19</guid>
		<description>I'm using STI to handle the sets of fees for a group of products. There are currently 6 differently-calculated fees, any combination of which may be associated with a product. making them subclasses of the Fee class (and rows on the fees table) lets me get the current fee total for a product with something like

product.fees.inject(0.0) { &#124;tot, fee&#124; tot += fee.amount(date) }

and hide all the calculation in the individual *Fee classes where it belongs. Not using inheritance dooms me to some kind of ghastly branching logic, which in fact I've just refactored myself away from.

Each fee type uses between 2 and 4 of the 6 fields on the table. I don't see a problem with this - I hope I'm not missing something...</description>
		<content:encoded><![CDATA[<p>I&#8217;m using STI to handle the sets of fees for a group of products. There are currently 6 differently-calculated fees, any combination of which may be associated with a product. making them subclasses of the Fee class (and rows on the fees table) lets me get the current fee total for a product with something like</p>
<p>product.fees.inject(0.0) { |tot, fee| tot += fee.amount(date) }</p>
<p>and hide all the calculation in the individual *Fee classes where it belongs. Not using inheritance dooms me to some kind of ghastly branching logic, which in fact I&#8217;ve just refactored myself away from.</p>
<p>Each fee type uses between 2 and 4 of the 6 fields on the table. I don&#8217;t see a problem with this - I hope I&#8217;m not missing something&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
