2022-03-16

Mouse Wheel Natural Scrolling in Windows

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.


Artwork based on original mouse-15887 by Arkthus from the Noun Project

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.

2022-03-05

Getting AntiVirus software to trust a Windows Application

anti virus
From vecteezy.com (Glass Shield Anti-Virus)

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.

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

What is full-stack development


The predominant web application development model today requires splitting application logic in two parts:
  • The front-end, running on the browser.
  • The back-end, running on the server.
The front-end is typically written in JavaScript, while the back-end is typically written in Java, Scala, C#, or some other programming language. The two ends invariably communicate with each other via REST. The choice of JavaScript and REST is not due to any technical merit inherent in these technologies, (there is none,) but purely due to historical accident; see michael.gr - The Wild, Wild Web.

A web application developer can either focus on one part of the stack, or work on both parts. Due to reasons that will be explained further down, more often than not, web developers are asked to work on both parts simultaneously. When this happens, it is known as full-stack development.

For the purposes of this paper, we will call full-stack development not just this mode of work, but also this architectural style as a whole: full-stack development is when application logic must be written both on the server and on the client.

Full-Stack Development is a paradox, since it suggests a way of work which is contrary to what common sense dictates. Common sense calls for specialists each working on their own area of specialization, so one would expect to see different developers focusing on different layers of the stack, and nobody ever attempting something as preposterous as working on all layers simultaneously. However, there is a technological hurdle which renders this necessary today.

Why is full-stack development necessary today


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.

Photo of two elephants friendly interacting with each other, from The Scientific American: Fact or Fiction?: Elephants Never Forget

2021-10-14

On Stateless Microservices

This post discusses the stateless microservice design pattern; it is meant as support material for other posts of mine that discuss microservices, mainly michael.gr - The Stateful Microservice.


Dory, the yellow-blue fish (a Royal Blue Tang) that suffered from amnesia in the 2003 movie Finding Nemo by Pixar.

Is statelessness a requirement for a microservice?


In another post of mine I discuss what a microservice really is, and I come to the conclusion that despite various attempts out there to define microservices using twenty-item-long lists of characteristics, a good working definition could be as simple as this: 

A microservice is a scalable and resilient module.

Even if you disagree with the terseness of that definition, and you regard microservices as necessarily more than that, I hope you will at least agree that it is precisely scalability and resilience that the stateless microservice design pattern aims to address, so the definition serves its purpose at least in the context of this series of posts.

There are many who will try to convince you that in order to build a scalable and resilient system, you need statelessness; so much so, that microservices have almost come to be regarded as synonymous with statelessness. This post examines whether this is that in fact so, and what is the cost of doing things this way.

So, what is a Microservice, anyway?

This article attempts to shed some light on what a microservice really is; it is meant as support material for other posts of mine that discuss microservices, mainly michael.gr - The Stateful Microservice.


What is a microservice?

If you go looking for information out there, you will find many different descriptions of what a microservice is; these descriptions exhibit considerable difference of opinion, and to the extent that they agree, it is largely the result of copy-paste. One common theme in these descriptions is that in trying to define this elusive concept, they tend to assign fictitious properties to it. Often, the claims have nothing to do with what a microservice technically is, but rather with impertinent concepts such as the allegedly "independent" software development style around microservices, or some alleged organization of microservices "around business capabilities". Even when the claims do manage to stick within the technical realm, they range from the unwarranted to the preposterous. I have seen statements to the effect that a microservice is supposed to live in its very own source code repository, that a microservice must be independently deployable, that microservices must communicate with each other via REST, etc. (My favorite one is that they must necessarily be stateless; more on that in another post of mine; see  michael.gr - On Stateless Microservices.)

2021-10-04

What is wrong with Scala


This is part of a series of posts in which I am documenting what is wrong with certain popular programming languages that I am (more or less) familiar with.  The aim of these posts is to support a future post in which I will be describing what the ideal programming language would look like for me.  

I will be amending and revising these texts over time.