Enter the Abyss

A good tip from David Allen’s Getting Things Done: you will find yourself more motivated to exercise after you put your workout clothes on. So, no matter what, just put on your workout clothes. The general concept is, do one physical, worldly thing, no matter how trivial, that creates the space where achieving your goal is easier. If your goal is related to programming, these are my favorite actions to get yourself moving. more...

A basic tmux bash script explained

Since I’ve been writing more Go, I’ve been using a lot more plain text editors such as vim and Sublime Text. I tried to use an IDE for a while (IntelliJ with Go plugins), but it felt antithetical to the raw, low-level nature of Go. Also, the tooling wouldn’t let me set my $GOPATH in an easy way. So, back to text editors and shells for me. Scripting tmux Many people recommend the tmuxinator Ruby gem to configure tmux sessions, but I’m trying to avoid a dependency on Ruby, so I’m going to use raw bash scripts for launching tmux sessions. more...

Notes on a Langauge Agnostic Project Template DSL

Mature languages all have build tools, and many have requirements around where files should be located. Some systems, like Gulp and Grunt (JavaScript), simply require a config file to be present in the project root, and the rest of the structure is up to you. Others, like sbt and Maven (Scala and Java), are more opinionated in their recommendations. When learning a new framework or language, one of the things I like to do is plan out a structure of the project. more...

Run a PowerShell script after a Visual Studio build

Microsoft’s docs are lacking on the simple how-to stuff, so I’m going to make a contribution here. This took too long for me to figure out, but I was helped by this Stack Overflow post. If you want to simply execute a PowerShell script after a build in Visual Studio, here’s how. I’m using Visual Studio 2013. Step 1: Find your PowerShell executable You will need to know this information later, so open a PowerShell command line and simply type $PSHOME to print out the contents of that environment variable. more...

Batching Large Updates in SQL Server

Note: The following is a simple, pure T-SQL approach to batching updates (or any kind of DML operation) in SQL Server. Consult your friendly database admin or system admin to make sure this solution is appropriate for your system. Let’s say you’ve got a large number of rows in a table that need updating, but you don’t want to update them all at once in a single UPDATE statement. Why would you want to do avoid using a single statement? more...