But there is nothing in 'Sally' or 'Bob' that is more descriptive than 'a' or 'b' in this case; in fact, using 'Sally' or 'Bob' implies that whatever you're talking about specifically involves people, however that is of course no the case.
Using non-descriptive single letter names makes total sense in a context like this, since the only semantic associated with those particular elements is equivalence.
I will trot out "it is standard pedagogical practice..."
If someone doesn't have an abstract mental framework (that mathematics and logic require for understanding) to hang stuff like this on, then it is very helpful to restate things in terms that they are familiar with.
Once they understand the specific, then its time to make it abstract: take what they now understand and generalize it - say from people, to predicates in general.
You gotta start where they're at.
What does "!Bob" mean, though? Are we negating the person, or their name? Neither one makes sense to me.
Maybe I'm too far gone down the computer science rabbit hole, but this is far more confusing to me than "!a".
This is a fair statement. I think a treatment of predicates would be necessary before getting to using names as predicates. "When we say 'Bob', we mean 'Bob has enough money for a bus fare'."
Then, if we want to say "Bob doesn't have enough money for a bus fare" we can express it with !Bob (which means, in this case 'not Bob').
I agree that using names can be confusing. I think meaning needs to be addressed first.
Bob and Sally are things that people already understand and relate to. a and b are not, so there is an extra layer of indirection there when attempting to reason about them.
!(Milk || Sugar) == (!Milk && !Sugar), duh.
> Bob and Sally are things that people already understand and relate to.
People understand they're people's names. But that's not a relevant detail for the equation, so why add that to the problem? It complicates, rather than simplifies, my understanding of it.
> !(Milk || Sugar) == (!Milk && !Sugar), duh.
I don't get what the 'duh' is. You've added nothing to the equation! They're just different names!
for a similar example, see [1]. summary: a study presented people with a logical problem. they failed miserably if the question was about abstract math-y stuff, but got it right most of the time if the variables were like `X is underage` and `X can buy beer` (explained in the "Policing social rules" section)
---
[0] as a bonus, we can quickly sanity-check if our reasoning is correct – if there's `no (milk or sugar)` in my coffee, there's obviously `(no milk) and (no sugar)` in it!
This brings up an interesting idea, though - are there any programming languages that "learn" what the user wants by example? What would that even look like?
I think visually for anything logic-based - shapes, lines, venn diagrams, etc - so using such abstract no-meaning variables gives me nothing to put into that mental image. So unless the logic concept is familiar enough, I have to invent something for the variable before I can place it in the construct, in order learn the construct.
Once the logic construct is familiar to me, I have no issues with the abstract variables at that point.
Anyone's productivity in programming can be enhanced by taking a mathematical outlook, although I suppose the beauty of programming is that you don't have to.
To throw in a Dijkstra, "The purpose of abstraction is not to be vague, but to create a new semantic level in which one can be absolutely precise." What do you do when certain semantic levels require some mathematical background - do you choose a less precise abstraction or do you just require that background? I'm not sure what the answer should be for this kind of blog post, but at least intro-to-programming materials should be as accessible as possible.
More bluntly, it doesn’t matter what a and b are here, only the overall meaning of demorgans laws. Arguably, giving them names that are any more than minimal signifiers actually detracts from what’s important I.e. the relationship of the law is important, not the variables Bob and Sally. Personally, having the variables called bob and sally actually makes it harder, because the whole expression immediately becomes far more verbose.
I remember having a hard time working with C for loops until a friend of mine wrote one like this:
Suddenly it all made sense! I am not alone in this! I have taught programming to kids and others who have struggled to learn programming and this seems to be how normal people think.Note: We, as a geeky community are not normal. I just have a strange exception in that at least one little part of me thinks like a normal person and that is with "what we name things" :)