Geronimo!

Ok. More adventures with open source. One of the things I’ve got on my (lengthy) list at the moment is to have a look at some light(er) weight servlet and J2EE containers. JBoss is giving me hives. You may be aware of that, I’ve mentioned it before.

So the first one I wanted to look at was Geronimo, partly because it’s from Apache, party because it’s got the option of being wrapped around either Jetty or Tomcat. I trotted off, grabbed the 2.2.1 tar ball and threw it onto my Mac so that I could run it up on the train. That’s where the irritation started. From the documentation, it was evident that in other *nix environments, I should just be able to unpack the tar ball and run bin/geronimo.sh run. I tried that on my Mac, and was hit by the dreaded Unable To Decrypt error.

It was pretty obvious that there were two parts to the solution: get a full JDK installed on the Mac, and ensure that the run time environment for Geronimo has JAVA_HOME pointing to the right place.

I could rant endlessly about Apple’s arcane treatment of Java, but won’t. If you have a developer account, it’s reasonably easy to grab a fairly recent JDK and get it installed. What’s not so obvious is where the hell the JDK winds up on your machine after install. Apple aren’t particularly helpful with this: the JDK winds up in /Library/Java/JavaVirtualMachines. Hence for me I needed to add JAVA_HOME to my profile:


JAVA_HOME=/Library/Java/JavaVirtualMachines/1.6.0_31-b04-415.jdk/Contents/Home

That sorted Geronimo out nicely – the boot log showed the right JARs were being found:


Runtime Information:
Install Directory = /Users/robert/Desktop/geronimo-jetty7-javaee5-2.2.1
Sun JVM 1.6.0_31
JVM in use = Sun JVM 1.6.0_31
Java Information:
System property [java.runtime.name] = Java(TM) SE Runtime Environment
System property [java.runtime.version] = 1.6.0_31-b04-415-11M3646
System property [os.name] = Mac OS X
System property [os.version] = 10.7.3
System property [sun.os.patch.level] = unknown
System property [os.arch] = x86_64
System property [java.class.version] = 50.0
System property [locale] = en_US
System property [unicode.encoding] = UnicodeLittle
System property [file.encoding] = MacRoman
System property [java.vm.name] = Java HotSpot(TM) 64-Bit Server VM
System property [java.vm.vendor] = Apple Inc.
System property [java.vm.version] = 20.6-b01-415
System property [java.vm.info] = mixed mode
System property [java.home] = /Library/Java/JavaVirtualMachines/1.6.0_31-b04-415.jdk/Contents/Home
System property [java.classpath] = null
System property [java.library.path] = {stuff in java.home}

Nice! Trouble is – the problem persisted. Here’s the trick: the initial install of Geronimo creates various properties files. If that initial startup fails, the properties files have borken information in them, and you will never get it to startup. Let me repeat that:

You MUST get JAVA_HOME in the Geronimo environment pointing to a valid JDK before you try to run Geronimo, or daemons will fly out of your nose and eat your face. You have been warned.

Sharpening the tools

Before I packed it all up, I had a workshop habit that I suspect other makers of sawdust shared. Before embarking on any work, I would spend some time cleaning up the workshop area. I would make sure the bench was clean and clear, sweep the floor, check that tools were sharp and sharpen them if necessary. I’d check the tables on the big tools for rust, and the tracking on the bandsaw. Sometimes I would get out particular tools and lay them out on the bench, ready to go.

And all the while I was doing this, I would be thinking about the work I was going to engage on, think about the processes I was going to follow, the pattern of work. I find this enormously relaxing, and a fantastic way to focus. I found that I would be trimming away, sweeping away, everything in my head that I didn’t need for the job at hand.

Over the past few years I’ve been trying to take the same approach to programming work, with a similar resultant focus (and one day I hope that I find it relaxing too). Thus, today, I’m re-reading Better Builds with Maven. Sharpening the tools and cleaning the bench.

One nice thing about re-reading books like this, particularly well written ones, is that there is always something to learn, some nuance that pops out that was previously invisible, highlighted by fresh experience. Even the import of a simple statement like “convention over configuration” can change over time.

Just like buses

You wait forever, and then two turn up at the same time.

Which is what happened with job offers on Friday. In a couple of days time, when contracts have been signed, I’ll tell you which two companies, and why I chose one over the other, but suffice it to say that I found myself in the remarkable position of having two really good offers come in within a couple of hours of each other.

I’ve dealt with a lot of agencies and agents while I’ve been hunting for work in London. Most of them have been ok, a few of them have felt incredibly dodgy, and three of them proved to be very good. Maybe I’m biased since these were the ones that got me the best chances, but it did feel that these three companies seriously thought about my reported history and interests, and made intelligent and dedicated attempts to match that against client needs. So, some free advertising for them. If you’re looking for work here in London, I strongly suggest you talk to these guys and gals:

  • ABRS went out of their way to put interesting things in front of me;
  • Salt have a good focus on marketing candidates and helping candidates market themselves
  • Bearing have an excellent understanding of the market sectors they aim to service, and a good understanding of technology

I’d also like to throw some laurels in the direction of BITE Consulting. They’re a small shop, with a fairly specific aim – placing people into contract roles, generally folk sourced from the colonies – but the products they offer to contractors are extremely competitive and sensible. If I’d been pursuing contract work (which I would have turned to if these permanent positions hadn’t popped up), there is zero doubt in my mind that I would have worked through and with BITE.

We now return you to regular programming.

Agility

A too frequent question over the past couple of weeks has been “what characterises Agile development for you?”, or some variant on that. Thinking about it this evening, I am struck by how much stuff has accumulated around what is a very simple, elegant manifesto. Go look at the WikiPedia article to see how much has been built around the idea.

In particular, the attitude I keep confronting is, loosely, “Agile = SCRUM”. A few people extend that to “Agile = SCRUM + CI”. More commonly I’m seeing the equation “Agile = SCRUM + Testing”, which is interesting, because what people are really articulating is “Agile = XP + some vague notions of short release cycles”. I really think that in a lot of places, Agile has become as much of a vast over-engineered framework as any older methodology. On the other hand, I am a curmudgeon.

It’s worth restating the agile methodology though, ripped straight from the site:

We are uncovering better ways of developing software by doing it and helping others do it. Through this work we have come to value:

Individuals and interactions over processes and tools
Working software over comprehensive documentation
Customer collaboration over contract negotiation
Responding to change over following a plan

That is, while there is value in the items on the right, we value the items on the left more.

Words to live by, or at least to work by.

Mirror World…

Someone, probably William Gibson speaking through Cayce Pollard, wrote about the Mirror World of travel. The notion that it is not the big differences that lend to a sense of unease, but the myriad small and barely noticeable differences. Like the shape of electrical outlets.

An odd one for us, that we’re still getting used to. In the UK they drive on the left. But expect people standing on the escalators to be standing on the right. On the other hand there’s a general convention to go up and down the left side of stairs. And it’s ok to take dogs on the escalators, as long as you carry them.

But the one that is driving me absolutely mad, as I’m in and out of job interviews that involve coding tests performed at a computer is that the standard over here is for the “@” to not be Shift-2, but instead to be over where I’m used to finding the double quote, i.e. one right-ward twitch of my little finger. For no readily apparent reason, the two are reversed. Which makes touch-typing code very annoying.

Scope Creep

One thing that I’ve noticed over a quarter of a century of banging out code is how the expectations for what a coder will know has expanded enormously.

When I began, the expectation was that you had an understanding of how computers roughly worked – the old CPU plus memory plus storage model that we’ve had since the beginning – and facility in one or two languages. Cobol, Pascal, Basic, Fortran, some assembler. It was anticipated that you’d be able to sit down with a manual and a compiler, and teach yourself a new language in a few days. The important part was knowing how to think, and how to really look at the problem. And of course, how to squeeze every last cycle out of the CPU, and do amazing things in a small memory footprint.

Around the turn of the century, there was not much change. Your average coder was expected to be comfortable working in a three-tier architecture, to have some vague idea about how networks and the internet worked, be comfortable with SQL and a database or two, to have some notion of how to work collaboratively in a multi-discipline team. And of course, to have a deep understanding of a single language, and whatever the flavour-of-the-month framework or standard libraries existed. UML and RUP were in vogue, but Agile was newfangled, and here was a wall of design documentation to ignore.

Now is the age of the ultra-specialist. You need to be server side, or middleware, or client side. You need to know a language intimately, and be vastly knowledgable about half a dozen ancillary technologies – in the Java world, for instance, you need to grok Spring, and JMS, and JMX, and Hibernate, and Maven, and a CI tool, and a specific IDE. You need to understand crypto, and security, and enterprise integration and architectural patterns, and networking.

I fear that this rant has gone vague and off the rails. There is a strange paradox in place now: we are expected to specialise deeply in the problem spaces we address, but carry in our heads a hugely expanded toolset.

Making a Mockery

As I’m back on the hunt for a job, I’m going back and brushing up on technologies I’ve not necessarily used for a while, out of interest as much as anything else. This has been enlivened somewhat by realising I didn’t have and IDEs or any other coding tools – other than Xcode and TextWrangler – on my laptop. The effort of getting things set back up so that I can play has reminded me of why I love, and why I loathe, the OpenSource Java community.

I’ll write up some notes on bits and pieces that I want to remember as static pages elsewhere, so for the moment let me just mutter about what I got running, and what has driven me nuts.

To start with, it pleases me no end that Mac OS-X comes natively supplied with Maven. That gives me some base assurance that I can, at a minimum, launch a terminal and build and test without having to download the world first (other than Maven’s habit of downloading the world, of course).

Next up, I grabbed down Netbeans 7.1. I’d not used it with Maven previously, and was pleased to discover that the IDE plays nicely the Maven way, rather than desperately wanting to make Maven work the IDE way.

Penultimately, I got an Eclipse running – the SpringSource Indigo bundle – and began to grit my teeth. Don’t get me wrong. I like Eclipse a lot. But for the last eight months I’d been using IntelliJ, which means my brain and fingers had been retrained to different shortcuts, and trying to switch back to Eclipse is like trying to remember a language you’ve not spoken since high school. The other thing which always makes me grit my teeth is the richness of Eclipse. It’s the EMACS of IDEs, infinitely variable and configurable, and trying to get a fresh download to look and feel like you are used to is painful, annoying and tedious.

And finally, I sat down to fiddle with JMock again. And spent some time tearing my hair out. I was reading through a tutorial from the JMock site, and was damned if I could get it compiling. It was pretty obvious why – the JMock objects I was expecting weren’t in the JMock JARs. Maybe it was too late at night for me to be thinking straight when I downed tools, as picking it up again this morning revealed my problem: the tutorial was referring to a slightly older version of JMock, even though it was in a JUnit 4 context, and the current version is radically different.

Therein lies one of the things that drives me absolutely nuts about the open source Java Community: too many major, key, central projects have inaccurate, out-of-date documentation, and too much key knowledge is passed around in folklore.

Boxing On

Today’s goals are to cart boxes up to the storage unit, inventory the storage unit (a task which will be made difficult by it being full of boxes), and cart things in boxes off to Lifeline.

Oh, and a lot of washing, vacuuming, dusting, vacuuming and washing.

The infuriating thing about boxes is how difficult and expensive they are proving. So far we have found exactly one place – Bunnings – that has left-over cardboard boxes for the taking and using. It’s called recycling. This morning, not wanting to make the lengthy drive over and back, I went down to our local shopping mall. Not one, but three stores that I approached told me that it was not their policy to recycle boxes this way, that all their boxes had to be flattened according to policy and placed in the recycling bins according to policy. And that I could buy some archive boxes made out of recycled boxes. Well done Coles, Kmart and Choice.

I estimate I’ve spent around $250 on cardboard boxes, tape, bubble wrap and sundry packing stuff over the past couple of months. I shall treasure these boxes when they arrive, and carefully preserve them for re-use. According to policy. Maybe I can sell them at a profit.

Now I’m counting

There’s less than a week left now, and I would like to feel more excited and enthralled, rather than inanimate and slightly broiled. I’m blessing the air conditioning that has been repaired, and hideous expense, just in time for me to leave, as every opportunity sees me sitting in shorts and shirt in a room chilled to 20 C, hoping that my brain will soon start working again.

Our departure party was quite successful, and I was pleased that we drank or disposed of a very large amount of mead, and that the locusts swept through the box-of-stuff and took most of it away.

The packing is almost complete, although it appears completion can only be approach asymptotically and never actually attained. Some critical point was passed in the past few days, a phase change, a crisis, as the number of items on my to-do list fell rather than rising.

Giving away items has proved to be one of the most complex parts of this whole exercise, although spending a disturbing amount with tradesmen to make the house liveable has not been fun either.

What has bewildered and frustrated me most is that people who are getting Free Stuff can be so difficult about actually coming and picking it up. Ok, I do know that I get a benefit from them taking it away, it’s stuff that otherwise I have to lug off to Lifeline or St Vincent de Paul, but the lounge is still an Aladdin’s cave of items with name tags on them, waiting for someone to come and pick up whatever artefact the tag is attached to.

Frankly it’s going to be a relief tomorrow when I take whatever is not being packed for shipping, and not being packed into our backpacks, and take it to some charity. So if you were totally gonna get it sometime real soon now… too late.

Not Counting Down

Still not counting down. It’s been a productive week, helped along by having set myself a calendar of tasks for the week, and having met all the goals so far. Today’s effort is a good example of the sort of day I”ve been having for a long time, but particularly this week as we get very close.

Up early, coffee, left over paella. Check how much paint I have, walk down the street to buy cheap brushes and some decking oil. Spent the morning in the heat painting the front porch, the back stair rails, and the rails around the front porch. The nice thing about the heat was that it dried very quickly, and I’m pleased with how much of an improvement to the appearance of the house such a simple thing has made.

Then I went mad with the decking oil and drenched the front and back stairs – both are unpainted natural timber since I had them repaired, and the oil will keep them as protected as paint ever will. I also managed to get oil and paint in my hair, up my nose, in my ear and all over my clothes. But it’s done.

I also cleared out the study, other than the remaining computer, and we carted boxes up to the storage unit, boxes to Delia’s parent’s house, and still had time to stop for Gerbinos for gelati on the way back.

Finally I sat down with everything that was potentially to be packed into my daypack, put it in, took it out, reduced it, put it back in again, and poked around to confirm that it was actually functional and that I was not taking things too phenomenally dumb.

Now, the sound of crickets and cicadas, and possums thumping on the roof. Barking geckos, finally a cooling breeze, a glass of wine and some goats-milk cheese.

This is going to work.