Golang Project Structure

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

Introducing 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 […]

Interview With the Go Developer: Jon Rafkind

Headshot of the software engineer and Go programmer Jon Rafkind.

This is the first in an upcoming series of interviews with professional software developers who use Go in their work and amateur coders who use it in their personal projects. This first interview is with Jon Rafkind, who is a senior software engineer with around 8 years of experience using Go. He has an undergraduate […]

Removing a Substring From a String in Go

A hand holding a pair of scissors.

In this blog post, we will explore several approaches that can be used to remove a substring from a larger string in Go, covering both basic cases and more complex scenarios. By the end of this guide, you should have a solid understanding of various ways to strip substrings from strings in Go and how […]

Getting the Directory of the Currently Running File in Go

An old-fashioned directory system with paper records in wooden drawers at a library.

When writing Go code, it can often be useful to know how to obtain the path to the directory where the file being currently executed is located. In this post, we’ll explore how to do this in Go and discuss some of the practical applications of this knowledge. Why Would I Need the Directory of […]

Discovering Whether One String Contains Another in Go

Five pieces of string arranged in a circular ring. Four of the rings of string each contain another ring of string.

When working with strings in Go, one common task is checking whether one string contains another. While this may seem straightforward, Go offers several methods, each with varying levels of complexity depending on the needs of your application. Whether you’re performing a case-sensitive substring search, looking for the index of a substring or diving into […]

Easy Guide to Using MongoDB With Go

A large pile of paper documents.

MongoDB is a popular NoSQL database, known for its flexibility and scalability. Its flexible schema allows developers to work efficiently with different data types, making it well-suited for dynamic and rapidly evolving applications. MongoDB stores data in JSON-like format called BSON (Binary JSON), which makes it a great choice for handling large-scale and relatively unstructured […]