Introduction How to eliminate legacy code? Martin Fowler and Michael Feathers both agree that lack of tests are core factor in legacy code. With AI agents, tackling legacy code and turning it into “evergreen” code is easier than ever. What is legacy code? Ah, the familiar smell of legacy code waiting to be tackled. Do […]
What makes a test meaningful? How can tests shape better architecture? And what roles do humans and AI play? A few years ago I made a comment in a code review about a test description. That simple remark evolved into a few days’ debate that included architecture, code smells and other cool terms. How is […]
How to build a web component based application that integrates the BlueSky Social public API? Covered topics: TDD, BlueSky API, BlueSky bot (automation), AtProto SDK, Streaming, Web components. Introduction BlueSky is a (relatively) new Social network nowadays. It looks like a Twitter clone, only open source with much more control over the content one consumes. […]
On March 2023 I gave the keynote at ConfrontJS in Warsaw. I spoke about how we can become more professional as developers, my 5 tips for becoming such, and a final most-important take-home message to the audience.
Starting a project for me usually starts with setting up the testing infrastructure. The only exception is when one already exists. In this article we will learn two things. We will start from setting up vitest in the Tauri project. We will then learn how to write a test in JavaScript for a part that’s […]
Tests can improve communication and save time (and frustration). Bad tests can do the opposite. In this article, we’ll explore an example from real life of how bad tests are harmful and how good ones convey the right information. A Tale About a Title In Vivid, we needed to add a title to our button. […]
As a testing advocate, I frequently delve into “implementation details” and “public interfaces.” These terms refer to the inner workings of your API and how it’s presented to users. Rather than just defining them, let’s explore their significance through a real-world example. Witness how grasping these concepts enhances our code in practical scenarios. Once Upon […]
Tauri is a desktop apps framework built with Rust for its backend and JavaScript for its front end. The first thing I like to do in a project is set up a unit tests infrastructure. I found it surprisingly easy to do it in Rust. It has become a summer tradition with my son: we […]
In 12 minutes, I shared with my colleagues three tips I used to refactor tests of legacy code. Testing the API, ensuring the tests fail for the right reason, and avoiding the coupling pitfall are exhibited in this live session.
How do I approach a new feature in an open source project? How do I TDD a frontend feature? What do we use for cross-browser testing? All this and more in this live coding session recording This is the recording of the first live session. I developed a feature taken from the issues list on […]
How do you know your test is effective? How do you know your test protects you from breaking changes? And how can you do TDD without doing TDD? The best distillment of TDD taken from a TDD workshop in JFokus. We all know that tests are good, right? Reduce regressions, and increase confidence. If done […]
How can tests be your best documentation? What small changes can improve the contract between your code and its consumers? Learn how to improve your tests from a real-world example. Yes, we write them to ensure fewer things break before you push changes (a.k.a regression). The thing is – tests can be more than just […]
How to build a chrome extension, manipulate and interact with a page and publish it to the Chrome Web Store? Here’s how I created a Chrome extension that enables me to style the text in my posts and comments – and how you can do it too I post on Facebook occasionally. I guess many […]
How to avoid constant tests maintenance and regressions in your code? In this article, we will talk about a new term “the Coupling Pitfall”, what harm it is doing to your code, and a way to fix it. What are regressions and where can we catch them? Last week we had a production incident. An […]
When it comes to testing, checking a single function is different from testing a complete application at once. It helps to understand the flaws in any units of the application and allows the developers to take appropriate steps. How unit tests beneficial to you? Testing a single functionality is often referred to as unit testing. […]
Here are 6 practical lessons learned from a production incident, ui-test coverage (using playwright) and code review. Today we had a small incident in production – one of my teammates found out a feature in one of our component doesn’t work. This is a small retro here for the value of ui-tests (using playwright, but not just) […]
How to develop an algorithm using TDD? In this article we will implement the Diamond-Square algorithm using TDD. This article was inspired by Uncle Bob’s blog post TDD Lesson – Terrain Generation. Well, one of the things I did during the summer was to write an article about “How to Create Terrain and Heightmaps using […]
In this short article you will learn what you need to install in order to prepare a test environment for canvas operations with jest. After finishing the article, you will be ready for some canvas testing action! In the past few months, my kid and I been building HTML5 games. I’d might actually get you […]
This is going to be a short one. I’m using nrwl/nx a LOT. I’m also testing a LOT. Lately I needed to add a coverage report to one of my nrwl/nx repositories. The coverage tool I was using needed the coverage in one file, while the nrwl/nx creates the reports per library and app. So, […]
This post originated from a non-english post on Linkedin. Here’s a translation of the original post: Yes, it’s very important to me that the systems I develop are covered by tests. In this approach I trust that external libraries that I use in the system have been tested. A few times I’ve read about how […]
Lately I’ve started a to migrate our 5 y/o code base into a NRWL/nx monorepo. I’d might write the process of choosing NRWL/nx as our tech of choice in a different post (write in the comments or message me so I can see if there’s any demand for that 🙂 ). Anyway, while migrating the […]