Emacs Key Bindings

I recently switched to Emacs as my editor of choice. It has taken a bit of work to get it to where I like it. My full settings are on github here.

In this post I will share how I added a key binding to only a single mode.

Go Concurrency Patterns

One of Golangs strengths is its composibility. This strength is only useful if you know how to make those composable parts. That is where patterns are useful.

Golang is concurrent, which is not necessarily parallel. However, to make things concurrent you have to break thing into automatic steps. If you are careful in how two step share information then you can easily turn concurrent design into parallel design. Go channels make this communication stupid simple.

In this post I am going to share what I think are the basis of most other concurrency patterns: The Generator, The Worker, and The Consumer.

You can use && to perform a logical if. And there are a few reasons it may be better to use &&.

If I was a Computer Scientist I might pull out logic maps or Turing completeness or do a mathematical proof. If I was a Computer Architect I might argue that I do not need to prove anything and you should trust my experience. Luckily I am a Software Engineer, so I will prove my point with tests.

Ruby Sucks

Ruby sucks! Kind of!

Ok, well not really. Not even a little. But there seems to be a misconception about what ruby is. I hope to clarify somethings by first comparing it to other languages, then by ripping it apart in a constructive way.

Every computer language serves to let human control computers, and nothing more. Every language creator chooses an abstraction level that they feel fits with their needs. And in the end every computer language creates strings of 0s and 1s.

Bats

Shell scripting is a great tool, but rarely is it tested. Enter BATS! In this post I will give a quick tutorial on how to use it to test scripts.

#!/usr/bin/env bats

@test "running a command" {
run foogrep "bar" foo_file
[ "$status" -eq 1 ] [ "$output" = "1: bar baz" ]
}


Rake Publish

Octoblog (the engine behind this blog) uses Jekyll. As such, it also supports the publish flag. I a previous post I detailed how I added this feature back to Octopress. Here I will show you a little rake task to easily publish an unpublished post.

A while back, my wife and I started keeping a budget. We need something very easy that shows us where we are every moment. Also, to ensure that it is not something we “forget” it must be something that we manually enter.

I created a Google Form in order to allow us to capture the receipts. The form dumps into a Google Spreadsheet. I then use a Pivot Table and the Google Query Lanauage to create a Chart. In this post I will cover the entire process.

Code does rust

Fourteen years ago Joel Spolsky wrote an article entitled “Netscape Goes Bonkers”. In that article he states that “old software doesn’t rust”. The rest of the article is good, but that statement is “off”.

The long away

The Reason

First, let me apologize to my 3 readers that I have been away for so long. There are a lot of reasons why I have been gone, but mainly it boils down to how much I hate the blogger interface for dealing with code.