It’s a blessing in disguise that I do not have a big podcast backlog anymore and so fall back to audiobooks when going on longer walks with the dog.

Started to cry out of happiness after receiving a positive message as regards to my new job. The new employer and me we’ll figure something out together. 🥹

Didn’t want to go out for Napu’s longer walk, but I never ever have regretted going after all.

A dog (Napu) is watching into the camera, while giving paw, giving the impression it is agreeing with the post's statement

Uff. I’m clearly not made to sustain existential dread. Hopefully things with the new job will now work out. I had to stand my ground a little and did not enjoy saying “No!” to my new employer.

Trimmed Napu’s nails just now. Always an intense moment for the both of us. But with lots of little sausage pieces and lots of calm praise we managed to pull through. 🐶😊

A dog (Napu) is looking at the camera, somewhat unsure. In the corner of the image a pair of scissors and a nail cutter are visible.

Don’t want to jinx it but… (famous last words) I’ve had a good start to the work week so far and am even using my task manager to get the right things done. 💪

Dinner was a success, albeit too late. Now (or rather 30 min ago) off to sauna. Having a good calm time over here. 🧖‍♂️

Today’s dinner is going to be a nice mishmash: Potato mousse, creamed spinach, red beed patties, green asparagus and fried eggs. At least it’s going to be colorful. 😊

When I try to figure how something works in my programming language I often use the service replit. It offers a simple bare bones php environment which is ready to go to test out some stuff, is portable and free to use.

One thing that is slightly annoying is that they only support PHP 7.4 out of the box, but it is very easy to upgrade the php version used to PHP 8. Let’s start with an example:

<?php
$str = "Hello, world!\n";
if (str_contains($str, 'llo')){
  echo 'YUP';
}

This code will not run as is on replit, because the function str_contains doesn’t exist before PHP 8.

Screen Shot 2023 03 09 at 14 39 02

So let’s change that. Click the three dots in the side bar and reveal hidden files:

Screen Shot 2023 03 09 at 14 41 39

Next, open the replit.nix file and change the used php version, like so:

{ pkgs }: {
  deps = [
    pkgs.php //from pkgs.php74
  ];
}

Without needing to do anything else we have instructed nix - the package and config manager underlying much of replit.com’s functionality - to use the latest php package which happens to be php 8.

If we run our little test program now, it’ll work:

Screen Shot 2023 03 09 at 14 47 10

NB: The version of nix on replit is not up to date, so trying to use php82 to get the latest and greatest PHP Version 8.2 won’t work. But php 8.0 is still better than php 7.4

It still is a challenge to find the right words in code reviews, no matter what side I’m on:

As the reviewer I want to give really good reasons, be persuasive but also signal that I know that we live in a contingent universe. If I have knowledge to give I want to explain things well, without coming off as paternalistic.

As the reviewed I want to be open minded, interested, but also being able to challenge things back without coming off as defensive.