Friday 25 September 2009

What's their motivation?

From a fairly early age I've been accused of having an analytical mind.

In recent years I think it has made me come across as a bit cynical, but I don't see that as being a negative thing - maybe I'm just a cynical optimist?

I recently stumbled across an old blog post by Kent Beck which rebutted some comments that Joel Spolsky had made during a podcast.

After several years of working in project teams applying XP principles, including some TDD, and having recently read some of Kent's books (better late than never), I felt that Joel was coming from a position of ignorance, making presumptions that people like Kent and Uncle Bob Martin were living in some kind of dream world and didn't know how things needed to operate in order for code to ship.

Realising that the podcast and Kent's response blog post are both actually quite old, I decided not to contribute to the debate.

Then today I saw Uncle Bob Martin post a response to another article by Joel. This time Joel was praising the developer that hacks bits and pieces together, but doesn't pay attention to some of the approaches to software development that I would consider to now be mainstream. He even goes so far as to infer an associationg between ugly multiple inheritence and design patterns. Oh the irony!

In the comments section for Bob's blog I saw an interesting Twitter tweet:
"never take software advice from a bug tracking system salesman
"

Sure enough, it turns out that the main product produced by Fog Creek Software - where Joel is CEO - is a bug tracking system.

Now, remembering that I might be a tad cynical, I can see why someone who makes money from sales of bug tracking software might want to downplay the benefits of unit testing, design patterns and other aspects of modern software development that have become mainstream in the last few years.

Thursday 17 September 2009

The state of agile

A few weeks ago I attended an XTC (eXtreme Tuesday Club) meeting in London which was based around people reporting on what their experience of Agile 2009 was.

The whole arrangement was unlike any kind of meeting that I have attended before. A bunch of people with similar interests meet in a room at a pub in central London and socialise. There were no announcements or presenters up the front.

I met a chap called Tom Gilb who showed me a few of the nice features of the new iPhone S - including some video capture, editing, and uploading to Twitter.

The only report back about Agile 2009 that I managed to (over)hear was Uncle Bob Martin saying something along the lines of, "It was okay, but there was nothing new".

It was reassuring to read a blog post this evening that indicated that other luminaries in the agile community were thinking along the same lines. It made me realise that Uncle Bob was not being cynical - and he definitely does not come across as that kind of guy. (He even didn't mind signing a book that I had in my bag from his Robert C. Martin series - even though it was authored by Michael Feathers).

Tuesday 15 September 2009

Server config and logging in Java

I've somehow been "volunteered" into doing the stuff that no one else wants to do.

It's a strange world where entire days can go by without much feeling of achievement, or a few minutes can lead to a revelation, like finding a patch for some related third party system, or opening a configuration file in a different editor which highlights syntax differently. It's as if a spotlight has been shone on the tiniest - previously insignificant - line or two of text and everything is going to work according to plan.

On the developer's desktop logging isn't particularly important, as it doesn't slow the system down much, and it's nice to be able to see what's going on in realtime.

On staging and production servers there are different priorities, such as performance, conserving space and alerting someone if a significant event is detected.

In an ideal world there would be a single logging system, used consistently throughout the application. Of course we don't live in an ideal world, so there are multiple logging systems that are used with different levels of granularity by the various third party libraries and runtime systems that form our application.

The application itself uses log4j, but a third party component is tied to the java.util.logging implementation.

Friday 11 September 2009

Java Portlets

It seems to me that Liferay and GateIn (JBoss and eXo) are the only big players in the open source space for Java Portlet Containers.

When I recover from the joy that I experienced from configuring the previous generation on a server, I will have to take a deep look into these options.

Apologies to anyone who came here looking for an insiteful comparison.

Thursday 10 September 2009

JBoss 4.2.2 and Apache 2 with AJP

In case I'm not the only person on the Internet with an interest in this, JBoss 4.2.2 does not play nicely with Apache using the AJP protocol.

After a lot of experimentation with various combinations of settings at both the Apache 2.2 end (mod_jk and mod_proxy_ajp) I came across the following:

https://jira.jboss.org/jira/browse/JBPAPP-366

I found this slightly reassuring.

Due to various reasons and time restrictions, I was not able to upgrade to 4.2.3 - but I thought it might have a compatible upgraded / patched version of the jbossweb.jar. Nope.

So, I did some digging around and figured out that the source code is available for anonymous download from a subversion repository at:

http://anonsvn.jboss.org/repos/jbossweb/

see:

http://docs.jboss.org/process-guide/en/html/svnaccess.html

Paraphrased steps to apply the patch:
- Download the JBoss Web project from the JBOSSWEB_2_0_1_GA tag - to ensure compatibility
- Adjust the build.properties.default file to specify version 4 2 2 GA
- Copy JBoss 4.2.2 into the appropriate directory, or run the ant command to have a fresh distribution downloaded
- Edit the 2 Java classes mentioned in the patch in the Jira issue that I linked to earlier
- Run the appropriate ant build command

Take your shiney custom built jbossweb.jar and copy it over the existing one in the jboss-web.deployer/lib directory.

Restart JBoss and enjoy not having to restart JBoss periodically to free up those connection resources.

Update:

You should also look at the: What is an optimized mod_jk configuration for use in Apache with JBoss? Red Hhat Knowledgebase article.

In addition, the usual consideration should be afforded to JVM settings for memory sizes and garbage collection.