Running client side only JavaScript with Gatsby.js

12th August 2020

Gatsby is great for generating static sites, but sometimes we need to run some client-side only JavaScript as well. The question is how might we go about that? Well, that's what I'll be covering in this blog post. Actually, I've already written about something similar in a recent post Render client-side only component in Next.js. The approach is very similar, but I'll be walking through an example in this blog that is more specific to Gatsby.

Fixing Cypress errors part 1: chromium out of memory crashes

30th July 2020

After recently working on an existing project that adopted Cypress, I was both amazed at how pleasant the local developer experience was and how badly it runs on the CI pipeline. No joke, at one point I actually missed Selenium. To debug the issue, I must have run the pipeline over 100 if not 200 times and read many many Github issue threads. Finally, I was able to problem resolved and noted down a few things along the way which may help someone else in the same shoes. I am pretty confident these solutions will fix your problems, if not leave an angry comment and let me know that I failed 😂

How to approach a disagreement

28th July 2020

As software engineers, there are a lot of things to disagree on: tech stack, syntax, code standard, testing, methodologies, etc. No matter your seniority, learning how to frame a disagreement is vital. It includes both disagreeing with what others have done and have others disagree with your approach. It happens a lot more often than we expect, so if we don't pay attention to our methods, then it is easy to cause stress and tension within the team or between teams. If this continues for a long time then well, then it will create a toxic work environment. As someone who has a consultancy background, which requires people to jump in a new team and start delivering value as well as navigate office politics, I thought this is an intriguing subject for me to share my thoughts on.

How to render react components in markdown in Gatsby

20th July 2020

In a recent post Stop trying, you can't multitask, I wanted to embed a few productivity books which I found useful. Since I write all the content in Markdown, I thought about embedding iframe components or insert image version of the book components in the Markdown, which are both terrible ideas. Luckily, there's a better way to do this with MDX, which allowed me to use React components inside Markdown. The solution is super clean, and in this article, I'll be explaining how to add React components to your Gatsby site.

Render client-side only component in Next.js

30th June 2020

If you are familiar with Next.js then you will know it is the React SSR (server-side rendering) framework created by Vercel. There are a lot of headaches in trying to build SSR sites in React, Next.js makes it drastically simpler by doing many of the not-so-nice parts and hiding it from developers. The problem with frameworks, in general, is that it does what it is designed to do very well while sacrifices control and customisation to achieve it. Next.js is very good at handling components rendered on server-side and then sent to the client. But how would you render a client-side only component in Next.js? That is an issue I encountered and what I'll be discussing in this article.

Stop trying, you can't multitask

29th June 2020

There are a lot of articles out there discussing why people need to focus instead of trying to multitask. At best, I have seen this being done from a biology point of view going into depth about how our brain works on a more fundamental level. I studied Computer Science at University, and this multitasking problem isn't new to me. Let's discuss how computer operating systems schedule tasks and what valuable lessons we can learn from it.

Set up domain forward from Cloudflare to Netlify

15th June 2020

I recently migrated a few domains to Cloudflare. Sure enough, my domain set up is all over the place afterwards. I decided to clean everything up and set up everything again from scratch. This article explains how I was able to get Cloudflare to forward all request to Netlify.

Are you ready for Google Core Web Vitals?

10th June 2020

Google recently announced the new Core Web Vitals, which will reshape the web soon. Although now they are only used as guidance metrics for websites to follow, it will massively impact how Google's Search Engine algorithm works and thus, how websites get ranked on Google search results next year. Is your company or your site ready for all this? In this article, we will go over what these metrics are and how it affects developers and businesses.