Problem I was having issues implementing SAML single sign-on (SSO) authentication with Firebase on our NextJS web app hosted on Vercel. We…| duncanleung.com
When writing functions or methods Go, it is idiomatic to accept interfaces and return types as it helps keep your Go code flexible, reusable…| duncanleung.com
It can be helpful to understand how memory is allocated when working in Go, as it will provide soe insight into how the Go runtime and…| duncanleung.com
Methods In Go, methods are functions that are attached to a type. Here, we have a type called and we have a method called that is attached…| duncanleung.com
In Go, a is a data structure representing data in a sequence. In Go, it is described by: A pointer to the first element of the an…| duncanleung.com
Serialization and Deserialization In programming, when we cross a process boundary in our system the data is transferred as a sequence of…| duncanleung.com
Knowing how Go handles function arguments helps us to understand the behavior of the language. In Go, all function arguments are passed by…| duncanleung.com
VSCode warning for Tailwind Directives I was running into an issue with VSCode warnings on CSS "Unknown at rule" for Tailwind directives…| duncanleung.com
Node Version Manager (NVM) Node Version Manager (NVM) is a handy bash script to manage multiple active Node.js versions. Install NVM with…| duncanleung.com
Interfaces In programming languages, interfaces act as a contract that enables decoupling of types and help create more maintainable…| duncanleung.com
I was collaborating with a teammate on the same feature branch and wanted to update the branch with . I then realized that there were…| duncanleung.com
Problem: SVG TypeScript ESLint errors on value After updating to Next.js 11 (from v10.2.3 to v11.0.1) I noticed that TypeScript was having…| duncanleung.com
Understanding what Go values look like in memory helps us to understand which operations are expensive. Basic Types Integers Go has several…| duncanleung.com
I was running into an issue running my React app locally where the default port was previously used and unreleased. You may also see a…| duncanleung.com
I've been using exercism's Go track to help me learn Go. It's been an amazing experience so far. Exercism is mentor-based exercise platform…| duncanleung.com
Automatically Format and Lint Code with Git Hooks I wanted to set up automatic code formatting and linting before a (pre-commit) or before…| duncanleung.com
We migrated our JavaScript + Create React App codebase over to TypeScript + NextJS and I somehow volunteered to work on the ESLint config to…| duncanleung.com
I've been working on a new React project using Material UI and Emotion JS, and the way to access the Theme object has always felt a bit…| duncanleung.com
It's a good practice to set up billing alerts when you're first getting started with AWS to avoid unexpected charges than can be caused by…| duncanleung.com
API Security and Authentication Overview Considering that not all Lambda functions should be public, different APIs in a system will require…| duncanleung.com
Debugging Use Case Serverless functions can be invoked locally with the Serverless CLI. If you set up your functions to write event payloads…| duncanleung.com
Generating an AWS Lambda API endpoint A handy trick to reference an AWS Lambda API endpoint is to use serverless-pseudo-parameters and…| duncanleung.com
Visual Studio Code was showing an IntelliSense error when adding and tags in my . I was trying to reference the resource using the…| duncanleung.com
The AWS CLI You'll first need to use the AWS CLI to set up a new profile with an existing AWS IAM access keys into . (You can also manually…| duncanleung.com
TL;DR: How to teach programming and other things Teachers should: Focus on providing direct instruction to explain programming concepts…| duncanleung.com
Credit 👏: My teammate, Riley Rangel, worked out this solution and improved the DX for our team. Problem: How to select the correct…| duncanleung.com
I've been appreciating a TypeScript pattern called type-guards. Type-guards provide type-safety by performing a runtime check to ensure a…| duncanleung.com
Problem: TypeScript Error Calling .map() on an Array Union Type I was running into a TypeScript issue trying to call over an array of…| duncanleung.com
Declare persistent environment variables in Python virtual environments with . allows specifying environment variables in (dot-env) files…| duncanleung.com
Problem: How to target meta tags with React Testing Library I needed to test our SEO component that the correct meta tags were being passed…| duncanleung.com
Credit 👏: My teammate, Riley Rangel, worked out this solution and improved the DX for our team. Problem: How to Infer the Rendered…| duncanleung.com
I previously wrote about profiling ESLint and removing slow running rules. Problem: Slow Lint Run Process While setting up our team's ESLint…| duncanleung.com
Jump to an article section: ESLint: An Overview Step by Step: How to Configure .eslintrc 💡 How to Determine the Required ESLint Config I…| duncanleung.com
Profile and Remove Slow Running ESLint Rules I was reviewing our project's ESLint config and I noticed that our lint process was running…| duncanleung.com
Importing SVG files as React Components in TypeScript I was running into an issue importing files as React Components in a TypeScript…| duncanleung.com
Importing aws-exports.js with TypeScript Error I was running into an issue using the AWS Amplify amplify-js package in a TypeScript project…| duncanleung.com
Related Post: Set Up Storybook Decorators - Emotion Theme Provider Problem: Storybook Not Passing Locales to React Intl Provider I was…| duncanleung.com
Related Post: Set Up Storybook Decorators - React Intl Provider Problem: Storybook Not Recognizing Emotion Theme Provider I was running into…| duncanleung.com
Storybook Not Importing SVGs I was running into an issue where SVG imports in Storybook were instead of being imported as React components…| duncanleung.com
Storybook Not Parsing CSS Prop without JSX Pragma I was running into an issue where my Storybook was not correctly parsing and evaluating…| duncanleung.com
I've been working on open-source projects, which requires forking the open-source repository and making changes locally. Before opening pull…| duncanleung.com
Testing ValidationSchema Formik Forms I needed to test a form that included a validation schema for field validation, but was running into…| duncanleung.com
I primarily work in JavaScript, and I was confused about this common check pattern at the bottom of many python files. The Check Pattern…| duncanleung.com
These are steps to install and set up Python on a Mac. Skip to the sections below: Version Manager: pyenv Virtual Environment: pyenv…| duncanleung.com
Netlify Build Failing: error #98123 WEBPACK I ran into an annoying issue when relaunching this blog. The strange thing was that would build…| duncanleung.com
Hacktoberfest 2018 We hosted our first Hacktoberfest meetup at AutoGravity! A celebration of open source with food, drinks, and great…| duncanleung.com
Testing Forms with Jest and react-testing-library I needed to test my form submit, but was running into this error. Error: Problem: Submit…| duncanleung.com
TLDR; React is asynchronous. React cannot be accessed asynchronously. Problems Using Within I came across an unexpected console error…| duncanleung.com
Another React caveat that I have come across, is to keep the method pure. Let's take a look, specifically relating to patterns on binding…| duncanleung.com
I ran into some unexpected errors while trying to build React for production using a Windows machine (which was undocumented in the React…| duncanleung.com
I often read that is one of the more misunderstood aspects of React. Considering that managing component state is a fundamental aspect of…| duncanleung.com