WatinTest Recorder is brilliant

Watin is an amazing testing suite for web applications.  If you have not tried it immediately go here and watch how easy it is to create end user unit tests for web applications. Now if that isn’t amazing enough there is the WatinTestRecorder.  View the video here that shows how to create Watin tests for a full page of a web application in about 5 minutes.

SubTyping in ActiveRecord isn’t too clear.

I’ve spent quite a lot of time messing around the methods for subtyping in ActiveRecord.  The clearest method I’ve found is using concrete classes (what Fowler calls them).  For this to work you simple have a inheritance relationship between the base type and the subclasses and have the AR attribute on all the classes (I get a weird error if the base class doesn’t have this attribute).

public class BaseType

public class FirstSubType:BaseType

public class SecondSubType:BaseType

You end up with a little bloat in terms of sourcefiles and database tables, but, at least you have a very clear subtyping relationship.  I had wasted a lot of time with the AnyToAny relationship syntax.  Note:  There is no documentation whatsoever for how to use AnyToAny relationships in AR.  I reccomend searching the Subversion repository test cases for examples of how to use that.  Even the forums lacked any good description of how to code it.  Honestly this is one of those features that I would almost switch to NHibernate if I can’t work it.