Spawn Virtual Browsers Effortlessly with Firefox Containers

You may have heard of Mozilla’s Facebook Container, an add-on for Firefox that keeps Facebook isolated whenever you open it. It’s an easy-to-use and simple tool for defending user privacy.

But you may not have heard much about the Firefox features that make the Facebook Container possible. They’re called Firefox Containers—and they represent a useful tool that sets Firefox apart in a powerful way. Read more on Spawn Virtual Browsers Effortlessly with Firefox Containers…

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 JSON-serializable.

However, when it comes time to build test fixtures around these dictionaries for testing code that might look up lots of different keys, creating the test data for all of these keys becomes a large effort. Read more on A JavaScript Object that Dynamically Returns Unknown Properties…

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 need a few more things. And, of course, with Node.js itself being constantly under development, you’ll want to lock down your development to a version your code can use. In this post, I’ll talk you through how we get our Windows command-line environments set up for the Node.js (actually, Electron) application my team is developing.
Read more on Setting Up Windows to Build and Run Node.js Applications…

Why a No-moonlighting Guideline Benefits Employees

I had an old employer reach out to me the other day asking if I’d like to do some contract work for them. As I have in all these situations, I recalled Atomic’s guideline for Atoms—we should not do work on the side that competes or conflicts with Atomic’s business.

While it’s immediately clear how such a guideline protects Atomic’s business, I’ve also found that it’s really helpful for me personally. Read more on Why a No-moonlighting Guideline Benefits Employees…

Spreading the Spread and Rest Love

JavaScript’s spread syntax has proven to be an extremely useful tool while working with immutable data structures as part of a React/Redux project.

Now that it’s widely available for objects in LTS Node 8 (as it has been for some time for other runtimes via TypeScript), it’s interesting to go back and take a look at all it can do. Read more on Spreading the Spread and Rest Love…

Toggling Switches when the Server Says “No”

We had an interesting user experience challenge on a recent project. When the system was in a particular state, the user was allowed to toggle a switch. The system would immediately acknowledge the toggle and, since it was on a local network, do so faster than the user could perceive.

Our problem was that sometimes, in situations our application couldn’t track because we didn’t have the necessary information, the server was responding negatively to the toggle. Our challenge: how to communicate that yes, we got your click, but we can’t actually toggle the underlying item right now.
Read more on Toggling Switches when the Server Says “No”…

Understanding and Embracing TypeScript’s “readonly”

If you’ve tried to use JavaScript in a functional style, you’ve no doubt chafed at the fact that all those little objects flying around at any given time are about as far as they can possibly get from immutable. You can, of course, be careful to write code that never mutates an object, but while good practices improve your code, they’re weak defenses against bugs.

TypeScript can help you with its readonly property modifier. With readonly, you can rely on TypeScript’s static analysis to enforce and flag mutations in your codebase.
Read more on Understanding and Embracing TypeScript’s “readonly”…