Towards Powerful PHP Applications: WeakMaps and Their Practical Usage

PHP introduces WeakMap datastructure with version 8.0. This new data structures is capable of containing objects while simultaneously enabling them to be cleared via garbage collection once not needed anymore. WeakMap is a evolution of weak references added with PHP 7.4 and enables the development of collections of references that can be subjected to garbage … read more …

Data Transformation with Benthos

For a current project, I need to read data from an API, transform and push it to an AWS S3 bucket. Normally I would consider to use a standard programming language for that because there is no “magic” involved. However, one of the requirements is to use Benthos, a tool for “Fancy stream processing made … read more …

Scalable System Design: Design a Contact Tracing System

In this post, I want to address scalable system design and how to grow a system while it’s user base grows. Because talking only about the theory can become boring very quickly, I want to discuss this topic on a practical example. Before I start with the design itself, keep in mind that there is … read more …

Converting Roman Numerals To Decimal Integers

Algorithms fascinate me again and again. They seem to be very hard to understand, but once you have practiced enough, you will recognize common patterns. Once you reach the state where you see a problem and can imagine a solution, it seems like that you just adjust the previous algorithm used. Saying this, I am … read more …

Traversing a 2D Matrix

The new years first blog is about algorithms – more precisely: 2 dimensional matrices. I want to explore the ways how to find connected 1’s (so called islands) in a 2D array. This problem is also known as the “find the number of islands” or “connected components in an undirected graph“. Disclaimer: I generally use … read more …

Recommendation Assistant 1.0.0 is here

It has been a while since I released the initial version of RecommendationAssistant, my Master’s Thesis in coorperatin with Nextcloud GmbH and Frankfurt University of Applied Sciences. Today, I am happy to announce version 1.0.0. What has been changed? Most of the work is on how recommendations are being calculated. Earlier this year, I dropped … read more …

Contact Synchronization Client – A First Try

The last few weeks, I was focused on algorithms and data structures. I have been working my way through “Cracking The Coding Interview” and created a PHP library based on this book. I splitted interesting topics, such as dependency resolving using topological sorting, out into separate projects and released them under the MIT lincese on … read more …

Resolving Database Dependencies Using Topological Graph Sorting

In past projects at my former employer, I had to deal with a lot of historical grown (duplicated) code and databases. Some source code files contained of nearly 2,000 lines of code and contained a lot of duplicated stuff. The databases were in a similar situation. Much worse in this scenario was the violation of … read more …

Integer Bitvectors and the Theory Behind

The last few days I had a little bit more time to dive into theory. I was wondering how to effectively search single values in unsorted, large amounts of data (e.g. files larger than 1GB). There are two key problems in such an issue: the data is unsorted, meaning that you can not search in … read more …