Based on the presentation template explained in an earlier blog post I have built quite a few presentations, so it was time to reevaluate that approach. Two problems caused issues multiple times, so naturally, I wanted to fix them:
The solution to the…
“Don’t repeat yourself” is such an important and widely taught concept in programming, that it has its own acronym (DRY).
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system
DRY is a very powerful idea, and avoids a lot of issues, like having to fix the same bug in multiple places, because the same code has been duplicated. Many voices say that it is often overused leading to a wrong abstraction, and I tend to agree with that statement.
duplication is far cheaper than the wrong abstraction
People often overdo…
--watch flag to the call of the
jest command. So if the
jest executable is in your current path, you can call it like that:
And what this simple flag does is absolutely amazing. Instead of just executing all the tests and shut down, Jest will execute only the tests being affected by the currently not staged changes of your git repository. That means you don’t have to execute all the tests all the time, which…
Quite a while ago I have implemented something called
RouteBuilder(has been renamed to
ViewBuider in the meantime) in Sulu, which - as the name suggests - makes use of the Builder pattern in order to create different routes in a Sulu application. In addition to the Builder pattern the Factory pattern was also used.
For me the hardest part of learning such patterns was to get an idea when it makes sense to use them. Therefore I decided to report about my usages of design patterns, to hopefully give other people an idea how they could be applied. …
D3.js is a great and in my opinion very elegant library for building visualizations in a web browser. Unfortunately some concepts are not that easy to understand from its documentation, especially when it comes to animathing graphs. I made that experience myself and when I tried to teach these concepts to my students using the official resources.
I am sure that ObservableHQ is a great way to tinker and learn more about certain features, but its nature of being inspired by a spreadsheet that automatically updates makes it hard to understand how these features have to be combined in a…
At Sulu we have decided to use Flow for static type checking, and I am still convinced that it was the correct decision back then. However, today TypeScript seems to be the much more popular choice. This claim can also be supported by earlier blog posts and presentations being more about what to choose, whereby more recent ones are about how to switch. So I think it is time to reconsider that decision, therefore I am going to compare these type checkers in this blog post.
Static type checking has the goal of finding errors before you even run your…
Recently I have downloaded some submissions from a course I am currently giving. Luckily the tool being used allows to download an archive with all submissions at once, but unfortunately the structure of the archive is not really handy. It contained a folder for every student, and in this folder there was another zip archive, which contained the actual submission of the given student.
npm install in order to test the submission afterwards. So I could either go into each folder…
A few weeks ago I was working on a Sulu Pull Request to support filtering lists. We’ve already had a very similar feature before that, which was (and still is) configured in a XML file. Each defined filter had a type, also in the previous implementation. In order to refactor this, it would have been very helpful to know what the previously available type options were. The old filter implementation used to be defined something like this:
The interesting part here for me was the
filter-type attribute on the
When I first heard about the
z-index css property it sounds like such a helpful and innocent concept. But after some years of using them I would declare them the billion dollar mistake of web development. But let me explain that in a bit more detail.
Back in the days using
z-index was the way to go if you wanted to make sure that some of your HTML content was displayed on top of your other content. The main use case for that would be any kind of overlay or dialog, which tries to get the user’s attention. Often these…
I love markdown. It’s super easy to write, and also very easy to read, making it a great tool to write e.g. blogs like this one. Since markdown is written using plain text files, it has another bunch of advantages too: