hello.js

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

Tuesday, 14 August, 2018 UTC

Simulate Network Outages in Your App with Little Snitch

Simulate Network Outages in Your App with Little Snitch

Modern development tools are super-convenient. XCode’s more recent builds let you debug an iOS app over WiFi, so you don’t have to succumb to the indignity of plugging in a Lightning cable (so 2017). React Native’s tooling goes a step farther, giving ... more


Sunday, 12 August, 2018 UTC

Beyond Coding Bootcamp, Part 3 – Learning to Think Like a Programmer

Beyond Coding Bootcamp, Part 3 – Learning to Think Like a Programmer

Of all the computer science classes I took in college, there were three that I’d recommend, without reservation, to someone who wants to do my job. Each taught me something that relates to programming as an activity and a way of thinking . There’s nothing ... more


Tuesday, 7 August, 2018 UTC

Managing Data Loaders in Node.js with Shared State

Managing Data Loaders in Node.js with Shared State

When developing software, it’s always tough to work with caching. While my team appreciates the efficiencies that Data Loader can provide for applications, we still struggle with the same problems that always come up when caching queries, mainly invalidating ... more


Monday, 6 August, 2018 UTC

Beyond Coding Bootcamp, Part 2 – Understanding Algorithms

Beyond Coding Bootcamp, Part 2 – Understanding Algorithms

If you’re going to be a developer, you need to understand algorithms. At its most basic definition, an algorithm is just a program. “print(“Hello, World!”)” is an algorithm, albeit a very boring one. As a software developer, your job boils down to reading ... more


Friday, 27 July, 2018 UTC

An Intro to React Navigation for React Native

An Intro to React Navigation for React Native

When you first sit down to write a React Native app, you’ll find that after making your first screen, you don’t have an easy way to navigate to another. React Native doesn’t have that functionality built in, but in this post, I’ll outline how to use ... more


Wednesday, 25 July, 2018 UTC

Understanding the Apollo Default Resolver

Understanding the Apollo Default Resolver

According to documentation for Apollo’s GraphQL-tools: You don’t need to specify resolvers for every type in your schema. If you don’t specify a resolver, GraphQL.js falls back to a default one… The documentation goes on to state that the default resolver ... more


Thursday, 19 July, 2018 UTC

Adding Integration Tests to Gradle

Adding Integration Tests to Gradle

It’s well understood that unit tests alone may not be sufficient to release new code with confidence. Integration/functional tests are used to automate testing for workflow regressions. As part of setting up a new Java REST API server, I wanted to embed ... more


Tuesday, 10 July, 2018 UTC

IdentityServer Authentication with an MVC Client & Unauthorized Loops

IdentityServer Authentication with an MVC Client & Unauthorized Loops

I’ve learned a lot about authentication this past month. My team has been working on migrating an application from using Forms Auth to IdentityServer single sign-on. Our goal is to provide a centralized authentication for all parts of the system. This ... more


Wednesday, 4 July, 2018 UTC

Migrating an Ejected Create React App to TypeScript

Migrating an Ejected Create React App to TypeScript

I love Create React App, and I also love TypeScript. That means I really love react-scripts-ts , which is a great way to spin up a new SPA for experimental purposes. Unfortunately, there’s no trivial way to take an existing Create React App (CRA) and ... more


Tuesday, 3 July, 2018 UTC

A JavaScript Object that Dynamically Returns Unknown Properties

A JavaScript Object that Dynamically Returns Unknown Properties

In our current project, we make extensive use of JavaScript objects as dictionaries, with the property name functioning as a key for the object we want to look up. We can use the in operator to test for property presence, and the dictionaries are perfectly ... more


Friday, 29 June, 2018 UTC

Creating Azure WebJobs in F#

Creating Azure WebJobs in F#

My colleague Brian recently wrote about Azure Functions in F#. Azure Functions are great, and I definitely recommend them if they fit your use case. These functions are built on top of an older background processing system called WebJobs. While Functions ... more


Tuesday, 26 June, 2018 UTC

Eliminate Circular Dependencies from Your JavaScript Project

Eliminate Circular Dependencies from Your JavaScript Project

Circular dependencies (also known as cyclic dependencies) occur when two or more modules reference each other. This could be a direct reference ( A -> B -> A ): // file a.ts import { b } from 'b'; ... export a; // file b.ts import { a } from 'a'; ... more


Tuesday, 19 June, 2018 UTC

Setting Up Windows to Build and Run Node.js Applications

Setting Up Windows to Build and Run Node.js Applications

Node.js is just JavaScript, right? So it should be really easy to run Node.js applications on Windows—just download and install Node, npm install , and go, right? Well, for some applications, that’s true. But if you need to compile extensions, you’ll ... more


Thursday, 14 June, 2018 UTC

Mocking TypeScript Modules with Sinon

Mocking TypeScript Modules with Sinon

Lately, my team has been looking for better ways to create and maintain mocks in our TypeScript project. In particular, we wanted an easy way to mock out modules that we built using Sinon.JS. We had a few goals for our mocks: Specific: Each test should ... more


Tuesday, 12 June, 2018 UTC

Combining Redux & Apollo Containers

Combining Redux & Apollo Containers

Redux and Apollo are popular implementations of Flux architecture and GraphQL respectively. A common pattern is to make a GraphQL query with data from the Redux state. If the state value changes, Apollo should re-run the query and the new data should ... more


Tuesday, 5 June, 2018 UTC

Efficient Search Autocomplete with React-Redux & Apollo

Efficient Search Autocomplete with React-Redux & Apollo

The application I’m working on right now has a search box that makes suggestions as the user types and does quick, inline searches to provide extra-fast results. Yesterday, I talked about how we improve our timing with debouncing. Today I’ll dive into ... more


Monday, 4 June, 2018 UTC

It Turns Out I Don’t Actually Know Everything – and I Never Will

It Turns Out I Don’t Actually Know Everything – and I Never Will

Over a recent weekend, I installed a new faucet in a bathroom. Aren’t I handy? Well, not especially—I heard the same joke from the employees at three separate hardware stores: “Well, it’s not a real house project until you’ve gone back to the store at ... more


Tuesday, 22 May, 2018 UTC

What’s the AWS IoT Suite Like? – A Dozen Lego Kits Mixed Together

What’s the AWS IoT Suite Like? – A Dozen Lego Kits Mixed Together

Recently, I’ve been hearing more and more chatter about Amazon’s AWS IoT tool suite, so I decided to do a bit of research to see what they have to offer. As with most Amazon development tools, there is a ton of documentation on these tools. But of course, ... more


Saturday, 19 May, 2018 UTC

Six Editor Features You Shouldn’t Live Without

Six Editor Features You Shouldn’t Live Without

When it comes to my choice of editor, I find that I’m a nomad. I’m always switching around based on the needs of my current project and the editor I’m using. If I squint hard enough, VSCode starts to look like Emacs. Over time, I’ve found a few editor ... more


Friday, 18 May, 2018 UTC

Azure Functions in F# (For Real)

Azure Functions in F# (For Real)

If you’ve ever glanced at Azure Functions and F#, you might think they were made for each other. And yet if you want to create a new Azure Function project in Visual Studio, C# is apparently your only option. Maybe someday, Visual Studio will include ... more


Wednesday, 16 May, 2018 UTC

Extending the Heroku Timeout in Node.js

Extending the Heroku Timeout in Node.js

Heroku will terminate a request connection if no data is sent back to the client within 30 seconds. From Heroku’s Router – HTTP timeouts documentation: HTTP requests have an initial 30-second window in which the web process must return response data ... more


Tuesday, 8 May, 2018 UTC

Avoid Careless Production Mistakes with Custom Scripts

Avoid Careless Production Mistakes with Custom Scripts

In the wise words of @stahnma, “Everybody has a testing environment. Some people are lucky enough to have a totally separate environment to run production in.” Thankfully, the project I’m working on has multiple environments: production (the most recently-released ... more


Thursday, 3 May, 2018 UTC

Folding Away Mutations in F#

Folding Away Mutations in F#

I’ve been working in F# lately, and one of its smaller features has had a big impact on my programming style: Variables are immutable by default . If you want to change something, you have to declare it mutable . Sometimes, this is what I naturally reach ... more


Tuesday, 24 April, 2018 UTC

Lifting Functions into Promises in JavaScript

Lifting Functions into Promises in JavaScript

When working on a JavaScript project, I usually spend a lot of time around promises. Lately, I’ve been using this helpful function called liftP that makes working with promises a little bit easier. liftP is a higher-order function that takes a function ... more


Thursday, 19 April, 2018 UTC

Three Habits to Break on Large React Native Projects

Three Habits to Break on Large React Native Projects

Working on a large(ish) React Native project presents some unique challenges for web and mobile developers. Isolating components from one another is a great way to make refactoring easy, but it leads to some pretty gnarly directory hierarchies. If you ... more


Saturday, 7 April, 2018 UTC

Resources for Middle School Girls to Learn Programming

Resources for Middle School Girls to Learn Programming

While we were at the Junior Achievement Girls Dream Fair a few months ago, a middle school girl came up to our booth. She went carefully through a sheet of questions, writing down my answers word for word. “Anything else you’re curious about?” I asked ... more


Tuesday, 3 April, 2018 UTC

Redux: Re-Rendering Caused by mapDispatchToProps

Redux: Re-Rendering Caused by mapDispatchToProps

I’ve worked on a couple of React/Redux projects now, and it was only recently that I realized some of the re-rendering issues I’ve run into were being caused by incorrectly using connect , and specifically the second argument to connect — mapDispatchToProps ... more


Tuesday, 27 March, 2018 UTC

Statically Typed Data Validation with JSON Schema and TypeScript

Statically Typed Data Validation with JSON Schema and TypeScript

One super common problem on TypeScript projects is figuring out how to validate data from external sources and tie that validated data to TypeScript types. In these situations, you generally have a few options: Define types and validations separately, ... more


Friday, 23 March, 2018 UTC

Headless Chrome with Testem on VSTS-Hosted Agents

Headless Chrome with Testem on VSTS-Hosted Agents

I previously wrote about building a Node app on VSTS Windows agents. Since then, we’ve started using headless Chrome on those agents. Here’s how. Background Browser test automation has come a long way over the years. We used to accept having a browser ... more


Thursday, 15 March, 2018 UTC

Incrementally Building My Own Code Health Tool

Incrementally Building My Own Code Health Tool

Recently, I’ve been looking for ways to improve the code health of a project I’m working on. It’s a pretty big team, so things are moving quickly. While the codebase is in good shape now , little things can quickly spiral out of control. As I was thinking ... more