Since the introduction of .net core 2.0 everything on the .net platform seems to become better and better. Since the introduction of Visual Studio for mac it encouraged me to switch over to a mac OS X only dev environment.

Needless to say my current development environment with Visual Studio, Docker, and Kitematic works amazing. And I only just started figuring things out.

The thing which has been bugging me though was that it seemed like application output (stdout and stderr) was not being logged to Docker while it was being logged to Visual Studio.

How to get an application to log to Docker

Docker containers built from microsoft/dotnet:2.0-runtime or microsoft/aspnetcore:2.0 have a /remote\_debugger volume which maps to ~/.vsdbg. For now I can only imagine how this stuff works, but I suppose that when the remote debugger is attached the application only logs to the remote debugger which may or may not be favorable behavior.

In case you know more about the /remote\_debugger volume and the ~/.vsdbg thingy or you can point me in the right direction, I’d love to hear more from you! Hit me up on Twitter!



Shame on you if you don’t know about XKCD or don’t know about the great comic number 1110. Randall Munroe has gone above and beyond to deliver a 10 gigapixel map you can drag yourself through. Wait, don’t explore yet! The best is yet to come.

In response Kajaklubben has created an interactive version of this map where you are actually part of the comic itself and can explore the whole world by walking through it, flying with your lill’ balloon or falling off cliffs and in tunnels.

But as with most things on the internet, this amazing homage went offline, but the source was still available at GitHub and so I forked it! Thanks to GitHub pages you can now enjoy this amazing work of art again.

>> CLICK HERE FOR THE GAME <<

The forked repo contains two little bugfixes, which were respectively a performance issue and sprite loading issue. See the fork for details. Last but not least, thanks to Jonas Jongejan for making this great thing together with his roommates! :)



Mountain flying / gliding is definitely an amazing and somewhat overwhelming experience. It is difficult to concentrate the whole experience in just a few minutes on a computer screen. This movie contains footage from the mountain gliding trip to Sisteron by some members of the WBAC during the summer of 2015.

This thing has been due for publication for way to long, but here it is.



On keeping up with the regular bullshit at school; I get to skip a part off my minor. Anyhow, this one is on doing ‘algorithms and data structures’.

Recently someone finally gave a decent explanation about arrays. That was about time after three years of computer science classes. Great. Even better, we get to use those now, by generating magic squares.

Magic squares are great. The goal with these things is that when summed up, every row, column or diagonal has the same value as shown in the example above. There’s an algorithm for generating these things. I’ve implemented a sloppy algorithm which can generate these things as long as the row and column size are an odd number;

int num = 5;
int[,] matrix = new int[num, num];

var x = ((num) / 2);
var y = num-1;

int i = 1;

int upper = num\*num;

var prev_x = x;
var prev_y = y;

while (i <= upper)
{
    if (matrix[x, y] == 0) {
        matrix[x, y] = i;
        i++;

        prev_x = x;
        prev_y = y;

        x = x < num - 1 ? x + 1 : 0;
        y = y < num - 1 ? y + 1 : 0;
    } else {
        x = prev_x;
        y = prev_y - 1;
    }
}

matrix.Dump();

I can definitely recommend LinqPad for playing with fiddles like this as it will give a clear view of what you are doing.

Visualizing Squares

While we can generate magic squares now there’s bonus points for visualizing these. Hmm. How does one go, without having to bundle LinqPad. There’s like two options here;

  1. You do bundle LinqPad
  2. You start generating grids in a console app
  3. You think of something else

Originality for the win! Actually this is the part which took more time then programming the algorithm itself.

So the go to solution was to generate bitmaps of these grids, each pixel’s color representing a value on the grid. This one was actually combined with stress testing the algorithm to see if I could generate a 24 bit grid or more, which succeeded by the way. There was no reason to go higher though, as there are no more then like 16 million colors available.

The trick was in converting a value between 0 and 2^24 to a RGB color value. See the example below;

using (var image = new Bitmap(num, num)) {
    var multiplier = 16777216 / upper;

    for (var i = 0; i < num; i++) {
        for (var ii = 0; ii < num; ii++) {
            var hex = (matrix[i, ii] \* multiplier).ToString("X8");

            var color = Color.FromArgb(
                (byte)255,
                (byte)(Convert.ToUInt32(hex.Substring(6, 2), 16)),
                (byte)(Convert.ToUInt32(hex.Substring(2, 2), 16)),
                (byte)(Convert.ToUInt32(hex.Substring(4, 2), 16))
            );

            image.SetPixel(i, ii, color);
        }
    }

    image.Save($"./{Guid.NewGuid().ToString()}.bmp");
}

The results, when playing with color codings, can be quite astonishing, epileptic attack inducing and trippy at the same time:

Thankfully there is no need to copy paste this code as it’s all available on GitHub.



This spring I have had the amazing possibility to go to Sisteron and enjoy one of the most awesome things there is to enjoy. Mountain (wave) soaring.

Rides will be bumpy. Weather may be quite cold and windy, all while burning in the sun. But the beer (and food) will be good.