My Ruby and Rails Journey – Part 1

DISCLAIMER –  I want to clarify the title that I will be using for this series of posts.  I know what Ruby on Rails is, but I am taking a different approach.  I am learning Ruby, the language, while also working with Rails, the framework.  So I am digging through the famous Pickaxe book to learn about the language of Ruby and I am also working through Rails3 in Action. This is the story of my journey.

Most of my “career” as a developer has been focused on the frontend (e.g. JavaScript, CSS, HTML, ActionScript and Flex).  But I have also been working with many different backend technologies (e.g. Coldfusion, PHP, Java, Groovy/Grails).  The reason I am always looking at backend technologies is to improve my efficiency in proving out frontend solutions.  After all, a UI with no backend is about as useful as a Powerpoint or Photoshop file, which makes it hard to drive technical change with decision makers.  Trust me, if you are a frontend developer or designer, and all you ever do is create pictures and never implement; no one will care about your technical opinion.  You will fail.  Time to get on with the post..

I can sit here and write to you about the “beauty” of the Ruby language, but there are many posts across the web that already do just that to the nth degree.  What I am intrigued by is the “culture” surrounding the Ruby and Rails ecosystem.  Everything, and I mean EVERYTHING, seems to be based on an agile culture that is surrounded by testing.

When I write “testing” I am not referring to unit tests, but rather test driven development, behavior driven development, 100% coverage; not 85% coverage.  The mind set is, if you are going to use this technology you better be prepared to commit your soul to testing.  While this may sound extreme it is rapidly becoming apparent to me that we should not be merely programmers, but craftsmen!  So far I have found this attitude to be less about the “goodness” of the technology, but the process of developing high quality software.

Ruby is a cool language, in my opinion, but it doesn’t make me want to curse all other languages and use only Ruby.  After all, that would deviate from the overarching theme that I have picked up on in posts, books, examples, and communications with “Rubyists”. There is no “silver bullet,” or a one tool fixes all problems attitude.  (At least from the vibe I am getting from the “true” practitioners)

To tell the truth I wish that the Flex and ActionScript communities stressed testing, specifically TDD and BDD, instead of treating it as a distant afterthought.  I am not singling out the ActionScript community on purpose, as I have noticed this same scenario in a lot of language based communities, just using it as an example.

So far, I have built a few simple Rails based apps and others that are pure Ruby.  I enjoy it because I am constantly reminded of testing.  In this past week I can honestly say that I have not written a single method that I did not need.  No creating a class with a bunch of methods I think I will need, no “let me check if this method works.”  This is not because I am using Ruby.  It is simply because I am learning about TDD and BDD.  Now all I can think about is how to apply these principles to my JavaScript and ActionScript.

To summarize part 1 –  I can simply say that I am becoming very aware of practicing techniques that will make me a craftsman, not a developer/programmer.  Cucumber and RSpec are awesome (testing frameworks), and my goals for  the next week are to continue forcing myself to follow TDD and BDD principles.  But, the bigger goal is to figure out how to apply TDD and BDD to my ActionScript and Flex world.  How can I never write another line of code I might need, and only write what I do need, in any language?  This is a very powerful statement as to the benefits of considering the “approach” versus the technology.

This is what I have learned in my first week of Ruby and Rails development.  Until next time…

Comments are closed.