Many applications are automatically tested on each commit inside a GitLab pipeline. If your application relies on a database such as PostgreSQL, it can be tempting to use an in-memory database such as H2 for tests because it is easier to set up and destroy for each execution of your test suite. While this works for simple applications, it is no longer possible once you rely on vendor-specific SQL features (e.g., usage of column types not available in H2). In ...

Test-Driven Development (TDD) is a practice that aims to increase both software quality and developer productivity. In a recent study, researchers found that many novice developers reject the adoption of TDD due to a lack of pleasure in certain development phases. Should this even be their decision to make? Novice Developers Can Be Uncomfortable With TDD In a study by Romano et al. from 2019, researchers investigated how the practice of test-driven development (TDD) affects the mood of novice software ...

In this article, I will demonstrate how to install Java OpenJDK 15 on macOS Catalina in 2020. Download and Install OpenJDK 15 Download the .tar.gz version of OpenJDK 15 from jdk.java.net/15/ and move the file to /Library/Java/JavaVirtualMachines/ on your mac. Then, extract it and delete the archive: sudo mv openjdk-15_osx-x64_bin.tar.gz /Library/Java/JavaVirtualMachines/ cd /Library/Java/JavaVirtualMachines/ sudo tar -xzf openjdk-15_osx-x64_bin.tar.gz sudo rm openjdk-15_osx-x64_bin.tar.gz ...

I recently finished a course on machine learning (ML) by the Google Cloud team. In this article I want to share some key insights from this course regarding suitable use cases for machine learning in today’s businesses. While many businesses could profit from machine learning, it is often hard to get started due to the lack of experience about what kinds of problems can be solved with ML and which of them are low hanging fruits. Cloud providers such as Google Cloud ...

I recently finished the course “Machine Learning for Business Professionals” from Google Cloud via Coursera. While the certificate normally costs about 40-50$, there is a limited time offer by Coursera where you get it for free. In this article, I will show you how to redeem this offer, what the course is about and if it is worth taking. ...

Traditionally, relational databases required all tables to have a fixed data schema, i.e. a set of attributes (such as a “user” table with attributes “firstName”, “lastName” and “email”). You could change the schema by adding and removing attributes, but the available attributes were always know at a given point in time. For many use cases, this was acceptable. However, some applications have the need to store semi-structured data: entries where the attributes are not known ahead of time. Since 2012, ...

This tutorial is about how to highlight the currently active page in your navigation with Thymeleaf and Spring Boot. Highlighting the active page is a known usability pattern and should help users to find their way around your web application. Consider this example: In the navigation above, the navigation item “Cronjob Monitoring” is highlighted. The menu is generated with this Thymeleaf code: <nav class="mdl-navigation"> <a th:classappend="${#request.requestURI.startsWith(navItem.getLink()) ? 'mdl-navigation__link-active':''}" th:each="navItem: ${navigation}" th:id="${navItem.getIdentifier()}" class="mdl-navigation__link" th:href="@{${navItem.getLink()}}" th:text="${navItem.getName()}"></a> </nav> By using th:each, a link ...

Running regular background tasks on a network-attached storage (NAS) is an essential use case for backups, monitoring and more. With Synology DiskStations, there is an easy GUI-based approach to configure such tasks which still allows you to execute custom scripts. First, navigate to Control Panel > Task Scheduler: ...

In a blue-green deployment strategy, there are always two instances of your application running in production. A reverse proxy is used to direct traffic to either the green or the blue version. You then deploy changes to your application by first updating the inactive version and then changing the load balancer config to redirect traffic to the updated instance. In this video, I will show you how to set up a very simple version of such a blue-green deployment using ...

Sometimes I want to quickly save some code changes that I am not ready to commit into a real branch. For example, I might be in the middle of a long refactoring and there is a complete mess that I do not want to show up in version control history: Git has the “stash” command which removes all uncommitted changes and saves them to a local data structure where they can be retrieve later. However, this comes at the disadvantage ...

Bernhard Knasmüller on Software Development