Books and Screencasts
Objects on Rails
A developer notebook on applying classic Object-Oriented principles to Ruby on Rails projects.
-
-
Recent Posts
Recent Comments
- newz2000 on The sorry state of video hosting for WordPress blogs
- Jheriko on Underscores are stupid
- Jason Dixon on Underscores are stupid
- Zecc on Underscores are stupid
- Kurt Werle on Underscores are stupid
Archives
- May 2012
- April 2012
- March 2012
- February 2012
- January 2012
- December 2011
- November 2011
- October 2011
- September 2011
- August 2011
- July 2011
- June 2011
- May 2011
- April 2011
- March 2011
- February 2011
- January 2011
- December 2010
- November 2010
- September 2010
- August 2010
- July 2010
- June 2010
- May 2010
- April 2010
- March 2010
- February 2010
- January 2010
- December 2009
- November 2009
- October 2009
- August 2009
- July 2009
- June 2009
- May 2009
- April 2009
- March 2009
- February 2009
- January 2009
- December 2008
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- February 2008
- January 2008
- December 2007
Categories
Meta
Tag Archives: ruby
Thank You, Magic Ruby!
Thanks for all the kind comments on my Exceptional Ruby talk! A few notes for those visiting because of the talk: References, source code, links to further reading, and yes, slides can be found here: Exceptional Ruby Notes. Please review … Continue reading
Posted in Conferences
Tagged conferences, errors, exceptions, failures, magicruby, ruby, talks
2 Comments
The happy developer
The programmer has a fixed amount of time and concentration that he can give every day. He must give a bigger piece of the pie to the bad technologies, simply because they require more. In other words, he ends up spending most … Continue reading
ActiveRecord association extensions and method_missing
The semantics of method calls in Ruby are simple: Call the named method; or If no method exists, call #method_missing() instead. Normally #send() obeys these rules as well. ActiveRecord association proxies mangle #send()‘s semantics, however, violating the POLS and potentially … Continue reading
Posted in Ruby
Tagged active, associations, extensions, method_missing, rails, ruby, send
12 Comments
ActiveRecord Golf
So I was messing around with some scratchpad code today, investigating the use of with_exclusive_scope, and here’s what I had to write to come up with a minimal working ActiveRecord model: require ‘rubygems’ require ‘active_record’ ActiveRecord::Base.establish_connection( :adapter => “sqlite3″, :database … Continue reading
Glass Houses for Ruby
A little something for Giles et. al. who feel that private has no business in the Ruby language… # Privacy? We don’t need no stinkin’ privacy! module TSA def private # NOOP end def protected # NOOP end end class … Continue reading
Daniel Spiewak on Monads
Anyone trying to understand monads will inevitably run into Haskell’s IO monad, and the results are almost always the same: bewilderment, confusion, anger, and ultimately Perl. via Monads Are Not Metaphors – Code Commit. A thoroughly enjoyable read, recommended.
Posted in Uncategorized
Tagged haskell, languages, monads, Perl, programming, ruby, scala
Leave a comment
Object Oriented Programming Comes to Rails
decent_exposure helps you program to an interface, rather than an implementation in your Rails controllers. Sharing state via instance variables in controllers promotes close coupling with views. decent_exposure gives you a declarative manner of exposing an interface to the state … Continue reading
A Rack-like library for HTTP Clients
Faraday is an HTTP client library inspired by Rack. Requests and Responses go through middleware which allow for abstraction and modular code. via Writing modular HTTP client code with Faraday | Adventures In Coding. Strike that off my list of … Continue reading
RVM Proxies for Common Commands? (Solved)
I posted this in IRC earlier but I thought I’d ask a larger audience: (01:39:01 PM) avdi: So here’s my problem (01:39:55 PM) avdi: My emacs is set up to run various Ruby/Rails-related commands within projects, e.g. “rake cucumber”, as … Continue reading
Counters for Partials
Sometimes I like to number rows using a counter when rendering lists of things: <% @products.each_with_index do |product, i| %> <li class=”product_<%= i %>”><%= product.name %></li> <% end %> They are handy for testing, among other things. Of course, if … Continue reading

