Test First TDD

January 21st, 2010 Comments Off

I think that TDD is getting bastardized.  If you happen to use a Unit testing framework, it does not mean that you are test driven at all.  TDD is about test first to drive the rest – design, clean code, feedback, quality, and lot more.  Using a testing framework is easy.  Being test first driven is really difficult.  You may start off with the mechanics and focus on the cadence, but you only feel the value a lot later – when you have woven it as an attitude into your fabric of thinking.

That’s why I’m giving the TEST FIRST TDD course next week.  If you want to go beyond just learning about an xUnit API and step on the path of a personal journey to changing the way you create software, then come along.  I don’t have miracles but I can do better than just shining a light.  I will step into the darkness with you and help you move towards the light.

Mapping Steve’s Mind and More

January 21st, 2010 Comments Off

If you hate reading lengthy blog posts and dig the mind map view of the world, then add Steve van der Merwe’s blog to your feed gadget.  What I really like is his short quick observations and great views about software development.  But for me, it’s even better that I get to speak to him regularly, in person.  If you’re in the Cape Town area, make a point of finding him and chatting to him.  He makes ubuntu real.

97 Things Every Programmer Should Know

January 21st, 2010 Comments Off

One of my contributions to 97 Things Every Programmer Should Know will be included in the book.  My good friend and colleague, Niclas Nilsson, also has a contribution which will be in the book as well.  But don’t just read mine, read all 97 and the amazing contributions that did not make it to the printed book as well.  I have know idea how Kevlin Henney managed to select these 97 things from so many contributions.

DDD Reference Card

January 21st, 2010 Comments Off

I know it’s absolutely insane to try to reduce Eric Evans’ amazing book into just a few pages, but stupidity won.  I think it’s still useful as a “next to the coffee mug on your desk thing” if you’re just starting off with DDD.  So download the free Domain Driven Design Reference Card at http://refcardz.dzone.com. Small warning: it’s not useful unless you’ve read Eric’s and/or Jimmy’s book or have attended a DDD course.

I’ve tried to keep it true to the book.  I’ve aslo added a reference to a couple of additional patterns right at the end, after some quick chats with Eric and Jimmy.  Given the space constraints, I decided to leave out the CQRS work.  It feels better anyway, since this meant as a cheat sheet for people starting out.

Gotcha! (side-effects really pain a lot)

December 28th, 2009 Comments Off

I just upgraded to Snow Leopard and installed buildr which failed miserably.

/Library/Ruby/Gems/1.8/gems/rjb-1.1.9/lib/rjbcore.bundle: dlopen(/Library/Ruby/Gems/1.8/gems/rjb-1.1.9/lib/rjbcore.bundle, 9): no suitable image found. Did find: (LoadError)
/Library/Ruby/Gems/1.8/gems/rjb-1.1.9/lib/rjbcore.bundle: no matching architecture in universal wrapper - /Library/Ruby/Gems/1.8/gems/rjb-1.1.9/lib/rjbcore.bundle

It turns out that I needed to rebuild rjb, the ruby-java bridge, but that failed too.

extconf.rb:48: JAVA_HOME is not set. (RuntimeError)

I was certain that JAVA_HOME was definitely set and it was pointing to the 64-bit Apple 1.6 JDK.  Digging in extconf.rb, it finds JAVA_HOME from the ENV hash

javahome = ENV['JAVA_HOME']

So, nothing weird about that too!  What’s going on?  I was installing buildr like this

sudo gem install buildr

The problem is that once you sudo, you are running with another environment, one without the JAVA_HOME variable.  So, the quick fix is simply

sudo env JAVA_HOME=$JAVA_HOME gem install '1.1.9' rjb
sudo env JAVA_HOME=$JAVA_HOME gem install buildr

I completely forgot about this side-effect.  Like all side-effects, it was painful – it just cost me an hour of  digging around looking at all sorts of other things.  But, more importantly, breaking fundamental assumptions (e.g. my environment is the sudo’s environment) and zoning in on the root cause of the problem resulted in a very simple solution.