code snippets

Unit Testing Spring-Hibernate Code with HSQLDB

Aug 6th, 2013 | By | Category: code snippets, design, j2ee, java

Recently, we used hibernate extensively in a Spring based  Java application to connect to an Oracle DB. For unit testing, we decided that we should connect to HSQLDB so we can test out the usage of hibernate in a more portable manner. I scoured the web for snippets of code to achieve this. Finally, I […]

On Digesting XML

Jul 26th, 2011 | By | Category: code snippets, java

One of the earliest uses of XML was for the purpose of storing configuration. It was soon realized that XML constructs are more amenable for specifying nested configurations rather than properties or INI files that were hitherto used for the same purpose. Since I am a confessed frame-workaholic (a term I just coined to denote […]

Calculating percentiles in MYSQL

Oct 10th, 2010 | By | Category: code snippets

I was doing some interesting analysis on percentiles. In the process, I had to put some results in MYSQL and use it for calculating them. I am somewhat fanatical about the usage of select statements without recourse to stored procedures for doing anything in the database. So I was hunting for a “pure select” way […]

Framework design patterns.

Sep 20th, 2009 | By | Category: architecture, code snippets, design, j2ee, java

Imagine a large building with its foundation resting on a bedrock. Now consider  the possible impact of doing  any kind of repair work on the bedrock!  Sounds scary? Fortunately, the analogy does not fully extend to the realm of software in its full gravity. Yet this metaphorical mental escapade would bring some notion of the […]