ActiveRecord’s Callbacks Ruined My Life

Recently I’ve been having a foul taste in my mouth, or just a bad feeling, if you will. Whenever I started adding validations and callbacks to a model in a Rails application. It just felt wrong. It felt like I’m adding code that shouldn’t be there, that makes everything a lot more complicated, and turns explicit into implicit code. Code that is only being run depending on the persistence state of an object. Code that is being hard to test, because you need to save an object to test parts of your business logic. Don’t get me started on observers, I never was a fan of them. Putting stuff that should be run when an object was saved elsewhere is the worst kind of hiding business logic.

Notes on MongoDB

For an article in a German magazine I’ve been researching MongoDB over the last week or so. While I didn’t need a lot of the information I came across I collected some nicely distilled notes on some of its inner workings. You won’t find information on how to get data out of or into MongoDB. The notes deal with the way MongoDB treats and handles your data, a high-low-level view if you will. I tried to keep them as objective as possible, but I added some commentary below.

NoSQL And You - Thoughts On Finding Right Partner In Chrime

The NoSQL landscape is a fickle thing, new tools popping up every week, broadening a spectrum that’s already close to being ungraspable, especially when you’re totally new to the whole thing. There’s a couple of common misconceptions and wrong-doings that people who’ve been playing with the tools already tend to tell newbies in the landscape.

Redis and Rails sitting on the Couch

I’ve been spending some quality time with two of my new favorite tools lately (CouchDB and Redis, duh!), and while integrating them into Scalarium some needs and as a result some smaller hacks emerged. I don’t want to deprive the world of their joy, so here they are.