efroymson

Sunday, August 02, 2020

The Wrong Kind of Binary

The Wrong Kind of Binary

Binary of course means two valued.  Ones and Zeroes.  Computer math.  Very useful stuff, but not the subject today.

There is another sort.

Politicians hate making choices.  To make a choice is to disappoint someone, and they want to make everyone happy.  Everyone except their designated enemies, but that is also not the subject today.

One way to avoid the appearance of making choices, even when one must be made, is to pretend that there is no choice.  Rather than explain the trade-offs involved in a decision, simplify to a binary option, where only one choice is the "obviously correct" one. 

In trade offs involving potentially fatal outcomes, there is an easy way to do this.  Simply say that "even one death is too many", and any course of action that might kill a single person is immediately off the table.

It is difficult to overstate the moral bankruptcy of this line of argument, especially because of its deep emotional appeal.  There is a kernel of truth after all, for the person who dies, and the family, of course that one death is a tragedy.  At the same time, it elides a simple truth: choices must be made, and we need to make them in a sensible way. Engineers learn early that there are always tradeoffs. "Fast, Cheap, Correct, pick any two".

However, if there are only two numbers in your number system: Zero, and "too many", you will be unable to make even the most basic computations. Two numbers aren't enough.

Even basic computations are not good enough.  A proper grasp of statistics and probability is essential to evaluate the various paths that are always before us.  How can you compare what you can't quantify?  By feel?  Not good enough. By appeals to emotion?  Definitely not good enough.

Maybe this is the time to come out in favor of replacing Calculus with Statistics in High School Math?  If Innumeracy was rare, the false choice arithmetic wouldn't hoodwink so many, and our leaders would maybe step up their game.

A man can dream, right?

Friday, July 24, 2020

My Perfect Minivan Ride, With the Gestapo

My Perfect Minivan Ride, With the Gestapo

Portland Oregon seems an unlikely place for the inauguration of a Fascist Police Force in America, but if 2020 has taught us anything, it is that the unlikely is likely.  When I first heard about the famous minivan abduction I was puzzled.  Why would the police read someone the Miranda warnings, and then just let them go?  What was he suspected of?

The short video that went viral was not much help either.  It took more than a moment for me to ignore the voice pleading with the officers to "use your words".  What was that about? A kindergarten teacher too terrified to return to class, yet comfortable attending a protest cum riot?  Who talks that way?

But that is not the point, I suppose.  The point is that the officers came up wordlessly, and took a man away, in a minivan, without, as many commenters pointed out, a warrant.

A warrant is not necessary to make an arrest, Probable Cause is, so my first suspicion was that he had been observed vandalizing something, or assaulting someone.  But that isn't what happened.  Apparently he was seen standing near someone who may have shined a laser in an Officer's eyes, and was wanted for questioning.  The officers took him away in the minivan because of the growing crowd, which made it impossible for them to speak to him on the street.

I hope there were more people there than "use your words" lady, because annoying as she was, she did not sound like a threat.

Let's be clear: there is no riot exception to the requirement that Probable Cause exist before an arrest can be made.  There is also no question but that being taken off the street by armed government agents is an arrest, contrary to whatever claims were made. The officers were wrong.

In the 80s the "Preppy Handbook" came out.  It  told you how to wear Penny Loafers and Polo shirts, what names and hairstyles were Preppy and so on.  It was followed by a slew of other handbooks, including "The Lawyer's Handbook".  I think I lost my copy, but I remember it had a section on different kinds of arguments you could make, depending on how much you were paid.  The most expensive one was the "bolt from the blue", which meant you could say anything at all, unless you were immediately struck down by the eponymous bolt.

Arguing that there should be a sort of riot extension to the Terry Stop requirements might not be that bad, but it is close.  Maybe the correct question is if the Judge would just yell at you from the bench, or would ask you to join him in chambers, so he could yell at greater length?

Speaking of Lawyers, can you imagine the one who came in to the office where they were questioning this fellow?  After hearing the tale of how he came to be there I suppose the officers heard: "Ok.  Now you will tell him he is free to go, and walk him to the door."

That said, it is also not exactly the sort of thing the Gestapo were feared for.  The problem was not that they would grab people off the street and release them an hour later, it was that they would grab people off the street, take them to an office somewhere, and then shoot them in the head, or trundle them off to a concentration camp. 

Now do you get the title?  I am falling between two chairs, the reflexively pro and reflexively anti-Trump.  I can't possibly get behind the notion that the deployment and actions of the Feds in Portland was "perfect", because, well, they clearly weren't.  At the very least some more training needs to be given to these officers so they stop coming up with creative ways of dealing with the difficulty of conducting street interviews during unrest. 

Should the officers wear better identification?  Sure.  Is it frightening that they are in military style camouflage?  Yes.  Am I disappointed in the way things are going in this country?  Of course.

And yet.

Friday, July 03, 2020

Mostly Peaceful

Mostly Peaceful


The city of Seattle recently conducted a Natural Experiment, or perhaps I should say allowed one to occur. It was well-timed, in that it tested a hypothesis that has been bandied about since the horrific death of George Floyd at the hands of a Minneapolis police officer; the hypothesis that the police are the real threat to public order, and must be defunded.

One of the peculiar things about living in the modern world is that we are often unable to see the harms we prevent with our infrastructure, precisely because the infrastructure is working correctly. Anti-vaxxers still rarely see measles in the wild, so the notion that the vaccines are preventing a dangerous disease is foreign to them.

It is tempting to be harsh, and label them foolish, but honestly, what evidence can they see to support the conventional narrative? It is necessary to read some history, or learn some immunology to understand the value of a vaccine. Merely looking at the world and drawing conclusions isn’t enough.

Just so with policing. In fact, it is probably a worse situation due to the media environment. Police killings, especially of unarmed Black people, are horrendous. The stories are intensively reported, and covered thoroughly. This is natural. It is also impossible to blame the media for failing to report on all the people who were not murdered, because their potential killers were deterred by the presence of police, or by the fear of detection and punishment. By definition, there is no story to report.

Enter Mayor Durkan. When the riots over Mr Floyd became particularly violent, and the defense of the East Precinct required regular use of tear gas, she grew concerned. If I understand her reasoning correctly, she concluded that this was an example of the cure being worse than the disease, or rather the “cure” (the police) causing the disease (rioting). The order was given to withdraw from the precinct.

Once the police left, the local activists declared first an autonomous zone, then an Occupation. Whether CHAZ or CHOP it was now a self-governing entity, and the police were no longer welcome, not just in the boarded up Precinct House, but in the several block area around it. When the President urged the City and State to clean it up, they demurred. Mayor Durkan even suggested that we would see a “Summer of Love” in the area.

For a time, it seemed like that might be in the offing. There were dance parties, free food banks, public discussions, and so on. A Wall Street Journal reporter visited, and found optimistic people. Perhaps Mayor Durkan was right?

Rousseau is credited, apparently incorrectly, with the claim that the state of Nature was one of true human freedom and peace. A close cousin to this idea is that all of our miseries are the result of our civilization, and if only we were free of its confines, we would be Good, and Happy. An echo of this thought was heard in Margaret Mead’s story that the people of Papua New Guinea lived close to nature, and were thus happy and peaceful.

The truth turned out to be that they were indeed mostly peaceful, and there were only a handful of homicides every year. Unfortunately, due to the small population density, those few homicides resulted in a per capita homicide rate that was about the highest on the planet.

Just so CHOP. In the few weeks of it’s mostly peaceful existence, there were only two homicides. Unfortunately, on a Per Capita basis that works out to 1,216 per 100,000 -- the highest on the planet, by far. Of course it is a small sample, and the statistics can’t compare to actual countries, but the message is clear, it was a disaster.

Mayor Durkan recently bowed to reality, and ordered the police to retake the zone, which they did with little difficulty. Whether she, or any of the other supporters of CHAZ learned the larger lesson about the underpinnings of our civilization? That we shall see.

Sunday, April 12, 2020

Abjad and Lilypond: Tools for Algorithmic Composition: First Look

Lilypond, which for some reason I keep calling Lilypad by mistake, is a TeX like tool for engraving beautiful sheet music.  Unlike Finale or Sibelius it does not use WYSIWYG mouse and keyboard input.  Rather you enter source code in a text editor, and use Lilypond to render it.

The advantages of that more than make up for the lack of point and click instant gratification.  What advantages?  Well there is the quality of the output, which is at least on par with those other programs, and maybe better.  More importantly for someone who wishes to do Algorithmic Composition is the simple fact that it expects a text file in a specific format as input.

Sounds like something that a computer program should be able to generate amirite?  Indeed, that is the purpose of Abjad.  Abjad is an extensive library of routines and objects that allow Python code to generate music that is in the Lilypond format, and thus can be beautifully rendered as sheet music for a performer.

I've been working on Electronic Music for some years, but only recently have I been given the opportunity to work with a live musician playing an Orchestra instrument.  It is one thing to program a sequencer to generate MIDI that is fed directly into another instrument, quite another to be able to hand some music to a musician with the expectation that they will be able to read and perform it.

Whenever I say "yes" to a project like that, it is always a bit like jumping off a cliff, and hoping that I will find water in which I can swim beneath.  Abjad and Lilypond are indeed sufficient water, and I have started swimming.  I don't want to go into much depth about them, partly because I still don't know much, but also because if you follow the links to the projects you will find a wealth of examples.  I found the Ligeti score example particularly helpful for my purposes.

One thing I do want to mention is some confusion with the word "Note".  That may seem silly, but bear with me.  A note might refer to a note in the scale: ABCDEFG, to a note on the piano keyboard: say A below Middle C, or to a  Midi note: Say note 66.  In Midi for example you can send a NoteOn and a NoteOff, but the notion of a quarter note is non-existent (though in Midifiles of course there are temporal delays, so duration can be represented).

In Lilypond and Abjad a Note is a combination of a piano or Midi type note, and a duration. It is possible to specify notes either by name, say c' or by number.  For algorithmic composition the number representation is much simpler.  Somewhat annoyingly (to me) the number assigned to Middle C is zero, so even if you are doing a simple piece of piano music you will have to deal with negative integers.  Yes I know that they were already well used by the 1500s, but if Leibniz thought they were "invalid", and Pascal "regarded the subtraction of 4 from 0 as utter nonsense" then maybe I am in good company.

In any event getting started is simple enough, the example at the Abjad front page includes these simple lines:
duration = abjad.Duration(1, 4)
notes = [abjad.Note(pitch, duration) for pitch in range(8)]

There is more to it, but you can see how easy it is to create an ascending chromatic scale of quarter notes.  Adding time and key signatures is a tiny bit more complicated, but the examples work through all of that as well.

tl;dr: Abjad and Lilypond are fantastic tools that let you create beautiful engravings of your musical ideas.  Strongly recommended!

Wednesday, December 18, 2019

Toward Better Doctor Patient Communication through Normalized Test Results

I was recently visiting an ill friend in the hospital.  The Doctors would come in occasionally and tell him that his INR was such and such, and his Hemoglobin was so and so.  Now my friend has been dealing with his condition for some time, and there were numbers that he understood, but for many of them I had no idea what the number meant, whether it was high or low, and if it was high or low, how much of a concern it was.

While I was sitting in the room, it occurred to me that a standard system for communicating the numbers could be set up.  The idea briefly is that every number would be Normalized for the particular patient, at least so far as to account for age, weight, gender and so on.  A normal result would be 100, and anything between 90 and 110 would be ok, or cause for very little concern.  Up to 120 and down to 80, needs attention.  Above 140 or below 60, very serious concern.

It is already a common practice to include this sort of information with lab results, the (almost meaningless) measured number will be given, and then a color code, or the words "high" or "low" appended as necessary.  If normalized numbers were used instead, all of this would be unnecessary, and communication would be much improved.

It is true that many people have learned the meaning of various numbers.  I was told that Diabetics for example, are very familiar with the blood sugar numbers, and know immediately what the reported number means.  Likewise we all learn early what a normal temperature is, and what a fever is, though it is interesting that Fahrenheit wanted his scale to be something like what I am proposing, where it would be obvious if you had a fever, because 100 was the normal temperature.

Apparently his methods or apparatus were insufficient, and we therefore have a normal temperature, as measured in degrees Fahrenheit, that is almost 100, but far enough away that 100 is a mild fever.

My proposal would require some re-learning, in that 100 would be, as Fahrenheit intended, a normal temperature, but we could see a number of 104 as a very mild fever, rather than a pretty severe one as now.  It would not be until an indicated 120 or so that a fever would be indicated, as one standard deviation above the mean.  I'm not an expert in any of this, but my understanding is that a temperature below normal is is more concerning that one above, but a normalized scale would take care of that, as 80 would be one standard deviation below normal, whatever measured temperature that corresponds too.

In truth, for temperature we perhaps don't need this, but it is a good example for how the numbers would map, precisely because we are already familiar with it.

One final thought: it would be wise to have a convention for using these numbers, perhaps prefixing them with N both in text and speech, as in "Your bp is N100/100", to let someone know it is exactly normal.

Disclaimer:  I am not a physician,  I have not yet done all the work to build this into useful system, and I have not engaged a large number of people to determine if they also think it would be helpful.  My lovely wife thinks it is a terrific idea, but she is perhaps biased.

Friday, October 05, 2018

Published Academic Research is Worthless

An Economist and a friend are walking together.  They see a $100 bill on the ground.  The Economist looks at it, and keeps going.  The friend asks "why didn't you pick that up?", and the Economist replies "If it was a real $100 bill, someone else would have picked it up already".

That is a very old joke, and it is (I suppose) a reference to the Efficient Market Hypothesis.  The underlying economic principle however is no joke, and is, I suggest, generally applicable.  How can we apply it to determine the value of Published Academic Research? 

As it happens, the United States conducted a Natural Experiment in this area, between the years of 1976 and 1998 (end date approximate).  Before 1976 Copyright in this country was governed by Common Law.  The general rule was that creators own their work, but there was a large carve out, called Work for Hire, which granted employers ownership of creative work done by employees whilst on the clock.

There was an exception to the exception, for University Professors (and perhaps others). The Teachers Exception granted ownership of materials produced by Professors to the Professors themselves, even though they were working at a University when they created it.

The Experiment began with the 1976 Copyright act, which codified and replaced the Common Law rules.  In particular it codified the Work for Hire rule, without including a Teacher's Exception.  There is some question about whether Congress pondered long and hard, or even at all, before eliminating this rule, but there is really no question that the plain language of the Statute did eliminate it.

When the Congressional History is unclear, we must look to the plain language of the Statute

That is putatively a Canon of Statutory construction, though it may be the wrong way 'round.

In any case Congress in a sweeping gesture granted to each University in the United States ownership of the published work of every Academic working in that University.  What did the Universities do?

Nothing.


If Congress had granted them ownership of large swathes of valuable property, what would they have done?  Presumably they would, like any non-Economist who saw a $100 bill on the ground, pick it up.  On the other hand, if they were handed title to a vast expanse of burning tires, they might very well look the other way.

Now you could argue that Universities were loathe to annoy their Faculty by asserting ownership, and thereby overturning many years of precedent.  However there are about 5,300 colleges and universities in this country, and it is improbable that none of them would be willing to take that risk, if there was a payoff.

Indeed, if you are familiar with the approach of a University towards Patents issued to their faculty, the difference will be immediately obvious.  Spoiler alert: they aggressively assert ownership, and defend their legal rights to this valuable Intellectual Property.  As they should!

Quod Erat Demonstrandum


If you are interested in the legal history I set out, you should look at this excellent article from BYU.  It was the source of my legal summary above, though please don't blame them if I got it wrong.

If you are wondering why I would bother writing this up right now, you might look up "replication crisis", or read a bit about the latest hoaxing of an academic journal.

Finally, if you are wondering where 1998 came from, it is the year the DMCA was passed, which may have restored the Teacher's Exception, if you squint when you read it (see the BYU article for more).

Monday, February 05, 2018

KG6JCA

Several years ago, when I was living in the Bay Area, I got my Ham Radio license.  At that time I got a Yaesu VX-5 handheld, and would occasionally use it to hit the repeaters in the area.

After several years of  neglect, I got a Jeep this past fall, and decided that a mobile radio would be a good backup to my cell phone, especially because NM is a big state, and there are a lot of places without coverage.  The geography of NM is good for Ham radio though, since there are plenty of tall mountains here, which are not only pretty to look at, but make great places for an antenna.

I got an Icom 4100, for a couple of reasons.  I am not too embarrassed to admit that one of the reasons was that it is the only radio I could find that can actually be controlled by an iPhone app.   The app is easier than the somewhat small and cryptic control head, especially for D-star operation.  However, if you want to use the near repeater search function, you do have to work out the UI of the actual radio.  It is not so bad, once you realize that short press and long press do something different on several of the buttons.

There is one major annoyance about the radio, and that is that it does not do APRS.  Given that it has built in GPS, and a digital mode, it should have been trivial for Icom to add it, but they did not.  APRS has some features that are very handy, including position reporting, and even texting.  NM has an extensive APRS network, and I want to be able to use it from my radio.  Fortunately, I did figure out a way to do that, as I will detail in another post.

Finally, as you have perhaps guessed, KG6JCA is my call sign, and you might hear me on D-star or 2 meters sometime.