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.
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, even when an object is mutable, 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.
For decades, Windows has been so poor that it did not offer any user interface through which a novice user can change the mouse wheel scrolling mode. To do that you had to edit the registry, and the setting you had to modify was a machine setting, so you would 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 world in English-as-a-foreign-language proficiency, and they have been ranking #1 consistently every year for many years now, according to yearly reports by the Education First (EF) organization. (Wikipedia.)
I can attest that at least in the Randstad area, (where half the population of the country lives,) almost everyone speaks English, and many do so very fluently.
Nonetheless, there are certain mistakes that the Dutch are somewhat prone to make in English, mostly due to interference from peculiarities of the Dutch language. When this happens, it is called Dutchlish or Dunglish. The phenomenon is acknowledged by the Dutch, who have their own word for it: Steenkolenengels, which literally means coal-English.
Here is a long list of examples of Steenkolenengels that I have compiled over the course of several years of living in The Netherlands.
Read more »