<?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 Free as in free speech</title>
	<atom:link href="http://blog.ereslibre.es/?feed=comments-rss2" rel="self" type="application/rss+xml" />
	<link>http://blog.ereslibre.es</link>
	<description>Given enough eyeballs, all bugs are shallow</description>
	<lastBuildDate>Wed, 16 May 2012 14:47:36 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>Comment on Dynamic slugs on Rails 3 by ereslibre</title>
		<link>http://blog.ereslibre.es/?p=343&#038;cpage=1#comment-23686</link>
		<dc:creator>ereslibre</dc:creator>
		<pubDate>Wed, 16 May 2012 14:47:36 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ereslibre.es/?p=343#comment-23686</guid>
		<description>@Enrique García: First of all, thank you very much for taking the time to write a well reasoned comment.

Please, take into account several other circumstances:
  - This is obviously not intended for permalinks. Permalinks would require the slug to be saved on the database, without any doubt.
  - For this solution to work, the ID must be there. There is no other way. You need resources of the form &quot;#{id}-whatever&quot;
  - This is not the &#039;holy grail&#039; for slugs. It&#039;s really up to you where you want to use this solution. I will not personally use this just *everywhere* in my project, but where I believe it makes sense.
  - I do care about code perfection, as well as data perfection. This meaning that when I see data duplication *somehow* I start to worry. That said, and as I stated before, there are two exceptions to this personal rule: you need permalinks, or you want to strip out the ID from the resource ID on the route.

friendly_id is cool. However the project that I am working on has some restrictions that simply don&#039;t let me use it.

The main reason of this post is that when I searched about slugs all I could find is &#039;store in on the database&#039;, with some sugar: &#039;if you want permalinks, just let it be, if you don&#039;t want permalinks, use ActiveRecord callbacks to update your slug&#039;. I think is a nice summary of what I found out there.

So I took some minutes to think and ask myself if I *always* need to save slugs on the database. And found out that the answer is no.

That said, I have used friendly_id in personal projects and I personally love it.

You were also right when you said that this code could have been &#039;gemified&#039;, and probably will be. Overall, I think this gem will have less LOC than friendly_id. With friendly_id you have to add two LOC per model. With this solution you would need to add none (initializer on ActiveRecord::Base), or one: (Slug is included per model, &#039;include Slug&#039;). So overall, your code will have less slug-related code too.

However, I still think they serve different purposes. Of course I prefer &#039;/states/washington&#039; over &#039;/states/74-washington&#039;, but you also need to balance, and think about what are the costs of that. On certain parts of my website/service I prefer not to save this information in the database, and allow my code to infer it.

Thanks again for your comment.</description>
		<content:encoded><![CDATA[<p>@Enrique García: First of all, thank you very much for taking the time to write a well reasoned comment.</p>
<p>Please, take into account several other circumstances:<br />
  &#8211; This is obviously not intended for permalinks. Permalinks would require the slug to be saved on the database, without any doubt.<br />
  &#8211; For this solution to work, the ID must be there. There is no other way. You need resources of the form &#8220;#{id}-whatever&#8221;<br />
  &#8211; This is not the &#8216;holy grail&#8217; for slugs. It&#8217;s really up to you where you want to use this solution. I will not personally use this just *everywhere* in my project, but where I believe it makes sense.<br />
  &#8211; I do care about code perfection, as well as data perfection. This meaning that when I see data duplication *somehow* I start to worry. That said, and as I stated before, there are two exceptions to this personal rule: you need permalinks, or you want to strip out the ID from the resource ID on the route.</p>
<p>friendly_id is cool. However the project that I am working on has some restrictions that simply don&#8217;t let me use it.</p>
<p>The main reason of this post is that when I searched about slugs all I could find is &#8216;store in on the database&#8217;, with some sugar: &#8216;if you want permalinks, just let it be, if you don&#8217;t want permalinks, use ActiveRecord callbacks to update your slug&#8217;. I think is a nice summary of what I found out there.</p>
<p>So I took some minutes to think and ask myself if I *always* need to save slugs on the database. And found out that the answer is no.</p>
<p>That said, I have used friendly_id in personal projects and I personally love it.</p>
<p>You were also right when you said that this code could have been &#8216;gemified&#8217;, and probably will be. Overall, I think this gem will have less LOC than friendly_id. With friendly_id you have to add two LOC per model. With this solution you would need to add none (initializer on ActiveRecord::Base), or one: (Slug is included per model, &#8216;include Slug&#8217;). So overall, your code will have less slug-related code too.</p>
<p>However, I still think they serve different purposes. Of course I prefer &#8216;/states/washington&#8217; over &#8216;/states/74-washington&#8217;, but you also need to balance, and think about what are the costs of that. On certain parts of my website/service I prefer not to save this information in the database, and allow my code to infer it.</p>
<p>Thanks again for your comment.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Dynamic slugs on Rails 3 by Enrique García</title>
		<link>http://blog.ereslibre.es/?p=343&#038;cpage=1#comment-23685</link>
		<dc:creator>Enrique García</dc:creator>
		<pubDate>Wed, 16 May 2012 14:01:54 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ereslibre.es/?p=343#comment-23685</guid>
		<description>I&#039;ve been thinking about this for a while now and I have to disagree.

The main axioms are:

1) That maintaining an additional column for storing the slugs is wrong, because there is information duplication, which means maintenance costs in the long term, and there are lots of issues with that.
2) That slugs can always be programmatically deduced from other fields.

I&#039;d like to first address 1). It is actually *very easy* to use a column for storing slugs; there are several gems that implement that very well. They also come with an extensive test suite, and have been used by lots of peers (btw, my favorite gem for this stuff is friendly_id).

The whole process involves adding a gem, bundle installing, adding a migration, migrating, and adding 1 line to one model. And there you go, you have something working, with most of the issues solved.

Your current proposed solution involves writing and maintaining more code. You could argue that you could package your software as a gem, so it would work just as easily as friendly_id. And that would probably be true. But friendly_id is already here, already works, and has already been tested by my peers.

Please don&#039;t take this the wrong way. I appreciate your efforts. But I don&#039;t care about code purity, if I have to choose between maintaining 30 LOC and maintaining 2. *Right now* your solution just seems worse to me, in all the code-related aspects that I care about, than the already existing solutions.

There is the additional stylistic bit that I don&#039;t like having the ids there on the slug, if at all possible. friendly_id allows me to do that very easily, since each slug is a unique id in the database.

Now to address 2): In my experience, as soon as the slugs are viewed by humans, 2) goes out of the window. URLs have lots of importance to certain types of humans, and for some reason they end up being *clients*.

You come up with a pretty convenient way to generate slugs automatically, and they just don&#039;t like it!

Or what&#039;s worse! They come up with *logical* reasons for which the urls ought to be modifiable by them!

Take the quintessential example: a blog post. Imagine that someone creates a post called &quot;My euruko 2012 slides&quot;. Usually the slug would be &quot;my-euruko-2012-slides&quot;. The thing is, the blog automatically adds the date to the url, as in &quot;/2012/06/06/my-euruko-2012-slides&quot;, so the user wants to go and remove the 2012 from the slug, to end up with something like &quot;/2012/06/06/euruko-slides&quot;.

Another example: a page on a CMS. Let&#039;s say that pages can be&quot;nested&quot;. One page could be titled &quot;Contractor taxation documentation&quot;, but given that this page is a &quot;child&quot; of &quot;taxes&quot;, which is a child of &quot;contractors&quot;, the slug could be &quot;documentation&quot;, so the url was nice and short: &quot;/contractors/taxes/documentation&quot; instead of &quot;/contractors/taxes/contractor-taxation-documentation&quot;.

I guess that if you were *really sure* that humans would never want to modify the urls, then ... nah, even in that case, I would recommend just adding the slug and the form field. It&#039;s not worth the hassle to fight an end user over such a trivial thing to include.

This said, I really appreciate your effort. Consider sending a patch to friendly_id so that it has a &quot;tableless&quot; mode ;)</description>
		<content:encoded><![CDATA[<p>I&#8217;ve been thinking about this for a while now and I have to disagree.</p>
<p>The main axioms are:</p>
<p>1) That maintaining an additional column for storing the slugs is wrong, because there is information duplication, which means maintenance costs in the long term, and there are lots of issues with that.<br />
2) That slugs can always be programmatically deduced from other fields.</p>
<p>I&#8217;d like to first address 1). It is actually *very easy* to use a column for storing slugs; there are several gems that implement that very well. They also come with an extensive test suite, and have been used by lots of peers (btw, my favorite gem for this stuff is friendly_id).</p>
<p>The whole process involves adding a gem, bundle installing, adding a migration, migrating, and adding 1 line to one model. And there you go, you have something working, with most of the issues solved.</p>
<p>Your current proposed solution involves writing and maintaining more code. You could argue that you could package your software as a gem, so it would work just as easily as friendly_id. And that would probably be true. But friendly_id is already here, already works, and has already been tested by my peers.</p>
<p>Please don&#8217;t take this the wrong way. I appreciate your efforts. But I don&#8217;t care about code purity, if I have to choose between maintaining 30 LOC and maintaining 2. *Right now* your solution just seems worse to me, in all the code-related aspects that I care about, than the already existing solutions.</p>
<p>There is the additional stylistic bit that I don&#8217;t like having the ids there on the slug, if at all possible. friendly_id allows me to do that very easily, since each slug is a unique id in the database.</p>
<p>Now to address 2): In my experience, as soon as the slugs are viewed by humans, 2) goes out of the window. URLs have lots of importance to certain types of humans, and for some reason they end up being *clients*.</p>
<p>You come up with a pretty convenient way to generate slugs automatically, and they just don&#8217;t like it!</p>
<p>Or what&#8217;s worse! They come up with *logical* reasons for which the urls ought to be modifiable by them!</p>
<p>Take the quintessential example: a blog post. Imagine that someone creates a post called &#8220;My euruko 2012 slides&#8221;. Usually the slug would be &#8220;my-euruko-2012-slides&#8221;. The thing is, the blog automatically adds the date to the url, as in &#8220;/2012/06/06/my-euruko-2012-slides&#8221;, so the user wants to go and remove the 2012 from the slug, to end up with something like &#8220;/2012/06/06/euruko-slides&#8221;.</p>
<p>Another example: a page on a CMS. Let&#8217;s say that pages can be&#8221;nested&#8221;. One page could be titled &#8220;Contractor taxation documentation&#8221;, but given that this page is a &#8220;child&#8221; of &#8220;taxes&#8221;, which is a child of &#8220;contractors&#8221;, the slug could be &#8220;documentation&#8221;, so the url was nice and short: &#8220;/contractors/taxes/documentation&#8221; instead of &#8220;/contractors/taxes/contractor-taxation-documentation&#8221;.</p>
<p>I guess that if you were *really sure* that humans would never want to modify the urls, then &#8230; nah, even in that case, I would recommend just adding the slug and the form field. It&#8217;s not worth the hassle to fight an end user over such a trivial thing to include.</p>
<p>This said, I really appreciate your effort. Consider sending a patch to friendly_id so that it has a &#8220;tableless&#8221; mode <img src='http://blog.ereslibre.es/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Dynamic slugs on Rails 3 by ereslibre</title>
		<link>http://blog.ereslibre.es/?p=343&#038;cpage=1#comment-23684</link>
		<dc:creator>ereslibre</dc:creator>
		<pubDate>Wed, 16 May 2012 13:21:30 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ereslibre.es/?p=343#comment-23684</guid>
		<description>@JohnR: thanks :) and the initializer isn&#039;t missing a require &#039;slug&#039; if you add &#039;stringex&#039; to your Gemfile and run bundler :)</description>
		<content:encoded><![CDATA[<p>@JohnR: thanks <img src='http://blog.ereslibre.es/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  and the initializer isn&#8217;t missing a require &#8216;slug&#8217; if you add &#8216;stringex&#8217; to your Gemfile and run bundler <img src='http://blog.ereslibre.es/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Dynamic slugs on Rails 3 by JohnR</title>
		<link>http://blog.ereslibre.es/?p=343&#038;cpage=1#comment-23683</link>
		<dc:creator>JohnR</dc:creator>
		<pubDate>Wed, 16 May 2012 11:55:25 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ereslibre.es/?p=343#comment-23683</guid>
		<description>By the way,  im using rails 3.0~ and the initializer is missing a 
require &#039;slug&#039;</description>
		<content:encoded><![CDATA[<p>By the way,  im using rails 3.0~ and the initializer is missing a<br />
require &#8216;slug&#8217;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Dynamic slugs on Rails 3 by JohnR</title>
		<link>http://blog.ereslibre.es/?p=343&#038;cpage=1#comment-23682</link>
		<dc:creator>JohnR</dc:creator>
		<pubDate>Wed, 16 May 2012 11:30:15 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ereslibre.es/?p=343#comment-23682</guid>
		<description>Very awesome!
Agreed, databases are for data, not view formatting!!!  I was looking for a solution without creating database tables like friendly_id or other gems.
Great work!</description>
		<content:encoded><![CDATA[<p>Very awesome!<br />
Agreed, databases are for data, not view formatting!!!  I was looking for a solution without creating database tables like friendly_id or other gems.<br />
Great work!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Spokify &#8211; v0.9 by Christine Marcelo</title>
		<link>http://blog.ereslibre.es/?p=276&#038;cpage=1#comment-23681</link>
		<dc:creator>Christine Marcelo</dc:creator>
		<pubDate>Tue, 24 Apr 2012 23:00:19 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ereslibre.es/?p=276#comment-23681</guid>
		<description>Hey cool post . Spotify kicks ass :) It&#039;s just hard to get free premium codes.</description>
		<content:encoded><![CDATA[<p>Hey cool post . Spotify kicks ass <img src='http://blog.ereslibre.es/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  It&#8217;s just hard to get free premium codes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Bluedevil v1.0 is out ! by Spuffler</title>
		<link>http://blog.ereslibre.es/?p=281&#038;cpage=1#comment-23672</link>
		<dc:creator>Spuffler</dc:creator>
		<pubDate>Mon, 09 Jan 2012 01:35:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ereslibre.es/?p=281#comment-23672</guid>
		<description>Wondering if there is a place to discuss BlueDevil issues and have usability discussions. I&#039;m an interested party, with a few hours per month to spare.</description>
		<content:encoded><![CDATA[<p>Wondering if there is a place to discuss BlueDevil issues and have usability discussions. I&#8217;m an interested party, with a few hours per month to spare.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Right to Left Systemsettings by ereslibre</title>
		<link>http://blog.ereslibre.es/?p=310&#038;cpage=1#comment-23649</link>
		<dc:creator>ereslibre</dc:creator>
		<pubDate>Sun, 24 Apr 2011 13:29:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ereslibre.es/?p=310#comment-23649</guid>
		<description>@all: Thanks for your comments !!

@Nicolas: basically, like this (as zayed already pointed out, it was awaiting for moderation): https://bugs.kde.org/attachment.cgi?id=43803

@heynonynor: if I run systemsettings --reverse, I get the treeview on the right hand side, so I think that is fixed now (by someone else, I didn&#039;t fix that).</description>
		<content:encoded><![CDATA[<p>@all: Thanks for your comments !!</p>
<p>@Nicolas: basically, like this (as zayed already pointed out, it was awaiting for moderation): <a href="https://bugs.kde.org/attachment.cgi?id=43803" rel="nofollow">https://bugs.kde.org/attachment.cgi?id=43803</a></p>
<p>@heynonynor: if I run systemsettings &#8211;reverse, I get the treeview on the right hand side, so I think that is fixed now (by someone else, I didn&#8217;t fix that).</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Right to Left Systemsettings by heynonynony</title>
		<link>http://blog.ereslibre.es/?p=310&#038;cpage=1#comment-23647</link>
		<dc:creator>heynonynony</dc:creator>
		<pubDate>Sun, 24 Apr 2011 09:57:32 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ereslibre.es/?p=310#comment-23647</guid>
		<description>Wonderful work, thank you.  Will it be possible to have the &quot;Tree View&quot; categories listed on the right hand side as well?</description>
		<content:encoded><![CDATA[<p>Wonderful work, thank you.  Will it be possible to have the &#8220;Tree View&#8221; categories listed on the right hand side as well?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Right to Left Systemsettings by zayed</title>
		<link>http://blog.ereslibre.es/?p=310&#038;cpage=1#comment-23646</link>
		<dc:creator>zayed</dc:creator>
		<pubDate>Sun, 24 Apr 2011 05:58:55 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ereslibre.es/?p=310#comment-23646</guid>
		<description>Thank you Rafael for the fix :)</description>
		<content:encoded><![CDATA[<p>Thank you Rafael for the fix <img src='http://blog.ereslibre.es/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>

