JavaScript10 posts

Image for "Understanding Jest Mocks"
JavaScript

Understanding Jest Mocks

Decipher Jest's complex rules for mocking modules.

Image for "Faster Google Classroom Assignments with a Bookmarklet"
JavaScript

Faster Google Classroom Assignments with a Bookmarklet

A free tool for teachers to automate the repetitive task of assigning work to a group.

Image for "Segment S3 uploads by Cognito user"
AWS

Segment S3 uploads by Cognito user

Use S3 policies to isolate Cognito users into subdirectories of a bucket.

Image for "Calculate AWS v4 Signature with client-side JavaScript"
AWS

Calculate AWS v4 Signature with client-side JavaScript

Use AWS Cognito credentials to authenticate requests directly in the browser.

Image for "Code Style: Accessing JavaScript Variables"
Code Style

Code Style: Accessing JavaScript Variables

JavaScript's syntax allows for a lot of shortcuts when accessing variables. But shorter code can also be confusing. Which techniques are the shortest? Which are the easiest to read?

Image for "A Parser for Conditional Expressions"
JavaScript

A Parser for Conditional Expressions

I've created a tool for analyzing conditional expressions.

Image for "The Statistics of War (the card game)"
JavaScript

The Statistics of War (the card game)

How does shuffling affect the duration of a game of War?

Image for "Using the MEAN stack on Windows with PuPHPet"
Vagrant

Using the MEAN stack on Windows with PuPHPet

Lately I've been playing with Vagrant and Puppet to create virtual machines for local MEAN stack development.

Image for "Get bound property name in a KnockoutJS custom binding"
KnockoutJS

Get bound property name in a KnockoutJS custom binding

Retrieve the name of a variable passed to a Knockout binding.

Image for "KnockoutJS custom binding for Quicksand"
KnockoutJS

KnockoutJS custom binding for Quicksand

Animate KnockoutJS observable changes with the Quicksand plugin for jQuery.