Five Chrome DevTools Tips for Troubleshooting Web Apps

I recently needed to find and fix a bug in a web app I’ve been working on. The bug had something to do with code that was updating the dimensions of a third-party generated UI component whenever the window was resized. While troubleshooting the issue, I repeatedly used a handful of the tools provided by Chrome DevTools. Some of these I’ve used many times in the past, but a couple of them were new to me, so I thought I’d discuss them here. Read more on Five Chrome DevTools Tips for Troubleshooting Web Apps…

An Introduction to Property-Based Testing with JavaScript

Property-based testing is a powerful technique that’s been widely and successfully applied to functional-style codebases for a long time. As functional programming continues to get more and more popular among JavaScript developers, the value of this style of testing is becoming more obvious to a wider audience. Read more on An Introduction to Property-Based Testing with JavaScript…

Importing with Absolute Paths using webpack in JavaScript/TypeScript

Using relative paths in your import statements is great for “Hello World” examples and blog posts. But when used in large projects with hundreds of files and deep hierarchical directory structures, relative paths become a nightmare (see Rob Ashton’s post Stop using relative paths in your JavaScripts for some of the reasons why this is so). Read more on Importing with Absolute Paths using webpack in JavaScript/TypeScript…

Time and Relative Distance in Source (Code)

Reasoning about a program’s behavior is extremely tricky in the best of circumstances. When you throw in asynchronicity, it is the absolute worst. It’s like your code is trapped in a convoluted time travel movie. You want to perform some operation, but that requires stepping into a time portal and coming out at some indeterminate future date. Who knows what has changed since you’ve been gone? Add a few more asynchronous operations, and your code very quickly becomes a tangled mess of wibbly-wobbly, timey-wimey stuff. Read more on Time and Relative Distance in Source (Code)…

Three Tips for Migrating from JavaScript to TypeScript

Over time, and especially in the past few years, the tech community has gotten sick of JavaScript and its loose typing. Trying to write a complicated program without static types is like driving at night without headlights—you’ll probably be fine for a while, but there’s a good chance you’ll crash a few times along the way. Read more on Three Tips for Migrating from JavaScript to TypeScript…

Collecting Form Data with a Google Chrome Extension

Recently, I was interested in creating a Google Chrome extension that would work similarly to a password manager, such as LastPass, to monitor the data in form submissions. Working on this task is actually what led to my last blog post, a lighthearted take on my mental stages of programming. Read more on Collecting Form Data with a Google Chrome Extension…

Multiple HTTP Requests for an AngularJS + Google Sheets Prototype

As I continued to build out my AngularJS + Google Sheets prototype, I ran into another problem. I wanted to load the data from two Google Sheets and access the data in the same function. I created this example, which loads in one Sheet with weather forecasts and another with weather types and descriptions, as a proxy. Read more on Multiple HTTP Requests for an AngularJS + Google Sheets Prototype…

Using Decorators to Declaratively Extend Functions

The decorator pattern gained fame in the object-oriented world after being featured in the classic 1994 Gang of Four book, Design Patterns. Since then, it’s been used extensively in traditional object-oriented programming as an alternative to inheritance. What’s really going on behind the scenes though, is composition, which means decorators are also great for cleaning up some functional programming boilerplate.

We’re going to look at decorators in JavaScript, along with some proposed syntax sugar coming in ES2017 that will make it easier to use them. Read more on Using Decorators to Declaratively Extend Functions…

GraphQL + Apollo – Part 2: Building a Server

In this series, we are taking a dive into GraphQL through the lens of the Apollo toolchain. Part 1 of the series explains some core concepts of GraphQL and introduces Apollo as a GraphQL solution. In this post, we will take a closer look at building a GraphQL server with Apollo tools. Part 3 will take a look at the Apollo Client libraries and implement an example client. Read more on GraphQL + Apollo – Part 2: Building a Server…