Saving a Third of Our Memory by Re-ordering Go Struct Fields

tetris memory packing

In past projects at Qvault we had an application that typically ran with ~2GB in memory at any given time. By simply changing the order of some uint variables we managed to drop the memory usage to less than 1.4GB. The vast majority of this allocated memory is due to an enormous slice of stats … Read more Saving a Third of Our Memory by Re-ordering Go Struct Fields

Authenticate Users with “Sign In With Google” in Golang

sign in with google golang

Users love convenience. If your goal is to make it easy for users to register with your app or website, then implementing the “Sign in with Google” option should be at the top of your priority list. If you are like me, then you may find Google’s documentation on the subject to be lackluster at … Read more Authenticate Users with “Sign In With Google” in Golang

Rust vs Go in Backend Web Development

golang vs rustlang logos

Rust and Go are two huge successes in the realm of modern programming language development. The two languages compete in terms of backend web development… and it’s a fierce competition. For example, the popular communication app Discord just started swapping out Go services for Rust to boost performance. Both languages are new, have growing communities, … Read more Rust vs Go in Backend Web Development

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