

Even my grandmother got immutability - mrspeaker
http://www.mrspeaker.net/2011/11/28/immutable-nanna/

======
michael_dorfman
Actually, what grandmother got was something different: the problem of
overloading the "=" operator with variable setting. If you instead use, for
example, arrows (as Knuth does in TAOCP) the problem goes away, and
grandmother is no longer confused.

------
giberson
As much as I'd love to imbue his grandmother (and by extension all
grandmothers) with innate understanding of some programming principle that
some seem to have trouble with I'm afraid this event or at least the authors
recounting of this event does not lead to that conclusion.

The grandmother may not have been having trouble with the immutability of X.
Her question was not "how can X be anything other than X?" It was "How can X
be X+1?". Which could convey the more likely case of the unlearned coder not
understanding the order of operation in program flow. I'm sure she understood
that X could be assigned a value, I'm sure she even understood that X could be
changed--what she was having trouble with, most likely, was how could you use
X on the right hand side of the equator? How can you define a value with the
value itself (Circular reference). And I can totally relate--when I first
learned programming it was something that confused myself at first as well. I
hadn't learned that the right hand side of the equator gets evaluated with X
being resolved to it's "present" value which is then used to calculate the
value and finally stored back in the variable.

I hate to be a downer, it certainly is a fond memory, but the initial
supposition is inconclusive.

------
biot
Grandmother parses code as X == X + 1. Hilarity ensues as her confusion of the
misapplication of the equals sign from math is later mistakenly attributed to
a grasp of immutability.

------
sk5t
The article mentions that grandmother was possibly a teacher, and it seems
reasonable for a schoolteacher to be confused by programming's "variable x"
vs. algebra's "unknown x", in addition to the confusion of "assignment
operator =".

------
fogus
Another grandmother gets thrown under the bus. Grandma as the archetype of
computer ignorance is a played out plot device.

~~~
huxley
I've disliked that stereotype for a while.

My mother (who is 68) started off programming with punchcards when she was
working on her Masters in Economics, she eventually moved into executive work
but still kept up her chops with Basic and Fortran well into the 1990s.
Nowadays, she uses VNC to telecommute into work every morning to avoid having
to deal with traffic.

If I had married earlier and had kids as soon as some of my schoolmates did
--and my kids did the same in turn-- she could have been the great-grandmother
of 20+ year olds.

I think we should almost be to the point in computer history where age-based
archetypes/stereotypes of computer ignorance can be safely retired.

~~~
moheeb
Haha...you've got to be kidding!

Have you ever seen an old person drive?

------
skatenerd
sounds like she might not have been confused if the bit to the right of the
equals sign didn't contain an "X".

in other words, maybe it's not mutability that is confusing her.

...this isn't to say i'm not a huge fan of immutability :-)

------
joejohnson
I don't think is relates to immutability. This is an example of the "="
operator being overloaded for assignment.

------
pktm
I have to confess that I read this as his grandmother _acquiring_
immutability, the way, say, one might _get_ "+5 health" in a game.

Why you'd want an immutable grandmother, I'll never know.

------
ionfish
Another nail in the coffin of the claim that imperative programming is more
intuitive, persistently asserted without good evidence.

I submit that when people make claims of this sort, what they usually mean is
actually "I'm used to doing it this way". Some actual studies of how new
programmers learn would be valuable, and allow us to begin to evaluate claims
like the above with at least a modicum of objectivity.

~~~
michael_dorfman
I don't think that referring to a single anecdote as a "nail in the coffin" of
a position while complaining of the lack of "actual studies" in support of
that position is terribly consistent.

~~~
ionfish
The position I'm attacking is the claim that it's just obvious that imperative
programming is more intuitive, not that it _is_ more intuitive. By exhibiting
counterexamples to this supposedly obvious assertion, it's shown that it is
not in fact obvious. Whether imperative or declarative programming is in fact
more intuitive is, of course, not something to be settled by the anecdote give
in the link.

------
bad_user
Sweat anecdote, however it has even less value than people realise.

If you want to explain an algorithm to Grandma, it's far easier to make her
think at cookbook recipes -- X is a cup of sugar, now imagine that at every
step you're adding one more cube of sugar to it.

------
edw519
There are a few quotes from college I'll never forget. One of them was by my
chemistry professor who said, "I have a great deal of respect for the equal
sign."

He put one student's homework on the screen. Instead of answering:

    
    
      A + B = C
      C + D = E
    

she took this shortcut:

    
    
      A + B = C + D = E
    

(Variables replaced for simplification.)

It was clear what she intended, but what she ended up with was a total fail.

Funny this post reminded me of a little incident and a great quote so many
years ago. To this day, I _still_ have a great deal of respect for the equal
sign.

Thank you, Professor State...

[http://sites.allegheny.edu/magazine/fallwinter-2003/best-
abo...](http://sites.allegheny.edu/magazine/fallwinter-2003/best-about-
allegheny/)

[http://www.memorialsolutions.com/sitemaker/sites/hathew0/obi...](http://www.memorialsolutions.com/sitemaker/sites/hathew0/obit.cgi?user=harold-
state)

EDIT: I just realized that Professor State's class was one of the few that
actually helped me develop good work habits for life. I once wrote about that
here on HN:

<http://news.ycombinator.com/item?id=1544573>

------
Thieum22
Great example of "Involuntary Memory" :
<http://en.wikipedia.org/wiki/Involuntary_memory>

------
Muzza
Dijkstra's mother asked the very same question. The story can be found
somewhere in the EWD archives[1].

[1] <http://www.cs.utexas.edu/~EWD/>

