Decorators in JavaScript 🖌️

When it comes to decorating, I’m about as useful as a flashlight in broad daylight 🔦! Play Sorry, your browser doesn't support embedded videos. (() = { const autoplay = "autoplay" === 'autoplay'; const loop = "loop" === 'loop'; const playbackRate = parseFloat("1") || 1; const replayButtonText = "Replay"; const videoId = "video-1"; const video = document.getElementById(videoId); const videoControls = document.getElementById("video-controls-1"); const playButton = document.getElementById("play-1"); const videoWorks = !...

September 21, 2023 · 4 min · Phil Static Badge

E2E Testing a Video Game

The Scenario 🖼️ So you’ve successfully released a dozen popular JavaScript games over the past few years and just as you’re about to kick back, enjoy the weekend and let the revenue flow in, a new Tweet appears in your feed. Not great news to hear on a Friday. Okay, I’ll just check how many of my games are affected… main .post-content { overflow: hidden !important; } 😲😲😲😰😰 No need to panic....

June 3, 2022 · 5 min · Phil Static Badge

Visual Testing With Cypress

Setting the Scene 🖼️ It’s Friday evening, the sun is shining 🌞, you’ve just deployed the latest UI changes to production. Just as you’re about to put those feet up and order that takeaway… Those shrieking voices coming from all angles 😨; " The website isn't loading! " " The screen is completely blank!! " " We can't see anything!! " Clearly, something is amiss here. Let’s check the build…...

June 27, 2021 · 8 min · Phil Static Badge

Final Fantasy VIII & TypeScript

Overview 🗒️ Growing up I was an avid fan of the Final Fantasy game series. Particularly Final Fantasy 7 through 10. Each game in the series contains an in-depth story, hours of gameplay, and some mini-games. One mini-game introduced during Final Fantasy 8 was a card game known as Triple Triad. Released in 1999, Final Fantasy 8 was a single-player game and so too was Triple Triad, the included card game....

January 3, 2021 · 10 min · Phil Static Badge

My most used features in ES2020

Overview 📄 With ES2020 being finalised there have been some great new additions. I wanted to take a look at two of my most used ES2020 features and what makes them great. So let’s jump right in! Nullish Coalescing ❔❔ Nullish coalescing is a logical operator that will return its right-hand statement when the left is null or undefined. Think logical || but explicitly for null or undefined values. Consider the code below using the logical ||...

April 12, 2020 · 2 min · Phil Static Badge