Reproducible Builds with NPM (And Why You Should Use Yarn Instead)

If you’ve ever worked on a large JavaScript project with many dependencies, you know how difficult it can be to have reliable, repeatable builds. I’ve seen many projects resort to committing their node_modules directory. While this approach will give you dependable builds, it is quite annoying and causes many problems of its own–the least of which is that it can easily add tens of thousands of files to an otherwise clean repo.

I spent a lot of time and effort trying to get nice reproducible builds on a recent JavaScript project, and I actually succeeded! Less than a week later, Yarn was released, solving all of these problems much more elegantly.
Read more on Reproducible Builds with NPM (And Why You Should Use Yarn Instead)…

Using Rust in an Embedded Project: A Simple Example

I’ve written a few posts on using Rust for embedded projects:

I think they gave a decent overview of a couple of tricky parts, but as always, the devil is in the details. To help with all the gritty details, I’ve written up a more complete example.
Read more on Using Rust in an Embedded Project: A Simple Example…

Using Rust 1.8 Stable for Building Embedded Firmware

A lot of things have changed since I wrote my last blog post on using Rust to build embedded firmware.

Since Rust 1.6 was released, libcore is now stable, and nostd is now a stable feature. This means we can now build Rust libraries for our embedded firmware using the official stable version of the compiler!

Read more on Using Rust 1.8 Stable for Building Embedded Firmware…

First Impressions of a $9 CHIP Computer

Almost a year ago, I participated in a Kickstarter for a $9 computer called CHIP. It’s similar to a Raspberry Pi, but with a few interesting differences. And surprisingly, it’s much cheaper.

I was a little skeptical. A lot of these projects end up as vaporware, and $9 is almost too cheap to be believable. But a few months later, my CHIP came! And it’s actually pretty sweet. Read more on First Impressions of a $9 CHIP Computer…

Uploading Files in Rails’ Active Admin

I recently wanted to be able to upload a small file and then store it as a field in the database via an Active Admin interface in a Rails app. The solution is pretty simple, but it was tricky to figure out.

In my case, the file was a small piece of firmware. For this example, we’ll have a simple table with only two interesting columns containing the name of the file and the contents of the file itself. Read more on Uploading Files in Rails’ Active Admin…

Monte Carlo Tree Search for Game AI

I have recently been implementing an Othello AI using the Monte Carlo Tree Search (MCTS) algorithm. One of the super cool things about MCTS (and actually the main reason I was attracted to it) is that you can use the same core algorithm for a whole class of games: Chess, Go, Othello, and almost any board game you can think of.
Read more on Monte Carlo Tree Search for Game AI…

Easy Networked Games with sim-sim-js

A long while ago, I wrote a simultaneous simulation networking library to simplify making multiplayer games in Ruby. Dave Crosby later made a port of the library, called sim-sim-js, for JavaScript, making it much easier to create real-time multiplayer games in the browser.

This short tutorial will show you how to get started making awesome networked games in the browser with sim-sim-js. Read more on Easy Networked Games with sim-sim-js…