Organizing Code to Support Go Get

For those of you who are like me, trying to learn the Mac and Linux operating systems, Golang programming and deployment constructs all at the same time, I feel your pain. I have been building a Go application for a couple of months on my Mac and it was time to deploy the code on...

Collections Of Unknown Length in Go

If you are coming to Go after using a programming language like C# or Java, the first thing you will discover is that there are no traditional collection types like List and Dictionary. That really threw me off for months. I found a package called container/list and gravitated to...

Serving Static Sites with Go

I've recently moved the site you're reading right now from a Sinatra/Ruby application to an (almost) static site served by Go. So while it's fresh in my head, here's an explanation of principles behind creating and serving static sites with Go. Let's begin with a simple but rea...

Using C Dynamic Libraries In Go Programs

My son and I were having fun last weekend building a console based game in Go. I was recreating a game from my youth, back when I was programming on a Kaypro II. I loved this computer. I would write games in BASIC on it all day and night. Did I mention it was portable. The keyboa...

Cleaner, Better, Faster

I've never really known what to do with my personal site. Over the years it's been a dumping ground for links to different projects, and played host to various half-hearted attempts at blogging. But it's never really had much in the way of an actual purpose. I decided t...

Installing and Configuring Go

Other topics in this series - Table of Contents In preparation for a few beginner workshops, I created videos for people to follow to install and configure the Go development tools. Just adding them here. On Mac OSX: On Ubuntu Linux: The steps that I've followed a...

Understanding Slices in Go Programming

Since I started programming in Go the concept and use of slices has been confusing. This is something completely new to me. They look like an array, and feel like an array, but they are much more than an array. I am constantly reading how slices are used quite a bit by Go program...

Javascript Context

People make a lot of confusion about Javascript context mechanism. I don’t think it’s confusing at all, is just that it’s different when compared with other languages we generally use. The key to learn javascript is understanging the following: The context only...

Using Time, Timezones and Location in Go

I ran into a problem today. I was building code to consume NOAA’s tide station XML document and quickly realized I was in trouble. Here is a small piece of that XML document: <timezone>LST/LDT</timezone> <item> <date>2013/01/01</date> <day&g...

Gustavo's IEEE-754 Brain Teaser

Back in June, Gustavo Niemeyer posted the following question on his Labix.org blog: Assume uf is an unsigned integer with 64 bits that holds the IEEE-754 representation for a binary floating point number of that size. How can you tell if uf represents an integer number? I can't t...