Technical Adjustable Rate Mortgages
2011 August 04
The latest episode of the Ruby Rogues Podcast on Technical Debt was a great conversation about how we purposely or inadvertently accrue Technical Debt. One example in my personal process, is embedded CSS and/or Javascript (I know). In the interest of time, I will slop some styles or even Javascript on the bottom of the page to get a feature working, and move on the the next item on my list. Here is the debt incurred: At some point before launch I will have to refractor the Javascripts and organize my CSS into and external sheet, but until I do that I have a debt to be paid in development time. This is a trivial example, and not the best habit to have, but it helps me get to a working prototype more quickly, and compared to other technical debts, it's more like borrowing five bucks from a co-worker for lunch.
A larger technical debt that the panelists on the podcast touched on was gem dependencies in Ruby and especially Rails applications. The debt metaphor, in my opinion, slightly missed the mark. I've worked on applications as an agency developer, and as a freelancer which had a very profound dependence on third party gems and plugins. During development this is a great resource. Instead of laboriously writing mundane code to help you fulfill one business rule or another, you simply add a line to your environment.rb file.
Initially, the debt incurred is small, and the return is high. But there comes a point when the "environment" changes. In the financial world, this was in 2008. In the Rails world this was the Summer of 2010. The release of Rails 3 was rushed in with the new emphasis on Ruby 1.9 (And please, don't get me wrong, this is a fantastic step forward in the Ruby on Rails ecosystem). Upgrading your app to Rails 3 and especially Ruby 1.9 would require all of your dependencies to do the same, and immediately not everyone was on board. If you were depending on a gem that had stopped being maintained, then BAM! The interest rate on your debt just went from a comfortable 2.25% to 18%. A Technical ARM.
So when your app, is in the double-digits of gem dependencies, or is heavily relying on gems that have not made it out of 0.X release, you're playing with fire. Consider writing the code yourself instead of adding yet another dependency.