“Go” Write Fun/Better Code

Go, the programming language popular these days, has been around since 2009.

I have, since 2015, slowly attempted to integrate it into the software stack within Duke University Libraries (re: The Libraries), with some moderate success.

How It Started

I assumed ownership of a Perl script responsible for download/fetching a huge amount of data from one of The Libraries vendor partners. As I debugged this script — while refactoring — I watched as the memory footprint grew through the virtual roof of the hosting VM.

It was at this point I elected to adopt a platform with support for compiling, and strict/strong typing (allowing for better memory management).

C would have been ideal for this, but, realistically, I needed an “easy to learn” platform — I found Go to be suitable.

Good Applications for Go

Web Servers

Web servers are very easy to write and spin up using Go. This allow me to move away from Apache/HTTPD.

We leverage Shibboleth/SAML for SSO support, and there are beautiful modules that allow me to integrate SAML directly — no more installing Shibboleth, Apache/HTTPD.

APIs

Extending Web Servers out a bit, it’s really easy to build an API service using Go.

Configurable Things

One of my biggest passions is building “highly configurable” applications/services, providing access (via GitLab, Github..) to a config file of some sort, allowing non-techies the ability to tweak an application’s behavior.

Of course, this requires very good requirements gathering at the start of a project.

Compiling Code and Having Fun

It’s fun to sketch out different types, then ponder how these types interact. It’s also fun/enjoyable to actually compile code — like I used to do in college.