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 ...

On December 8, 2020, Red Hat CTO Chris Wright announced that the popular Linux distribution CentOS will only receive support (and security fixes) until 2021 (instead of the originally announced 2029). Put differently: thousands of CentOS users who counted on the availability of security updates for the foreseeable future are now left in the cold and need to migrate their systems in the next 12 months. While this may sound like a long time, it is actually a gigantic pressure ...

In this article, I will demonstrate how to install Java OpenJDK 15 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 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.0.1_osx-x64_bin.tar.gz /Library/Java/JavaVirtualMachines/ cd /Library/Java/JavaVirtualMachines/ sudo tar ...

Securing software applications has not exactly become easier with the advent of agile software development methodologies such as scrum. In this post, I review the book Agile Application Security (by Laura Bell, Michael Brunton-Spall, Rich Smith, and Jim Bird), introduce some of its key ideas, and summarize why I found it so insightful. This book guides software development teams on how to practically integrate security into their agile processes. I recommend it to two groups of readers: (1) information security ...

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 ...

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 ...

Bernhard Knasmüller on Software Development