4 ms·
I was pondering this question the other day while I was reading some server code I had to enhance. I'm a newbie to rails and ruby and I had to figure out how to
by msie 17y ago
I was pondering this question the other day while I was reading some server code I had to enhance. I'm a newbie to rails and ruby and I had to figure out how to work with the restful_authentication plugin that was being used by the site. It seems that there isn't any good documentation, tutorials for the plugin and the only way I could learn to use it was through reading the source. I've done a little coding in Python before and I wasn't fearful about reading other people's source code. With Ruby/Rails I have some fear...I hope it will wear off with enough experience.
- cheald 17y agoGoogle picked up doc for restful_auth pretty easily: http://wiki.github.com/technoweenie/restful-authentication/ http://wiki.github.com/technoweenie/restful-authentication/ That said, Ruby can be quite opaque to the newcomer due to the use of method_missing. It can make Ruby code exceptionally powerful, but it does effectively obscure the traditional stack trace, which can make trouble for people that don't understand what's going on. I landed in the Ruby camp (and honestly, I think I prefer it a bit to Python, just personally), but they're both great languages, both have strong communities, and will both serve you well in a number of ways. There are lots of people that are professionally successful in both Python and Ruby. Both have vibrant communities, lots of supporting frameworks and libraries, and lots of success stories. My personal observation is that Python tends to lean towards structure and convention; Ruby tends to lean towards flexibility and malleability. One of Ruby's biggest claims is that it's mindblowingly easy to write your own DSL in Ruby. Things like rake, rspec, cucumber, and the like are exceptionally powerful tools that aren't easily replicated in Python. This can lead to extremely readable, usable code abstractions. The price for this is that the underlying implementation can be somewhat hard to follow until you have a good grasp on Ruby's various tricks. In short, Ruby is far less principled than Python is, but that grants it an agility that Python can't achieve. Depending on what you need, either may be the right tool for the job.