In this post I'm going to be looking at using Redis as a data persistence layer for a Go application. We'll start by explaining a few of the essential concepts, and then build a working web application which highlights some techniques for using Redis in a concurrency-safe way....
The second problem in the “Less classical problems” chapter of the “The Little Book of Semaphores” is called “the barbershop problem”. It as originally proposed by Dijkstra as “the sleeping barber” program. The book presents the pro...
booleans, am I right? What a wonderful piece of technology! They help us solve so many problems…
I just need this method to behave slightly different when some condition is true.
Nice, what’s the problem in that?
We had a method like this:
class Coffee...
In chapter 5 (“Less classical problems”), the “The Little Book of Semaphores”, starts by presenting the “dining saves problem”, introduced by Gregory Andrews in the book “Concurrent Programming: Principles and Practice.”
A tribe of...
30 basic questions to measure your Golang knowledge. Answers and .go files you can find on GitHub page.
Don’t hesitate to create a Pull Request in case of some found errors, typos.
The “The Little Book of Semaphores”, introduces the “cigarette smokers problem”. The problem was originally presented by Suhas Patil in a technical MIT memo¹, as a problem that cannot be solved with semaphores. This is the original formulation:
Three smo...
go test -bench=.
Go has a great option to write your benchmarks and run it together with go test with option -bench. To create a benchmark function you must do the following:
gomobile bind
With gomobile we can generate language bindings that make it possible to call Go functions from Java. And it’s awesome. Now you can write Android applications in Go (unfortunately without UI features and with pure SDK coverage, but I hope it will grow up from...