On Emacs and Node.js Testing Workflow

Making it easy to lint your JavaScript is a good step, but it's pretty helpful to be able to execute your tests from within your editor. I'm on a certifiable emacs kick lately, so here's how I got it to work! I wanted to get testing to feel similar to…

On Emacs and Node.js Workflow

One of the things I miss most about my time in Microsoft's realm is the tooling. It had this great way of making you feel nice and cozy within the bounds of how their stuff works (although I always felt the urge to break the mold, because let's face it,…

Silly Mistakes

Have you ever been in the middle of writing a function, and a bright idea hit you like a piano out of mid air, or suddenly interrupted by a flash mob? Me, too. What were we talking about? This is among the most universal experiences in programming: distractions that lead…

Go: Range is by Value

TL;DR: The value for each item in a range loop is not by reference. Instead, use the index index := range foos.Bars and index to the item &foos.Bars[index]. I learned a practical lesson today about how the range keyword works in Go. Here's the scenario. I…

Whimsy

As it turns out, I'm really bad at following through with plans. I recently intended to dig through algorithms in Go, but here I find myself doing whimsical things with my time instead. A couple of years ago I had a dubious amount of fun with a tiny bit of…

Monkey Patching in Node.js

Disclaimer: Don't do this. Really. This post is just for the fun of it. Monkey patching (a.k.a. "Duck Punching") in Node.js is somewhat of a controversial topic. Conventional wisdom says to steer clear of this activity, but I think sometimes it is inevitable. The best…

Go Algorithms: Sorts

I started with Go's sort package for some inspiration on how to build the API for my implementations. It is nice to be able to look at other approaches, especially when I'm more accusotmed to doing things in Node.js or C#. The Interface Sorting algorithms generally only need to…

Algorithms in Go

Lately I have been learning a lot about Go. I decided a great independent study subject would be to review Algorithms, Fourth Edition in the context of Go. However, this presents a few obsticles that ups the degree of difficulty. Most notably, the Go language does not support generics. While…