Topic: Systems development

Roman Numerals, Groovy Style

Your project is already late when you discover in the small print of the contract that the system in development “SHALL manage Roman digits in chapter numbers”. You frantically search the ‘Net and, yes there are solutions. Some of them seem complicated on first sight. Do you wish for less convoluted code? You’ve got it.
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 is 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 »

systemd: system doubts

My new workhorse laptop (running Ubuntu Linux) had disturbing symptoms. Never have I had to use the power button so often to shut down a Linux box. Mystery. Linux traditionally has been a bedrock of stability. It took me a while to realize that a handful of problems point in the same direction: systemd.
Continue »

Layout Mechanisms in Grails

Grails is a powerful framework for building cool stuff in Groovy. This post is about structuring the layout of web applications to avoid copy-paste. Grails contains several powerful mechanisms for this purpose. The official documentation on some of them is strangely vague. This note is a snapshot of my own understanding, a work in progress.
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 »

File I/O and File Attributes in Java 7

A previous post introduced the filestat package for accessing low-level file attributes from Java on a Unix/Linux platform. The recently released Java 7 includes functionality for doing that job and a lot more.
Continue »

“Stealth” Groovy Methods

Groovy has a number of simple and useful methods that are almost impossible to find by a web search. Try as you wish, googling for any, find, or count just gets you a giant haystack hiding the proverbial buried needle. And… hey, what was the name of that method that lets you insert a value into an iteration, kind of?

This post is about those Groovy methods that are all over the place, and yet hard to find. I wrote it as a reminder to myself.
Continue »

Grails: Controller and Action Names in GSP

Grails is a powerful framework for building web applications in Groovy. This post is about a tiny little corner of Grails development.

The presentation layer in Grails, also known as views, is built from Groovy Server Pages (GSP). The names of the controller and action that spawned a view are not automatically available in the view. This post shows you a very simple way to provide those names to views.
Continue »

NoSQL: Don’t Take the Drug Unless You Have the Symptoms

NoSQL databases are hot, and rightly so. Many of them aspire to solve some of the trickiest database problems of all, problems that have been nagging database research for decades: scaling up and scaling out.

In some trade press and other places the NoSQL discussion has to be simplified. Sometimes a casual reader may get the impression that NoSQL just makes relational databases old-fashioned. This is very far from the truth. NoSQL is there to cure specific ailments. If you don’t suffer from any of those specific symptoms, the side effects from taking NoSQL medication may cause more pain than relief. I’ll explain why and let’s see if you agree.
Continue »

Neo4j Performance: Another Notch

In a number of posts I devised various database micro-benchmarks. The idea was to set the stage for an epic battle between NoSql and relational. In less grandiose terms I tested Neo4j, an all-Java network database, Apache Derby, an all-Java relational database and PostgreSQL, trusted non-Java relational workhorse with a heritage.

This is a short closing note in the series, commenting on Neo4j performance.
Continue »