Friday, July 02, 2021

Fun With Boat Electronics

The lightning strike was close by. We could see that it had hit one of the boats just down the dock from ours. Phew. It wasn't a direct hit we said from the dry comfort of a nearby restaurant.

But things happened.

In the days after the strike, several electronic systems on the boat were not working properly. Autopilot was out and the sound system was sketchy, Wind instruments worked intermittently. VHF radio worked, but could not read the GPS signal. The helm digital displays (IS40) worked intermittently.

Although pretty competent with computers and networks generally, I had never done any work with a boat network. Work was busy, so we had the boat dealer's mechanic take a look at it.  His conclusion was that there was a problem with the chart plotter. We weren't really interested in buying a new chart plotter, but if that was the problem... 

On the word of the mechanic, we were able to get a partial refund under warranty from Simrad. We even upgraded to the next size chart plotter. All was well. Except it wasn't. Nothing worked still.

We had two other techs look at it, they both did not have a solution (although they might have replaced a wind instrument somewhere along the line). Still no dice.

Finally, we had a Simrad factory authorized tech come and look at it. His conclusion was grim. He couldn't isolate any problems in the system. His advice was to scrap the entire system replace all the network wiring and all devices. He estimated the damage at about $25k. Insurance would not cover it.

Mumbling under my breath that "If you want something done right..." I started reading up on NMEA2k.

It is just supposed to work, easy plug and play, well that wasn't happening.

There were resistance specifications, terminating resistors, and all kinds of other details that could be the problem. I bought a multimeter and a Simrad terminating resistor and went to the boat armed with an iPad so I could look up specs and pin orders on the plugs, and a telephone to call Simrad tech support.

The following events took place over a few months as I called, ordered parts and equipment, went out to the boat for a few hours to try things, and processed results in my head.

Checked all the physical characteristics - everything checked out. The system votagess and resistances were within specs.

Upgraded software. Had to go on a computer downloaded upgraded firmware from simrad, get a card reader so I could transfer it to the NSS 9 chart plotter. This was mostly pretty straightforward once I had the equipment and knew what to do, but I could not get the VHF radio (RS40) to upgrade. Eventually, they suggested I send it in and they would test it and either send it back or replace it. They replaced it and I got it installed eventually. I had to realize that the panel was removable, and and and. I was a total beginner at this.

I tried to figure out the network topology (wiring diagram). Forward was pretty simple, but working back, there was a mini-bus or something that I couldn't find.  I still haven't figured out where one of my network connections comes from. It turns out it didn't really matter because I just went to the next step.

Isolate potential issues. Methodically disconnect, turn the system on, see the response, reconnect, see system response, turn off the system, disconnect something else, turn on the system, check response, etc.

I started forward, disconnecting the Depth and Speed instrument and wind meter. Nothing changed. I left them unplugged and disconnected the Fusion sound module and the radio, nothing changed.

Apparently, the problem was in the back then. I replugged in the forward instruments and worked methodically backward, instrument by instrument, until boom. Suddenly the IS40 displays were working again. It turns out there was a problem with the rudder control and also the autopilot.

We replaced those devices (having already replaced the VHF), and suddenly everything was fine. The entire system worked, the radio was getting a GPS signal, the wind instruments were reading on the displays. The network was working as it was supposed to. It has been working for three years since without a hiccup.

Insights and Lessons Learned

  1. There is a part of the country that is anti-science and anti-expert. I am not in that group. Generally, I believe experts. The challenge can be in actually finding one and also finding one whose interests are aligned with yours. The first few people who looked at the system were really just generalists. When we got the actual trained expert in, he was either too lazy or busy to dig, or else was motivated to sell me a new system. I am fortunate enough to know something about electricity, computers, and networks, so I was able to use my google fu skills and learn that they were not giving optimal advice for me.
  2. NMEA 2K marine network standard is pretty good when it works. One issue is that the standard was created, they gave a lot of leeway to equipment manufacturers to customize hardware and software to lock consumers into their equipment (the razor blade business model).
  3. I spent about two days troubleshooting, fixing, learning, and researching the problem. The total cost was about $1000. I also learned a lot about the boat's electronic systems. I consider this a bargain compared to dropping $25k to replace the entire system.

Saturday, October 03, 2020

Tucker Claims Victim Blaming, Because Of Course

Tucker Carlson demonstrates once again that he is a hack. He is first, claiming that Democrats are saying Trump deserved to catch COVID, which may be true in some cases, but in a very limited way. Then he says this is like blaming a woman who dresses provocatively for being raped.

Victim blaming is a difficult subject because two things can be true at the same time. The woman dressed provocatively, walking in a bad neighborhood is being foolish or naive at best. At the same time, many other people walk in that neighborhood all the time, there are laws that punish people who assault others, and there are police patrolling the street. 

A presumption of safety is naive, but our human and societal values say that she SHOULD be safe to walk in that neighborhood.

Now look at COVID. We have been warned for months of the imprudence of not distancing and using a mask. We would like to be able to assume that we can do otherwise, but COVID is not human. It doesn't follow human laws. NOr can it be punished when it assaults a human. A presumption of safety from COVID without taking measures is idiocy, So is Trump a victim? Sure. He's sick. That sucks. 

Are people who blame Trump for catching COVID victim blaming? Sure.

Is his circumstance the same as the provocatively dressed woman? No. A presumption of safety in human society is naive, but not unreasonable, whereas Trump's assumption of safety is totally unreasonable. COVID acts under natural laws, not human ones.

Finally, there is the irony and comeuppance angle, like when a bully gets what's coming in a movie. If you are purposely placing yourself in the proximity of others it is statistical assault--assault and battery if you know you have it already. He has downplayed the virus calling it a democratic hoax, ridiculing people who wear masks, and encouraging his followers to go to his packed rallies undistanced and unmasked. His actions are almost perfectly consistent with a person who is apparently doing everything he can to make people sick. The one exception was his fake ban on flights from China. It was actually a ban on Chinese people flying in from China, and 40,000 people got into the US under that travel ban.

Is it poetic justice that the man who is responsible for 38% of the disinformation in this nation and who encourages people to take actions that may kill them has gotten the bug? Of course it is.

Donald Trump is Jim Jones.

Trump's rallies are Jonestowns.

The air that Trump's supporters are breathing is statistical Kool-Aid. 

250k excess deaths later and counting, Trump is not a good person by any measure.


Here's a few good takes from Twitter.


Friday, October 02, 2020

Trump is NOT a Good Person

The FBI, CIA, NSA, the special counsel, and the Republican-controlled senate have all stated that Russia meddled in our elections in 2016 to benefit Trump.

They all agree that the Russians are at it again.


On top of it, the intelligence community is unanimous that white supremacist terror groups pose a clear danger.


So logically, supporters of the president have re-evaluated their position and decided to vote American.


Uh uh.


Instead, the president is focusing on a group of African Americans with a clear grievance. Who held protests after a horrific murder as being enemies of the state and planning a coup.


This is the same president who tried to sow fear about caravans of brown people invading our nation. He claimed it was such a dire threat that he called out the military. Of course, there was no threat, but you believed him.


If you believed the invasion was real, and you believe that BLM is a dangerous insurrection movement, you are choosing to believe the single man, who surrounded himself by convicted criminals, who has demonstrably lied (lied, not differences of opinion) over 20,000 times in office, who uses those lies to drive wedges and hate between different interests in the country, whose handling of COVID has clearly been the worst in the world (most of his actions have made sense only in the context of someone trying to kill Americans), yet who passes the blame to everyone else, is cozying up to completely unfounded conspiracy theories, whose campaign has provably worked with an enemy of our nation to help him get elected, who has practiced breathtaking nepotism and allows his son in law, a security risk, top secret access, who dozens of people have testified under oath of his misdeeds, while he and his family avoid sworn testimony, who retaliates against people who give sworn testimony that he doesn’t like, pardoned convicted war criminals, and people who LIED UNDER OATH TO PROTECT HIM, and he’s crippling the post office going into an election during a pandemic (for purposes of interfering with an election). Hatch act, emoluments, 200,000 people, birtherism, racial divisiveness. He is continuing to try to knock down insurance for people with pre-existing conditions IN THE MIDDLE OF A PANDEMIC, while claiming that his non-existent healthcare plan will fix it. On top of that, Donald trump is an international laughingstock who has supported our enemies and betrayed our allies.


On top of that, he calls veterans losers and suckers while refusing to challenge Russia on bounties to kill soldiers. He is “Individual 1” in numerous lawsuits. The only reason he is not being prosecuted is his job and a bad justice department policy.


These are all proven and happening in plain sight.


Now there are reports of atrocities, crimes against humanity, occurring under his administration in concentration camps in the name of the United States.


Trump has broken the government and done everything in his considerable power to reduce our faith in government and the press. His alternatives are OAN and QAnon. This is literally the plot of 1984.


Of course, if you want to vote for Trump, that’s your right. Perhaps you are aware of all of the above but like his style or positions on other matters. That’s cool. We disagree, but you are informed and your value system has different weights than mine. You most likely think I have “drunk the deep state/fake news  Kool-aid.”


OTOH, if you are refusing to believe the above, you are either choosing to be ignorant, you have been duped by a con man, or you are rationalizing--voting for trump with a stated reason like “take down the deep state” or “child abduction by Hollywood, Joe Biden, and the Democrats,” or “because BLM is going to take down our nation and he is the law and order president.” You should look hard at your values and beliefs. You’re believing something that goes against all evidence, and is based on lies and speculation. It doesn’t mean you’re stupid, it means you have an emotional or intellectual bias that is controlling you and exerting itself as confirmation bias or possibly cognitive dissonance.


I know it’s possible that I am the one being hoodwinked here. That there may be a giant left-wing Hollywood Demoncrat Clinton obummer pedophile conspiracy that includes BLM taking over all three branches of the government and the armed forces.  I’m pretty sure I’m not, and if you look at yourself, you probably don’t believe it either. If you can’t vote for Biden for some reason, fine. Don’t vote then.


Donald Trump is not a good person. He is a master manipulator with the full force of the US Government behind him, with no shame or regard for our national political traditions to restrain him. History will look at this election as our finest or our darkest hour. Choose America over fear.




One last word on moderation. Do NOT respond with that exhaustive list of trumps “accomplishments.” I have examined those lists. They’re full of Obama accomplishment that carried over and things that look good (TAX CUTS) that were both self-serving and had a significant downside (bass-ackwardly increase deficit during a recovery). 


This post is not about Biden. Not interested in “Democrats started it.” I will determine whether comments are ones I want on my wall. If you are respectful, avoid name-calling and stick to actual facts, I’m pretty lenient. If you want to post an opinion or “fact” that is not part of the mainstream view, please link to the source. Saying liberals believe, or conservatives believe is an auto-delete. You are not a mind reader, and I will not support your delusion. Unless a response is inflammatory, name-calling, over-generalizing, or attacking, I will generally ask for clarification.

Adding Fuel to the Fire

I have alienated most of my right-leaning friends, now I’ll work on the other side.

I’m a bipartisan kind of guy. 


Let’s talk climate change, specifically wildfire.


We all agree that for wildfires to burn hot, spread, and be destructive you need to have fuel as well as generally warm and dry conditions. This is why there are seldom wildfires in the desert. Although conditions are hot and dry, there is little fuel, because it is hot and dry. The fuel needed for a wildfire never reaches a critical mass.


So let’s look at the recent fires in California. People make a case that they are driven by climate change/global warming. I believe there is some truth in that. The August lightning storms that came through California were unusual. I have never seen that kind of weather in summer in California. Of course, if you attribute a weather event to climate change, it is disingenuous to say that other weather events are only weather—such as unseasonable snowstorms. If you do, you have an unfalsifiable hypothesis, and you are out of the realm of science and into superstition.


But that’s all a digression. Those lightning storms were the match that lit the fuel. If not for the lightning storms, it would have been a cigarette, or a power line, or a gender reveal gone awry, or a hot muffler. The point is that when you have a large fuel load, it will get lit at some point. It is inevitable.


I have read that pre-1800, approximately 5 million acres burned in California every year (https://www.sierraforestlegacy.org/Resources/Conservation/FireForestEcology/FireScienceResearch/FireHistory/FireHistory-Stephens07.pdf 1.8 million hectares (>4 million acres). In 2019, 259,000 acres burned. In 2020, over 4,000,000 acres have burned so far.


So we should stop burning fossil fuels and go all renewable, right? That's what the scientists are telling us. (I know that's a strawman argument, but work with me).


There's a big problem with that. 


Imagine I could wave a magic wand and the whole US is renewable energy. We still have the problem with fuel. The weather patterns do not change overnight. There will be decades of the weather patterns we are seeing today. Even if I 100% agreed that going renewable right now was the thing to do, it doesn't solve the near-term problem. Going renewable does NOTHING in terms of helping to prevent wildfires for a generation or more.


Likewise, if sea level is rising catastrophically, simply stopping our burning of fossil fuels doesn't fix it. They have been rising since 1800 and will keep rising for decades. If we want to protect, we need hardware like dikes and dams to protect our fossil fuel habits will not stop it.


We absolutely must take steps to harden our ability to cope with a changing climate, regardless of the cause. In the case of California, this means prescribed burns or clearing. For Florida, it may mean walls near the ocean and bays. New Orleans needs more pumps and higher walls. These responses will be expensive and uncomfortable for many.


This same principle holds true for flooding, heatwaves, and unusual weather of any type. While I am not convinced that eschewing fossil fuels (especially natural gas) will be particularly beneficial in the long term, I know that transitioning will not help our short term problems at all.



COVID and Co-Morbidities

Several weeks ago the CDC announced some new COVID statistics. They said that of all the 190k or so COVID deaths only 9500 did not ha e co-morbidities. The Trump administration and apologists have jumped on this claiming that COVID is a hoax and that Trump did great, etc.

  1. The first obvious issue has to do with death attribution. Let’s say some dude has a heart attack calls an ambulance and dies after they reach the emergency room. They do their post-Mortem stuff and discover that he also had controlled diabetes. What did he die of? Of course a heart attack. The apologists are effectively claiming it wasn’t the heart attack. Get over it.
  2. "Hospitals are slapping COVID onto as many cases as they can so they can make more money" is another thing I’m still hearing. First, is this actually a thing? Do hospitals get extra for treating COVID? Second, doing so is a crime. It’s called fraud. The poor sucker who writes COVID on the car crams victim death certificate has committed a crime, but it’s one he doesn’t get any benefit from. He doesn’t get paid, the hospital does. What’s in it for him? People who say this one usually say "a friend of my uncle’s co-worker has a daughter who..." are deaths misattributed? Sure. I have seen no evidence that it is widespread or material. And if it is, the culprits should be prosecuted.
  3. Attribution of death can be a dark art. In the case of COVID, some states prevented coroners from recording COVID deaths without a test (which were in short supply anyway). Anecdotally, there were significant cases where people presented with symptoms of COVID, died before a test, and were attributed as pneumonia or something else. We’ll never know about these.
  4. We do have something else though. Total deaths every year shows seasonal fluctuations and tracks very well from year to year. In the US, the deaths beyond what would be expected—the excess deaths have been running about 25% higher than the official COVID deaths. Let’s break it down more though. What are the components of that 250k excess deaths? We know that flu deaths are low. Social distancing and masks have helped with that. Motor vehicle deaths are down. On the flip side, suicides may be higher, domestic violence deaths possibly too. There have probably been extra deaths from people who were unable to get medical care because of COVID related issues. I don’t know where this leaves us, but I’m pretty sure the COVID attribution x 1.25 is probably a reasonable number at this time.

Enough about that nonsense.


Voting for Trump in 2016 does not make YOU a bad person. He is has spent his life presenting a false image. He is very persuasive. He has now demonstrated that your faith in him was misplaced. You should consider changing your position on his competence.


It is difficult to make the case that the Trump administration’s handling of COVID has been anything but disastrous. By denying the virus, the claim is that they were emphasizing the economy. It cratered too. We are left with the worst health record and the worst economic performance in the world. These are not areas we want to lead in. Inconsistent and contradictory messaging has led to chaos and as second pulse of COVID. NO COUNTRY HAS DONE WORSE.


In fact, the only claim that Trump has to helping is the “travel ban” on China early on. Even that was symbolic though. It wasn’t a travel ban on travel from China, it was a ban on Chinese from China. Big difference. 40,000 came into the country from China during the ban.


Trump’s actions have been consistent with infecting as many people as possible as quickly as possible. Not slowing the spread, not delaying widespread infection until we could find better ways to handle the pandemic. He is ACTIVELY worsening the pandemic in America.


I welcome information that shows how Trump has actually helped, but I'm pretty sure it doesn't exist.

Thursday, July 11, 2019

Clash of Clans War Strategy

Some thoughts about war strategy in Clash of Clans

Clan wars pit an equal number of players from two teams against each other over 24 hours. Each player may attack twice--once on two different players.

For an attack, a player may be awarded 0, 1, 2, or 3 stars.
0. When the player neither beats the town hall nor achieves 50% damage.
1. When the attacker either beats the town hall or achieves 50% damage.
2. When the attacker destroys the town hall and achieves over 50% damage, but not total annihilation.
3. Total destruction of the defender.

A team gets points only for the max stars achieved against each defender. So if one player gets two stars and the next attacker gets 1 star on the same player, the team is awarded 2 stars.

For descriptive purposes, when I talk about player 1 it is the most powerful person on a team. Higher numbers are progressively weaker players.

Strategy During War

Given this structure, it is possible for only the top half of the players to attack and still win.

Think of a 10 player (on each side) game. Maximum points a team can get is 30 (10 x 3).
Player 5 on one team can attack 9 and 10 and likely get full stars 6
Player 4 can attack 7 and 8 and likely get full stars 6
Player 3 can attack 5 and 6 and likely get full stars 6
Player 2 can attack 3 and 4 likely get partial stars 5
Player 1 can attack 1 and 2 and likely get partial stars 3
Total 26 stars.

I have seen this done and it works. It has a few flaws though. It requires perfect attacks by each player. There is no room for network lag or an accidental tap. There is no room for error. Also, if the lower players are not just shell players, it's boring for them.

Better then is a phased approach.

1. Bottom five get in their attacks. Best if you can coordinate 10 - 6 in order, but that's difficult.
They should use a similar pattern and not worry about beating better players. So 10 can attack 9 and 10, 9 can attack either of them if 10 doesn't 3-star them and so forth.
2. By the time the bottom half attacks, they should have most of the bottom stars done. Possibly only 6 and 7 will have a star remaining.
3. Then the powerful players step in. In a similar fashion, 5 can clean up the lower players with remaining stars, then 4, etc.
4. With an hour left in the war, the top two or three players can take the actions needed to get the most stars.

I believe this phased approach is the best one for maximizing stars if you can coordinate, which, let's face it, is difficult. This approach also allows for multiple attacks on enemy bases if they are difficult or tricky.

So here are the rules you need.

1. Higher numbers (bottom half) use your attacks in the first 12 hours.
2. Lower numbers try to work together to sequence and maximize stars
3. Everyone use both attacks. If your first attack fails, hit a lower number player. Everyone should be trying to 3-star at least one opponent.
4. If you are a strong player and you need to attack early because real life, do NOT attack somebody that is more than 2x your number. So 3 can attack 5 or 6, but not 7 - 10.


Filling Defense Castles

Let the highest players fill castles. Put powerful defenders in all castles. If the opponent is forced to waste strong attacks on weak players, that's good for us.

I won't comment on the best layout or troop donations, there are tons of resource out there. Here's one on the best troop donations

Wednesday, March 13, 2019

Voting Systems

Ranked Choice (RC) vs Instant Runoff (IRV) vs Approval

RC and IRV are technically different. RC is a way of expressing preference, IRV is a method of tabulating votes from RC ballots.

This is an important distinction.

IRV, which seems pretty good can solve one problem (e.g. Gore v Bush) but introduce others. Technically IRV is nonmonotonic. That is, a shift of public opinion toward a candidate can cause that candidate to lose, and a shift of public opinion away from a candidate can cause that candidate to win.

A different and probably superior method is one called Condorcet. It eliminates most of the IRV issues but introduces a few other, but less likely, issues. IRV is to Condorcet as single elimination is to round robin.

Superior to both of them is Approval voting, in which you select all candidates that would be acceptable to you. It’s simple to tabulate and does not have the issues of either IRV or Condorcet.

There’s a website that has wonderful graphics of how these different systems can work or not depending on the positions of the candidates. http://zesty.ca/voting/sim/

The author of the site is Ka-Ping Yee.

Our election method makes it virtually impossible for third parties to gain a significant foothold. The electoral system is an added complication for presidential races, but the same holds true for state and local races as well as primaries with crowded fields.