Passively Cool – The Surface Pro 6 Review

One of the computers I was interested in at the beginning of this yearwas the Surface Pro 6 from Microsoft. I had owned a Surface Pro 3 in the past and was very happy with it. But, as mentioned in a previous article, I had noticed something like a moiré pattern on the screen when white background was displayed. It wasn’t as pronounced on the Surface Pro as it was on a lower resolution HP notebook, but it was there, and I was afraid it would bother me.

I managed to get my hands on a Surface Pro 6 base model with a Signature Type Cover in Alcantara and used it as my main computer for about a week instead of my MacBook Pro.

Guess what: it didn’t bother me, and I could have saved a lot of money compared to the MacBook Pro. But that’s only part of the story.

Read More »

Of Affordable Phones, Software Updates and Yearly Upgrades

With the release of the Google Pixel 3a I once again started thinking about what I want in a smartphone. As a reminder, the last time I was pondering the purchase of one I was musing of tall phones, curved displays and notches. I am not in the market for a new phone right now as my iPhone 8 is more than capable of fulfilling my needs. But, with the recent launch of the Pixel 3a I wished that this device had already existed a year ago because it is basically the perfect phone for me. And I also wish Google would get back into the market of less expensive phones with the latest and greatest hardware as was the case with the Nexus line.

Read More »

AdoptOpenJDK 8 NullPointerException sun.awt.FontConfiguration.getVersion(FontConfiguration.java:1264)

I recently had to deal with this little bugger as we moved from the OpenJDK 8 package supplied by the Linux distro of choice to AdoptOpenJDK 8. It is important to know that we completely uninstalled OpenJDK, including all its transient dependencies.

(And in due time we’ll uninstall Java 8 and replace that grandpa as well)

As a result, parts of our application didn’t work any longer, resulting in this nice and shiny Java stacktrace.

2019-05-03 08:22:07,345 ERROR [qtp1896708863-35] [PlotChartController] [/][/][/]- error while creating chart image
java.lang.NullPointerException
        at sun.awt.FontConfiguration.getVersion(FontConfiguration.java:1264)
        at sun.awt.FontConfiguration.readFontConfigFile(FontConfiguration.java:219)
        at sun.awt.FontConfiguration.init(FontConfiguration.java:107)
        at sun.awt.X11FontManager.createFontConfiguration(X11FontManager.java:774)
        at sun.font.SunFontManager$2.run(SunFontManager.java:431)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.font.SunFontManager.<init>(SunFontManager.java:376)
        at sun.awt.FcFontManager.<init>(FcFontManager.java:35)
        at sun.awt.X11FontManager.<init>(X11FontManager.java:57)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at java.lang.Class.newInstance(Class.java:442)
        at sun.font.FontManagerFactory$1.run(FontManagerFactory.java:83)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.font.FontManagerFactory.getInstance(FontManagerFactory.java:74)
        at java.awt.Font.getFont2D(Font.java:491)
        at java.awt.Font.defaultLineMetrics(Font.java:2176)
        at java.awt.Font.getLineMetrics(Font.java:2246)
        at org.jfree.chart.axis.DateAxis.estimateMaximumTickLabelWidth(DateAxis.java:1453)
        at org.jfree.chart.axis.DateAxis.selectHorizontalAutoTickUnit(DateAxis.java:1365)
        at org.jfree.chart.axis.DateAxis.selectAutoTickUnit(DateAxis.java:1340)
        at org.jfree.chart.axis.DateAxis.refreshTicksHorizontal(DateAxis.java:1616)
        at org.jfree.chart.axis.DateAxis.refreshTicks(DateAxis.java:1556)
        at org.jfree.chart.axis.ValueAxis.reserveSpace(ValueAxis.java:807)
        at org.jfree.chart.plot.CombinedDomainXYPlot.calculateAxisSpace(CombinedDomainXYPlot.java:364)
        at org.jfree.chart.plot.CombinedDomainXYPlot.draw(CombinedDomainXYPlot.java:442)
        at org.jfree.chart.JFreeChart.draw(JFreeChart.java:1235)
        at org.jfree.chart.JFreeChart.createBufferedImage(JFreeChart.java:1409)
        at org.jfree.chart.JFreeChart.createBufferedImage(JFreeChart.java:1389)
        at org.jfree.chart.ChartUtilities.writeChartAsPNG(ChartUtilities.java:183)

I obviously removed some (a lot) parts to make it more readable and to hide corporate IP 😉 But this is the relevant part.

I found this bug report on Github and for once, plowing through the comments, it helped me. As is mentioned there, the culprit is the missing “fontconfig” package. So, I added another Ansible task to our playbook to provision the server et voila, the problem is gone.

- name: Install fontconfig package
  package:
    name: fontconfig
    state: present
    tags:
      - java

As mentioned earlier, we had wiped all that was relevant to OpenJDK off the system and by doing so, also uninstalled the “fontconfig” package. Otherwise this error wouldn’t have surfaced. But that’s the benefit of starting with a clean slate. This way you know if something is missing and don’t get surprised by errors all of a sudden while, at the same time, it is working on another machine.

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 »