2022-05-23
Bret Victor - Inventing on Principle
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.
2022-05-02
Bathyscaphe
The Bathyscaphe logo, a line drawing of
bathyscaphe Trieste
by Mike Nakis, based on art found at
bertrandpiccard.com
|
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.
2022-04-17
Fixing broken module names in IntellijIdea
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:
- Exit IntellijIdea.
- Go to the application data directory of IntellijIdea (on my Windows machine, this currently is %USERPROFILE%\AppData\Local\JetBrains\IdeaIC2022.1)
- Delete the `external_build_system` subdirectory
- Start IntellijIdea.
- Re-import all maven projects.
Shortly after I discovered this, a new release of IntelliJ IDEA came out, (IdeaIC2021.3) and there appears to be no "external_build_system" subdirectory in its directory. Miraculously, it makes use of the "external_build_system" subdirectory of the IdeaIC2021.1 directory!
2022-03-16
Mouse Wheel Natural Scrolling in Windows
Artwork based on original mouse-15887 by Arkthus from the Noun Project |
2022-03-05
Getting AntiVirus software to trust a Windows Application
2022-03-04
Digital Audio Waveform Generation
For various projects of mine I need to be able to synthesize sound, so I decided to take a quick dabble in the realm of Digital Signal Processing. I mean, how hard could it be, right?
After some fooling around with the Sampled Audio Subsystem of the Java Virtual Machine I was able to hear sinusoidal waveforms of various frequencies from my speakers, and I was starting to think that I am probably almost done, until I tried to play square waveforms. That's when I realized that I had barely scratched the surface. The square waveforms sounded pretty awful at any frequency, and especially at high octaves they sounded like random notes. Triangular waveforms, sawtooth waveforms, really anything except sinusoidal waveforms all suffered from the same problem.
A bit of googling around soon revealed the name of the source of my troubles: aliasing.
A naïvely sampled square wave, exhibiting a bad case of aliasing. Note how some of the peaks and valleys consist of 3 samples, while some consist of only 2 samples. |
2021-12-14
White-Box vs. Black-Box Testing
I have something blasphemous to tell you.
Unit Testing is wrong.
There, I said it.
I know I just insulted most people's sacred cow.
Sorry, not sorry.
I will explain, bear with me.
2021-12-04
What is wrong with Full Stack Development
Inntel Hotel at Amsterdam, Zaandam |
Table of Contents
- What is full-stack development
- Why is full-stack development necessary today
- What is wrong with full-stack development
- Conclusion
2021-10-27
Windows: how to connect/disconnect wi-fi from command-line
(Useful pre-reading: About these papers)
This assumes that you have previously established a wi-fi connection, so windows has created what it calls a "profile".
In short, the commands are:
netsh wlan connect ssid=<ssid> name=<name>
and
netsh wlan disconnect
To obtain ssid and name, use:
netsh wlan show profile
This should display all existing profile names, and by default, the <name> is the same as the <ssid>.
Things can get more complicated if you have multiple wi-fi adapters, or an ssid that differs from the profile name, but the above should cover the general case.
2021-10-15
The Stateful Microservice
I did a quick search for the term and did not find anything concrete, so I thought I might as well publicly document my thoughts.