In our last blog about our Quality Assurance (QA) team, we gave an overview of the QA process, including our software and testing methods. One of our key tools during testing is the Materialize Emulator, a Docker image that allows you to maintain a locally hosted version of Materialize.
I had seen this error already once or twice in the last year, but it was incredibly rare in our Continuous Integration (CI) runs, and never happened locally. As usual, there were more pressing product issues to debug, so I never looked into it. But last week I switched most of our CI tests to run on Hetzner Cloud instead of AWS to save some money. Suddenly this issue started occurring more often in CI, so my thinking was that it must somehow be timing-dependent.
I joined Materialize’s Quality Assurance (QA) development team over a year ago. Since our team is small, we have to be conscious about focusing our time on the most impactful testing and test tooling.
Our goal is to find issues in Materialize as early and as efficiently as possible, ideally before a pull request even lands. Despite our small team, Materialize has a huge surface area.
Note: This is translated from the German original, which was used as a homework for the Programming Paradigms course at Karlsruhe Institute of Technology a long long time ago when I was co-holding the practical courses.
YugabyteDB is a cloud-native database for business-critical enterprise applications. It is designed to provide continuous availability as well as horizontal scalability, while retaining a strong set of RDBMS features. This objective creates a strong quality incentive for us in the Yugabyte Quality Assurance (QA) team. As a member of this team, I am giving an overview of the testing philosophy, approaches, and implementations for YugabyteDB.
As a relief for rising energy costs and inflation Germany is offering nearly-free public transportation for the months of June, July and August. For just €9 per month you can take any kind of regional public transportation in all of Germany. That’s basically everything except the IC/ICE for long distance. This means that a monthly ticket is now as cheap as what I would normally pay for a single route. In this post I want to talk about my experiences with this €9 ticket.
Update 2022-09-01: The €9 ticket ended yesterday without a similar replacement system in place. So many people are again back to paying about €100 per month for much smaller regional tickets instead (see for example this German Reddit thread. Financially it makes more sense for me personally to go back to driving. (I hope the gasoline in the car is still good after three months.) My hope is that these three months will stay in people’s minds in Germany and shape the future of public transportation to be cheaper and simpler:
In my previous post 8 months ago I described how our open source online game DDraceNetwork has been suffering under DoS attacks for about 8 years, basically since its inception. Recently the attacks have gotten much worse, forcing us to work on further approaches. Since many players made suggestions recently, I’m writing this blog post to summarize what we are attempting and to ask for help again.
About 3 years ago I wrote about my Linux Desktop Setup and having used pretty much the same software setup for 10-15 years. My setup used to be heavily keyboard based. Now for work I am for the first time using a macOS-based Macbook Pro with an M1 Pro CPU. I spent the last 3 weeks using it as a daily driver, tweaking it here and there. Here are my experiences.
DDraceNetwork is an open source online game I’ve been running since 2013 with a community of volunteers. The game is available for free, I’m hosting servers for it in many countries around the world so that we have trusted official ranks. The servers are paid for by donations, which I stop collecting once the cost of the servers for the current year is covered. I wrote about DDNet in a previous post in 2016 and also a bit about the game history in 2013.
Pretty much since the beginning we have been suffering from DoS attacks against the servers. Since the Steam release in 2020 the player number has increased significantly, so that we have about 1300 players playing on average.
Today I lost access to my home server. As I described in a previous post I depend heavily on the server to fetch my emails, as a file server, to synchronize files, for newsbeuter and irssi sessions and many other things. As no one was going to be in proximity of the server for the next few hours, my goal for today was to solve the problem remotely.
My software setup has been surprisingly constant over the last decade, after a few years of experimentation since I initially switched to Linux in 2006. It might be interesting to look back in another 10 years and see what changed. A quick overview of what’s running as I’m writing this post:
Some people really liked the dark DDNet theme for Halloween by Soreu, so we decided to keep it possible to use the default bright or the dark theme.
Thanks to xse we got a JavaScript based theme switcher. After some improvements I finally I switched it away from JavaScript entirely and finally am also using it on this blog with an OLED friendly dark theme.
Exactly on this day, one year ago, I came back from a one month long trip to
Taiwan, went straight to work from the airport and immediately moved into a new
apartment after work. Since then I have cycled to work nearly every day.
I have recently received a job offer to work on a blockchain implementation. While the offer was very generous, I had to turn it down. In this post I want to collect the thoughts that went into my decision process leading to this conclusion.
I started working as a C++ developer in the HANA Core Platform team at SAP in Walldorf, Germany more than a year ago. In this time I have gotten some insights into the development environment and processes. I will use this post to illustrate them by the example of adding a small new feature and explaining the steps on the way of getting it released. Some of this will be specific to HANA, some to my team inside HANA, some to my own system.
Creating code coverage reports with Nim is surprisingly easy. You can simply
use the good old gcov and lcov tools. Nim can be told to insert its own line
information with the --debugger:native command line parameter.
Here’s the small example program we’re looking at:
In this post I want to highlight a few fun aspects of the Haskell programming language. The purpose is to give you a taste of Haskell so that you will want to learn more of it. Don’t consider this as a tutorial or guide but rather as a starting point, as it is based on a short talk I held at work, which in turn is based on my favorite material from holding practical courses about Haskell at university.
Let’s start by seeing how programmers compare Haskell to a mainstream programming language, for example Java:
In my latest post I showed some
examples of how I ran mostly the same PC hardware over a period of 8 years.
Today I finally finished setting up my new PC hardware in my new home, so I can
report about what I did differently, my thought process, and some problems I
encountered and hacks I did to solve them.
I’m not sure if this article is interesting for anyone, but I had some fun
setting the new system up and felt like writing about it, so here we go:
After reading the feedback of my recent article about running
DDNet, I noticed that people
found it interesting how I’m trying to minimize money and resources. I also
noticed that I had been doing something similar with my personal computing
hardware setup for an even longer time.
I’ve mostly been using the same hardware for personal computation purposes over
the last 8 years. In this article I want to talk about some of the hardware
I’ve been using, how it broke and how I fixed the problems or worked around
them. My goal was to be frugal about hardware, to keep using the same hardware
for a long time and repair it when possible instead of simply buying new
hardware.
In this article we’re going to write a simple 2D platform game. You can also consider this as a tutorial for game development with SDL2 in Nim.
We will read in user input, display graphics and a tile map, and simulate
simple 2D physics with collision detection and handling. Afterwards we will
implement simple camera movement and game logic. To display some information we
will render texts and develop a caching mechanism for said text rendering.
The final result will be a binary file that requires only SDL2 and can be
easily distributed, perfect for games. If you’re on Linux we will also present
a simple way to cross-compile Nim programs for Windows.
It’s been roughly 3 years since DDraceNetwork (DDNet)
started in the summer of 2013. Last year I wrote a non-technical History of
DDNet. Today in this post we
will dive into the technical side of what makes DDNet run.
For the uninitiated, DDNet is an open-source
modification of
Teeworlds, a retro multiplayer shooter. DDNet is
a game in which you, instead of killing each other, cooperate with each other
to work your way through challenging maps, trying to beat the map or get a
better time than other teams.
Introduction to the Introduction (Meta-Introduction)
Wikipedia gives us a nice
description of metaprogramming:
Metaprogramming is the writing of computer programs with the ability to
treat programs as their data. It means that a program could be designed to
read, generate, analyse and/or transform other programs, and even modify
itself while running.
In this article we will explore Nim’s metaprogramming
capabilities, which are quite powerful and yet still easy to use. After all
great metaprogramming is one of Nim’s main features. The general rule is to use
the least powerful construct that is still powerful enough to solve a problem,
in this order:
About a month ago I set up statistics for the official DDNet servers. My motivations for this are:
Monitor the servers more easily
Get notified about server problems
Have nice graphs to look at
The choices for the software used are mainly made to keep resource usage low, a
general principle used for DDNet since we run on cheap VPSes all around the
world and are limited in CPU and memory resources. In the rest of this post we
will explore the 3 major tools used, their purpose in our solution as well as
their performance impact:
Surprisingly I’m working on HookRace again. I might
share a few interesting code snippets and thoughts in this blog along the way.
I’m still going with Nim as the programming language.
For an easy start let’s write a logging module that can be used everywhere in
the game’s server as well as client. There are mostly three aspects that I care
about:
Can be configured to write to different files and/or stdout
Writes to the disk asynchronously, preventing any blocking when the disk is
overloaded
Reasonable performance
Follow along if you want to witness how fun it is to write code in Nim!
The size of binaries in the Nim programming language seems to be apopulartopicrecently. Nim’s slogan is expressive, efficient, elegant, so let’s examine the efficient part in this post by exploring a few ways to reduce the size of a simple Nim Hello World binary on Linux. Along the way we will:
Build a regular program into a 6 KB binary
Disregard the C standard library and build a 952 byte binary
Let me get this straight. We have an emulator for 1985 hardware that was written in a pretty new language (Go), ported to a language that isn’t even 1.0 (Nim), compiled to C, then compiled to JavaScript? And the damn thing actually works? That’s kind of amazing.
Since today Nim 0.11 has been released, I guess it’s a good time to
release this as well: NimES is a NES emulator written in Nim. More info in the
GitHub repository and the JS demo.
I spent the last weekend working through the amazing
guide for Make a
Lisp, writing a Lisp interpreter in Nim. The
final result just made it into
the repository.
Running the Nim version is pretty simple. You need the Nim compiler from the devel branch and nre which can be installed through nimble. After installing those you can build and run the MAL interpreter:
$ cd nim
$ make
# OR
$ nimble build
$ ./stepA_mal
Mal [nim]
user> 12
12
user> (+ 2 3)
5
My most recent post goes in another direction (no, it’s still about Nim): How I
start a new Nim project. Check out the
article on
howistart.org. Comments on Hacker
News and
Reddit as always.
Nim is not the fastest language, it’s not the easiest language to write in and it surely has some flaws that should be fixed. Nim has no single “killer feature” like go’s goroutines or Rust’s memory management. But Nim doesn’t need a killer feature. Instead it strikes a reasonable balance that makes it the most efficient language for me:
I can produce reasonably efficient code (faster than Python and Haskell)
that is reasonably readable (more so than Rust, C++ and Haskell)
in a reasonable amount of time (less than Rust, C++ and Haskell)
In my last post I showed what makes the Nim programming language special. Today, let’s consider Nim from another angle: What makes Nim a practical programming language?
Binary Distribution
Programs written in interpreted languages like Python are difficult to distribute. Either you require Python (in a specific version even) to be installed already, or you ship it with your program. This even causes some to reconsider Python as a teaching language.
How does Nim work around this problem? For starters your program gets statically linked against the Nim runtime. That means you end up with a single binary that depends solely on the standard C library, which we can take for granted on any operating system we’re interested in.
The Nim programming language is exciting. While the official tutorial is great, it slowly introduces you to the language. Instead I want to quickly show what you can do with Nim that would be more difficult or impossible in other languages.
I discovered Nim in my quest to find the right tools to write a game, HookRace, the successor of my current DDNet game/mod of Teeworlds. Since I’m busy with other projects for now, this blog is now officially about Nim instead, until I find time to continue developing the game.
Easy to get running
Ok, this part is not exciting yet, but I invite you to follow along with the post:
To learn some Nim I held a talk about it at the GPN14 (in German, Slides).
Afterwards I started solving Rosetta Code tasks in Nim to get a better feel for the language and standard library. That also made me discover some rough edges in the language, but luckily the community, albeit small, is active and competent. All the small code pieces I wrote are now on Github too.
What I noticed is that most problems are as easy to solve as in Python, but much more performant. I’m now more confident that this language is the right choice for writing HookRace in.
I have been running DDraceNetwork for 1 year, which started out as a little server of a Teeworlds modification called DDRace. It has turned into the biggest project within Teeworlds, offering servers in 6 countries with thousands of players and dozens of mappers. We also offer a custom server and client (Windows, Linux, OS X, Android).
Now it’s time to start something new. I’m working on a new game called HookRace, which will be the successor to DDraceNetwork. It will be its own game, not based on Teeworlds.