DevTrain held a team day in Tampere, during which we did a coding dojo.

The task was to implement a small web application for a survey about software development. The survey consists of questions, such as “Which methods are you using in your software development? a) Agile B) Waterfall C) Something else”.

At the end of the survey, there is a field for an email address and a submit button.  Pretty simple stuff, but as usual with Java and web applications, the environment and configuration bring the challenges.

Or is it really like this? It took about an hour for me to set up the development environment and specs beforehand. I added a bunch of jars we usually use into the lib directory and then just ran Jetty server:

Server server = new Server(8080);
Context context = new WebAppContext(server, “java/webroot”, “/survey”);
server.start();

Things are pretty easy with Jetty. There is no need to use any additional plugins for debugging or dynamic jsp changes.

We used RandoriKata with a driver and a co-pilot. There were eight of us, each coding for five minutes. We had two 40-minute sessions. We used one laptop and a projector.

We used JSF MyFaces Tomahawk components. At the start, some time was wasted when initialising resource bundles and checking the right components. Not all of us code JSF daily (or even web applications) but once we got things running, the application was getting done quite easily.

It was really nice that we got the survey done (at least some version of it). During the last minutes of the session, we just decided to store the survey results as files. Of course, a database could be used and the layout needs to be finalised. But hey, for a two 40-minute sessions with JSF, I think we were pretty productive.

And the lessons learned… Even with partly unfamiliar technology we all code pretty much the same way. Switching positions was almost “invisible”.  Nobody was hyperproductive compared to others. And everyone was getting the work done.

I decided to go with a real application (we might actually use it in our marketing), because it is always more interesting than just coding some scoring system with no real use. The downside is that with the limited time and web technologies, it is hard to use TDD. Most testing consisted of checking  jsp live on a browser.

We naturally learned a couple of coding tricks from each other but the biggest achievement was that getting something done together is truly good for the team spirit!