On Monday 12 December 2005 21:39, Amit Aronovitch wrote:
> guy keren wrote:
> >below is a summary of the yesterday's lesson, followed by my conclusions.
> >
> >yesterday we were supposed to teach about ifs and about strings. amit
> >pointed out that in the ifs part i rely on some strings knowledge and i
> >should reverse the order, so i did that.
> >
> >in the class, i found that teaching about strings took longer then i
> >thought. the use of 'for' loops got the kids confused - they didn't find
> >it easy to grasp the idea that the for variable points to a different item
> >in each loop. i only realized this when i explained how to use such a fo
> >
> >
> >loop in order to reverse a string (by which point they had to understand
> >two things - how the for loop works, how string concatenation can be
> >performed from a variable into itself (revstr = letter + revstr), and how
> >the reversal happens at all.
> >
> >we had to draw it step by step over the blackboard for things to be clear,
> >and even then it wsn't clear for everyone (at least according to the
> >puzzled looks on their faces).
>
> For easier understanding of for loops, do you think it might work better
> if you use a long, meaningful name like current_number to the variable?
> This way would not expect it to be constant ("current" implies changing
> value).
> (if there's a chance they'll miss the English meaning, might try
> translit hebrew, e.g. 'mispar_nochechi')

Actually, the correct transliteration of the Hebrew word "נוכחי" to English is 
"nokhechi" or "nokhehhi". That's because a soft "Khaf" should be 
transliterated to "kh".

But variable names in foreign languages are Evil. I recall seeing a C program 
written in French. Could not make heads nor tails of it.

Regards,

        Shlomi Fish

---------------------------------------------------------------------
Shlomi Fish      [EMAIL PROTECTED]
Homepage:        http://www.shlomifish.org/

95% of the programmers consider 95% of the code they did not write, in the
bottom 5%.

לענות