Kurt Stephens

Nerd Up!

The only way to implement the future is to avoid having to predict it. -- Piumarta
Fighting entropy one day at a time...

Ruby on Rails Caching

Kurt on Sun, 2007-10-07 02:38.

Links about Caching in Rails.

  • “Expanded Caching Scope” – http://ryandaigle.com/articles/2007/2/21/what-s-new-in-edge-rails-expanded-caching-scope

rcov : BUG : rcov 0.8.0.2 does not return target script exit code, PATCH INCLUDED!

Kurt on Fri, 2007-10-05 23:37.

Here is a patch to rcov 0.8.0.2 to rethrow any exception generated by the scripts to be traced, after report generation (most importantly SystemExit). This allows the exit code from test runners (like spec) to be used under rake.


Star Wars Holiday Special?

Kurt on Fri, 2007-09-07 04:51.

Huh?

http://youtube.com/watch?v=asnVcbWQ2cg

Wow. I think I vaguely remember this. Wish I hadn’t.


UML 1.5 References

Kurt on Fri, 2007-09-07 03:31.

Cheap Advice for Ruby

Kurt on Fri, 2007-09-07 01:22.

Advice is a programming construct from the Lisp world that pre-dates aspect-oriented and object-oriented programming. Advice is code that is placed before, after or around an existing function’s body. Examples of advice can be seen in Emacs: in Emacs Lisp, the advice is specified with macro syntax that expands to lambdas.

Wrote this (err… something similar at work :) in Ruby just before I found http://aquarium.rubyforge.org. The advice bodies are bound as methods using Class#define_method with a Proc; the advice has access to privates.

It provides simple :before, :after and :around advice objects that can be applied to and removed from multiple instance methods on multiple classes. It’s not AOP because there are no point-cuts patterns, but it is a bit more object-oriented than a typical Lisp advice macro.

See Aquarium for more industrial-strength AOP-style programming.


Ruby AOP with Aquarium

Kurt on Fri, 2007-09-07 00:07.

Cool new Ruby gem Aquarium – AOP framework for Ruby:

http://aquarium.rubyforge.org

Discussion of AOP, Rails and GOF design patterns:

http://cfis.savagexi.com/articles/2007/09/05/rails-unusual-architecture

Not really AOP or Decorator because it occurs at the M1 (class, module) and not the M0 (object) meta-modeling layer.


Primary links

Syndicate

Syndicate content

Browse archives

« September 2010  
Mo Tu We Th Fr Sa Su
    1 2 3 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30