Exploring Go
A few months ago, I tried to learn Go. I did it just out of curiosity and because I heard many great things about this programming language. I also use much software, which is written in Go, like the generator for my websites (Hugo), Git server (Gitea), feed reader (Miniflux) or Docker. All are written in Go and have in common, that they have an incredible performance and are really easy to setup, because it’s possible to compile everything to a single statically linked executable.
I went through the Tour of Go, learned all the basics and tried a few small examples. But I didn’t have a project, where I could use this new knowledge. I thought about rewriting Maily-Form in Go (it’s currently still using Kotlin with NodeJS), but what turned me back was the confusing dependency management (that was before Go modules where a thing).
Recently I started to work on a new side project called kis3 / KISSS / “Keep It Simple Stupid Statistics” and chose to use Kotlin with the Java VM, because I’m really familiar with Java and am a Kotlin enthusiast. Kotlin with the JVM isn’t bad itself, it’s fine for most use cases. There are Java libraries for basically anything and for every question you already find an answer on Stack Overflow, because it’s so popular.
But one caveat of Java is that although it’s runnable on many different platforms, it’s performance really sucks on some like armv7 (32-bit), which my home cloud (Odroid HC2) has and I want kis3 to be able to run everywhere with great performance. Somehow I could only find JVM implementations for armv7 with Zero VM that are running in interpreted mode only, which is way slower than mixed mode, which is the standard on x86_64. The interpreted mode has the JIT (just in time) compiler disabled and all bytecode is running through the interpreter. Not really great for performance.
That was bugging my head a few days ago and I thought about giving Go a new try. I heard about the new Go modules, which simplify dependency management and my curiosity about this increasingly popular language didn’t go away over the last months. So I watched a YouTube Video to remember what I learned during the initial tutorial. Someone on Twitter also gave me the tip for the website gobyexample.com, which explains many Go features using great and easily understandable examples.
I now started rewriting kis3 in Go. It won’t be great code at the beginning, but I like learning by doing and explore new programming languages using real and useful projects. Often the programming language itself doesn’t really matter when programming something, because often languages share common paradigms and in the end it just matters that you get the computer to do, what you want it to do.
Tags: Go, Learning, Programming language