Blog clients

September 11, 2006

I’ve been spending some of this afternoon looking for a blogging client for WordPress. Some of the ones I’ve looked at: –

  • jblogclient. Doesn’t have a build.xml, pom.xml, make file or a README.html in the source root. Not encouraging. Found something else that works whilst mucking around trying to work out how to build it.
  • BloGTK! (Author’s emphasis). What can I say about this software? Nothing – it doesn’t even load up in Debian etch. Wouldn’t be a solution for the whole group anyway, being GNOME specific.
  • Drivel. This might possibly work – it does at least load up. Doesn’t give poor idiots like myself much help in working out the correct URL for posting to wordpress. Also not a strong candidate for a group standard package because of linux dependency.
  • Performancing. OK, so why didn’t I go for the firefox plugin first? It works, hurrah! Also gives you some help with setting up new accounts. Time to put it through it’s paces with some formatted code…

Here’s some Java (from jblogeditor): –

public static String removeOuterDiv(String content) {
//Use the dirty way. Remove all possible divs.
String start = "";
String end = "";
String newContent = content;

while (true) {
newContent = newContent.trim();

if (newContent.startsWith(start) && newContent.endsWith(end)) {
newContent = newContent.substring(start.length());
newContent = newContent.substring(0, newContent.length() - end.length());
}
else {
break;
}
}

return newContent;
}

OK, not bad, no spurious line breaks inserted. [Update – it didn’t get this right – some line breaks were lost. Could have been a problem with my cut-paste though. More experimentation required]. To really break things, some unescaped xml: –

org.hsqldb.jdbcDriver
jdbc:hsqldb:hsql://localhost
sa

3
org.hibernate.dialect.HSQLDialect
thread
org.hibernate.cache.NoCacheProvider
true
create

Yes, I think value-of is probably about as good as I expected there. Ho hum, perhaps we could write an add-on that does nice things with xml fragments? Come to think of it, some java colouring would be pretty sweet as well.

Advertisements

Our dynamic language quandary

September 8, 2006

The Murray-Rust group is a Java shop, for Java people. We’re aware, at the same time, that Java isn’t an ideal language for doing data conversion (nails for the sed/awk hammer), or for those one-off jobs where it would be really useful to have a python style programming shell to explore in.

Given our investment in Java, we should really confine ourselves to a dynamic language that can run on the JVM, except that isn’t really so confined any more, with JPython on the march and the news that Sun taking the lead on JRuby. Richard Apodaca is already posting examples hacking chemoinformatics in Ruby, but I don’t think that there’s any single standard dynamic language for chemoinformatics yet.
There’s another entrant to consider, though. We’re coding more and more javascript in the group, mainly bits of scripts in web interfaces, driver scripts for JMol. I enjoy worrying Peter by prophesying that javascript will become a dominant language on the server. Peter, like myself, has had his fingers burnt by the browser war DOM trainwreck and javascript gets despised (perhaps unfairly) by association. Perhaps we should just give in and go with the flow?

After getting halfway through the third hashCode method in the SPECTRa search tool I said to my rubber duck:  “This is rubbish, why can’t Eclipse generate my hashCode and equals methods?”.  “Perhaps it can” came the reply “why don’t you just google for it?”

Consequently googled and found – simply right click in the class, go to source, Generate hashCode and equals methods. Not the prettiest code in the world, but then boilerplate doesn’t have to be.

Expect large config files…

September 6, 2006

To paraphrase Stephen Fry on estate agents – “Users: like them or loathe them, you’ve got to loathe them.”
Sean McGrath has a solution.

Blogosphere re-entry

September 1, 2006

Thanks to Andrew Walkingshaw I’m making this brave new re-entry into the blogosphere. I’ll still blog java things at JRoller, but this will, I think, be a better platform.
I’m employed by the SPECTRa project as a software developer – developing tools to encourage / enable chemists to get chemistry data into open access, institutional, DSpace repositories (but we’re willing to compromise on any three of those, when push comes to shove). I play an unofficial role in helping members of the Murray-Rust group with the software engineering aspects of their informatics research projects. Since SPECTRa is funded by JISC, I also take part in a number of inter-project JISC initiatives such as the Deposit API interoperability initiative.
Things I’d like to write about in the next few weeks: –

  • Software portfolio management
  • The handle system
  • Chemistry + REST
  • DSpace technical review
  • Is “Academic software engineering” oxymoronic?
  • “Oh dear, Pakistan are hammering us at cricket again”