RSSAmplifier

Blog

(untitled)

Yuriy Bogomolov's personal blog

ybogomolov.meRSS feed ↗10 posts

Latest posts

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…

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…

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 series: What is Effect? Handling Errors Managing…

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…

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. Intro to Effect series: What is Effect? Handling Errors Managing Dependencies Concurrency in Effect…

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. Did you know that each time you write field: string or field: number , you’re most probably making a mistake? Seriously, in modern data…

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. With this short essay, I want to begin a new page in my writing, challenging myself to write not only about programming…

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. Functional…

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. What is an illegal state? From my perspective, an illegal state is such state of an application in which it demonstrates an…

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. Type-level UUID numbers It happens so that we can use recent TypeScript’s type system improvements to get a compile-time validation of UUID number, including validation of correctness of its version. We start with defining a set of allowed symbols for both hex alphabet and (separately)…