Friday, October 30, 2009

“Best Practices”…Awful…or just irrelevant?

I’ve been having a discussion on Twitter with some folks about the “best practices” term…many people hate it.  The argument against it is:

  • “Best” compared to what?  Best that’s ever been?  Seems fairly high-minded to call something “best”
  • There’s no context.  Practices are more or less suitable depending on their context
  • Calling a practice “best” invites contention because it is also a statement about the inferiority of other practices

Here’s my response:

  • I think anytime you use qualitative terms (“best”, “good”, “practice i like”), there’s subjectivity involved, and deifnitions are imprecise.  So unless we want to throw out all subjectivity (which seems impractical), we have to live with the ambiguity
  • I generally use “best practice” as shorthand for “the best practice we as a team can devise, given our current situation.”  “Best practice” is just shorter.  I guess you could just say “practice”, which would be fine.
  • I just don’t think it matters much.  I’ve never, ever been on a software project where the use of the “best practice” term caused a heated debate or caused software to ship later or with less quality.  So, it seems to me to be a quest for preciseness for preciseness’ sake.

Those are my thoughts…I’d be interested in hearing others…

Tuesday, October 27, 2009

Wednesday, October 7, 2009

Playing with Celerity

I’ve been playing with JRuby lately.  One of the big reasons we picked Ruby for our test framework instead of JRuby (even though we’re testing a Java application) was Watir, and the fact that JRuby didn’t support it (or it didn’t support JRuby, depending on how you look at it).  I’ve recently been exposed to Celerity (http://celerity.rubyforge.org/).  It looks pretty cool.  Here are some features of it:

  • It’s written for JRuby, so you have access to Java and any Java classes you might need to interface with
  • The API is based on Watir, so it should be pretty familiar to test developers used to working in Watir
  • It lays on top of Java’s HTMLUnit, so it works a little differently than Watir.  Instead of driving an actual browser (like IE), it communicates with a web server via HTTP – so it basically emulates a browser.

So far, I like it alot.  However, one big issue I’ve been having (which is actually an issue with HTMLUnit) is that in a browser, if I go to a site that uses SSL I get a warning page and I can tell it to ignore certificate issues.  However with HTMLUnit/Celerity, you can’t do that.  It expects SSL sites to have a certificate.  This causes Java exceptions if you don’t have one (like on a testing site).

I’m still playing with it so maybe there is a workaround.  I hope so – I could see Celerity really filling a niche in the testing world.