Blog

Improving Twitter Embeds using the Twitter API

Posted by Michael 7 min read 1 like

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.

Read More...

Type Guards in Typescript

Posted by Michael 4 min read 3 likes

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 going to explain Type Guards and why you should be using them.

Read More...

Piping Javascript

Posted by Michael 3 min read 7 likes

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 potential to be just as, if not, more impactful in the world of readable code.

Read More...

Web Mentions

Posted by Michael 8 min read 7 likes

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 form of "likes". Unfortunately, like many other software development bloggers, I self host my blog.,,

Read More...

Stop The Screen Going To Sleep With JavaScript

Posted by Michael 2 min read 1 like

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...

Read More...

Native OS Share Options via Web

Posted by Michael 4 min read 0 likes

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!

Read More...

Is RSS Dead?

Posted by Michael 4 min read 1 like

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.

Read More...

OG Images with Cloud Functions

Posted by Michael 9 min read 1 like

If you follow me on social media, you're probably aware of the social image that shows up for any articles I share from this site. It's a giant image of my face. Now I don't know about you but I don't think this is a great image for getting engagment. I wouldn't click it...

Read More...

The Strange World of NPM Site Alternatives

Posted by Michael 8 min read 0 likes

Like many web developers, I work day to day within the javascript ecosystem. For those who aren't aware, NPM is the primary package manager for javascript developers. While in the early days, it was primarly for NodeJS and backend use (with Bower acting as the frontend equivalent), it is now used consistantly across the stack. I use NPM at least 100 times a day; Not just for installing and managing packages but for managing scripts, git hooks and test suites. npm run dev, npm run test and npm run test:changes are all so frequently typed that I can access them in my terminal consistently within 2-3 presses of the up key.

Read More...

Chrome Page Transitions in Modern Frontend Frameworks

Posted by Michael 7 min read 0 likes

With Google IO a few days ago, all sorts of new and interesting things got announced. One thing that really struck my imagination was the new Google page transitions functionallity for web. I wanted to take a look at the new API and see how difficult it would be to implement in a site like mine.

Read More...