Archive: March 2021

Videoconferencing Part III

Posted on by  
Justus Brugman

As explained in part two of this series, OBS is a tool that makes it possible to create your ‘virtual camera’. We can use this camera in conferencing tools like Zoom, Slack, Microsoft Teams, Google meet, Signal, and so on. OBS is available for Windows, Mac and Linux, so it will probably work on your system as well. In this part I’m going to explain how to get and install OBS, then we’re going to use it together with the chromakey screen. I’ll focus on the virtual camera support, but the OBS suite can do a lot more. It is free and open source software for video recording and live streaming. It allows you to apply filters, supports NFI (via a plug-in) and much more.

OBS can be found on the OBS project website. Here you’ll find a support forum as well, there is an active community helping you out on problems you might face. For now let’s download the software. Select your operating system en press ‘Download Installer’. When you’re using Linux, it’s a bit harder. If your distribution does not offer OBS Studio as a package, you’ll have to build it yourself. Luckily the build instructions are not that hard to follow. On the Mac or on Windows, the process is straight-forward. After downloading the installer, just run it, and follow the given steps. As it gives you the question for what it should be optimised for, I did choose 'streaming'. You are able to change this later on in the 'Profile menu', when you select 'New'.

Continue reading →

How to run Maven Release on GitLab with Artifactory

Posted on by  
Tim te Beek

The Maven Release plugin allows you to easily craft releases of your own libraries, to share code between projects. When combined with Semantic Versioning you can communicate clearly to your library users which changes are minor, or potentially breaking. The plugin will trim off the -SNAPSHOT suffix of your artifact version, run through all the stages to create your build artifacts, and push those artifacts to a remote registry such as Artifactory. It will also push a Git tag to your code repository, as well as increment your artifact version to prepare for further development.

This blogpost will run you through the steps to authenticate with both GitLab and Artifactory when running a Maven Release from GitLab CI.

Continue reading →

Running AWS locally with LocalStack

Posted on by  
Thomas de Groot

More and more companies are switching over to cloud native environments. As a developer this gives me a lot of services to create awesome applications. The challenge that occurred to me right away was how to use all those new components during development, since some companies do not have a testing/development environment in their cloud provider to play with. LocalStack piqued my interest to simulate an AWS environment locally on my laptop, or when running the CI/CD pipeline.

This blog will give a brief introduction in what LocalStack can do and how you can use it for your own projects.

Continue reading →

Videoconferencing Part II

Posted on by  
Justus Brugman

In the first part of the small series about videoconferencing, I talked about the hardware. As promised, this time it’s all about the software, and you don’t have to spend any money on it!

All the software we’re going to use here is open source. This means it’s free to download, install and use! Best of all, you are able to contribute to the projects as well, perhaps you’re a gifted developer that can improve the program. Then give your improvements back to the community! For now, let’s have a look at the programs you might want to download.

Continue reading →

Running Dependabot on GitLab

Posted on by  
Tim te Beek

As a consultant I find myself alternating between GitLab and GitHub about once a year, depending on the assignment. While I like GitLab a lot, there’s one thing I had sorely missed whenever I switch back from GitHub: Dependabot. Dependabot scans your project dependencies, and creates merge requests whenever updates are found. This provides you with an easy way to keep up to date on dependencies, and notifies you early if there are any incompatibilities.

Even though there are alternatives such as snyk.io and even GitLab’s own Dependency Scanning, those don’t always support enterprise or partner installations of GitLab, require GitLab Ultimate, or don’t support the full range of package managers that Dependabot supports.

Luckily though, there’s now a Dependabot for GitLab project. This project is based on the same Open Source Dependabot Core, so you can get the exact same automated dependency updates on both platforms.

In this blogpost I’ll walk you through how you can quickly roll out Dependabot on an existing GitLab installation, so you can start updating your dependencies automatically.

Continue reading →

Java Joy: Formatting A String Value With Formatted Method

Posted on by  
Hubert Klein Ikkink

Java 15 introduced the multi-line string value referred to as a text block. With this introduction also the formatted method was added to the String class. The method can be invoked on a String value directly and function exactly as the static String.format method. The nice thing is that now we directly can use a method on the value instead of having to use a static method where the value is passed as argument.

In the following example we use the formatted method for a normal String value and a text block:

Continue reading →

Videoconferencing Part I

Posted on by  
Justus Brugman

Since most of us are more or less forced to work from home, we’re using Zoom, Google meet, Microsoft Teams, Slack or other videoconferencing programs to keep in touch with each other. Even though most programs allow you to blur your background or replace it with a nice image, it isn’t ideal and the quality isn’t that good. On the other hand, you don’t want to be in a situation that you’re in the middle of an important meeting, and find out that you forgot to clean up that pile of laundry or other private goods that you rather don’t show to the outer world.

This is why I thought it would be nice to create a short series that helps you to professionalize your video conferencing setup. The focus is to keep a tight budget, let’s say about 150 Euro of hardware. We only will use open source programs to create your virtual environment you want to be in. This isn’t only a thing that is just fun to do, but I’ll show other possibilities as well. For example: You are able to place yourself in front of your PowerPoint presentation. In the end, you’ll be able to create an end-result like this:

Note:

For this short demo I used free video footage available on videezy and vidveo. If you want to use their free available products, remember to link to them and give the proper credits to them as well.

Continue reading →

A worthy companion for @RequestBody

Posted on by  
Jacob van Lingen

A while ago I was working on a Spring REST project and had a special wish. I wanted for one endpoint an exception thrown when someone requested it with an object with unknown properties. All the other endpoints with their rest objects should continue to exhibit the same behaviour. Let me share how I did this.

Continue reading →

Gradle Goodness: Add Support For "Scratch" Files To Java Project

Posted on by  
Hubert Klein Ikkink

When working on a Java project, we might want to have a place where we can just play around with the code we write. We need a "scratch" file where we can access the Java classes we write in our main sourceset. The scratch file is actually a Java source file with a main method where we can create instances of the Java code we write and invoke methods on them. This gives back a fast feedback loop, and we can use it to play around with our Java classes without the need to write a test for it. It gives great flexiblity during development. We must make sure the scratch file will not be packed in the JAR file with our production code.

To support this in our Gradle build file we can add a new sourceset that can access all classes we write in the main sourceset. Also we want to have new configurations for this sourceset so we can add dependencies that are only used by our scratch file. And finally we want a new task to run our scratch file. By default our scratch file will not be part of the JAR file with the classes from the main sourceset.

Continue reading →

How tech culture can contribute to quality

Posted on by  
Erik Pronk

At JDriven our mission is to improve the quality of software engineering. This is a great and noble cause and also something that cannot be achieved in isolation. I believe this is something that the entire community should be aiming for and can be achieved with the right mindset.

But how can you stimulate and create this state of mind and environment where quality and productivity go hand in hand? First let me start by saying this is my point of view and by no means a silver bullet. Just read and take what you think is useful and leave out what’s not.

Continue reading →

Clojure Goodness: Pure Function Sample Buying Coffee From FP Programming In Scala Written In Clojure

Posted on by  
Hubert Klein Ikkink

Some of our colleagues at JDriven work with Scala and we talked about the book Functional Programming in Scala written by Paul Chiusano and Runar Bjarnason. We looked at one of the examples in the first chapter in the book to show the importance of having pure functions without side effects. The example is about buying a cup of coffee and charging a credit card with the purchase. In three examples a function with side effects is refactored to a pure function without side effects. When looking at the example I was wondering how this would look like in Clojure using only functions and simple immutable data structures. We can look at the examples in Scala to see how it is explained and implemented in the book. There are also Kotlin samples available. In this post we see a possible implementation in Clojure to buy coffee and charge our credit card.

The first example is a buy-coffee function with a credit card type as parameter. When we invoke the function with a credit card argument the credit card gets charged as side effect and a coffee type is created and returned. The coffee type is simply a map with a price key.

Continue reading →

Gradle Goodness: Enabling Preview Features For Java

Posted on by  
Hubert Klein Ikkink

Java introduced preview features in the language since Java 12. This features can be tried out by developers, but are still subject to change and can even be removed in a next release. By default the preview features are not enabled when we want to compile and run our Java code. We must explicitly specify that we want to use the preview feature to the Java compiler and Java runtime using the command-line argument --enable-preview. In Gradle we can customize our build file to enable preview features. We must customize tasks of type JavaCompile and pass --enable-preview to the compiler arguments. Also tasks of type Test and JavaExec must be customized where we need to add the JVM argument --enable-preview.

In the following Gradle build script written in Kotlin we have a Java project written with Java 15 where we reconfigure the tasks to enable preview features:

Continue reading →

shadow-left