Welcome to my website!

My name is Ivan Demchenko. I am a software engineer, currently working at Postman. I use this space to experiment with tech and share my learnings along the way.

Is JavaScript OOP or Functional?

A colleague of mine asked a good question: does TypeScript make JavaScript a better OOP language? To answer this question, I decided to compare OOP JavaScript to its opposite, Functional JavaScript. TypeScript has become crazy popular. Many people bet on it as a magical language that will solve their JavaScript problems. Well, it won’t. As Kyle Simpson described in his upcoming book, the quirks of JavaScript don’t disappear. In my opinion, we should not attribute any superpowers to TS apart from just helping developers to feel more confident in the larger codebase....

August 31, 2022 · 3 min

Use Tailwind as CSS abstraction in CSS modules

Tailwind provides a solid base level, sort of a starting point for your application. The library is a set of utility CSS classes that use Custom CSS properties (a.k.a CSS variables). Some of these variables abstract away a default set of design tokens. As such, it is easy to create a dark theme (should a user prefer dark mode) or take some accessibility aspect into account (like reduced animations). I only described the tip of the iceberg....

February 26, 2022 · 3 min
Photo by David Holifield on Unsplash

Design Systems as a layered cake

How do we structure a Design System? How do we make sure the architecture allows more people to contribute to it? What if there’s already a Design System in place, but it doesn’t work? During my time at Personio, I participated in the process of re-thinking the existing Design System. I noticed that dissecting the system into layers helped us answer some tricky questions. So, bear with me. How it all starts In my experience, design systems always come after the main Product....

October 28, 2021 · 7 min

UI library as a mono-repository. Part 3

As we progressed with our mono-repository endeavour, we noticed some weird behaviour. It worked like charm in the apps. But not in our Storybook. Besides, sometimes tests would fail for no obvious reason. Storybook is a de-facto standard tool for developing and demonstrating your components in action in the real environment. We also used Jest for testing. So, naturally, we didn’t want to give them up. Seems like our setup is not finished yet....

October 27, 2021 · 3 min

UI library as a mono-repository. Part 2

Let’s talk about CSS files and modules. Unfortunately, they are often treated as if they were a second class entities. We need to fix this situation. Treating CSS dependencies the way we treat other dependencies Let’s talk about the dependencies between UI components. In JS files, we mark dependencies by import-ing or require-ing them. Packages clearly define dependencies in the package.json file. But a package is not only JS files, but also CSS files....

October 26, 2021 · 3 min

UI library as a mono-repository. Part 1

Welcome to the first instalment of the series dedicated to the re-architecture of a UI library. I helped my company to transition from the monolithic setup to a mono-repository by leading this project. This is all very familiar It seems like this is a common topic these days: Deprecate monoliths and move toward micro-frontend/micro-service architecture. However, many UI libraries start as a monolith. Meaning, there’s a single distribution for the whole library....

October 25, 2021 · 6 min
Photo by Cathryn Lavery on Unsplash

Consider note-taking, you won't regret

TL;DR: keep track of your thoughts and ideas. In our lives, we consume tons of information, have heaps of various experiences and, generally, learn a lot. We read books, watch videos, attend lectures, listen to podcasts, etc. In other words, we consume the ideas and thoughts of other people. Mine vs others' However, sometimes, we make our own discoveries. It could happen during a conversation with your colleague about a book we’re reading....

October 24, 2021 · 2 min

Life is too short to complain about bad decisions of other people

One morning, taking a cold shower (against my will) a thought crossed my mind. I realised how complaining about the absence of hot water due to my landlord’s decisions is similar to what I have been hearing from software engineers. (Yes, ideas come during taking shower) It all started in July 2021. I received an email from my landlord saying something along the lines of “I decided to replace the hearing system so that we all benefit from less emission and less costs”....

September 6, 2021 · 2 min

Generating a power set of a set

There’s a class of problems that deal with subsets, permutations and so on. Let’s find a way to generate a power set of a set with distinct elements. This is a problem #78 on LeetCode. What is backtracking? According to Wikipedia, backtracking is a general algorithm (or an idea) of searching all the solutions by reducing the search space. It’s really close to brute force, try all the options. But at some point we need to take a step back (backtrack) if we cannot proceed....

September 1, 2021 · 2 min

Variadic attributes with TypeScripts Discriminated Unions

Sometimes, we need to create a component that serves multiple use-cases. As such, depending on some key attribute, the set of all others might differ. One example is a date picker component. Let’s see how we can implement it. Imagine our date picker should allow a consumer to select a single date of a range of dates. Let’s try to visualise such use-cases: <DatePicker onChange={handleOnChange} theDate={someDate} /> <DatePicker mode="range" onStartDateChange={handleStartDateChange} onEndDateChange={handleEndDateChange} startDate={someStartDate} endDate={someEndDate} /> We can describe such behaviour in types like this:...

November 10, 2020 · 2 min