Posts

I upgraded to Java 9 - Part II

Last updated

A few weeks ago, I wrote about migrating an existing Spring-application to Java 9. When I finished, two things remained to be investigated:

  1. Code coverage for unit tests.
  2. A bunch of warnings when running the application in Tomcat.

Code coverage for unit tests

As Alan Bateman pointed out, upgrading JaCoCo to its latest version should resolve the issue about the $jacocoData field. In fact, I thought I had done that, but somehow I kept on getting the same error every single time. But when I tried (again) last week, it somehow disappeared. No error to be seen, all tests green, and a nice coverage report from JaCoCo. I’m a happy developer, again!

Read more... →

I upgraded to Java 9 - here's what happened

Last updated

I recently participated in a Twitter conversation about upgrading to Java 9. Like most of the people, my current projects are all on Java 8. Of course the question came up, why don’t you upgrade? Good question! Since I hadn’t even tried, I decided to see how far I could come…

The component I took for my experiment is a pretty simple Spring application. It doesn’t use Spring Boot. It exposes a few REST endpoints, and calls couple of webservices over SOAP. For these webservices, it uses bindings generated by the JAXB plugin for Maven.

Read more... →

Devoxx 2017

Last updated

Almost two months ago I visited Devoxx 2017. It’s about time to write some notes on the stuff I learnt there!

Event Storming & DDD workshop

The week started off with a full afternoon workshop led by Stijn Vanpoucke. The workshop consisted of small pieces of theory, alternated with exercises using post-it’s and markers.

A few of the theoretic pieces:

  • An event is something that has happened in the past. It is usually phrased in past tense. It should be understandable for business users.
  • A command is an user-initiated action. It explains the origin and sometimes the reason for the action.
  • An entity is an individual thing. It has a unique identity. Often, entities are mutable.
  • A value object is an non-unique value. It is often immutable. Its equality is based on it’s attributes. It should be able to validate itself. They can be combined.
  • An aggregate is a combination of entities and value objects. They are structured in a hierarchy. Its root is always an entity. Aggregates contain business rules. Note that a bigger aggregate is not always better! To circumvent this, aggregates can use soft links based on the unique identity of other entities.
  • The bounded context describes the context from which you look at it. Take a pen as example; what a pen is depends on the context from which you look at it. To stress the fact that it has boundaries, it is called a bounded context. Bounded contexts support the idea of having “one team, one (business) language”. The bigger the bounded context is, the bigger the language, whether artificial or natural. Finally, multiple domains can have different words for the same concept. A sales department might speak of products while inventory management might name the same concept article.

Kotlin for Java programmers

This year had a lot of talks about Kotlin scheduled. To visit them all would take too much time, so I decided to follow just one by Venkat Subramaniam. I figured it would give me about the same amount of content…

Read more... →

Getting Started with Zuul

Last updated

It’s been a while since my last post! I recently have been reading a lot about the idea of “API management” or an “API gateway”. There’s a lot of commercial offerings in this field. Many of them promise you (to some extend) ultimate flexibility and endless possibilities. My preference is for “lean and mean” approaches where I can pick the building blocks that I need. In the long run, that offers more flexibility. After all, you could replace building blocks. Having small building blocks makes it less tempting to put any kind of business logic in such a gateway. Doing that must sooner or later lead to some kind of vendor lock-in.

Read more... →

JavaOne 2017

Last updated

This year, I had the pleasure again to visit JavaOne. Not only did I attend the conference, I was also accepted to speak, which was quite a dream come true. The session catalog contains almost 500 sessions, and I obviously visited only a subset of them. I found two topics particularly interesting and decided to attend multiple sessions on each of them.

“Prepare for JDK 9” and “Migrating to Java 9 Modules”

Both sessions where more or less covering the same ground, although from a different perspective. Alan Bateman from Oracle took the more theoretical view and explained what you can expect to happen when you want to move to Java 9. He also busted some myths, like the one that “nothing will continue to work” or “everything first needs to be modularised”.

Read more... →

Markdown to PDF

Last updated

Todays note is nothing more than a quick tip. I’m a big fan of the Markdown markup language, but sometimes I need to exchange documents with people who don’t know how to read them. Often, they prefer just Word or PDF. So I looked for a way to convert a Markdown file to a PDF file.

My current solution is based on Node.js so you need to install that first. Then use npm, the package manager for javascript, to install the markdown-pdf package using

Read more... →

No bind or arrow functions in in JSX Props - Why? How?

Last updated

Recently, I found myself running tslint on a small React application written in TypeScript. The combination itself is worth writing another blog post about, but today we’re covering just one of the rules that tslint has; in fact, it is defined in the “tslint-react” rule set. It is also included in the eslint-plugin-react, because it is not related to TypeScript per se.

What’s it about?

In its ES6 version, the rule says: “No .bind() or Arrow Functions in JSX Props (react/jsx-no-bind).” The TypeScript version has two rules, one is called “jsx-no-bind” and the other one “jsx-no-lambda”; their intent is the same as the ES6 one. When you first notice the rule, you might wonder “why is that an issue?”. If you call bind(), or if you define an arrow function, this will create a brand new function every time you run that code. When you’re using that inside a render() method or a so-called stateless functional component, it will create a new function every time you render that component. That violates the one strict rule from React that says

Read more... →

Installing the CUDA Toolkit on Ubuntu

Last updated

Lately, my interest for machine learning and artificial intelligence has revived. When I was at university, I followed some courses and specialisations in this field, but then during my career I hardly ever used any of it. Back in those years, complex neural nets and genetic algorithms took days to build, mainly because we didn’t have the computing power for that. But nowadays, things have changed, and such models can relatively quickly be built using a commodity graphics card.

Read more... →

JBCNConf & Voxxed Days LU

Last updated

Wow, that was a busy and inspiring week! In one week, I’ve visited two conferences in two different countries to give talks on two different subjects. But the most inspiring part came from attending other sessions. I’ll highlight one session from both conferences.

JBCNConf 2017

On JBCNConf, I’ve attented a session by Burr Sutter about Vert.x. This was a session full of energy, as Burr is really capable of making your enthusiastic of whatever he is talking on. As he walked us through the various options you have to build and deploy Vert.x-based applications, he also showed a lot of demos. One of the demos involved “simple” temperature sensors over MQTT on miniature computers (aside: the size of these computers was largely dominated by their batteries… impressive!) to his MacBook showing you can run Vert.x in multiple languages that still communicate with each other. It also illustrated how to handle events coming in at this pace, introducing the concepts of streaming events.

Read more... →

Elastic stack: a renewed introduction

Last updated

A few years ago, I had an assignment at my former client involving Elasticsearch, Logstash and Kibana to build an operational dashboard. It was fun to do and very instructive; afterwards, I wrote an article about my experiences and spoke at various conferences. Recently, I was asked by another team in my company to assist them in setting it up for their team. A good chance to catch up with some old friends, and see how they have changed over the years.

Read more... →