I like Formula1, so here is a photo of a race car. Photo by Paul Cuad on Unsplash

Writing multi-threaded applications is a non-trivial job and requires planning before implementation. If you were using a single-threaded language such as JavaScript, understanding the basics is quite essential. However, if you are familiar with low-level languages like C or C++, the concepts are similar. In this blog post, I want to explain how race condition occurs and how to synchronize data access using Golang.

What is a race condition?

A race condition occurs when multiple threads try to access and modify the same data (memory address). E.g., if one thread tries to increase an integer and another thread tries to read it, this will cause…


One of my favourite algorithms is the boids. You can create a flock movement with it. It is easy to understand, and the results are visually convincing. I used it first in one of my games to mimic fleet behaviour. In that game, users were able to move their fighter aircraft with the mouse input. Using the boids algorithm make the animation smooth and believable. That game was in 2D, and I implemented it in C++, so this time, I wanted to implement it in 3D with JavaScript. Calculating many small entities is computationally heavy. On the positive side, discrete…

Ercan Gerçek

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store