You can find me on twitter via @carl_furrow

Getting metric_fu to play with rspec

by Carl on May 14, 2010

I grabbed metric_fu, installed all the required gems, then ran “rake metrics:all” and it would die because it couldn’t find my tests. Turns out you have to take an extra, minor, step to get it to stop ignoring your rspec files.

I found this post, and it gave me this to put in my lib/tasks/metric_fu.task file:

begin
  require 'metric_fu'
  MetricFu::Configuration.run do |config|
        #define which metrics you want to use
        config.metrics  = [:churn, :saikuro, :stats, :flog, :flay, :reek, :roodi, :rcov]
        config.flay     = { :dirs_to_flay => ['app/models', 'spec/models', 'lib']  }
        config.flog     = { :dirs_to_flog => ['app/models', 'spec/models', 'lib']  }
        config.reek     = { :dirs_to_reek => ['app/models', 'spec/models', 'lib']  }
        config.roodi    = { :dirs_to_roodi => ['app/models','spec/models', 'lib']  }
        config.saikuro  = { :output_directory => 'scratch_directory/saikuro',
                            :input_directory => ['app/models', 'spec/models', 'lib'],
                            :cyclo => "",
                            :filter_cyclo => "0",
                            :warn_cyclo => "5",
                            :error_cyclo => "7",
                            :formater => "text"}
        config.churn    = { :start_date => "1 year ago", :minimum_churn_count => 10}
        config.rcov[:rcov_opts] << "-Itest"
  end
rescue LoadError
end

{ 0 comments }

VB.NET compile error

by Carl on May 14, 2010

I’ve been working regularly on a legacy project done in VB.NET and recently upgraded it to Visual Studio 2010 (from Visual Studio 2008) and things were going as well as VB.NET projects can… Until mid-day today. Out of seamingly nowhere, I started getting this error when trying to build the entire solution:

vbc : error BC31019: Unable to write to output file, MyProject.pdb

I looked high and low all over Google for a solution. I tried the following:

  • Restarted Visual Studio 2010. Did not fix.
  • Restarted computer. Did not fix.
  • Created a VS2008 solution file, added the projects into it, tried to build. Did not fix.
  • Moved the entire solution folder to another area on my C:\ drive. Did not fix.

Then I happened upon this site, and it suggested I open the vbproj file and edit the <DebugType>All</DebugType> element to <DebugType>none</DebugType>. That seemed to do the trick. So now I can build, but I don’t get my output PDB files. It’s a temporary solution, but hopefully I can figure out what has gone wrong here. Another solution was to uninstall/reinstall Visual Studio, and I don’t want to spend 3+ hours on that.

I tell ya, my on-the-side Ruby/Rails projects do not give me this much grief.

{ 1 comment }

Javascript HTML Templating: EJS vs JAML

January 21, 2010

Now that I’ve played around with EJS for a while, I can say I’m fairly comfortable with it, and love the syntax. It just makes sense to me. But recently, I came across another templating framework, called JAML, or HAML for Javascript (GitHub Page), and it addresses one of my main concerns with EJS. I’ll get [...]

Read the full article →

JavaScript HTML Templating: EJS vs jQuery

January 11, 2010

Had a little time to kill between tasks a few weeks ago, and Googled to see if I could find a solution to all these dreaded string-concatenations I was finding throughout pieces of our Javascript codebase at work. They were piecing together HTML code (in strings) and attaching objects’ data into the HTML. I stumbled [...]

Read the full article →

Book Review: Rails for .NET Developers

September 25, 2009

I few weeks ago I picked up “Rails for .NET Developers”,by Jeff Cohen and Brian Eng, and practically read it from cover-to-cover in about a week and a half’s time. It was a very informative read, and I was looking for a jumping-off point to really get into Rails, and I figured a book supposedly [...]

Read the full article →

Getting my feet wet with Drupal

September 24, 2009

Some side projects of mine have led me down the path of getting more familiar with Drupal (http://drupal.org) and I have to say that it’s a wonderful and powerful CMS. It definitely has a lot of features that provide the convention or configuration mantra that I’m growing to love the more I use Ruby on [...]

Read the full article →

Rolling my own blog engine, part 3

June 1, 2009

Part 1 Part 2
This post is going to go over Automapping using Fluent NHibernate with regards to my blogging engine.  If you’re unfamiliar with the concept of automapping, you should browse James Gregory’s introductory post. Basically, we gained the benefit of XML-less configuration when mapping our data transfer objects (DTO) to [...]

Read the full article →

Rolling my own blog engine, part 2

May 21, 2009

Rolling my own blog engine, part 1

Initially I was going to jump into my tests that I had written to exercise my data access layer via FluentNHibernate, but, I’ve decided that I wanted to get to AutoMapping first before I move ahead. Before I get to that though, I have to do a little [...]

Read the full article →

More TDD Fun: String manipulation

May 12, 2009

I had another programming problem dawn on me the other day;
Given a string of words, separated by spaces, reverse each words’ letters, but not the order of the words in the string.

Sounds simple enough. If you were to have the string “abc defg”, the output would be “cba gfed”. A simplistic brain puzzle, but [...]

Read the full article →

TDD Fun(?) : Creating a linked list in C#

May 11, 2009

I was reminded just today that it’s been a while since I’ve implemented a linked list from scratch, and it sounded kind of fun.  I also thought that I should create it via a TDD (test-driven development) strategy to give myself an additional +1 to my good-little-coder attribute.

Read the full article →