[Localization] code comments?
Kent Loobey
kent at uoregon.edu
Fri Apr 4 19:29:17 EDT 2008
On Friday 04 April 2008 2:09:57 am you wrote:
> On Sat, Mar 29, 2008 at 3:17 AM, Kent Loobey <kent at uoregon.edu> wrote:
> > I was thinking about code documentation this morning. If the code is
> > supposed to be readable all over the world then how does the comments
> > within the code get translated?
>
> I thought same thing. Source text is just text, I don't think we
> want to embed comments for each language in same place (quite
> difficult to read!).... Traditional code editing tools don't fit
> well here. Any clue?
I considered putting a number with each comment and then in a separate file
putting a description for each number. However I think it would be better if
the translated descriptions are inserted directly into the code where they
apply.
A localization pre-processor might be run to insert translated text into the
activity/program. I haven't done this myself but I know there are commenting
techniques that allow text to be pulled from programs to create a form of
rudimentary documentation. Maybe we could do something along those lines and
then reverse the process and insert the translated text back into the
program. Maybe only """ commented text """ text would be translated.
Helping kids learn how to program is no different to me then facilitating
their learning anything else.
> Besides comments in code, we understand code by name of class,
> data, method. Good code have good names showing meaning clearly and
> that doesn't need much comment.
I have been programming for a long long ... long long time. I have not
however programmed in Python before. Python code by itself is not self
explanatory. So I don't believe that someone who has never programmed before
could look at a Python program even with excellent class names and def names
could figure out how it works.
I agree that the constructs of a program are really just tags and don't make
much difference what language they are in, i.e., a loop by any other name
still just loops. Knowing why the loop is there is important to
understanding what the program is doing and that takes language.
> I think those are usually named in English if the code is indented
> to be used globally. So English skill might be needed anyway to
> understand the code very well ...
>
> /Korakurider
More information about the Localization
mailing list