Showing posts with label Boolean algebra. Show all posts
Showing posts with label Boolean algebra. Show all posts

Monday, July 08, 2019

Should Engineers Think Like Computers?



Peter Kreeft is a philosopher at Boston College and author of a textbook on Socratic logic.  So far, so dull, you may think.  I have heard Prof. Kreeft speak on numerous occasions, and "dull" does not apply either to his speaking or his writing.  In the introductory section of his text, he says something that I think engineers need to hear.  It's about ways of thinking and knowing, and the two different competing kinds of logic that are taught today.

If you take a course on logic in college these days, it is most likely going to be what is called "symbolic logic" or "formal logic."  In fact, most electrical engineering undergrads get a sample of this kind of logic when they take digital electronics.  It turns out that digital computers use things called logic gates.  One of the simplest logic gates, called an AND gate, can have two inputs and one output.  As you may know, the numbers in digital computers are in binary form, meaning they have the value of either 1 or 0.  Typically, 1 is represented by a high voltage and 0 by a low voltage.  An AND gate looks at its two inputs, and the only time its output is a high voltage is when both one input AND the other input are high.  Otherwise, its output is low.
           
If you understood that, you have a firm grasp of an element of what is called Boolean algebra, named after the nineteenth-century logician George Boole, who formalized this type of thinking in an attempt to bring the discipline and clarity of mathematics to logical thinking.  Boole's project was taken up by others, and now most philosophers think, do, and teach highly mathematical symbolic logic when they do any kind of logic at all.

But there's a problem with symbolic logic, a problem it shares with computers, whose structure is nothing more than a physical embodiment of symbolic logic.  The old expression "garbage in, garbage out" applies to symbolic logic as well as it does to computers.  Symbolic logic can do marvelously complicated things with its inputs, but it doesn't "know" what the inputs are any more than a copy machine knows Shakespeare after you've copied a page of King Lear with it.  Symbolic logic says nothing about the truth or reality of what you give it.  To understand what things really are, you have to get outside the pristine mathematical structure of symbolic logic and embrace what Prof. Kreeft calls Socratic logic.

It could just as well be called Aristotelian logic or classical logic.  You can get a sense of what gets lost if you think symbolic logic is the only way to think, by reading what Prof. Kreeft says about reason and logic: 

"The very nature of reason itself is understood differently by the new symbolic logic than it was by the traditional Aristotelian logic.  'Reason' used to mean essentially    
'all that distinguishes man from the beasts,' including intuition, understanding, wisdom,    moral conscience, and aesthetic appreciation, as well as calculation.  'Reason' now usually means only the last of these powers." (Socratic Logic, edition 3.1, p. 22)

He goes on to say that as first philosophers and then people in general have accepted these definitions of logic and reason, it's become harder to understand some concepts that earlier ages knew almost without thinking.  Take one of the most basic questions that even five-year-olds can ask:  "What is it?"  That goes to the heart of the being of a thing:  what is a horse or a man essentially?  Not just what is it made of, but what is its true nature?  Symbolic logic doesn't ask such questions.  It is a logic of manipulation and process.  As Kreeft says, instead of trying to understand the fundamental essentials of things, we "think about how we feel about things, about how we can use them, how we see them behave, how they work, how we can change them, or how we can predict and control their behavior by technology."  That last phrase—predicting and controlling behavior by technology—is largely what engineers do. 

And it's a good thing to do, rightly applied, and symbolic logic is essential to the task, especially these days now that everything engineers do involves information technology.  But it is a great mistake to think that symbolic logic is all we need to make our way in the world, and we can safely ignore the questions of what a thing really is on our way to bending it to our technological will.

As Kreeft points out, animals have feelings, use their environment, and even make use of rudimentary tools in some cases.  But we do not share with animals the higher operations of the human mind, including the ability to see connections between apparently different things, and to achieve true understanding about universal concepts such as freedom or love.  No animal and no computer (sorry, all you artificial-intelligence folks) will be able to do that. 

Kreeft is concerned that we will give in to the ancient temptation to idolize the work of our hands:  symbolic logic and the computers it gave rise to.  But if we do so, we will lower ourselves to the level of the beasts, and neglect those powers of the mind recognized by classical logic as what makes the difference between humans on the one hand, and animals and computers on the other hand. 

The takeaway from all this is simply to remind us that scientific thinking in the sense of symbolic logic is not the only kind of thinking or knowing that there is.  Engineers of all people should recognize that they do their work in the context of human society, which is forever beyond the grasp of symbolic logic to analyze or comprehend.  Something more is required.  We can call that something classical logic, or wisdom, or even faith.  But to limit ourselves to the kind of logic that computers can do is to leave our humanity behind. 

Sources:  Peter Kreeft's Socratic Logic, edition 3.1 was published by St. Augustine's Press in 2010. 

Monday, April 18, 2016

Should We Mind Minecraft?


If you've been around teenagers at all in the last few years, or if you are one yourself, you've probably run across someone who plays Minecraft, the computer game invented in Sweden in 2009.  I first encountered it a few years ago when we were visiting my 13-year-old nephew in Kansas.  I sat behind him in his father's car and watched over his shoulder as he constructed some kind of structure with what to me looked like amazing speed and skill.  He showed me some of the elaborate buildings he'd made with it and explained how he played the game with friends who could send wild animal-like creatures his way.  It all sounded rather weird, but at the same time I was fascinated by the basic premise of the game:  unless you build it, it isn't there.

In this week's New York Times Magazine, Clive Thompson, author of the book Smarter Than You Think:  How Technology is Changing Our Minds For the Better, describes the origin, popularity, and multifaceted nature of Minecraft.  It appeals to both sexes and a wide range of ages, and in contrast to many slash-and-burn single-shooter-type games, parental attitudes toward it range mostly from the neutral to the favorable. 

Some people even say that playing Minecraft teaches kids useful skills, ranging from programming and logic design to three-dimensional visualization and the ability to deal with computer-aided design programs.  I suppose some education-psychology wonks will sooner or later divide a group of kids into Minecraft players and non-Minecraft players, and do a bunch of tests on them to see whether any of this is true.  Whatever the results are, I'm willing to go with the idea that Minecraft appeals to the creative part of one's personality, rather than the destructive part.  Although there can be plenty of destruction in Minecraft too—I've seen my nephew wipe out whole virtual city blocks and start over when things didn't go the way he wanted.

All the same, there's something about Minecraft that reminds me of an analogous trend from my own teenage years:  the golden age of electronics tinkering in the 1960s.  Transistors had just begun to replace the bulky, inefficient, and sometimes dangerous vacuum tubes, and for a few dollars spent at Radio Shack you could purchase hours of pleasant fiddling with amplifiers, oscillators, and logic circuits.  And I did. 

Thompson points out that one feature of Minecraft—"redstone"—acts basically like electric current, and you can build switches, relays, and highly complex logic circuits, all without ever having cracked a book on Boolean algebra.  He cites the case of Natalie, a fifth-grade girl, who he observes as she busily debugs her logic circuit when it fails to do exactly what she wants. 

This is good in some ways and not good in other ways, as I can explain from personal experience.

The childhood and teenage brain is never as plastic later as it is then.  Things you learn when you're 16 or younger are going to stay with you in a powerful way the rest of your life.  Depending on what you learn and how you learn it, this can be an unalloyed asset, a mixed asset and liability, or a liability.  With me, tinkering with electronics when I was young has turned out to have mixed results, although the balance sheet turned out to be positive.

Yes, I taught myself to do some pretty impressive things, like building a taped-program robot that could pick up things off the carpet of my room.  I also learned to use old junk as my supply depot instead of earning money to buy new stuff.  And as a kind of lone wolf of the electronics world, I grew up with no connection between what I was interested in and what the rest of the world happened to want.  As a result, my professional career in electronics had a firm technical foundation.  But I have also been plagued by what I recognize now is a bad habit of scrimping and making do with old junk around the lab, rather than asking for project money up front to do the job properly with state-of-the-art equipment.  And I have always had trouble making my own interests conform to what anybody else is interested in, which makes for problems when you try to get outside funding.

Yes, kids who devise what amounts to combinatorial logic circuits when they are ten years old will probably be able to do that pretty well in college, too.  "So that's what it's called!" they may say in their first digital-logic class, and go on to become brilliant computer scientists and designers.  On the other hand, when you reinvent the wheel on your own, you're not likely to approach the subject in a way that subsequent experience has shown to be the most efficient fashion.  People who teach themselves coding often write what college-trained programmers call "spaghetti code"—so tangled and needlessly complicated that nobody else can figure out what's going on, not even the person who wrote it, at least after a while.  So while learning system administration and coding and logic design when you're ten can be cool, you can also acquire some deeply ingrained habits that may turn out to be liabilities in the long run.

Alexander Woollcott, a radio personality of the 1940s, told the story of how the comedian Harpo Marx, after he became famous for his self-taught Broadway performances on the harp with his brothers' comedy team, decided one day he could finally afford harp lessons.  So Harpo found a professional harpist willing to teach him at ten dollars a half hour.  As Woollcott put it, ". . . the Maestro, having heard him play, swore there would be no way of his unlearning all the shockingly wrong things he knew about the harp."  Then the Maestro got Harpo to show him how Harpo did some things with the harp that the Maestro thought were not possible.  At the end of the half hour, Harpo paid his ten bucks, but as he'd been doing all the teaching, he never went back.

Not everybody who plays Minecraft is going to wind up as the Harpo of their techie generation.  And some of them may learn habits that will cause future teachers some distress, as the Maestro felt when he watched Harpo play.  But it's nice that at least one computer game out there invites you to get under the hood of the often opaque computer systems we live with so much and actually make something you can understand more or less completely, because you built it.  And if it breaks, you can try to fix it instead of just cussing the anonymous developers who should know better than to ship defective software. 

The inventor of Minecraft, Markus Persson, sold it for $2.4 billion to Microsoft in 2014 and washed his hands of the whole business after discovering that fielding thousands of inquiries from the millions of Minecraft fans wore him out.  But the thing he invented lives on, and I hope its career in the future will be as benign and instructional as it has been so far. 

Sources:  The article "The Minecraft Generation" by Clive Thompson appeared in the online New York Times Magazine on Apr. 17, 2016 at http://www.nytimes.com/2016/04/17/magazine/the-minecraft-generation.html.  The story (possibly apocryphal) of Harpo's harp lessons appeared in the March 1926 issue of Vanity Fair magazine, the text of which is accessible at http://www.vanityfair.com/news/1926/03/harpo-marx-theater-music.  And at last report, my nephew was running a YouTube channel with a microphone we bought him for Christmas, giving advice to other Minecraft players online.