I recently released a new open source project called autotidy . It's a file-system organizer ala Hazel , Maid , and Organize . What does it do exactly? Well, it allows you to define rules that should be applied when a directory changes. For example, I use it to organize my Downloads folder. When I download a file I often want it to automatically end up in a certain place. For example, audio files…
I recently bought a new MacBook, and instead of manually installing everything for the n th time, I decided to go down the path of using Nix and nix-darwin to codify my dev machine configuration. If you're curious, let's dive in. What is Nix? Nix is a few things which I would break down into three categories: A configuration and build system referred to as "Nix". A configuration language ,…
I was recently debugging an issue in some integration-style Go tests which made me realize that I didn't have a very deep understanding of how parallelism works when using go test . I knew that there were ways that Go could parallelize tests, and I thought it had something to do with using t.Parallel() inline in each of my test functions. Because I feel the concurrency behavior of go test is…
Today I want to talk about an issue I was having with UDP sockets in Go, and how I learned more about my program by making use of two tools that ship with Mac OS X called dtruss, and DTrace. I do most of my programming on a Mac, and I have been working on a project written in Go which makes use of UDP sockets. When trying to add some unit tests to my code I decided to create one around…
Did you know you can inspect your node application's memory without instrumenting your code? It's possible using a tool called mdb_v8. With mdb_v8 we can produce a core dump of a running node process, and then later inspect the memory at the time the core dump was generated. This leads to some powerful postmortem debugging capabilities. In this post I'm going to walk you through setting up mdb_v8…
Lately I've been doing more work in the Go programming language. Today I thought I would share three "gotchas" that caught me off guard, or otherwise produced results that I would not have expected in my work with Go. 1. The range clause The range clause is very convenient. It allows you to iterate over a slice or map with two variables which represent the index and the value of each item. For…