programming

Back2Basics: The Story of Trait – Part 3

Reading Time: 4 minutes In our previous blog The Story of Trait – Part 2, we have discussed that traits can have implementation too and how they behave under the hood. In this blog, we will discuss mixins one of the most charming features of traits. Mixins are the wonderful concept of object-oriented programming. Sadly, some of the mainstream object-oriented programming languages like C++, Java, C#, have not provided Continue Reading

ScalaFP: Let’s Begin With Semigroups.

Reading Time: 3 minutes While we start looking into functional programming, the first thing we find out is “Category Theory” and if you are not a mathematician, then, it is really a huge pain to find out the answers to questions like “what, how and when“. We are facing the same issue but after digging into it, we conclude that first step is to clear the concepts of “semigroups“, Continue Reading

Back2Basics: The Story of Trait – Part 2

Reading Time: 3 minutes In our previous blog The Story of Trait – Part 1, we have discussed how traits are the just regular interfaces at the very basic form. In this blog, we will explore about traits can have method implementation too. We will continue with our previous example and modify it and see how trait behaves in different scenarios. https://gist.github.com/mahesh2492/912fa3da297660afc96c657815610e2d.js This file contains bidirectional Unicode text that Continue Reading

Back2Basics: Type Erasure in Scala

Reading Time: 3 minutes Scala has a really strong type system. Scala’s static type system is listed as one of its strong points. But even though Scala’s type system is theoretically very strong, in practice some type-related features are weakened by the restrictions and limitations of its runtime environment, i.e. Type Erasure. So, what is type erasure? Type erasure refers to the runtime encoding of parameterized classes in Scala. Continue Reading

Git Cheat Sheet: Basics

Reading Time: 2 minutes In this blog, I have listed some of the basic commands like installing and configuring the Git. How Git works is not the focus of this post. I have piled up some commands for performing basic operations in git. 1) Install Git sudo apt-get update sudo apt-get install git 2) Configuring username and email of git git config –global user.email “shivangi.gupta@knoldus.in” git config –global user.name Continue Reading

Getting Lazy With Scala

Reading Time: 4 minutes In this blog, we will talk about lazy evaluation in Scala. How we can add efficiency to our application? Efficiency is achieved not just by running things faster, but by avoiding things that shouldn’t be done in the first place. In functional programming, lazy evaluation means efficiency.  Laziness lets us separate the description of an expression from the evaluation of that expression. This gives us Continue Reading

Knolx: The Hidden Mystery Behind Scala Functional Programming

Reading Time: < 1 minute Hello everyone, Knoldus organized a session on 25th January 2018. The topic was “The Hidden Mystery Behind Scala Functional Programming”. Many people attended and enjoyed the session. In this blog post, I am going to share the slides & video of the session. Slides:

Exploring JEST: Java HTTP REST Client

Reading Time: 2 minutes Elasticsearch is a real-time distributed and open source full-text search and analytics engine. To integrate Elasticsearch to our application, we need to use an API. Elasticsearch gives us two ways, REST APIs, and Native clients. It’s easy to get confused about all the different ways to connect to Elasticsearch and why one of them should be preferred over the other. Available Elasticsearch clients are: Node Continue Reading

Java High-Level REST Client – Elasticsearch

Reading Time: 3 minutes Elasticsearch is an open-source, highly scalable full-text search and analytics engine. Using this, you can easily store, search, and analyze a large amount of data in real time. Java REST client is the official client for Elasticsearch which comes in 2 flavors: Java Low-Level REST client – It allows communicating with an Elasticsearch cluster through HTTP and leaves requests marshalling & responses un-marshalling to users. Continue Reading

Let’s dive deep into Apache Ignite

Reading Time: 4 minutes Let’s first have some basic understanding of Apache Ignite and then we will look more into its life cycle with the help of a demo application. Apache Ignite is an in-memory computing platform that is durable strongly consistent and highly available with powerful SQL, key value and processing APIs. Features : Durable Memory : Apache Ignite is based on the Durable Memory architecture that allows Continue Reading

Introduction to GraphQL – A Query Language for APIs

Reading Time: 6 minutes GraphQL is an API standard that provides a more efficient, powerful and flexible alternative to REST. It was created by Facebook in 2012 and was open-sourced in 2015 and is now maintained by a large community of companies and individuals from all over the world. GraphQL is just a specification, meaning it’s just a set of rules defined in a document. GraphQL is a query language designed Continue Reading

Having Issue How To Order Streamed Dataframe ?

Reading Time: 3 minutes A few days ago, i have to perform aggregation on streaming dataframe. And the moment, i apply groupBy for aggregation, data gets shuffled. Now the situation arises how to maintain order? Yes, i can use orderBy with streaming dataframe using Spark Structured Streaming, but only in complete mode. There is no way of doing ordering of streaming data in append mode and update mode. I Continue Reading

Scala Best Practices

Reading Time: 6 minutes The central drive behind Scala is to make life easier and more productive for the developer — and that includes me. Scala does this with three principal techniques: It cuts down on boilerplate, so programmers can concentrate on the logic of their problems. It adds expressiveness, by tightly fusing object-oriented and functional programming concepts in one language. And it protects existing investments by running on Continue Reading