A colleague coined this term the other day. Having no thoughts of my own at the moment due to work pressure, I thought I’d steal his:

Refuctoring. The opposite of refactoring. The process by which well fuctored code is achieved.


Needed to install a wiki this week. Chose Zope and ZWiki for sheer ease of installation. While looking around I came across Plone. That thing rocks! Open source content management and publishing workflow in point-n-click Zope-powered stylee. Cool bananas.

ASM gains ground

CGLib now uses ASM instead of BCEL.

CGLib really is pretty cool. One of my colleagues, Chris, had a go at writing an enhancing classloader using CGLib, but ran into difficulties with final classes and classloader recursion. It ought to be possible, and that seems to me to be the most logical place to inject the enhanced bytecode. The rest of the application would then be completely unaware of the enhancement and could just instantiate classes in the usual way. ate my brain!

Just found this article on The ideas seem strangely similar to those expressed in this entry from over a month ago. Hah! Exposed!

Okay, so the Sun article is better written, but they have had a month to do it 🙂

I’m not too bothered. Chances are I osmosed the idea from someone else in the first place anyway.

Thanks for reminding me

From the BileBlog:

The major flaw with dynamic mocks is that the return values are for all intents and purposes static. So for example, you can specify something like myMock.expectAndReturn(“getBlah”, “blah”); but cannot express something where the return value is not static. Why might you want to do that, you might wonder. Well, lets say you want to create a mock object for ServletContext, you’d want to be able to specify a Map that methods like getInitParameter and get/setAttribute work off of. Alas, this is impossible without much arm twisting and ugly hackery. You basically have to implement your own CallFactory which has all the extra magic in it. Maybe I’m missing something, but a less braindead solution to me would be to have the possibility of return values implementing some kind of interface, and in that special case, use a callback to determine what the actual return should be.

I have done exactly this, for the the purposes of erecting a fake servlet engine around some code that needed a more dynamic interaction with its environment than a straight mock object could provide. I’ve even been given permission to open source it, I just haven’t gotten around to it yet. I’ll see what I can do about getting it out there.

Striving for banality

Knowing as I do how many hits this site gets, I sometimes wonder if the pressure to be perceived as erudite and interesting results in excessive self-censorship at a semi-concious level.

I also wonder if my random writings will ever be as interesting as this. Sheer artistry. I’m humbled.