Monday, March 09, 2009

Author Interview: Jeremy McAnallay - Ruby In Practice

With the recent release of Ruby in Practice, I've contacted both Assaf Arkin (@assaf) and Jeremy McAnally (@jm) to do some interviews about their book. These will be posted on my best posts about the best books page.

I posted Assaf's Interview last week. Here's what Jeremy had to say.


This book has been a long time coming, how does it feel to see it finally hitting the book shelves?

Jeremy I don't think I can explain the feeling. I imagine it's similar to having a child, except mine is made of paper. So...awkward.

If you had a chance to start it today, what are the big things you'd want to address?

Jeremy I'd definitely want to look a little more at JRuby. It's risen up to be a serious force in enterprise development. But then again, it's a bit of a different beast, so perhaps it's left better to its own books.

What would you drop?

Jeremy I don't know that I'd drop anything. I feel like we've covered a lot of good ground, but if I could drop anything, it would probably be the Rails chapter. It's a good chapter with some good techniques, but there's no saying it won't be out of date by the time it hits the shelves.

What's the most exciting thing happening in Ruby and it's community today?

Jeremy Man, I'll say it again: Adhearsion. I don't think a lot of people have given it a serious look yet, but once you do, you'll see how awesome it is. I'd also say Rhodes could be a really cool thing (but I haven't had a chance to use it yet so I won't declare it awesome just yet :)).

What's next for you?

Jeremy I'm going to keep writing. My next project will be updating the Humble Little Ruby Book for 1.9 to be published on No Starch. I'm also writing some commercial software, more open source, and who knows what else?

Other than the fact that you're both great guys, why should Rubyists run out and shell out their hard earned money for this book?

Jeremy There has been a big knowledge gap for people who aren't in "Ruby jobs." They learn the language, they get excited, they dig what they're seeing, but they reach a point where they feel helpless. They don't really know what they can do with Ruby, how to do it, or if they figure it out, if they're doing it right. I think Ruby in Practice is a really solid collection of information that solves that problem, and I'm really happy to fill that gap.

Click here to Tweet this article

Friday, March 06, 2009

Author Interview: Assaf Arkin - Ruby In Practice

With the recent release of Ruby in Practice, I've contacted both Assaf Arkin (@assaf) and Jeremy Macanally (@jm) to do some interviews about their book. These will be posted on my best posts about the best books page.

Assaf got his answers back to me first, and I liked them so much I decided to post them as a stand alone interview. Look for Jeremy's responses soon. Until then, enjoy Assaf's!


This book has been a long time coming, how does it feel to see it finally hitting the book shelves?

Assaf Like sitting down for a cup of water after a long run.

If you had a chance to start it today, what are the big things you'd want to address?

Assaf Talk more about BDD. I liked RSpec since I first started using it, but the latest releases are such a leap in making specs easier to write and maintain. That and Cucumber which I'm now getting into. It works at a higher level, describing scenarios or features, and it means that you can drive tests directly from the design, and have that design be part of the source code, not in a separate unmaintained file.

Background processing is something I missed when I first got into Ruby. With Java I had more options for queuing, scheduling and batching. That changed and now when I'm evaluating for a new project I'm working on and there are a lot of good options to choose from. That would make great material for a chapter in the book.

Ruby recently got a serious kick in the XML pants. First libxml came back from the dead with renewed force, then nokogiri showing up from nowhere, hpricot made huge strides. I know people who look at Ruby before, looked at REXML, and decided to go elsewhere. It's time to reconsider Ruby.

I really like where ActiveRecord is going, and I'm always very cautious around ORM because of their tendency to turn relational databases into dumb object stores. I'm using relational databases because they're relational, and I'd rather see the language take on some of these relational aspects. I think Ruby can do interesting things because it's not so OO dogmatic and much more malleable. I use ActiveRecord outside Rails a lot, and that shows in the book, where we just use ActiveRecord when we need to use a database in a context other than the database chapter. I think a chapter about advance ActiveRecord techniques would be great.

Not entirely related to Ruby, but I think this will interest a lot of people: the development workflow. We talk about specs and testing and how to use these as starting point to build and refactor code. Git hit the soft spot with Ruby developer, and there are some practices worth talking about. Also the different tools you would use to take code from development through testing, staging and finally production deployment.

Phusion Passenger. We had to wrap up the book before we could cover it.

What would you drop?

Assaf Tough. We tried to cover things that other books don't talk about, so I'll have to take a look at books that just come out before I can answer that, but if there's a good book on the subject, I would drop that subject.

Except for testing/BDD. The RSpec book is coming out soon and I would recommend it, but I would still have a chapter devoted to testing. I think testing should be talked about more often, and take every opportunity to introduce people to BDD as a better way to design and build your application.

What's the most exciting thing happening in Ruby and it's community today?

Assaf For me, Rails 2.3, which is coming out soon. For the apps I'm working on, 2.3 is a major step forward in smoothing out the rough bumps of previous releases. I'm continually amazed by the things that are happening around Rails. By intentionally not solving all the world's problems, it's leading to an amazing eco-systems of adds and plugins. My latest favorite is Scrooge which inspects your queries and what you do with the results, builds a profile out of that and uses it to optimize your code.

Testing. Manual testing sucks the life out of me, so do bad test frameworks. I love what you can do with Ruby, and even the prospect of using Ruby code to test Java applications. I mentioned RSpec and Cucumber, there's also Should and Webrat, and just a lot of continuous improvement that keep making my life easier.

Ruby 1.9. Faster, better, but not entirely backwards compatible, so that's still work in progress waiting for all the libraries to catch up.

Github. It's a fabulous service that puts all others to shame. It's a social network built around sharing code, and a great tool when working in teams, open source or not. It's also an amazing resource. Sourceforge and even more modern services like Google Code force you to make multiple mouse clicks before you can see the first line of code. Github puts it right there in front of you on the welcome page. It's telling you "come, look at the code, learn from the knowledge of others".

What's next for you?

Assaf Two projects I'm currently involved with which are taking Ruby in interesting directions.

The first is Singleshot, it's a task manager, of if you prefer the workflow term, a worklist manager. It gives you a task list that you can manage, allows you to delegate, and also allows various applications to delegate tasks to you. It's classical enterprise technology and we're trying to make something that has usability at its forefront. That and being a test case for a Web API that takes hypermedia seriously.

The other one is Buildr, a build system that we're using for large applications that have a build cycle. So yes, we're using Ruby code to build applications written mostly in languages like Java, Scala and Flex. Ruby is ideal here because you can use it declaratively, at the level of defining what a project is, but also do grunt work like moving files around or calling command line tools. It's the first project that's strictly Ruby going on at Apache.

Other than the fact that you're both great guys, why should Rubyists run out and shell out their hard earned money for this book?

Assaf Because they're lazy. I know a lot of people who come to Ruby with a strong background in Java and the mentality that you need big APIs, big frameworks, dependency injection, XML configuration, scalable failover containers, and a thousand lines of code later you managed to read a list of names from a file and sort them alphabetically.

Complexity kills, so one thing I tried to show in the book is how you can size the complexity of the solution to the complexity of the problem. Maybe, instead of setting up an ESB with connectors on each side an pipeline in the middle, you can write a few lines of Ruby script, get the same job done in 1/10th the time. Even when, and this is one of my favorite examples, the job requires moving XML messages from WebSphere MQ to Salesforce. Ruby will get you there faster and cheaper than big architecture tooling.

Click here to Tweet this article

Thursday, March 05, 2009

What Should On Ruby Be Doing In 2009

I'm trying to decide where to focus my 'On Ruby' energy over the next year. While I have some ideas, I'd like to know what you think. Please lend a hand by filling out the survey below.

Ruby Book Posts Collection

I've written a number of reviews and author/editor interviews about Ruby books over the years. Since it can be hard to find them, or to sort out the really good stuff, I thought it would be good to pull them all together into a single place. This should to find the best stuff about the best books. I'm hoping it will make it easy for me to keep this page up to date as well.

Ruby Best Practices:

Practical Ruby Projects:

Troubleshooting Ruby Processes:

Ruby Refactoring Workbook:

Data Visualization With Ruby:

Ruby In Practice:

Design Patterns In Ruby:

I'm sure I missed some, what other posts do you think belong here? What other Ruby books should I be looking at? I'll be keeping an eye on the comments, and will come up with a fun way to reward contributors.

Click here to Tweet this article

Tuesday, March 03, 2009

MWRC 2009 Mini-Interview: Philippe Hanrigou

This will be the last mini-interview before MWRC 2009. Philippe Hanrigou (@ph7) has been kind enough to answer a few questions on the topic of his presentation — "What The Ruby Craftsman Can Learn From The Smalltalk Master". Read on to get a taste of what Philippe will be covering in just ten more days. Oh, and if you haven't registered yet, there are just 4 more days and about 40 more seats. Don't wait any longer, go register now!


Your talk at last year's MWRC was pretty incredible. How are you going to top it this year?

Philippe Well, first thank you. Every presentation is a new experience, and I believe people will end up quite excited about this one since

  • The subject should appeal to a wider audience — it touches the core of our craft: software design.
  • I am standing on the shoulders on giants. In my mind Kent Beck is one of the software grand masters with the most comprehensive, genuine, and inspiring understanding of the software craft. So simply relaying some of his wisdom as it applies to Ruby should be quite incredible in its own way already.

Rubyists seem to spend a lot of time looking up to the Smalltalk masters, why?

Philippe Smalltalkers were writing Object-Oriented software in a dynamic, interpreted duck typed language 20 years ago. It would be amazing if there wasn't something to learn.

It is also quite notable that the Smalltalk community has been incredibly talented, innovative and creative in pushing the software craft to the next level. Most of the best techniques we use today to develop software are rooted in the Smalltalk community: test-driven development, refactoring, design patterns, core object-oriented principles, pair-programming, emphasis on short an efficient feedback cycles, ... just to name a few! So any sensible software developer would look up to the Smalltalk community, whatever programming language or platform he/she is using.

I actually believe that we do not learn enough from the experience, errors and innovations of the programmer generations and communities that preceded ours — even the Ruby community, which is better than most in this regard. Unfortunately the "Not Invented Here" syndrome, does not just apply to our code, it also applies to ours practices. We have a tendency to "rediscover" the same errors and bad practices over an over again. Rails' original take at testing and test data management is a good example in this regard. So looking up to the best software masters is a great and healthy thing!

What other language's practitioners should we be learning from?

Philippe We can learn from countless people, fields and languages. For instance, there is a lot to learn from the LISP community, especially in terms of elegance, meta-programming and its unsurpassed emphasis on "programmable programming language".

Nevertheless, programming is before all, an exercise in communication, creativity and human interaction. So some of the most interesting things to discover are probably to be learned from communities that do not write any software at all: either from communities facing similar challenges (artists, designers) or from communities that have been studying these topics from a different angle (ethnologists, sociologists, historians). Brian Marick gave a wonderful piece of advice on how we could approach this learning experience in one of his recent blog entries:

"It seems to me that I’m not so much someone who’s come up with any great new ideas as someone who’s good at looking at the familiar from an odd perspective. I get that odd perspective from reading odd things, such as sociology of science or literary theory, and asking “Suppose this point of view were true: what would it mean for building software?"

Sometimes, it seems like our interest isn't reciprocated. What can rubyists teach smalltalkers?

Philippe The sad part about Smalltalk is that its most prominent leaders have been programming in Java for the last ten years. The main thing we can teach smalltalkers is a message of hope. Dynamic languages are coming back in the front scene and this will benefit all of us! Thanks to Ruby marketing and promotion, dynamic languages are now perceived as as a competitive advantage not only by programmers, but also by CEOs! Ruby has an impactful story that extends beyond its technical merits and also appeals to decision makers — In great part due to David Heinemeier Hansson's marketing genius and his emphasis on the productivity message, which makes sense to business people too.

I believe smalltalkers could also benefit by keeping an open mind and using Ruby as a way to challenge some aspects of Smalltalk design that they love so much, like radical language symmetry.

New programming languages or platforms have almost no features that, in isolation, are really new. It is a lot more about picking the right set of features and mixing the right blend. This is an art in which Matz is especially talented, and which gives Ruby a feel that appeals to a much broader audience:

Some may say Ruby is a bad rip-off of Lisp or Smalltalk, and I admit that. But it is nicer to ordinary people.

Consequently Ruby and Smalltalk have very different tradeoffs in terms of naturalness versus symmetry, or in terms of beauty versus expressiveness.

To be honest, I do not expect smalltakers to let go of their radical commitment to minimalism and symmetry: it is too much core to their culture and one man's expressive code is another man's nightmare. Nevertheless, there is something to be learned from a different set of tradeoffs and Matz's pragmatic approach to language design. I personally find Ruby even more expressive than Smalltalk, a characteristic I directly attribute to Ruby's decreased emphasis on keeping everything "pure" and symmetrical, as well as reaching a better tension point between functional and object-oriented programming.

What do you think makes MWRC a good place for Rubyists to gather?

Philippe Last year was my first time attending MountainWest RubyConf and I was blown away by the high quality of talks and corridor chats, the organizers' kindness, the flawless program execution, and even more importantly, the conference's strong and engaging human dimension.

So if you are into expanding your mind and knowledge, meeting great people, or passionate debates on Ruby and software, MountainWest RubyConf will blow you mind. Huge kudos to all the MountainWest organizers for making it happen!


Related Posts

Click here to Tweet this article