This is the digital garden of Dr. Michael Lesniak -- a place where I shape, collect and present my thoughts, lessons learned, short code snippets, links, read books, concepts and interesting musings. You can find all content as raw markdown on the corresponding repository. The shown HTML is generated by a simple go program.
See now for all (technical and intellectual) topics which are currently on my mind.
Besides writing (technical) articles I'm a software engineer by heart, trying to work on a side-project (code or article) or research question all the time, e.g. as shown by my GitHub activity
Over the years I've therefore developed a few projects in various languages which are hosted on GitHub. In the following I'll describe some of them; the aforementioned articles will be published from time to time on this site, too.
Advent of Code is one of the most famous programming challenges on the internet, designed and hosted by Eric Wastl. Starting on the first of December each day a new problem is posted on the website and you can only advance to the next problem if you've actually solved the previous day correctly. While the first day's problem is usually solved by around 85.000 users, the last and final problem is only solved by ca. 2.500 users. I first participated in 2019 and the problems ranged from writing a virtual CPU, simulating a network of aforementioned CPUs, implementing path finding algorithms for painting robots on the hull of a space ship, simulating recursive cellular automates, finding cycles in gravitational orbits, implementing a perfect breakout player to computing chemical equations etc. My hacky and whacky solutions to all problems can be found in the corresponding GitHub repository. The repository also has a very brief description of each day's problem.
Writing a raytracer is one of the most satisfying projects you can work on as a developer. The necessary math can be understood in an afternoon and the amount of supporting literature is vast. For the mathemtaical background I recommend the book series Raytracing in One Weekend. The source code for the raytracer I wrote is obviously in the corresponding repository; it supports (among other things) different materials and refractions, e.g. it allows to produce images such as
Writing a game is a goal for most developers, even non-gamers: the direct feedback in interactive games combined with complex design and technical challenges makes developing even a simple game a worthwile past-time. I'm a huge fan of speedruns, hence writing a game -- let's be honest: more a technical concept -- where your goal is to reach the the target as fast as possible was on my todo list. Hence, the go-based Speedrunner (source code here) was born. It supports a self-made physics engine, has gamepad-support, show custom particle effects, plays music and sound effects, records highscores, view in fullscreen mode, and reproducible levels for challenging your friends. It is (in my humble opinion) even in this early stage a lot of fun. But see for yourself:
The source code repository with the most GitHub stars (as of 2020-10-15) is one of my first public Go projects, a replication of the port-scanner nmap written in Go. The idea was to learn Go, produce something useful and resemble a (kind of) classic unix tool, including support for port ranges, port to service name mapping, concurrent scans etc:
> port-scanner -hostname mlesniak.com -parallel 20 -port 75-85 -timeout 1 PORT STATUS SERVICE 75/tcp closed 76/tcp closed deos 77/tcp closed 78/tcp closed vettcp 79/tcp closed finger 80/tcp open www-http 81/tcp closed 82/tcp closed xfer 83/tcp closed mit-ml-dev 84/tcp closed ctf 85/tcp closed mit-ml-dev