<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: Monkeypatching is Destroying Ruby</title>
	<link>http://avdi.org/devblog/2008/02/23/why-monkeypatching-is-destroying-ruby/</link>
	<description></description>
	<pubDate>Sat, 19 Jul 2008 20:25:01 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.1</generator>
		<item>
		<title>By: Monkeypatching For Humans &#124; The CyberwBlog</title>
		<link>http://avdi.org/devblog/2008/02/23/why-monkeypatching-is-destroying-ruby/#comment-97</link>
		<dc:creator>Monkeypatching For Humans &#124; The CyberwBlog</dc:creator>
		<pubDate>Mon, 14 Jul 2008 11:21:28 +0000</pubDate>
		<guid>http://avdi.org/devblog/2008/02/23/why-monkeypatching-is-destroying-ruby/#comment-97</guid>
		<description>[...] class had subtly different behaviors from the String you&#8217;ve learned to use? Monkeypatching can be incredibly dangerous in the wrong hands, as Avdi Grimm notes:  Monkey patching is the new black [in the Ruby community]. It&#8217;s what [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] class had subtly different behaviors from the String you&#8217;ve learned to use? Monkeypatching can be incredibly dangerous in the wrong hands, as Avdi Grimm notes:  Monkey patching is the new black [in the Ruby community]. It&#8217;s what [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mdlogix: Ruby on Rails Software Engineer &#171; Toronto Technology Jobs</title>
		<link>http://avdi.org/devblog/2008/02/23/why-monkeypatching-is-destroying-ruby/#comment-54</link>
		<dc:creator>mdlogix: Ruby on Rails Software Engineer &#171; Toronto Technology Jobs</dc:creator>
		<pubDate>Thu, 17 Apr 2008 14:28:51 +0000</pubDate>
		<guid>http://avdi.org/devblog/2008/02/23/why-monkeypatching-is-destroying-ruby/#comment-54</guid>
		<description>[...] got some expertise with Rails in-house, including Virtuous Code&#8217;s Avdi Grimm (&#8217;Monkey-Patching is Destroying Ruby&#8216;).  And they&#8217;ve just brought on a soon-to-be-ex-colleague of mine, who&#8217;s a nice [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] got some expertise with Rails in-house, including Virtuous Code&#8217;s Avdi Grimm (&#8217;Monkey-Patching is Destroying Ruby&#8216;).  And they&#8217;ve just brought on a soon-to-be-ex-colleague of mine, who&#8217;s a nice [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: darkgoob</title>
		<link>http://avdi.org/devblog/2008/02/23/why-monkeypatching-is-destroying-ruby/#comment-42</link>
		<dc:creator>darkgoob</dc:creator>
		<pubDate>Tue, 08 Apr 2008 17:48:31 +0000</pubDate>
		<guid>http://avdi.org/devblog/2008/02/23/why-monkeypatching-is-destroying-ruby/#comment-42</guid>
		<description>There are "programming language communities"? People *actually* hold affiliation to programming languages? 

This is all so very odd. Are there tattoos involved? I bet there are.

You guys should like, have a Ruby sports team of some kind, which would play against the Python team, and all the others of course. 

Man, it sounds like people need to take off their Buddy Holly glasses and stop drinking so much damn coffee.</description>
		<content:encoded><![CDATA[<p>There are &#8220;programming language communities&#8221;? People <strong>actually</strong> hold affiliation to programming languages? </p>
<p>This is all so very odd. Are there tattoos involved? I bet there are.</p>
<p>You guys should like, have a Ruby sports team of some kind, which would play against the Python team, and all the others of course. </p>
<p>Man, it sounds like people need to take off their Buddy Holly glasses and stop drinking so much damn coffee.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Guoping Huang</title>
		<link>http://avdi.org/devblog/2008/02/23/why-monkeypatching-is-destroying-ruby/#comment-41</link>
		<dc:creator>Guoping Huang</dc:creator>
		<pubDate>Mon, 07 Apr 2008 12:08:53 +0000</pubDate>
		<guid>http://avdi.org/devblog/2008/02/23/why-monkeypatching-is-destroying-ruby/#comment-41</guid>
		<description>I totally agreed with you on Monkeypatching as a style to code libraries. Patches are just patches. They are not organized codes. However, Monkeypatching does have is values in  patching buggy codes and it should stay that way. Combined with the open source nature of Ruby, it is a powerful tool to patch things up the correct way without modifying the 3rd party codes. 

We used it in our ShellShadow merb app and it's working pretty well.See a blog post here.

http://odwks.com/2008/04/monkeypatching-merb/
And yes, it should not be the means for developing libraries(which should uses public api's).</description>
		<content:encoded><![CDATA[<p>I totally agreed with you on Monkeypatching as a style to code libraries. Patches are just patches. They are not organized codes. However, Monkeypatching does have is values in  patching buggy codes and it should stay that way. Combined with the open source nature of Ruby, it is a powerful tool to patch things up the correct way without modifying the 3rd party codes. </p>
<p>We used it in our ShellShadow merb app and it&#8217;s working pretty well.See a blog post here.</p>
<p><a href="http://odwks.com/2008/04/monkeypatching-merb/" rel="nofollow">http://odwks.com/2008/04/monkeypatching-merb/</a><br />
And yes, it should not be the means for developing libraries(which should uses public api&#8217;s).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: News &#187; Monkeypatching is Destroying Ruby</title>
		<link>http://avdi.org/devblog/2008/02/23/why-monkeypatching-is-destroying-ruby/#comment-22</link>
		<dc:creator>News &#187; Monkeypatching is Destroying Ruby</dc:creator>
		<pubDate>Tue, 25 Mar 2008 10:21:11 +0000</pubDate>
		<guid>http://avdi.org/devblog/2008/02/23/why-monkeypatching-is-destroying-ruby/#comment-22</guid>
		<description>[...] Monkeypatching is Destroying Ruby (via). Deliberately provocative title, but makes a well considered case for restrained use of monkey patching in Ruby. Cultural norms around monkey patching seem to me to be one of the core differences between the Ruby and Python communities. [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] Monkeypatching is Destroying Ruby (via). Deliberately provocative title, but makes a well considered case for restrained use of monkey patching in Ruby. Cultural norms around monkey patching seem to me to be one of the core differences between the Ruby and Python communities. [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Geekvicious Journal &#187; Blog Archive &#187; Hands-off my global namespace.</title>
		<link>http://avdi.org/devblog/2008/02/23/why-monkeypatching-is-destroying-ruby/#comment-21</link>
		<dc:creator>Geekvicious Journal &#187; Blog Archive &#187; Hands-off my global namespace.</dc:creator>
		<pubDate>Thu, 20 Mar 2008 04:03:46 +0000</pubDate>
		<guid>http://avdi.org/devblog/2008/02/23/why-monkeypatching-is-destroying-ruby/#comment-21</guid>
		<description>[...] Well, after all monkey patching might be destroying ruby. [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] Well, after all monkey patching might be destroying ruby. [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: andrew</title>
		<link>http://avdi.org/devblog/2008/02/23/why-monkeypatching-is-destroying-ruby/#comment-20</link>
		<dc:creator>andrew</dc:creator>
		<pubDate>Mon, 03 Mar 2008 17:29:21 +0000</pubDate>
		<guid>http://avdi.org/devblog/2008/02/23/why-monkeypatching-is-destroying-ruby/#comment-20</guid>
		<description>Nathan: You can use Rails as a black box framework. You can read some tutorials and start programming, use the API docs as needed. But you cannot throw a bunch gems, plugins, generators and engines into your app and expect to be able to debug without an understanding of the code you have written and used. I have worked with .net developers in the past. I present them with a bug and they shrug their shoulders, "that's part of the framework, i don't know". Hoorah for open-source, huzzah for eval, I can change anything because I can read and understand the source ( all of it ), and can modify everything.</description>
		<content:encoded><![CDATA[<p>Nathan: You can use Rails as a black box framework. You can read some tutorials and start programming, use the <span class="caps">API</span> docs as needed. But you cannot throw a bunch gems, plugins, generators and engines into your app and expect to be able to debug without an understanding of the code you have written and used. I have worked with .net developers in the past. I present them with a bug and they shrug their shoulders, &#8220;that&#8217;s part of the framework, i don&#8217;t know&#8221;. Hoorah for open-source, huzzah for eval, I can change anything because I can read and understand the source ( all of it ), and can modify everything.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nathan</title>
		<link>http://avdi.org/devblog/2008/02/23/why-monkeypatching-is-destroying-ruby/#comment-19</link>
		<dc:creator>Nathan</dc:creator>
		<pubDate>Sat, 01 Mar 2008 07:40:13 +0000</pubDate>
		<guid>http://avdi.org/devblog/2008/02/23/why-monkeypatching-is-destroying-ruby/#comment-19</guid>
		<description>@andrew: so you're saying I can't take Rails as a black box and simply use it as my web application framework? I have to know the internals as well, just so I can avoid being clobbered by a bad monkeypatch? This is wrong. A framework should support my application, not undermine it. Don't get me wrong, I like Ruby and I like Rails, but I do not like the monkeypatch-as-programming-model approach that many Rails developers seem to have taken.</description>
		<content:encoded><![CDATA[<p>@andrew: so you&#8217;re saying I can&#8217;t take Rails as a black box and simply use it as my web application framework? I have to know the internals as well, just so I can avoid being clobbered by a bad monkeypatch? This is wrong. A framework should support my application, not undermine it. Don&#8217;t get me wrong, I like Ruby and I like Rails, but I do not like the monkeypatch-as-programming-model approach that many Rails developers seem to have taken.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: andrew</title>
		<link>http://avdi.org/devblog/2008/02/23/why-monkeypatching-is-destroying-ruby/#comment-18</link>
		<dc:creator>andrew</dc:creator>
		<pubDate>Thu, 28 Feb 2008 18:25:25 +0000</pubDate>
		<guid>http://avdi.org/devblog/2008/02/23/why-monkeypatching-is-destroying-ruby/#comment-18</guid>
		<description>&#62;"monkey patch" is debatable
Ah, there is no such thing as a ruby "monkey patch" or "meta-programming" anyway.

http://dablog.rubypal.com/2007/1/7/meta-shmeta-learning-ruby-horizontally

&#62; less-silly API
true

&#62; self.abstract_class = true
good in theory, not in practice ( if your inheritance is more than one level deep, easier [and more maintainable] to whip out some eval than set this in each subclass )

&#62; community conventions are essential for maintainability
also good in theory, but deadlines kill the virtue and bring out the kludge, i'm still sticking to knowing your code :)</description>
		<content:encoded><![CDATA[<p>&gt;&#8220;monkey patch&#8221; is debatable<br />
Ah, there is no such thing as a ruby &#8220;monkey patch&#8221; or &#8220;meta-programming&#8221; anyway.</p>
<p><a href="http://dablog.rubypal.com/2007/1/7/meta-shmeta-learning-ruby-horizontally" rel="nofollow">http://dablog.rubypal.com/2007/1/7/meta-shmeta-learning-ruby-horizontally</a></p>
<p>&gt; less-silly <span class="caps">API</span><br />
true</p>
<p>&gt; self.abstract_class = true<br />
good in theory, not in practice ( if your inheritance is more than one level deep, easier [and more maintainable] to whip out some eval than set this in each subclass )</p>
<p>&gt; community conventions are essential for maintainability<br />
also good in theory, but deadlines kill the virtue and bring out the kludge, i&#8217;m still sticking to knowing your code <img src='http://avdi.org/devblog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: avdi</title>
		<link>http://avdi.org/devblog/2008/02/23/why-monkeypatching-is-destroying-ruby/#comment-17</link>
		<dc:creator>avdi</dc:creator>
		<pubDate>Thu, 28 Feb 2008 17:24:09 +0000</pubDate>
		<guid>http://avdi.org/devblog/2008/02/23/why-monkeypatching-is-destroying-ruby/#comment-17</guid>
		<description>@andrew:

&gt; You do monkey-patch in your NullDB. You reopen AR::Base to add a nulldb_connection method.

True.  This, unfortunately, is part of the contract of the
ActiveRecord connection adapter API - you are expected to do this if
you want connection_establish :adapter =&gt; :foo to work.  Whether this
is a true "monkey patch" is debatable; a lot of people only consider
such a thing a monkey patch if it actually *redefines* existing
methods.  Of course, the Rails guys could easily have avoided the
whole question by giving us a less-silly API that allowed us to simply
register a new database connection class.

&gt; Subclassing isn't always possible. With AR::Base subclasses have special
&gt; semantic meaning, ie. Single Table Inheritance. That is why everything with
&gt; ActiveRecord is done through mix-ins +/or eval. (You can subclass AR::Base
&gt; not for STI but it's a pain)

It's not a pain, you just set abstract_class = true.

&gt; Whether it is the Rails framework or a plugin, understand it enough to debug
&gt; it. Then you can eval as much as you like.

This is easy to say, but in real world large projects it simply isn't
feasible to understand all of the code in the project, let alone all
of the third-party code it depends on.  That is why community
conventions are essential for maintainability.

Thanks for the comment!</description>
		<content:encoded><![CDATA[<p>@andrew:</p>
<p>> You do monkey-patch in your NullDB. You reopen AR::Base to add a nulldb_connection method.</p>
<p>True.  This, unfortunately, is part of the contract of the<br />
ActiveRecord connection adapter <span class="caps">API</span> &#8211; you are expected to do this if<br />
you want connection_establish :adapter => :foo to work.  Whether this<br />
is a true &#8220;monkey patch&#8221; is debatable; a lot of people only consider<br />
such a thing a monkey patch if it actually <strong>redefines</strong> existing<br />
methods.  Of course, the Rails guys could easily have avoided the<br />
whole question by giving us a less-silly <span class="caps">API</span> that allowed us to simply<br />
register a new database connection class.</p>
<p>> Subclassing isn&#8217;t always possible. With AR::Base subclasses have special<br />
> semantic meaning, ie. Single Table Inheritance. That is why everything with<br />
> ActiveRecord is done through mix-ins +/or eval. (You can subclass AR::Base<br />
> not for <span class="caps">STI</span> but it&#8217;s a pain)</p>
<p>It&#8217;s not a pain, you just set abstract_class = true.</p>
<p>> Whether it is the Rails framework or a plugin, understand it enough to debug<br />
> it. Then you can eval as much as you like.</p>
<p>This is easy to say, but in real world large projects it simply isn&#8217;t<br />
feasible to understand all of the code in the project, let alone all<br />
of the third-party code it depends on.  That is why community<br />
conventions are essential for maintainability.</p>
<p>Thanks for the comment!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
