Home
Code Thoughts
Cancel

Lazy Evaluation in Scala

As per Wikipedia, “Lazy Evaluation is an evaluation strategy which delays the evaluation of an expression until its value is needed.” And today most of the modern programming languages support Lazy...

Closures in Scala

Before we begin discussing closures in Scala, let us have a quick look at a function. The function literal bill below accepts only one input parameter: netBill. However, the function calculates the...

Partial Functions in Scala

As the name suggests, partial functions are only partial implementations. They do not cover every possible scenario of incoming parameters. A partial function caters to only a subset of possible da...

Currying in Scala

Currying is named after Haskell Curry, an American mathematician. He is known for his work in combinatory logic. Currying is a means of transforming a function that takes more than one argument in...

Partially Applied Functions in Scala

Scala, like many other functional languages, allows developers to apply functions partially. What this means is that, when applying a function, a developer does not pass in all the arguments define...

Tail Recursion in Scala

Introduction Recursion is quite common in the programming world. As you probably know, it’s the process of solving a problem by breaking it down into smaller subproblems. You can easily spot recurs...

Designing Resilient Microservices

Resilience is an essential consideration while designing microservices. A microservice should embrace failure, whenever it happens. A microservice should be designed for all known failures. A few o...

Designing Automated Microservice

Another key design principle for microservices architecture is automation. The microservice architecture enables the teams to have frequent releases and a shorter time to production. But you certai...

Designing Autonomous Microservice

A microservice must be autonomous. A microservice interacts with many other microservices or external systems to serve the user. But, any change in external systems should not force a change in the...

Designing Observable Microservice

The microservice architecture leads to a distributed system that is scalable, flexible and reliable. However, it comes at an expense of added complexity. The microservices interact with each other ...