I have been wanting to learn either Ruby or Python or Perl for sometime, but could not decide on which one to start off with. Each of them sounded very useful and I am hoping to learn and become fluent with at least two of them before I graduate. And then I was sold when a friend told me "Ruby makes you write code that is as pretty as its name" :D I just thought that was a really a nice description.
So when my TA professor asked if anyone could write a small bash or Ruby script for automating some file checking process (actually a cheater-detector) I didn't hesitate to volunteer although I have never really wrote any useful script with either bash (I've seen some during one of the courses I think) or Ruby before. I told him I would like to dig around, and now I am writing Ruby. So far I've been learning from examples, and I don't think I qualify to comment anything on Ruby yet, but given that I started poking around for less than 4 hours and have some working script on my lap(top), I'm liking it a lot :)
One beginner's block I've faced - I was writing a class and methods in my script, so it didn't occur to me that I had to have methods declared before the line where I call it from. But then it's a script.. I don't compile it to run it.. so I had a DUHHH~STUPID! moment after about 10 minutes trying to understand why interpreter said there was no such method when it was there in the same class. This made me realize that whenever I'm learning a new language extensively, I feel that sometimes I'm "trapped" in the Java way of thinking and that can be a block.. but breaking that mind-block is so refreshing!
No comments:
Post a Comment