The Ruby Craftsmen

Posts

  • Array Permutation

    When invoked with a block, yield all permutations of length n of the elements of the array, then return the array itself.

  • Data Transfer Object Pattern

    I have been discovering a new design pattern that leads to well designed interface and loosely coupled test. This design, as with many patterns, is not best in all cases but I found it very helpful on multiple occasions. I find the cases where it works best is when there is a deterministic algorithm.

  • Isolating from Rails with a json Api

    This is a method I have come up with separate from the framework, rails, in making a json api. First why do you want to separate from rails? Rails changes and it deprecates api leaving difficult upgrade path for projects. Isolating from the framework also gives increased speed in testing. Rails takes time to load up and this will slow down the feedback cycle. The other perk is that the framework can swapped out for another with little effort. You may come to the conclusion that you don’t need Rails and move to something like Sinatra, although you most likely won’t.

  • Sandi Metz And Bike Shed Podcast

    At work we are reading a chapter a week of Sandi Metz’s book Practical Object-Oriented Design in Ruby. I am really enjoying it, I had started it a while back and didn’t finish, but even rereading the first parts I am getting a lot more of it than before. There are a few things that I was already doing that probably came from other sources like blog post and Podcasts like ruby rouges. I recently heard a podcast from the folks at Thoughtbot called bike shed, in there first episodee they talk about their experiences of trying to follow Metz’s rules on a real client project as much as possible. I found it interesting to hear where it was hard to do and where they choose to break the rules and why. Also what long term effect of using those rules will have on a project. It’s very worth a listen.

  • Geo-location search with Google maps

    Provides a Google maps search of nearest FFL government data.

subscribe via RSS