Diasparsoft Logo Let's write software that people understand.

Home | Contact

Training

JUnit support

Outsourcing

The work that Diasparsoft did for us was outstanding. We are now using the software on a daily basis and their work could well have a dramatic impact on the Reds' organization in the near future.Cincinnati Reds Baseball Club.


Publications

Tips & Tricks

Diasparsoft Toolkit

What is Diaspar?

Interesting Bits RSS

Saturday, December 10th

I'm disappointed with FIT

I have just spent the better part of a day trying to start a small project with FIT, working in Ruby. My experience has been especially frustrating, not because my environment was bad, but because after all the work it took to fix my environment, FIT disappointed me in the end.

Just to paint the picture, I had to install XCode 2.2 so I could install readline so I could install postgresql so I could run Rails. After four hours of troubleshooting, Googling and fixing, I was ready to run tests with FIT.

I checked out the latest FIT from CVS, tried to run it, and no love. I ended up finding a defect related to a refactoring gone wrong. Didn't anyone run the tests?!

Finally, I tried to run my test page and FIT was downright rude.

Unable to parse input. Input ignored.
Can't find tag: td
/Users/jbrains/Library/Ruby/fit/bin/../lib/fit/parse.rb:97:in `initialize'
/Users/jbrains/Library/Ruby/fit/bin/../lib/fit/parse.rb:102:in `new'
/Users/jbrains/Library/Ruby/fit/bin/../lib/fit/parse.rb:102:in `initialize'
/Users/jbrains/Library/Ruby/fit/bin/../lib/fit/parse.rb:102:in `new'
/Users/jbrains/Library/Ruby/fit/bin/../lib/fit/parse.rb:102:in `initialize'
/Users/jbrains/Library/Ruby/fit/bin/../lib/fit/file_runner.rb:46:in `new'
/Users/jbrains/Library/Ruby/fit/bin/../lib/fit/file_runner.rb:46:in `process'
/Users/jbrains/Library/Ruby/fit/bin/../lib/fit/file_runner.rb:20:in `run'
/Users/jbrains/Library/Ruby/fit/bin/fit.rb:9

Why can't it find my table cells? Apparently because OpenOffice's HTML editor (correctly) used such tags as thead, tbody and th in my table. Prettier that way. Isn't FIT supposed to make things easier for non-programmers?.

Being a "TDD asshat" (I've always loved that since I read it for the first time in some moron's rant), I wrote an integration test that showed, indeed, that FIT wouldn't parse my "fancy" table correctly. After I had a failing integration test, I went to an object test on Parse. I was about to write the test when I read the existing tests.

I just about lost it.

    def test_parse_exception
      begin
        p = Parse.new 'leader
onetwothree
four
trailer' fail 'Expected ParseException not thrown.' rescue ParseException => e assert_equal 17, e.error_offset assert_equal "Can't find tag: td", e.message end end

Are you kidding me? FIT intentionally disallows tags like th?!

With the greatest love and respect to everyone involved, am I really the first person on this planet to write FIT test tables with an HTML editor that generates table headers?

I just don't have the energy to add support to Ruby FIT for this right now. I recognize that we're all volunteers and that I shouldn't be upset over this, but surely someone else has run into this problem. It just floors me that I might be the first.

Very disappointing. Not the way I wanted to end this programming session.

jbrains on 12.10.05 @ 10:10 PM ET [link]

Friday, December 2nd

Painting the floor

As I go through receipts to get ready for my fiscal year end, I stumble upon a receipt from December 2004. On the back of this receipt, I had scribbled some notes about my experience painting the floor in our house in Manitoba. I'd like to share those with you now.

  • We didn't attempt the project without at least minimal competence. We made sure we had a couple of people with experience painting a floor.
  • My wife and I painted as apprentices to her parents, who knew what to do.
  • We tried pouring TSP on most of the floor to remove the old paint, then paint, but found out quickly that we weren't using the TSP properly. This resulted in chaos.
  • We reset with an incremental plan: we stripped one small section of the floor, let it dry, painted it, then left for the night. This confirmed what we'd learned about stripping the floor with TSP, gave us a quick win and made the rest of the project successful.

Everything I needed to know about painting floors I learned on software projects.

jbrains on 12.02.05 @ 07:57 PM ET [link]