magpiebrain

Sam Newman's site, a Consultant at ThoughtWorks

Posts by samnewman

Right now, I am supposed to be on my way to seeing the “Flaming Lips”:http://www.flaminglips.com/main.php, one of the best live bands on the planet, at the “Hammersmith Apollo”:http://www.carlinglive.com/venue_content/carling_hammersmith_apolo.html. Instead, I am trying to work out why one of our warehouse management systems stopped working, and why even after I’ve cobbled together a fix for a problem I don’t understand won’t it accept a file its been accepting quite happily for the last couple of months. An even bigger problem is that I don’t have the file the file in question to hand – its being emailed to me as we speak. So I’m just sitting around, waiting for the ruddy file to arrive, which inevitably will of been mangled by someone at the warehouse…oh well…

_Updated 7:29pm_: Well, finally got the email at the second attempt, everythings sorted so now its time for a mad dash across London to try and get to the concert in time….who wants a bet that the underground will get flooded or something?

So there I was, trying to create an XSLT style sheet for my RSS 2.0 feed, when I managed to overwrite the main index.html template for my blog with the RSS 2.0 template. Thankfully a friend pointed out than I’d made a right asshat of myself – I’ve restored and earlier version of the template in the meantime, as I won’t have time to fix it properly until tomorrow, as I’m off to see the Flaming Lips tonight…

I’ve been looking into the topic of (business rule) engines for a while now. Frequently at work I find myself embedding business logic into my code – silly things such as ‘delivery takes and extra day if your in Cornwall’ for example due to time constraints and a lack of a decent framework get written directly into the code. I hate this approach – business rules can be far more fluid than the code itself. Business rule engines such as drools aim to separate these business rules from the code itself. There has been a lot of movement in this area recently – there are a number of commercial rule-based engines in addition to the opensource drools, including “ILOG JRules”:http://www.ilog.com/, “Haley Eclipse”:http://www.haley.com/, “Sandia Jess”:http://herzberg.ca.sandia.gov/jess and “CLIPS”:http://www.ghg.net/clips/CLIPS.html.
“JSR-94”:http://www.jcp.org/en/jsr/detail?id=94 details the API for a Java-based Rule Engine, and is currently at the Proposed Final Draft stage. Implementations of JSR-94 will be forthcoming – ILOG are in the expert group so its fair to assume they’ll have an implementation soon, and the people behind drools have also committed to provide an implementation in the near future.
Due to the other implementations being commercial, I’ve only really looked at drools, although its documentation is good (the “drools guide(Drools – Theory, Usage and Reference [PDF])”:http://drools.org/pdf/drools-guide.pdf gives a good overview not only of drools itself but of rule engines in general) but it seems fairly straightforward..

Whilst reading one of Hani’s “enjoyable rants”:http://www.jroller.com/page/fate/20031029#opensymphony_dirty_laundry over at “The Bile Blog”:http://www.jroller.com/page/fate, I can upon a reference to “Seraph(Atlassian – Seraph)”:http://opensource.atlassian.com/seraph/introduction.html, which at first glance seems to be one of those things that is destined to save me loads of time the next time I write a web app. For some reason, in nearly every web application I’ve been involved with (and there have been a few) I’ve ended up either writing the authentication and authorization code, or at least eneded up doing major work on it – for me its replaced the constant implementations of sortable tables for various companies Swing interfaces.
I’m going to be playing around with some changes to the “Display Tag Library”:http://displaytag.sourceforge.net/ at some point – I might combine it with a web application that uses Seraph to see how it hangs together. It should also be noted that Seraph and The Display Tag Library are the first projects I’ve seen that uses Maven and have gone to any effort to make the resulting sites look like something other than the default Maven L&F.

Bram has hit the nail “right on the head”:http://advogato.org/person/Bram/diary.html?start=97when he says that what users actually want in software and what they actually ask for can often be two completely different things. Most of us who have developed software have probably come across various forms of user driven software design. The central principal behind such development processes is to sit down with your prospective user and work out what they want, such requirements being detailed as Use Cases, or Stories (in XP parlance) or whatever. What people commonly forget is that recording what the user says they want is not really the job, its about working out what they actually want and helping them understand this. Never let your marketing department gather user requirements – you’ll end up attempting to deliver a product too soon packed with fancy features that don’t actually address what the users real requirements are. Don’t let your manager do it either – every added layer of communication between the developer and a user is an opportunity for miscommunication. I know it can be a drag, but making the effort to develop a meaningful business relationship with your user can drastically reduce the chances of feature creep and can help produce software that the user really loves. And a happy user is more likely to be a repeat customer after all…

I “posted(Advanced Table display using JSP Tags)”:http://www.magpiebrain.com/archives/000095.html a while back about my discovery of the “Display tag Library”:http://displaytag.sourceforge.net/, used to created tables in JSP pages. To recap the tag can handle formatting, automatic export options (Excel, CSV, XML), sorting and grouping with a minimum of fuss. Back then I was impressed just from reading the documentation and from viewing the “on line demos(Live Examples of the Displaytag library)”:http://www.displaytag.org/index.jsp. Now I’m impressed because I just used it to generate a very simple contacts list for our intranet, and it took me about 2 hours to download the taglib, install it, work out how to use it and then create a great looking table with sorting, grouping and CSV export. To be honest, I spent as much time playing with the CSS as anything else.
Next up, I think I’m going to look at a simple way of putting form controls in the table. A “prototype(Display tag library – Editable table implementation)”:http://sourceforge.net/tracker/index.php?func=detail&aid=755192&group_id=73068&atid=536615 based on the Display Tag was built but it seems a little complex, and despite being posted several months ago it doesn’t seem to of been integrated in the code base yet. Hopefully I’ll be able to come up with some simple extensions that don’t require too much coding.

I try to keep my blog relatively on-topic, and make sure its at least partially related to technology issues. However something has come to my attention that requires airing in public, before I explode in a towering rage. Hellblazer, perhaps my favourite all time comic series is being made into a film. For those who don’t know, Hellblazer tells the story of John Constantine, a Londoner mystic who spends his life drinking, pissing people off and messing around with the occult. John Constantine first appeared in Alan Moore’s run in Swamp Thing, and since getting his own comic has been written and drawn by such greats as Garth Ennis, Steve Dillon, Jamie Delano, Brian Azzarello and Warren Ellis. Noted for sharp humour, occasionally shocking material I look forward to each release of the graphic novels with genuine delight.

At the best of times the results of comics can be very varied – from the good (Batman, From Hell, Spiderman) to the bad (Batman and Robin). Fans of the source material are notoriously picky when it comes to translations of their beloved material. When I heard they were making a film, I thought I should try and keep an open mind. “Who is making it?” I ask. “Warner Brothers”. Hmm…ok…”Who is the director?.” “Francis Lawrence” I hear. Who? Turns out this is his film directorial debut. Credits to date include music Videos for Britney Spears, Jennifer Lopez and P.O.D. Admitidly Spike Jonze’s only experience prior to Being John Malkovich was directing videos, so perhaps all is not lost. “Where is it set?” I ask again. “America” came the reply. Now I’m really worried. So much of John Constantine’s charm comes from the pithy Londoner in him – such much of the excellent backdrops to the stories being London itself. Then I remember High Fidelity, which survived the translation to America relatively intact. Now the big question. “Who is playing John Constantine” I ask? ” Keanu Reeves” comes the, frankly unbelievable reply.

NOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO!!!!!!!!!!!!!!

For the love of god, what were they thinking…

More information on this potential abomination in waiting can be found over at “Straight To Hell”:http://www.insanerantings.com/hell/movie/, probably the best Hellblazer fan site.