Author: Pallav Gupta

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