The following is an interview with Michael Hartl, author of the popular Rails 3 Tutorial. I want to thank Michael for his time and answers. Be sure to read until the end; as per Monday’s post, I’m doing a Twitter giveaway for this interview, too.
1. How did you go from Theoretical Physics to Ruby Programming?
I have a background in computational physics, and I learned Perl and then Python to avoid the pain of C/C++ as much as possible. (The core simulation code for my work was in C/C++ for speed, but I had lots of scripting needs as well, and using C/C++ for scripting would have been horrible.) That led naturally to experimenting with web programming, and I ended up writing my own half-baked web framework in Python. After Rails came out, I switched to Ruby, and haven’t looked back. (I generally prefer Ruby, but Python is also nice. I’ll remain silent on Perl. :-))
2. There wasn’t a lack of Ruby and Rails books when you started working on the Rails Tutorial. What motivated you to create it?
There were lots of Rails books, but there weren’t any that took the approach I wanted to take, namely, a single substantial sample application with features and pacing carefully chosen for pedagogical purposes. My first book, RailsSpace, filled that niche, but it was out-of-date, and I also perceived an opportunity with the (then-upcoming) release of Rails 3. I figured that a full-length tutorial book aimed at Rails 3 could find a broad audience.
3. What would you say was your biggest challenge in preparing the tutorial?
On a long-term project of this sort, it can be difficult to balance writing with the need to pay the bills. For a while at the beginning, I alternated between doing contract work and writing, and that takes its toll. Not only does contract work take time, but there is a also a big context switch when changing over to writing mode. Doing contract work was necessary given my financial situation at the time, but in the future I expect to be able to focus solely on writing and screencasting.
4. You chose an approach rarely taken by traditional publishers, by producing a free HTML version of the Rails Tutorial, while providing a DRM-free PDF version and supplementary video lessons for a fee. How is the market treating you? Is it an approach that you’d recommend to fellow programmers?
The market response has been great. The free HTML version has attracted lots of referrals and inbound links, which was its main strategic purpose, and it has also generated lots of good karma. Meanwhile, many people are happy to buy the PDF, which is easy to put on an iPad and can be read offline. Readers have also reported that having the PDF gives them a sense of ownership, and they also like knowing that they are supporting the Rails Tutorial project financially.
I have recommended this approach to other programmers (most recently in a talk at the Los Angeles Ruby Conference). Having a free HTML version is a business strategy, not charity, though it does feel good—I’ve gotten email from many readers, especially in poorer countries, thanking me for making the book available for free online.
5. The book is also in print through the excellent Ruby series by Addison-Wesley. Did they reach out to you after the huge success of your online tutorial/video course or was there a plan of world domination all along?
Partnering with a major publisher was part of the initial plan for world domination, but I didn’t think it was strictly necessary. The publisher and I attempted to get a deal in place before I wrote the book, but were unable to come to terms. After I finished the book, we got back in touch and worked out the details of a publication agreement. It’s an unusual arrangement, and I’m thankful to Addison-Wesley for being willing to try it out. Please go out and buy the print edition to reward them for their support of the Ruby community!
6. Do you have any advice for people starting out with Rails (other than reading your book and watching your screencasts, of course)?
Web development is hard, so be prepared for some challenges and occasional frustration. It’s especially good to pick a project you care about; that will help keep you motivated when the going gets tough.
7. If you had a magic wand, what would you change in the Ruby/Rails ecosystem? And how can we make it happen without said magic wand?
I’d make Ruby and Rails installation easier; the barrier to entry in some cases is still forbiddingly high. For example, a while back I spent a couple of hours just getting Ruby to compile after an upgrade to OS X Snow Leopard. (There was a subtle issue related to the location of the readline library headers.) Paradoxically, I think in the early years this may have benefited Rails by insuring that the typical Rails developer was both determined and highly skilled, but the Rails community has matured now to the point where lowering that barrier should be a priority. Happily, Engine Yard has hired the awesome Wayne E. Seguin (best known as the author of Ruby Version Manager, or RVM) to work on exactly this problem. The initial result, the Rails Installer for Windows, looks promising, and I’m excited to see where that project goes from here.
8. What’s next for you?
My O(n) Rails Tutorial workload is minimal right now, which is a good sign, but I have a large O(1) work queue to complete. For example, I’m preparing a free screencast for buyers of the print edition, and I’ve committed to making the HTML book available for translation. Once that work queue cycles down to zero, I’m going to take a little time off, and then I’ll probably start making some more Rails- and Ruby-related products. Interested readers should subscribe to the Rails Tutorial news feed to be notified when future products are available. In addition, anyone who buys the Rails Tutorial PDF/screencast bundle will likely be pleasantly surprised by exclusive coupon codes when the time comes. (Well, they won’t be surprised now, but you get the idea. :-))
Book giveaway: I will randomly draw one person from among those who share (retweet) this interview on Twitter, and personally ship that person a free printed copy of the Rails 3 Tutorial. All you have to do to be entered in this giveaway is to tweet about this post. I will announce the winner on Friday morning on my twitter account (follow me!) and in the comments below.
Get more stuff like this
Subscribe to my mailing list to receive similar updates about programming.
Thank you for subscribing. Please check your email to confirm your subscription.
Something went wrong.
Antonio Cangiano is a Software Development Manager at IBM. He authored Ruby on Rails for Microsoft Developers (Wrox, 2009) and Technical Blogging (The Pragmatic Bookshelf, 2012, 2019). He is also the Marketing Lead for Cognitive Class, an educational initiative which he helped grow from zero to over 1 Million students. You can follow him on Twitter.