hello.js

var please = require('share');
console.log('thank you');

NEW !!!

Tuesday, 14 June, 2022 UTC

Sponsoring dependencies: The next step in open source sustainability

When the JavaScript Standard Style (StandardJS) project1 decided to show ads during installation, the backlash was swift and harsh. The project is an opinionated JavaScript style guide, formatter, and linter all in one, and it was also the first npm ... more


Tuesday, 28 December, 2021 UTC

Making your open source project sponsor-ready, Part 3: Accepting sponsorships

In the previous two posts in this series, I described why companies sponsor open source projects1 and how following some basic project hygiene can help attract sponsors2. Now that your project is functioning at a high level and is attractive to companies, ... more


Tuesday, 14 December, 2021 UTC

Making your open source project sponsor-ready, Part 1: Companies and trust

Early on, it was a battle to get sponsorship for open source projects. What used to require phone calls and drawn-out discussions has now been streamlined thanks to efforts like Open Collective1 and GitHub Sponsors2. Companies and individuals can now ... more


Tuesday, 20 April, 2021 UTC

The lazy-loading property pattern in JavaScript

Traditionally, developers have created properties inside of JavaScript classes for any data that might be needed within an instance. This isn’t a problem for small pieces of data that are readily available inside of the constructor. However, if some ... more


Tuesday, 20 April, 2021 UTC

The lazy-loading property pattern in JavaScript

Traditionally, developers have created properties inside of JavaScript classes for any data that might be needed within an instance. This isn’t a problem for small pieces of data that are readily available inside of the constructor. However, if some ... more


Tuesday, 16 February, 2021 UTC

Introducing Env: a better way to read environment variables in JavaScript

If you write server-side JavaScript, chances are you’ve need to read information from environment variables. It’s considered a best practice to share sensitive information, such as access tokens, inside of environment variables to keep them secure. However, ... more


Tuesday, 16 February, 2021 UTC

Introducing Env: a better way to read environment variables in JavaScript

If you write server-side JavaScript, chances are you’ve need to read information from environment variables. It’s considered a best practice to share sensitive information, such as access tokens, inside of environment variables to keep them secure. However, ... more


Tuesday, 19 January, 2021 UTC

Creating a JavaScript promise from scratch, Part 7: Unhandled rejection tracking

When promises were introduced in ECMAScript 2015, they had an interesting flaw: if a promise didn’t have a rejection handler and was later rejected, you would have no idea. The rejection silently occurred behind the scenes and, therefore, could easily ... more


Tuesday, 19 January, 2021 UTC

Creating a JavaScript promise from scratch, Part 7: Unhandled rejection tracking

When promises were introduced in ECMAScript 2015, they had an interesting flaw: if a promise didn’t have a rejection handler and was later rejected, you would have no idea. The rejection silently occurred behind the scenes and, therefore, could easily ... more


Wednesday, 16 December, 2020 UTC

Creating a JavaScript promise from scratch, Part 6: Promise.all() and Promise.allSettled()

In my last post, I walked you through the creation of the Promice.race() and Promise.any() methods, both of which work on multiple promises and return a single promise that indicates the result of the operation. This post continues on to discuss Promise.all() ... more


Wednesday, 16 December, 2020 UTC

Creating a JavaScript promise from scratch, Part 6: Promise.all() and Promise.allSettled()

In my last post, I walked you through the creation of the Promice.race() and Promise.any() methods, both of which work on multiple promises and return a single promise that indicates the result of the operation. This post continues on to discuss Promise.all() ... more


Tuesday, 24 November, 2020 UTC

Creating a JavaScript promise from scratch, Part 5: Promise.race() and Promise.any()

In the previous posts in this series, I discussed implementing a promise from scratch in JavaScript. Now that there’s a full promise implementation, it’s time to look at how you can monitor multiple promises at once using Promise.race() and Promise.any() ... more


Tuesday, 24 November, 2020 UTC

Creating a JavaScript promise from scratch, Part 5: Promise.race() and Promise.any()

In the previous posts in this series, I discussed implementing a promise from scratch in JavaScript. Now that there’s a full promise implementation, it’s time to look at how you can monitor multiple promises at once using Promise.race() and Promise.any() ... more


Tuesday, 13 October, 2020 UTC

Creating a JavaScript promise from scratch, Part 4: Promise.resolve() and Promise.reject()

When you create a promise with the Promise constructor, you’re creating an unsettled promise , meaning the promise state is pending until either the resolve or reject function is called inside the constructor. You can also created promises by using the ... more


Tuesday, 13 October, 2020 UTC

Creating a JavaScript promise from scratch, Part 4: Promise.resolve() and Promise.reject()

When you create a promise with the Promise constructor, you’re creating an unsettled promise , meaning the promise state is pending until either the resolve or reject function is called inside the constructor. You can also created promises by using the ... more


Tuesday, 6 October, 2020 UTC

Creating a JavaScript promise from scratch, Part 3: then(), catch(), and finally()

In my first post of this series, I explained how the Promise constructor works by recreating it as the Pledge constructor. In the second post in this series, I explained how asynchronous operations work in promises through jobs. If you haven’t already ... more


Tuesday, 6 October, 2020 UTC

Creating a JavaScript promise from scratch, Part 3: then(), catch(), and finally()

In my first post of this series, I explained how the Promise constructor works by recreating it as the Pledge constructor. In the second post in this series, I explained how asynchronous operations work in promises through jobs. If you haven’t already ... more


Tuesday, 29 September, 2020 UTC

Creating a JavaScript promise from scratch, Part 2: Resolving to a promise

In my first post of this series, I explained how the Promise constructor works by recreating it as the Pledge constructor. I noted in that post that there is nothing asynchronous about the constructor, and that all of the asynchronous operations happen ... more


Tuesday, 29 September, 2020 UTC

Creating a JavaScript promise from scratch, Part 2: Resolving to a promise

In my first post of this series, I explained how the Promise constructor works by recreating it as the Pledge constructor. I noted in that post that there is nothing asynchronous about the constructor, and that all of the asynchronous operations happen ... more


Tuesday, 22 September, 2020 UTC

Creating a JavaScript promise from scratch, Part 1: Constructor

Early on in my career, I learned a lot by trying to recreate functionality I saw on websites. I found it helpful to investigate why something worked the way that it worked, and that lesson has stuck with me for decades. The best way to know if you really ... more


Wednesday, 22 July, 2020 UTC

How to safely use GitHub Actions in organizations

GitHub Actions1 are programs designed to run inside of workflows2, triggered by specific events inside a GitHub repository. To date, people use GitHub Actions to do things like run continuous integration (CI) tests, publish releases, respond to issues, ... more


Tuesday, 18 February, 2020 UTC

How I think about solving problems

Early on in my career as a software developer I thought my primary contribution was writing code. After all, software engineers are paid to ship software and writing code is a key component of that. It took several years for me to realize that there ... more


Wednesday, 4 September, 2019 UTC

Securing persistent environment variables using ZEIT Now

I’m a big fan of ZEIT Now1 as an application hosting provider. The way the service abstracts all of the cloud computing details and allows teams to focus on building and deploying web applications is fantastic. That said, I had a lot of trouble setting ... more


Tuesday, 5 March, 2019 UTC

Computer science in JavaScript: Circular Doubly-linked lists

In my previous post, I discussed what changes are necessary to turn a singly linked list into a doubly linked list. I recommend reading that post before this one (if you haven’t already). This post is about modifying a doubly linked list (also called ... more


Tuesday, 5 February, 2019 UTC

Computer science in JavaScript: Doubly linked lists

In my previous post, I discussed creating a singly linked list in JavaScript (if you haven’t yet read that post, I suggest doing so now). A single linked list consists of nodes that each have a single pointer to the next node in the list. Singly linked ... more


Tuesday, 15 January, 2019 UTC

Why I've stopped exporting defaults from my JavaScript modules

Last week, I tweeted something that got quite a few surprising responses: In 2019, one of the things I’m going to do is stop exporting things as default from my CommonJS/ES6 modules. Importing a default export has grown to feel like a guessing game where ... more


Tuesday, 8 January, 2019 UTC

Computer science in JavaScript 2019: Linked list

Back in 2009, I challenged myself to write one blog post per week for the entire year. I had read that the best way to gain more traffic to a blog was to post consistently. One post per week seemed like a realistic goal due to all the article ideas I ... more


Tuesday, 30 October, 2018 UTC

My (somewhat) complete salary history as a software engineer

It’s 2018 and somehow women are still getting paid less than men, even in supposedly progressive industries like software.[1] Whether that be from companies offering women less than men for the same position, women being less likely to negotiate or less ... more


Tuesday, 2 October, 2018 UTC

Extracting command line arguments from Node.js using destructuring

If you’ve worked on a Node.js command-line program, you were probably faced with the extraction of command line arguments. Node.js provides all command line arguments in the process.argv array. However, the contents of the array aren’t what you might ... more


Tuesday, 4 September, 2018 UTC

Detecting new posts with Jekyll and Netlify

This blog has long featured the ability to subscribe by email, so you could get an email notification when a new post was published. I’ve used various services over the years to achieve this, first with FeedBurner and later with Zapier. As I’m a do-it-yourself ... more