Parliamentary systems

Reports are Warren’s reassessing her continued candidacy too. Sad to see her leave the race, but I’d love to see her and Sanders form a combined ticket.
It would make the American election process a little more like the Parliamentary systems (no one has the needed majority, you start negotiating with other parties to develop a unified platform until some combination has enough sway) if candidates in the primaries would slot themselves into administrations as people drop out (not just VP, either — pick someone to head State, Education, HHS, etc).

Super Tuesday

In a way, it seems like reporting is being built to fit a narrative. A woman on one of the afternoon radio shows in Cleveland was on some iteration of The Real World. I remember her talking about how the producers pick a narrative for each contestant — who is the villain, who is the underdog, who is a slob. They then go back over the hundreds of hours of footage and edit together a show that fits their narratives. The reality is that everyone had emotional breakdowns or left a dirty plate in the kitchen. She was picked as clingy. I remember her talking about how she was trying to call her boyfriend. There’s some way they allocate phone time — I don’t know if you get a few minutes whenever or if you’ve got a window. Whatever the method, her boyfriend kept not being available when she’d call. And that was it for her opportunity to contact the outside world. They didn’t show the attempts to call that led up to her breaking down after missing him. And, as a one off, breaking into tears because one cannot talk to one’s partner does sound clingy and codependent.

Differential, even handing Biden delegates for all those who endorsed him {and I haven’t bothered to verify that those delegates *can* vote for Biden}, is 146 — although Warren has 51 and is evidently taking a day to reassess, so hopefully she’ll drop and endorse Bernie well ahead of next week’s primaries. But even with a 150 point spread, 300 delegates from California are not assigned. Ignoring Cali, there’s a narrative that Biden won handily. But Cali’s pretty big to ignore. The reporting was similar coming out of Iowa too — Buttigieg won – he is so far ahead in SDE’s. Oh, he lost the popular vote pretty significantly *and* the delegates are pretty evenly split. But *facts* got lost with the logistical problems and then New Hampshire voting.

Can they drag out the California results for a week so Michigan goes to Biden because he’s ahead (if upward of 60% are saying they are voting for ‘someone who can beat Trump’ v/s ‘someone who agrees with them on issues’ … seems like ‘ahead in the polls’ would sway a lot of voters). Or does showing Sanders trailing motivate younger people to get out and vote in the coming weeks (https://www.usatoday.com/story/news/politics/elections/2020/03/04/super-tuesday-bernie-sanders-youth-votes-fell-short-compared-2016/4947795002/). It’s easy enough to sit home if you think you’re guy is winning — and I’m certain it’s a lot easier for retired people to take some time and vote compared to someone working two jobs and taking care of their kids — but if the race is close?

If the political parties wanted to design a system to diminish faith in the ability of people to select who leads the country, the ability of people to push the direction political parties go … Republicans have gerrymandering, but the Democrats have this primary process.

MySQL: Moving Data From One Table To Another

Our OpenHAB persistence data is stored in MySQL. There’s an “items” table which correlates each ItemName string to an ItemID integer. There are then Item#### tables that store persistence data for each item. If you rename an item, this means a new table is created and previous persistence data is no longer associated with the item. For some items, that’s fine — I don’t really care when the office light was on last month. But there’s persistence data that we use over a long term — outdoor temperature, luminance, electrical usage. In these cases, we want to pull the old data into the new table. There’s a quick one-liner SQL command that accomplishes this:

INSERT INTO NewTable SELECT * from OldTable;
e.g. INSERT INTO Item3857 SELECT * FROM Item3854;

You can drop the old table too:

DROP OldTable;

But I run a cleanup script against the item list so often don’t bother to remove tables one-off.

ESP8826 (12e) Multisensor

We’d set up a prototype multi-sensor with an environment sensing kit that Scott picked up at MicroCenter a few years ago. There’s a little LCD display … but we wanted to report readings back to our OpenHAB server. Which required a network connection. Checking out prices for network cards to add to the Uno … well, it wasn’t a cheap add-on. But we found these ESP8266 modules that support 802.11b/g/n and provide the memory/processing for small programs. At about 3$ delivered, that was exactly what we needed.

I ordered a bunch of components to make multi-sensors – pressure sensors, luminescence sensors, temperature/humidity sensors. The sensors connect into a CP2102 ESP8266. The device is powered by a couple of 18650’s in a little box — another buck. There’s some miscellaneous wiring and a little breadboard, too. The total cost for the multi-sensor is about 8.50$. We could add a vibration sensor for another 0.50$, a PIR sensor for 2$, and a UV sensor for 2.50$. That’s 13.50$ for 7 different sensors — and we don’t need seven sensors everywhere.

I kind of want to make a weather station too — add a water level sensor, a precipitation detector, and a wind speed sensor. Those are surprisingly expensive! I want to check out the process to build your own anemometer. But I’d probably buy a nice Davis Anemometer 🙂

Connecting to a WiFi network with the ESP8266 is really easy:

  • Add a library to the Arduino IDE
    • In the Arduino IDE preferences, select File>Preferences menu.
    • In the “Additional Boards Manager URLs” field, add ‘https://arduino.esp8266.com/stable/package_esp8266com_index.json’
    • Select the Tools > Board menu and open the Boards Manager. Search for “esp8266” and install the platform.
    • From the Tools > Board menu, select the appropriate board. I ordered the CP2102 ESP8266 module, and we’re using “NodeMCU 1.0 (ESP-12E Module)” as the board.
  • Configure the WiFi network connection details in your code
  • Compile
  • Upload
  • You’ve on the network!

We’ve used an MQTT library and send sensor readings to our MQTT server.

 

Like in the movies

Every time I’ve watched a sci-fi movie where someone builds a robot that decides to annihilate humans, I wonder how the engineer missed out on the previous thousand movies where someone’s very good idea for a robot kills us all. I mean, sure it would be a really short movie if we pan into some lady sitting in a lab with a bunch of robotic bits spread out on a table and hear her say “Wait … I’ve seen Collossus: The Forbin Project … lets not do this”. And she shuts down the computer, shelves the components, turns the lights off, and goes home. But seriously, how could anyone about to install laser cannons on a drone not think “wait … “. Some movies address this with a four-laws derivative — I know the previous thousand robots went horribly awry, but here’s my idea at coding in guardrails.

Kind of think the same thing about zombie movies — the body of work tells you that really good precautions and quarantines are totally the way to go. But what happens IRL when there’s a contagious virus about? Exposed passengers from a cruise ship are flown back to the States. HHS’s welcome committee aren’t trained for infectious disease exposure and don’t kit up.

Adding member to MS Teams without admin rights or Graph API

# To run on Linux, you need the preview mode of AzureAD
# Register-PackageSource -Trusted -ProviderName ‘PowerShellGet’ -Name ‘Posh Test Gallery’ -Location https://www.poshtestgallery.com/api/v2/
# Install-Module -Name AzureAD.Standard.Preview

# Windows, the module is
# Install-Module -Name AzureAD

# I’m lazy and just typed my creds for a proof of concept; real implementation would use the SecureString thing in the connect-azuread. See:
# https://www.rushworth.us/lisa/?p=3294
connect-azuread

# Get the object ID for the group and the user
$objMyGroup = get-azureadgroup -SearchString “LJR Sandbox Team”
$objNewMember = get-azureaduser -searchstring “NewGuy”

# Add the user to the group
add-azureadgroupmember -ObjectID $objMyGroup.ObjectId -RefObjectID $objNewMember.ObjectId

Debate Edition: South Carolina

I don’t think anyone won this debate, and the interrupting was incredibly annoying. It was like someone at CBS said “hey, people liked the energy and conflict in Nevada … what can we do to replicate that?” and came up with non-moderation and asking borderline offensive leading questions. No winners, but a few exchanges stood out to me.

Stop and frisk was a question Bloomberg knew would be asked. And he knows it’s something other candidates are going to target. I have no idea how he doesn’t manage to come up with something better in his debate prep. I contrast this with Sanders’ response on previous votes against gun control. I thought his response in the former debate — the state in which society existed in the 80’s, and what his constituents wanted in he 80’s, informed his vote. We’ve got different problems now, and he’s got different beliefs now because of this new information. This debate, where he outright called some of his votes bad … that seems like a much better approach on the stop and frisk questions. Bloomberg started down that path:

“I’ve met with black leaders to try to get an understanding of how I can better position myself and what I should have done and what I should do next time.”

But instead of continuing down a path of showing personal growth, he decided to tout his achievements.

“We’ve improved the school system for black and brown students in New York City. We’ve increased the jobs that are available to them. We’ve increased the housing that’s available to them.”

In one way, I get what he’s trying to say. But it was about the worst way I could have imagined saying it. I had an instant “umm, Brown v. Board of Education” mental response. Again, I’m certain he is speaking to the reality which is that there are schools and neighborhoods where a minority is the clear majority. But even a well phrased version of the response falls into Warren’s “so he’s saying he’s nice to some women” response. It’s ok that he made a lot of people’s lives hell for just walking down the street because he also increased funding to the school district?

And I thought that was the oddest bit right up until Buttigieg:

“I am not looking forward to a scenario where it comes down to Donald Trump, with his nostalgia for the social order of the 1950s, and Bernie Sanders with a nostalgia for the revolutionary politics of the 1960s.”

Essentially he is against the civil rights movement? The anti-war movement? The women’s lib movement? Hell, the gay rights movement?! All of which were “revolutionary politics” from the 60’s.

I was surprised that Bernie didn’t have a better response for his previous and current comments about Castro. Taking what Bernie said on Sunday on its own, he’s rejecting a “reductio ad Hitlerum” association fallacy (Hitler liked dogs, thus liking dogs is awful … Castro did a lot of awful things, therefore since Castro did it it was awful). His statements from the 80’s are essentially that there are reasons Castro wasn’t overthrown that Americans don’t understand. Which, in fairness, is totally true. There’s a dearth of communication between Americans and Cubans, so I’m certain there is a great deal of the internal political environment that was (and is) poorly understood. It *is* true, too, that people who opposed Castro were thrown into prison. Which had more impact Castro’s ability to stay in power – appeasement or totalitarianism? Americans don’t know. I doubt Cubans really know, either, since it’s not like we can isolate each input to quantify it’s impact. I’ve visited other countries with totalitarian governments, and I can absolutely say that people accepted reduced freedoms in return for an improved standard of living.

Even saying ‘hey, we could benefit by looking at what Castro did to increase literacy’ … what’s the harm? I mean, maybe ‘what he did’ was mobilize the army and anyone who couldn’t pass a fourth form reading exam has a dude with a Kalashnikov rifle standing over them as they study. Shoot anyone who couldn’t pass the exam and thereby achieved a statistical 100% literacy rate. We can look at that and reject the idea. But maybe ‘what he did’ was offer a grand to every individual who passed the fourth form reading exam and it proved to be a great motivation. Or double the number of teachers in elementary schools. Or funded adult literacy programs in every small town … which are ideas we could certainly try.

We do ourselves a disservice if we reject any idea about anything just because of its source. Hell, we do ourselves a disservice to ignore *bad* ideas from *bad* sources just because they (or the situation which gave rise to them) makes us uncomfortable. I can study something without agreeing to 100% believe and support everything about it. I’ve watched Doc McStuffins with my daughter and don’t believe the toys come alive every time we leave the room (although it *would* explain the mess!). I’ve read Harry Potter but haven’t managed to become a wizard. I think I can study what the Sandinista government did without deciding they had the right way of things, finding an armed mob, and taking over the government next Thursday. I can look at how Cuba increased literacy or started producing low-cost medication without starting a guerrilla war.

On Socialism and Socialism

One needs to differentiate between government-controlled means of production (colloquial ‘socialism’) and the employee-owned means of production that he supports (democratic socialism). Because there’s a big difference between the government taking over factories and putting out a five year plan for agricultural and manufacturing production and selling some control of companies to employees (who, logic dictates, would be driven to keep their product innovative and competitive beause they all want to have a job ten years from now so American capitalism would look for long-term prosperity instead of a few execs finding a way to get millions this year by driving the company into the ground).