Those who come here know that the blogs here mainly have a technical angle. This time it’s a little bit different for me. Why? Because I started following my dream: Working from abroad.
Archive: October 2023
As mentioned in the previous blog posts from MrHaki
jq is a powerful tool to work with JSON from the command-line.
The power of
jq can also be leveraged to extract data from a JSON structure and export it to CSV.
jq is a powerful tool to work with JSON from the command-line. The tool has a lot of functions that makes our live easier. One of the functions is
add which adds all elements in an array or values in an object. The function has no arguments. The elements in an array are added together if they are numbers and concatenated if they are strings. If the input is an object then the values are added together. When the input is an empty array or object then null is returned.
jq is a powerful tool to work with JSON from the command-line. The tool has a lot of functions that makes our live easier. With
jq we can use expressions in strings that will be evaluated and inserted into the string value. This is called string interpolation. The expression is enclosed by parentheses and the first parenthesis is prefixed with a backslash:
\(<expression>). The expression can be any valid
jq expression and the result of the expression will be inserted into the string.
jq is a powerful tool to work with JSON from the command-line. The tool has a lot of functions that makes our live easier. For example we can use the
keys_unsorted functions to get the keys from an object. The function
keys will return the keys in sorted order while
keys_unsorted will return them in the original order from the object. With the same functions we can also get the indices of the elements in an array, but there is no sorting involved, so both functions return the same output.
Suppose you are testing a set of Quarkus based microservices. They run as Docker images inside a Kubernetes cluster on your local machine, e.g. using MiniKube or Rancher Desktop. At some point you find a bug in one of the services, or you find that you need an extra logging in code. Now you would like to quickly modify the code and redeploy it in your Kubernetes cluster. Typically your Docker image is build using a build pipeline on a build server, which may take several minutes. Can this be done any faster and easier? With Skaffold you can!
You can tell your old man
You’ll do some largemouth fishing another time
You just got too much on your plate to bait and cast a line
You can always put a rain check in his hand
'Til you can’t
Many social media automation platforms now charge for automatically posting an RSS feed to X.com (Formerly Twitter). One alternative to paid social media automation platforms is to use Slack. If you are already paying for Slack Pro this comes at no additional cost. In this post we will have a look at setting up a Slack platform app to post our JDriven blog RSS feed to X.com.
Java 21 the new Java LTS (Long Term Support) is out and as a tribute to it I wanted to write a blog about it on the 21th day of Blogtober. What is new and which features are in it for me as a developer? I’ve taken a look at the release note from java release 18, 19, 20 and 21 and here is small summary of some new features. In this blog I only cover final released features and will exclude the features that are in preview or incubator.
Recently I stumbled upon an example of why managing your dependencies in a maintainable way is important. The issue I had was in a multi-module project where individual Maven dependencies were overridden everywhere, the result was that a lot of dependencies were in conflict and upgrading these dependencies became quite troublesome. One of the countermeasures for me was the use of certain Maven Bill of Material (BOM).
With using a BOM I only had to set version of dependencies once and did not have to duplicate the dependency in the parent because the bom implicitly has it already.
There are plenty of ways to build software that responds to changes in data or outside events. It can be less intuitive to come up with a solution that needs to respond to nothing happening.
jq is a powerful tool to work with JSON from the command-line. The tool has a lot of functions and operators that makes our live easier. One of the operators we can use is the alternative operator
// which allows us to specify default values. If the value on the left side of the operator
// is empty, null or false then the value on the right side is returned, otherwise the value itself is returned. The operator can be used multiple times if we want to have multiple fallbacks for a value we are checking.