About Mocking in Unit Tests

Recently at SCAYLE, I wrote a Laravel service that inserts data using Eloquent into a table like this: For people not familiar with Laravel/Eloquent: The HelloWorld model mirrors the database structure and the save method persists data into the database table. So far, so good. Like for any good and responsible project, I wrote unit … read more …

When to use Traits in PHP

Traits were introduced to PHP in version 5.4. While classes were introduced in version 4, class inheritance was – as in Java – limited to single inheritance only from the very beginning. Class Inheritance: The Good, The Bad, The Ugly Class Inheritance is a central concept in object oriented programming and exists in every programming … read more …

PHPAlgorithms 1.0.0 is there

Last year, I announced PHPAlgorithms. Since then, I worked a lot on this repository as part of my personal learning progress on Algorithms and Datastructures. Now, I am proud to announce that we have reached our first milestone – version 1.0.0. With the support of the community, we fixed remaining issues and made this release … read more …

PHP Exceptions and the Stacktrace

The beginning of this week was a little bit more action packed than planned. After a couple of weeks of coding and intensive testing (seriously!), a colleague and me were of the opinion that the feature is production ready and could be deployed. But well, shit happens when you least expect it. We faced PHP … read more …

Vagrant Getting Started

The last few days, I was busy getting started with Vagrant. Vagrant is a nice tool to create a development environment to ‘just start’ developing. New team members, for instance, do not need to set up, but can simply run ‘vagrant up’ to have a fully configured, ready-to-start environment. Personally, in my case, it is … 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“. In this post, we … read more …

How To Simple RBAC

Since I have been asked a few times for a “how to” for my “Role Based Access Control” library, I want to summarize this in a little blog post. Maybe the last one for 2018 🙂 Simple-RBAC ist designed to be lightweight. The main purpose is to grant or deny permissions to users using RBAC. … read more …

Recommendation Assistant 1.0.0 is here

It has been a while since I released the initial version of Recommendation Assistant, 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 … read more …