hello.js

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

Monday, 8 October, 2018 UTC

How to Get and Set CSS Variable Values with JavaScript

How to Get and Set CSS Variable Values with JavaScript

CSS variables are a very welcome addition to the language, despite them being incredibly basic. Sure we could use SASS or stylus but languages should never count on developers relying on frameworks and toolkits to accomplish what we know we need. And ... more


Friday, 21 September, 2018 UTC

Script & Style Show: Episode 22: JavaScript, Mentoring, and Blockchain with Kyle Simpson

Script & Style Show: Episode 22: JavaScript, Mentoring, and Blockchain with Kyle Simpson

In this episode: David and Todd discuss the best holiday every: National Cheeseburger Day. After the salivation ended, David and Todd welcome Kyle Simpson, aka getify, to the show. Kyle’s a well known JavaScript super hero so we jumped on a variety of ... more


Thursday, 20 September, 2018 UTC

Script & Style Show: Episode 21: Third Party JavaScript and Web Performance with Charlie Vazac

Script & Style Show: Episode 21: Third Party JavaScript and Web Performance with Charlie Vazac

On this week’s episode: David shrugs aside the scars of the week’s DevTools Debugger development to welcome this week’s guest: Charlie Vazac. Charlie boasts the title of Senior Architect at Akamai and joins David and Todd to talk about third party JavaScript, ... more


Thursday, 13 September, 2018 UTC

Aliases with JavaScript Destructuring

Aliases with JavaScript Destructuring

Destructuring in JavaScript has totally changed the way JavaScript is written these days; code is more concise to write but but, from a visual standpoint, the syntax of the language has changed so much. Any good developer knows, however, that change ... more


Monday, 10 September, 2018 UTC

Object.freeze: Immutable Objects

Object.freeze: Immutable Objects

One of my favorite part of JavaScript has always been mutability of objects. I loved that MooTools and likewise frameworks could modify native prototypes to enhance them with functionality we knew the language need; in fact, I credit MooTools with pushing ... more


Friday, 7 September, 2018 UTC

Twilio: the Ultimate Communication Tool

Twilio: the Ultimate Communication Tool

My favorite part of the mobile revolution was the explosion of communication tools. I grew up chatting on AOL Instant Messenger, MSN Messenger, and other desktop messaging tools, so when mobile phones took on text messaging, I was hyped for a new generation ... more


Tuesday, 4 September, 2018 UTC

Slides Review: Create Awesome Animated Websites

Slides Review: Create Awesome Animated Websites

Many of the impressive product websites I see these days are single-page sites with elegant animations and responsive elements; responsive images, responsive font-sizes, and responsive backgrounds. Whenever I see these sites I wonder how these sites ... more


Wednesday, 29 August, 2018 UTC

Array and Boolean

Array and Boolean

One of the annoyances of old-school JavaScript was side effects; then Array.prototype got methods like filter , map , and forEach so we didn’t need to burn variables before looping over values. I can’t explain how happy I am that the JavaScript language ... more


Sunday, 12 August, 2018 UTC

Replace Repeated Characters with JavaScript

Replace Repeated Characters with JavaScript

URLs can be tricky to work with because they can be more complicated than the traditional URL format you type in. I was again reminded of this when I was parsing Webpack URLs when I saw this beauty: webpack-internal:///../rbd/pnpm-volume/144384a5-85d9-4142-b9b9-168eea22eb97/node_modules/.registry.npmjs.org/fbjs/0.8.17/node_modules/fbjs/lib/isNode.js ... more


Tuesday, 7 August, 2018 UTC

Script & Style Show: Episode 18: JavaScript Date and TC39 with Maggie Pint

Script & Style Show: Episode 18: JavaScript Date and TC39 with Maggie Pint

In this week’s episode: Todd discusses his self-imposed ban from Twitter while David tries to fathom a day without feeling the importance of people liking his pithy tweets. The episode is saved by Maggie Pint, a Microsoft open source guru who also happens ... more


Friday, 3 August, 2018 UTC

Create gists from Command Line

Create gists from Command Line

One of the best ways to gain contributors for your open source project is by providing a rough patch for the contributor to start from. One of the best ways to ask for help is by providing what you have so far and letting a mentor look it over and provide ... more


Thursday, 2 August, 2018 UTC

Get and Set Volume with JavaScript

Get and Set Volume with JavaScript

The <audio> and <video> tags provide a wealth more functionality than most people know. For instance, did you know that you could detect supported video formats and audio formats using a few JavaScript tricks? It got me to thinking about ... more


Tuesday, 31 July, 2018 UTC

Array Destructuring

Array Destructuring

Destructuring has become a major language feature in JavaScript, most prominently seen with imports, but also in function declarations and so on. While object literals are the usual case for destructuring, remember that you can also destructure Arrays ... more


Monday, 30 July, 2018 UTC

Create Custom Video Player Controls with CanJS

Create Custom Video Player Controls with CanJS

In this guide, you will learn how to create a custom video player using the <video> element and CanJS. The custom video player will: Have custom play and pause buttons. Show the current time and duration of the video. Have a <input type="range"> ... more


Tuesday, 24 July, 2018 UTC

Script & Style Show: Episode 16: JavaScript & LEDs with Kristina Durivage

Script & Style Show: Episode 16: JavaScript & LEDs with Kristina Durivage

In this episode: Todd’s back from an amazing conference and David sees this week’s guest as being the ticket to making his kids thing he’s a super hero. The amazing Kristina Durivage stops by to talk JavaScript, electrical engineering and unusual uses ... more


Thursday, 12 July, 2018 UTC

Search Git Commits Between Dates

Search Git Commits Between Dates

One of my weaknesses as a developer is relying on UIs to provide me the data I need. It’s not a fatal weakness but it does hamper me a bit. One prime example is relying on GitHub’s interface to review changes; git’s command line provides the information ... more


Wednesday, 27 June, 2018 UTC

React Node Flow

React Node Flow

Flow, the static type checker used in many React projects, feels like a gift and a curse at times; a gift in that it identifies weaknesses in your code, and a curse that sometimes you feel like you’re needlessly adjusting your code to satisfy Flow. I’ve ... more


Thursday, 21 June, 2018 UTC

Convert HTML to Markdown

Convert HTML to Markdown

One of my biggest mistakes with this blog was not finding a WordPress plugin that would allow me to write my posts with markdown; to this day I still need to write posts in “Visual” mode and then manually convert the post to HTML for “Text” mode. One ... more


Tuesday, 12 June, 2018 UTC

Uppy File Uploading

Uppy File Uploading

One of the big tasks I was charged with at my first job was setting up a system by which any customer or potential customer (aka anonymous user) could upload PDF and image files. I had loads of constraints to deal with: browser support, server settings, ... more


Tuesday, 5 June, 2018 UTC

What’s Next for Hybrid App Developers? (Sponsored)

What’s Next for Hybrid App Developers? (Sponsored)

The story of hybrid application development is a never-ending one. Each framework has to continuously strive and innovate to remain relevant, and the discussion of which framework to use is a question often asked. Most hybrid applications are built using ... more


Saturday, 2 June, 2018 UTC

Script & Style Show: Episode 11: Ionic Framework with Max Lynch

Script & Style Show: Episode 11: Ionic Framework with Max Lynch

In this episode: David blames his wife for getting sick and missing last week’s show, Todd’s got a new Jeep, and David then blames his wife for not letting him have a Jeep. Oh, and Max Lynch of Ionic Framework fame stops by to talk about Ionic, Stencil, ... more


Wednesday, 30 May, 2018 UTC

OpenRates Currency API (Sponsored)

OpenRates Currency API (Sponsored)

Creating your own APIs can be a total nightmare: worrying about uptime, load balancing, data accuracy, caching, and all of the other risks would keep me up at night. And if your API relates to money in any way? If you get that wrong you could be costing ... more


Tuesday, 22 May, 2018 UTC

Script & Style Show: Episode 10: Dojo

Script & Style Show: Episode 10: Dojo

In this episode: David and Todd welcome Dojo and JavaScript legend Dylan Schiemann and TypeScript and Dojo 2 superhero Nick Nisi. We cover the early days of Dojo, the road to 2.0, and what’s in Dojo 2.0 and beyond. Enjoy! The post Script & Style ... more


Friday, 18 May, 2018 UTC

Detect WebVR Support with JavaScript

Detect WebVR Support with JavaScript

It’s been two years since I was heavily involved with WebVR at Mozilla but, despite not contributing every day, I can see VR making leaps and bounds, from Firefox making an increased effort to Chrome pushing VR and Oculus and HTC (Vive) improving their ... more


Monday, 14 May, 2018 UTC

How to Get a React Component’s Element

How to Get a React Component’s Element

JSX is an amazing pseudo-language for React, and if I’m honest, it’s what brought me to love React so much. Using React without JSX is cumbersome and frustrating, while using JSX is such an easier way to express your code. One drawback of JSX, however, ... more


Tuesday, 8 May, 2018 UTC

Vertically Centering with Flexbox

Vertically Centering with Flexbox

Vertically centering sibling child contents is a task we’ve long needed on the web but has always seemed way more difficult than it should be. We initially used tables to accomplish the task, then moved on to CSS and JavaScript tricks because table layout ... more


Monday, 7 May, 2018 UTC

React and autofocus

React and autofocus

While I love ReactJS, I can say that I sometimes find interactions that were easy during the pre-ReactJS are annoyingly difficult or at least “indirect”. One example is properly ensuring that a given <input> element gets focused when a button in ... more


Wednesday, 18 April, 2018 UTC

Creating Spacers with Flexbox

Creating Spacers with Flexbox

I was one of the biggest fans of flexbox before it hit but, due to being shuffled around at Mozilla, I never had the chance to use it in any practice project; thus, flexbox still seems like a bit of a mystery to me. This greatly pains me because I feel ... more


Monday, 9 April, 2018 UTC

The Dark Side of Promises

The Dark Side of Promises

Since the release of es6 many new features have found their way into NodeJS, but non had quite the same impact as promises. Promises have been developed for the browser before es6 was even a thing. There were several implementations that have been used ... more


Saturday, 7 April, 2018 UTC

Script & Style Show: Episode 6: Debugging with Jason Laster

Script & Style Show: Episode 6: Debugging with Jason Laster

On this week’s episode: we welcome my colleague Jason Laster from Mozilla to speak about the Firefox DevTools debugger. We talk debugging, console shame, the future of JavaScript debuggers, and more! Have ideas for the next episode? Comment below! The ... more