Easy fix for most mouse-button problems

A new computer mouse will usually function just fine, but over time, it will usually start having some problems with the buttons. One common problem is for it to keep releasing prematurely as if you let go of the button even though you didn't, you may have simply decreased the pressure on it. Another problem is for clicks to not register at all. Assuming there is no physical damage (e.g., dropping the mouse on a hard surface), both of these problems are usually caused by the same thing, a layer of patina growing on the metal contacts inside the switch under the button. This is normal; oxides regularly accumulate on metals which make them less conductive. This is usually fixed by simply cleaning the metal. Unfortunately, the micro-switches used in computer-mice are too small and to inaccessible to open and clean. Fortunately there's a pretty easy solution with just a bit of vinegar:

  1. Disconnected the mouse and/or remove the batteries
  2. Open the mouse (there are typically only a couple of screws)
  3. Locate the micro-switches; they'll usually look like the Omron switches below
  4. Dip a cotton-swab (Q-tip) into white-vinegar
  5. Dab the switch several times to wet it
  6. Press the switch a bunch of times to allow the vinegar to soak in and coat the metal
  7. (You can leave a blob of vinegar on the switch for a couple of minutes)
  8. Use a paper towel to soak up excess vinegar and dry button
  9. Repeat with some water (distilled if possible) to remove the vinegar
  10. You can dry it more thoroughly by blowing hard on it to eject any remaining liquid
  11. Close it

The patina should be removed and the metal contacts should be properly conductive and last a few more years before giving problems again.

Important: Make sure to not leave the vinegar or water on for too long. Otherwise, they will corrode the metal and make the copper grow a green patina which, while pretty, makes things worse, requiring you to open the switch and try to clean it directly which has a good chance of totally ruining the switch and requiring you to completely replace the whole switch (which depending on the mouse—like some very expensive gaming mice—might be worth the effort of putting in a fresh new switch).

Omron micro-switch
Typical mouse-button Omron micro-switch

Fix Linux MotD Weather

This past summer, I updated the MotD of my Orange Pi to include the current weather whenever I log in. It worked great… until recently. For the past week or so, I noticed it wasn’t showing the weather when I logged in.

It turned out to be a simple error and easy fix. The command works by downloading the current weather from the Internet, then using SED to scrape the current temperature and status from the resulting page using a regex.

The problem is that it does not account for negative temperatures, which is what the temperatures are now in the winter (at least in Celsius), so when the temperature is below zero, it does not find the information because the pattern does not match. The fix is simply adding an optional negative sign (-\?) to the regex (optional in the regex sense; it's required to make this work correctly):

root:/> more /etc/update-motd.d/32-weather
#!/bin/bash
curl -s "http://rss.accuweather.com/rss/liveweather_rss.asp?metric=1&locCode=NAM|CA|ON|LONDON|" |\
sed -n '/Currently:/ s/.*: \(.*\): \(-\?[0-9]*\)\([CF]\).*/\2°\3, \1/p'

“The Navigator” in The White Chamber

The game The White Chamber is pretty amusing, but the anime style doesn’t really mesh with its horror-survival theme. That said, it’s still a pretty solid (free) game with a decent story. It’s not too long and you can play through it to get the eight different endings in just an hour or two. One thing to look out for is the alphanumeric codes. Half of the endings display a three-letter code at the top of the screen which when taken together spell out a message, which oddly enough, there do not seem to be any references of on the Internet; apparently nobody has noticed it. 😕

EndingCode
Space
Electrocution
Venemous [sic]
Decaying
RedemptionROT
DamnedAGI
TormentedVAN
ComedyEHT

If you read the codes from right to left, it reads “THE NAVIGATOR”. Ostensibly, this refers to the protagonist Sarah (or maybe the Artefact 🤔).

Wolf4knowledge has a video with all of the endings:



ROT AGI VAN EHT
“THE NAVIGATOR”

Wasting Tax-Dollars on Intersection Buttons

At most intersections, you can usually find a pair of buttons for pedestrians to push to tell the traffic-control system that they are there and want to cross. There are usually separate buttons for each direction (one for crossing north-south and another for crossing east-west). This results in up to eight buttons at each intersection. However, this is wasteful over-engineering. In fact, with proper software design, only a single button is ever necessary at each corner of a standard 4-way intersection. Can you figure out the logic to prove this?

Show solution… ▼

Intersection button design options
Intersections can have either one or two crossing buttons at each corner

The return trip feels shorter because of freedom, not familiarity


That explanation that psychologists came up with back in the 1950’s is incredibly specious because it's not the same on the return trip because everything is backwards. The roads are different (and might require a different route due to one-way streets), and all of the sights are different because you are seeing everything from the other side. It is a completely different experience. Also, unless this is the first time you've been to that location, then the novel-there-familiar-back explanation makes no sense.

A better explanation is that the trip there is likely under a deadline while the return trip is more free. The pressure of trying to stick to a schedule puts added stress on the brain and makes time feel lengthened like most stressful or unpleasant situations have a tendency to do. The freedom of making it back at your own pace (melting ice-cream notwithstanding), relieves you of that burden and so the trip feels shorter.

Cool, and easy runnings

When I was in 5th or 6th grade, I learned how to correctly run. We were in gym class and had to do laps around the entire playground, and I noticed that we were all being easily lapped by Ninar Kabuti (Neenar Kabutee?). It may be a cliché, but it should probably not come as a surprise that an African kid (he was quite stereotypical; dark-skinned, tall, skinny, etc.) would be more athletic than the rest of us. I watched him running from the other side of the playground (before he made it around and lapped us again), and noticed that he ran differently from the rest of us. Instead of rapidly pounding the ground with his feet like were were, he was practically bouncing like on springs. He was bounding across the playground like a gazelle with long strides. Ever since then, whenever I have to run, I take long, bouncing strides because it covers a longer distance with less energy, and it works for long-distance running, but also helps with short sprints.

More Rubik’s cube challenges

If you have already learned how to solve a Rubik’s cube, then you may start getting bored with it. That’s when you can start coming up with new ways to make it a challenge. Here are a few suggestions:

  • Solve it with only your dominant hand
  • Solve it with only your non-dominant hand
  • Solve it blind-folded
  • Solve it from a different face than you are used to (e.g., instead of starting with white, start with a different color)
  • Solve it to a different state (e.g., solve it to the checkerboard pattern)
  • Try to fully scramble the cube (i.e., such that no face has two adjacent squares with the same color)

Fully scrambling a cube is surprisingly difficult. I managed to do it after a minute or two when I first thought of it, but then doing it again took a long time. It is however possible and I’ve recorded my last three scrambles (I didn’t note down the first one). It is possible with a 2x2x2 as well as a 3x3x3. I don’t know if it possible with higher-order cubes. As a tangentially-related challenge, see if you can mathematically prove or disprove the possibility of fully-scrambling higher-order cubes.

Geometric net of a fully-scrambled Rubik’s cube

Geometric net of a fully-scrambled Rubik’s cube

Geometric net of a fully-scrambled Rubik’s cube

Geometric net of a fully-scrambled Rubik’s cube

Corporate Anti-P2P Legal Catch-22

Some corporations attempt to enforce their copyrights by monitoring and interfering with P2P copies of their media. This is most common with movies and TV shows, especially new and popular ones.

There are two primary ways that they try to disrupt and inhibit copying, and usually will outsource the effort to third-parties instead of doing it themselves.

  • They usually monitor P2P traffic of files related to their copyrights. They use modified/hacked P2P clients to join and participate in the traffic, posing as sources for the file(s). Then when someone connects to them in an attempt to download part of the file, they log the person’s IP address and send an abuse letter to the ISP associated with the IP along with the time and filename. Sometimes they also merely spy on (“lurk”) and copy the peer list without posing as sources, though they prefer to trick people into actually connecting so that they can “prove” an attempt was made to obtain the file.
  • They sometimes also try to sabotage the downloads by again, posing as sources for the file(s), but uploading junk data so that the people trying to download the files don’t get the file (at least not as fast) and waste their bandwidth.

Some of these are obvious like when a swarm has thousands of seeds within seconds of being released or when a bunch of episodes are released at the same time and/or before they have aired. Sometimes however it is not so obvious and they will commit much fewer resources to sabotaging and logging the file, especially for older, less popular media.

What they don’t seem to realize is that there is a serious problem with their attempts to prevent users from downloading the files, and their efforts to legally enforce copyright on them is specious.

There are two main issues with their anti-P2P efforts:

  • If the anti-P2P computers provide users with junk data, then they cannot say that the user has downloaded a bootleg copy of the media, they downloaded junk which is not illegal. The only connection the junk data has with the copyrighted material is the filename which again is not illegal, otherwise every website that mentions the materials name would be illegal.
  • If the anti-P2P computers actually provide real parts of the file, then there’s a few problems:
    • The data that the user obtained is not actually copyrighted material, it is simply a block of essentially meaningless data. It only takes on any meaning when combined with a lot of other blocks of meaningless data. This can be true of many things. For example, while an entire book could be copyrighted, the individual words (or even more to the point, the letters) are not copyrighted. Therefore you cannot prosecute someone for receiving a bunch of random words from people even if you just happen to assemble them in an order that turns them into a story.
    • If the anti-P2P computer is providing real data that can be combined to make a real file, then they have to have gotten it themselves. While they may have been granted rights to the media, it is unlikely that they are allowed to obtain and distribute illegal copies of the media.
    • By distributing illegal copies of the media, the anti-P2P is either performing an illegal act, or else it is legitimizing the distribution of the file, and converting it from illegal to legal. Moreover, by participating in P2P, they cannot make the argument that they are entitled to the distribution rights of the file, including “ripped” copies while everybody else is not, because P2P is not distributed from a single, central point.

Therefore, anyone who gets an abuse letter from a company alleging that they were “caught” downloading copyrighted materials can refute it. They can demand the proof that they were engaging in the bootlegging which will likely come in the form of a “log” that shows their IP address, a filename, and a timestamp. They can then employ the above arguments to demonstrated that either they did not actually have the real file and instead had junk data and/or that they did not engaging in bootlegging at all because the company was actually granting permission to get the file by providing the file to people when they participated in P2P.

The psychology of “bubble porn”

An amusing meme on the Internet is the concept of “bubble porn”, also known as “Mormon porn”. The idea is to take a photo of someone who is scantily clad, but not nude, and mask out the clothing, leaving only bare skin exposed. The result is that the person in the photo now looks to be naked.

This phenomenon is actually a manifestation of Gestalt theory, specifically, the principal of closure, the property of emergence, and the principals of continuity and past experience. In psychology, there are several principals/laws/properties of the Gestalt theory of perception. There is no definitive set of Gestalt principals, and the theory itself is debated, but below are a selection of properties. Some of them are similar while some are overridden by others. In general, they cause things being seen to be perceived as units. Most of these are for visual perception, but proximity also works in time. That is, when two things occur close to each other, they are perceived to be connected, hence the perception of one thing causing another even if it did not.

In the case of bubble-porn, by masking out the clothing, the brain tries to fill in the blanks with what information is available, and since the information available is the surrounding skin, and since we have experience with what bodies look like, the mind perceives the person as being naked under the masks. As if celebrities didn’t already have enough to worry about with fake nude photos (and as of 2017, AI-generated fake videos).

Oval under rectangle and hourglass-shape
That’s not an oval, it’s a stylish hourglass
Broken circle and square
Principle of closure
Black triangles with one red and one black circle
Principle of focus
Triangle and sphere in negative space
Property of reification
Two groups of dots enclosed in boxes
Princple of common region
Joystick in various styles and angles
Property of invariance
Outline of a cat
Property of emergence
Various shapes connected with lines
Principle of connectedness
A Necker cube and Rubin cup
Property of multistability
Various dots moving up or down together
Principle of common fate
Three pares of curly braces
Principle of symmetry
Columns of dots
Principle of proximity
Various lines, two parallel
Principle of parallelism
Twisting snake made of squares
Principle of good Gestalt
Three rows of each grey and black dots
Principle of similarity
Slanted stop-light and house
Principle of past experience
Line with rectangle on top
Principle of continuity
Photo of Miranda Kerr normal and bubble–porn-ized
Miranda Kerr is not naked; you wish!

Nails on a Chalkboard

In the History Channel documentary How the Earth Made Man, they list how various aspects and attributes in human biology and behavior can be explained as remnants of the evolution of humans and the Earth.

One of the qualities they explained was the reason that humans find the sound of nails scraping on a chalkboard to be so grating and causing us to cringe. Unfortunately they got it completely wrong.

Their explanation is that our primate ancestors who lived in trees and avoided predators would use a screeching sound to warn of danger, and so we now find that sound to be disturbing. It sounds like a good explanation but it is specious.

It is true that humans find the sound of nails grating on a chalkboard to be unnerving, but it is not the sound itself that is disturbing, it is the knowledge of what it feels like. To wit, scraping a lenticular with our nails produces a completely different noise, but the same cringe-inducing shudder. It is the physical sensation that repulses us so much.

Next time your hands are slick with oil or soap, scrape your fingernails along the ridges of the fingerprints on your thumb. There is pretty much no noise at all, yet the feeling is just awful. Clearly it is the sensation, that is, the vibration that is so aversive.

Something about the tactile feel of quick, small, sharp, repetitive vibrations is extremely uncomfortable and undesirable to humans, and certain sounds like nails on a chalkboard remind us of that.