Re:Writing Rails code makes me miss writing in Objective-C. ...
by billmcneale on Thursday July 15, 2010 @12:19AM
(#1516947)
What you're describing with the 'fork' button is incorrect. When you fix something on your own branch, nobody on earth but yourself benefits from it. For this to work, you have to contribute your work back and (the hard part), the original owners have to accept it. And that's where open source usually breaks down.
Another point of the original post is that monkey patching is the kiss of death of many Ruby and Ruby on Rails projects.
Re:Writing Rails code makes me miss writing in Objective-C. ...
by jrockway on Thursday July 15, 2010 @12:22AM
(#1516955)
"Usually"?
I can't think of any change I've ever made to an open source project that hasn't been accepted. This ranges from random Perl modules to Emacs and the Linux kernel. Contributing is as easy as sending an email!
Understanding your libraries and their implementation is a great thing. Once you realize that library code is not a magical black box, and is instead very much like the code you are writing, you can really become a productive programmer. ("But what about abstraction! If I have to understand my libaries, they're not abstract enough!" Wrong. Abstraction prevents parts of your program from knowing about each other. You, the programmer, still have to know how each part works. Abstraction means you only have to actively think about once piece at a time -- nothing more.)
The Posterous codebase is littered with monkey patches, modifying gems to work as we need them to.
Yeah, you know that "fork me" button on Github? You click it, then you edit the code, then the bug is fixed for every single person on Earth. That's the point of free software; if there's a bug, you squish it and move on.
(I do this all the time. Does it take time to fork someone's project, fix the code a bit, and send them a pull request? Yes. But it's worth it, because now you have a robust and permanent fix... and a community!
Monkey patching is for monkeys. Collaborating is what humans do.)