Going Go Programming Recent Posts


Slices of Slices of Slices in Go

I am working on building code to load polygons for the different Marine Forecast areas in the United States. These polygons need to be stored in MongoDB and there is a special way that needs to be done. It would not have been a big deal if it wasn’t for this fact. There isn’t just one polygon for each area. There is an external polygon and then zero to many interior polygons that need to be stored in relationship.

Running Go Programs In IronWorker

Introduction Iron.io has a product called IronWorker which provides a task oriented Linux container that you can run your programs inside. If you are not sure what I mean, think of this as having a temporary Linux virtual machine instantly available for your personal but short term use. IronWorker allows you to load your binaries, code files, support files, shells scripts and just about anything else you may need to run your program in the container.

Timer Routines And Graceful Shutdowns In Go

In my Outcast data server I have several data retrieval jobs that run using different go routines. Each routine wakes up on a set interval. The most complex job is the downloading of radar images. What makes this complex is that there are 155 radar stations throughout the United States that take a new picture every 120 seconds. All these radar images can be put together to create a mosaic. When the go routine wakes up to pull down the new images, it must do this as quickly as possible for all 155 stations.

Using CGO with Pkg-Config And Custom Dynamic Library Locations

Earlier in the month I wrote a post about using C Dynamic Libraries in Go Programs. The article built a dynamic library in C and created a Go program that used it. The program worked but only if the dynamic library was in the same folder as the program. This constraint does not allow for the use of the go get command to download, build and install a working version of the program.

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 a local Ubuntu server. I was having a really tough time and it was turning into a disaster.

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 using it for almost everything. Something in the back of my head kept nagging me. It didn’t make any sense that the language designers would not directly support managing a collection of unknown length.

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 keyboard would strap in and you could carry it around. LOL. But I digress, back to my Go program.

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 programmers and I think it is finally time for me to understand what slices are all about.


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 talk for you, but I write business applications. I just don’t have the background to quickly knock out an answer for a question like this.




Ultimate Go Schedule


Location Start Date End Date Class Enrollment
Atlanta, Georgia Thursday, March 9th, 2017 at 9:00 AM Friday, March 10th, 2017 at 5:00 PM Ultimate Enroll Now
San Francisco, CA Tuesday, April 4th, 2017 at 9:00 AM Wednesday, April 5th, 2017 at 5:00 PM Ultimate Enroll Now
San Francisco, CA Tuesday, April 27th, 2017 at 9:00 AM Wednesday, April 28th, 2017 at 5:00 PM Data Enroll Now
Miami, FL Saturday, May 20th, 2017 at 9:00 AM Sunday, May 21st, 2017 at 5:00 PM Ultimate Enroll Now
Utrecht, Netherlands Friday, June 2nd, 2017 at 9:00 AM Sunday, June 4th, 2017 at 5:00 PM Ultimate Enroll Now
New York, NY Saturday, June 10th, 2017 at 9:00 AM Sunday, June 11th, 2017 at 6:00 PM Data Enroll Now