Four years of Hacktoberfest

Hacktoberfest is a month-long initiative where people are encouraged to contribute to open source software. The rules are that if you do four pull requests on GitHub during the month you beat the challenge and win a t-shirt. Since I have participated and managed to do this four years in a row, from 2016 to 2019, I wanted to look back on how I actually managed to do it. I have broken down the challenges by each year.

2016

This year was quite easy. I did all four PRs for get-flash-videos, a project I had been using and contributing to before.

2017

This year, I did four PRs in four different projects (1, 2, 3, 4). One was for get-flash-videos but the other three were for projects I was using personally or wanted to try out.

2018

This year I did a lot of PRs since Brayns, the software I was working full-time on, is hosted on GitHub.

2019

This year three PRs were done for vcpkg, and one for glbinding. The fixes in vcpkg were for packages I was using and the PR in glbinding was just a documentation fix.

So, what can we learn from this? I believe we can conclude that the way I managed to complete these challenges and contribute was simply by using said software enough to find the bugs and fix them. For me, these years of Hacktoberfest has been a nice way of pushing myself to do some free software contributions.

IEEEVis 2019 Short paper published

Me and a few of my colleagues have published a paper for the IEEEVis 2019 conference. The paper is about using Signed-distance functions for rendering neurons, which is a technique I developed for Brayns. The paper is titled “High Fidelity Visualization of Large Scale Digitally Reconstructed Brain Circuitry with Signed Distance Functions” and you can read it here.

Command line suggestions with Boost

While working on Brayns I got tired of mistyping and forgetting command line arguments. I therefore wanted to add suggestions for unrecognized options similar to what git is doing. I could not find any examples of doing this with boost program options so therefore I provide a minimal example here in the hope it will be useful. The algorithm uses the Levenshtein distance to determine the similarity between strings. It also tries to match arguments which are a substring of a known option. Download here. Example usage:

jonas@x220 ~> c++ program_options_suggestion_example.cpp -lboost_program_options -o example
jonas@x220 ~> ./example --bat
Unrecognized option '--bat'.

Most similar options are:
	--bar
	--baz

Image slider

Recently I needed a way of showing the difference between two programs rendering the same geometries. What I did was use a HTML-based image slider called before-after.js, that allows you to slide between the two images. I think this is a simple and powerful way of showing the difference between the images. Click here or the image below to try it out.

Demo

Assertion message trick

Here is a simple trick to print a message when an assertion is violated. Assuming you have the following assertion:

assert(foo != nullptr);

You then just append the message you want to print to the check with a logical conjunction like this:

assert(foo != nullptr && "Usually due to not calling bar()");

Now, when this assertion fails the following message is printed:

Assertion `foo != nullptr && "Usually due to not calling bar()"' failed.