it's not hard, it's different.
what's hard is going back to a language like C (or worse, Objective-C)
once you've been using ruby for a while.
i do not remember the exact quotes, but when i started learning ruby i
remember reading something like the following:
1) ruby tries to stay out of the programmers way
2) sometimes when you are trying to solve a problem in ruby, you
realize that you already have
the last one seems strange, but i can say i've experienced it before. in
other languages you're worried about types and syntax and structures.
ruby does most of the heavy lifting. you just need to find the right
tool. what used to be 10 lines of code turns into 1 line of code.
i'm working with someone who likes C and Java because he likes that
every variable has been declared and has a type. he's afraid of duck
typing. (Hopefully, you've heard the "/If it walks like a duck and
quacks like a duck, I would call it a duck"/ line.) in his world, if he
wants to reuse some code, he copies the code or has to make c or java
play with pointers or coercion. ruby just lets you do it.
so, hang in there. the syntax can feel strange. there are some rubyisms
that take getting used to. there are often multiple ways to do the same
thing. i started with c, then c++, then java (yuck), then python (still
like python), and then found ruby. my team laughs at me because i'm
constantly selling them on using ruby instead of bash. i've challenged
them to re-write some of their scripts in ruby, and the ruby version is
usually cleaner. (sure, they are doing it again, so they learn from
their mistakes, but it's still cleaner.)
good luck and have fun.
bob
carmen rad wrote:
> I find Ruby a very mysterious language and sometimes hard to follow.
> Is anybody else in the same position? It seems hard for some kind of
> reason.
>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "ruby-on-rails-programming-with-passion" group.
To unsubscribe from this group, send email to
ruby-on-rails-programming-with-passion-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/ruby-on-rails-programming-with-passion?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---