After reading Noel Rappin’s post on the smallest things that annoy ruby job interviewers, I realized I’ve committed some of these no-no’s. Digging deeper, I think it’s because, as of yet, I’m not fully comfortable with ruby’s idioms. I am still learning to swim in the baby end of the pool. I can read ruby code and it makes sense, but when I try to code on my own, I usually fall back to some java habits.
So when I’m working in ruby, usually I’ll code it in a way that’s very java like, with for-loops, explicit return statements, etc… the no-no’s that Noel posted about. Since java is my first programming language, this looks very familiar to me and eases me into developing in ruby.
Then once everything is working. I go back and make it “look” like ruby. I’ll go line-by-line in the code, looking for ways to look better. When you think about it, this practice is a lot like when you take a foreign language in high school. You thought what you wanted to say first in English, translated it in your head into Spanish, and then finally said the words. Though a problem might arise when someone talked back to you Spanish, more mental gymnastics.
But does this fool anybody when talking about programing languages? Maybe. But I think the more important question is if am I somehow cheating myself in my ruby learning? I’m striving for a fluency in both languages, java and ruby; not one over the other.
To address this in my next ruby side project, I think I’m going to eliminate as much of the javaisms I can as I code, not after a finishing point. It might take longer for me to actually get something simple done, but I think it’s worth it.