Renaming identifiers & debugging
Luca
lucat at despammed.com
Thu Feb 25 19:06:10 EST 2010
News123 wrote:
> a pragmatic approach might be to preprocess the source code
> and keep the original version as comments above the translated line.
> (for debugging)
Not very nice to see though. This change should be transparent to the
kid, he/she should not be aware of this "translation".
> or to preprecess the input line before the 'exec'.
This could be a solution, yes, but then i would also need to figure out
a way to show the original line when debugging (still, i know nothing
about pdb, maybe it is possible in a easy way).
> It might be, that kids are flexible enough to use English words without
> understanding them.
>
> My younger brother could write Pascal before he learnt any English and
> he never cared, what 'if' 'then' 'else' 'for', etc. meant.
I had a similar experience. When i was a middle schooler i knew nothing
about English and so i learned Basic and then Pascal without actually
knowing that those words had a meaning at all. For me they were just
kind of "magical words" that i could use to tell the computer what to
do. So i know for sure that this is possible. But... imagine the use of
this language in a elementary school. Some kids, like me or you or your
brother would be interested enough to find it easy to learn the new
words. For others it would only be a pain. Another lesson among others
that to them makes no sense at all. If we could make it easier for them
to understand the words used in the language the teacher would have an
easier time to explain some concepts and maybe even these kids could
have fun and begin to love it.
I understand that this "breaks" the language, that it would be better if
they would just learn the "original" language... but most teachers would
ask "then why not use Logo instead? it is already in our language..."
I have nothing against logo of course, i have learned it myself even
before Pascal and i had lots of fun with it. But python is much more
widespread than logo and i think in some ways it makes "more sense" than
logo and it is not much harder. The only problem that i see is that Logo
does have its commands translated while python doesn't nor, it seems,
there is an easy way to add this functionality.
> It might be useful though to internationalize the python errror messages
> if that's not something already done.
Yes, this would be very important... but still, it should be easy for
the teacher to translate the messages to make them more understandable
to the kids.
For instance...
* Python:
>>> draw
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'draw' is not defined
* Logo:
? draw
I don't know how to draw
Logo's message, while maybe too simple for a professional developer, is
certainly much more easy for a kid. So you see, it is not just a matter
of internationalization... it is also a matter of users-target. If i am
talking to a young kid i should use words and concepts that are easy for
him/her to understand... so, for my target, it would be very important
not only a correct translation in my language, but also the use of words
and concepts that are familiar to a kid.
Thanx,
Luca
More information about the Python-list
mailing list