Skip to content

JavaScript

Multiple Distributions with Jekyll, Pandoc & Markdown

Some time ago, I got the idea that I should write a book about something. I wasn’t quite sure of the topic but I thought it would be an interesting exercise. While contemplating that idea, I reasoned that, if I wrote a book, I would want to use some interesting technologies. I like using GitHub…

Read More

Adding Support for ES2015 Number Methods to iOS 8

At Build.com, I’m working on an e-commerce app using React Native. React Native allows us to write apps in JavaScript that can run on iOS and Android phones with near native performance. The other day, we received several crash reports from users running iOS 8. All of the reports involved method calls on JavaScript’s global…

Read More

Handling a Null Response from an API

I’ve been working with React Native lately, which uses the Fetch API for asynchronously fetching data from web services. Recently, I came across a really strange error. Certain calls (in particular, calls to fetch data for new users) would cause an error, “Unexpected end of JSON”.

Read More

Sorting Arrays with JavaScript iterators

A lot of front-end web development involves displaying sorted lists on a page and maintaining the state and logic of the list. These sorted lists may be things like a list of products or an employee directory. Often, we will give the user the ability to re-sort the list or sort by a different key.…

Read More

How To Set Up the Babel 6 Plugin in WebStorm

The latest version of Babel, the ES2015 transpiler, is out and there have been enough changes that I’ve decided to revise my original blog post, “How To Set Up the Babel Plugin in WebStorm”. At the time of writing, Babel is on version 6; my original post was written for Babel 5.

Read More

Using JavaScript and D3 to Graph a Value in a Range

A project came up recently where I needed to display a value on a range of values. You can imagine something like the display on an old thermostat: a range of values are displayed with a marker to indicate the current value. The prior solution involved an image of the range of numbers with an…

Read More

Dynamically Labeled Markers on a Google Map

A project came up recently that involved building a Google Map with a set of markers on it in an Angular single page app. All of the markers needed to be labeled with their rank number. Markers could be red or blue and “inactive” markers would have a reduced opacity (depending on the data). A…

Read More