osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Grapheme clusters, a.k.a.real characters


On Wed, 19 Jul 2017 12:10 am, Rustom Mody wrote:

> On Monday, July 17, 2017 at 10:14:00 PM UTC+5:30, Rhodri James wrote:
>> On 17/07/17 05:10, Rustom Mody wrote:
>> > Hint1: Ask your grandmother whether unicode's notion of character makes
>> > sense. Ask 10 gmas from 10 language-L's
>> > Hint2: When in doubt gma usually is right
>> 
>> "For every complex problem there is an answer that is clear, simple and
>> wrong." (H.L. Mencken).
> 
> Great men galore with great quotes galore?
> Here are 3 ? take your pick:
> 
> Einstein:
> If you can't explain something to a six-year-old, you really don't understand
> it yourself.
> 
> [Commonly attributed to Einstein
> More likely Feynman, Rutherford, de Broglie or some other notable physicist
>
https://skeptics.stackexchange.com/questions/8742/did-einstein-say-if-you-cant-explain-it-simply-you-dont-understand-it-well-en
> ]

More likely none of the above, but invented by some non-expert who wanted to put
down the value of expert knowledge, and thought a bogus argument by authority
was the best way to do it. (Einstein said it, therefore it must be right!)

Think about it: it simply is nonsense. If this six year old test was valid, that
would imply that all fields of knowledge are capable of being taught to the
average six year old. Yeah good luck with that.

But even if we accept this, it doesn't contradict the Mencken quote. I can
explain the birds and the bees to a six year, at a level that they will
understand. That doesn't mean that (1) I am an expert on human reproduction; or
that (2) people should ask the six year old for advice about human
reproduction.

The second part is the problem. I understand how cars work, to an acceptable
degree that I could probably explain it to a six year old. But if you came to
me to ask my advice about buying a car, or repairing a car, you'll get bad
advice. I'm not an expert and I don't know enough to give *good* advice. Same
with your "grandmother" test.

Yes, I'm sure that most "grandmothers" (I know that's just shorthand for 
"regular people who aren't experts") will have an intuitive idea of what a
character is. But what on earth makes you think that intuitive idea is both
*necessary and sufficient* for programming?



> Dijkstra:
> 
> Programming languages belong to the problem set, not (as some imagine)
> to the solution set
> https://www.cs.utexas.edu/users/EWD/transcriptions/EWD04xx/EWD473.html

Relevance?

That's just the "Now you have two problems" observation, reworded for
programming languages in general rather than just regular expressions. How is
it relevant?

It seems to me that you are just tossing random quotes out in the hope that some
of them might stick. Two can play at that game:

"He who questions training only trains himself at asking questions." 
- The Sphinx

"Must ? defy ? laws ? of ? physics ?"
- The Tick

"Whenever Giles sends me on a mission, he always says 'please'. And afterwards I
get a cookie."
- Buffy the Vampire Slayer


The bottom line is, your "grandma" test dismisses the value of expert domain
knowledge. As programmers, we need access to expert domain knowledge, even if
we don't hold it ourselves, we need to trust that the people who wrote our
libraries had it.


-- 
Steve
?Cheer up,? they said, ?things could be worse.? So I cheered up, and sure
enough, things got worse.