Recently I stumbled across an article that presented the alphabet for my hometown. It compelled me to write one for TypeScript! To provide some educational value, I decided to enhance each letter’s section to contain a question.

These questions usually require some research on your part, and I believe they can be a great way to prepare for an interview, either as an interviewee or as an interviewer!

Let’s go!

A is for Any

Using the any type is the fastest way to silence most type-related problems in TypeScript. I would give the second place to the ts-ignore comment. …


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.

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…


Introduction

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

The…


As a software developer, I have always ensured the maintenance of the test architecture at all times. As a principle, I believe tests should exhibit quality on par with the production code. Now, how do we achieve that with TypeScript?

In my opinion, we need to choose a proper test framework first. I found great results with Mocha — it is flexible enough to help us leverage other libraries with it. Despite its simplicity, it supports building a respectable test architecture that fits TypeScript projects well — all by using hooks.

Mocha Hooks

Mocha provides 4 types of hooks:
* beforeEach (before every…


I transitioned from JavaScript to TypeScript a couple of years ago. Later on, I realized I was struggling significantly, complying with types and distinct architectural patterns. I understood I needed to change something in my development process to improve my coding experience.

This article serves as my opinion on the steps anyone can take to improve their TypeScript skills and write more robust code.

Fill in Your Knowledge Gaps

Even today, I remember my first job interview for a junior software developer position. Even though I knew the basics of computer science, the interviewer rightfully pointed out that I had many knowledge gaps.


Over the past few years, I took a deep dive into functional programming. Even though I came unscathed from this journey, I learned a lot along the way, especially when I applied it to my TypeScript projects. Today, I share my knowledge with you; I hope you can learn from my successes and failures.

I wrote this article from the point of view of a JavaScript/TypeScript developer. If you aren’t one, you might still find many issues relevant to different mainstream programming languages.

Applying FP everywhere

The paradigm of functional programming has been gaining a lot of traction in the mainstream, while, arguably…


I don’t usually play computer games because of my tight schedule, but when I do, I play strategies. I used my Easter break to try a quite popular city planning game. I immediately recognized a lot of tactics and ways of thinking I could move into my software development experience.

Can playing city-planning games enhance your software developer career?

I will try to answer that question in this article.

Expansion

The main objective of a city-planning game is to establish a city and expand it to its reasonable limits. The more districts the city has, the harder it gets to develop…


Distributed systems might use message queues or message streams for asynchronous communication between services. System designers can choose from many products, taking into account specific features, like message prioritization. In this article, I will focus on how to design said prioritization in virtually all message systems.

Message Systems

Simply put, message systems allow producers to send messages to consumers using brokers. Messages usually contain:

  • data (a sequence of bytes),
  • metadata (e.g., creation timestamp, creator information, or transmission-control information).

Systems that support topics (channels, buckets) require producers to declare the intended destination in message metadata.

A broker receives a message and then makes…

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