<?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 on: acts_as_what?</title>
	<atom:link href="http://www.pluginaweek.org/2008/07/06/acts_as_what/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pluginaweek.org/2008/07/06/acts_as_what/</link>
	<description>Plugins worth their weight in rubies.</description>
	<lastBuildDate>Mon, 15 Mar 2010 12:37:22 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Bart</title>
		<link>http://www.pluginaweek.org/2008/07/06/acts_as_what/comment-page-1/#comment-25</link>
		<dc:creator>Bart</dc:creator>
		<pubDate>Thu, 31 Jul 2008 14:02:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.pluginaweek.org/?p=13#comment-25</guid>
		<description>Hahaha, great post.
I needed to write a statistics plugin. acts_as_statisticable? Nah, makes my fingers cry. statistics_fu? Nope.

can_has_stats ftw!</description>
		<content:encoded><![CDATA[<p>Hahaha, great post.<br />
I needed to write a statistics plugin. acts_as_statisticable? Nah, makes my fingers cry. statistics_fu? Nope.</p>
<p>can_has_stats ftw!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: aaron</title>
		<link>http://www.pluginaweek.org/2008/07/06/acts_as_what/comment-page-1/#comment-24</link>
		<dc:creator>aaron</dc:creator>
		<pubDate>Sat, 26 Jul 2008 00:43:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.pluginaweek.org/?p=13#comment-24</guid>
		<description>@Adam - I am in complete agreement that it has a purpose :)  My point was directed more at plugins that &lt;em&gt;force&lt;/em&gt; their name to follow the acts_as_* convention, which accounts for at least half of those listed in the AgileWebDevelopment repository.</description>
		<content:encoded><![CDATA[<p>@Adam &#8211; I am in complete agreement that it has a purpose <img src='http://www.pluginaweek.org/wp-content/plugins/smilies-themer/adiumicons/happy.png' alt=':)' class='wp-smiley' />  My point was directed more at plugins that <em>force</em> their name to follow the acts_as_* convention, which accounts for at least half of those listed in the AgileWebDevelopment repository.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam Salter</title>
		<link>http://www.pluginaweek.org/2008/07/06/acts_as_what/comment-page-1/#comment-23</link>
		<dc:creator>Adam Salter</dc:creator>
		<pubDate>Sat, 26 Jul 2008 00:36:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.pluginaweek.org/?p=13#comment-23</guid>
		<description>As pointed out above, the &#039;acts_as&#039; does actually have a purpose... it&#039;s used for plugins that act on models, not other types of plugins...
11% could be about right for plugins that act on models...</description>
		<content:encoded><![CDATA[<p>As pointed out above, the &#8216;acts_as&#8217; does actually have a purpose&#8230; it&#8217;s used for plugins that act on models, not other types of plugins&#8230;<br />
11% could be about right for plugins that act on models&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex Gregianin</title>
		<link>http://www.pluginaweek.org/2008/07/06/acts_as_what/comment-page-1/#comment-22</link>
		<dc:creator>Alex Gregianin</dc:creator>
		<pubDate>Wed, 16 Jul 2008 01:43:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.pluginaweek.org/?p=13#comment-22</guid>
		<description>it has become a joke so funny that people even created the &quot;acts_as_dot_net&quot;!</description>
		<content:encoded><![CDATA[<p>it has become a joke so funny that people even created the &#8220;acts_as_dot_net&#8221;!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: aaron</title>
		<link>http://www.pluginaweek.org/2008/07/06/acts_as_what/comment-page-1/#comment-20</link>
		<dc:creator>aaron</dc:creator>
		<pubDate>Sun, 13 Jul 2008 02:47:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.pluginaweek.org/?p=13#comment-20</guid>
		<description>@Thorn - That&#039;s genius :)  I think you&#039;re onto something there.  We have a lot to learn from next generation languages like &lt;a href=&quot;http://lolcode.com&quot; rel=&quot;nofollow&quot;&gt;LOLCode&lt;/a&gt;.  Can I get an attachment_kthxbye?

@Adam - That was both a hilarious and insightful comment (could be an article in of itself!).  Where are my slashdot moderation points when I need them?  I think you hit the naming scheme spot on... I couldn&#039;t have said it better myself!

I&#039;ll be honest, I&#039;m a little afraid of chuck_norris_fu right about now.  I have to wonder though... chuck_norris_fu still seems impossible.  The only thing powerful enough to describe Chuck Norris is the voice of Chuck Norris.  Surely Ruby would fall to its knees, begging for mercy, if it ever attempted to describe that which is Chuck Norris.

Unrelated to Chuck Norris, I think what finally made me go psycho were things like acts_as_commentable, acts_as_rateable, acts_as_emailable, etc... the list goes on and only seemed to get worse.  It&#039;s at that point I started migrating toward a has_* or just * naming scheme.  For example, I moved to has_comments, has_ratings, has_emails, which actually matches the definition exactly as you provide.  Instead of acts_as_state_machine, I have just state_machine.

Someone should definitely create a plugin name generator script that&#039;ll figure out what prefix/suffix to use based on a couple of input parameters :)  That would be &lt;em&gt;amazing&lt;/em&gt;. Any takers?

I still don&#039;t think I&#039;m a fan of *_fu or *_jitsu, though. Why is it called attachment_fu and not just has_attachment?  That&#039;s probably a bad example of using the _fu suffix, but it feels like a stretch.</description>
		<content:encoded><![CDATA[<p>@Thorn &#8211; That&#8217;s genius <img src='http://www.pluginaweek.org/wp-content/plugins/smilies-themer/adiumicons/happy.png' alt=':)' class='wp-smiley' />  I think you&#8217;re onto something there.  We have a lot to learn from next generation languages like <a href="http://lolcode.com" rel="nofollow">LOLCode</a>.  Can I get an attachment_kthxbye?</p>
<p>@Adam &#8211; That was both a hilarious and insightful comment (could be an article in of itself!).  Where are my slashdot moderation points when I need them?  I think you hit the naming scheme spot on&#8230; I couldn&#8217;t have said it better myself!</p>
<p>I&#8217;ll be honest, I&#8217;m a little afraid of chuck_norris_fu right about now.  I have to wonder though&#8230; chuck_norris_fu still seems impossible.  The only thing powerful enough to describe Chuck Norris is the voice of Chuck Norris.  Surely Ruby would fall to its knees, begging for mercy, if it ever attempted to describe that which is Chuck Norris.</p>
<p>Unrelated to Chuck Norris, I think what finally made me go psycho were things like acts_as_commentable, acts_as_rateable, acts_as_emailable, etc&#8230; the list goes on and only seemed to get worse.  It&#8217;s at that point I started migrating toward a has_* or just * naming scheme.  For example, I moved to has_comments, has_ratings, has_emails, which actually matches the definition exactly as you provide.  Instead of acts_as_state_machine, I have just state_machine.</p>
<p>Someone should definitely create a plugin name generator script that&#8217;ll figure out what prefix/suffix to use based on a couple of input parameters <img src='http://www.pluginaweek.org/wp-content/plugins/smilies-themer/adiumicons/happy.png' alt=':)' class='wp-smiley' />  That would be <em>amazing</em>. Any takers?</p>
<p>I still don&#8217;t think I&#8217;m a fan of *_fu or *_jitsu, though. Why is it called attachment_fu and not just has_attachment?  That&#8217;s probably a bad example of using the _fu suffix, but it feels like a stretch.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam</title>
		<link>http://www.pluginaweek.org/2008/07/06/acts_as_what/comment-page-1/#comment-19</link>
		<dc:creator>Adam</dc:creator>
		<pubDate>Sat, 12 Jul 2008 18:10:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.pluginaweek.org/?p=13#comment-19</guid>
		<description>Let me suggest that these prefixes and suffixes can be useful but, like rope, they can be used to hurt yourself or others (http://www.instructables.com/id/Rope-Weapons/). I think that they have a role to play in communicating what one of these class level methods does. These tags (for lack of a better term) can be shorthand for intention revealing names. 

The trick is to agree upon what the tags mean. If we come to that agreement, then we can merrily go on our way renaming things where necessary. I think that there are 4 mutually independent tags for us to consider, all of which you&#039;ve seen:

acts_as_* -- I think that the best examples of this are acts_as_tree and acts_as_named_set, at least for establishing the meaning of the tag. I would suggest that the * in acts_as_* describes the models as a collection. That is when I say: 

class Page &lt; ActiveRecord::Base
    acts_as_tree
end

I can say that a collection of Pages is a tree and each Page is a node in that tree. I if I wanted to be pedantic about it (and Rails is opinionated, so why not) I could go further and require that acts_as_* applies to collection of ALL pages (that is there my be only one root node) and that if want all the pages to form a number of trees, I need to use acts_as_trees or acts_as_forrest. 

So that&#039;s my test: if I can say that the collection of all my models is a Foo then acts_as_foo is the correct name. 

By this standard, the geokit acts_as_mappable is wrongly named; the collection of all my mappable models is not &quot;a Mappable&quot;

*_fu -- First of all, the actual tag name, might be better if it was something other than _fu, but I like the whimsy and I&#039;m bad at picking helpful names. I&#039;m not sure that this definition is in current use but the heading &quot;chuck_norris_fu consists of one move: the roundhouse kick&quot; illustrates how I would use it. Associating something&#039;s _fu with a model is to impart that things properties upon the model. So (continuing with the whimsy) if I have

class TexasRanger &lt; ActiveRecord:Base
    chuck_norris_fu
end

Then each ranger (as an individual) is capable of delivering a Chuck Norris roundhouse. Note that they are not Chuck Norris, rather they are are merely channeling Chuck Norris. As a result if two of them fought and used the roundhouse kick at the same time, it would merely result in the immediate conversion of all matter within an infinite radius into energy (Chuck Norris fighting himself would actually cause the universe itself to cease to exist).

With this description, GeoKit would have geolocation_fu.

*_jitsu -- Is like _fu but it applies at the class level just like acts_as_*. I&#039;m having a harder time with examples but I think I have one. In Radiant, there is a class Radiant::Config &lt; ActiveRecord:Base. Since config values are just name/value pairs it allows you to do things like puts Radiant::Config[&quot;my_key&quot;] and Radiant::Config[&quot;my_key&quot;] = &quot;some new value&quot;. I might decide that this would be a generally useful thing to do so I&#039;m going to create a plugin to do this. I would call it something like configuration_jitsu. 

has_* -- I don&#039;t get the can_ part of can_has_*, would you also have must_has_*)? This is trivial. If there is something special about how a particular association works then it gets a unique has_* method. For example, attachment_fu works with my scheme above so you might create has_attachment to handle that particular polymorphic situation easily. 


I think these are reasonable &quot;rules&quot; for naming. Many things don&#039;t fit into the scheme (like auto_validation) but that&#039;s ok</description>
		<content:encoded><![CDATA[<p>Let me suggest that these prefixes and suffixes can be useful but, like rope, they can be used to hurt yourself or others (<a href="http://www.instructables.com/id/Rope-Weapons/" rel="nofollow">http://www.instructables.com/id/Rope-Weapons/</a>). I think that they have a role to play in communicating what one of these class level methods does. These tags (for lack of a better term) can be shorthand for intention revealing names. </p>
<p>The trick is to agree upon what the tags mean. If we come to that agreement, then we can merrily go on our way renaming things where necessary. I think that there are 4 mutually independent tags for us to consider, all of which you&#8217;ve seen:</p>
<p>acts_as_* &#8212; I think that the best examples of this are acts_as_tree and acts_as_named_set, at least for establishing the meaning of the tag. I would suggest that the * in acts_as_* describes the models as a collection. That is when I say: </p>
<p>class Page &lt; ActiveRecord::Base<br />
    acts_as_tree<br />
end</p>
<p>I can say that a collection of Pages is a tree and each Page is a node in that tree. I if I wanted to be pedantic about it (and Rails is opinionated, so why not) I could go further and require that acts_as_* applies to collection of ALL pages (that is there my be only one root node) and that if want all the pages to form a number of trees, I need to use acts_as_trees or acts_as_forrest. </p>
<p>So that&#8217;s my test: if I can say that the collection of all my models is a Foo then acts_as_foo is the correct name. </p>
<p>By this standard, the geokit acts_as_mappable is wrongly named; the collection of all my mappable models is not &#8220;a Mappable&#8221;</p>
<p>*_fu &#8212; First of all, the actual tag name, might be better if it was something other than _fu, but I like the whimsy and I&#8217;m bad at picking helpful names. I&#8217;m not sure that this definition is in current use but the heading &#8220;chuck_norris_fu consists of one move: the roundhouse kick&#8221; illustrates how I would use it. Associating something&#8217;s _fu with a model is to impart that things properties upon the model. So (continuing with the whimsy) if I have</p>
<p>class TexasRanger &lt; ActiveRecord:Base<br />
    chuck_norris_fu<br />
end</p>
<p>Then each ranger (as an individual) is capable of delivering a Chuck Norris roundhouse. Note that they are not Chuck Norris, rather they are are merely channeling Chuck Norris. As a result if two of them fought and used the roundhouse kick at the same time, it would merely result in the immediate conversion of all matter within an infinite radius into energy (Chuck Norris fighting himself would actually cause the universe itself to cease to exist).</p>
<p>With this description, GeoKit would have geolocation_fu.</p>
<p>*_jitsu &#8212; Is like _fu but it applies at the class level just like acts_as_*. I&#8217;m having a harder time with examples but I think I have one. In Radiant, there is a class Radiant::Config &lt; ActiveRecord:Base. Since config values are just name/value pairs it allows you to do things like puts Radiant::Config["my_key"] and Radiant::Config["my_key"] = &#8220;some new value&#8221;. I might decide that this would be a generally useful thing to do so I&#8217;m going to create a plugin to do this. I would call it something like configuration_jitsu. </p>
<p>has_* &#8212; I don&#8217;t get the can_ part of can_has_*, would you also have must_has_*)? This is trivial. If there is something special about how a particular association works then it gets a unique has_* method. For example, attachment_fu works with my scheme above so you might create has_attachment to handle that particular polymorphic situation easily. </p>
<p>I think these are reasonable &#8220;rules&#8221; for naming. Many things don&#8217;t fit into the scheme (like auto_validation) but that&#8217;s ok</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Darcy Laycock</title>
		<link>http://www.pluginaweek.org/2008/07/06/acts_as_what/comment-page-1/#comment-18</link>
		<dc:creator>Darcy Laycock</dc:creator>
		<pubDate>Sat, 12 Jul 2008 08:21:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.pluginaweek.org/?p=13#comment-18</guid>
		<description>I&#039;m also guilty of having migrated to the can has over the last half year or so.

long live can_has_*</description>
		<content:encoded><![CDATA[<p>I&#8217;m also guilty of having migrated to the can has over the last half year or so.</p>
<p>long live can_has_*</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thom</title>
		<link>http://www.pluginaweek.org/2008/07/06/acts_as_what/comment-page-1/#comment-17</link>
		<dc:creator>Thom</dc:creator>
		<pubDate>Fri, 11 Jul 2008 12:48:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.pluginaweek.org/?p=13#comment-17</guid>
		<description>I&#039;ve started migrating to a &lt;a href=&quot;http://thom.org.uk/2008/07/11/can-haz-pluginz/&quot; rel=&quot;nofollow&quot;&gt;new naming convention&lt;/a&gt; which I think is much more readable. :)</description>
		<content:encoded><![CDATA[<p>I&#8217;ve started migrating to a <a href="http://thom.org.uk/2008/07/11/can-haz-pluginz/" rel="nofollow">new naming convention</a> which I think is much more readable. <img src='http://www.pluginaweek.org/wp-content/plugins/smilies-themer/adiumicons/happy.png' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: aaron</title>
		<link>http://www.pluginaweek.org/2008/07/06/acts_as_what/comment-page-1/#comment-16</link>
		<dc:creator>aaron</dc:creator>
		<pubDate>Fri, 11 Jul 2008 03:14:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.pluginaweek.org/?p=13#comment-16</guid>
		<description>@Clemens - Unfortunately CakePHP made the mistake of re-using a bad &quot;convention&quot; :(

@Wynn - I definitely agree that there are acts_as_* plugins that make sense at times .. but more than 1/2 the time I think it&#039;s a stretch.  It&#039;s sort of become convention to use that prefix for plugins focused on model extensions, but does that indicate a failure in us being able to properly categorize plugins?  You don&#039;t tend to see that with something like &lt;a href=&quot;http://wordpress.org/extend/plugins&quot; rel=&quot;nofollow&quot;&gt;WordPress plugins&lt;/a&gt;.

@Zack - I was surprised to see that someone had actually already created &lt;a href=&quot;http://offtheline.net/2008/4/1/rails-plugin-acts_as_fu&quot; rel=&quot;nofollow&quot;&gt;acts_as_fu&lt;/a&gt; :)

@adam - I am in complete agreement with you and my thoughts on that matter can span several blog posts. I get a lot of people asking me the exact same question. I feel it was a complete mistake to invent something called a &quot;plugin&quot; that didn&#039;t just mean gems meant for extending Rails.  As far as I&#039;m concerned, I release them both as a &quot;plugin&quot; and a gem, so people can use it in any way they like.</description>
		<content:encoded><![CDATA[<p>@Clemens &#8211; Unfortunately CakePHP made the mistake of re-using a bad &#8220;convention&#8221; <img src='http://www.pluginaweek.org/wp-content/plugins/smilies-themer/adiumicons/sad.png' alt=':(' class='wp-smiley' /> </p>
<p>@Wynn &#8211; I definitely agree that there are acts_as_* plugins that make sense at times .. but more than 1/2 the time I think it&#8217;s a stretch.  It&#8217;s sort of become convention to use that prefix for plugins focused on model extensions, but does that indicate a failure in us being able to properly categorize plugins?  You don&#8217;t tend to see that with something like <a href="http://wordpress.org/extend/plugins" rel="nofollow">WordPress plugins</a>.</p>
<p>@Zack &#8211; I was surprised to see that someone had actually already created <a href="http://offtheline.net/2008/4/1/rails-plugin-acts_as_fu" rel="nofollow">acts_as_fu</a> <img src='http://www.pluginaweek.org/wp-content/plugins/smilies-themer/adiumicons/happy.png' alt=':)' class='wp-smiley' /> </p>
<p>@adam &#8211; I am in complete agreement with you and my thoughts on that matter can span several blog posts. I get a lot of people asking me the exact same question. I feel it was a complete mistake to invent something called a &#8220;plugin&#8221; that didn&#8217;t just mean gems meant for extending Rails.  As far as I&#8217;m concerned, I release them both as a &#8220;plugin&#8221; and a gem, so people can use it in any way they like.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: adam french</title>
		<link>http://www.pluginaweek.org/2008/07/06/acts_as_what/comment-page-1/#comment-15</link>
		<dc:creator>adam french</dc:creator>
		<pubDate>Fri, 11 Jul 2008 02:57:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.pluginaweek.org/?p=13#comment-15</guid>
		<description>I don&#039;t entirely understand why rails needs it&#039;s own plugin management system....why not just release a gem?</description>
		<content:encoded><![CDATA[<p>I don&#8217;t entirely understand why rails needs it&#8217;s own plugin management system&#8230;.why not just release a gem?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
