Fault Barrier Pattern

Many software applications fail due to poor usage of exception handling. After studying many industrial applications one of the best practices for exception handling is by using a Fault Barrier Pattern which is described below.

Deciding which exception to throw and when to throw it are important decisions for your fault-handling framework. Also it is . . . → Read More: Fault Barrier Pattern






Requirement Packages Sonar package MySQL 5.x or PostgreSQL 8.3 or Microsoft SQL (2005), 2008 not supported.


Installation Download and install MySQL from here. You can install community server and work bench. Download latest Sonar package from here and unzip Sonar in a fresh directory, let’s say . . . → Read More: Sonar

UML Tools

UML TOOLS With Reverse Engineering 1. MagicDraw

This tool provides more information in class or sequence diagrams.

Java Reverse Engineered Class Diagram


reversed class


Java Reverse Engineered Sequence Diagram

reversed sequence diagram

License and Cost


Link: https://www.magicdraw.com

2. Altova

I prefer this because this can reverse engineer the . . . → Read More: UML Tools

Java SE7 Features

Java SE 7 – New Features


InvokeDynamic byte code + supporting features

VM and language extensions to support the implementation of dynamically-typed languages at performance levels near to that of the Java language itself.


Concurrency and Collections APIs

The Fork/Join framework is an easy-to-use way to take advantage of multiple processors. The ThreadLocalRandom . . . → Read More: Java SE7 Features


The following code converts the given PDF file into a Image file of a given Image type.

import java.awt.Graphics2D; import java.awt.Image; import java.awt.Rectangle; import java.awt.image.BufferedImage; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.nio.ByteBuffer;

import javax.imageio.ImageIO; import com.sun.pdfview.PDFFile; import com.sun.pdfview.PDFPage;

public class PdfToImage {

public void convert(String pdfFileName, String type) { try { . . . → Read More: PDF2Image

Ethernet DAQ

Data Acquisition using Ethernet is a convenient way. There is a new hardware NI cDAQ-9188 available from National Instruments (NI) for extending PC-based data acquisition for accessing distributed sensor data. Read more.

Waterfall Model

This is a linear sequential model. Basically a waterfall methodology structures a project into distinct phases with defined deliverables from each phase. The first phase is defining the system requirements, the second phase determines how it will be designed, middle phase defines coding of the problem, fourth phase is testing of the full system, and . . . → Read More: Waterfall Model

Software Methodologies

The Software development methodology is a framework where the software is developed through structure, planning and control. Software Development Life Cycle (SDLC) is the process defines from birth to delivery of the product i.e from initial requirements of the project to its delivery to the customer. Life cycle contains generally the following phases.

Requirements: Analysis . . . → Read More: Software Methodologies

Read directory and files

The following Java code reads a directory, its files and sub directories under it.

import java.io.File; import java.io.IOException; public class ReadDirectory { /** * Read the directory and display the files. * @param directory * @throws IOException */ public static void read(String directory) throws IOException { File dir = new File(directory); File[] files = dir.listFiles(); . . . → Read More: Read directory and files


Postscript To PDF Conversion

There are several tools help us to convert Postscript to PDF conversion. I tried to do some research and obverved the following factors.

1. Ghostscript

Ghostscript is an interpreter for the Postscript language and the Adobe Portable Document Format (PDF). This provides a set of utility programs . . . → Read More: PS-To-PDF