It's never too late to get a life

Configure Keyboard Layout Switching for Sway

A US keyboard layout increases my productivity as a developer, because characters like square brackets, pipe and backslash are easier to type than on a German keyboard. For the occasional German special character I like to use the AltGr key, preferably with the keys where they are already printed on my physical keyboard. From time to time I need to write longer German texts that don’t need a lot of special characters and need Umlauts instead.

Nonviolent Agile Retrospectives

In this article you’ll learn about agile retrospectives, the basic principles of Non-Violent Communication (NVC), and how applying those principles to a retrospective can improve the retrospective. If you’re already familiar with agile retrospectives, you can skip the sections explaining it. What is an agile retrospective? An agile retrospective is a meeting format, commonly used in software development, but also suitable for teams outside of software development. Its main purpose is the continuous improvement (Kaizen) of processes, collaboration and work itself.

Managing test doubles in PHP unit tests

The more dependencies a class has, the harder it becomes to initialize in unit tests with all its dependencies. Your tests will become longer and longer. This articles explores three ways to provide test doubles (also known as “mocks”) to your tested class, while keeping the tests as short and expressive as possible: Using properties in the test class, using a builder pattern with a fluent interface and using named parameters (available in PHP 8.

Using Doctrine connection array shapes with PHPStan

At work we’re using PHPStan to do a static analysis of our code, checking if the provided types match the required types. We are using the most restrictive setting that forces us to have type annotations for arrays. Recently, this led to an error when using Doctrine DBAL, using DriverManager::getConnection(). In this article I’ll explain how to use better type annotations for the parameter of DriverManager::getConnection(). Let’s say we have a test environment class that initializes a database connection, used by the tests for the database adapter.