Interestingly enough, in his code snippets he is using JavaScript, whereas one of my personal guiding principles is thou shalt not suffer an error to go undetected, which means that no scripting language should be used under any circumstances, for anything at all, by anyone, anywhere, ever. But I digress. Excellent presentation.
![[media/bathyscaphe-logo.svg]]
Abstract
This article introduces Bathyscaphe, an open-source java library that you can use to assert that your objects are immutable and/or thread-safe.
The problem
Programmers all over the world are embracing immutability more and more; however, mutation is still a thing, and in all likelihood will continue being a thing for as long as there will be programmers. In a world where both mutable and immutable objects exist side by side, there is often a need to ascertain that an object is of the immutable variety before proceeding to use it for certain purposes. For example, when an object is used as a key in a hash map, it better be immutable, or else the hash code of the key may change, causing the map to severely malfunction.
Furthermore, when an object is not immutable, there is often the need to ascertain that it is at least thread-safe before sharing it between threads, otherwise there will be race conditions, with catastrophic results.
Note that when any of the above goes wrong, it tends to be a bug which is very difficult to troubleshoot.
Read more »Quite often, when I rename a maven module, IntellijIdea gets confused and keeps showing the old module name in the project view.
- Re-importing maven projects does not help.
- Clearing the IntellijIdea caches and restarting does not help.
- Even deleting the .idea directory does not help.
I discovered that this is happening because:
- IntellijIdea keeps information about a project outside of the .idea directory
- IntellijIdea fails to delete that information when you invalidate caches and restart.
The solution I have found to this problem is:
Read more »
Some time ago and for about a year I used a Mac, which had natural scrolling by default. I decided to resist the urge to immediately configure it to work like Windows, and instead I made it a point to give natural scrolling a try for at least a while before making up my mind as to whether to keep it or lose it. While giving it a try, I was surprised to see that it was very easy for me to adjust to it, despite the fact that I have been using the unnatural Windows scrolling mode for nearly 30 years. (Ever since the mouse wheel became a thing.) I found that natural scrolling was indeed… natural. So, I kept using it, and I became addicted to it. Ever since then, I always have to configure natural scrolling on any Windows machine that I get my hands on before I can start using that machine.
Windows is so poor that it does not offer any user interface through which a novice user can change the mouse wheel scrolling mode. To do that you have to edit the registry, and the setting you are going to be modifying is a machine setting, so you will be affecting the mouse wheel mode for all users, not just for yourself. This is unbelievably lame, but hey, that’s Windows, we are totally used to lame.
Read more »
One of our customers tried installing our Windows Application on one of their computers and their antivirus software complained. They in turn complained to us, so we had to find a solution. I am documenting the solution here.
Read more »
The Dutch rank #1 in the world1 in English-as-a-foreign language proficiency; however, there are certain mistakes that they are somewhat prone to make in their use of English, due to interference from peculiarities of the Dutch language. When this happens, it is known as Dutchlish.
Here is a collection of examples of Dutchlish that I have collected over the course of several years of living in The Netherlands.
Read more »