All posts by Charles Wells

Structured programming

Adam Barr mentioned recently in his blog that Edsger Dijkstra said, “It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration.”

I have some personal history relevant to this. I started programming in Microsoft Basic in 1979 (I think) when I bought an Apple II Plus. During the next few years I found myself teaching various courses in theoretical computer science at CWRU and in the process learned about many of the early ideas called structured programming. (This was before object-oriented programming came along.) One main point was that you could do everything with assignment statements, if-then-else and while.

My experience was that once I absorbed these ideas and had done some programming in Algol and Pascal I found that I had achieved more clarity and efficiency in programming in Basic on my home computer. What I was doing was implementing the if-then-else and while structures using Basic’s IF and GOTO. Doing this achieved some modularity by separating out the subroutines as separate blocks of code and avoiding GOTOing to the middle of a subroutine.

For what it is worth, this is evidence that Basic didn’t necessarily permanently ruin people. But I have to say that I had programmed in Basic for only two or three years before I started being Structured, so maybe it takes longer to ruin people.

Send to Kindle

Who owns the language?

Back in Ancient Times (even before Elvis) computer people had to deal with the problem that printers did not distinguish between the digit zero and the letter “O”. So they designed printers that printed “Ø” (a circle with a slash through it) for zero. For many years after that students in technical fields wrote their zeros “Ø”. This became a mark of their subculture – they were conscious of doing it as a statement of their geekhood. (See note 1).

Some countries have tried to reform their languages. In 1951 the Norwegian powers that be tried to get people to say the equivalent of “forty two” instead of “two and forty”. This was desirable because it causes confusion when telephone numbers are pronounced. For example, “2317 3251” would be said as if it were “three and twenty seventeen two and thirty one and fifty”. As this article shows, fifty years later a sizeable minority of Norwegians were still saying it that way.

Both France and Germany tried some modest spelling reforms in the 1990’s. Both met with stiff opposition and have had only spotty success.

Perhaps the most annoying bug in English is the fact that “two”, “to” and “too” are pronounced identically. (See note 2) This could be repaired easily by having everyone use the Scottish form “twa” (the confusion in practice comes mostly between “two” and one of the others). But if a joint Anglo-American commission tried to introduce this all hell would break loose. A minority would probably start using it, but I predict many local American school systems would try to ban it.

Technical people have a different feeling about changing their language. Some technical fields have organizations that occasionally promulgate changes in terminology. This can be good. What is really really bad is the practice of some mathematicians to redefine commonly used terms at the beginning of a book rather than introducing new terms. This makes it difficult to dip into the middle of a book (what Steenrod called being a “grasshopper”) or to have conversations with people in different fields. I ran into this when I was a brand new professor in a department with topologists who talked about “free groups”, by which they meant free Abelian groups. That raised this abuse to my consciousness and I have noticed many examples since then. One of the most egregious was that Bourbaki tried to redefine “positive” to mean “nonnegative”. A few people still follow that usage, including, I am told, some French public schools.

Note 1 Someone please give me a good internet reference to marks of subculture – the wikipedia site is too narrow. See my comments on grits in the covert curriculum.

Note 2 Actually, “to” may be pronounced with a schwa when it is unemphasized. But it is emphasized when you read a highway sign that says “to 95”, which sounds like “295”.

Send to Kindle

More about neurons and math

In the last post I talked about a neuron assembly in the brain that when it fires makes you feel you have been in the current situation before, and another neuron assembly that makes you feel that you are dealing with a persistent object with consistent behavior. I want to make it clear that I don’t know precisely how these brain functions are implemented, and I know of no research literature on these topics.

Brain research has shown that many different kinds of behavior, including thinking about different real and unreal things, causes activity in specific parts of the brain. I claim that the idea that there is a déjà-vu site and a persistent-thing-recognizing site is plausible and consistent with what we know about the brain. And they are far more plausible than any explanation of déjà-vu as coming from past lives or any explanation that mathematical objects are real and live in some ideal non-physical realm that we have no evidence for at all.

Another point: If our perception that when we think about and calculate with math objects we are dealing with things that are “out there” comes from the way our brains are organized, then we mathematicians should feel free to think about them and talk about them that way. We are making use of a brain mechanism that presumably evolved to cope with physical reality, as well as a general metaphor-mechanism that everyone makes use of to think about both physical and non-physical situations in a productive and creative way.

This point of view about metaphors has a lot of literature: see the section “about metaphors” here.

Again, it is a reasonable hypothesis that the metaphor-mechanism is implemented in some physical way in the brain that involves neurons and their connections.

To sum up, when we mathematicians think and act like Platonists we are using some of the main mechanisms of our brain for learning and creativity, and we should go ahead and be Platonists in action, without feeling embarrassed about it and without subscribing to any idealistic airy-fairyness.

Send to Kindle

Mathematical Objects are "out there"?

(This article is continued in More about math and neurons).

Sometimes we have a feeling of déjà vu in a situation where we know we have never been before. I have had two very strong occurrences of that in my life. One was when I saw St Cuthbert’s Church in Wells in England, and the other was the first time I saw St Martin’s in the Fields in London. Now my ancestors are mostly from England, some even from the south of England (the English ancestors of most white southern Americans are from the north of England, as are some of mine). Was this ancestral memory? Was it memories from a Previous Life? Well, I didn’t believe that, but the feeling was remarkably strong.

Many years later I discovered the reasons for the feelings in both cases. Adelbert Stone Chapel on the Case Western Reserve University campus in Cleveland (where I taught for 35 years) is an exact copy (on the outside) of St Cuthbert’s Church. Independent Presbyterian Church in Savannah is a three quarters size copy of St Martin’s in the Fields, and when I lived in Savannah as a teenager I frequently rode past that church on the bus.

There is presumably a neuron assembly (or something like that) in the brain devoted to recognizing things “I have seen before”. No doubt this can be triggered in the brain by mistake. Being triggered does not have to mean you had a previous life, it may mean a mistake in the recognition devices in your brain. The fact that I eventually understood my two experiences is in fact irrelevant. If you have the feeling of déjà vu and know you haven’t been there before and you never are able to explain it it still doesn’t prove you had a previous life or anything else supernatural. The feeling means only that a certain part of your brain was triggered and you don't know why.

When I deal with mathematical objects such as numbers, spaces, or groups I tend to think of them as “things” that are “out there”. Every time I investigate the number 42, it is even. Every time I investigate the alternating group on 6 letters it is simple. If I prove a new theorem it feels as if I have discovered the theorem.

There is also presumably another neuron assembly that recognizes that something is “out there” when I have repeatable and consistent experiences with it. Every time I push the button on my car door the door will open, except sometimes and then I consistently discover that it is locked and can be unlocked with my key. Every time I experiment with the number 111 it turns out to be 3 times 37. If some math calculation does not give the same answer the second time I frequently find that I made a mistake. I know this feeling of consistent “out there” behavior does not prove that numbers and other math objects are physical objects. The feeling originates in a brain arranged to detect consistent behavior. The feeling is not evidence that math objects exist in some ideal space.

Send to Kindle

Special cases

Adam Barr’s blog “Proudly Serving My Corporate Masters” has a post on the controversy over whether a Square class should be defined in object oriented programming as inheriting from a Rectangle class. You can find lots of argument about that by typing “square rectangle Liskov” (without the quotes!) into Google. This controversy is based on technical aspects of OOP, but the controversy about whether a square is a rectangle has been around for years.

According to modern mathematical usage, a square is a special case of a rectangle. (Euclid did not include squares in rectangles, although I can’t give a reference to this.) This post concerns some of the issues in math and logic connected with special cases.

A rectangle is given by two parameters, the length and the height. Call them L and H. A square is the special case of a rectangle satisfying L = H. (Note: I am talking about a rectangle independently of how it drawn in the plane. You need six parameters to define a rectangle embedded in the plane.)

Rectangles and squares are an example of the following phenomenon: A certain family of math objects is defined by parameters. A subfamily is defined by setting two (or more) of the parameters equal, or by fixing the value of one of the parameters. Such a subfamily may be called an equationally defined family or a variety. Sometimes such a subfamily is said to be degenerate.

Mathworld refers to a square as a degenerate rectangle. This says something interesting about the images and metaphors we use in math. I would have said a square is a specially nice kind of rectangle. Saying it is degenerate disses it. Of course, the technical definition of “degenerate” says nothing about a square’s moral failings, but the word’s connotations are negative.

Not all special cases fit this equational pattern. For many mathematical structures, the definition allows the structure with empty underlying set to be an example. For example, a topological space is allowed to be empty. If you define semigroup to be a set with an associative binary operation, that definition allows the underlying set to be empty, but in fact some texts explicitly add a requirement that excludes the empty set. This has been the source of considerable irritation between researchers in universal algebra and researchers in categorical model theory.

If your definition of the structure includes the requirement that some element with a certain property exists, then the structure must be nonempty. That’s why groups are nonempty – they have to have an identity. So the behavior of special cases depends on the logical form of the definition. In particular you could define rectangles as having two parameters L and H together with the requirement that L not equal H. Then squares would not be rectangles. But that is not the way we do it nowaways, not for rectangles.

But in some other math definitiions, we rule out two parameters being equal. The definition of field always requires 0 not equal 1, although Mathworld appears to add the requirement only as an afterthought. The definition of Boolean algebra sometimes requires that T not equal F and sometimes not. MathWorld gives several definitions, some allowing T = F and some not. Wikipedia’s definition of Boolean algebra said until recently that a Boolean algebra has “…two elements called 0 and 1…” It did not say they must be distinct in the axiom but in the examples it said that the two-element Boolean algebra is the simplest example. Since 18 October 2006 Wikipedia has said they must be “distinct.” This change was added by SixWingedSeraph, who is either a close relative of mine or not depending on your attitude toward special cases.

There must be some fairly deep seated psychology underlying the decision to allow some special cases and exclude others. Certainly the naïve abstract math newbie tends to assume (subconsciously) that special cases should be excluded, with the consequence that the uppity math majors (and sometimes the teacher) disses the student as stupid, etc.

Note: When I wrote this, Microsoft Word put a diaeresis over the “I” in “naïve” without asking me first. Who said it could?

Send to Kindle

Heschl's Gyrus

This report from Science Daily describes the discovery of a correlation between the size of “Heschl’s Gyrus” in the brain and the ability to learn foreign languages. It also mentions an intriguing study that found that musical training started at an early age contributed to more successful spoken foreign language learning.

I have been pushing the idea that learning abstract math requires (among other things) learning a foreign language. So, I wonder, does the size of Heschl’s Gyrus correlated with ability at higher math? Also, the study about musical training suggests a reason for the commonly noted tendency for mathematicians to be musical, but I suppose that idea is pretty longshottish.

Send to Kindle

Shape note singers use illegal vowels

According to the rules of English phonetics, certain vowel sounds cannot occur in an open syllable – a syllable that does not end in a consonant. Among these are the vowels we used to call the “short” vowels in school – the vowel sounds in pat, pet, pit, pot, put and putt. Other vowel sounds, such as those in made, need and mode, can occur in open syllables, witness may, me and no. I can’t give references for this claim since my linguistics books are in Ohio and I am in Wisconsin.

It sounds to me that traditional Sacred Harp singers in the south use the sound of the vowel in “pet”, or perhaps “pat”, to pronounce the indefinite article “a” and the vowel in the definite article “the”. This is intriguing. Could they be preserving the old sound of the vowel in those words before it became schwa? There is precedent for preserving sounds in singing that have been lost in speaking, for example in French: “Frère Jacques” is four syllables in the song and two in speech.

I wish I could give a link to a recording that shows this phenomenon with the articles. I listened to some of the videos of southern singings on YouTube but the sound quality is too bad to be evidence. I am posting this on the shape note mailing list asking whether other singers agree with my observations and whether anyone knows convincing examples of recordings with this pronunciation.

Schwa is written “ə” in linguistics. It is the sound of many unaccented vowels in English, for example the first vowel in “about”. By the way, many American southerners, including me, have a second schwa-like sound in many words that in midwestern speech are pronounced with the usual schwa. It is a very short sound like the “i” in “pit”. The only minimal pair I can think of for my speech is “carrot / caret” (I thought about it for a whole ten minutes). The spelling is only partly correlated with the sound – I use the i-colored schwa in “senate” and “minute” (the 60th of an hour) but the regular schwa in “venal” and “sinus”.

Send to Kindle

Thinking without words

Several times in my life I have been infuriated by people contradicting something I said that I knew was true. (“You can’t cross the border between Georgia and North Carolina. They don’t border each other”. I have only done it about fifteen times.)

One of the most annoying are the people who tell me I can’t think without words. This seems to be the opinion mostly of logicians and computer scientists (but I think only a minority of them). When I am concentrating on math or on a physical repair job I USUALLY think without words. And in many other situations as well. The result is that when someone asks me what I am doing I am literally at a loss for words. I have to deconcentrate and come up with a verbal explanation of the nonverbal thinking I was doing. Which makes me look as if I don’t “know” what I am doing.

When I need to memorize the sequence 6785 (part of our car’s license number) I visualize the numbers 5678 with the five leapfrogging over the other numbers to end up on the right. I don’t say the numbers, I picture them. This has enabled me to write down the license number on the motel application without having to drop my bags and dash out the door to look at the car, which is usually parked the wrong way for me to see the back end.

When I stare at a chain of gears to see which way one of them goes when I turn another one, I visualize the turning of each intermediate one, one at a time. I don’t say or think “clockwise, counterclockwise” and so on, I see them turning and I feel kinetically the top of one going clockwise moving to the right – I sort of feel MY top (shoulders and arms) moving to the right.

When I see a pullback diagram I feel the upper left corner being pushed down and to the right so as to be the last corner of all the squares with the same bottom and right edge. I don’t think the words “pullback square” unless I am in the process of trying to formulate a claim about it.

I learned that I do this from reading Zen and the Art of Motorcycle Maintenance. That really wasn’t the main point of that book but it is what I remember most vividly from reading it.

Send to Kindle

Harry Potter's English

Last night I saw the latest Harry Potter movie, Harry Potter and the Order of the Phoenix. As with the previous one (Goblet of Fire), which I watched on DVD, I had a lot of trouble understanding much of the dialog. Because of that previous experience I paid more attention to my problem this time and discovered that it was primarily the young people that I had trouble understanding. I don’t remember having this problem with the first four films.

Relevant background: I am a retired professor and have known and spoken with British academics for 40 years, and have spent several months living in Britain as well (Oxford and London). I am also hard of hearing.

Evidently, British young people, even educated ones, speak quite differently from their parents and grandparents. This is not just my experience: linguists have noticed it, for example the phonetician John Wells here (for 29 August). That site provides a clip of a young member of the aristocracy speaking. I can’t understand her either.

I had no problem understanding the actors who played the adults in the HP movies; I have had a lot of experience with that sort of accent (Scottish as well as southern English).

The American audience in the movie theater (in rural northern Wisconsin) had no problem with the kids. They laughed several times at verbal interactions between them that I didn’t understand.

I had less trouble understanding Daniel Radcliffe and Emma Watson in the interviews here. Is it possible that in the movie they deliberately spoke like British teenagers and during their interview they used their usual speaking-to-adults dialect?

I expect to watch these movies a second time on a DVD player with the subtitles turned on!

Send to Kindle