UPGRADE TO MICRONAUT 3
Are you curious what new features Micronaut version 3 brings and do you want to know how to upgrade your applications? In this post we will do the upgrade to Micronaut 3 for an existing application and show you how. For a complete overview of…
MULTIPLE SOLIDITY CONTRACTS
Are you curious how multiple solidity contracts interact and how you can use this in your own smart contract setup? In this post we will use two contracts to create a trust fund application that pays you interest in a utility token, another contract. We…
ERC20 TOKEN
Do you want to create your own ERC20 token on Ethereum? Here we program one and learn more on solidity while we’re at it. Tokens can be used for all kinds of things, not only to fuction as a currency. In future posts we will…
TESTCONTAINERS
Are you struggling finding the right strategy for your integration tests? Mocking does not cover everything and relying on all external services to be present also gives you a headache. What if there was a way to start the real service in your integration tests?…
PICOCLI
Do you want to bring your java applications to your command line? Picocli is a framework that enables you to create your own rich CLI ,backed by java! In this post we will get started with an example CLI called java-genie. To read more on…
REFLECTION IN NATIVE IMAGES
Are you struggling getting the configuration right for reflection in native images? Here are some tips and tricks to get you up and running! Building native images can take a lot of time so trial and error is not the optimal way to get the…
ZALANDO LOGBOOK
Do you need http request and response logging without it polluting your business code? Use Zalando Logbook and add this aspect to your stack! In this post we will add logging for all http requests and play around with the configurations. For more in depth…
UPX IMAGE
Do you want smaller images with a faster startup time? Use UPX to compress your executable inside your image. Use a UPX image! For more information on the internals of UPX take a look at their website here. Or at the source code of UPX…
JIB MAVEN PLUGIN
Do you need a simple way to build docker images for your java with maven applications? Use the jib maven plugin and let maven do the heavy lifting! For a complete overview of all capabilities of the jib maven plugin take a look at the…
NATIVE IMAGE
Are you looking for a way to build super fast starting images with a low memory footprint? Use GraalVM’s native image and make the difference! To skip the details on when building a native image is possible we will use a framework that advertises with…
MAVEN ARCHETYPE
Are you copying an old maven project every time you need a new one? Maybe a maven archetype is the solution for you! In this post we will create a maven archetype to quickly create a micronaut graphQL API. A different guide on how to…
MICRONAUT TESTING
Having trouble testing your micronaut application? Or just interested on my take on micronaut testing? Just read along! In this post we will make some integration and unit tests for a micronaut gRPC API. For a wider view of the micronaut testing capabilities look at…
JGITVER
Are you looking for an easy way to handle versioning of your maven projects? Use the jgitver maven plugin! In this post we will setup the plugin and show some of the main features. For a complete overview of the plugin and its workings please…
CREATE A MAVEN PLUGIN
Do you want to incorporate a task in your maven build? Discover how to create a maven plugin! In this post we will create a plugin that will alter a protobuf specifications file. A more in depth guide is made by apache and can be…
GRAPHQL WITH MICRONAUT
Are you working around the clock creating new REST endpoints for you clients? Are the requirements constantly changing? Use graphQL with micronaut and give more control to the client. The graphQL website is a great place to start reading. Also the tutorial by micronaut on…
GRPCURL
Are you looking for an easy way to test your gRPC endpoints? Use gRPCurl from the command line and see the result in Json. It’s basically curl for gRPC endpoints. In this post we will explore my method of exploratory testing a gRPC server. The…
GRPC WITH MICRONAUT
Are you sick of writing client libraries for all your clients? Do you have trouble sticking to a contract-first approache with REST? Use gRPC! Specifically gRPC with micronaut! To get familiar with micronaut check out this previous post on micronaut. The complete code for this…
TRUFFLE SUITE
Do you want to publish smart contracts on the Ethereum blockchain? We are going to use the Truffle suite to deploy our first! In this post we are going to build a trust fund holder where you can release funds to someone after a set…
FLUENT
Are you sick of going into a Kubernetes cluster to look at the logs of an application? Do you want a clear overview of the access logs over several pods? Use these tools for a fluent log experience. We are going to use fluent-bit, fluentd,…
HELM SECRETS
Do you have application properties like database passwords that are not to be shared with the world? Use Helm Secrets and hide them in plain sight. In this post we will encrypt a value and use it in a Helm deployment. The complete code can…
CONTAINER SECURITY
Are you writing secure Dockerfiles? Are you scanning for security vulnerabilities of the base images you use? Use hadolint and trivy to upgrade your container security! We are going to explore two tools for writing better and more secure images: hadolint (code here on github)…
KUBECTL TOOLS
Are you tired of typing the namespace in every kubectl command? Do you keep forgetting the command for switching the kubectl context? Speed up your kubectl process with these kubectl tools! I am refering to the tools that come with kubectx. Installation On macOS I…
TRAVIS CI
Looking for a free and easy way to build your open source projects? Travis CI enables you to build, test and deploy your code in minutes! In this post we will setup a Travis CI build to get you going quickly. For a complete overview…
E2E TESTS WITH CYPRESS
Are you looking for a developer friendly end-to-end framework for your Angular projects? Create your e2e tests with Cypress! In this post we will get started with Cypress and create our first e2e test for an example angular project. For a more information on all…
OAS3 AND SPRING BOOT
Looking for an easy way to document your Spring Boot API following the OAS3 specification? Use a Springdoc documentation endpoint, for OAS3 and Spring Boot! In this post we set up Springdoc and add documentation to an example endpoint. The code for the Springdoc project…
ANGULAR WITH JEST
Do you ask yourself if there is a better testing framework for your Angular applications? Use Angular with Jest and make your tests simpler and faster! In this post we migrate an example project and discuss the main advantages I found. Take a look at…
ANGULAR HTTP INTERCEPTOR
Do you need control over all http requests of your app at once? Use an Angular http interceptor for incoming or outgoing http! In this post we will add a api-key header to all outgoing http requests and navigate to the login page for all…
NG-APIMOCK
Are you looking for a way to mock api calls for your Angular app? Do you want to test different responses locally? Here is ng-apimock! In this post we are going to setup api mocking in a very simple app so you can see what…
GPG ENCRYPTION
Do you feel lost when others talk about encryption? In this post we will get you started with GPG encryption and encrypt/decrypt our deepest secrets. We will install the gpg commandline tool to do so. GNU Privacy Guard (GPG) is an implementation of the OpenPGP…
ETHEREUM REMIX
Don’t want to install stuff to get started creating smart contracts on the Ethereum blockchain? Use Ethereum remix to create and test your smart contracts! In this post we go over the basic functionalities of remix so you can get started fast. For a local…
HEROKU PLAYGROUND
Do you want to deploy your applications instantly to a cloud environment? Heroku offers a free account to get you started right away! In this post we set up our Heroku playground and deploy an app. You can read more on all other possibilities of…
MICRONAUT FRAMEWORK
Do you like Spring Boot? It can be better, faster and with a smaller memory footprint! Take a look at the modern, JVM based Micronaut framework. In this post we will get started and create an API in Kotlin. For more reading on Micronaut go…
ETHEREUM DEVELOPER
Are you interested in blockchain development but you don’t know where to begin? In this series we will get started with developing smart contracts on the Ethereum blockchain. Your first step in becoming a Ethereum developer. The goal of this first post is to get…
ANDROID NAVIGATION
An Android app with only one screen can be kind of dull. Here we learn how to switch between screens with Android Navigation. We take on clicklisteners on a recyclerview, passing arguments and the famous back stack. A great way to start your journey into…
ANDROID ROOM
Did you ever consider the users of your app could have no internet connection? Android Room will store data locally enabling a smooth offline experience. In this post we will show how to store data in a Room database and abstract this mechanism away using…
ANDROID RECYCLERVIEW
There are a lot of great places where you can get started with Android. In this post we assume you did a tutorial and go from there. We will talk about Recyclerview, ViewModels, Data Binding and more. The place where I started out with Android…
HELM STARTER
Are a lot of your Helm Charts similar? And are you copying them around your applications? Create a Helm Starter and whip up a chart in an instance! Read more about starters at the Helm docs here. In the following we are going to create…
DEPLOY WITH HELM
Do you ever get lost in all the Kubernetes configuration files you defined for your application? When you deploy with Helm they are treated as packages and are easier to manage. In this post we will take the Kubernetes deployment we build in several previous…
SPRING AUTOCONFIGURE
Ever wondered how defining a property in Spring applications can automatically configure functionality? We are going to create this ourselves with Spring autoconfigure. We are going to setup a controller with endpoint with only a dependency and a property. For a more in depth discussion…
TERMINAL ARRANGEMENT
Do you find yourself opening terminals and first resizing and arranging them before starting your commands? In this article we look at some helpful shortcuts for arranging one or multiple terminal windows with iTerm2. Personalise your terminal arrangement. For the full documentation on iTerm2 take…
CHROME SESSIONBOX
Ever found yourself opening incognito browser screens just to test your application with another account? The chrome sessionbox extension lets you create multiple sessions in separate tabs! Installing is easy via the google chrome webstore found here. Creating a new session First navigate to your…
REVEAL.JS
In this post we look at reveal.js, a presentation framework from code! We discuss the benefits like importing themes and using i-frames inside the presentation. For a complete overview of all the features of reveal take a look at the README.md on github here. Did…
ANGULAR 8 UPGRADE
It is about time to take on the Angular 8 upgrade. In this post we will see the steps that I needed for this job. In an earlier post we made the Angular 7 upgrade and there are a lot of similarities. Let’s dive into…
PROMETHEUS ALERTING
In an earlier post we saw how to setup a Prometheus instance in our cluster. Here we create alerts on the Prometheus monitoring for when some action is needed on our pods. No need for constant monitoring with Prometheus alerting. For in depth documentation on…
KUBERNETES AND PROMETHEUS
In an earlier post we saw how to deploy your Spring application to a Kubernetes cluster. Here we will see how to setup monitoring in your cluster where Kubernetes and Prometheus work together. Follow along to setup your own Prometheus instance! For more in depth…
JAVA TO KOTLIN
For Android developers there is a shift going on from Java to Kotlin. Here we are going to look at some Kotlin features that caught my eye. My overall impression is that it’s Java but more concise and more safe. Let’s have a look. For…
NPM CI
As an Angular developer npm install is a well known command. Copying this command to your Continuous Integration pipeline is a bad idea. Use the npm ci command instead. Here is why. We will concentrate on the differences betwee install and ci. For the complete…
TREE COMMAND
Ever been working your way down directories with alternating ls and cd? Not knowing by heart what the whole directory structure looks like can be a pain. But there is a way out with the tree command! This post is part of a series on…
HTTPIE
Postman was my go to tool when I considered making a http request. That all changed when I found out httpie gives a very easy and short API precisely for this. In this post I will show why I like httpie. The full documentation can…
Z COMMAND
Working from the command line can be repetitive. Are you sick of typing the same path to a directory over and over again? Are you sometimes opening a finder to see what this path was? Z to the rescue! Now you can jump to this…
FISH SHELL
As I gain more experience as a software developer I find myself using the command line a lot more. With this growing demand comes a growing need for powerful tools for the command line. In comes fish shell. For a complete documentation and installation guide…
JACKSON ANNOTATIONS
Jackson is a helpful tool when building REST API’s. In this post I will explain what Jackson annotations I use all the time. There are of course many more Jackson annotations for all situations (example tutorials here). Here we focus on the things you want…
KUBERNETES AUTOSCALING
On of the benefits of a Kubernetes cluster is easy scaling. In this post we configure some rules for Kubernetes autoscaling. We start off with the example application from an earlier post. The complete autoscaling code can be found on github. Autoscaling Suppose we have…
KUBERNETES INGRESS
In previous posts on deploying an application to a Kubernetes cluster we used a NodePort to expose the service to the outside world. Kubernetes Ingress is a separate Pod where we can control this exposure via routing, security and rate limiting. In this post we…
RXJS COMBINING
In this post we show some ways to combine observables. I made a stackblitz example project to give you a working example. The RxJS part of the project will be discussed in this post on RxJS combining. Disabled while loading We start out with 2…
RXJS MULTICASTING
Most of the time you want to do multiple things with data you have. This post is on how to share this data in multiple observables: RxJS multicasting. For more examples on RxJS multicasting got to this learn-rxjs site. Say we have an api call…
RXJS ERROR HANDLING
Errors are first class citizens in reactive programming. The error flow is adopted as a valid case of all observables. This is an essential and great feature but also one of the less understood parts. In this post we explore some of the most common…
CHROME HEADLESS ON JENKINS
In an earlier post we saw how we could build an angular library with Jenkins. To keep the complexity to a minimum we didn’t run any tests in that build. Here we will run these tests inside Jenkins using Chrome Headless. Jenkins build First we…
NPM LIBRARY JENKINS
To display the expressive power of the Jenkins build we show here how to create a Jenkins pipeline for a npm library. We focus on the differences apposed to the Java application pipeline we saw in an earlier post. Angular test library As of Angular…
GENERIC JENKINS FILE
What if you have multiple projects all having similar Jenkins file? (If not, you can follow this post to create one or more) Is there a way we can template this so can maintain this file in one place? Is there a way to get…
JENKINS DELOY TO KUBERNETES
We already saw how we can build and push our docker images using Jenkins in this post. Now we want to deploy this image to our local Kubernetes cluster so we have a running application. Here we go! Setup Jenkins If you want to follow…
DOCKER ON JENKINS
A lot of companies use Docker to unify their build process. Here we show how to set up a Jenkins pipeline using Docker. First follow my older post JENKINS ON MINIKUBE to get your own Jenkins instance running on minikube. Simple test application We need…
MULTIPLE GIT USERS
Ever wanted to commit something with a different git user? Maybe your employer provided a user for you? Here are some strategies. For more detailed information of the commands in this post please visit the git config documentation. Switch git user for one repository Suppose…
UPGRADING TO ANGULAR 7
Keeping up with the latest version of Angular is good practise. In this post I will take you through the steps I took with my projects upgrading to Angular 7. You could also take a look at this upgrading tool by Angular to help with…
MOVE A GIT REPOSITORY
This week we moved our git repositories to a new platform used in the company. This operation is simpler than a move from say SVN to git. Still here are some points not to overlook. It is always a good idea to take a closer…
VAT DECLARATION
As a freelancer you are responsible for your own taxes. Some get an accountant to this but there is not much to it if you break it down. Here we discuss the VAT declaration, BTW in dutch. VAT are the taxes you charge on the…
ANGULAR VIEWCHILD
When you want to control a child component, directive or DOM element from its parent component, you can use the Viewchild decorator in Angular. Viewchild returns the first element that matches a give child component, directive or DOM element and updates it if the reference…
GIT CHERRY-PICK
Ever been in the situation where you want a change from another branch but not all? I did… and ended up merging everything and reverting all the things I didn’t need. Turns out git has a command for this! Git cherry-pick. The official documentation can…
RXJS FLATTENING
From functional programming we all know map and flatMap. With reactive programming just flattening is not enough information. We have to make a decision about what to do when either the observables emit the next element or complete. We have the following choices: mergeMap — deciding not…
ANGULAR 6 TREE SHAKING
Working in reasonably big companies for the last years I’ve come across big Angular projects. As you would expect these projects were modular projects consisting of a bunch of modules. One of the things I never took in consideration was ‘tree shaking’. You can read…
JENKINS ON MINIKUBE
In my current project we are moving our application to the cloud. This means there is a Kubernetes cluster with a Jenkins build server. To get the hang of this setup I got my own Kubernetes cluster locally with minikube and deployed a Jenkins on…
SPRING BEAN LOADING ORDER
Spring beans are not always loaded in the same order. The Spring container has freedom in the way beans are loaded and even in the smallest projects the order changes. Here are some ways to control this Spring bean loading order. One of the restrictions…
HIBERNATE ID GENERATION STRATEGIES
It was a regular day in the office. A consumer of our API started just migrated half of their load to our endpoints. Suddenly we get calls of locking insert statements on the underlying database. Here is wat we learned the hard way: Never use…
MIGRATION JAVA 8 TO JAVA 11 WITH SPRING BOOT 2
Upgrading a major version is always a pain. Although from java 9 up it’s supposed to be easier. In this post I will give some examples of the obstacles I encountered. The use case is a Spring Boot application, so we need to upgrade to…
NPM PEER DEPENDENCIES
Comming from the java world I realised npm resolves dependencies differently than for example maven. Maven demands one unique version of a dependency amongst who depend on it. This sometimes results in a so called ‘dependency hell’. Here we talk about peer dependencies that come…
CORS WITH ANGULAR AND SPRING BOOT
When we choose to follow any Angular and Spring Boot startup tutorials we end up with applications running on http://localhost:4200 and http://localhost:8080. Communication between the two can run into Cross-Origin Resource Sharing (CORS) blocking. Take a look at the getting started pages for Spring Boot and…