Thursday, October 29, 2026

Entropy doesn't have to be confusing

Entropy is a measure of chaos.  This is technically accurate, but a poor descriptor.

Entropy is a measure of disorder.  This is better, but not quite there yet for the average person.

Entropy is a measure of ordinariness, or averageness.  That’s the ticket!

Any situation where you could scatter items around like a messy toddler having a particularly energetic day is one of high entropy.  If the toys were scattered about the play room in a different manner, would you even notice?

A low entropy situation is what you get after the toddler is finally asleep, and Mom finally has time to tidy all the toys back into the toybox.  The entropy has been reduced to the order of the toys inside the box.

White noise has high entropy.  Pink noise has less.  A pure tone has very low entropy.  Note that it still has some.  After all, it doesn’t have to be that particular frequency.  There are many others it could have been.

If Jackson Pollock made a thousand of his infamous paintings, they’d all look very similar to each other.  They are high entropy.  But you can instantly tell each Rembrandt from all the others.  They are low entropy.

Entropy is inversely related to how predictable a collection of things are.  In the messy play room, if you pick one toy, you have no idea where a similar toy might lie.  It might be under this one.  It might be way over in the corner.  There’s no way to know without searching for it, and that might take a while.  In the tidied up play room, if you pick a toy, a similar one will probably be close by.  Searching for it will probably take very little time at all.  But the act of searching for it may temporarily increase the entropy, as you move some toys around to look underneath them.  You might even have to take some out of the box until you find the toy in question, which the child apparently can’t sleep without today.  No, not that one.  This one, which is 99% identical, except for the one floppy ear.

A low entropy message is one in which you can pretty much guess what’s going to be said next.  A high entropy one communicates almost no information, because it doesn’t make any sense.  It’s a jumble of unrelated syllables.  A properly encrypted message has a very high entropy.  A properly decrypted message should have a very low entropy, unless the original sender was drunk.

Low entropy:  abcdefghijklmnopqrstuvwxyz

Higher entropy:  qwertyuiopasdfghjklzxcvbnm

High entropy:  asdfqrtmbnxcvoiuasdgfjhjew

Very high entropy: dlkjlownvWSJfvh3DFGJU4Tgdy654er@#^Hhfds4f

Tuesday, October 20, 2026

Archaic to whom?

There are a number of words falling out of the common vocabulary.  They are all, obviously, useful to some degree.  After all, they wouldn’t have become words if nobody found them useful in conversation.  But a few have come to my mind recently, demanding I reminisce about them.  They come in matching sets, and are based on the much more common words of position:  here, there, where, when.

Motion towards:  hither, thither, whither.

Motion from: hence, thence, whence.

Motion away from, already in progress:  Henceforth, thereforth (survives as therefore), whenceforth.

Other European languages have kept some or all of these words.  Motion and position tend to be indicated with the combination of a preposition and a grammatical case.  (Preposition:  a word that goes in front of another as a modifier.  Pre-positioned, as it were.)

Wednesday, October 14, 2026

Disco Inferno

I had a dream.  No, I had weeks of dreams last night.  One was detailed, lasted for days, but was essentially boring and a little awkward.  It involved a multi-family vacation at a big house on a lake, with way too much lettuce.  Lettuce freaking everywhere at the end, and I had to clean it all up.  But the second dream was something special.

I dreamed I was younger and back in Army Counterintelligence.  My background got me recruited into the paranormal branch (which, yes, really existed at one time).  I turned out to be remarkably good at that.

That got me recruited into the weird science, aliens, and superpowers branch of the organization.  I was one of the few full recognizable humans on the team.  It was glorious.  Our best computer hacker was a bunny girl who could telepathically control anything electronic.  With her ears.  From several yards away.

The Chinese had captured several American agents, and were going to show them off at a Communist Party general conference before executing them.  So we infiltrated the giant conference hall, and at the proper moment, turned the whole affair into a giant disco, straight out of the 1970s.  Then we turned the psychedelics up to 11.  Everybody was up and dancing and singing along (badly).

The atmosphere was so wild that it made perfect sense when we crashed the flying saucer with flashing neon lights through the wall to do the extraction.  Everybody cheered, and the dancing went into more of a disco conga line.  We grabbed our agents, danced up the ramp into the saucer to the tune of “Disco Inferno.”  We departed to the thunderous cheers and applause of hundreds of ministers, generals, and functionaries.

My subconscious is a lot more creative than I am.

Friday, October 9, 2026

Polymorphism is sets behind the scenes

Polymorphism in programming is the use of a single name to mean multiple (hopefully related) things. For example, you can generally use the symbol ‘+’ to add two integers, two reals (floats), or even an integer and a real number. Thus, the ‘+’ function is polymorphic over integers and reals. Simple enough in concept. But how do you implement this capability?

You use non-polymorphic functions, and collect them together in a set with the common (polymorphic) name. The ‘+’ function is really a set of related functions: [addInts, addFloats, addIntFloat, addFloatInt]. When the language implementation (whether a compiler or interpreter) encounters the ‘+’ function, it examines the types of the arguments and selects the proper actual function.

This polymorphic function name, which has no actual implementation of its own, is called different things in different programming languages. It might be an interface. It might be an enum. It might be hidden behind multiple definitions of the same function name as a polymorphic function. It might even be hidden in plain sight inside a pattern matching function definition. But the way it works is the same. A common name dispatches to separate definitions depending upon the types of the arguments.  (Object Oriented languages generally dispatch on the type of the first argument.  Some languages, like Julia and Nim, use multiple dispatch, using the types of all the arguments.)

If you know the name of the implementations (assuming they are separate), and you can predict the types of the arguments you will have, you can bypass the types lookup and simply use the proper function definition. This is how compilers work. It’s also how just-in-time compilation works. It can even work in truly polymorphic languages, where there are no separate names, as long as the language can access and recall the identity of the correct underlying implementation. After all, the implementations that share a common name end up being entries in a list, and that list can be accessed by index.

The exact same principle works in type polymorphism, also known as abstract types. You can have a type Number, which is really the set [Int, Float]. So when you have a variable of type Number, it can contain either an Int or a Float, but not both at the same time.  Generic types work in a similar fashion, but the actual type of some argument gets named and used as a specifier for the types of other arguments.

Things get a little more complicated (and noticeably slower) when you have a polymorphic function dispatching (selecting which version to execute) on polymorphic types. But that ends up being a relatively straightforward iteration over possibilities, restricted by the actual types of the arguments.

Thursday, October 1, 2026

Everybody's good at something

Every once in a while, especially when the weather was being unspeakably foul, we'd do PT (physical training = Army speak for morning exercise) in the gym.

I have little upper body strength. I’m just not built that way. At my best, I maxed out at around 120 pounds on the bench press. The gym rats would snicker at me.

And then I’d move over to the back press. I’d take the key, normally somewhere around 100 pounds or so, and move it all the way down to the bottom - 800 pounds. Then I’d strap in and do 100 reps, nonstop.  (To put that in perspective, that's 40 tons of work done in less than four minutes.)

Then I’d switch to the abdominal press and do 100 reps of 600 pounds. (It didn’t hold any more weight.)

And then I'd stretch and rest for a minute, and do it again.  And again.

They stopped snickering.

Monday, September 21, 2026

"Hottest Year Ever!"

Today is 21 September, the end of summer. For the next several days, the expected high temperatures here are in the low 60s. It’s been raining for three days. Rain is expected to continue for three more.

Apologies to all those living out past the dry line. We’ve got the cold, wet weather you’ve been dreaming of. We’ve had it for most of the last 10 years. We had three consecutive years of record rainfall. Consider what that means. The farmers around here are spending the fortunes they don’t have putting in drainage under their multi-hundred acre fields so the rain water will GO AWAY and stop drowning the crops. More of this sort of tractor are showing up:

https://www.deere.ca/assets/images/common/products/tractors/9rx-models/r4k034278-rrd-767x431.jpg
Like this, but bigger and with more ground clearance.

Our local community pool didn’t get a whole lot of business this year. We had a couple weeks of hot in May and June, and a week or so in July. August was notably cooler than usual, with two weeks of highs in the 60s and low 70s.

I’m old enough to remember when the grass normally died of heat and thirst in August, and the temperatures routinely got into the low 100s. Now, it’s unusual to see the temperature reach 90 degrees more than three times the whole year.

And the newsweasels keep proclaiming, “It’s the hottest year ever!”