Micrometer and Spring (Non-Boot)

Almost all of the tutorials and blog posts I found on this topic were focused on Spring Boot because, starting with version 2, it uses Micrometer as its metrics framework. However, in a particular project at work we do not have access to Spring Boot let alone a recent Spring version. Therefore, I’m explaining how to include Micrometer in your non-Boot Spring application using XML configuration.

In this tutorial I will be using Spring 5 and Java 11, so not exactly the versions I’m dealing with at work, but the concepts are the same and everything can probably be copied exactly as shown here.

Read More »

A Java “DSL“ for Simple Unit Test Data Creation

I’m a person that usually writes tests before the implementation. In the context of my backup application project this has turned out to really slow me down. But it’s not just a problem of my personal projects. It also affects my professional work. 

Here’s the issue: for some tests you need test data and generating that test data can be a tedious task, depending on the complexity. This has caused me to procrastinate on my backup app. So, one evening, after having thought about this during a workout, I grabbed my laptop, sat down in my comfy bed and wrote a “DSL” that makes creating the data much simpler. Not only is it easier to create the data now, allowing me to continue at a faster pace, it’s also much more readable and the test setup doesn’t clutter the test case anymore. This is a very important aspect of a test. What good does it to have one if, after some time, you have to update it and don’t understand what it does anymore?

Read More »

The MacBook Pro 13-inch 2018 Review

There are two posts preceding this one which are New Laptop: Windows, macOS or Linuxwhere I try to explain why I’d like to buy a laptop and what options I see for myself and Why a MacBook in Favor of Windows or Linux Laptopsthat explains why I bought the MacBook Pro that I’m reviewing here or, to turn it around, why I didn’t go with a non-Apple mobile computer running whatever operating system.

This won’t just be another review of the kind you can find on other tech or Apple focused sites. I’ll not be showing any performance benchmarks or review every aspect of the device to check off items on a check list. That horse has been beaten to death already by manymanyother sitesafter the MacBook Pro had launched in 2018. Of course, I’ll be touching on a few controversial topics like the keyboard and the Touch Bar, despite which I still decided to buy it. For the past few months I’ve been using the computer regularly and I think I got enough experience with it to be able to tell whether I like something in the long run or not. It’s not just a first-look-kind-of-hands-on. It’ll be a combination of hardware, because that’s the physical good you’re buying, software and on being an Apple user (again).

Read More »

The Writing Application Conundrum

While I’m actively procrastinating on my backup application and finishing my MacBook Pro review, I was pondering on what tool I should continue to use or start to use for writing my blog posts. I’ve tried a few things in the past, one of them being Markdown in Byword way back in the early stages of my blogging efforts, Libre Office and the ODT file format sometime after that and more recently Microsoft’s Word using its DOCX format. To generalize it a bit: 

  • Markdown using any capable editor.
  • A full featured Word processor.

Both tools have their pro’s and con’s, but none of them are the perfect solution and I’m finding myself doing a bit of this and a bit of that, but never being really satisfied.

Read More »

Using TagLib with pytaglib in Python

I tend to write a lot of background to paint a picture why I’m doing things, so I’ll try to keep it short for to move on to the code quickly.

I have a digital music collection that was sorted by the first letter of the artist (A, B, C etc.) and then the artist and underneath that the albums. While that is good to find things, it’s not optimal for listening in my car (via USB stick). Sometimes I find myself wanting to listen to all of Melodic Death Metal on shuffle play. My car doesn’t support this like iTunes, with its internal music library, which is why I wanted to group artists and albums by genre. Since I didn’t plan to do this all manually, I opted to write some scripts in Python.

The code is available on GitHub. If you have suggestions for improvements, please comment or create a pull request. I’m not a Python pro, so I’m sure there’s some room to make it better.

Read More »

Why a MacBook in Favor of Windows or Linux Laptops

As discussed in a recent blog post, I was in the market for a laptop. Several days after I had written about that topic and spent countless hours researching pros and cons, I had made the decision and went out to buy one. As the title suggests, it resulted in the most expensive product of the three options I was looking at and I’m here to write about it. This, however, is not the review as it would clearly blow up this piece. I’ll leave that for another day (I have written >1000 words already *tease*). In this blog post I’ll be explaining myself. Why I went with the MacBook Pro over the much more affordable and better equipped non-Mac laptops.

Read More »

Writing a Custom Backup Solution

If you are a user of any form of computer and care one bit about your sanity, then you probably have a backup strategy. Otherwise, if all hell breaks loose and your whole computer burns to ash or the hard drive melts to a heap of metal, turning it into an ugly door stop, you’ll likely be kinda angry, maybe slightly pissed, your pulse most definitely at 180, that you’ve lost all your data. I’d certainly be, especially about all my pictures of all the festivals and places I’ve been to. 

(And maybe some family 😅)

But, to be honest, I’ve been a bit lazy about backups for some time now. I do have copies of all my important files, but that’s not a backup. It’s a copy. A backup lets you go back in time and get an older version of a file or folder, not just the most recent one that has been synced.

So why is it, that I’m not as diligent as I should be? There are a few factors in that equation. It’s laziness for one, knowledge that I do have at least one copy, the fact that I haven’t had any data loss so far and stinginess. Why the latter? Up until now, being a Windows user (not any more though, on my main machine), I was relying on Acronis True Image, a commercial backup software. However, the version that I own – 2014, I think – stopped being reliable in one of the past Windows 10 versions. I simply don’t want to spend the money any more.

I’m not here to tell you that I have changed my mind on that. No. I’m, of course, coding my own solution. Why wouldn’t I? Everything is done multiple times in the Open Source community.

Read More »