Author Archives: Matteo Caprari
Enforcing design principles in software
Before starting to write a new piece of software, I come up with some simple design principles that I think will do some good. For smallish projects I just keep the principles in mind and behave so, but for bigger … Continue reading
Java bytecode, string concatenation and StringBuilder
In my earlier post I was making a fuss over picking the faster hash algorithm, and then I realised I was using + to concatenate strings. Should I always use a StringBuilder? Should I care even for small strings? Heck, … Continue reading
Evaluating relative speed of java digest (hashing) algorithms
It’s best practice to encrypt security tokens such as passwords and sessions ids in your database. I was just doing that to the session tokens for a project at work, and I wondered which algorithm to pick if speed was … Continue reading
Where are generics stored in java compiled classes?
I was having a go at learning some Java bytecode and started looking at how generics were handled. As expected, the compiler was emitting cast instructions when generic types where used, but nothing where the types where declared: generics in Java are … Continue reading
simple webserver and rest with jetty and NO XML
Simple no-frills implementation of a REST key-value store using jetty embedded and NO XML Continue reading
Most Advanced Yet Acceptable
Raymond Loewy believed that The adult public’s taste is not necessarily ready to accept the logical solutions to their requirements if the solution implies too vast a departure from what they have been conditioned into accepting as the norm. Quite … Continue reading
ten principles of good design and two books
I’m watching the first episode of The Genius of Design, a BBC documentary series exploring the history of design. It’s not about software design, but one could argue that the process and the craft of design are interesting not matter … Continue reading
openid authentication handler for couchdb
Over at couchdb-openid, there is my implementation of OpenID version 1.1 for couchdb, based on http://github.com/etnt/eopenid It seems fairly stable but has only been tested against myopenid.com, so it is definitely not production ready. I plan to add support for … Continue reading
Couchdb runtime statistics viewer
CouchDB comes with a runtime statistics module that lets you inspect how CouchDB performs. The statistics module collects metrics like requests per second, request sizes and a multitude of other useful stuff. From Couchdb wiki. I created a simple app … Continue reading
generating SVG charts with couchdb
In this article I describe how I got couchdb to produce SVG charts using list functions This post is long, so I’ll report the results first: group_level=1 yearly averages svg – png group_level=2 monthly averages svg – png group_level=3 daily … Continue reading