Ping Pong Development to Teach TDD

I came across a post by Dave Hoover explaining a technique he called Ping Pong Programming.

  • Developer A writes a new test and gets a red bar.
  • Developer B implements the code to get to a green bar.
  • Developer B writes the next test.
  • Developer A implements it.

And of course you’re allowed to refactor where ever reasonable. I hadn’t thought about this in respect to pairing up with my developers as I try to get them hooked on TDD, but it seems a very good pattern for learning how the process works. And of course it becomes sort of a fun competitive game.

Technorati Tags:

, ,

No Vacations in Scrum

I was at a kickoff meeting for one of our officially endorsed Scrum projects this week when a sort of strange question came up from one of the business owners:

So no one wants to get assigned to this project in my group because if you’re on a Scrum project you can’t take vacations.

This was pretty easily dispelled with an explanation that vacations are allowed including surprise things like people getting called out for jury duty. Basically backed by two of the Agile Manifesto Principles:

  • People over Process
  • Responding to Change

It does however exemplify some of the rumors that crop up when you start a new process like Scrum. The biggest thing that shakes up a lot of our organization is the idea of collocating and the idea of dedicating staff 100%. My sense is it’s turf protection stuff, but it could just as easily be fear of the unknown.

Technorati Tags:

,

Current Java Web Framework Options

Listening to a podcast by Tim Shadel on difficulties with JSF and why he wouldn’t use it again brought up a current headache in the java web development space. Today’s options for java web frameworks blow.

Let me expound a bit:

Struts – Works fine, has been the defacto standard for years, but its showing its age. It hasn’t really been updated significantly in years. It doesn’t have an obvious successor yet since there is no Struts 2.0. It’s harder to test because it extends from all the framework classes. Within the java community it’s considered pretty much a legacy framework.

JSF – Very hyped and part of the J2EE spec so it’s supported by the app servers. Has a lot of vendor tooling support showing up. Has a very flexible event model. Is being pushed by the creator of Struts. Unfortunately it suffers from a host of problems. Tim Shadel described just a small part of this his recent post on JSF. Essentially he described how they had to get around JSF’s lack of handling GET requests with a few URL parameters.

His example was having one WAR file that needs to link to another WAR file and pass along an id. The hack involved:

  • Creating an extra JSP file.
  • Linking to the JSP file directly.
  • Send along the parameter.
  • Opens up FacesContext.
  • Gets the request object.
  • Pulls off the id parameter.
  • Locates a backing bean with session scope.
  • Stuffs the id the backing bean.
  • Forwards it to a JSF page.
  • Then it can pull up the appropriate page and get the parameter.

This is just plain ugly. Tim goes on to mention that when someone waxes grandly about JSF he asks a simple question? So how do you write a blog in it?

If this were JSF’s only problem it would be one thing, but testing the darn thing is really hard as well since it relies on things like FacesContext that have to be mapped. The only mock objects are found in the Shale project. Even something as simple as JWebUnit for testing from the front end fails because JSF relies on some javascript for just about everything.

I still have some hope that JSF may evolve to something reasonable, but today it’s still pretty messy.

Tapestry, Webworks, Wicket, Spring MVC, etc – I haven’t spent much time with any of these web frameworks for a simple reason. They don’t have really a large enough mindshare and community to make me think that betting the farm on them isn’t a huge risk. I have no doubt they are probably all better than Struts, but none of them have really caught on as a Struts successor.

This is exactly the reason why something like Ruby on Rails has so much appeal to java web developers since in Ruby it’s by far the defacto standard for web applications, and it includes lots of cutting edge features from built in unit test harnesses to AJAX support. Since JSF doesn’t appear to be the hoped for Struts replacement I wonder if we’ll see one anytime soon.

Technorati Tags:

, ,

JSF Compared to a 7 Layer Burritto

Tim Shadel has a post entitled, JSF: The 7-Layer Burrito I Won’t Eat Again, and podcast on his experience with JSF. I’m guessing the 7 layer burrito comment refers to the 6 lifecycle phases in JSF. Anyway I’m eagerly awaiting to get to this podcast on my iTunes playlist. Tim’s vote on JSF after his team has used it for about a year, “Skip it.”

Our experience has been pretty mixed with JSF. We’ve had trouble finding decent books, trainers or resources despite the hype surrounding JSF. Out of six developers on our development teams that have actually used JSF on a project I get:

  • One positive vote.
  • Two less positive votes with a lot of caveats.
  • One neutral vote.
  • Two very negative votes.

If I had my choice I would still be adopting wait and see on JSF, but some consultants were pushing it so it became a non-functional requirement on some new projects. I think JSF may prove out, but it could just as easily go the way of EJB entity beans.

Technorati Tags:

, ,

Leave Out Long Podcast Lead Ins

Listening to episode #16 of Code Sermon this week the, the host made an editorial comment about a trend in podcasts having a couple of minutes audio intro.

It seems like filler and I don’t think we need filler in this new medium.

I’ll have to second this. The point of podcasts is the content. I don’t mind a short audio lead-in as a way to brand a particular podcast, but beyond 20 seconds or so it just starts to seem excessive.

Some podcasts also tack on a podsafe song at the end. This is less of a problem as generally I just skip ahead to the next podcast.

Technorati Tags: