How to Write Node.js Applications in Python using PythonJS on OpenShift
Today I came across an interesting library called PythonJS that converts Python to JavaScript. It converts to JavaScript and generates JavaScript, CoffeeScript, and Dart code for the given Python code....
View ArticlePostgreSQL learning
To find out the location of PostgreSQL configuration files, just connect with your PostgreSQL database and run the following command. To describe a table, you should use To list all the databases,you...
View ArticleWriting your First Technology Book
So I wrote my first book. It is a great feeling to find your book available on Amazon http://www.amazon.com/OpenShift-Cookbook-Shekhar-Gulati/dp/1783981202/. I have read many motivational books or...
View ArticleWriting Test Automation Framework for Installers
Last few weeks I have spent considerable time writing integration test suite for one of our product installers. The goal of this test suite is to automatically test functionality of the product on...
View ArticleHow to resize a Virtual Box virtual machine hard disk size
Today while working on a project I had to resize hard disk size of one of the virtual machines. The Windows virtual machine was created using veewee. To resize a VM hard disk size, you have to perform...
View ArticleAndroid Studio Mac OSX Installation Error — NoClassDefFoundError: Could not...
Today I decided to play with Android and build a simple app. I downloaded the latest version of Android Studio for Mac from the official website http://developer.android.com/sdk/index.html. As soon as...
View ArticleDay 1 — Let’s learn about lambdas
From today, I am kicking off 7 Days with Java 8 blog series with first blog on Lambdas. One of the most important features in Java 8 is the introduction of Lambda expressions. They make your code...
View ArticleDay 2 — Let’s learn about Streams
On day 1, we learnt how lambdas can help us write clean concise code by allowing us to pass behavior without the need to create a class. Lambdas is a very simple language construct that helps developer...
View ArticleDay 3: Let’s collect data using Stream API
On day 2, you learned that Stream API can help you work with collections in a declarative manner. We looked at the collect method, which is a terminal operation that collects the result set of a stream...
View ArticleDay 4 — Let’s write Null free Java code
Every Java developer whether beginner, novice, or seasoned has in his/her lifetime experienced NullPointerException. This is a true fact that no Java developer can deny. We all have wasted or spent...
View ArticleDay 5 — Default and static interface methods in Java 8
We all understand that we should code to interfaces. Interfaces give client a contract which they should use without relying on the implementation details(i.e. classes). Hence, promoting loose...
View ArticleDocker Machine — dial tcp: i/o timeout error on Mac
Today, while trying to use Docker Machine to create a local docker host on my macbook I was greeted with an exception as shown below. I tried to clear the local docker cache by deleting ~/.docker...
View ArticleBuilding Reactive Apps with RxJava and Java 8
Reactive programming is a programming paradigm geared around propagation of change. In other words, a program is expressed as a reaction to asynchronous event stream. Multiple consumers subscribe to an...
View ArticleGson Tip: Using a different FieldNamingPolicy
Today, while write a client for a REST API I had the need to use a different field naming strategy than the default one. By default, when Gson tries to convert a JSON String to an object it expects...
View ArticleGradle tip: Using gradle plugin from local maven repository
Today, I was trying to use a Gradle plugin that was currently not published to Bintray or any other public repository. I performed following actions to use that plugin in my project. Step 1: Build the...
View ArticleGSON tip: @JsonProperty equivalent
Jackson has a very useful annotation @JsonProperty that gives developer the option to provide a name that will be used to map data from JSON to the value object. This is very useful when REST API you...
View ArticleWord count example in Java 8
Following code snippet shows how you can write a word count program using Java 8 Stream API. The better solution is using toMap collector as shown below. Even better version can be written using...
View ArticleGSON tip: Setting ISO 8601 Date Time format with nano second precision
Today, I had to parse an ISO 8601 date that was returned as part of a JSON response from a REST service. With default settings GSON can’t parse the date like 2015-09-22T17:21:32.70856998Z. To make it...
View ArticleGetting Started with vSphere EXSi — The Missing Tutorial
Getting Started with vSphere Today, I got an opportunity to work with vSphere. The plan for the day was to install vSphere on of our machine and then connect to it using a Python API so that we can...
View Article