Golang Project Structure

Tips and tricks for writing and structuring Go code

Creating My First WordPress Plugin With JavaScript

This post will document my very first foray into developing a WordPress plugin, which is used on this website. The majority of the code is contained within a single JavaScript file. Why Do I Use WordPress? The blog runs on WordPress. I’ve created other websites and blogs in the past for which I wrote all […]

How to Concatenate Slices

Slices are one of the most important data structures used in Go. In this post, we will look at how to concatenate slices. We will start by explaining the general concept of concatenation, then we will look at examples of concatenating two or more slices in Go. Finally, we will build functions that can help […]

Adding Elements to a Slice

This post will discuss the various ways to add elements to a slice. Appending an element adds it to the end of the slice, whereas prepending it adds it to the beginning of a slice. It is also, of course, possible to add an element at any position in between. We will finish by looking […]

How to Pixelate Images in Go

When an image is pixelated, it has a visual effect applied to reduce its level of detail through the use of many same-sized blocks, each painted with a single colour. Each of those blocks can be thought of as a large pixel (since a pixel is the smallest unit that can contain a colour in […]

Ways to Work Out the Average Colour of an Image

It’s reasonable to look at a picture and to wonder how it might look if it were distilled down into a single colour, which somehow still encapsulates a sense of the original. In this post, we will look at various methods that can be used to calculate the average colour of an image in Go, […]

Some Findings From the 2021 Go Developer Survey

For the past six years, Google has run an annual Go Developer Survey in order to understand more about what the community thinks and how it feels about recent changes to the language. The survey also helps to keep us informed about any problems or concerns that have arisen and gives us an opportunity to […]

What Is Conway’s Game of Life?

This post will discuss the Game of Life, which is: a zero-player game, famous in the history of computing; a cellular automaton; a deterministic system that follows a simple ruleset; a creation of the British mathematician John Conway. Don’t worry if you don’t entirely understand what all those terms mean, because we’re going to go […]

Removing Elements From a Slice

I’ve written in the past about how to reverse the order of all the elements in a slice, but today I’m going to discuss some of the ways that elements can be removed — in other words, deleted — from a slice in Go. When looking at the various ways to remove one or more […]