Author Archives: acrocontext

FP – Gang of four failed me on designing multi threaded and concurrent aware software

Modern hardware force us to design softwares with multi-threaded and concurrent aware code. But Gang of four design principal didn’t show me how to design scalable software by avoiding racing condition and thread locking because Gang of four design pattern … Continue reading

Posted in Functional Programming, Programming | Leave a comment

FP – Relationship between Applicative Functor and Monad

Applicative Functor has the following two properties. Pure: create a functor from value. Apply: a function taking arguments which are a Functor having a function and a Pure. This function will return the Functor after applying the function inside the … Continue reading

Posted in Functional Programming, Programming | Leave a comment

Java – Open addressing hash implementation in Java

IdentityHashMap class

Posted in Java, Programming | Leave a comment

Java – headMap, tailMap and subMap in NavigableMap

NavigableMap collection on Java provide methods to return the view of Map on sorted order of key. The most common methods are headMap, tailMap and subMap. headMap example. output If inclusive is true on calling headMap(“3”, true), it will be … Continue reading

Posted in Java, Programming | Leave a comment

Java – Java 8 Comparator to replace Guava compound comparing

Guava example Java 8 example

Posted in Java, Programming | Leave a comment

Java – Guava API to implement compareTo with considering sorting ordering

Example of a chained comparison statement.

Posted in Java, Programming | Leave a comment

Java – The article of Stream API under the hood

The following article is explaining the under the hood Java 8 Stream API. https://www.ibm.com/developerworks/library/j-java-streams-3-brian-goetz/index.html

Posted in Java, Programming | Leave a comment