Rails vs. PHP, or why I like method_missing

– This post is geared towards my non- or semi-programmer friends, based on a conversation I had with one of them the other day that I felt needed more clarification.

Before I begin, I will concede the point that “PHP Can Do Anything” before some friends threaten to hurt me. [php dynamic methods] I in fact have probably done more client work in PHP [mad props to code igniter] than any other programming language, but I’ve really enjoyed working with Rails since I made some small utilities about two years ago. I’ve had a lot of *very* boutique projects that were great in their time and place, but I decided to retire. Anywho, I have a very anti-fanboy stance on a lot of Objects that tend to inspire fanboy-ness (Apple, iPod, Rails, America) I think they are great, but don’t think everything else is shit and useless.

I think my brain works in such a way that I always liked to have access to what was going on – I wanted to see my options. When I first started writing C programs in 8th grade, I remember outputting the value of every variable at every point of the iteration, just to be able to see what was what, what methods I had access to, what my value was. Fast forward to first using and IDE and getting sweet auto-completion, and its the same thing when I read some API documentation. It’s good to know what methods you have access to so you know what you can do. Fast forward to ActiveRecord and dynamic finders. You mean I can just say find_by_pants_and_shoes and just because I have both “pants” and “shoes” fields in my database, you know what I’m talking about? Jamis Buck’s definitive explanation solidifed the concept for me and changed the way I think about programming.

I hope to be a HS Math and Computer Science teacher someday so I can be the person to teach kids about things like this and Proof by Induction, rather than dreadful things like Buggles.

In conclusion, I’m glad I could both spout meaningless paragraphs for a page (just like every high school teacher I hated) AND just write about how great I think Rails is (just like every Rails blogger I hate) I guess the takeaway is that

NoMethodError: undefined method `invoke_method_missing_for_problem_solving' for "love"
:String from (irb):397
posted on Wednesday, March 26th, 2008 by Tyler in Personal

3 Comments

This Railscast on making a plugin is sweet too: http://railscasts.com/episodes/33

posted by Tyler Kremberg • March 26, 2008

PHP

posted by atom • March 26, 2008

If you’re going to talk about me, you should talk a lot more about me. This post is seriously lacking a lot of me, and I think it shows.

Furthermore, I’d totally give you a snappy comeback if I remembered what the hell we were talking about that inspired this post. I can certainly be a bit (a lot) PHP-centric, since it’s what I know, but I think you realize that I’m in no way anti-Ruby. At least not now; I might have been on March 26th. I tend to change my mind frequently and dramatically. Either that or I was playing devil’s advocate, which I do any chance I get.

Personally, I’ve been wanting to get a crack at Ruby for a while now. My web host (1&1) recently added Ruby support to my server and I signed up with another host (mt) that also has it, so it’s looking like it may happen really soon.

posted by nocash • March 31, 2008

Leave Comment

killer baby movies to sir with love movie cursed japanese movie heat film soundtrack Bride Wars prime movie black widow comic movie Chasing Amy hoosiers movie david cronenberg movie halloween 3 season witch remake bit part tab watch stagecoach movie sas movie sarah landon and the paranormal hour review dirty sanchez the movie 2006 New Moon crossfit movie hancock movie cruise movie