Escape the ‘RM’ in ORM using MongoDB

Last week we hit the customary ORM wall when we had to model a Many-To-Many relationship in our domain model. Even with Castle ActiveRecord we were still being forced to create either association table on the database schema, or an equivalent class to leverage ActiveRecord’s automatic schema creation. Added on top the need to manage SQL Server instances, we decided to take a fresh look at storage options that will allow us to continue coding with minimal friction on persistance.

Getting a cue from a former colleague at ThoughtWork, I started looking into the NoSQL movement. MongoDB seems to be getting a fair amount of press recently so I decided to try it out. Using NoRM as the .Net driver for MongoDB, I was able to covert our (still very small) codebase from using ActiveRecord to MongoDB in about 2 hours.

The process was made easier by our use of Repository pattern so most of the changes are concentrated in all the repositories methods (CRUD and queries). One potential side benefit is that because MongoDB is so fast, it is now possible to test data queries along side regular unit tests with minimal cost in time. This is generally not possible with RDBMS data storage.

* One of the useful tip I’ve come across is how to run MongoDB as Windows service.

First in 10 years

Ever since I moved to New York City back in 2001, I never have the need to own a car like I used to in the UK because of the great and inexpensive public transport here. But because of the new job that I’ve just taken which is located just outside New York City, near White Plain, my commute time would be around an hour and forty minutes each way via three separate trains.

The solution to spending over three hours commuting each day is to own a car for the first time in 10 years! Granted it would cost more to maintain the car (payment, parking, gas, toll, etc.) but instead of three hours my commute time by car is now halved! As they say, time is money, and in this case I feel it is worth it.

So from the last car:

To the latest:

Cost of a traveling consultant

With the benefit of an expense account for food, and free Starbucks coffees delivered to our pairing station desk, here is the result during my last project down in Atlanta:

Photography gears for 2010

It’s only been 10 hours into 2010 and I’m already planning my photography purchases for the year. Here are my list thus far:

  • Kata E-702 Camera Raincover – I wish I had this last couple of weeks during the snow days so I could be out taking photos even in the middle of a snow storm.
  • Pelican Case 1510 & Lid Organizer 1519 – I have accumulated enough photography gears (2 bodies with battery grip, 5 lenses, 2 flash lights, 4 filters, 8 CF cards, etc.) to the point where camera bags are not the best way of storing them. This case will be perfect for storage and the carry-on luggage size means I can take all my gears on vacation if I need to without having to check-in.
  • Pelican Compact Flash memory card case – Having all my CF cards (well 4 of them at least) organized in a single box is infinitely better than trying to find them among all the bag pockets.
  • Brno White Balance lens cap – For the situation where mixed lighting will really play hell with the auto white balance on the camera.
  • Apple Aperture – I feel that finally I’ve grown beyond iPhoto capability, especially with my recent interest in HDR. Right now I’m hoping Apple will update Aperture in 2010, otherwise I’d pick Lightroom instead.

7 days review of Kindle DX

A few weeks ago the stupid side of me left the Kindle 2 in the seat pocket on the flight back from Atlanta to LaGuardia. Leah bought me the Kindle DX as a birthday/X’mas present to replace the Kindle 2. After using the DX for 7 days, here is what I’ve found so far.

Good:

  • Larger e-ink screen, longer reading between page flip
  • PDF reading — printing web pages into PDF allows me to read longer articles on web sites while working out in the gym.
  • Auto rotation — allowing to operate the Next/Prev Page buttons with either hand
  • Not as large as it looks in pictures
  • Amazon case for DX with magnetic clasp
  • Keyboard feels better to type on — pill-shape, raise keys are so much nicer than the round keys on the Kindle 2

Bad:

  • Larger and heavier — still manageable with backpack but not coat pocket-able.
  • Not as many choices in cases

And the Ugly:

  • Doesn’t come with case, despite increased probabilities of damaging the huge e-ink screen

Website Built with WordPress.com.

Up ↑