Comment
Comment by matltc
If you found this interesting, and especially if you write Ruby, I cannot recommend Metaprogramming Ruby highly enough. Fundamentally changed the way I think about programming, and opened my mind to what is possible when one frees themselves from dogmatic, generic best practices. It covers these topics in great detail, and uses examples from ActiveRecord and many other gems' implementations of them.