Blog

JPFTFSS - Just Pay For The Faster Server Stupid!

I could also have called this article "How to Speed Up Rust Compilation on Google Cloud Build" but that wasn't as fun. The setup for this article is quite straight forward. As apposed to previous projects of mine, I've been diving much deeper into Google Cloud Build recently. I've been building a collection of Rust Micro-Services that will be running on Cloud Run and as such I've been dealing with incredibly slow build times with some regularity. Rust notoriously concedes to extremely slow compi

The State of Twitter and an Update on mikevdv.dev

I've done a few blog posts about features that rely on Twitter built into this site, from Custom Twitter Embeds to WebMentions. Given the recent news of Twitter's API becoming paid (and from what I've seen it's not cheap), I'm likely going to have to rework this functionality in the near future. It's not a good situation for Twitter. It was always a favourite of developers due to the ease by which we could build on top of Twitter or into it and it seems that's now coming to an end. It's a troub
A crab

Why I'm finally learning Rust

Javascript and its derivatives are immensely flexible. I've used some variation of Javascript for pretty much every use case you can think of - desktop applications, mobile apps, APIs and entire backend processing systems. You can train a complete newbie on the basics incredibly quickly, and I love working with it. I've primarily been a Javascript developer my entire career and I started using typescript when I joined Pretty Little Thing back in 2020. I've been a big fan of the support that havi

Creating a Mailing List with Mailersend

I've long since wanted to add a mailing list to the blog as a way that people could directly show interest in what was being posted. I did however have the big provision that I didn't want to manually be creating emails to send out. I wanted to automate it. Off the back of my recent release process improvement I realised that I could finally start to build this feature. I started by doing a little bit of research on which mailing list system I wanted to use. A few years back, I'd used Sendgrid

Building a Modern Release Process for Blog Posts

One of the earliest articles I ever wrote was about the posting process that my blog posts followed. It used a local typescript script that accessed the mongoDB database and added/updated a blog post. It was simple and good enough for the features that the site had at that point. I've been using and expanding that posting process for a while now, but I find myself at a crossroads... OG Images are being generated and stored the first time they are accessed (which takes a while), My local machine

Markdown That You Might Not Know

I write every one of my blog posts in Markdown. Markdown is easy to store, easy to edit and above all easy to implement. I, specifically, use a variation of Github Flavoured Markdown with a few of my own additions that make my workflow easier - for example, I can use [tweet tweetIdHere] to embed a tweet in one of my posts. Github Flavoured Markdown (GFM) is the most common Markdown Spec to see implemented around the internet, likely due to the fact it was developed by Github and is therefore ope

I made a daily web game

It seems like simple daily web games, à la Wordle or Framed, have been quite popular over the pandemic. One could argue that interest began to wane as everything opened up again, but I still know many people who consistently log in to challenge themselves each day. My partner especially, loves these games - playing about 3 different ones without fail. I had an idea whilst this craze was going on for a similar daily game but one, unlike Wordle or Framed, which required you to log on the next day

Switching to Webmention Comments

A while back I introduced likes to the blog through the use of Webmentions and Bridgy. I even went so far as to release my own library for handing Webmentions which I'm pleased to say I've been steadily working on ever since. On the other hand, this blog has been using Utterances to handle comments practically since I started it. Despite how happy I've been with Utterances, I've also been very aware of it's limitations as a comment platform. Not everyone has a GitHub account, and while this blog

Improving Twitter Embeds using the Twitter API

For a long time now, I've been frustrated by how slow the official twitter embed is. Any page where I've embedded a tweet, becomes noticeably slower. The warnings on lighthouse are always the same - "Reduce the impact of third-party code". When broken down further, you can see that you spend on average 730ms exclusively on twitter javascript files. This is frankly unusable. However, there is a solution, albeit one that requires some effort. We can remove all of this javascript if we instead fet

Type Guards in Typescript

Often times when I speak to developers who have just started writing typescript, they have begun to understand static typing. They understand that they can label a variable as type string and then rely on the fact that it will be a string within a function. There is however, another, rather large part of typescript that I don't see newer typescript devs use very often. Type Guards and their ability to branch code in the event a function takes multiple types are extreemly useful. So today, I'm go

Piping Javascript

Javascript has had arrow functions (() => true) for a while now. Introduced as part of ES6 (The 2015 edition of the ECMAScript spec), They allow developers to create easy anonymous functions that use their parent's scoped this value. I'd argue that it is one of the most important changes ever made to Javascript in the realm of code readability (followed closely by promises for helping to solve Callback Hell), However, there is currently a stage 2 proposal specification that I believe has the pot

Web Mentions

One of my favourite features of hosted blogging platforms, such as Medium, is the simple feedback systems they have in place. Medium posts display a number of claps and comments. Each user can give a post up-to 20 claps based on how much they like a post. This means that, at a glance, you have information that can tell you how valuable the content of a post is considered. Sites like Reddit and Hacker News use an upvote/downvote system for a similar purpose and most social media sites have some f

Stop The Screen Going To Sleep With JavaScript

We've all been there. Cooking a complex recipe where each step takes a good couple of minutes. Our hands covered in some type of sauce made of who knows how many ingredients. We go to check the next step on our phone only to see that it's gone to sleep due to inactivity. We know that even if we quickly wash our hands, there is inevitably going to be some level of greasy trail left on our phone screen as we are forced to unlock it... However, thanks to a web API released in chrome 85, this doesn

Native OS Share Options via Web

Don't you just love the native share UI on Android and IOS? Well, did you know that you can provide that exact experience to users of your website using the navigator.share web API? You can do so in just a couple of minutes and a few lines of JavaScript! You should be aware that at the time of writing, I'm not aware of any desktop browsers that support this feature, although it is supported by all major mobile web browsers. Because you are accessing a native OS function, there are also a few se

Is RSS Dead?

RSS (RDF Site Summary or Really Simple Syndication) is an XML based web feed standard that is commonly used by blog and news sites to supply their most recent posts to third parties. It was initially released on March 15, 1999, a little over 23 years ago at time of writing. Since then, it has had a few revisions & alternatives notabley RSS 2.0 (September 7, 2002) and Atom (December 2005). Most sites that still use RSS, will use Atom. Back in the mid 2000s it wasn't uncommon to see RSS badges pr