Golang Project Structure

Tutorials, tips and tricks for writing and structuring code in Go (with additional content for other programming languages)

James Smith (Golang Project Structure Admin)

Author

Having Fun in the Go Playground

A children's playground in a woodland setting.

The Go Playground is a web-based environment provided by the Go team that makes it possible to write and run Go code without having to install the Go compiler or toolchain locally. This means that you could run Go code from a computer at work, university or even an internet café — even when an […]

Goto Hell

A sign at the village of Hell in Norway.

It’s one of the oldest control structures, dating back to early programming languages like FORTRAN and Assembly. But despite its historical significance, the goto keyword has developed a controversial reputation over the years. In fact, it’s often associated with spaghetti code — a tangled mess of jumps in logic that’s nearly impossible to maintain. So […]

Understanding Evolutionary Algorithms

The peppered moth [Biston betularia].

Evolutionary algorithms (EAs) offer a compelling approach to problem-solving by drawing inspiration from the principles of natural selection, which have been uncovered by biologists. In this blog post, we will explore how EAs work and consider some of their real-world applications, before going on to work on an example implementation in the Go programming language. […]

Basic Guide to Game Theory

Portrait of Niccolò Machiavelli, a philosopher and historian who wrote during the time of the Italian Renaissance.

The steganographic strategies we saw that prisoners could use to hide their communications in the previous post I wrote made me think about the somewhat related yet broader subject of game theory. This field has its own very famous Prisoners’ Dilemma, as we shall see later. This introduction to game theory is designed for a […]

How to Hide a Secret Message in a Unicode Text File

A view through metal bars inside Alcatraz Federal Penitentiary, showing the cells inside the prison.

Imagine sending a secret message that’s hidden in plain sight — embedded within an innocent-looking text file. No encryption and no suspicious attachments, just pure Unicode trickery. It sounds like something out of a spy novel, doesn’t? Well, with a little bit of thought and some clever encoding, we can use Unicode characters to conceal […]

Overview of the P Versus NP Problem

Text written on a chalkboard referencing the "P versus NP" problem, which remains an open question in computer science.

The P vs NP problem is a major unresolved issue in theoretical computer science. It challenges our fundamental understanding of computation, efficiency and the nature of problem-solving itself. This question doesn’t just examine what computers can do today. It probes the limits of what machines can achieve, and what they may never be able to […]

Build Your Own Blockchain From Scratch in Go

A chain made out of metal links.

Sometimes “blockchain” can seem like nothing more than a hyped-up buzzword. Yet, despite the hype, it’s useful to understand the fundamental concept that lies behind it, which isn’t very difficult to grasp. It’s really quite simple and elegant. The blockchain data structure is particularly important because it’s at the heart of valuable decentralized systems like […]

Who Designed the Cute Golang Gopher?

Portrait of cartoonist Renée French by Guillaume Paumier at the Alternative Press Expo 2010, organized at the Concourse Exhibition Center in San Francisco, California, by Comic-Con International on October 16-17 2010.

The famous Gopher, which is now used as a universal symbol of the Go programming language, was designed by Renée French. The Birth of the Gopher The Gopher was first introduced in 2010 as part of a design effort to give the Go programming language a recognizable and relatable mascot. The language’s creators wanted a […]