Want Absolute Imports in React Native? Just Add a Little JSON

If you’ve spent any time working with React Native, you’ve probably run into a peculiar quirk where you’re seemingly forced to use relative imports in all of your source files. Things start to look a bit like this: import {Thing} from "../../../../core/thing"; import {Foo} from "../../foo"; It all quickly becomes unwieldy because it requires you […]

React Contexts are Dynamic Scope

I’ve worked with a few teams who found React’s Contexts somewhat difficult to understand at first. This started me thinking about how best to explain them. What I realized is that Contexts are essentially nothing more than dynamic scope. What’s Dynamic Scope? As a programmer, you’re most likely very comfortable with lexical scoping, even if […]

The Hazards of Transactional Test Isolation

These days, it’s standard practice to run your unit and system tests with some degree of parallelism. When doing so, it’s important to ensure that the code being tested doesn’t interfere with other running tests. Usually, this comes down to the database layer. There are a few options for accomplishing isolation at the database layer. […]