Why I chose Elm for my side project

I built a browser extension using Elm - GoalMet - Achieve your goals. Even though Elm’s evolution is rather slow, the JS community can learn heaps from this wonderful language and its ecosystem. Here are the main reasons why I chose Elm for my side project. Stable ecosystem Everything I learned about Elm 2-3 years ago still applies. Even though I used Elm for anything substantial around two years ago, I could jump in and be productive immediately....

October 13, 2024 · 5 min

Who cares about the underlying tech? Why bother?

I recently had a conversation about why I insist that JavaScript (and especially TypeScript) developers should learn from Rescript, Elm, Go, Rust, and other languages. A person asked me: “Who cares? Users don’t care what language you use to build your product. Often the business doesn’t care either! There are plenty of companies with tons of spaghetti code, and they sell their products well! So why bother?” Well, I couldn’t spontaneously say why I care....

January 21, 2024 · 6 min

Model errors as data for better user and developer experience

A great product experience is when the product works as expected in the scenario it was designed for, and communicates with users in a meaningful way. As developers, we cannot control how and where our product will be used, or the user input. But we have the tools to guard the flow from unexpected inputs. In this post, I want to give two pieces of advice for people working in the JS ecosystem on how to create better programs....

January 15, 2024 · 4 min

Interfaces, good and bad

Designing applications can be a challenging task. Over the course of my career, I have developed a few guiding principles that I would like to share with you. These are more food for thought, rather than hard rules to follow. Throughout this article, I use adjectives like “good” and “bad” - purely subjectively. Why do we need interfaces? Public interfaces provide an overview of the capabilities of the module. If an interface and its methods have descriptive names (defined later), that interface can be a valuable addition to the documentation....

March 11, 2023 · 4 min

Dependencies on (front-end) frameworks

As modern front-end applications become increasingly complex, it is becoming more and more important to maintain the separation of concerns between the view layer and the business logic. New toys, old problems Having seen several modern codebases, I can say that history is repeating itself. Back in the day, when PHP was growing in popularity, but the ecosystem was not mature enough, the separation of concerns was a hot topic. For example, rushing to deliver the working code on time, people would query or write to a database directly from the views....

February 20, 2023 · 8 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

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