Fwd: Which way did the chicken cross the road?
A nice story from a discussion elsewhere on XML... [Assumptions, formatting, parsing components and their designers] Joel Neely wrote:
EWD told a wonderful story about giving an individualized test where the student is presented with a problem and is expected to "think aloud" while designing a solution on the board in the professor's presence. The problem he described involves achieving a specified condition in a single pass across a one-dimensional array, where the obvious solution would sweep back-and-forth multiple times. He had been accustomed (over many uses of this problem) to seeing the students end up with some processing upon elements in "increasing" (left-to-right) positional order.
He was surprised by a student from Israel, who developed an equally valid solution which swept the array in *decreasing* (right-to-left) positional order. He wondered how much growing up reading r-to-l Hebrew instead of a l-to-r European language influenced the way the student conceptualized the problem.
Makes one wonder, doesn't it?!
./Jason
He was surprised by a student from Israel, who developed an equally valid solution which swept the array in *decreasing* (right-to-left) positional order. He wondered how much growing up reading r-to-l Hebrew instead of a l-to-r European language influenced the way the student conceptualized the problem.
Interesting... I would have guessed that a Hebrew student would draw an array like this: [9] [8] [7] [6] [5] [4] [3] [2] [1] [0] i.e. use ascending indices in r-to-l order. But apparently he drew it like we do, and simply reversed his notion of "first" index. Very curious! Nice quote, Jason! --Guido van Rossum (home page: http://www.python.org/~guido/)
Guido van Rossum wrote:
Interesting... I would have guessed that a Hebrew student would draw an array like this:
[9] [8] [7] [6] [5] [4] [3] [2] [1] [0]
i.e. use ascending indices in r-to-l order. But apparently he drew it like we do, and simply reversed his notion of "first" index. Very curious! Nice quote, Jason!
Funny.. Yes math and most computer programs read from right to left, while Hebrew goes the other way. So I suppose doing international math in Hebrew, or with Hebrew writing habits offers at least two contrapuntal models. Arabic is the same also isn't it? Home of algorithms ..hmmmm And what about the vertical column oriented ones? Japanese and Chinese used to be al vertical I think, but are they still? leftbrain-rightbrain-inner~outer~brain Graphic designers deal with this directional counterpoint logic too in interesting ways: 'Text' demands that it follow the appropriate visual layout reading logic. But it is often different from the visual flow rules adn momentum of logotypes, images, icons and symbols. Logo- and display types are right in the magic edge zone between readability [as parsable symbol] and viewability [as compositional elements]. The 'distressed' type movement of the 90's as practiced by David Carson and many others pushed the enevlope of that. And anmaited typogtraphics, motion graphisc do too. TV ads, Film Titles, 'Flash', Signs in the street, Web etc.. For those of us exposed to modern media, the influential forces on our 'reading' habits are huge and complex. Arguably, much broader than the influences and experience of our writing habits. Which is another extreme way if way of saying why computational literacy is so important, and interesting, and why it makes strong modern sense to expose everybody to it. ..Anyway Joel Neely from the Rebol list just sent me his story source: <quote> I think I heard Dijkstra speak of this several years ago. It is referenced in his book A Discipline of Programming (c) 1976, Prentice-Hall, Inc. Englewood Cliffs, NJ ISBN 0-13-215871-X on page 116 under "The Problem of the Dutch National Flag". </quote> ./Jason
On Sunday 13 October 2002 09:35 pm, Jason Cunliffe wrote:
And what about the vertical column oriented ones? Japanese and Chinese used to be al vertical I think, but are they still?
Serious text (e.g. in novels, manga, letters, etc.) in Japanese is still written vertically, starting from the upper right-hand corner and reading down, and then to the left. Horizontal text (reading left-to-right) is used in many technical and mathematical texts, presumeably for ease of mixing with Western scripts and mathematical notation. In my experience, horizontal text is easy to set with Japanese variants of LaTeX, but correctly setting vertical text still eludes me. I believe the same is true of Chinese, but I don't have much experience with that. Interestingly, since Japanese is written at the word or syllable level, it causes less dissonance to read it in an unusual direction, and context often supercedes convention. I've noticed vehicles labelled front-to-back regardless of which direction that implies. They extend this practice to English letters, too, evidently, as I have seen a picture of a Taxi labeled "IXAT" on the right-hand side of the vehicle (the left-hand side would read "TAXI" as you'd expect). Same with ships. (If you think about it, this is more comfortable since the text will naturally scroll in the right direction as the vehicle moves). (Caveat -- I've never been to Japan, so I'm looking at media sources only). More traditional Japanese text, such as on signs will sometimes read horizontally, right-to-left. Presumeably this can be thought of as a series of columns only one-character high. The left-to-right "truly horizontal" mode was introduced from the West. Cheers, Terry -- -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com
Thanks Terry. I love the TAXI story.. Q: Which way did the chicken cross the road? A: Depends which way you are looking! ./Jason
On Sun, 13 Oct 2002, Jason Cunliffe wrote:
He had been accustomed (over many uses of this problem) to seeing the students end up with some processing upon elements in "increasing" (left-to-right) positional order.
He was surprised by a student from Israel, who developed an equally valid solution which swept the array in *decreasing* (right-to-left) positional order.
This reminds me of the electrifying shock I felt when I read through snippets of code in TAOCP: in almost all of his inner loops, the index variable decrements from n to 0, rather than from 0 to n. The reason was that a comparison against zero was slightly faster than a comparison between arbitrary numbers! (It doesn't take much to shock me. *grin*)
[Danny Yoo]
This reminds me of the electrifying shock I felt when I read through snippets of code in TAOCP: in almost all of his inner loops, the index variable decrements from n to 0, rather than from 0 to n. The reason was that a comparison against zero was slightly faster than a comparison between arbitrary numbers!
Many C loops in Python's implementation are written the same way, for the same reason. In fact, the HW you're probably using automatically sets a "was the result 0?" flag on every subtraction, so that no explicit comparison instruction is needed then. There's nothing like learning assembly language for helping you to focus on the wrong things <wink>. the-world-would-be-a-better-place-if-uncle-don-used-python-ly y'rs = tim
participants (5)
-
Danny Yoo
-
Guido van Rossum
-
Jason Cunliffe
-
Terry Hancock
-
Tim Peters