avatar

Andres Jaimes

Setting up node and typescript

This article describes the creation process of a node application with TypeScript.

Installing nvm

There are multiple ways to install node but we have picked the nvm path. This method will allow us to have multiple versions of node installed on the …

Microservices Design and Best Practices

microservice architecture

Some of my notes and best practices learned over the years designing and developing microservices.

UI

  • Thin layer. Do not add any business logic to this layer.
  • Contains React code and may contain web assets.
  • Has a shared look and feel that provides …

Calling a DLL from MQL

There are times when we want access to additional data structures and function libraries than the ones provided by MetaTrader’s MQL. Besides native open-source MQL options, we can create our own Dynamic Link Library (DLL) in C# or C++ and link …

Parsing Json with the Play Framework

This article discusses different common scenarios for JSON parsing and conversion, useful when working with the Play Framework library. All the examples in the article, use one or more of the following library imports:

1import …

Scala Lectures

A curated list of Scala lectures on functional programming and design patterns.

Functional programming design patterns

In …

Using Cats Effect IO with the Play Framework

Cats Effect IO operations have to be performed at the highest level possible. So when working with the Play Framework the solution is to execute unsafeToFuture() in the controller methods.

1def get = Action.async { implicit request =>
2  service. …

Quick notes on functors

Functors

A functor is a design pattern that allows us to apply a function to a contextualized (wrapped) type. This is accomplished by implementing the map function:

1fmap :: (a -> b) -> f a -> f b

Notes on lazy evaluation

Lazy evaluation is a strategy that delays expression evaluation until their value is needed. It also avoids repeated evaluations by returning previously computed results by storing them in a lookup table.

Why isn’t lazy evaluation used …

Future Either

This implementation is based on the work of Malcolm, and exists because it provides the cleanest use of similar monads.

The base monad wraps an Either class in a Future class:

 1import scala.concurrent.{ExecutionContext, Future}
 2import scala.util.{ …