Some time ago I managed to set up a 4 node K8s cluster on a set of Raspberry Pi's that were lying idle at my home. In case it interests you, please have a look here for the complete setup, the required components and on how to get it up and running
Read Moreblockchain-documentation This is a summary of the concepts around Blockchain technology! There are two types of Software architectures exists - Centralized & Distributed A Hybrid architecture is also possible Centrally Distributed architectures Blockchain simply put is a tool to maintain Trust & Integrity in a …
Read MoreVoid NullPointerException with Scala Option
May 22, 2017 · 3 min readIf you tell me that in your programming career, you have never been inflicted at-least once with a NullPointerException, you were simply the best programmer out there. During the early days of my career. I can remember times and times again, I ended up hitting NullPointerException's until I really made it a point to …
Read MoreTest private methods with Scala Test
Apr 26, 2017 · 2 min readI will not debate upon whether writing private methods are a code smell or not but rather just show how a private method can be unit tested using the Scala Test framework Here is our test class where we would write a unit test which tests a private method called myPrivateMethod in a class called MyClass 1class …
Read MoreScala's Dynamic Proxy
Mar 23, 2017 · 2 min readOne of the coolest features since Scala 2.10.3 are the Scala dynamic types. Let's look at what they are! A dynamic type is a type with which we can dynamically add fields / methods to an existing type. This is better explained with some examples Assume that we have a scala class as defined below: 1 class MyClass { 2 …
Read MoreConverting collections to and fro in Scala / Java
Mar 14, 2017 · 4 min readSay that you have to use a Java library in your Scala application and this Java library has a couple of API's that require you to pass a Java collection type. Let's see how we can cope with it by looking at the following examples: Suppose I have a Java ArrayList that contains some Integers that I want to map these List …
Read MoreImplicit Classes Scala 2.10 Extension Methods
Jan 16, 2017 · 2 min readHaving worked with C# in the last couple of months, writing extension methods was one of the cool features that I appreciated a lot! Extension methods are just a way to add new methods to the existing set of types. For example, the double type has several methods as part of the Scala API. If you now want to add a …
Read MorePattern Matching Scala Collections
Jan 4, 2017 · 2 min readOne of the astonishing features that Scala has is the pattern matching mechanism. Think of it like a Java Switch statement on Steroids. Pattern matching is such a powerful concept in Scala. Once you start using them, you'll find it inevitable to not using them. Let's look at some examples You want to pattern match a …
Read MoreMap'em up
Dec 27, 2016 · 2 min readNo, it is not the Map implementation that we are going to talk about. Let me ask you a very simple question. I assume that you have written functions or methods or routines or whatever you call it. What do you think that it actually does? ...., 3...., 2...., 1.... TimeUp. Let me answer that for you. A function or a …
Read More