Go will make you a better programmer

The last line of Dave Cheny’s Gophercon 2015 India keynote is the best: “Go will make you a better programmer.” It’s true. When I am programming Go, I never think, “OK, is this an OK shortcut to take here? Is this a play context? Is this a work context, but I can push off bounds…

A Quick Go hack: lines-per-second

Today I wanted to compare how fast two builds were on two different machines. As a rough estimate, I just wanted to see how many lines per second were going into the log file. This is what I came up with: package main import ( “bufio” “fmt” “os” “time” ) func main() { scn :=…

The Podcast/Spam nexus

I listen to a lot of podcasts. They virtually are all sponsored by either MailChimp or Emma (some new Mailchimp clone). What I want to know is why spammers (even opt-in, targeted email marketing solutions are spammers as far as I can tell) find that podcasts are listened to by their target market (i.e. other…

Golang on the Geode processor

If you are trying to use Golang on a PC-Engines Alix board, you need to be careful that all the Go code you are using is compiled while the GO386 environment variable is set to 387. The Geode processor does not support the SSE instructions. If you have Linux directly on the Alix, you’d not…

Type safety saves the day again

Recently, I was writing some code to check the SHA256 of a buffer. Simple, right? All you have to do is take the hash you have, get the hash of the data, and compare them. But then you think, “oh, what a drag, I gotta compare two []byte values for equality, and == doesn’t work…

AR.Drone 2 camera access

There is lots of information out on the net about how to access the camera in the AR.Drone, but it is all for the original model. In the AR.Drone 2, the cameras have been replaced and upgraded. So settings for v4l that worked to get data out of the camera need to be updated as…

Dual scheme URLs

I just made this blog HTTP and HTTPS, thanks to Cloudflare. But that made me realize that lots and lots of internal links in the HTML output of my WordPress point back to the HTTP version of the site. Part of the solution to this is to install the HTTP plugin in WordPress which fixes…

Cloudflare Universal SSL totally, completely rocks

Cloudflare¬†was already my favorite non-Google internet company because I’m a Golang fan boi and Cloudflare is vocal about their love of Go. So when I heard that Cloudflare was willing to help me,¬†for free, put SSL on my website (which I’ve been meaning to do since like forever), I was ready to go for it….

Strange characters in IP addresses

A long time ago, I worked for WebTV. The part of WebTV doing filtering for parental control was comparing IP addresses as strings. I managed to evade the parental controls when I noticed that the IP address parser was using an atoi that treated leading 0’s as octal and leading 0x’s as hex. By converting…