Posts

Why I prefer array functions over loops

Improve readability and reduce bugs by using array functions over loops

Aug 12, 2024

Being a software engineer is a lot like being a butcher

I was a butcher for roughly four years before I became a software engineer. (And nowadays, I’m a vegetarian.) And while one of the jobs doesn’t require you to work inside a refrigerator half the time, there are actually quite some similarities in how we keep our work environment clean.

Aug 7, 2024

Break the rules! (but only if you understand them)
Break the rules! (but only if you understand them)

We have a lot of 'rules' in software engineering, and we often want to break them. But be wary of breaking rules you don't fully understand yet.

Jul 31, 2024

PHP 8.2 changes to iterator functions I missed

This week I learned of a small change that got introduced in PHP 8.2 that I completely missed. The iterator_*() functions got an update, which make them actually usable when dealing with the iterable type. Now this is only really relevant if you are dealing with iterables that might not be arrays, but you need to use them as an array.

Jul 30, 2024

"Just use Psl for that"

Something I’ve been hearing myself says in every project that I have installed Psl in, is “Just use Psl for that”. And while some bits and bobs like array_find are getting into PHP 8.4, the library does so much more. In this post I’ll go over the bits that I use often, and maybe convince you to give it a try as well.

Jul 23, 2024

Why you should be typing your arrays in PHP
Why you should be typing your arrays in PHP

We have been able to natively type parameters of methods and functions in PHP for quite some time. In basically any version of PHP you should be running we can do something like the following:

Jul 17, 2024

How to fix "connect to host github.com port 22: Operation timed out"
How to fix "connect to host github.com port 22: Operation timed out"

Youre on holiday, and suddenly you cant push or pull your github or gitlab repos, find out why that could be, and how to fix it.

Jul 9, 2024

What is PHP's declare(strict_types=1); and why you should use it
What is PHP's declare(strict_types=1); and why you should use it

declare(strict_types=1) makes your code more strict, but what does it actually do?

Jul 4, 2024

Adding PHPStan to a legacy project

Learn how to integrate PHPStan, a powerful static analysis tool, into your PHP projects to enhance code quality and reduce errors, in a legacy project.

Jun 27, 2024

What ive been reading: Deep work by Cal Newport
What ive been reading: Deep work by Cal Newport

A book about deep work, on how to gain focus, and increase your productivity

Jun 26, 2024