Virtual Surreality

It's too real to be true

Browsing Posts tagged rails

“This spec is something more than devs, I tell you. It’s the monster. Devs made it, but they can’t control it.” – with apologies to Steinbeck Ahh, factory-forged random values for fields of unique constraint. How thee vex me with thine probabilistic usefulness and definite indeterminacy. Keep thyselves with ephemeral values of algorithmic parameters and [...]

A little “remember me later” for conditionally deploying a Rails 3 app running on Ruby 1.9 on Heroku. $ruby_version = `ruby –version`.split[1].to_f source :rubygems source ‘http://gems.github.com’ gem ‘rails’, ‘~> 3.0.0′ gem ‘bson_ext’ gem ‘decent_exposure’ gem ‘haml’ gem ‘mongoid’ group :development, :test do if $ruby_version < 1.9 gem ‘ruby-debug’ else gem ‘ruby-debug-base19′, “0.11.24″ gem ‘ruby-debug19′, “0.11.6″ [...]

Object/Relational Mappings (ORM’s) are in the wrong place in the architecture.

An application should have minimal impedance mismatch with the persistence of its own data. External or ancillary systems should bear the cost of mapping between paradigms. If you want to access application data in a relational way for reports, do the mapping for the report.

Squealer is a simple, declarative language where the mapping from the tree structure of MongoDB to the tuple space in mySQL can be scripted.