Distributed Computing With Dried, Salted Cod Fish, WASM, And (Tiny)Go

You don’t need monstrous software orchestration systems for collecting information from distributed data sources. Here is an easy way of sending a Go binary to where the data is. | Continue reading


@appliedgo.net | 6 months ago

SQL as API in Go

So your API needs to allow queries that are too complicated for plain CRUD APIs but not complicated enough to justify using GraphQL? Consider accepting a subset of SQL where clauses, with the necessary security checks implemented in Go. | Continue reading


@appliedgo.net | 8 months ago

Continuous refresh, or: how to keep your API client authorized

An access token should be initialized and refreshed from a central place, yet be available to umpteenth of client sessions. Dynamic futures to the rescue. | Continue reading


@appliedgo.net | 11 months ago

Poetry time! Go proverbs as limericks

The Go proverbs capture the essence of Go. Too concise for your taste? No worries, here is each proverb explained in a limerick. | Continue reading


@appliedgo.net | 1 year ago

AI times three—or how I made AI write a blog post for me

Writing a concurrency-safe hashmap in Go is dead easy, even an AI can do it! To prove this, I had three AI tools write this blog article, generate Go code, and create an opening image. | Continue reading


@appliedgo.net | 1 year ago

How I used Go to make my radio auto-switch to AUX-IN when a Raspi plays music

Ok, so your radio lacks AirPlay support but has an auxiliary input and can be remote-controlled via the Frontier Silicon API. Fetch a Raspberry Pi, put Shairport-sync and Raspotify on it, plug it into the AUX port, and glue everything together with some Go code. Et voilà - home a … | Continue reading


@appliedgo.net | 2 years ago

Rapid AWS Lambda Development with Go and Mantil

A test of Mantil, an AWS Lambda development kit for Go | Continue reading


@appliedgo.net | 2 years ago

Instant Go: Edit and run Go code right in the browser, no back end required

Run Go code in the browser with Klipse and Yaegi. No backend required. | Continue reading


@appliedgo.net | 3 years ago

How I turned a binary search tree into a generic data structure with go2go

Some time ago I wrote about how to create a balanced binary search tree. The search keys and the data payload were both plain strings. Now it is time to get rid of this limitation. go2go lets us do that while waiting for the official generics release. | Continue reading


@appliedgo.net | 3 years ago

How to become the richest person on earth (and learn some Go along the way)

Economic simulation models indicate that inequal distribution of wealth does not result from human greed but rather is an inevitable result of market mechanisms. In this article, we look at how to set up a simulation with minimal code. | Continue reading


@appliedgo.net | 3 years ago

Packaging a project release (goreleaser part 2)

In the previous post, I used goreleaser to add binaries to a project release. Now let’s have goreleaser build a Homebrew formula as well. Automatically, and for macOS and Linux alike. | Continue reading


@appliedgo.net | 3 years ago

CLI tools FTW (or: how to distribute your CLI tools with goreleaser)

“go get” is a super-simple way of installing Go binaries, but not everyone has a Go compiler installed. If you want to make your CLI tools and apps available to the world, have a look at goreleaser. | Continue reading


@appliedgo.net | 3 years ago

Inverse Kinematics: moving a robotic arm (and why it's harder than it seems)

This article first glances over Inverse Kinematics. Then a small sample code implements a SCARA robot's arm movement. | Continue reading


@appliedgo.net | 3 years ago

Cannot import main: a Go Module gotcha

Two questions for you: Do you name an app module simply “main”? And do you happen to write tests for a main package? If so, you are in big trouble! (Ok, that was a bit clickbait-ey…) Well, the world is not exactly going to end; however, you might encounter an unexpected error tha … | Continue reading


@appliedgo.net | 3 years ago

Futures in Go, no package required

Futures are mechanisms for decoupling a value from how it was computed. Goroutines and channels allow implementing futures trivially. Does this approach cover all aspects of a future? | Continue reading


@appliedgo.net | 4 years ago

what.Happens - a debug logging package for developers only

Package what provides some handy debug-logging functions that can be enabled and disabled via build flags. No more information leaks in your production code! | Continue reading


@appliedgo.net | 4 years ago

Who needs generics? Use instead

The Go language has no generics. This article is a survey of techniques that can be used instead. | Continue reading


@appliedgo.net | 5 years ago

Slow down your code with goroutines

Concurrent code can be slower than its serial counterpart due to CPU cache synchronization | Continue reading


@appliedgo.net | 5 years ago

In the news: Go on AWS Lambda

Just recently, Amazon announced support for Go on AWS Lambda. Here is a summary of last week’s news around this topic. | Continue reading


@appliedgo.net | 6 years ago

How to Create PDF Documents

Pure data is for computers and nerds like you and me. Anyone else likes nicely formatted reports. Go and a good PDF package can help. | Continue reading


@appliedgo.net | 6 years ago

Processing spreadsheet data in Go

Your managers, all through the hierarchy, love circulating spreadsheets via email. (They simply don’t know better.) How to extract and analyze the relevant data from the daily mess? Go can help. | Continue reading


@appliedgo.net | 6 years ago

A DIY Dashboard with Grafana

If your code creates some stats to monitor, Grafana and the Grada package may come in handy. | Continue reading


@appliedgo.net | 6 years ago

Go slices are not dynamic arrays

Go’s slices are cleverly designed. They provide the look-and-feel of truly dynamic arrays while being optimized for performance. However, not being aware of the slice mechanisms can bring you into trouble. | Continue reading


@appliedgo.net | 7 years ago

goman - the missing man pages for Go binaries

Most Go binaries come without any man page. The tool goman fills this gap. If the corresponding project includes a decent README file (and most projects do), goman find this README file and displays it on the terminal. | Continue reading


@appliedgo.net | 7 years ago

Controlling a Digispark board

The Digispark is perhaps as small as a microcontroller board for DIY electronics can get. This is a short writedown about my first experiences with controlling this board through Go code, using Gobot and LittleWire. | Continue reading


@appliedgo.net | 7 years ago

Big Oh!

You worked hard to save a few CPU cycles in the central loop, but your code is still slow? Time to think about the time complexity of your algorithm. | Continue reading


@appliedgo.net | 7 years ago

Text-Based User Interfaces

Want to equip your command-line application with a nice visual user interface? TUI libraries are here to help. | Continue reading


@appliedgo.net | 7 years ago

Flow To Go

If you want to do Flow-Based Programming in Go, there are a couple of frameworks and libraries available. Or you simply do it with pure Go. After all, how difficult can it be? | Continue reading


@appliedgo.net | 7 years ago

Get into the flow

In Flow-Based Programming, programs are modeled as data flowing between independent processing units. Who would not think of channels and goroutines as a natural analogy? | Continue reading


@appliedgo.net | 7 years ago

TCP/IP Networking

Connecting two processes at TCP/IP level might seem scary at first, but in Go it is easier than one might think. | Continue reading


@appliedgo.net | 7 years ago

Picturesque!

Let’s face it: Pictures taken with a smartphone usually aren’t quite like Ansel Adams masterpieces. But with a little post-processing, some of them might still reveal their true beauty. A couple of Go libraries can help. | Continue reading


@appliedgo.net | 7 years ago

MapReduce - munching through Big Data

How Google tackled the problem of processing enormous amounts of data, and how you can do the same with Go. | Continue reading


@appliedgo.net | 7 years ago

Deliver my data, Mr. Json!

JSON is the lingua franca of exchanging data over the net and between applications written in different programming languages. In this article, we create a tiny JSON client/server app in Go. | Continue reading


@appliedgo.net | 7 years ago

A Random Blog Post

How to generate random numbers, and the difference between math/rand and crypto/rand. | Continue reading


@appliedgo.net | 7 years ago

Take a REST!

RESTful Web API’s are ubiquitous. Time for a minimalistic, five-minutes video tutorial about REST, RESTful API’s, and buidling a REST server in Go. | Continue reading


@appliedgo.net | 8 years ago

Regular Expressions demystified

Regular Expressions are slow, ugly, error-prone, incomprehensible,… Or are they? Find out by learning regexp basics. | Continue reading


@appliedgo.net | 8 years ago

Balancing a binary search tree

Only a well-balanced search tree can provide optimal search performance. This article adds automatic balancing to the binary search tree from the previous article. | Continue reading


@appliedgo.net | 8 years ago

A Binary Search Tree

Search trees are everywhere: In databases, in file systems, in board game algorithms,… This post explores the probably most basic form of a tree: a binary search tree. | Continue reading


@appliedgo.net | 8 years ago

Plugins in Go

Go is a statically compiled language. No dynamic libraries can be loaded at runtime, nor does the runtime support compiling Go on the fly. Still, there is a number of ways of creating and using plugins in Go. | Continue reading


@appliedgo.net | 8 years ago

Dependency Injection in a nutshell

Layered software architectures adhere to the Dependency Rule: Source code in a lower-level layer can make use of code in higher-level layers, but never vice versa. Control flow, however, goes in both directions. How is this possible, given that higher-level code must not know any … | Continue reading


@appliedgo.net | 8 years ago

Perceptrons - the most basic form of a neural network

Artificial Neural Networks have gained attention during the recent years, driven by advances in deep learning. But what is an Artificial Neural Network and what is it made of? Meet the perceptron. | Continue reading


@appliedgo.net | 8 years ago

Message Queues Part 2: The PubSub Protocol

This is the second (and, for the time being, the last) article about messaging and Mangos. After doing first steps with the Pair protocol, we now look into a slightly more complex protocol, the Publisher-Subscriber (or PubSub) protocol. | Continue reading


@appliedgo.net | 8 years ago

Message Queues, or how you can make processes talk to each other

Consider two processes that need to exchange commands and data. You want to connect them in a way that is straightforward, efficient, and reliable. How would you do that? Enter Message Queues. | Continue reading


@appliedgo.net | 8 years ago