Error accumulation in validation using Applicative Functors

This post explains how Applicative Functors can be used accumulate validation errors using Javaslang validation API.

Problem

To illustrate with an example, let’s say a given stream of pair of date strings in format MM/dd/YYYY, we want to print difference between them in number of years, months and days. ( For eg "01/01/2016 , 02/01/2016" should print 0 years , 1 months and 0 days).


Continue reading...

Better Exception Handling in Java 8 Streams Using Javaslang

In this post, I will provide tips for better exception handling in Java 8 streams using Functional Java library Javaslang.

Problem

To illustrate with an example, let’s say we want to print day of the week for given stream date strings in format MM/dd/YYYY.


Continue reading...

Nikola Tesla : Greatest genius who invented the Electrical Age

Nikola Tesla is a greatest genius who invented the electrical age of twentieth century. His inventions, patents, and theoretical work formed the basis of modern Alternating Current (AC) electricity, and contributed to the development of radio, television and many electrical inventions. I feel his story is important for anyone interested in history of invention and hence this blog post.


Continue reading...

Groovy - Dynamic properties in Config Slurper

In this post I will provide quick tip on how to use dynamic properties in Groovy Config Slurper. Groovy provides a nice utility ConfigSlurper for reading configuration files where settings can be overridden to different values for different environments.


Continue reading...

Explaining programming to kids at great american teach-in

I got wonderful opportunity to volunteer for great american teach-in at Morgan woods elementary school, Tampa. I did presentation on explaining programming to 3rd to 5th grade students. In this post, I will share by experiences on talking to kids about programming and conversations I had with them.

Preparation

The invitation letter from school suggested “share with students something about your career, your experiences, your hobby, or yourself”.


Continue reading...