Insights and perspectives to keep you updated.

Back2Basics: Scala Extractors in Detail

While working with the Case Classes closely, we have a very concise way to decompose an entity using pattern matching. The potent example is pattern matching on the Some(x) and None, as most of us know they are case class and case object respectively. The potential question that we have is do we have a provision to use similar patterns without having an associated case Continue Reading

Distributed Transactions and Saga Patterns

In a Knolx session organized by Knoldus, we discussed the idea of following Saga Patterns. For that to be more accessible, I’d like to share the session with the help of this blog. Service-oriented architecture has given us enough advantages to be a predominant architecture in our Industry, but it can’t be all sunshine and rainbows. There are use cases where monoliths are not only Continue Reading

Working with Rust: Understanding struct, impl, methods and self

While working with any programming language, we always have a requirement of creating custom data types. If you are familiar with any object-oriented language, there are classes that comprise data attributes and some methods to play with their context. The objects of these classes are used for reflecting the behaviors. Like other languages, Rust also provides us with all these flexibilities, but in its own Continue Reading

RUST can never be NULL

You might not know NULL was born more than a half-century ago, and it is still alive to create the mess for us, but not with RUST. Although it was considered to be BOOM for the coders, now it’s becoming a BANE for the programmer. With the emerging languages, creators are avoiding the implementation of NULL now. The inventor of NULL Tony Hoare[2] apologized for inventing it Continue Reading

Setting up cucumber and sbt in IntelliJ

If you want to look into a starter project where cucumber feature file can be run right from IntelliJ IDEA with sbt as a build tool, this blog is a perfect match.  I will put the below ingredients and complete recipe on how to write a feature file and plug it in with your implementation steps in IntelliJ IDEA. Ingredients: build.sbt First three lines may Continue Reading

Macros in Rust #1

Macros: Basically, macros are a way of writing code that writes other code, which is known as metaprogramming. I have also used ‘println!()’ macros in my previous blog. Here macros expand to produce more code than the code you’ve written manually. Metaprogramming helps us to reduce the amount of code we write and maintain.

ScalaFP: Firsthand With Scala-Cats Monads – #1

In the previous post, we had a look at the reasons behind the monads and how monads can help us design the programs in a functional style. Now we are going to explore some of the monads which are frequently used in the applications but not available within the Scala predefined libraries. We will be exploring the monads which are provided by the scala-cats functional Continue Reading

RUST: Begin the Journey with CODE

Hope so you have already gone through the first blog “RUST: Quick Start & Exploring Cargo” and ready to workout with your fingers and keys. You might be thinking about the basic programming concepts of RUST as a language. With the help of an example, I will try to cover the following points (practically): mutable, immutable variables Standard input/output (console) Functions Data type and conversion Loops: Continue Reading

Why Rust & What Is Rust

Why Rust?  In system programming languages we basically face two complex problems which are difficult to crack i.e. Secure and Multithreaded code. For this Rust has added its own goals of memory safety and data-race-free concurrency. What Is Rust?  Rust is a System programing language sponsored by Mozilla which describes it as a “safe,  concurrent and practical language,” supporting functional and imperative-procedural paradigms. It basically Continue Reading

RUST: Numeric Data Types

You must be wondering what is so special about numeric data types in RUST, that we are focusing on them so much, definitely, you will get to know after finishing this blog. Generally, other programming languages follow short, int, float, long, double etc as numeric data types as per their storage size and capacity while in RUST numeric data type are like : i[size_in_bits] or u[size_in_bits]  Here, i Continue Reading

Working with Rust: Formatting, Linting & Auto-completion

Every language has its own toolset for writing effective and clean code, Rust is no different. So in this blog, we would be describing how to format the rust code, while working with different editors or IDE. Formatting code is a mechanical task which takes both time and mental effort. By using an automatic formatting tool, a programmer is relieved of this task and can Continue Reading

Promise vs Observable in Angular

In Angular, we can use either Promise or Observable for handling asynchronous data. Both get and post method of Http and HttpClient return Observable and it can be converted into Promise using toPromise() method. So, what’s the difference when they both are dealing with asynchronous data. What actually the difference is? Promise emits a single value while Observable emits multiple values. So, while handling a HTTP Continue Reading

How to use extractors in Scala ?

  This blog will guide you through the basic understanding of extractors in scala. An extractor is an object that has an unapply method. It takes an object as an input and gives back arguments. Custom extractors are created using the unapply method. The unapply method is called extractor because it takes an element of the same set and extracts some of its parts,  apply method also called Continue Reading

%d bloggers like this: