Functional Programming

photo of a man programming

Scala’s Fold, FoldLeft, and FoldRight Functions: A Comprehensive Guide

Reading Time: 3 minutes Functional programming is becoming increasingly popular and widely used in today’s programming world. And Scala is a language that fully supports functional programming. One of the most valuable functions in Scala is the fold function, which is available in three forms: fold, foldLeft, and foldRight. This blog post will explore these three functions and understand how they work. Fold The fold function takes an initial Continue Reading

woman holding macbook

How Scala met Dotty?

Reading Time: 2 minutes It all began in 2012 when the first commit for Scala 3 was made and it was decided to base Scala 3 on DOT. What is DOT? Before we go further into the story, let’s get to know about DOT. DOT, an abbreviation for Dependent Object Types, is a new type-theoretic calculus which models path-dependent types, abstract type members, and it creates a mixture of Continue Reading

Developing programming and coding technologies working in a software engineers.

How to convert Spark RDD into DataFrame and Dataset

Reading Time: 4 minutes In this blog, we will be talking about Spark RDD, Dataframe, Datasets, and how we can transform RDD into Dataframes and Datasets. What is RDD? A RDD is an immutable distributed collection of elements of your data. It’s partitioned across nodes in your cluster that can be operated in parallel with a low-level API that offers transformations and actions. RDDs are so integral to the Continue Reading

How To Perform Operations on ZIO Fibers

Reading Time: 3 minutes In this blog post, we will discuss ZIO fibers and how we can use them. We will also get a quick overview of operations on ZIO fibers. Concurrency in ZIO ZIO is a highly concurrent framework powered by fibers, which are lightweight virtual threads that enable huge scalability when compared to threads, reinforced with resource-safe cancellation, which supports several features in ZIO. This robust concurrency Continue Reading

Hacker hands using laptop computer to code

Pattern Matching and Its Types in Scala

Reading Time: 4 minutes In this blog, we will read about pattern matching in Scala followed by various types of patterns in match expressions. What is Pattern Matching? Pattern matching in Scala is a powerful mechanism of checking a value against a pattern. Thus, we match a value against a pattern and a successful match deconstructs the value into its constituent parts to be used further. While providing the Continue Reading

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

Businessman playing digital tablet in cafe

How to write unit test in Scala ZIO

Reading Time: 3 minutes ZIO is a Scala library for creating asynchronous, concurrent, and fault-tolerant applications. It is based on the concept of “effects” and provides a powerful and flexible way to express and compose computations that may have side effects, such as reading from a file, writing to a database, or making an HTTP request. ZIO offers a full-featured ecosystem for building applications, including libraries for common tasks Continue Reading

Publish and receive messages in Google Cloud Pub/Sub

Reading Time: 4 minutes What is Pub/Sub? Cloud Pub/Sub is a message queuing service that allows you to exchange messages between applications and microservices. It’s a scalable, durable, and highly available message-passing system that helps you build event-driven architectures. In this tutorial, we will show you how to use the Google Cloud console to publish and receive messages in Cloud Pub/Sub. We will also provide some tips on how 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

Visualizing data - abstract purple background with motion blur, digital data analysis concept

Synchronous and Asynchronous Fibers in ZIO

Reading Time: 2 minutes In this blog post, we will discuss operations on fiber both synchronous and asynchronous with the help of an example. ZIO ZIO is a highly concurrent framework, powered by fibers, which are lightweight virtual threads that achieve massive scalability compared to threads, augmented with resource-safe cancellation, which powers many features in ZIO. However, this powerful concurrency model lets you do more with less, achieving highly Continue Reading

Metaverse digital Avatar, Metaverse Presence, digital technology, cyber world, virtual reality

Introduction to ZIO Fibers and Fiber Data Type

Reading Time: 3 minutes In this blog post, we will discuss fibers in ZIO, and how are they different from threads. Introduction ZIO is a highly concurrent framework powered by fibers that are lightweight virtual threads. They enable tremendous scalability compared to threads and are reinforced with resource-safe cancellation, which supports several features in ZIO. What are Fibers? Fibers are lightweight equivalents of OS threads which represent an ongoing 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

background

SOLID Principle in Scala

Reading Time: 3 minutes Introduction SOLID is one of the most popular design principles in object-oriented software development. Adopting these practices can prevent code smells, refactoring code, and Agile or Adaptive software development. It was promoted by Robert C Martin and is used across the object-oriented design spectrum. It’s a mnemonic acronym for the following five design principles : I’m going to try to explain SOLID Principles in the Continue Reading