Qvault Classroom Launches Golang Crash Course

We just launched Qvault Classroom and can’t be more excited. Our first crash course in Go, “Go Mastery” is now available! We teach students by allowing them to write, compile, and run backend code directly in the browser. (Since this article was first written, we have added the free (Very) Basic Intro to Coding course!) … Read more Qvault Classroom Launches Golang Crash Course

Running Go in the Browser With Web Assembly (WASM)

golang wasm gopher

If you are familiar with the Go Playground, then you know how convenient it is to be able to have a Go scratchpad in the browser. Want to show someone a code snippet? Want to quickly test some syntax? Browser-based code pads a helpful. On that note, I created a new playground. The cool thing … Read more Running Go in the Browser With Web Assembly (WASM)

Lint on Save With VS Code Official Golang Extension

go extension vs code

Go has hard opinions about how you should style and format your code. The big upside of this is that you don’t need to spend hours setting up tools like ESLint, Prettier, JSLint, etc. That said, in order to take advantage of the styling and listing tools available in the toolchain, you need a dev … Read more Lint on Save With VS Code Official Golang Extension

Make, New and Literals Cheat Sheet – Slice and Map Initialization in Go

golang gopher slice literal

There are quite a few ways to create new maps and slices in Go. Which one is best? Or perhaps better asked, which one is best in your situation? Let’s take a look. Slices var varStyle []string is the idiomatic way to declare an empty slice. The slice is actually nil, which means it will … Read more Make, New and Literals Cheat Sheet – Slice and Map Initialization in Go

Go-CoNLLU – Some Much Needed Machine Learning Support in Go

data has a better idea - machine learning golang

Python is commonly seen as the AI/ML language, but is often a dull blade due to unsafe typing and being slow, like really slow. Many popular natural language processing toolkits only have Python APIs, and we want to see that change. At Nuvi, we use Go for the majority of our data processing tasks because … Read more Go-CoNLLU – Some Much Needed Machine Learning Support in Go

Go’s WaitGroup – JavaScript’s PromiseAll??

People waiting in line

In applications that are i/o heavy, it can get clunky to synchronously execute high-latency functions one after the other. For example, if I have a web page that needs to request 7 files from the server before it can show the page, I need to asynchronously fetch all those files at the same time. The … Read more Go’s WaitGroup – JavaScript’s PromiseAll??

Sorting in Go – Don’t Reinvent This Wheel

sorting hat

Sorting is a common task in programming, and for that reason most languages have a default sorting algorithm in their standard library. Go is one such language. Go has gone about providing sort functionality in one of the most elegant ways possible, via an interface. Any type that satisfies this interface can be sorted using … Read more Sorting in Go – Don’t Reinvent This Wheel

Don’t Go To Casting Hell; Use Default Native Types in Go

hell red sky

Go is strongly typed, and with that, we get many options for simple variable types like integers and floats. The problem arises when we have a uint16, and the function we are trying to pass it into takes an int. We find code riddled with int(myUint16) that can become slow and annoying to read. Go’s … Read more Don’t Go To Casting Hell; Use Default Native Types in Go

Range Over Ticker In Go With Immediate First Tick

The Go standard library has a really cool type – Ticker. Tickers are used when you want to do something at a regular interval, similar to JavaScript’s setInterval. Here’s an example: As per the docs, a ticker is a struct that holds a receive-only channel of time.Time objects. In the example at the beginning of … Read more Range Over Ticker In Go With Immediate First Tick

Connecting To RabbitMQ In Golang

RabbitMQ is a message broker that’s great for pub-sub systems in a micro-services architecture. At my current day job, we use RabbitMQ in our data ingest pipeline. All the services are written in Go, and they all push data through hundreds of RabbitMQ queues. Let’s take a look at how to efficiently publish and subscribe … Read more Connecting To RabbitMQ In Golang