Posts

Showing posts from April, 2009

MetricFu 1.0.0 is Out

What's new: Merged in Grant McInnes' work on creating yaml output for all metrics to aid harvesting by other tools Supporting Flog 2.1.0 Supporting Reek 1.0.0 Removed dependency on Rails Env for 3.months.ago (for churn report), now using chronic gem ("3 months ago"). Almost all code is out of Rakefiles now and so is more easily testable Metrics inherit from a refactored Generator now. New metrics generators just have to implement "emit", "analyze", "to_h" and inherit from Generator. They also must have a template. See the flay generator and template for a simple implementation. You now define the metrics you wish to run in the configuration and then run "metrics:all". No other metrics task is exposed by default. Full documentation, as always, is at: http://metric-fu.rubyforge.org/ Let the Google group ( http://groups.google.com/group/metric_fu ) know about any bugs you find.

Women and Code

So I've been kind of heads down trying to get metric_fu ready for Rails Conf, so I had only vaguely heard about the recent controversy over Matt Aimonetti's recent presentation " CouchDB: Perform like a pr0n star ." When someone did mention it to me I thought of David Heinemeier Hansson's famous "F--- You" slide or Zed Shaw's rants or any given bit of profanity/edginess at Rails conferences and shrugged it off as a bit of a bad idea. Earlier today we were having our weekly team meeting when the topic of the controversy came up and my friend Leah was quite upset by it. And I realized that she has to deal with a lot of crap everyday being the only female coder in our office, at user groups, in conferences. We've had experiences where clients treated her in ways they would never have treated a man. And that sucks. I've read Matt's post about the experience and I believe he didn't mean any harm, but I don't think you can show pic

Announcing the Metric Fu Google Group

I really should have done this a long time ago, but you know how it goes. Anyway, if you're using metric_fu and have a question or want to discuss it's direction/development you can now here: http://groups.google.com/group/ metric_fu There's some big changes on the horizon for metric_fu -- If you want to get a preview, head over to github and take a look at the to_yaml branch of metric_fu. I've been pulling in Grant McInnes changes to be able to serialize the output of all the metrics. This means that there will be a yaml file created after each run which can be used by other projects. A number of people have asked for this feature so they can do analysis of their metric data. However, this will probably break some uses of MetricFu as it is an almost complete re-write. What's cool about this branch (besides the output) is that almost nothing is in rakefiles anymore and so is more easily testable. If you use metric_fu and have an opinion on this, or anything

Smells of Testing (signs your tests are bad)

Image
I spent the weekend at Citcon (Continuous Integration and Testing Conference) in Minneapolis. Citcon (which is pronounced Kitcon -- because it sounds cooler) is an open spaces conference which means that there are no scheduled talks. The people who show up propose ideas and then they vote on what they want to see. It sounds like it would never work but it actually works very well. For instance, Toby Tripp proposed a session on testing smells and it got enough votes to get a session but when I showed up there were only 6 people. Which kinda bummed me out until we started talking, then I realized that we had exactly the right 6 people and another 20, 50, or 100 half interested dudes typing away on their computers really wouldn't have added to the talk. As it was the talk was intimate and to the point. We came up with the following smells (a smell is a sign that something might be wrong -- Fowler used this metaphor to great effect in his seminal book " Refactoring ")

I got accepted into Agile 2009

My new talk " What's the Right Level of Testing? " got accepted for the Agile 2009 conference happening late August in Chicago. I'm pretty excited to be going -- the last time I was there it was called XPAU (eXtreme Programming Agile Universe).

When Your Mocks Burst into Flames

So yesterday Leah and I were working on SudokuScanner -- a cool little site that will, when it's released, allow you to upload images of Sudoku boards and get a solution. All of a sudden, our mocks and stubs went totally batshit. One minute she and I were happily writing some tests, making them pass, refactoring, checking in, etc... and then, we got a bunch of failures. OK, no problem -- we must have busted something with our latest change. The failure was a mock expectations error: UserMailer expected to receive a call to deliver_activation but did not receive it. So we went over to the failing spec and... There was no expectation on UserMailer anywhere in the spec. That's bad. Ran the spec by itself and it passes. Yep - not so good. Reverse the order that the specs run in (spec --reverse) and a different number of specs fail, but still with the same expectation failure. And of course these new specs all pass on their own. And have no reference to UserMailer anywher

Fifth Day of the Craftsman Swap

Image
Day Five of the Craftsmanship Swap : Last day! Today started off with some more work on a soon to be released 8th Light project that will hopefully make them some money. Colin and I had a good time blowing up the app and making sure a notification email gets sent out using Exception Notifier . Later on, at a retrospective, Paul asked me if I thought it would make any money and I said that I had no idea but it was worth it even if all they got out of it was some greenfield experience for Eric and Colin. Oftentimes when you're a new developer you get told what to do. But this project, although managed by Micah, has mostly been programmed by Eric and Colin. Which is awesome. It's a real app that will go into production and charge credit cards, but it's small and simple enough that they could write every line. There's a lot of 10 year veterans of the industry who've never had that sort of start to finish experience and I think it's cool they're getting it

Fourth Day of the Craftsman Swap

Day Four of the Craftsmanship Swap : Today started with Eric Smith and I working an iPhone version of Conway’s Game of Life trying to be as test first as possible. It was... Painful. I've been spoiled by my time with Ruby into expecting first class testing/mocking/stubbing. Even working with a guy who's given talks on how to test drive iPhone apps there was still a lot of wasted time scratching our heads, hand writing mocks/stubs, and f-ing around with clicking and dragging lines from one box to another. We got interrupted mid-morning by some production issues in a large Rails application 8th Light maintains/ develops. We had to write a script to find some bad data and fix it so I got to use one of my favorite tricks to mark the progress of a long running process: 10.times do sleep 1 print "." STDOUT.flush end If you don't put in the "STDOUT.flush" all the dots come out altogether at the end, but with the flush you get a nice dot to tell you every

Third Day of the Craftsman Swap

Day Three of the Craftsmanship Swap : Micah and Paul had to head out of town for an Iteration Planning Meeting/Demo so it was just Colin Jones, Eric Meyer, and I in the office. We decided to do some tri-ping pong development on an internal product 8th Light is planning to release soon. So Eric would write a test/spec, I'd make it pass and write another spec, then Colin would make my spec pass and write one for Eric and the whole process would repeat. An enjoyable way to work made easier by their 24inch Cinema Displays and wireless keyboards. I've noticed that everybody shakes hands at 8th Light. A lot. When someone arrives in the morning the new person tends to shake the hands of all who are already there. The same thing happens when someone leaves for the day. I asked Colin and Eric about the origins of this but they had no answers for me. It seems kind of weird, but it's also sort of a cool affirmation of camaraderie. It may just be better than the grunt I give p

Second Day of the Craftsman Swap

Day Two of the Craftsmanship Swap : The day started off with a bit of work on slim for C with Doug Bradbury . Slim is a replacement for Fit which underlies Fitnesse and you need to write one for every language you plan to use FitNesse on. I gave it my best shot , but then Uncle Bob (Bob Martin - father of 8th Light founder Micah Martin) and James Grenning showed up. Great to see those guys -- I don't think I've seen James since my days of apprenticeship at Object Mentor . They are crazy better at C than I am so they worked with Doug while I paired with Micah on drving that ui through Fitnesse (which I talked about yesterday ). We made some pretty good progress but he had some meetings to attend so I got to work with 8th Light's newest apprentice: Colin Jones . Guess what he was working on? Tic Tac Toe. That takes me back. 5 years ago almost to the month, Micah had me write a Tic Tac Toe program to see if I had the skills to become an Object Mentor apprentice. Well

First Day of the Craftsman Swap

Day One of the Craftsmanship Swap : Today Micah and I paired on test driving a user interface through FitNesse . The UI in question is a JRuby rich client application that had reached the point where they wanted to have some acceptance tests that fire it up, click around, and assert that things are where they should be. We used DRb to stow away a reference to the application when it started up and then we could make the application dance. If you haven't used DRb it's yet another deceptively simple and powerful Ruby tool. Check this out: ~ $ irb >> require 'drb' => true >> object = "hello" => "hello" >> DRb.start_service('druby://localhost:9001',object) => # >> ref = DRbObject.new(nil, 'druby://localhost:9001') => # >> ref.size => 5 >> ref.to_s => "hello" Stick any object in and then another Ruby process can pick it up and do stuff with it. Neat. I noticed 8th Light

Craftsman Swap Begins Today

This morning instead of taking a train to downtown Chicago I'll be driving to the northern suburb of Libertyville and working at 8th Light for a week. Obtiva (my company) is participating in a craftsman swap so 8th Light will be sending someone down to Obtiva whilst I work with 8th Light. This should be pretty interesting as the last time I worked with some of the 8th Lighters I was an apprentice at Object Mentor.