Ruby in 2012
23/Apr 2012
Ruby is more popular than ever, but it's also not as trendy as it used to be. rubylearning.com students1 asked a few questions to Matt Aimonetti about his vision of Ruby in 2012 and for the future.
Matt Aimonetti is a well-known Rubyist, technical writer, speaker and active open-source contributor. He currently works as a software architect for LivingSocial. Prior to joining LivingSocial, Matt worked for Sony PlayStation.
How does Ruby fit in with the future, as you see it?
Matt Aimonetti: This is a really hard question. If I could predict the future, I would probably already be rich. Ruby is a very powerful and flexible language.
Very much like Python, Ruby is a great glue language, a great language for the web and overall a language that allows you to get a lot done before you hit the language limitations.
The ecosystem also keeps growing and there seems to be more and more people focusing on performance and documentation which are two things Ruby could still improve a lot on.
I think it's quite obvious that the pendulum is swinging back and server side code is going to be more and more API oriented with smart clients consuming these services. Ruby is great for that because services need to be easy to write, easily to maintain, well documented and flexible. I wrote a DSL to do just that using Ruby and it would have been harder in any other language.
So, to answer the question more directly, I think that Ruby will keep on playing a major role in web development but at the same time, developers will become more and more polyglot and might switch back and forth between languages.
I have talked to people that think that Ruby is falling by the wayside, even to the point where they say that Rails is killing Ruby. What do you think?
Matt Aimonetti: I wouldn't say that Ruby is falling by the wayside, what's going on is that Ruby outgrew the startup world where it became very popular a few years ago. However, you now find Ruby (and Rails to that matter) in a lot of more established places thanks to its efficiency of development, strong focus on testing, active community and great ecosystem.
When some people say that Rails is hurting Ruby, I think what they mean is that for them Ruby's fate is directly related to Rails'. If Rails doesn't manage to stay the web framework of reference, it might hurt the language. This is certainly not entirely wrong. Without Rails, Ruby wouldn't have been as popular, but at the same time, there is much more to Ruby than Rails and I think that as a community we need to seriously start looking at all the great things we can do with Ruby outside Rails.
What is your opinion on Node.js? Is this the future? Do you think Node.js will beat Ruby in web application development?
Matt Aimonetti: This is a question I often get. I personally like node.js, I think it's fun, easy to get started and with CoffeeScript, writing JavaScript (JS) is almost fun. That said, Node is really young, not very well documented and relies extremely heavily on callbacks which can be quite confusing at times. My experience with Node is limited, but as my personal project started growing, I started struggling to keep my code simple and easy to maintain. Because I already know Ruby quite well and because equivalent tools exist in Ruby land, I don't see a real need to use Node besides being the new cool framework.
But the project is fast growing, the cross-platform focus is welcomed and I think that for some developers, Node.js can be a great solution, especially when developing simple web APIs.
Will it “beat” Ruby? Well, a framework and a programming language are two different things. Will it beat Rails in popularity, that's a possibility due to the fact that JavaScript is becoming very popular. However, some of the issues I mentioned earlier might prevent Node.js to become as popular as some people seem to believe. Finally, at the end of the day, if a JS framework becomes a better solution than anything else I use, I will certainly switch. But so far, I don't see that happening.
Do you think Ruby is the best programming language to be introduced to newbies to get them started in programming?
Matt Aimonetti: I do believe Ruby is a great language to learn some of the basis of programming, especially Object Oriented Programming. It allows students to get easily started and to build things quickly. However, different people learn differently and are attracted to other things and parts of Ruby can be quite hairy. To properly learn a language, you also need to have a way to practice and quickly see the fruit of your labor. That's why If you are a designer, I might suggest you start with JavaScript and then move on to a better designed, high level programming language like Ruby or Python. Finally, you need to look at your motivation being learning a new language.
If you want to learn programming because you want to work in this field, consider starting learning a language which will allow you to easily start working (hint: there are a lot of Rails positions out there waiting for you). But don't stop there, keep learning new languages and way to solve problems using code.
How to become a better coder? I still feel it's hard to get involved contributing to OSS, could you give us some advice?
Matt Aimonetti: I personally get better when I practice a lot and when overcoming problems I didn't know how to solve before I started. Open Source contribution is a great way to get feedback and learn from others. I think that with tools such as Git and GitHub, OSS contribution has become much easier than ever. That said, a lot of developers think that their contributions have to be significant, and, that's in my mind, a mistake. Start by contributing documentation, examples and helping others. File bug reports and try to reduce them to an easier to handle case. That might seem trivial to you, but it's extremely useful, it will teach you a lot about the project you are involved with, its design, the pros/cons and how an OSS project is run. Doing that will help you debug and diagnose problems faster and when added to the design knowledge and communication skills you would have acquired, you have all the ingredients of a good developer. Another thing I like to do is to pick something that seems absolutely impossible for me to do. If you only know Ruby, memory management and writing code C might seem hard. Give yourself a reasonable time frame and a challenge such as 6 months to have a small C program that will do X, Y and Z. Keep it small and simple and don't forget to have fun. At first it will be hard, but don't give up, keep trying until you learned something you thought was impossible. When you will go back to writing Ruby or whatever language you write, you will look at things from a different angle.
Finally, the last thing I would suggest is to never feel too comfortable in your daily programming tasks. If you are to the point where you just execute and aren't challenged, you might want to consider talking to your supervisor about giving you more challenging tasks.
Are you excited about MobiRuby? Do you think it will become a viable platform for iOS development?
Matt Aimonetti: MobiRuby is being developed on top of mruby, the new Ruby implementation written by Matz that's targeting embedded device and offering an alternate for Lua and to some extent JavaScript. I'm quite excited about mruby and its potential and I wrote about both mruby and MobiRuby a couple days ago. Basically, from my view point MobiRuby is an interesting project but it will have to overcome some serious challenges described in details in my blog post. My hope is that thanks to the Ruby language, MobiRuby will be able to transcend Cocoa/Android API to offer an easier, simpler API making mobile development more fun and more easily accessible.
This is quite a big challenge, but I do believe this is something that can be done and that might change the way mobile development is done.
I hope you found this article useful. What are your thoughts? Feel free to ask questions and do give your opinion in the comments section of this post. Matt would only be too happy to reply. Thanks!
- Thanks to Michael Kohl, Samnang Chhun and Victor Goff. ↩