Interesting problem this morning. Had a container that wasn’t appearing that should always appear. App showed this behaviour when published and in Studio but, by the time the App was loaded and ready to edit in Power Apps Studio, it looked like it should be working fine.

All the variables were set as expected and the results for each control property evaluation looked right e.g. the code in .Visible was resolving to TRUE… except the .Height property was showing as 0. Weirdly, in the “canvas” view, it looked like the height was definitely non-zero as there was an outline around an apparently hidden, but large, control. For that reason I spent a long time looking at how .Visible was evaluating. Appearances were deceiving in this case!

Ignoring the evidence of my eyes, I eventually dug into what was setting Height on the control, a Context variable called containerMaxHeight, which was set by:

UpdateContext(
    {
        controlHeight: 30,
        containerHeight: 50,
        containerMaxHeight: Switch(
            Settings.Size,
            ScreenSize.Small,
            containerHeight*2,
            ScreenSize.Medium,
            containerHeight,
            ScreenSize.Large,
            containerHeight,
            containerHeight// For extra large
        ),
        helpContainerHeight: 40,
        helpContainerMaxHeight: Switch(
            Settings.Size,
            ScreenSize.Small,
            helpContainerHeight*2,
            ScreenSize.Medium,
            helpContainerHeight*2,
            ScreenSize.Large,
            helpContainerHeight,
            helpContainerHeight// For extra large
        )
    }
);

An experienced Power Fx/Apps user might see the problem immediately. It’s dead simple. These are all evaluated simultaneously, so they can’t depend on one another. I just needed to split the UpdateContext() function into two calls:

// have to set these first
UpdateContext(
    {
        controlHeight: 30,
        containerHeight: 50,
        helpContainerHeight: 40
    }
);
// so they can be referenced here
UpdateContext(
    {
        containerMaxHeight: Switch(
            Settings.Size,
            ScreenSize.Small,
            containerHeight*1.5,
            ScreenSize.Medium,
            containerHeight,
            ScreenSize.Large,
            containerHeight,
            containerHeight// For extra large
        ),
        helpContainerMaxHeight: Switch(
            Settings.Size,
            ScreenSize.Small,
            helpContainerHeight*1.5,
            ScreenSize.Medium,
            helpContainerHeight*1.5,
            ScreenSize.Large,
            helpContainerHeight,
            helpContainerHeight// For extra large
        )
    }
);

I’ve been tinkering with a Canvas-based Power App for over a year and have just now realised that I wish I kept a changelog. I’ve added loads of features and fixed loads of tricky little bugs and I wish I could read it all in one place. Also, I’m getting close to sharing it with the world, and so a changelog seems desirable.

Why did I not keep a change log? Well, Canvas-based Power Apps don’t readily lend themselves to “userspace” version control. You don’t have a “local” copy of the app/code. I am pretty sure you can switch on some background git repo if you have the enterprise licensing, but we do not. And while you can extract the Power Fx code for each screen, it’s not something you’d want to do often.

However, all is not completely lost! I don’t have any training in Agile software development but I do understand the fundamentals of Minimum Viable Product. And, because the app itself is an Outlook-integrated Task timer/tracker, I started using it straight away to track the work I was doing on the app. So, I do have dates for when I did what, which I can cross-reference against the version history provided in Power Apps Studio.

I might be able to cobble something together but I wish I’d just kept one from the start! With that said, I should go and start one now

We have a dedicated Discord server for our little hobby group. It’s been going six years now. It’s a wonderful safe space.

Today, though, this happened:

A warning from Discord advising that an image/gif "May contain sensitive content"

The Online Safety Act has struck. Some of my server buddies are a little outraged but I’m not too fussed. I’m absolutely onboard with the intention. The internet is full of horrible shit that I’d never want my children to see. Or my Dad, for that matter; not unless he REALLY wanted to.

But, as we all know, the implementation is useless. Not least because it’s completely avoidable.

Case in point: I asked the member if he’d been asked to complete the age verification process before he posted the gif. He had not.

So, we can all browse this sensitive content (on Tenor?), via Discord, without verifying our age, just as long as we’re looking at it in the “add a gif” dialogue?

OK. We’ve now established (work intrudes) that it was a gif of the chestburster scene in Alien. I’ve checked and I can, indeed, browse exactly these gifs via the dialogue without having verified my age.

I just… I’m speechless.

With Windows 10 going away, and my aged but honestly capable PC unable to run Windows 11, I thought I better give gaming on Linux a serious go in 2025.

Oddly, my original foray into Tux Tinkering ™ was inspired by boredom when I lived in Tanzania in 2001. I think it was Mandrake Linux? From 2003, I used Arch Linux and so system configuration became a past-time in itself. I did have a few attempts at gaming over the years. I played a few native games like Tux Racer, Frozen Bubble and Wesnoth but also managed to run stuff like Quake and Half-Life under Wine. (That’s actually the only time I have played, and finished, Half-Life.) But from 2005-ish, most of what I wanted to play was only available on Windows and, with the introduction of Steam (and the Humble Bundle!), it was just getting easier and easier. I was still tinkering with Linux for fun. I even got connections to our virtual desktops at work up-and-running via Citrix (which definitely WASN’T supported by IT).

But by the time our second child arrived in 2015, I had no time for tinkering and very little reason to even use a Linux desktop, with work being so Microsoft-centric. Fun time was extremely limited and stability was paramount and around then I started to look much harder at Workstation distros. I used Ubuntu for a bit but I think I decided to stick with Fedora from around 2019. I mostly used XFCE back in the day, but I did enjoy the “out of the box” experience of Gnome on Fedora. But throughout that time, desktop Linux was only used for the odd thing that was just too much hassle in Windows. Like anything to do with ffmpeg or any sort of bulk file management. I was still running Arch ARM on a Raspberry Pi, so I was still very much a Linux hobbyist, but gaming on Linux never crossed my mind.

Then, last year (I think), I heard from my (now teenage) son’s friend, that SteamOS is now based on Arch. And when my son got a Steam Deck for Christmas 2024, I started paying a lot more attention to how it works. I mean, I have to really. When your boy wants to run Marvel Rivals and he’s not using the right Proton build, you gotta dig into that! And I quickly saw that gaming on Linux as a main platform suddenly looks not only doable but almost straight-forward.

So, although I do have a year of updates on my W10 install, before it really goes away, I started looking at what I might do and I guess I’ll cover that in a new post.

Understanding TimeZoneOffset The TimeZoneOffset function returns the difference between the local time and UTC in minutes. This value can be positive or negative depending on your time zone relative to UTC. Handling Negative Offsets If the TimeZoneOffset is negative, it means your local time is ahead of UTC. For example, if the offset is -60 minutes, your local time is 1 hour ahead of UTC. Subtracting the Offset When you subtract a negative offset, you're effectively adding that time to the current time. Here's how it works: Example: If TimeZoneOffset(Now()) returns -60 minutes: DateAdd(Now(), -(-60), TimeUnit.Minutes) becomes DateAdd(Now(), 60, TimeUnit.Minutes). This adds 60 minutes to the current local time, which is correct because your local time is ahead of UTC. Correct Behavior The code correctly adjusts the local time to UTC by accounting for both positive and negative offsets. So, subtracting a negative offset does indeed add the time difference, aligning the local time with UTC. Does this make sense? 😊

I recently asked MS Copilot to explain this MS Power Fx code (which I found online) to me:

UpdateContext ({TimerLocalStartTime: DateAdd(
        Now(),
        -TimeZoneOffset(Now()),
        TimeUnit.Minutes
    )
});

Although I thought I knew exactly what it was doing AND what it intended, I still wanted to check.

The code sets TimerLocalStartTime to the current UTC time

So, Copilot understood the intent of the code but it didn’t pick-up the problems I saw (not least the horribly named variable). So I asked:

If the timezone offset is negative, won’t subtracting the timezone offset actually add the time zone offset, causing unintended results?

Quoted below is the response, which I’ll break down:

Understanding TimeZoneOffset

TheĀ TimeZoneOffsetĀ function returns the difference between the local time and UTC in minutes. This value can be positive or negative depending on your time zone relative to UTC.

Handling Negative Offsets

If theĀ TimeZoneOffsetĀ is negative, it means your local time is ahead of UTC. For example, if the offset is -60 minutes, your local time is 1 hour ahead of UTC.

So far, so good. That’s all correct, which is what you’d expect from the vendor, right?

Subtracting the Offset

When you subtract a negative offset, you’re effectively adding that time to the current time. Here’s how it works:

  • Example: IfĀ TimeZoneOffset(Now())Ā returns -60 minutes:
    • DateAdd(Now(), -(-60), TimeUnit.Minutes)Ā becomesĀ DateAdd(Now(), 60, TimeUnit.Minutes).
    • This adds 60 minutes to the current local time, which is correct because your local time is ahead of UTC.

So, I am (currently) on BST, which is UTC+1. So, 15:00 local time for me is 14:00 UTC. Adding 60 minutes to 15:00 makes it 16:00, which is UTC+2. So, this is completely wrong. It would be correct if it said:

  • This adds 60 minutes to the current UTC time, which is correct because your local time is ahead of UTC.

But that’s not what we want. We want to calculate UTC from the local time. Copilot continues:

Correct Behavior

The code correctly adjusts the local time to UTC by accounting for both positive and negative offsets. So, subtracting a negative offset does indeed add the time difference, aligning the local time with UTC.

Does this make sense? 😊

No, it doesn’t make sense.

I don’t know about you but this feels like exactly the sort of error we can expect from “vibe coders” for years to come. Working out timezone offsets is already a bit of a brain twister, confidently incorrect assertions from your “AI” assistant won’t help!

I use the WordPress Redirection plugin (https://wordpress.com/plugins/redirection) to manage redirects on our production site.

One of the more annoying things I deal with is random crappy bots that just crawl the site occasionally. Because they crawl so rarely (and inexpertly) they often look for ancient pages, or use ridiculous URL parameters (if anyone knows why they do this can you let me know in the comments?)

Rather than treat these as valid 404s, I think it’s best to ignore them completely. However, matching a user agent string in Redirection is not straight forward. To this end I wrote a Regex to match three of the most annoying culprits: MojeekBot, SeekportBot & Barkrowler.

Maybe it’ll help you too.

I’m a pretty big fan of Jurassic Park movies. At least as far as “man meets dinosaur” movies go.

But, as someone who actually read the original novel, something has bothered me from day one. The matter of small arms. No, not on the T-Rex. I mean the distinct lack of big guns. Let me get this off my chest…

In the first movie, the game warden Muldoon, rocks about with a shotgun. Just a shotgun. We later see this is loaded with shot rather then slugs when Grant shoots at the raptors in the control room. This might be adequate for anything up to a really big dog at short range. Problem is, for most of the smaller, dangerous dinos, short range is way too late. The larger dinos… might as well be throwing rocks.

In the first book, Muldoon at least insists on a rocket launcher, which proves to be highly effective (Muldoon survives). We also learn that Hammond has, naturally, effectively banned weapons on the island. At least the book features the right tools for the job. Sadly, this is never picked up in the movies.

Fast forward to Jurassic World and the “Asset Containment Unit” is running around with mostly non-lethal weapons you wouldn’t even try on a polar bear. Again, one has a shotgun. They do have a minigun, which would probably be highly effective with clear line of sight and a fortified position, but instead they put it on a helicopter and fly over a jungle with thick canopy. Derp.

Even the various groups of poachers and mercenaries show up with an assortment of assault rifles and shotguns. Except for two guys. Roland, the big game hunter in The Lost World. He’s got an elephant gun. Big tick. The other is a guy you’d barely remember from Jurassic Park 3, who has a Barrett .50 caliber rifle.

This seems much more like it to me, although I am no firearms expert. While it doesn’t do JP3 guy much good (he is wandering around the jungle with it), .50 caliber weapons are surely the way to go. A lot of watchtowers with rifle-armed guards, a few discretely hidden fixed heavy machine gun emplacements and a few of the same mounted on vehicles. I feel like that meets the minimum for worst case scenario. Hell, if I had the choice, there’d be armoured vehicles and I’d have the Costa Rican airforce on speed dial.

However, I get that the core theme of the franchise is human-kind’s hubris and not having the proper equipment is a big part of that. It still bugs me, though, in a “why didn’t the eagles just fly them there” kind of a way, you know?

I added a new custom view to my Outlook Tasks but it automatically put it at the end of the Current View list in the Outlook Tasks Home Ribbon:

Screenshot showing the expanded Current View list in the Outlook Tasks Home Ribbon with newest View at the end of the list.

Obviously I want it in the top row so I don’t have to go digging. You can’t drag and drop them in either the “Manage Views…” dialog box or in the UI. I found this on a quick search: https://answers.microsoft.com/en-us/outlook_com/forum/all/outlook-contacts-can-you-arrange-the-views-in-the/8e6d9609-a57f-47e2-af3c-74fa54bb8faf

TL;DR – you can’t manually rearrange them…

But that doesn’t make sense because I clearly have in the past. “Maybe it only shows four ‘custom’ views or it’s (somehow) alphabetical,” I wondered. To test this, I went to “Manage Views…” I copied a View and renamed it and… it automatically sorted all of my custom Views in alphabetical order to the top of the list!

It seems that any rename will trigger this re-sort.

In the last 24 hours I’ve swung back into the IndieWeb orbit. I think this was mostly prompted by a general disatisfaction with social media right now.

The last time I was here I was trying to work out how to “scrobble” tracks from Amazon Music to this site. I was trying to do this with Shortcuts on iOS and IFTTT.

This time I have been looking at how I can better share my watches from Letterboxd. I have an IFTTT applet that uses an RSS feed Trigger on my Letterboxd and uses the WordPress Action to post here. It’s not very flexible, the formatting is kind of crappy, and, as a result, all the watches are sat in Drafts, waiting to be beautified.

I have been doing a lot with Microsoft Power Automate at work recently and that got me thinking that maybe I could manipulate the data coming in from the RSS feed. I mostly rely on 3rd party tools as I am not skilled enough to whip up and deploy my own API/handle turning apps.

I started scouting around to see if I could find a tool to convert the RSS into another format that I could manipulate a bit more and then feed that into IFTTT (or w/e). I didn’t have much luck, so I thought I better have a look at IFTTT and see if there was anything I could do on their side. I couldn’t remember there being anything. Turns out IFTTT added this thing called filter code. I think the idea is, as the linked article suggests, that it gives you a bit more control of the flow. But it turns out you can basically re-write the applet. You can read the data from the Trigger and set the parameters for the Action.

I came up with a nice regex to remove the username from the feed url, so you can get a link to the movie page on Letterboxd. So, now I should be able to feed that into the Response properties for a watch. I’ll update with a link to the applet when it does exactly what I want.

At that point I was pretty happy and decided to go to bed. That was about 10pm ish. Obviously my brain didn’t fancy that so I ended up looking at my Shortcuts scrobble again… two hours later I was successful. Learned a lot of “obvious” stuff, which I’ll leave to reflect on another day.

Don’t know about anyone else but I find Teams REALLY useful. EXCEPT when I am trying to get something done. I’m also starting to find Microsoft products better and better. Maybe it is my old age. Windows 10 has way more stuff built-in than, I think, a lot of people realise. One feature I really like is Focus Assist, which basically switches of notifications. However, Teams does not seem to support Focus Assist and I was getting very annoyed, so I looked into it…

Turns out, it does but you need to toggle what sort of notifications Teams uses: https://support.microsoft.com/en-us/office/change-your-notifications-style-in-teams-0da93820-93d0-4da3-86b6-fc28d19908e3