Author: Pallav Gupta

Analyzing data.

What is a Closure in Scala ? Why it is required ? How to use it ?

Reading Time: 2 minutes Objects are more flexible for certain use cases because they carry both data members and member functions, whereas a function does not have data members. So if there is a requirement to pass data members along with functions, How will we achieve it in functional programming ? The answer is yes, we can achieve it using a closure and a free variable. What is a Continue Reading

What is Docker ? How to use it ?

Reading Time: 3 minutes Docker is a software containerization platform, meaning you can build your application, package them along with their dependencies into a container and then these containers can be easily shipped to run on other machines. Now let’s talk about containers and containerization. Containers A container image is a lightweight, stand-alone, executable package of a piece of software that includes everything needed to run it: code, runtime, Continue Reading

background

How to learn Scala ?

Reading Time: 2 minutes In this article we will going to cover some introductory part about Scala programming language. Introduction to Scala A contemporary multi-paradigm programming language called Scala was also created to describe common programming patterns in a clear, beautiful, and type-safe manner. Surprisingly It smoothly combines elements of functional and object-oriented languages. Scala as Object Oriented Programming Language Every value is an object in Scala, making it Continue Reading

two businessmen outdoor using technology

How To Achieve Concurrency in ZIO?

Reading Time: 2 minutes This article is about ZIO’s support for asynchronous, parallel and concurrent programming and we will see how we can achieve concurrency using fibers model. Since ZIO is built on a fibre concept, we will start by studying what fibres are and how they vary from threads. We will learn the basic operations on fibers including forking them, joining them,and interrupting them. What are Fibers ? Continue Reading

exception handling

How to Handle Errors in Scala

Reading Time: 3 minutes Error handling is the process of handling the possibility of failure. For example, failing to read a file and then continuing to use that bad input would clearly be problematic. Noticing and explicitly managing these errors saves the rest of the program from various pitfalls. When an exception occurs, say an Arithmetic Exception then the current operation is aborted. Then the runtime system looks for an exception Continue Reading

Curried Functions in Simple Words in Scala

Reading Time: 2 minutes In this blog post, we will take a look at curried functions in Scala with the help of an example. What are Curried Functions? Currying is a technique or a process for modifying a function in Scala. This function converts several parameters into a single argument function. Curried functions have multiple parameter lists. It is widely used in a wide range of functional languages. Let’s Continue Reading

zio

How to handle Exceptions in Zio | Practical Implementation

Reading Time: 3 minutes In the previous blog ZIO Effects: How to Handle Errors? we have learned about How ZIO provides various means to handle and respond to failures. In addition to this blog, we will see all the ways to handle the exceptions with its Implementation. Either If the effect fails, the result is in the form of Left If the effect succeeds, the result is in the form Continue Reading

Why Should We Use Microservices Architecture

Reading Time: 2 minutes Before learning Why should we use Microservices Architecture, Firstly we need to understand Monolithic Architecture and its problems. What is Monolithic Architecture? Monolithic Architecture is a traditional way of building applications. Moreover, It’s like a large container that has tightly coupled with all the components. In conclusion, Each component fully depends on the other. UI parts packed with backend services in the Monolithic Architecture. As Continue Reading

zio

Introduction To Zio and its Data Types | Fibers

Reading Time: 3 minutes What is Zio? ZIO is a zero-dependency library for asynchronous and concurrent programming that is based on pure functional programming. It is ideal for mid to large-scale projects that require a lot of concurrency and speed.  Dependency Include ZIO in your project by adding the following to your build.sbt file: Scala 3 and Scala 2.13 will both work with no changes to the code. Nothing else will Continue Reading

What is Pure Function | Functional Programming in Scala

Reading Time: 2 minutes What is Functional Programming? Firstly, Functional programming is a programming paradigm in which everything is bound using pure mathematical functions. It’s a declarative programming approach. In contrast to an imperative style, which focuses on “how to solve,” it focuses on “what to solve.” Instead of statements, it uses expressions. A statement is executed to assign variables, but an expression is evaluated to create a value. Continue Reading

What is Akka | Akka Actors | Parallelism & Multithreading

Reading Time: 2 minutes What is Akka? Akka is a platform for designing scalable, resilient systems that span processor cores and networks. It allows you to focus on meeting business needs instead of writing low-level code to provide reliable behavior, fault tolerance, and high performance. Features provided by Akka Multi-threaded behavior – without the use of low-level concurrency constructs like atomics or locks. Thus, relieving you from even thinking Continue Reading

What are Case Classes in Scala

Reading Time: 2 minutes Case Classes in Scala Case classes in scala are regular classes with some extra toppings. Let’s discuss why they are high in demand. A case class with no arguments is declared as a case object rather than a case class. By default, the case object can be serialized. A Case Object is also like an object, which has more attributes than a regular Object and Case classes Continue Reading

scala

Recursion v/s Loops in Scala

Reading Time: 3 minutes Loops need mutation, As it keeps changing the value of the variable, Scala hates mutation. Why? What is Mutation? A mutation is changing an object, variable and is one of the common side effects. Now the question arises why does scala hate mutation? Mutation might result in ambiguity, unanticipated errors, and a difficult time debugging the problem. Mutation makes it more difficult to decipher code. Continue Reading