The room party problem

The author of “The Little Book of Semaphores” wrote this week’s problem inspired by real life events at Colby College. The problem’s statement is the following: The following synchronization constraints apply to students and the Dean of Students: Any num...

Fast Feedback Is Everything

The child care problem

Next problem in line in the the little Go book of semaphores series is about caring for children. It comes from the book “Operating Systems and Middleware: Supporting Controlled Interaction” by Max Hailperin (problem 4.6). It reads as follows: State licensing rules r...

Implementing UDP vs TCP in Golang

Go is known to be a very capable systems programming language. Programmers enjoy it’s simplicity, ease of deployment, and performance when writing backend services. A key feature in any backend software service is networking communications. There are numerous application...

Installing Go And Your Workspace

Introduction If you are new to Linux or the Mac you might find installing Go to be a bit confusing. It was for me when I started learning Go. Go was the reason I stopped using Windows, which I used for 20 years. Even if you’re experienced with these operation systems, setti...

The sushi bar problem

The next chapter in the the little Go book of semaphores series introduces the “not remotely classical problems” and the first one is called “the sushi bar problem”. Imagine a sushi bar with 5 seats. If you arrive while there is an empty seat, you can tak...

Copying Interface Values In Go

I am constantly thinking about the Go language and how things work. Lately I have been thinking how everything in Go is by value. We see this when we pass values to functions, when we iterate over slices and when we perform type assertions. In every case, copies of the values tha...

Chaos Monkey for Fun and Profit

The Modus Hall problem

After that short intermission in reactive programming, it’s back to the little Go book of semaphores series with “the Modus Hall problem”. I didn’t understand the reference in the footnote and after some googling, it turns out that “Modus Hall”...

A basic reactive system

I’m making a pause in the “semaphores” series to visit a problem from exercism.io, namely react in Go. As the description says, the idea is to implement a basic reactive system in Go. Wikipedia defines “reactive programming” as “a programming p...