What I just sent to my Governor

December 12, 2021 Leave a comment

I have four children, ages 5 – 10. Yesterday they were able to receive their second dose of the Covid-19 vaccine. I realize that the demand to vaccinate school age children may outstrip supply at the moment, the tipping point is likely coming soon. Once every school child who has a parent who is willing to get them vaccinated against Covid-19 has done so, I feel that hospitals should be granted the right to deny or cut short service for the willingly unvaccinated, and all other pandemic measures should end. Should a 0-4 year old catch Covid-19, the hospital resources should focus on them. Besides that, we should not let those who are willfully not making use of the resources available to protect themselves, overwhelm our hospitals.
I suspect that the quickest way to a higher rate of vaccination will be a rude wakeup call for those who have yet to get vaccinated.

Categories: Health and wellness

ESENT Filling the Application Event Log

October 23, 2021 Leave a comment

I recently found that my Windows 10 computer’s Application event log was filled with ESENT 486 and ESENT 413 Error events. The 486 event said:

svchost (5040,R,98) SRUJet: An attempt to move the file “C:\WINDOWS\system32\SRU\SRU.log” to “C:\WINDOWS\system32\SRU\SRU019CA.log” failed with system error 183 (0x000000b7): “Cannot create a file when that file already exists. “.  The move file operation will fail with error -1814 (0xfffff8ea).

This was enough of a clue to proceed with a fix.

In an elevated console I went to C:\WINDOWS\system32\SRU. The interesting thing that I found was that SRU019CA.log was about a month older than SRU019C9.log. So whatever manages the log stream for SRU.dat, must have reset the log stream without clearing all of the old log files. So I stopped the Diagnostic Policy Service, ran esentutl.exe /mh SRUDB.dat, moved the existing SRU019C9.log, and restarted the Diagnostic Policy Service. After doing so the errors in the event log stopped.

We need “I heard” herd immunity

August 2, 2021 2 comments

Something that has been abnormally bothering me lately has been anecdotes of people talking about why they haven’t received any of the Covid-19 vaccines. And pretty much universally they all start with “Well I heard…” and then they espouse some easily falsifiable rumor. Why is it that people will let one piece of information stick in their brain, preventing good information from experts forming their decisions? It’s something I just don’t understand.

As a society we need herd immunity from “I heard”.

Categories: News and politics

First Impressions of “Pride and Prejudice”

January 30, 2021 Leave a comment

I have heard of Jane Austen’s novel Pride and Prejudice my whole life. I have been an avid reader my whole life yet have avoided Pride and Prejudice until just these last few weeks. I’ve had many conversations about Pride and Prejudice, or more specifically since I had never read it, why the woman I was conversing with found it so appealing. I had had enough of these conversations that I could engage in them without ever having actually read the book. Now that I have read it, I am so confused.

The initial response to the inquiry of how a woman feels about Pride and Prejudice is near universally that Elizabeth Bennet is a strong female character who takes charge of the situation. I heard this from multiple conversations, I heard this in “Austenland” and in “You’ve Got Mail”; yet I honestly can’t think of when that happens in the book. There are three times where I believe it can be argued Elizabeth Bennet takes charge: first, when Mr. Collins proposes to her, second, when Mr. Darcy proposes marriage to her the first time, and third, when Lady De Bourgh tries to get her to promise to not marry Mr. Darcy. When Mr. Collins proposes, Elizabeth finds him to be repulsive, so is it really that strong to reject him? When Miss Bennet rejected Mr. Darcy’s first proposal, she was still at the point of taking his many compliments as insults. I also don’t really see it as taking charge when Elizabeth wouldn’t make a promise to an old woman that she didn’t really care for. Elizabeth Bennet never takes charge, she just prevents others from pushing her into situations she doesn’t want.

The second response to how a woman feels about Pride and Prejudice is how Elizabeth Bennet changes Mr. Darcy. I am now more convinced than ever that she doesn’t. Mr. Darcy is the same from beginning to end. He doesn’t change at all. All of the changing in Pride and Prejudice is on Elizabeth Bennet’s part and it primarily entails how to take a compliment from a man who is not an extrovert. If the words introvert and extrovert existed in the vernacular and that time it would have been pretty apparent that Mr. Darcy is an introvert, and that’s all.

Since I do not find either of the primary arguments persuasive my primary conclusion is that the most attractive feature of the book is escaping to a lifestyle where gossip is a valuable currency, and the primary worries in life are when the next ball is being held. Most of the book consists of tracking who said what to whom and when they said it. Whether it’s to show the energy and effort of the Bennet sisters going to Meryton, or how people shifted around at the different dances and socials to converse with each other. Having so much of the daily life of these characters stripped out, to focus on just the gossip, creates an overdose of gossipy intrigue in the reader’s mind. Very attractive to those who find such things attractive.

Another point of appeal might be the language and words used. There is a lot of flowery language to get lost in. Jane Austen uses a lot of words to say very little. She must have made prodigious use of her dictionary when writing Pride and Prejudice, because it contains many English words with which I am unfamiliar with. Not that it’s a bad thing, but most books don’t require such a high bar to understand. It is not hard to imagine when one reads Pride and Prejudice, one feels smarter for being able to keep up with the long sentences. So Pride and Prejudice is an escape fantasy where a woman can overdose in gossip and intrigue, while “experiencing” the life of a woman who ends up married to the most handsome, richest, generous man of all; all the while being rude and indifferent to him and putting minimal effort into the relationship. There are parts of the book where she’s experiencing much angst, but it’s all self-inflicted as she’s trying to talk herself out of Mr. Darcy liking her, despite all of his actions which say otherwise. She just needed to stop seeing Mr. Darcy from her first impression and start seeing him as the socially awkward introvert that he is. That’s it.

Categories: Entertainment

Wamgra DY28 and DY28 Plus Manual

July 20, 2020 Leave a comment

Previously I was not able to find the user manual for the Wamgra Bluetooth speaker. Here are scans of the second user manual I found.

Another Way J.J. Abrams Doesn’t Understand Star Wars

March 4, 2020 Leave a comment

This is something that has sat on my mind for years, but I’m only now committing it to writing. J.J. Abrams doesn’t understand Hyperspace in Star Wars. I’m making that statement based off of a different post I read recently about how J.J. Abrams doesn’t understand Force usage. The basic premise is that in The Force Awakens it’s easy to see all of the Force users doing impossible things with the Force with a very high frequency. In every other Star Wars movie, given how training and concentration are repeatedly mentioned, as well as the sparse use of the Force, it leaves an impression that using the Force is difficult, takes limited energy, or something else that makes its use rare. But The Force Awakens turns Force users into every other super hero/wizard. I have a similar complaint, but one which is with the use of Hyperspace.
I’m writing this after having seen The Force Awakens only once, and that was four years ago (Rise of Skywalker was released a little over two months ago). I can remember that Hyperspace was used incorrectly in two instances, and those are: the Millennium Falcon going into Hyperspace from within the docking bay of another ship, and the Millennium Flacon entering real space inside the atmosphere of the Star Killer base. These uses are absolutely devastating to Star Wars.
The rules for Hyperspace aren’t spelled out in Star Wars, and that’s kind of a good thing. It’s one of the nice thing about Star Wars, not much exposition. We the audience are seeing a sliver of time in our hero’s lives. Just like how we don’t constantly describe how car engines work, it would be odd of someone to spontaneously talk about how Hyperspace works. The one line where Hyperspace limits are mentioned happens in A New Hope where after having blasted out of Mos Eisley, Han Solo explains “Without precise calculations we’d fly right through a star, or bounce to close to a Super Nova”. Other rules aren’t spelled out, but can be implied by characters actions.
Examples of those actions are: You need to get your space ship into space (out of atmosphere). You need to make calculations after making it into space. You need to be far enough away from a gravity well (ie planet) to enter Hyperspace. You exit Hyperspace a certain distance from a gravity well (it’s why there are many shots of space ships approaching a planet in real space). Exiting Hyperspace shows up on scans. If these weren’t important, many of the dramatic scenes in Star Wars wouldn’t exist. The very first scene in all of Star Wars is because the blockade runner that princess Leia was on, had to exit Hyperspace to get around Tatooine. The next scene in space, is our hero’s leaving Tatooine to go to Alderaan, but are being chased by a Star Destroyer until they can enter Hyperspace. In both instances drama ensues. These rules (implied or otherwise) are just plot devices, but so long as they’re consistent across all scenes in all movies, they are acceptable plot devices. The closest scenes in Episodes 1 – 6 which bend these rules are in Episodes 2 and 3 where the Jedi Starfighter docks with Hyperspace rings which are in orbit and immediately enters Hyperspace. But if you think of it as the rings entering Hyperspace, and not the Starfighters, it works.
By removing these limitations on Hyperspace, The Force Awakens invalidates all of the Hyperspace based dramatic moments in the previous movies. It is exciting to see our hero’s blast out of another ship in The Force Awakens (or exit Hyperspace in a forest), but only because somewhere in the back of our heads, our brains are processing how unique/impossible that is. It shouldn’t have happened – which is what makes it exciting – but doing so is a cheap phycological trick. Yes, it makes that one scene exciting, but it undoes everything else.
The way that Hyperspace is used in The Force Awakens not only invalidates many memorable Star Wars scenes, but invalidates all of Star Wars. If you can enter hyperspace from within atmosphere, from within a gravity well, without waiting for calculations from the Navicomputer, and exit deep in a gravity well, and deep in atmosphere; why have space ships at all? You’ve just created infinite range teleporters. And ignoring the fact that a human could pull out of hyperspace at just the right time, by making it even possible to exit hyperspace within an atmosphere, why have a Death Star? The Empire should have just built a bunch of Hyperspace capable missiles, launched them from wherever, and had them explode wherever. No planet (or suspected Rebel base) could possibly have defenses from unforeseeable detonations. At any moment, nuclear bombs could be covering your planet, and there wouldn’t be anything that anyone could have done to stop them.
In summary, no spaceships, no dramatic moments, no Death Star, no Rebellion. Doesn’t sound much like Star Wars does it?
Rise of Skywalker commits similar sins with the Hyper Skipping and having a mysterious route to a mysterious planet that all of a sudden, fleets of ships can get through (which still have visible stars behind them). Those aren’t as bad as sins, because they do have negative consequences or limitations (the Millennium Falcon is on fire afterwards), but still are dumb.
So just like how J.J. Abrams made Force use too easy and simple, he also made Hyperspace too convenient for the plot instead of using it to create plot.
As for The Last Jedi, I don’t feel that it broke Hyperspace rules (implied or otherwise) at all.

Categories: Entertainment

ManualResetEvent ManualResetEventSlim and Thread.Yeild

November 19, 2019 Leave a comment

Is there a difference in the behavior of a Thread when waking from a ManualResetEvent vs a ManualResetEventSlim when Thread.Yeild is involved? Yes, there is a difference in behavior!

The scenario is: If threads are woken up by an event and then call Thread.Yeild, does that Thread.Yeild wait for all of the threads to be woken up? With ManualResetEvent the answer is Yes, and the answer for ManualResetEventSlim the answer is No.

I wrote a little program in C# to test this out and was surprised by the difference in behavior. When using the ManualResetEventSlim, a Thread would wake up, Yield, and reset the slim event, before most of the other threads even woke up. As a result a single thread would be blocked behind the ManualResetEventSlim during multiple calls to Set and Reset. I’m guessing that the difference in behavior is due to the spin waits that ManualResetEventSlim does. The spins will sleep a Thread, and as a result Thread.Yield won’t wait for those threads.

The other thing that I learned in this program is that even though a Thread calls Thread.Start on another Thread, that doesn’t mean that its next call to Thread.Yeild will actually wait for the other Thread to be started.

Here is the program configured to use ManualResetEvent. If you want to see the behavior for ManualResetEventSlim change the type for the e variable, and switch the calls to WaitOne to Wait.

class Program
{
private static int counter = 0;
private static ManualResetEvent e = new ManualResetEvent(false);
static void Main(string[] args)
{
var threads = new Thread[20];
var allLogs = new List<List<Tuple<int,string>>>(21);
for (int i = 0; i < threads.Length; ++i)
{
var t = new Thread(obj =>
{
var logs = new List<Tuple<int, string>>();

int log = Interlocked.Increment(ref counter);
logs.Add(new Tuple<int, string>(log, "Waiting 1"));
e.WaitOne();
Thread.Yield();
e.Reset();

log = Interlocked.Increment(ref counter);
logs.Add(new Tuple<int, string>(log, "Waiting 2"));
e.WaitOne();
Thread.Yield();
e.Reset();

log = Interlocked.Increment(ref counter);
logs.Add(new Tuple<int, string>(log, "Waiting 3"));
e.WaitOne();
Thread.Yield();
e.Reset();

log = Interlocked.Increment(ref counter);
logs.Add(new Tuple<int, string>(log, "Waiting 4"));
e.WaitOne();
log = Interlocked.Increment(ref counter);
logs.Add(new Tuple<int, string>(log, "Done"));

lock (allLogs)
{
allLogs.Add(logs);
}
});
t.Start();
threads[i] = t;
}
try
{
var mainLogs = new List<Tuple<int, string>>();
int mainLog = Interlocked.Increment(ref counter);
mainLogs.Add(new Tuple<int, string>(mainLog, "Main Yeild"));
Thread.Yield();
mainLog = Interlocked.Increment(ref counter);
mainLogs.Add(new Tuple<int, string>(mainLog, "Main Setting 1"));
e.Set();
Thread.Sleep(TimeSpan.FromSeconds(1));
mainLog = Interlocked.Increment(ref counter);
mainLogs.Add(new Tuple<int, string>(mainLog, "Main Setting 2"));
e.Set();
Thread.Sleep(TimeSpan.FromSeconds(1));
mainLog = Interlocked.Increment(ref counter);
mainLogs.Add(new Tuple<int, string>(mainLog, "Main Setting 3"));
e.Set();
Thread.Sleep(TimeSpan.FromSeconds(1));
mainLog = Interlocked.Increment(ref counter);
mainLogs.Add(new Tuple<int, string>(mainLog, "Main Setting 4"));
e.Set();
Thread.Sleep(TimeSpan.FromSeconds(1));
mainLog = Interlocked.Increment(ref counter);
mainLogs.Add(new Tuple<int, string>(mainLog, "Main Setting 5"));
e.Set();

bool allStopped = false;
while (allStopped == false)
{
allStopped = true;
for(int i = 0; i < threads.Length; ++i)
{
if (!(threads[i].ThreadState == ThreadState.Stopped || threads[i].ThreadState == ThreadState.StopRequested))
{
allStopped = false;
mainLog = Interlocked.Increment(ref counter);
mainLogs.Add(new Tuple<int, string>(mainLog, "Main Thread " + i + " is not Stopped"));
e.Set();
Thread.Yield();
break;
}
}
}

lock (allLogs)
{
allLogs.Add(mainLogs);
}

var logTuples = from logCollection in allLogs
from logTuple in logCollection
orderby logTuple.Item1
select logTuple;

foreach(var lt in logTuples)
{
Console.WriteLine($"{lt.Item1}\t{lt.Item2}");
}
}
catch(Exception ex)
{
Console.WriteLine(ex);
}
Console.ReadLine();
}
}

 

The Dangers of the 51 Percent Majority

November 15, 2019 Leave a comment

It is very natural to come up with a system where decisions are made by the majority. There is a vote and the side that gets the most votes wins the decision. Most of the time it works really well. Well enough that there can be little motivation to do otherwise. After all, it wouldn’t make sense to let the minority make decisions. That just isn’t sustainable. On the other hand, if the minority is completely shut out, that leads to problems in the long run. There is a phrase that exists, called the Tyranny of the Majority, and checks and balances have been put in place to counter it in government, but I fear that the ones currently in place are insufficient.

Starting with a non-government example consider the current state of Sears. For a century, Sears dominated the American consumer economy. In the last two decades though, it has completely fallen apart. One major reason is due to decisions made by the current majority stockholder. That right, not holders; holder. It’s a problem that one individual controls 51 percent of the company. Normally one might think that that wouldn’t be a problem, because the majority owner would want the company to succeed. But that is not the case with Sears.

The person who owns 51 percent of the stock, didn’t buy up all of that control of the company to see it succeed, they did it to make sure that it failed in the right way. That individual owns other companies too. Other companies which are profiting off of the corpse of Sears. The individual didn’t need to buy up 100 percent of Sears stock to take control of it, they only needed 51 percent. Then once they were in complete control, with only 51 percent of the votes, they started to sell off Sears real estate to their other companies. They intentionally setup a system where once the individual stores stopped being profitable, they’d sell the land out from under them and close the store. There was nothing that the other 49 percent of the stockholders could do about it.

So not only are the other stockholders effectively being stolen from, but there are many employees whose lives are ruined because of greedy decisions make by someone who shouldn’t have complete control, but does. Is that really healthy for society to operate like that?

For another scenario, imagine a country, state or voting district where one large portion of the population never wins. Imagine two parties, one which gets 51 percent of the vote every time, and one which gets 49 percent of the vote, every time. If voting for representatives, that gives the 51 percent 100 percent of the representatives, over and over again. How long will 49 percent of the population stand for that? What will they do when they’ve had enough? How will they fight back?

Now in reality, I can’t think of a specific example of it being so constantly close like that, and there are lots of places where the winds of fortune change, but for lots of people still it feels like their vote doesn’t matter, because their “side” never wins. It’s hard to feel like an equal member of society when your voice is never heard. When there is never a need for compromise.

It’s important for people to feel like they’re participating in society and that their vote counts. Years ago, I had a conversation with a co-worker who had just immigrated from China. We were discussing how odd it was for him to see people not constantly trying to cheat the system. My response was how to some degree, we all created the system and we don’t want to cheat the thing we created. If there is something wrong, we don’t cheat our way around it, we work to get the wrong thing changed. Bad law, corrupt police, anything. We are a participating member of society.

 

Is there something that can be done to prevent a tyranny of the majority? And a way to help people know that their vote counts? I believe that there is.

I’ve posted before a voting solution which will cure all voting ills. But many of the people that I’ve talked to about it, find it to be too much of a burden on the voter. As a first step I think that we should move to a multi-victor voting district solution. At the Federal level in the United States, this would work by passing a law which states: The entire state is one voting district. The number of seats in the House will be proportioned out to the different parties based off of the number of votes they received. If the state has more than 15 possible seats, then the state shall be divided up into voting districts of equal population with each district containing no less than 8 seats, and no more than 15 seats.

Imagine a state where 50 percent of the people vote Democrat, 40 percent vote Republican and 10 percent vote Libertarian. Given that the Libertarians are never concentrated enough to ever win a seat in the current system, those voters feel that their voice is never heard. The Democrats and Republicans carve up the state to ensure that most seats are safe, and maybe one or two are contested over. But if the whole state was one voting district, with 10 seats, then Democrats would get 5 seats, Republicans 4 and Libertarians 1. Now there is a chance for third parties to form. In addition, more people will feel more motivated to vote, because it could mean the difference between their party receiving 4 or 5 seats. Whether your vote is part of the majority or the minority, your vote is never thrown away.

What about the US Senate? Same thing. But instead of voting for Senators in different elections, a state would vote for both of their Senators in the same election. Should a party get 34 percent of the vote, they win one Senate seat. The party with the most remaining votes gets the 2nd seat. Should a party win 67 percent of the vote, they get both Senate seats. I suspect though, the vast majority of the time, the two seats will be divided between the two parties with the greatest number of votes.

What about a company where 51 percent of the stockholders are not acting in the best interest of the company? Make it illegal for 51 – 99 percent of the stocks in a company to be owned by a single individual. An individual can own 100 percent of the stocks, or a minority of stocks, but not a majority. Yes, I realize that’s against the spirit of “I should be able to do whatever I want with my money”, but I don’t give much weight to that point of view. Peoples livelihoods are involved here. Leadership decisions should be being made with the interest of the organization in mind; not a takeover. In addition, if money is so precious, what about the money of the remaining stockholders. They didn’t purchase the stock for it to become worthless. Or those shareholders may even be employees who don’t want to lose a job for no good reason. A corporation is a powerful force, that’s why Adam Smith wrote about them centuries ago. Corporations need to follow rules for the betterment of society.

Tyranny of the majority is a real thing, and different systems of democracy have checks and balances against them. But the current checks and balances currently in the United States, may not be sufficient. To prevent Civil War, or to encourage greater civil participation, or to prevent pillaging of other peoples assets, we the people need to make some changes for the betterment of all of us.

Captain Marvel is Better than Wonder Woman

April 22, 2019 Leave a comment

The movie Captain Marvel (2019) is better than the movie Wonder Woman (2017). For some reason everyone can’t help but compare the two and when I compare the two, Captain Marvel comes out as the better movie. It’s because the protagonist overcame something in one but not in the other.
This isn’t to say that Wonder Woman isn’t an enjoyable watch, it is; but when watching it you never get the sense that Diana is going to do anything but succeed at everything she tries to do. At the end of the movie they even spell it out: she’s the god killer, the gift given to the Amazons to defeat Ares; she was preordained to succeed. Captain Marvel doesn’t have that sense at all. Vers (the name of Captain Marvel for most of the movie) does fail. She can’t defeat her commanding officer is a joust, she gets captured in an ambush, she can’t hunt down the Skrull’s on her own, the Skrulls can hurt her, etc.
In Wonder Woman you never get the sense that Wonder Woman is ever in danger. Diana throws herself into danger and succeeds stunningly without ever getting scratched over and over. Does she even ever get knocked down? Captain Marvel certainly gets knocked down. The movie has montages of her getting knocked down. The movie is a story of overcoming adversity. Which then makes the montage of her getting back up again, all the more powerful.
I don’t think that Wonder Woman has any character development. Yes, she learns about the larger world, but she doesn’t seem to be any different at the end of the movie than when she was the little girl doing impossible things. Captain Marvel finds her humanity in her movie. She goes from being a space soldier to someone with friends, who ends up betraying all that she knew for doing the right thing. She also overcomes the restrictions that she had been living under. I find it something which can be related to and inspiring, than Wonder Womans’ invincible person who can’t be beat, story.
Wonder Woman’s fish-out-of-water scenes are way better than Captain Marvel’s. They’re funnier, they make more sense, and are overall better. The way it’s played in Captain Marvel feels like the humor is forced and her actions don’t make a lot of sense. While I get that the Kree don’t have a strict Federation like Prime Directive, Vers walking around a planet, that she should know doesn’t know about the outside galaxy, asking for “Star Command” (or whatever it is in the movie) is odd. She barely even tries to go covert, which is odd. She’s a lone soldier, in a foreign land, she shouldn’t be sticking out. Yes, some bumbling about might make for humor, but it didn’t here.
The plot twists (or reveals) in Captain Marvel are better than those in Wonder Woman. In Wonder Woman they’re more on the nose, spelled out, more “shocking”, but what makes them shocking is that they’re oddly inconsistent with the rest of the movie. Particularly the who-Ares-actually-is reveal. While surprising, you then can’t help but think “If he was Ares all along, why did he help get Diana to the place which would stop his final plan? And why then did he show up to confront the one person that could kill him? And why does he tell that person that she’s the one that can kill him?” You went from a sneaky villain to a bumbling one. The Skrulls-are-oppressed twist takes longer to play out, isn’t so black and white, you kind of don’t buy it and are waiting for a double twist to happen, which then never comes.
Captain Marvel wins out as the better movie. I found the characters arc’s better, the story was better, the music was more thematically consistent, it was just better. Both movies are enjoyable to watch but one has a sense of danger where the other one did not; and one has a protagonist who learns how to stand back up, while the other doesn’t know what it’s like to be knocked down.

Categories: Entertainment

Best Possible Opening Scene for Black Panther

September 6, 2016 Leave a comment

I know that it’s still more than two years until Marvel releases their first Black Panther movie, but I already have in my mind what the best possible opening scene would be. It should mimic the opening scene of Captain America: The Winter Soldier. Opening scene should be sunrise in Wakanda with Sam Wilson running. A faster runner passes him on his left and you hear Steve Rogers say “On your left.” Next shot, Sam Wilson is running a long and a faster runner passes him on his left and you hear Black Panther say “On your left.” I think it would be funny.

Now its possible that Doctor Strange, Guardians of the Galaxy 2, or Thor Ragnarok are going to move Steve Rogers and Sam Wilson from Wakanda, but I doubt it. Captain America: Civil War left them in Wakanda, so it would make sense to see them in the Black Panther movie. Probably not has vital characters, but as cameos. Have them in an earlier scene, explain that they’re off going to be doing something else (rendezvous with Sharon Carter perhaps), and have it be that. I’ll be rather bummed if they don’t make an appearance at all.

Categories: Entertainment