• 0 Posts
  • 5 Comments
Joined 9 months ago
cake
Cake day: December 26th, 2023

help-circle
  • The actual difference between a working new mouse and a failing double click mouse is in the button itself (mechanical parts are almost always the problem).

    However, it is not some exotic failure mode. All mechanical switches have a “bounce”, where the contact makes and breaks a few times before settling into the connected position. Switches are typically designed to make the actual contact spring loaded (which is the origin of the click sound you here). As they age, this mechanism degrades, making the bouncing problem worse.

    However, this is a well understood problem that any electrical engineer should be familiar with. One solution is to install a filter capacitor. Now it takes longer to switch between the on and off state, so the inherent bounce in the switch is smoothed out to the point where you cannot detect it.

    They probably did testing with a new switch, and decided that they didn’t need to include any explicit debounce component, ignoring the fact that the switch would degrade over its lifetime.





  • Java did have a Security Manager that can be used to prevent this sort of thing. The original thinking was that the Java runtime would essentially be an OS, and you could have different applets running within the runtime. This required a permission system where you could confine the permissions of parts of a Java program without confining the entire thing; which led to the Java security manager.

    Having said that, the Java Security Manager, while an interesting idea, has never been good. The only place it has ever seen significant use was in webapps, where it earned Java the reputation for being insecure. Nowadays, Java webapps are ancient history due to the success of Javascript.

    The security manager was depreciated in Java 17, and I believe removed entirely in Java 21.