Gert de Pagter is a software engineer at TactiPlan. His software engineering interests include testing and code quality.
Improve readability and reduce bugs by using array functions over loops
Aug 12, 2024
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
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
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
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
Learn how to enable mysql query log, and where to find the results
Sep 4, 2024
A while ago I got a new macbook, and installed firefox again. But I quickly ran into the issue where if you press escape, it closes the fullscreen. Which to me is an insane default, as I might press escape to try and close a modal for example.
Sep 4, 2024
This week I wanted to change all the .js files to .ts recursively in a folder. To change all .js files in the assets folder. With a bit of bash, using a for loop and mv I got the following command to rename all my .js to .ts files.
Aug 5, 2024
This week I noticed a test was flaky, and was occasionally failing in CI. So I wanted to re-run my script until it failed. I had no clue how to do this, so after a bit of trying, I got the following script. This keeps running vendor/bin/phpunit until it fails. You can save it as run.sh and then just run sh ./run.sh in your terminal, and it will keep running.
Aug 5, 2024
Learn how to back up files (and set them back) with a simple bash function, and do so right from the CLI
Jul 3, 2024