Little Known Ways to Ruby Mastery by Peter Cooper
16/Dec 2008
A weekly series from the Ruby Masters
Welcome to the next installment of the weekly interview series on the RL blog – “Path to Ruby Mastery” – by top trainers and developers in the Ruby community, from across the globe. The interview series will provide insight and commentary from these notable Ruby trainers and developers, with the goal of facilitating and providing answers to the questions Ruby beginners face. We welcome your suggestions for interviewees and questions. Look for a new post every Tuesday!
This week, we’re happy to have Peter Cooper from UK.
Satish Talim>> Welcome, Peter and thanks for taking out time to share your thoughts. For the benefit of the readers, could you tell us something about your self?
Peter>> I’m Peter Cooper – perhaps best known as the editor of Ruby Inside, the most popular Ruby and Rails news blog. I’m also author of Beginning Ruby, published by Apress, a book for novice Ruby developers. I’m 27, live in the north of England, and am married (sorry ladies!)
Willian Molinari, Brazil>> How should one go about learning the Ruby language? What material (books, eBooks, online tutorials etc.) would you recommend?
Peter>> I hate to show bias, but I would be a fool not to recommend my own book, Beginning Ruby. I admit I was quite hesitant to do so when I released it, but it now has 21 5-star reviews on Amazon.com, so it must be doing something right! I would also recommend “The Ruby Way” by Hal Fulton for those who are somewhat familiar with Ruby on the surface but want to learn more. Third, “The Ruby Programming Language” by David Flanagan and Matz himself is a great reference book.
In terms of online learning, RubyLearning is, of course, a great resource! Satish runs some great free courses that you should sign up for right away (well, when they’re active anyway!)
Keith Brady, Australia>> What are the pros and cons of Ruby that are beingdiscussed in the development community and what is your opinion on that?
Peter>> I’ve been conducting a long-term poll on Ruby Inside into what people consider the biggest concern with Ruby and “performance” is way out in the lead. Ruby’s performance deficiencies (when compared to, say, Perl, Python, or Java) are well publicized and understood, and while performance is rarely of importance in the sort of applications Ruby developers produce, it’s a hard deficiency to ignore. Ruby 1.9 doesn’t provide an order of magnitude of performance increases, but it’s a step in the right direction, and the work that the JRuby and Rubinius teams are doing on performance should, at least, help with the complaints in the near future.
Dennis Theisen, Germany>> Could you name three features of Ruby that you like the most, as compared to other languages? Why?
Peter>> I find Ruby to be an extremely consistent language. Once you know the syntax, it’s not too hard to guess how to achieve certain things, even if the way you discover isn’t particularly the best way. There’s more than one way to do almost everything, and that’s a good thing (though Python developers would argue otherwise!) I also like the community – it’s very proactive and progressive in using new media, including social media, blogging, podcasting, etc, and this helps keep the language vibrant. Third, I love that Ruby doesn’t lock you in to a certain programming paradigm. You can totally ignore object orientation if you want. You can do things in a functional way, an imperative way – you can mock the ways other languages work quite easily if and when you want to.
p>Willian Molinari, Brazil>> What has been your biggest challenge while working with Ruby?
Peter>> Constantly moving goalposts. Source control, for example. Early on CVS was still popular, then it was Subversion, now it’s Git – who knows what next? The Rails API went through a good couple of years where a significant new development or change was raised every month or two. Ruby as a language is a lot slower to move, but new principles and “patterns” are coming along all the time. Be prepared to always be learning when you’re developing with Ruby!
Jerry Anning, USA>> What best practices are most important for a new Ruby programmer to learn and understand?
Peter>> As I said before, the goalposts are constantly moving, so while it’s not a specific Ruby practice, make sure you’re always flexible, always reading, and keeping up with what’s going on. A lot of developments won’t apply to you, but there are so many new ways of thinking about Ruby coming along that it pays to keep attention. For example, prolific Rubyist WhyTheLuckyStiff has just proposed an alternative to using instance_eval.
Other than flexibility, it seems to be very important to Rubyists to be familiar with source control, test driven development, and agile development practices. I’ve never seen a community of developers stand behind principles like test driven development so much as in the Ruby and Rails communities. A recent survey by Hampton Catlin shows that 85% of the 1200 Rubyists surveyed use test driven development “often” or more. I’m personally not a giant fan, but if you want to keep up with the Joneses, get involved.
Jerry Anning, USA>> Can you recommend things to study after learning Core Ruby, including different frameworks, gems and external libraries?
Peter>> Once you’ve learned the basics, I think that taking a look through the more obscure and powerful areas of Ruby is essential. Get a book like The Ruby Way by Hal Fulton (or even The Rails Way by Obie Fernandez if your focus is more on Rails) and learn about metaprogramming, how Ruby’s object orientation model works, and so forth. You might not use half of the knowledge you gain, but it’ll make you a more savvy Ruby developer.
Secondly, become familiar with what libraries are available, what use cases they cover, and how to get hold of them. RubyFlow, a community driven Ruby news site, is a good way to keep up with library releases and the like, as is the RubyForge front page. Google is great at keeping track too, so if you want a Ruby library that can generate graphs, for example, just Google for “ruby graphs” and you’ll find something. I am constantly surprised by the number and quality of Ruby libraries out there. There’s almost something for everything.
Satish Talim>> Most beginners in Ruby, would like to contribute their time, skills and expertise to a project but invariably are unaware of where and how to do so. Could you suggest some?
Peter>> At the minimum, beginners can trawl the Ruby blogs looking for things they find interesting and leave comments encouraging the author. Just getting support can make a big difference to some developers. Beyond that, beginners can help the Ruby cause by blogging about their own progress with the language. The more people who blog about Ruby the better! Start to develop libraries that you see a need for and share them with others. Once you know how to produce a library by yourself, you’ll be in a better position to get involved with helping others with theirs.
Keith Brady, Australia>> What types of applications are currently being developed in Ruby and what changes do you foresee over the next year or two?
Peter>> Generally speaking, the same sorts of applications are being developed in Ruby right now as in most other programming languages. Ruby is just one solution amongst many, after all, and while it has garnered a reputation for being particularly good for rapid Web application development, people are doing much the same with Django and Python, CakePHP and PHP, and Microsoft’s alternatives right now.
One change that could occur could be the increasing use of JRuby – especially to develop and deploy specialized applications for enterprise clients. With the perceived risk of third-party cloud computing and hosting, many companies are keen to have applications hosted internally, which often restricts developers to using a Java stack. JRuby makes it reasonably trivial to deploy a Ruby / Rails application within a Java shop, and I suspect customized app development for enterprises will become a big deal soon once the passion for consumer-focused Web apps wears off.
Victor Goff, USA>> How do you see the market for Ruby Programmers in the work place, and do you see it as primarily tied to Rails and Web related work? Do you see trends in administration or other work? What’s the future for Ruby?
Peter>> It’s very up and down. The economic crisis is not going to help in this regard, but the Ruby and Rails scenes have seen a hiring blitz over the past year or so. Most of the jobs are in the United States, however, and primarily focused around San Francisco and New York. Given these cities reputations for progressive technology companies, it’s not a big surprise. Most vacancies I’m familiar with are for Rails developers rather than Ruby developers per-se, although strong experience with Ruby is becoming more important.
While the offline job market is quite location specific, there are quite a few opportunities to work remotely / online in a freelance capacity. There are still a lot of people looking to have Web applications developed quickly and at a decent rate.
Michael Uplawski, Germany>> According to you, what is a comfortable size of a Ruby/Rails-project? Why?
Peter>> It depends on the development methodology, team size, and testing strategy (if any). Even a 1000 line project could become a management nightmare given the wrong team of developers, a lack of source control, and a poor development strategy. Likewise, a 100,000 line project could flow very smoothly with the right practices in place. It’s a case of the old 5 P’s: “Proper Planning Prevents Poor Performance!”
Michael Uplawski, Germany>> Having spent some years in the I.T. industry and coming to Ruby from a different background, how do I recognize Ruby’s limitations so as to suggest a different language in such cases?
Peter>> That’s as much a gut decision as an informed one. Once you’ve been using Ruby for a while you quickly become familiar with its strengths and shortcomings. That said, there are always people ready to push the barriers. No-one would have seriously considered writing a compiler in Ruby several years ago, but now a few people are doing just that. Added to this is that Ruby’s limitations are changing (though slowly). While lack of performance is a big deal in many scenarios with Ruby 1.8, Ruby 1.9 presents slightly less of a problem on that front.
Dennis Theisen, Germany>> Do you think Ruby is ready to be used in “Enterprise applications”? Kindly justify your answer.
Peter>> Ruby is already used in “enterprise” applications. “Enterprise” has a rather vague and almost meaningless definition, although some developers still believe that it refers to a specific genre of software. Ruby is already used within companies and settings within those companies that would generally be called “enterprise” such as Oracle’s use of Ruby in one of their community sites. JRuby (the Java implementation of Ruby) has helped a lot in this regard, as JRuby allows Ruby (and therefore Rails) applications to run on the regular Java stacks that enterprises are familiar with.
Satish Talim>> What can / should job candidates (for Ruby) do to distinguish themselves from their competition?
Note: The candidate has done his/her homework on the company that they are interviewing with. The candidate understands what they’re looking for, and the candidate is prepared to show them that he/she fits the bill, based on the candidate’s skills and experience. What else can the candidate do, to set themselves apart from other equally well-qualified and well-prepared candidates?
Peter>> Bring ancillary skills to the table. If you have an understanding of a particular industry, certain business processes, complementary technologies, financial experience, or similar, you can get a big advantage when applying for certain jobs. There’s always room for “pure” programmers, but in my experience the companies hiring Ruby developers are looking for more rounded applicants who have a wider range of experience. Perhaps the most significant ancillary skill is a good command of English (or whatever the local spoken language is). You need to be able to document your code, your tests, and communicate with other developers – so spoken and written language skills are paramount.
Satish Talim>> Do you have any other suggestions for these participants (would-be Ruby developers)?
Peter>> Experiment and when you hit problems, don’t immediately panic or seek help. Track down line by line what’s going on, keep an eye on variables (even using lots of “puts” statements if you need to!) and figure out exactly where things are going wrong. Every problem you solve on your own helps cement your knowledge and helps develop your problem solving skills further.
Satish Talim>> Thanks Peter for sharing your views with the RubyLearning participants.
On 23rd Dec. we talk to Yehuda Katz from USA.
Disclaimer:
The opinions expressed are those of Peter Cooper and do not necessarily reflect those of www.RubyLearning.com.
The Path to Ruby Mastery Series (So Far):
- #1: Jamie van Dyke
- #2: James Edward Gray II
- #3: Dr Nic Williams
- #4: Stuart Halloway
- #5: Jay Fields
- #6: Chris O’Sullivan
- #7: Guy Naor
- #8: Jonathan Conway
- #9: Ian Dees
- #10: Bruce Tate
- #11: Ezra Zygmuntowicz
- #12: Chris Matthieu
Technorati Tags: Interviews, Little Known Ways to Ruby Mastery, Ruby, Ruby Beginners’ Questions, Peter Cooper, The Ruby Programming Language