The most conservative definition of immutability boils down to having objects which respective states cannot change after the initial assignment. Investing into applying this software pattern to all objects in a project can provide returns in better readability, improved understanding of code and advanced thread safety (in systems which support threads). The following article provides all information I find relevant for TypeScript developers, so they can reason about the need for ubiquitous immutability in their projects, based on the underlying functional-programming theory, the native support of the aforementioned concept in the language, and the best available practices.

Arguments for Immutability

In the traditional…

Since JavaScript introduced a primitive type called symbol in ECMAScript 2015, TypeScript supports it natively as well. The privilege of coding in this static-typed language gives developers the possibility to use types to enforce certain boundaries, and thus, speeds up the very development process. Today I will go through the most popular usages of the symbol type that could enhance the reader's workflows.

The most basic constructor invocation for a symbol.

Attribute Deserialization Mitigation

Serialisation in JavaScript might easily become tricky due to complex rules which govern the primitive and wrapper type checks, especially when talking about the typeof operator. Projects that rely on serialization done properly, usually use a well-tested…


As a software developer, I have observed various methodologies for choosing the primary key of a table. Some programmers exhibit proclivity for purposefully creating new columns to serve as the aforementioned key, while the others usually look for a solution that involves the already-existing columns. I would like to approach the said problem from an engineering perspective, taking into account available theories and common experiences, especially in the distributed-systems department.

Candidate Keys

When designing a table, database designers should ask themselves the following question — how to identity a particular row inside? The process of finding an answer might in turn reveal…

Even though the notion of intrinsic types might baffle the reader, I will not define them right away, as I want to introduce the concept using a practical example. I would love to start the article with the following question, something I have asked myself in various forms over the years:

In an ideal, statically-typed language, how could one define the string capitalisation type, using the properties of its type system?

I could substitute string capitalisation with string permutation and the issue still remains valid, as long as it touches not the abstraction of types, but their intrinsic properties.

Solving the Assignment


Any distributed system might run into emergencies, either because of an accident or an attack. A supposedly harmless action, like the execution of a script, might wreak havoc on an entire platform, rendering it unusable by end-users. This article shows how software developers can prepare a system for emergencies before they even occur.

Photo by Jay Heike on Unsplash

I want to write a disclaimer that I am not a software security expert, but a full-stack software developer, and all information provided in this article come from my coding experience. I want to discuss the major possibilities of preparing and dealing with emergencies, but I do…

The type system of TypeScript makes it possible to use recursive and nested types. Under certain scenarios, software developers can flatten types with nested values to gain simplicity; for instance, when flattening a two‐dimensional array to a one-dimensional one. This article outlines the relevant parts of the category theory connected to flattening and showcases exemplary implementations.

Photo by CHUTTERSNAP on Unsplash

The Category Theory

The category theory proposes a construct of a monad, a value container that acts as proxy for manipulation of applicable values. In functional programming, monads serve as fundamental structures used for holding values within computational pipelines. …

Any distributed system resolves around sharing information between its distinct components, frontend or backend alike. In this article, I would like to focus on establishing communication between different backends. I have outlined reasons, goals, and methods for communication for the reader to understand the concept from all angles.

Photo by Pavan Trikutam on Unsplash

Reasons for Communication

Backends have to reach other backends within a distributed system because of:

  • an explicit user action (sometimes acting as their proxy),
  • an implicit system operation (e.g., periodical tasks).

A rule of thumb dictates that a user action should require fewer permission than a system operation. …

In a distributed system, microservices exchange information between one another, using predefined communication protocols. Some disruptions in data serialization might occur when software developers alter different microservices independently. In this article, I will revisit the most relevant practices for versioning serializers and spreading their changes throughout a system.

Communication Protocols

The OSI model establishes 7 abstraction layers for communication over the Internet. Microservices usually exchange information using the last, seventh layer, called the application layer, leveraging either preexisting protocols like HTTP or custom-made ones. I find it significant to note that the HTTP/2 protocol relies on the TCP protocol (the transport layer)…

Software developers can reason through any technical system as a sequence of transitions between states. If systems architects plan their designed system around explicit series of state changes triggered by events, they will classify it as one that follows the principles of the event-driven architecture. A developer can apply such architecture on different project scopes without involving pipelines to distribute messages across a system.

Arguably, almost anything, tangible or not, might have an associated state and rules for state transitions — one could think of this operation as a way of moving a system from a particular state to the…

In my previous article, I wrote about a selection of runtime operators in TypeScript. In this very article, I would like to discuss the most relevant compile-time operators, based on my experience as a software developer. These operators enrich the type system by providing a grammar layer for manipulating type information and they leave no runtime trace.

All the compile-time TS operators I could think of. Have I included all of them?

Compile-time Operators

The typeof operator

TypeScript supports structural typing, which allows software developers to declare variables without specifying the exact nominal type. One variable (type) can implement multiple nominal types as only property names and their structural types, applied recursively, a matter for the implementation-matching algorithm. …

Gregory Pabian

Full-stack Software Developer that loves building products.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store