Technical Blog

Alright, alright — always doesn’t mean always. But really, the backend for front end pattern is one that everyone should be using and can be tempting to skip. But having a backend for frontend should mean little upfront work that allows a range of future benefits. What is a BFF? A Backend for frontend (BFF) is a server that exists to server a client application. In a sense every web application…

Keep Reading →

Recently, I’ve been working to add more unit tests to front end code. Using Kent C. Dodds’ great react-testing-library (if you haven’t checked it out, it’s seriously 🔥) alongside Jest. Testing small components is usually pretty straightforward. Pass them mocked functions as props, fire some events, and validate things look like you expect. Most of my fun has been when I’ve need to mock…

Keep Reading →

A while back I read about some of the metaprogramming features that were added in ES6. While I use some extensively, like Symbols, others I’ve had a hard time finding a use for. Like Proxies. They seem so cool (and now you know my idea of cool 😎). I’ll explain briefly what a Proxy is and then what I used it to actually solve recently. The Proxy Object Before going too far, I need to give credit…

Keep Reading →

The other day I was reviewing a piece of code that looked something like this: Now, depending on your familiarity with events in React, that code might seem totally fine. But the async event handler stood out to me and made me wonder if those lines where we’re accessing elements will work as expected. before I get into whether or not that works, let’s hit some background points here. React Events…

Keep Reading →

While working on a React Native app recently, I discovered a need to drop down and write some native code for audio processing. I had what I thought was a straightforward goal: layer two audio tracks over each other. Having roughly zero familiarity with iOS development, I had no idea where to start. I tried a lot of things before I discovered AVAudioEngine — but it’s what I was looking for all…

Keep Reading →

You may know that it’s good to not check your database credentials into Git. Good! Knowing is half the battle right? I’ve found that deploying secure configurations using Docker is actually a straightforward process. (You just search through the 5,000 Docker CLI flags until you find one that looks right?) Before we get to Docker though, let’s start at the beginning. Encrypting Data When storing…

Keep Reading →

Update May 2019: Consider looking at the for await … of syntax as well. I was writing some API code recently using Node 8, and came across a place where I needed to use Array.prototype.map with an async function on each item. Async/Await is one of my favorite new features in javascript as it makes asynchronous javascript code much more readable. Now I was briefly surprised when my map call did not…

Keep Reading →

After watching a talk on React Router v4 at React Conference, I was interested in trying their native router. I had experience already using it for web development and loved the small api surface it provided. At the time, I was using React Native Router Flux but didn’t feel tied to it. I didn’t end up choosing to stick with React Router, but it led me to playing with a few different routing…

Keep Reading →

I've spent a decent amount of time writing server code with Node.js but despite that I've somehow never written a simple script before. I mean, I knew they were easy and useful, but I'd never got around to using one. Writing one off scripts was basically my entire college education - so I love stuff like this. Let's get into what I learned! Setting things up 💥 You're done! Okay not really, but it…

Keep Reading →

If you’ve read the React docs, you probably have seen that React is declarative. This is normally the type of thing I skip over — a not so good habit of mine. (Give me the code samples already!) But as someone who started learning React soon out of college, I was often thinking about problems incorrectly. This isn’t surprising. College CS can be an exercise is writing hacky scripts to solve one…

Keep Reading →

Or why you shouldn’t complain too much about old code. There is a common class of complaints I hear, especially from newer developers, about the code they are in. They all generally boil down to “old developer was stupid and this code sucks.” Or sometimes they’re more like “We should hunt down old developer and burn then at the stake.” I’m writing this to save old developer from being met with a…

Keep Reading →

2019 note: You absolutely do not need to use redux. It may be useful to you, it may not be. The most important thing is that you reason about state in the right way. You keep state local where it makes sense, elevate it when necessary, and build composable applications. What library you use for that (if you choose to use one at all - which I do not anymore) is second to the way in which you…

Keep Reading →

If you’re coming to React Native from a web background like me, you’re probably familiar with React-Router. While looking for solutions on handling routing in my React Native applications, I came across React-Native-Router-Flux(RNRF) as a great solution. It’s built on React Native’s ExperimentalNavigation API — a still unstable feature that you won’t have to worry about keeping your app up to date…

Keep Reading →

Our new song is an earthly song, a song of pilgrims and wayfarers upon whom the Word of God has dawned to light their way.

-Dietrich Bonhoeffer