What I learnt developing a small JavaFX App [WIP]


This is a collection of the things I learnt developing a simple JavaFX app over the last month or two. My background is very much in Java EE with decades of experience building high end, high-performance ticketing systems. This means that my expectation from a development environment is relatively high. There are many optional components in here that I find worthwhile setting up at the start, but are not necessary



One of the most useful tools I have found while working with Java is maven. If maven isn’t a part of your build, have a look at it and re-evaluate that. I have no doubt that maven has saved me hundreds, if not thousands of hours over the last few years.

JavaFX Scene Builder

While this one has a bunch of issues and serious limitations, it can still be a helpful tool. It helped me get a handle on the components available and placing items.



I use junit5, but there are other options like test-ng which are equally good. I use Mockito for mocking, but there are many other options like PowerMock, JMockit, EasyMock, etc.

For UI Testing, you can use TestFX. I don’t like UI work, so haven’t done much work with this.

<span id="mce_SELREST_start" style="overflow:hidden;line-height:0;">&#65279;</span><span id="mce_SELREST_end" style="overflow:hidden;line-height:0;">&#65279;</span>





I can’t live without logging in any application. It can make troubleshooting much easier, particularly when you’ve deployed your app. log4j2 is the main logging framework out there. You can choose another one if you like, but I strongly recommend having and using one.


Dependency Injection

If you have working the Java EE Environment, you have almost certainly come across Inversion of Control,  particularly in the form of Dependency Injection. I love dependency injection. It helps with decoupling components and with testing.

I looked at various frameworks including Dagger 2, Spring, Guice.


The fully static (compile time) nature of Dagger 2 means that it doesn’t gel well with JavaFX which is very dynamic.


I had worked with Spring many years ago and didn’t want to tangle with a behemoth for a small project. There are many components and loads of functionality in spring and if you building a large and complex project, it might be worth it.

Google Guice

Google Guice is the framework that I ended up going with. It does have some dependencies like Guava, but as it turned out, I Guava comes in handy for JavaFX anyway.

We don’t need an entry in the pom.xml for this because of the following dependency.

Gluon Ignite

Gluon Ignite was released by gluon labs to integrate Dependency Injection frameworks with JavaFX. In other words, it ties in the DI framework with the FXMLLoader so that it will load the correct controller instances.

Since I am using Guice, I needed the ignore-guice module. If you add this into your pom.xml, it will also pull in google guice. Easy eh? 😉


If you don’t want to add another dependency, you could take a look at the code in this module. It’s fairly straightforward to integrate that manually into your app. It’s just easier to add in the dependency and let it do the magic

Event / Publisher / Subscriber Framework

It is likely that you will need an event framework or a publisher/subscriber framework. The nature of GUI design and work is that it is an easy and simple solution for a number of problems you will come across.

Fortunately, we already have an event framework in place within Guava which is a dependency of Google Guice.

Project Lombok

Don’t you love adding in a getter and a setter for each field? When you change your fields, don’t you love going in and updating all the getters and setters? How about defining the long, pita to type types with generics of variables that you are assigning from a method call? I mean the compiler can’t possibly figure that out by itself, right?

How about writing out the toString, equals and hashCode for each class?

What do you mean no, you don’t? You don’t love these tedious repetitive tasks of development? Good! You will love Lombok.

Unfortunately, with Lombok, it’s not as simple as adding it into your pom.xml. Check out the install instructions on their website for you IDE etc. You also need it in your pom.xml.


There is some controversy around Lombok. There is a good post on stackoverflow that covers some of these things in a reasonable fashion.

Apache Commons

Last but certainly not least, we have apache commons. This is a collection of libraries rather than a single one. You know all those bits of code you write over and over. Chances are that there is something in here that does it better and in a simpler way.

Daily Meditation | Let’s Meditate with Playne

I am involved in the beta testing for playne, a meditation game. While I had meditated many many times in my life, I had never done it consistently. That is, until Playne.

I got curious about doing it as a series, and here it is

This episodes talks about getting started with Playne

#01 – Getting Started


Let’s get started with Playne

#02 – Settling in


Settling into meditating daily

#03 – Time for meditation


Making time for meditation is important

#04 – Layers of the mind


The mind is like an onion – so many layers and it makes you cry.

#05 – Level 2


We get to level 2

#06 – Positive Changes


Have you started seeing positive changes?

#07 – One Week in


That’s one week of meditating daily. How do you feel?

#08 – Stick with it


There are definitely benefits to sticking to meditating daily

#09 –

Unfolding the Story | Let’s Play Epistory

The other day I stumbled across Origin All Access and saw that it had a bunch of games I wanted to play. One of these was Epistory, which had been in my wishlist for a long time. When trying the game out, I fell in love with it. It is absolutely a treat, so I decided to go through it as part of a let’s play.

#01 – Signal Fires


A meteor falls from the sky, and everything changes.

#02 – Forgotten Forest


We find a dark forest, forgotten and resistant.

#03 – Cold Shoulder


We witness another calamity, which once again changes everything.

#04 – Drowning Halls


Ice and water in these halls. Do we learn another language?

#05 – Spark


We stumble across Chapter 3 and another language

#06 – Creation City


Explore the rest of Creation City

#07 – Ice Mausoleum


We come across the Ice Mausoleum while exploring and delve into it.

#08 – Winds of Change


We run across Chapter 4 while exploring.

#09 – Shattered Isles


We go into the shattered isles and discover the fourth language.

Remembering Mars Beta 1 | Let’s Play Memories of Mars

“100 years in the future, something happened on Mars. Once frequently visited, it is now abandoned with some left behind. Explore and Survive the Red Planet.”

~ Memories of Mars

When I saw the game description on steam, I was intrigued. When they were giving out Beta keys, I volunteered and got myself a key. Following are videos put together from maybe around 10 hours of gameplay. Hope you enjoy

#01 – Exploring Mars


Random wanderings, musings and exploration of Mars.

#02 – Building a base


This is mainly the highlights of me figuring out and building a base on Mars 🙂

#03 – Beta 1 Highlights


Highlights from around 6 hours of gameplay over the Beta 1 Weekend.

Space Engineers Guides

#01 – Rdav’s AI Autominer Script

I had been pondering automated mining in Space Engineers for a long time and I need ponder no longer. I stumbled across this script one fine morning and have implemented it more than once. I absolutely love this script. This video covers how to set it up and various things to consider for maximum mining efficiency.

ZFS Deleting files doesn’t free up space

So I have a proxmox server on which I run a few VM’s and the other day it completely ran out of space. This was because of overprovisioning through thin volumes.

After much head scratching and metaphorically banging my head against a wall, here are the things I learnt.

Empty Trash

Local Trash

Make sure that have emptied the trash on the VM’s .Ubuntu has this issue and so might other distributions

Network Trash

If you have SAMBA enabled on your VM’s make sure that the Recycle Bin is not enabled. I have openmediavault running on a VM and I had to go through and disable the Recycling Bin. Make sure that the Recycle bin is emptied. They are hidden folders in the root of your shares.

Correct Driver & Settings

  • When setting up the hard drive for your VM, make sure you use virtio-scsi (or just scsi on the web interface).
    • If you disk is already set up using IDE or VirtIO,
      • Delete it. Don’t worry, it’s only deleting the link. The disk itself will show up in the interface afterwards
      • Double click on the unattached disk and select SCSI and Discard
      • You might have to fix the references to the drive in the OS
  • On the Device Screen, make sure discard is selected.


Configure the OS to send TRIM commands to the drive


On Mount

You can pass the parameter discard to any mountpoint and the correct TRIM commands will be sent to the disk. HOWEVER, this is apparently a big performance hit.

To do the actual trim, run

$ fstrim /

OR to run fstrim on all supported drives

$ fstrim -a

Digital Ocean has a detailed post about setting TRIM and setting up a schedule etc.


My deepest apologies! Also, I don’t run Windows on any of my VM’s so I have no experience with it.