Topic: Editor’s choice


I’m nearing completion of my first serious project based on sqlite. It’s been there for ages, but it’s always been a niche database. Until now I haven’t found an occasion to use it. Now, having had a close encounter, I’m impressed. Continue »

Mind Over Matter: A Lesson from Java/JSON Conversion

I’m a Java ecosystem person but most of the code I write is Groovy. There are occasional patches of Java, but my mind is tuned in to Groovy. In a recent project I had to stay all-Java for a while. A little data structure turned up that I decided would benefit from being converted to JSON and then stored in a database.

If you didn’t know, converting to/from JSON are one-liners i Groovy. You hardly even think about it. I had to search the ‘Net to find out how it’s done in Java these days. Gson seemed a solid candidate, but I was in for a surprise. In the end I chose a completely different approach which is also an editor’s choice.
Continue »

The Groovy Mode for Emacs

Over the years there has been no shortage of Groovy modes for Emacs. They all had an irritating tendency to stumble even on common language constructs. I was very happy to find a new version that seems to get things right.
Continue »

Zoom in on XOM

Today’s kudos go to the profusely productive Elliotte Rusty Harold and the XML model called XOM. To quote the XOM web site, XOM is

an open source (LGPL), tree-based API for processing XML with Java that strives for correctness, simplicity, and performance, in that order

Among the design principles, there is one I particularly like: An API is written by experts for non-experts. Great, I simply don’t want to learn all the intricacies of namespaces etc. I just want the API to tell me if I’m heading the wrong way.

My confidence in this package has grown over time. I have used XOM primarily to juggle Docbook documents, using XSLT and XPath. The application has been in production for a while and has performed without a hitch.

It’s a pity that DOM didn’t reach this level of excellence. There is a Swedish saying, “Many cooks, little taste.”

Automatic Bug Finder

Who likes a fault-finder? Well, the FindBugs utility from the University of Marylind makes me smile. I’m delighted to see that this project is alive and kicking. Kicking at bugs!

When I tried it about two years ago I didn’t expect a lot. A small program pretending it could find bugs in Java programs? So I let it have a go at a not too large project I had done. To my astonishment and embarrassment it didn’t just nag about bad habits, lint style, it actually found one or two real bugs! My embarrassment quickly turned into admiration.

Java has a very capable compiler. You may think it checks everything. It doesn’t.