In my new work developing some solutions that will either enhance BP-3’s consulting offerings, or perhaps become some new products, I’ve been experimenting with Ruby on Rails.
Over the last few days I was struggling with attempting to model a many-to-many relationship in the ActiveRecord construct. No matter what I did, I didn’t seem to be able to construct the relationship I really wanted. The results were always somehow cross-ways to the relationship I wanted.
I was finally able to break through my problem by basically breaking the code even worse than it was when I was getting incorrect results. When I was getting the incorrect results I couldn’t really determine what the underlying system was doing. It was “working” just working wrong. I finally changed the configuration to one that I knew was fundamentally broken. This resulted in the Rails spitting out a SQL statement that allowed me to understand the complexity it was hiding from me. From there it was a short set of work to get everything configured correctly.
What is interesting to me here is that it seems that sometimes, in order to actually fix something that is working incorrectly you may need to fully break it so that you have the opportunity to create the correct fix.