Learning Ruby for Python's Sake?

by Noah Gift

So, I made good on my promise to start learning Ruby. I do python programming in my day job and want to get better at Test Driven Development, Test Enhanced Development and Behavioral Driven Development, etc, in Python. Basically, I want to take a very similar language to Python, like Ruby, and strictly start the "testing" way. I am not sure how many other people have done something like I am doing, but it would be fun if a Ruby person did the same thing with Python. It might be neat to exchange notes.

These are the reasons why I think my theory will work so far:
1. I have no ego with Ruby. I know I suck, so it is ok to be slow at first while I am only doing Test Driven Style Development. Basically, I won't be tempted to just crank out some code without tests.

2. I don't have any friends yet that use Ruby. This again allow me to bring in any preconceived notation of how I am supposed to do things. I will be an empty vessel.

3. There are things in Ruby that I can learn and apply to Python.

4. It is just as fun to program in Ruby, as it is in Python. Lets face it Dynamic Languages are fun!

If any Ruby experts have any advice on what is the proper way to do TDD or BDD in Ruby, please let me know. I DON'T KNOW ANYTHING. Ahh...that is fun to say. Any advice or guidance is appreciated. I suppose this is almost like a cultural exchange visit. I just learned about BDD, and rspec and they seem interesting.

Oh, and I visited the local Ruby meeting a couple of nights ago in Atlanta, GA, and found it to be quite fun and light, yet still interesting. I plan on going every month now. One of the most interesting things I noticed is that when there is only one web framework, it kind of focuses the discussions and everyone knows what you are talking about. I have to admit, this seems like a very refreshing environment for a Newbie to a language, as no matter who you ask, they ALL know ROR.

If you are in the Atlanta area and interested in learning Ruby, then I recommend visiting:


Jay Phillips
2007-09-06 08:25:27
Definitely take a look at ZenTest to help make your testing a seamless part of you development experience. Though you may be new to Ruby, I guarantee it will take you a while to think *in* Ruby, especially if you're inexperienced in Smalltalk or Lisp (which are far closer to Ruby than Python is). I recommend an escapade through metaprogramming with Ruby once you feel comfortable with the syntax.
Ryan Bates
2007-09-06 08:28:39
I recommend going through some ruby quizzes. They are fun, simple exercises and most work very well with TDD.
Noah Gift
2007-09-07 02:23:31
Jay/Ryan/Thanks for the tips, I will try them out this weekend. I think I will try to make a regular habit of posting about my journey into TDD Ruby. Seems like a fun topic.
Daniel Insley
2007-09-07 11:47:23
There's couple other Ruby web-frameworks out there, Nitro and Camping being the other more popular ones. I'd also recommend trying out the Netbeans Ruby IDE, you can get the latest build from here.
Noah Gift
2007-09-07 14:18:58
There has been quite a response to this idea, but I doubt I came up with it. I am sure I soaked it in from somewhere. If anyone else is interested it might be fun to make a couple of google groups so that cultural exchange students can talk about using Python for Ruby Testing, or Ruby for Python Testing, etc.

I do NOT volunteer :)

2007-09-10 04:44:13
Your post makes me remember that when I was trying to choose a language, I looked at Ruby and Python and was quite annoyed because I couldn't choose between both!
In fact I find Ruby and Python very similar, both are very clean language..

[ In the end, I went with Ruby (but I don't use it much) that said, for beginners I would advise learning Python. ]