crazed monkey

Archive for November, 2002

RSS

Crazedmonkey.com is live!

I bit the bullet and registered crazedmonkey.com. The DNS changes finally went through. Please change your links accordingly. Or not. Whatever pleases you.

Posted on November 12th, 2002 in meta, site - No Comments »

The Mind Electric’s Glue loses a user

David Watson has just made the switch from Glue to Apache Axis. I understand his pain, as everything broke on my server when I “upgraded” Glue from 2.x to 3.2. However, I managed to get it working although I was not deploying my application in a JAR, but rather a WAR, so that might have made a difference. For the record, here is what I did:

  1. Placed Glue’s config.xml in /WEB-INF/classes/electric/common/WEB-INF/
  2. Placed the standard.map file in /WEB-INF/classes/electric/common/WEB-INF/maps/
  3. Placed GLUE-STD.jar in /WEB-INF/libs/

After that, no more errors.

David makes a rather interesting statement in his entry which I’d like to comment on:

“Deployment descriptors are overrated, especially when the code can reflect a lot of the details at runtime. If I need to set parameters, I’ll do it in the code, thanks.”

As someone who has had to garner information about parameter and return types from a client’s WSDL document, I can honestly say that deployment descriptor files are certainly not overrated. Had the client we were dealing with created a proper WSDL file, I wouldn’t have had to bother them incessently with questions as to what structure the request parameters and responses took. As it turns out, some of the request and response parameters were string representations of XML documents, easily replaced with custom type declarations within the WSDL. Indeed, some of the responses were documented as arrays of “any”, which is the WSDL world equivalent of Object or void. Had the client not even provided any WSDL information and instead had the parameters hardcoded in source, as David would prefer, it would have been a nightmare, and not just an annoyance.

Don’t get me wrong, I dislike SOAP as it is heavyweight and cumbersome, but if you’re going to use it, at least use it as it was meant to be used.

Posted on November 11th, 2002 in computers, java, programming - No Comments »

Iain Banks recommendations gone wrong

A few weeks back I recommended Iain Banks’ The Business to Vic only to find out that he wasn’t too keen on it. It had been a while since I had read the book and I suppose that the only thing which stuck in my mind was that the story was a neat concept which I thought Vic would enjoy. I had forgotten about the unsatisfying dénouement and the rather slim plotline. Nor could I compare The Business with Banks’ other straight fiction books as I have kept primarily to his science fiction, which he writes under the name Iain M. Banks. I can understand Frank’s response to Vic’s post and his need to come to the rescue. Unfortunately, the only Iain Banks book which Frank doesn’t recommend, namely A Song of Stone, is in my reading queue. It’s a good thing I only paid $7 for it.

Posted on November 10th, 2002 in books, culture - No Comments »

More popular than Ian Stevens

Vic suggested that I comment on my rise in the Google rankings. At present writing, a Google search for “ian stevens” returns my Radio weblog as the highest ranking search result, surpassing even famous Shrewsbury forward Ian Stevens as well as Ian Stevens, the prominent and prolific astrophysist. Indeed, three of the top ten search results for my name return pages which I have authored. In the past few days, I have noticed Google and Altavista spiders in my access log, so it is only a matter of time before this weblog reaches the top ten space and boots some other Ian Stevens down to the second page. Everyone needs a goal, and mine is to occupy the entire first page of the Google search results for my name. These small and petty victories are the only things which keep me breathing, I swear.

Posted on November 10th, 2002 in meta, site - No Comments »

JUnit changed my life

A few months ago, Vic was talking about JUnit and how I should have been making use of it. He even went so far as to sketch out a small test case. I knew I should have been writing test cases for my code, but my work schedule was so hectic, with me needing to stay one step ahead of five client-side developers, that I just assumed I didn’t have the time. Besides, where to begin? I was too busy for testing!

A couple of months later I found myself working late and making changes to the way data was marshaled to the client. It was at this point that I would have bounced my server and told the client developer for the project to “Try it now!”. However, the client developer had already gone home for the evening and I didn’t want her waiting on me early the next morning. Suddenly, as if in a ghostly vision, I saw Vic hovering before me intoning “Use the JUnit, Ian”. Seconds later I performed a few searches on Google, came up with this document and within minutes was writing my first JUnit test case. Thanks to IDEA with JUnit testing and debugging built-in, it was a snap and couldn’t have taken more than ten minutes.

Now I write JUnit test cases all the time and love it! As well as exposing flaws in code, particularly in marshaling methods, which might not have been executed until later, JUnit has speeded up development in some areas. Even better, by requiring that my code be more modular in order to facilitate testing, JUnit has revealed useful refactorings which needed to be performed. Code which I didn’t think could be easily tested because it relied on either a pre-defined set of actions or on outside data, is now cleaner because of JUnit testing.

Thanks, JUnit! You changed my life!

Posted on November 8th, 2002 in computers, java, programming - No Comments »