JavaScript
Turn a Callback Function into a Promise in Objective-C and Java
I have been working on a React Native wrapper library for the Zendesk Support SDK. The SDK uses functions that accept a callback to upload a file. I wanted to upload an array of files and when all of the files were open, I wanted to call another function to create the Zendesk ticket. I…
Read MorePatching npm Modules
Sometimes it is helpful to patch an npm module. It could be the case that you need to make a simple fix and you don’t want to maintain a fork of the library. The library may have a pull request to fix the issue but you don’t want to use an unmerged branch. For those…
Read MoreFetching a File in NodeJS with Request and Parsing It with Readline
Recently, I was working on a project where I needed to fetch a file from the internet and parse it line by line. NodeJS has the readline module that can be used to split a data stream into lines and perform a function on each line, which was perfect for my needs. The problem is…
Read MoreAutomatically Creating Github Issues Using Webtask.io
I am the co-organizer of the BeerJS meetings for TahoeJS. BeerJS is a casual meetup for JavaScript developers that has chapters all over the world. Our meetup is largely organized using a Github repo. As co-organizer, one of my monthly tasks is to create a Github issue for the upcoming meeting. The issue announces the…
Read MoreBreaking Change with setState in React 16 Alpha Affecting React Native 43+
Recently, I upgraded the React Native app at Build.com to version 45.1. While testing the app, we discovered an undocumented change to the way that setState works. This change will affect React Native version 43+ and is due to a change in the React 16 alpha library. In this post, I’ll describe this breaking change…
Read MoreCreating Your First npm Package
Creating Your First npm Package Lately, I’ve been pushing myself to contribute more to open source. I started by contributing to existing projects: small features and writing documentation. I even wrote a blog post about it. This past week, I was finally able to make the jump from contributing to a project to authoring one.…
Read MoreGetting Started in Open Source
Getting Started in Open Source “The fundamental act of friendship among programmers is the sharing of programs” – Richard Stallman Recently, I’ve been working to contribute more to Open Source software. The following post is based on that experience and research for a presentation I did with Jordan Papaleo for TahoeJS. Contributing to Open Source…
Read MoreFrom Ski Instructor to Programmer – My Journey Back to Programming
On the surface, I have a stereotypical story for a programmer: I started programming at a young age, went to college for computer science and now I’m a senior JavaScript developer. But for around 8 years, I didn’t program at all and didn’t work in a technical field. This is the story of how I…
Read MoreFixing the React Native Error: “Unable to open URL: telprompt”
At Build.com, we use Bugsnag to help monitor our app for crashes and errors. The other day, I noticed a group of errors that all took the form: Error: Unable to open URL: telprompt:5551231234 After some research, I figured out what was causing the bug and how to fix it.
Read MoreFixing the Jest Error, “Invariant Violation: addComponentAsRefTo”
I work on the Build.com React Native app. We’re currently on a push to dramatically increase our test coverage. Recently, I came across a bug that affects some, but not all, of our tests. Tests fail with the message: Invariant Violation: addComponentAsRefTo(…): Only a ReactOwner can have refs. You might be adding a ref to…
Read More