Category: fp

Intro To Effect, Part 5: Software Transactional Memory in Effect

Software Transactional Memory (STM) offers a powerful and elegant solution to managing concurrency in functional programming environments. Through STM, you can create composable and maintainable concurrent applications with ease, effectively dealing with shared mutable state. In this article, we’ll dive into the concepts of STM, its core principles, and how it can be effectively utilized to build concurrent systems with data consistency and atomic operations.

Intro To Effect, Part 4: Concurrency in Effect

In this article, we will delve into the world of fibers and their role in functional effect systems like ZIO or Effect. By exploring fibers and their various features, we aim to equip you with the ability to handle concurrency effectively in functional programming environments. We will discuss different concurrency combinators and demonstrate how they simplify the management of concurrent and asynchronous operations.

Intro To Effect, Part 3: Managing Dependencies

When we’re writing programs, we usually deal with some kind of dependencies: databases, loggers, caches, telemetry… Setting up a full-blown Dependency Injection framework could be a solution to this, but Effect has some aces in its sleeves that make DI frameworks unnecessary. Let’s see how we can manage dependencies using Effect.

Intro To Effect, Part 2: Handling Errors

One of the most important aspects of programming is finding a reliable way of dealing with errors, making them visible, and making them actionable. In conventional TypeScript, we don’t have such means except, probably, @throws JSDoc annotation. Effect relieves this pain by bringing errors to the surface of type and giving you a lot of convenient instruments for handling them.

Intro To Effect, Part 1: What Is Effect?

Recently, Effect has gained incredible traction in the functional programming community. In this series of articles, I give an overview of Effect and its ecosystem. In the first article of the series, we take a look at what Effect<R, E, A> is, how to create, and how to compose effectful programs.

Primitives Were A Mistake

As developers, we deal with primitive data types — string, number, boolean — every day. But what if I tell you that in reality, you shouldn’t be using them at all? Using primitive types for data modelling is a dangerous practice that should be avoided.

Functional Programming Jargon, Part 1

Functional programming is infamously known for its cryptic math-like jargon: terms like monads, monoids, functors and isomorphisms seem to be very intimidating for inexperienced developers. But if we take a look at those concepts as programming patterns, everything becomes much clearer. In the first part of the series, I will take a closer look at the most common terms from FP jargon.

Making Illegal States Unrepresentable

In this article I present “making illegal states unrepresentable” approach to modelling business domains in TypeScript. The article is based on the talk I gave at ZED Conference, and covers topics like opaque types, type-level programming, Tagless Final and indexed monads.

Higher-Kinded Data in TypeScript

Higher-kinded data is an approach of making data types kind-polymorphic, which supercharges their usage scenarios! In this article I show how to encode HKD in TypeScript, and what benefits it brings to the table.

Comments as education

A little note about comments in code as a tool for education.

Intro to fp-ts, part 4: Tasks as an alternative to Promises

In the fourth post of the series “Intro to fp-ts” I explain the concept of a task — a lawful lazy alternative to a ECMAScript Promise.

Intro to fp-ts, part 3: Option and Either

In the third post of the series “Intro to fp-ts” I’ll demonstrate two widely-used functional concepts — Option and Either, and show how they substitute nullables and exceptions.

Intro to fp-ts, part 2: Type Class Pattern

In the second post of the series “Intro to fp-ts” I’ll explain “type class” pattern, and show how to apply it for ad-hoc polymorphism.

Intro to fp-ts, part 1: Higher-Kinded Types

In the first post of the series “Intro to fp-ts” I’ll take a look at the concept of higher-kinded types, and how to implement them in TypeScript using lightweight higher-kinded polymorphism.

#MonadicMonday compilation: July

In 2019 I started an activity in Twitter called #monadicmonday – each Monday I posted a thread about some FP stuff which is useful and is easy to start using right away. This is a final compilation of the last month, July.

#MonadicMonday compilation: June

In 2019 I started an activity in Twitter called #monadicmonday – each Monday I posted a thread about some FP stuff which is useful and is easy to start using right away. This is a compilation of the third month, June.

#MonadicMonday compilation: May

In 2019 I started an activity in Twitter called #monadicmonday – each Monday I posted a thread about some FP stuff which is useful and is easy to start using right away. This is a compilation of the second month, May.

#MonadicMonday compilation: April

In 2019 I started an activity in Twitter called #monadicmonday – each Monday I posted a thread about some FP stuff which is useful and is easy to start using right away. This is a compilation of the first month, April.

Circuit Breaker in a Functional World

In this article I would like to talk a bit about one of the most commonly used patterns in enterprise architecture — Circuit Breaker — and its implementation using purely functional approach.

Typesafe Frontend Development

In this article I’ll give a quick overview of some of the most useful functional programming concepts for front-end development.

Category: typescript

Intro To Effect, Part 5: Software Transactional Memory in Effect

Software Transactional Memory (STM) offers a powerful and elegant solution to managing concurrency in functional programming environments. Through STM, you can create composable and maintainable concurrent applications with ease, effectively dealing with shared mutable state. In this article, we’ll dive into the concepts of STM, its core principles, and how it can be effectively utilized to build concurrent systems with data consistency and atomic operations.

Intro To Effect, Part 4: Concurrency in Effect

In this article, we will delve into the world of fibers and their role in functional effect systems like ZIO or Effect. By exploring fibers and their various features, we aim to equip you with the ability to handle concurrency effectively in functional programming environments. We will discuss different concurrency combinators and demonstrate how they simplify the management of concurrent and asynchronous operations.

Intro To Effect, Part 3: Managing Dependencies

When we’re writing programs, we usually deal with some kind of dependencies: databases, loggers, caches, telemetry… Setting up a full-blown Dependency Injection framework could be a solution to this, but Effect has some aces in its sleeves that make DI frameworks unnecessary. Let’s see how we can manage dependencies using Effect.

Intro To Effect, Part 2: Handling Errors

One of the most important aspects of programming is finding a reliable way of dealing with errors, making them visible, and making them actionable. In conventional TypeScript, we don’t have such means except, probably, @throws JSDoc annotation. Effect relieves this pain by bringing errors to the surface of type and giving you a lot of convenient instruments for handling them.

Intro To Effect, Part 1: What Is Effect?

Recently, Effect has gained incredible traction in the functional programming community. In this series of articles, I give an overview of Effect and its ecosystem. In the first article of the series, we take a look at what Effect<R, E, A> is, how to create, and how to compose effectful programs.

Primitives Were A Mistake

As developers, we deal with primitive data types — string, number, boolean — every day. But what if I tell you that in reality, you shouldn’t be using them at all? Using primitive types for data modelling is a dangerous practice that should be avoided.

Functional Programming Jargon, Part 1

Functional programming is infamously known for its cryptic math-like jargon: terms like monads, monoids, functors and isomorphisms seem to be very intimidating for inexperienced developers. But if we take a look at those concepts as programming patterns, everything becomes much clearer. In the first part of the series, I will take a closer look at the most common terms from FP jargon.

Making Illegal States Unrepresentable

In this article I present “making illegal states unrepresentable” approach to modelling business domains in TypeScript. The article is based on the talk I gave at ZED Conference, and covers topics like opaque types, type-level programming, Tagless Final and indexed monads.

Compile-time validation of UUIDs

In this post I show how to use TypeScript literal string template types to get a compile-time UUID validation.

Higher-Kinded Data in TypeScript

Higher-kinded data is an approach of making data types kind-polymorphic, which supercharges their usage scenarios! In this article I show how to encode HKD in TypeScript, and what benefits it brings to the table.

Comments as education

A little note about comments in code as a tool for education.

Intro to fp-ts, part 4: Tasks as an alternative to Promises

In the fourth post of the series “Intro to fp-ts” I explain the concept of a task — a lawful lazy alternative to a ECMAScript Promise.

Intro to fp-ts, part 3: Option and Either

In the third post of the series “Intro to fp-ts” I’ll demonstrate two widely-used functional concepts — Option and Either, and show how they substitute nullables and exceptions.

Intro to fp-ts, part 2: Type Class Pattern

In the second post of the series “Intro to fp-ts” I’ll explain “type class” pattern, and show how to apply it for ad-hoc polymorphism.

Intro to fp-ts, part 1: Higher-Kinded Types

In the first post of the series “Intro to fp-ts” I’ll take a look at the concept of higher-kinded types, and how to implement them in TypeScript using lightweight higher-kinded polymorphism.

#MonadicMonday compilation: July

In 2019 I started an activity in Twitter called #monadicmonday – each Monday I posted a thread about some FP stuff which is useful and is easy to start using right away. This is a final compilation of the last month, July.

#MonadicMonday compilation: June

In 2019 I started an activity in Twitter called #monadicmonday – each Monday I posted a thread about some FP stuff which is useful and is easy to start using right away. This is a compilation of the third month, June.

#MonadicMonday compilation: May

In 2019 I started an activity in Twitter called #monadicmonday – each Monday I posted a thread about some FP stuff which is useful and is easy to start using right away. This is a compilation of the second month, May.

#MonadicMonday compilation: April

In 2019 I started an activity in Twitter called #monadicmonday – each Monday I posted a thread about some FP stuff which is useful and is easy to start using right away. This is a compilation of the first month, April.

Circuit Breaker in a Functional World

In this article I would like to talk a bit about one of the most commonly used patterns in enterprise architecture — Circuit Breaker — and its implementation using purely functional approach.

Typesafe Frontend Development

In this article I’ll give a quick overview of some of the most useful functional programming concepts for front-end development.

Category: typelevel

Typesafe Frontend Development

In this article I’ll give a quick overview of some of the most useful functional programming concepts for front-end development.

Category: circuit breaker

Circuit Breaker in a Functional World

In this article I would like to talk a bit about one of the most commonly used patterns in enterprise architecture — Circuit Breaker — and its implementation using purely functional approach.

Category: architecture

Circuit Breaker in a Functional World

In this article I would like to talk a bit about one of the most commonly used patterns in enterprise architecture — Circuit Breaker — and its implementation using purely functional approach.

Category: monadic monday

#MonadicMonday compilation: July

In 2019 I started an activity in Twitter called #monadicmonday – each Monday I posted a thread about some FP stuff which is useful and is easy to start using right away. This is a final compilation of the last month, July.

#MonadicMonday compilation: June

In 2019 I started an activity in Twitter called #monadicmonday – each Monday I posted a thread about some FP stuff which is useful and is easy to start using right away. This is a compilation of the third month, June.

#MonadicMonday compilation: May

In 2019 I started an activity in Twitter called #monadicmonday – each Monday I posted a thread about some FP stuff which is useful and is easy to start using right away. This is a compilation of the second month, May.

#MonadicMonday compilation: April

In 2019 I started an activity in Twitter called #monadicmonday – each Monday I posted a thread about some FP stuff which is useful and is easy to start using right away. This is a compilation of the first month, April.

Category: higher-kinded

Intro to fp-ts, part 1: Higher-Kinded Types

In the first post of the series “Intro to fp-ts” I’ll take a look at the concept of higher-kinded types, and how to implement them in TypeScript using lightweight higher-kinded polymorphism.

Category: typeclass

Intro to fp-ts, part 2: Type Class Pattern

In the second post of the series “Intro to fp-ts” I’ll explain “type class” pattern, and show how to apply it for ad-hoc polymorphism.

Category: nullable

Intro to fp-ts, part 3: Option and Either

In the third post of the series “Intro to fp-ts” I’ll demonstrate two widely-used functional concepts — Option and Either, and show how they substitute nullables and exceptions.

Category: exception

Intro to fp-ts, part 3: Option and Either

In the third post of the series “Intro to fp-ts” I’ll demonstrate two widely-used functional concepts — Option and Either, and show how they substitute nullables and exceptions.

Category: error handling

Intro to fp-ts, part 3: Option and Either

In the third post of the series “Intro to fp-ts” I’ll demonstrate two widely-used functional concepts — Option and Either, and show how they substitute nullables and exceptions.

Category: task

Intro to fp-ts, part 4: Tasks as an alternative to Promises

In the fourth post of the series “Intro to fp-ts” I explain the concept of a task — a lawful lazy alternative to a ECMAScript Promise.

Category: taskeither

Intro to fp-ts, part 4: Tasks as an alternative to Promises

In the fourth post of the series “Intro to fp-ts” I explain the concept of a task — a lawful lazy alternative to a ECMAScript Promise.

Category: promise

Intro to fp-ts, part 4: Tasks as an alternative to Promises

In the fourth post of the series “Intro to fp-ts” I explain the concept of a task — a lawful lazy alternative to a ECMAScript Promise.

Category: education

Comments as education

A little note about comments in code as a tool for education.

Category: ddd

Making Illegal States Unrepresentable

In this article I present “making illegal states unrepresentable” approach to modelling business domains in TypeScript. The article is based on the talk I gave at ZED Conference, and covers topics like opaque types, type-level programming, Tagless Final and indexed monads.

Higher-Kinded Data in TypeScript

Higher-kinded data is an approach of making data types kind-polymorphic, which supercharges their usage scenarios! In this article I show how to encode HKD in TypeScript, and what benefits it brings to the table.

Category: higher-kinded data

Higher-Kinded Data in TypeScript

Higher-kinded data is an approach of making data types kind-polymorphic, which supercharges their usage scenarios! In this article I show how to encode HKD in TypeScript, and what benefits it brings to the table.

Category: hkd

Higher-Kinded Data in TypeScript

Higher-kinded data is an approach of making data types kind-polymorphic, which supercharges their usage scenarios! In this article I show how to encode HKD in TypeScript, and what benefits it brings to the table.

Category: uuid

Compile-time validation of UUIDs

In this post I show how to use TypeScript literal string template types to get a compile-time UUID validation.

Category: type-level

Compile-time validation of UUIDs

In this post I show how to use TypeScript literal string template types to get a compile-time UUID validation.

Category: illegal states

Making Illegal States Unrepresentable

In this article I present “making illegal states unrepresentable” approach to modelling business domains in TypeScript. The article is based on the talk I gave at ZED Conference, and covers topics like opaque types, type-level programming, Tagless Final and indexed monads.

Category: basics

Functional Programming Jargon, Part 1

Functional programming is infamously known for its cryptic math-like jargon: terms like monads, monoids, functors and isomorphisms seem to be very intimidating for inexperienced developers. But if we take a look at those concepts as programming patterns, everything becomes much clearer. In the first part of the series, I will take a closer look at the most common terms from FP jargon.

Category: essay

With Simplicity Comes Clarity

I decided that I want to write not only about programming, but also about other things that deeply interest me — like education, knowledge management, or leadership methods. In this short essay, I describe my journey in knowledge management and what system I use in my daily work.

Category: knowledge management

With Simplicity Comes Clarity

I decided that I want to write not only about programming, but also about other things that deeply interest me — like education, knowledge management, or leadership methods. In this short essay, I describe my journey in knowledge management and what system I use in my daily work.

Category: personal

With Simplicity Comes Clarity

I decided that I want to write not only about programming, but also about other things that deeply interest me — like education, knowledge management, or leadership methods. In this short essay, I describe my journey in knowledge management and what system I use in my daily work.

Category: zettelkasten

With Simplicity Comes Clarity

I decided that I want to write not only about programming, but also about other things that deeply interest me — like education, knowledge management, or leadership methods. In this short essay, I describe my journey in knowledge management and what system I use in my daily work.

Category: data modelling

Primitives Were A Mistake

As developers, we deal with primitive data types — string, number, boolean — every day. But what if I tell you that in reality, you shouldn’t be using them at all? Using primitive types for data modelling is a dangerous practice that should be avoided.

Category: effect

Intro To Effect, Part 5: Software Transactional Memory in Effect

Software Transactional Memory (STM) offers a powerful and elegant solution to managing concurrency in functional programming environments. Through STM, you can create composable and maintainable concurrent applications with ease, effectively dealing with shared mutable state. In this article, we’ll dive into the concepts of STM, its core principles, and how it can be effectively utilized to build concurrent systems with data consistency and atomic operations.

Intro To Effect, Part 4: Concurrency in Effect

In this article, we will delve into the world of fibers and their role in functional effect systems like ZIO or Effect. By exploring fibers and their various features, we aim to equip you with the ability to handle concurrency effectively in functional programming environments. We will discuss different concurrency combinators and demonstrate how they simplify the management of concurrent and asynchronous operations.

Intro To Effect, Part 3: Managing Dependencies

When we’re writing programs, we usually deal with some kind of dependencies: databases, loggers, caches, telemetry… Setting up a full-blown Dependency Injection framework could be a solution to this, but Effect has some aces in its sleeves that make DI frameworks unnecessary. Let’s see how we can manage dependencies using Effect.

Intro To Effect, Part 2: Handling Errors

One of the most important aspects of programming is finding a reliable way of dealing with errors, making them visible, and making them actionable. In conventional TypeScript, we don’t have such means except, probably, @throws JSDoc annotation. Effect relieves this pain by bringing errors to the surface of type and giving you a lot of convenient instruments for handling them.

Intro To Effect, Part 1: What Is Effect?

Recently, Effect has gained incredible traction in the functional programming community. In this series of articles, I give an overview of Effect and its ecosystem. In the first article of the series, we take a look at what Effect<R, E, A> is, how to create, and how to compose effectful programs.