<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/stylesheets/rss.css" type="text/css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>has_many :thoughts: The Rails Language aka The DHH DSL</title>
    <link>http://blog.kineticweb.com/articles/2008/12/11/the-rails-language-aka-the-dhh-dsl</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Musings from a Ruby on Rails development team</description>
    <item>
      <title>The Rails Language aka The DHH DSL</title>
      <description>&lt;p&gt;Please Note: This is bitching. I&amp;#8217;m a nit picky kinda programmer. I pull things apart, rip out what I hate and go nuts over it so I remember to never do it again. This is a rant, your warned.&lt;/p&gt;


	&lt;p&gt;I&amp;#8217;m not too happy with a lot of things going into Rails lately, outside of the stuff that they are learning about through &lt;a href="http://merbivore.com"&gt;other frameworks&lt;/a&gt;. Some additions have been made to Rails lately that are bringing it further from Ruby, into its own language.&lt;/p&gt;


	&lt;p&gt;Many people already believe that &amp;#8220;Ruby on Rails&amp;#8221; is a language in and of itself. I guess they believe that the &amp;#8220;Ruby on&amp;#8221; part is just a cool name. Frankly, some commits as of late could possibly be developing that language.&lt;/p&gt;


	&lt;h3&gt;Array#second, #third, etc.&lt;/h3&gt;


	&lt;p&gt;When I first learned scripting languages I learned Python, and I still love Python (despite having no current use for it). Even back to my C/C++ days I enjoyed Array indexing as Array#[] (in ruby terms). Whats so hard about an integer (0..n) being used between them? How else do you easily modify them into Ranges&amp;#8230;. well Rails has &lt;a href="http://github.com/rails/rails/commit/e50530ca3ab5db53ebc74314c54b62b91b932389"&gt;solved all of this&lt;/a&gt; for us!&lt;/p&gt;


	&lt;p&gt;Array#first, plus now Array#second, #third, #fourth. &lt;a href="http://github.com/dhh"&gt;Our playboy&lt;/a&gt; even says he&amp;#8217;s found a way of &amp;#8220;massive savings in overhead&amp;#8221; for something Ruby never had a need for in the &lt;span class="caps"&gt;FIRST&lt;/span&gt; place.&lt;/p&gt;


	&lt;h3&gt;Object#try&lt;/h3&gt;


	&lt;p&gt;Object#try is another one. Again, something Ruby and Matz never put into the language itself. That doesn&amp;#8217;t stop Rails from developing it into its own language.&lt;/p&gt;


	&lt;h3&gt;Object#blank?&lt;/h3&gt;


	&lt;p&gt;Ever try to bring a script over from Rails, and find yourself rewriting #blank?. Sure, I love blank, it saves time right? But where&amp;#8217;s the Ruby in a method that was never originally intended to be monkey patched into the language itself?&lt;/p&gt;


	&lt;h3&gt;My Point&lt;/h3&gt;


	&lt;p&gt;My point is, there are other frameworks that try to keep &lt;a href="http://github.com/rails/rails/tree/e50530ca3ab5db53ebc74314c54b62b91b932389/activesupport/lib/active_support/core_ext"&gt;this sort of thing to a minimum&lt;/a&gt;. The benefits are countless, and I think the best are&amp;#8230;&lt;/p&gt;


	&lt;ol&gt;
	&lt;li&gt;Monkey patching is kept to a minimum. If you don&amp;#8217;t understand the danger in monkey patching, please don&amp;#8217;t ever read a blog entry I write again.&lt;/li&gt;
		&lt;li&gt;Lowered need of detailed attention being required when transferring code to other frameworks and platforms&lt;/li&gt;
		&lt;li&gt;Less lines of code within your code base, required pieces.&lt;/li&gt;
		&lt;li&gt;Universal code that is understandable by anyone using the original language.&lt;/li&gt;
		&lt;li&gt;Learning the appropriate methods the first time around&lt;/li&gt;
		&lt;li&gt;Not having to re-implement if you find yourself without one of these methods&lt;/li&gt;
	&lt;/ol&gt;


	&lt;p&gt;Now I&amp;#8217;m not against these sorts of things completely, and there are frameworks that implement them correctly (Merb and DataMapper&amp;#8217;s combined ExtLib library being one of them).&lt;/p&gt;


	&lt;p&gt;I&amp;#8217;m just not impressed by the magic tricks anymore, and tired of seeing Rails core become the bastard child of someone&amp;#8217;s personal &amp;#8220;good ideas&amp;#8221;. Just because your doing it in your projects doesn&amp;#8217;t mean it should be forced down my throat.&lt;/p&gt;</description>
      <pubDate>Thu, 11 Dec 2008 18:08:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:ce04563d-71ec-4433-9235-b098e4a35a22</guid>
      <author>Justin Reagor</author>
      <link>http://blog.kineticweb.com/articles/2008/12/11/the-rails-language-aka-the-dhh-dsl</link>
      <category>Rails</category>
      <category>bitching</category>
      <category>dsl</category>
      <category>language</category>
    </item>
    <item>
      <title>"The Rails Language aka The DHH DSL" by PJ Davis</title>
      <description>@colin, @justin 

Good point about integrating new team members. I suppose for projects with more than one person working on it, it would be prudent to keep Rails the same as what everybody already knows. </description>
      <pubDate>Fri, 12 Dec 2008 12:04:13 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:f73b2934-1de6-4a80-9005-335da7e744a9</guid>
      <link>http://blog.kineticweb.com/articles/2008/12/11/the-rails-language-aka-the-dhh-dsl#comment-276</link>
    </item>
    <item>
      <title>"The Rails Language aka The DHH DSL" by Justin</title>
      <description>@colin Exactly.</description>
      <pubDate>Fri, 12 Dec 2008 08:48:58 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:5953a331-0013-47da-8e28-65a0e271a066</guid>
      <link>http://blog.kineticweb.com/articles/2008/12/11/the-rails-language-aka-the-dhh-dsl#comment-275</link>
    </item>
    <item>
      <title>"The Rails Language aka The DHH DSL" by Colin</title>
      <description>@whoever The big problem I have with forking and branching rails and doing custom stuff is that, as an employer, I see that as just one more barrier to bringing new team members into the fold on a project. They'll have to get used to you use your own custom Rails version that has different stuff. And that's not efficient.</description>
      <pubDate>Fri, 12 Dec 2008 08:25:34 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:f9cf8a5c-2181-4012-bc70-b34c1f4f4bfe</guid>
      <link>http://blog.kineticweb.com/articles/2008/12/11/the-rails-language-aka-the-dhh-dsl#comment-274</link>
    </item>
    <item>
      <title>"The Rails Language aka The DHH DSL" by Justin</title>
      <description>@keith Thats true, and you know since this was a rant, I neglected to inform my dear readers of that golden path philosophy. The only catch is that #blank?, #try and #second, #third... #forty_two will get you hung up since they aren't implemented. Which is a real friggin bitch when your trying to bring code over to another framework. But I digress.... the "prototyping" thing is what makes Rails so great. 
&lt;br /&gt;&lt;br /&gt;
I'm still wondering if a customized, generic, version of Merb would be better for semi-static page-cached sites with minimal CMS back-ends. I still want to possibly pull together a package like that for some of our simpler hosted clients.</description>
      <pubDate>Thu, 11 Dec 2008 23:16:29 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:d2de390a-4a3c-4b08-b501-7eddea63b345</guid>
      <link>http://blog.kineticweb.com/articles/2008/12/11/the-rails-language-aka-the-dhh-dsl#comment-273</link>
    </item>
    <item>
      <title>"The Rails Language aka The DHH DSL" by Keith Fitzgerald</title>
      <description>@pjdavis totally! one of the best features of github is how awesome forking is. and merging via git is stupid simple!

IMHO [and totally truly, IMHO, since this is a rant post] forking and customizing rails seems a bit against the philosophy. the great strength of rails is that it makes a lot of decisions for you, it gets you up and running quickly. if you want to break from some of that, you're going off the reservation a bit. i.e. you're making a departure from that core philosophy. i mean ... sure you can fork/merge but you'd be better off choosing a framework that better suits the philosophy you're trying to apply? /shrug. 

full disclosure: i'm a recovering java programmer who's been seen many a framework du jour showdown :-)
</description>
      <pubDate>Thu, 11 Dec 2008 22:51:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:46c79de8-5465-4477-ba0e-93b776cffbfd</guid>
      <link>http://blog.kineticweb.com/articles/2008/12/11/the-rails-language-aka-the-dhh-dsl#comment-272</link>
    </item>
    <item>
      <title>"The Rails Language aka The DHH DSL" by Justin</title>
      <description>PJ: I didn't say I don't use the "magic", I write Rails applications all day and I love it. What I'm saying is, as a framework moving forward toward a direction of exclusivity. Advancing further from the language its built on top of [example: Merb]. The tone of the entry was to provoke the thought processes when writing your own code. Thinking about utilizing other frameworks? Take into question what your actually using, investigate the framework your building on and know what your implementing is exclusive. Not that I'm being racist toward #blank? and others... come on.
&lt;br /&gt;&lt;br /&gt;
maxim: "What's the point of Matz developing brilliant extensible architecture if you don't want to extend it?" Note my response to PJ. One word, exclusivity. I never said Ruby shouldn't be used that way, I meant "know" what your actually doing.
&lt;br /&gt;&lt;br /&gt;
"You can't expect to be babysitted by every framework." How does this remark relate to Merb and its complete and udder utilization of the language? You can include a GEM with additional features to utilize PARAMETERS in your controller METHODS.
&lt;br /&gt;&lt;br /&gt;
"if you didn't know #blank and #try exist - your regular pure ruby code works just fine." Thats my point... people are learning Ruby on Rails... because we all know, Rails is the "gateway" framework. Some morons aren't learning that #blank? and #try are exclusive, and thus writing code that isn't portable.
&lt;br /&gt;&lt;br /&gt;
Exclusivity.. know what your doing. Which is sort of sad in a way, that people can't trust the methods they are utilizing which descend from Object for christs sake... but anyway, thats my point.</description>
      <pubDate>Thu, 11 Dec 2008 22:43:51 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:f5c69689-73a6-44ba-b819-dd1afbfbee67</guid>
      <link>http://blog.kineticweb.com/articles/2008/12/11/the-rails-language-aka-the-dhh-dsl#comment-271</link>
    </item>
    <item>
      <title>"The Rails Language aka The DHH DSL" by PJ Davis</title>
      <description>"Just because your doing it in your projects doesn&#8217;t mean it should be forced down my throat."

Good thing that Rails is open source, and hosted on github. I'm positive you have an account. Just hit that fork button and take out the things you don't want and BAM! instant custom rails. It's also easy to merge changes back in, so just grab the commits you want. I for one like the magic. Of course, I take the time to read the commits and look at the code, so it's less magical to me. 

Also, why shouldn't convince methods be added? #blank? is damn useful, so instead of ranting against rails core, why don't you rant at Matz for not including this in Ruby?  </description>
      <pubDate>Thu, 11 Dec 2008 22:16:42 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:6721cd73-8a04-42e4-8b24-c40ad829aaba</guid>
      <link>http://blog.kineticweb.com/articles/2008/12/11/the-rails-language-aka-the-dhh-dsl#comment-269</link>
    </item>
    <item>
      <title>"The Rails Language aka The DHH DSL" by Keith Fitzgerald</title>
      <description>I've always preferred the term "Duck Punching" over "Monkey Patching" :-)

"tired of seeing Rails core become the bastard child of someone&#8217;s personal &#8220;good ideas&#8221;"

- kind of why i got over rails real fast. great rant!</description>
      <pubDate>Thu, 11 Dec 2008 21:50:16 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:dc5ac99b-c875-47e1-bcb8-1082355a3ed5</guid>
      <link>http://blog.kineticweb.com/articles/2008/12/11/the-rails-language-aka-the-dhh-dsl#comment-268</link>
    </item>
    <item>
      <title>"The Rails Language aka The DHH DSL" by maxim</title>
      <description>I have 2 points but you've probably already considered them.

1 - What's the point of Matz developing brilliant extensible architecture if you don't want to extend it? It's like buying a high quality player and only using the cheap headphones that manufacturer threw in (while really focusing on player itself). It's like building the foundation and never building the house. It's like marinating meat and never making barbeque.

2 - It's your responsibility to learn in the right order. You can't expect to be babysitted by every framework.  With such logic one can be easily led to believe that ActionPack is a core Ruby class.  I haven't seen reimplemented core functionality, I've only seen new one with new names, meaning - if you didn't know #blank and #try exist - your regular pure ruby code works just fine.</description>
      <pubDate>Thu, 11 Dec 2008 21:35:33 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:cd4747e5-b159-4840-9572-a318f1e0aad7</guid>
      <link>http://blog.kineticweb.com/articles/2008/12/11/the-rails-language-aka-the-dhh-dsl#comment-267</link>
    </item>
    <item>
      <title>"The Rails Language aka The DHH DSL" by Colin</title>
      <description>#blank? always annoys me. I'd hate to see more of that kinda cruft.</description>
      <pubDate>Thu, 11 Dec 2008 19:17:48 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:cc3c4401-b78b-46aa-ad8b-0ac760de28d9</guid>
      <link>http://blog.kineticweb.com/articles/2008/12/11/the-rails-language-aka-the-dhh-dsl#comment-266</link>
    </item>
  </channel>
</rss>
