Saturday, August 29, 2020

C plus plus programming and other negative effects of the pandemic

 C plus plus programming and other negative effects of the pandemic

By  Bobby Neal Winters

They say that Isaac Newton invented calculus and put together his theory of gravity during a pandemic.  I learned another computer language and beat the peg puzzle.  Here is how that goes.

You might have seen the peg puzzle at a pizza place or a bar.  It is typically a small piece of wood that is an equilateral triangle if you ignore its thickness.  It has holes drilled in it and the holes are arranged in rows.  In the top row there is on hole; in the second two; this goes on down to the fifth row which contains five holes.  All together, there are 15 holes.

Into these holes, you put 14 pegs.  Usually you fill every hole but the middle hole in the third row.   The idea is that you jump pegs and remove them and you try to get to as few pegs possible.  If you only have one peg, you win.

I’ve got one that was given to me by my father-in-law.  I’ve got it sitting on my computer to my right as I write this.  I don’t remember how long ago he gave it to me, but I do know he’s been dead for 13 years.  I suspect he gave it to me with the expectation that since I am a math guy, I would solve it.  

Well, I have but that has been more than a decade in the making.

The story goes like this.  I cleaned out my garage this summer as a part of my COVID cleaning.  Not being able to go anywhere led to me having a bit of pent up energy.  Couple this with the fact that I decided to get a freezer for my garage to put a beef in (whenever the local butchers catch up that is!) and the garage got cleaned more deeply than it had for a long, long time.  

In my cleaning and rearranging, I found the puzzle.  There it was, unconquered. It had a decade worth of dust and spiderwebs on it.  But it made me remember.

What happens next might not be what you expect.  I put it on the back porch to let it get rained on for a while, and I came into the house and started the process of writing a computer program to solve it.

I’ve been learning C++.  There aren’t many of you out there who really care about computer programming, so I will speak in metaphors.  Have any of you seen the old PBS show “The Wheelwright’s Shop”?  The guy makes furniture, and when he is going to make a chair, his first step is to take an iron fencepost to the forge and make a tool with it that he will eventually use to shape an old log he found in the woods.  

That is what programming in C++ is like: You have to make the tools before you make the pieces, and then you put it together.

This is what I began the process of doing.  For those of you who are interested, I modeled the game with a 15 bit binary number.  There are only certain ways you can move between the numbers.  You program the computer to make the moves and then you stop when you can’t move anymore.  Then you check how many pegs are left.  If there is only one, you win; otherwise, backup and do it again, keeping track of the ways that didn’t work.

For those of you who are interested, there are 89 different ways that the game can end.  There is exactly one of those where a single peg is left.  Moreover, there are a lot of different ways to get to each of the 88 ways that are losers: more than 130 thousand.  

So what I could do would be to memorize the 13 jumps it takes to win, but that doesn’t seem right.   I suppose the best way would be to learn strategy.

That might have to wait for another pandemic.

Bobby Winters, a native of Harden City, Oklahoma, blogs at redneckmath.blogspot.com and okieinexile.blogspot.com. He invites you to “like” the National Association of Lawn Mowers on Facebook. )


Saturday, August 22, 2020

September Song

September Song

By Bobby Neal Winters

Oh, it's a long, long while from May to December

But the days grow short when you reach September

--Maxwell Anderson

I am a watcher of the sky, a follower of the Sun.  Were I not a Christian, I would no doubt be a follower of Sol Invictus, the Unconquered Sun.  I keep track of when it rises in the morning and sets in the evening.  While the days have been getting shorter since June 21, we’ve only been able to notice it much more recently.

This is only going to get worse.

About the 20th of September the nights will be longer than the days and we will keep losing light until just before Christmas, but by Halloween it will be just about as dark as it's going to get.

But we are now in a period where we know the darkness is coming, but there is still enough light to work.  We can’t put in crops; that has already been done--or better have been.  But if we are going to do anything more, waiting is not going to help.

This reminds me of my stage of life.

I’ve got a birthday coming up in a couple of months, but it’s not a big one with a zero on the end or anything, but most of the people in my life are already beyond 60.  Many of them well beyond.  Even when age comes gracefully things happen.

There is the energy thing.

When I am at my energy peak, I am sharper than I ever was.  This is because I’ve done a lot of stuff and thought about a lot of stuff just because I’ve had longer to do it than I ever have before.  That sort of goes without saying, but I think there are some folks who might need to hear it.

The problem comes when I am off my energy peak.  When the batteries are charged, I can learn Spanish and Russian, Python and C++; I can think about the best examples to talk about algorithms and finite state machines.  When the batteries go down, don’t even ask me to do arithmetic.

The brain is still there along with everything that is stored in it, but sometimes I don’t have the amps to light up the little leds.

I notice that among some of my longtime friends.  Some of them have become good stewards of their energy.  They work and study and think, but are careful not to run the battery all the way out.  They take care of the physical so that the mental will stay as sharp as it can for as long as it can.

My mother had Alzheimer’s.  Her world became smaller and smaller.  She spoke with fewer and fewer people until she only spoke to her ancestors.  I don’t know that she ever could’ve done anything any differently.  That is one of the facts of life: No matter what you do there are no guarantees.

But a little exercise ain’t a-gonna kill ya.  Take a walk to keep your blood flowing to your brain; do Sudoku; learn Spanish. Love your neighbor as yourself.

The days grow short when you reach September.

Bobby Winters, a native of Harden City, Oklahoma, blogs at redneckmath.blogspot.com and okieinexile.blogspot.com. He invites you to “like” the National Association of Lawn Mowers on Facebook. )



  


Saturday, August 15, 2020

A Quintessence of Dust

 



What a piece of work is a man! How noble in reason, how infinite in faculty! In form and moving how express and admirable! In action how like an angel, in apprehension how like a god! The beauty of the world. The paragon of animals. And yet, to me, what is this quintessence of dust?

--Hamlett, Act II, Scene II 

There is a story in the Bible about a mighty General Naaman who was a leper.  He was directed to the Prophet Elisha for a cure.  Elisha directed him to bath himself in the River Jordan seven times to rid himself of the disease.  Naaman was indignant, replying more or less, “Aren’t the rivers around here better than the stinky old Jordan?”  To which his servant replied, “You know, Boss, if he’d asked you to do something hard, you would’ve done it.”

A pair of tightly woven but seemingly contradictory truths emerge from the current crisis.  A paradox, if you will. 

Truth number one: People want to be taken care of by their government, by each other, by Big Brother, or by someone else besides themselves doesn’t matter who.  

Truth number two: People don’t like being told what to do and by and large won’t do it.

One might argue that there are two different groups within the population with one typifying one attitude and one the other, but I’ve been paying pretty close attention.  There are two groups, but the overlap within the two groups is quite high.  I believe it is a majority.

Let’s talk about the mask thing.  Maybe they work, maybe they don’t.  I’ve not seen the numbers; I’ve not read the studies. Since I try to cover my nose and my mouth with a handkerchief when I sneeze or I cough, having what is essentially a handkerchief strapped in place seems like a reasonable solution; it keeps me from being caught unaware.  

I think that I might keep the practice of wearing a mask whenever I have a cold from this point on out; it strikes me as being a considerate thing to do, now that I think about it.

But wearing one makes my glasses fog up.  My glasses are not optional; I’ve got a card in my pocket from the state of Kansas that says so.  So it is annoying to wear the mask. Sometimes I forget and suffer the terror of having a finger wagged at me.  The horror.

But wearing one is not a big deal.  I will put it on top of the stack of all of the other things I do because I am trying to be a good citizen: putting gum wrappers in my pocket; not throwing fast food sacks out the car window; not passing gas in the elevator.

However, I am not shocked that people don’t want to go along with this.  Religion--not only Christianity, any religion that has been good enough to survive for generations--has offered a set of principles about behavior.  They are largely in agreement, shockingly so.

Yet the phrase “You can’t legislate morality” comes quickly to the lips and trippingly on the tongue.  The fact is you can legislate morality; we do it all the time.  Sometimes it’s simply the devil to enforce.

I am about to tell a disturbing story; gentle souls might want to  tune out for a paragraph.  Jeffry Dahmer captured men.  He killed them and had sex with their corpses and then ate them, storing body parts in the refrigerator. He always wore a condom. (As one stand-up comic opined, “Somehow THAT message got through.”)

The point of that story is that people are more keyed-in to taking care of themselves than they are to taking care of others, though this is an extreme case.

In the movie Parenthood with Steve Martin and Jason Robards, Robards’ character had a ne’er do well son (played by Tom Hulce) who had gotten into trouble with the mob.  Robards’ character had put together a plan that would have saved his son’s life, but would’ve required his son to change, to live life in a way other than the way he planned to live it.  The son replied, “That’s a great plan, but let me put a twist on that ...”  

The twist was not to do the plan.

As a species we don’t like being told what to do, but the Nazi’s still managed to convince the soldiers in the camps to six million Jews.  

We are a paradox, I tell you.

Bobby Winters, a native of Harden City, Oklahoma, blogs at redneckmath.blogspot.com and okieinexile.blogspot.com. He invites you to “like” the National Association of Lawn Mowers on Facebook. )





Saturday, August 08, 2020

Owning your years

 Owning your years

By Bobby Neal Winters

I’ve almost finished my 58th year of life.  In English I will say, “I am fifty-eight.”  In Russian, this is said, “To me fifty-eight summers.”  And in Spanish it is, “I have fifty-eight years.”

Anything but your own mother tongue sounds odd, of course, but I like the way it is expressed in Spanish.  Let me explain.

The English way of expressing it makes it a state of being. It’s like “I am a rock; I am a hedgehog.”  This is the way it is and that is all there is to it.  My age is a defining quality.

The Russian makes it sound like the years just happened.  They were a train and I was standing by the tracks, and they just rumbled past me.

Both of these ways of describing it do capture a certain facet of the truth.  They represent different mindsets.

But I like the Spanish way.

My years are things that I own.  Did I take care of my years?  Have my years taken care of me?  DoI treasure them?  Do they provide me comfort?  Do I look at them as if they were a basement that’s filled with rotting refuse?  It depends on the year.

The last week before faculty were set to report back to the university, I took Friday off.  Which is to say, I took it off in whatever way we can take days off after we learned to work from home.

In any case, I took the day off, and I worked on the garage door.  Our new garage is getting close to thirty years old, and even though the opening mechanism has been replaced.  It is the same door.

Our garage door is connected to the garage by rails.  There are wheels on axles that connect the door to the rails.  The wheels fit within grooves on the rails and the axles are attached to the door through hinges.  The hinges are bolted to the door and the axles fit freely through holes that are parallel to the door itself.

I said all of that to say that a few weeks ago, one of the wheels popped out of its groove in its rail.  This caused the door to be stuck open.  At that time, I went out and fixed it.  It wasn’t too bad.  By this I mean there was no blood.  I used my socket set and while the hinges kept wanting to fall off because I was working arms length over my head, I managed to get them back on.  

When I was done, I noticed two things:  One, if I had used clamps, there would’ve been no trouble with the hinges wanting to fall off; and two--duh duh duuuh--the hinge I put the axle through had *two* holes parallel to the garage door.

When I was done, the door closed; the door opened again. Unit test: Passed!

Time passes.  Then comes the last week I will have any flexibility until Thanksgiving, and a wheel pops out of a groove on my garage door.

This was a different wheel on the opposite side.

This time I was prepared. I used my clamps, took off the hinge, reinserted the wheel in the grove, bolted it all back on. I closed the door, and it went down nicely.  

Then, like you do, I opened it again.

And an entirely different wheel popped out of the groove.

This is where we go back to the “duh duh duuuh.”  If there are two holes you can put your axle through, you will invariably put it through the wrong one. I went back over the job and made sure all of the axles were where they needed to be.

Why did I share all this?  It is because there was a time when there would’ve been blood.  There would’ve been trips to the hardware store and, perhaps, to the emergency room.  But “Tengo casi cincuenta ocho anos,” I have almost fifty-eight years.  My years are my asset, and I have taken care of some of them. I’ve learned a thing or two.

Some may have gone passed like a freight train.  Some of them are just me. But I’ve owned some of them and treated them well. 

Bobby Winters, a native of Harden City, Oklahoma, blogs at redneckmath.blogspot.com and okieinexile.blogspot.com. He invites you to “like” the National Association of Lawn Mowers on Facebook. )




Saturday, August 01, 2020

Ruminations on Civilization and Back-to-School

Ruminations on Civilization and Back-to-School
By Bobby Neal Winters
It is not good for Man to be alone.
That’s what God said.
And it was true, but we all got off behind our cell phones, crouching behind our prejudices, huddling behind our opinions, and we forgot.
We  broke our molecular bonds and became atomized.  At first it was by choice.  People can be difficult.  
As this appears in the paper, the university will be starting next week.  
To say that life has been interesting since back in March is to be hilarious by understatement provided you have a broad enough definition of hilarious.  Statements are made and then, in the twinkling of an eye, common sense turns to idiocy.  We have to change; we have to regroup; because we are all trying to do the best we can but we just don’t know.  
A civilization is made from connections.  It is not enough for one person to learn how to make an arrowhead from flint; he must teach other people how to do it.  It is not enough for one person to learn how to weave cloth; she must teach other people to do it.  By sharing our knowledge, by sharing ourselves, we become a part of others.
It is not good for Man to be alone, God said. “I will make an help meet for him.” 
Adam and Eve got busy and made Cain, Abel, and so forth.  You know the story: Just like real life.  So there was a family.
Families are good.  They are the bricks of civilization.  The most basic ways your children learn of how to deal with other people they learn from you in your family.  It is terrifying, I know, but that is just the way it is.
Families are the bricks of civilization, but just as a collection of bricks is not a house, a collection of families is not a civilization.  Just as mortar binds bricks together in buildings, you need something to tie families together in civilization.  There need to be connections between the families.
Something like church provides a good way to do this.  You have regular meetings where you get together and take part in a common activity. There is time before and afterward to meet with other families, with other individuals and catch up.
If I am going to keep pressing my analogy with making a building, the churches we belong to, the churches which determine our values, are where we make our load-bearing walls.
You can live in a house that only has load-bearing walls, I suppose, but the purpose of load-bearing walls is to support other things.  It is all right there in the name.
To be beautiful, we must have ornamentation.  We must put other walls in.  The various practices we have are those walls.  In my analogy, the universities are such walls.  Given my profession, it is very tempting for me to say that the universities form a load-bearing wall, but I cannot support that.  Historically, the universities arose from the Church back in the days when it was singular and capitalized.  That having been said, they still add a lot:  Biology and business; chemistry and construction; music and mathematics; physics and psychology; theater and teaching.  
We impart a lot of knowledge, but we also provide connection.  Each of the students are connected to the university through the faculty, but the university also provides a crucible where they become connected with each other.  Often they find mates at the university, which brings us back to Adam and Eve.
Here we are about to start it all again.  One day a time; one step a time.  Lift your foot; place it down carefully; make sure your footing is solid and only then take another step.
We will also make frequent glances into the blackness in front of us, looking for that pinpoint of light.  We will keep our ears open, listening for the train whistle.
School’s about to start; let’s get back to work.
Bobby Winters, a native of Harden City, Oklahoma, blogs at redneckmath.blogspot.com and okieinexile.blogspot.com. He invites you to “like” the National Association of Lawn Mowers on Facebook. )