Float vs Double

Recently I took a CUDA course and one of the things they mentioned to keep an out for was the usage of double precision. Double precision operations are slower and the added precision wasn’t worth it, so they say. This made me wonder whether this is also true for regular programming with languages such as C++ and Java. Especially because both of these languages have a double precision as the default floating point number. So how bad is it to use doubles instead of regular float, and what about that precision. I have investigated this in Java.

Continue reading


Wrapping Up 2017

As it has become a habit, the first post of the new year is one where I look back at what 2017 has meant for me and this blog. I also want to look forward of what I expect and hope to do in 2018.


Personally not much has changed, I am still working at the same company where I have contributed to a full re-write of some software. Most of the software was taken from an existing system and we had little control over, which means our contribution was pretty limited and most of it was done by a single guy. As a result, the new software is written poorly in my opinion, and while I have expressed my concern about this many times, nobody has taken any notice of this and no action is taken. Most of the existing software is not any better and a re-write or at least very invasive refactoring is required, but due to a lack of resources and because the importance of this is neglected by management no time is reserved to do this.

The company has tried to evolve, but failed in doing so and still struggles to get everything running smoothly. In the attempt to improve it actually created more confusion and uncertainty. Employees have been shifted around the organisation, much to the dissatisfaction of those employees who now all of  sudden have to do something completely different. Some of them already left, others are about to leave and more are thinking of leaving. It is clear that the company does not think about its employees, but even worse it does not think about its own future in the long term.

In the past year I have been learning a couple of new technologies, such as CUDA and Angular. I did start experimenting with Hadoop, but this is still in the early fase and I have not yet learned that much beyond the basic concepts. I do look forward to getting more hands-on with it.

My blog has been doing okay, even though the visitor count is a bit below that of last year. The beginning for the year started of weak, where the end has been going very strong. I would like to be able to say that it was because of my increased post frequency at the end or because of my posts about Angular. But this isn’t really true as my posts about Angular didn’t get any more viewers than my other posts.

In the next year I will of course keep on going with my blog post. The reason for the blog has not changed, and I still enjoy writing posts about topics. It triggers me to investigate and try something new. It causes me to reflect and investigate something I would normally not have done. I do hope to so a bit more activity and would like to see my minimum monthly visitors rise to 10.

Something I also want in the next year is a new challenge. It is still unclear what exactly that should be, but I want to get rid of the boredom I feel at work at the moment. I definitely want to keep learning new technologies and hot on my list are: Hadoop, Data Mining, Artificial Intelligence and BlockChain. While I won’t be able to do something useful with all of them, just getting some started experience would be great.

Java Interface Default Implementations

An interface is often just an implicit definition as every class defines an Interface. An interface just defines the contract of the class by specifying the methods that can be invoked. Java however also has an explicit interface type which until recently adhered to this idea, but since Java 8 an interface can have a ‘default’ implementation. This idea breaks completely with what an interface is supposed to be and fades the line between an interface and an abstract class. So what is still the point of defining an interface and using default implementations?

Continue reading

Web vs Native Applications

We are looking into replacing some operations tool and we have been questioning whether this should be a web application (as it is now) or a native application. For this I did some investigation and made a clear comparison between the advantages and disadvantages of each solution. The application we have could actually be split up in two parts, one for the operations and a more advanced for diagnostics. This was key in my investigation as both serve a different audience.

My analysis is of course focused on this purpose and on the situation in which this application has to run. This may not be applicable for your situation, but I hope that my explanation and arguments are clear enough so you can filter out which ones are relevant for you.

Continue reading

C++ Unit Testing

In the previous post, I have been examining the C++ build tools that are available. As a good Software Engineer, the next step of course is to choose a testing framework. From my experience with Java, I have a couple of requirements on what the testing framework should allow. Most of these requirements come from using jUnit and Mockito, which I think are both outstanding frameworks that allow you to easily test your code.

For my tests I examine the following libraries: gTest, CppUTest, Boost, CxxTest and FakeIt. Some important features I am looking for is easy testing/mocking, readable tests, and the limitations of the framework.

Continue reading

C++ Build Process

I remember my time at the university, when working on C++ code, all of the command line commands I executed to get the my to compile and link. For the small projects I did back then, that was more than enough. We did get some small introduction into make, but we didn’t go into detail about how it all worked. When we started to work with Java, we had to use Maven, and again we didn’t get any real introduction. In my short career I have discovered the world of Maven and I am now more aware of how it all works, making me proficient enough to do what I need to manage bigger projects.

My love for C++ however never really faded, and I have been looking into doing some more C++ coding again. To get me started I was investigating build process tools for C++, in my search I found a couple of solutions: CMake, Maven and Gradle. The goal I set out for all of these tools, was to get a simple project and some tests for it to build.

Continue reading

Angular: Creating An Automatic Polling Service

When showing information in your UI, you often want to refresh the data when something changes to provided the most accurate information to the user. The most efficient way to do this is by having the server push new data to the WebUI by using Server Sent Events, WebSockets or a similar technique. A lot of APIs however do not offer this, but only support the basic HTTP operations. This means that if you want to refresh the data the only choice you have is to poll the server. This happened to me recently, we wanted to auto-refresh the data on our pages, but our backend application only supports simple GETs. While in the long term we should definitely change this to support sending data from the server, but for now this is what we have. In this blog post I will discuss my solution to doing this.

Continue reading