Jul 03 2008
Opensource Google C++ testing framework
I’m pleased to say that we are opensourcing our C++ xUnit-style framework. See the official announcement.
Jul 03 2008
I’m pleased to say that we are opensourcing our C++ xUnit-style framework. See the official announcement.
May 14 2008
A friend of mine, Misko Hevery, has written a very cool opensource tool for analyzing Java projects and scoring them in terms of how testable they are. His plans are to have it point out what’s wrong, and make suggestions as to what you can do to improve the situation.
Check it out: Testability Explorer
Well worth looking at.
Jan 28 2008
Several people have asked me for the source from my last book “TDD: A Practical Guide”. A lot has happened since that book, and the files from it that were once posted on the Saorsa & Adaption sites were lost. Unfortunately I’ve had to tell people that the source was now longer in existence.
Well, today I was doing some routine housekeeping and… Huzah!!! I found a zip of those very source files. For anyone who has been looking for them… I’m pleased to say that I’m making them available at long last. You can download it here
Jan 16 2008
My coworker, Paul Zabelin, posted here on some ideas that we’ve been experimenting with using RSpec stories and JRuby.
Jan 15 2008
Tonight RSpec-1.1.2 was released. See most of the details on David Chelimsky’s blog.
I take a personal interest in this release as it includes my first active submission to the codebase in some time.
The functionality I added relates to the definition of steps in the new story component. Up until now, you used a string to define a step. For example:
Given "a student named '$name'" do |name| #... end When "the student is given a grade of $grade" do |grade| #... end Then "the student should $pass_fail" do |pass_fail| #... end
This would result in stories like the following:
Given a student named 'Mike' When the student is given a grade of 40 Then the student should fail
Continually talking about “the student” is grating and very un-natural sounding. Sounds downright, bloody legalistic, actually. And a lawyer is the last thing we want to be accused of sounding like… other than maybe Denny Crane.
One approach to this would be to go to something like:
When "he is given a grade of $grade" do |grade| #... end Then "he should $pass_fail" do |pass_fail| #... end
which would give us:
Given a student named "Mike" When he is given a grade of 40 Then he should fail
Now, speaking of lawyers, we probably want to make this a little more PC and be able to do this:
Given a student named "Michelle" When she is given a grade of 60 Then she should pass
We could conceivable create another set of steps for the feminine forms, refactoring to remove the duplication. That might suffice in the simple case, but it’s still rather crude. I’d like to be able to use a regular expression and create steps something like:
When /(he|she) is given a grade of (.*?)/ do |pronoun, grade| #... end Then /(he|she) should (.*?)/ do |pronoun, pass_fail| #... end
With release 1.1.2, that’s exactly what you can do.
There are a couple things to point out:
This new feature provides a new level of flexibility in defining story steps. Have fun with it.
Nov 05 2007
I’m sitting in the airport in Charlotte, on my way home from RubyConf2007.
What a fabulous conference. This the most enjoyable conference I’ve been to in a very long time.
There was so many great talks/ideas/projects, it’s hard to pick highpoints, but these stand out for me (in no particular order):
It’s no wonder the Ruby community is “nice people” when we have someone like Matz at the head of it.
Maybe as rewarding, or even more, than the tech & talks was seeing old friends again and meeting others face to face that to date I’d only known online.
It was an awesome weekend, and I’m eagerly looking forward to the next Ruby conference!
Sep 22 2007
With my move to Google, I’ll be in a mixed Linux/OSX environment… so it makes sense to me to revisit emacs for my day-to-day programming.
With some help from zenspider and technomancy, I have the latest carbonized emacs up & running with a nice ruby/rails environment (rinari)… and of course… the zenburn color scheme.
Sep 19 2007
I just added a confirmation dialog to a cancel button on an app that I’m working on. I tested it and stopped for a second as I read the dialog.. then broke out laughing.
![]() |
| What do I press if I really do want to cancel? |
Sep 18 2007
Tonight I was exploring the current state of RubyCocoa (and it looks good), and I noticed a quote from Knuth’s “The Art of Computer Programming”, his 1974 ACM Turing Award Lecture.
Paul Graham has the text of the full lecture here.
This is a great talk, and should be required reading for anyone calling themselves a programmer. I found the last section, especially interesting.. here’s what I consider to be the core bit form it:
“Therefore I want to address my closing remarks to the system programmers and the machine designers who produce the systems that the rest of us must work with. Please, give us tools that are a pleasure to use, especially for our routine assignments, instead of providing something we have to fight with. Please, give us tools that encourage us to write better programs, by enhancing our pleasure when we do so.”
It struck me that Ruby and recent systems from Apple fill Knuth’s request quite nicely. According to Wikipedia, Knuth uses Macs.. I wonder how he thinks they answer his challenge from ’74. I wonder what his view of Ruby is… Anyone heard anything about that?
Stay Hungry, Stay Foolish!
Steve Jobs
In memory of Steve Jobs