Yearly Archives: 2017

Inconsistent space width across editors

I had a weird problem today when my perfectly indented code comments from Vi editor were looking like a mess in Geany. The pound signs were all out of line though they look perfectly aligned when opened in Vi editor.

Tagged with: , , , , ,
Posted in Blog

Opening large JSON files with Geany

A few days back at work I was trying to open a fairly large unformatted (a single line) JSON file generated through one of the junit tests. At first I tried to open it in Eclipse since my Eclipse JEE IDE

Tagged with: , , , ,
Posted in Blog

Correct Way of Using EntityManager in Singleton EJB

This week and last week I spent a lot of time writing code to implement the persistence feature for our module with EJB 3 at work. This is the first time I was working with EJB so there was quite

Tagged with: , , , , , ,
Posted in Blog, Java

EntityManager with try-with-resource

try-with-resource is the new feature introduced in Java 1.7 to automatically close a resource after using. It basically helps you to avoid a finally block at the end of the try-catch block to close any resource that needs closing like

Tagged with: , , , , ,
Posted in Blog, Java

Invoking Python scripts from test cases running within a venv

Before the final release, I like to test my Python scripts the way these are supposed to be invoked in actual environment, usually with command line arguments. And this is apart from the unit testing and integration testing that I

Tagged with: , , , ,
Posted in Blog, Python

Accessing Mysql database installed in an LXD container

This is my second post on LXD containers. Sometimes, using a container is a cleaner way to install and use applications for a number of reasons: You can install packages from any version of any distribution. That means, even if

Tagged with: , , , ,
Posted in LXD, Shell, Ubuntu

LXD Containers – First Experience

Lately I have been playing around with LXD containers and I must say that I am quite impressed with it. LXD is the virtualization technology that can be used to run a Linux container on a Linux host using the

Tagged with: , , ,
Posted in LXD, Shell, Ubuntu