RSSAmplifier

Blog

Artem Sapegin’s Blog

Coffee first frontend engineer, photographer, leathercrafter, food and coffee enthusiast.

sapegin.meRSS feed ↗20 posts

Latest posts

Thoughts on using AI for software development

My somewhat random and disorganized thoughts and experiences on using AI for software development.

Washing your code: don’t make me think

All the different ways programmers like to write clever code, and why we should avoid clever code as much as possible.

Washing your code: divide and conquer, or merge and relax

Splitting code into functions and modules, when the right time is to introduce an abstraction, and when it’s better to sleep on it.

Better autosave and autoformat in Visual Studio Code

Avoid autoformat messing up your code when you need to look something up in the docs halfway through writing a line of code.

Modern React testing, part 5: Playwright

Learn how to test React apps end-to-end with Playwright, how to mock network requests with Mock Service Worker, and how to apply testing best practices to write integration tests.

How I stay (more) focused with ADHD

I could never stay focused on one thing for a long time. These tips help me stay focused and productive.

Typewriter 2.0: search for the perfect writing experience on iPad

I struggle writing on my desk, so I wanted to find a great mechanical keyboard for iPad that I can take to some nice café with me.

Healthier way to open source your code

Open source is about sharing your code. Anything else is optional. Don’t want to spend time answering issues and reviewing pull requests? It’s totally up to you!

Why I quit open source

Four main reasons I stopped maintaining most of my open source projects after ten years of contributing regularly.

Hiding tabs completely in Visual Studio Code

I always disable tabs in code editors because they distract me. [!update] Looks like there’s finally a built-in way of disabling tabs: { "workbench.editor.showTabs": "none", "window.customTitleBarVisibility": "never" } So the hack explained below is no longer needed. By default Visual Studio Code shows tabs like this: We could disable the tabs in settings: { "workbench.editor.showTabs": false }…

Migrating my blog from Gatsby to Astro

Recently, I redesigned and rebuilt my site and blog from Gatsby to Astro, and would like to share my experience.

Washing your code: naming is hard

We all know that naming is one of the hardest problems in programming. Let’s look at many naming antipatterns, and how to fix them.

Healing my open source addiction

I started my first open source project in 2012 but 10 years later I quit it almost entirely because of its hostile culture. Recently, I found a hobby that gives me everything I liked about open source but without any of its downsides.

Washing your code: avoid comments

Some developers never comment their code, some comment too much. The former believe that the code should be self-documenting, the latter read somewhere that they should always comment their code. Both are wrong.

A rebel’s guide to pull requests, commits, and code reviews

I happened to have a somewhat controversial approach to pull requests. This approach has worked well for me for many years, and my colleagues seem to be happy with it. However, many would consider these practices atrocious — read on to find out on which side you are! I’ve written before on getting code reviewed faster and have published a frontend pull request checklist — check them out! [!story]…

Going offline

The Coronavirus allowed me to reflect on what’s important to me, and to see my life from a different point of view regarding work, open source, hobbies, and social networks over the past two years.

Transpiling ESM files inside node_modules

This is a gigantic hack but it seems to work, until ECMAScript modules (ESM) are more widely supported. Many npm modules are already published as ECMAScript modules but not all apps could import them. Iʼm using it on one of my Gatsby sites . The idea is to use esbuild to compile ESM files to CommonJS directly inside the node_modules folder on npm install. We’ll detect packages that need to be…

Writing cross-platform components for web and React Native

One of the selling points of React Native is code sharing between web, iOS, and Android — “seamless cross-platform” as they say on the homepage. Unfortunately, React Native gives us very few tools to write components that work on web and native, and the experience is far from seamless.

The most useful accessibility testing tools and techniques

Shipping accessible features is as important for a frontend developer as shipping features without bugs, learn about tools and techniques that will help you achieve that.

Detecting accessibility issues on CI with cypress-axe

Unless we check the accessibility of our pages every time we change them, it’s to easy to introduce regressions. Therefore, we should test accessibility during our Continuous Integration (CI) checks. Cypress-axe allows us to do exactly that, and it’s a good place to do that in Cypress because we already render all the pages in our end-to-end tests and run them during CI. Setting up cypress-axe…