In this article, I will demonstrate how to install Java OpenJDK 17 on macOS Big Sur in 2021. Update: I have created a video tutorial on how to install OpenJDK on macOS Big Sur: If you prefer written instructions, just keep reading: Download and Install OpenJDK 17 Download the .tar.gz version of OpenJDK 17 from jdk.java.net/17/ and move the file to /Library/Java/JavaVirtualMachines/ on your mac. Then, extract it and delete the archive: sudo mv openjdk-17.0.1_macos-x64_bin.tar.gz /Library/Java/JavaVirtualMachines/ cd /Library/Java/JavaVirtualMachines/ sudo tar ...

Context When developing Django web applications, one of the most popular ways to debug the performance of database queries, the values of internal variables or other custom metrics is the django-debug-toolbar. To integrate the toolbar into a Django web application, one first needs to configure a list of internal IP addresses. Only if the IP address of the web browser accessing the web application is part of this list, the toolbar will be shown. Otherwise, the toolbar is hidden (even ...

Problem: When writing HTML templates for the Django Python framework, you want to use Visual Studio Code’s auto formatting features. However, when you activate the auto-format functionality, VSCode complains that there is no formatter available for such HTML files: “There is no formatter for ‘django-html’ files installed.” Solution: First, install the beautify extension. Then, open the settings.json by pressing SHIFT - CMD - P and enter “Open Settings (JSON)”: Next, add the following block to your settings.json: "files.associations": { "**/*.html": ...

The release of GitLab 14.2 brings an exciting new feature to the management of CI/CD pipelines. Stages can now be completely omitted. Instead, the dependencies between pipeline jobs can be specified using the needs keyword. In this article, I will go into these changes and show you an example pipeline definition file making use of stageless pipelines. Traditionally, CI/CD pipelines in GitLab would consist of multiple stages and each stage would contain multiple jobs: The reasoning behind this structure was ...

Creating mock objects for data repositories is a common requirement in web application development. In this article, I will show you how to use GoMock to automatically generate mocks for your interfaces and use them inside unit tests. When you have a service that depends on a repository to fetch some data, this repository will most likely be connected to a database. A typical sequence of events could look like this: Service A requests an object X from repository B ...

When using the sqlx package in Go with a Postgres database, you may come across the following error: lastinsertid is not supported by this driver postgres This error will happen when you want to access the LastInsertId() of a newly inserted entity. In this post, I will show you how to fix this error without making any changes to your database. Let’s investigate a specific scenario where this error will occur: func CreateAppointment(appointment Appointment) int { result, err := database.Db.NamedExec("INSERT ...

In this article, I will demonstrate how to install Java OpenJDK 16 on macOS Big Sur in 2021. Update: I have created a video tutorial on how to install OpenJDK on macOS Big Sur: If you prefer written instructions, just keep reading: Download and Install OpenJDK 16 Download the .tar.gz version of OpenJDK 16 from jdk.java.net/16/ and move the file to /Library/Java/JavaVirtualMachines/ on your mac. Then, extract it and delete the archive: sudo mv openjdk-16.0.1_osx-x64_bin.tar.gz /Library/Java/JavaVirtualMachines/ cd /Library/Java/JavaVirtualMachines/ sudo tar ...

Let’s face it: if you are reading this blog, you are probably so deep into technology that paying 36 dollars per year for a password manager is a good deal compared to the value of your logins. This is certainly true for me, which is why I’m a 1Password premium subscriber (because I think it is the best password manager on the market). However, I’ve had countless conversations with friends and family members who are not so deep into technology ...

As a regular user of Visual Studio Code (VSCode) on macOS, you may be wondering why opening VSCode from the terminal does not work as expected: “zsh: command not found: code” means that the shell (in my case zsh, in your case maybe bash) is not able to find the code executable. This might confuse you if VSCode is already installed on your system. There are two solutions to this problem. Plan A: You can execute the following command: ln ...

GitLab version 13.8 was released on Jan 22, 2021 and ships with a new Pipeline Editor feature. Let’s look into it. Pipelines in CI/CD systems are traditionally created in text form. Whether Jenkins, CircleCI or GitLab – you usually start your pipeline in your favourite text editor. With CI/CD processes gaining more attention by all kinds of developers, this practice is now questioned since text-based formats are said to be less user-friendly than graphical UIs. GitLab’s vision is to have ...

Bernhard Knasmüller on Software Development