Generics in Java

The below link dives in deeper to do Parametric Polymorphism in Java (simple stuff, fancy name) Source (you may probably read from here): https://purijatin.github.io/newsletters/generics/ IFrame for quick reference:

Practical wisdom to become Great programmers

I am frequently asked by college-going students, how to be great with programming. Here are my thoughts (applicable primarily for students, but may be relevant for others as well): Q1: How to go from being good to a great programmer? It all boils down to how much…

Scala Microservices

The book is finally out! This book teaches what it takes to build great applications using Microservices, the pitfalls associated with such a design, and the techniques to avoid them. The chapters associated with “Being Asynchornous” I think is world class.   http://www.scalamicroservices.com/

Monoid & MonoidK

In continuation to previous post. There is no documentation for MonoidK (Monoid for higher Kinds) on the cats site, hence let me try explaining it. Though Monoid first. Monoid `Monoid[T]` technically is a Semigroup with an `empty`/`Identity` function. i.e. There are two main properties: Associativity…

Scala World

Well I am back from Scala World. The most awesome scala conference of its keep! Not only were there awesome speakers: Paul Phillips (you have to admit, its not that easy finding Paul give scala talks now), Runar Bjarnason (found his talk to be the…

Happy Types

I had prepared this month’s monthly newsletter on generics in Java for my team. It may not be the one ring, but might help you gaining a step, to become the one ring in `Generics` in Java (In case if you are not already). It…

Cats

Cats is a simple and concise functional programming library for Scala. It appeals to me for its compactness and simpler class hierarchy. I have no formal education in category theory. But I am a student of theoretical Mathematics and have studied Abstract Algebra. Though I…

Type-information of generic type for a Parametrized class

Sometimes you feel that your code is world-class and deserves to be shared. There is one such class I have written for a personal project and find it to be extremely useful. You can view it here. Its called `CaptureType` This class obtains the type…

Parallel Streams!!

I am always skeptical of using parallel streams in Java8. For simple reason: You do not have control to decide the pool responsible for executing tasks. By default, common ForkJoinPool executes it. So in short when you do: The common pool executes it. And you…

Constraint Argument to Multiple Types

A lot of times while writing quick scripts (where I haven’t thought through well), I wish the compiler would be a bit lenient to allow any argument of different types. Like this: Duck typing looks well. But its too lenient for me. I dont like…