Thread: Programming in foreign languages

  1. #1
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,823

    Programming in foreign languages

    I've just been given a program written by someone else here to finish up. It's about 85% complete, but he needs more time to focus on some other jobs, so I inherited it. The author's originally from Ecuador, and going through his code, I'm noticing that every one of his variable names are in Spanish. Right now, I'm looking through the 50-odd pages of code and feeding words I don't know into babelfish. (also, there are no comments at all in this code, but I don't know if that matters, since I wouldn't be able to read it anyway)

    This kinda got me thinking. I know that we've got people from all over the globe here, and presumably some people working for companies where the common language is not their own. When you write programs, do you normally write it in your native language or in the one that's more convenient for the other people around you?

    Not the most interesting question in the world, I guess, but it's better than figuring out what the guy meant by "For each archivo in subcarpeta"

  2. #2
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,829
    For each file in the subfolder?

    Otherwise, depends on the employer/client/project/situation.

    Often a client or customer will never see the code so they are out of the loop.

    Installation standards usually define the working language for naming variables and so forth, where they do not, the project team/manager usually decide. Big projects with a lot of foreign workers usually have English as their house language.

    At home, I use a mixture of English and Danish. It seems to depend what I am doing/mood/phase of the moon/other. I actually had to go and look, as I don't tend to think about language unless it is non Danish/English. Since I read either equally well, it is unimportant to me unless the code is likely to be seen by others.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  3. #3
    Registered User
    Join Date
    Apr 2004
    Posts
    100
    I've wondered about that myself. Thank god I speak english, otherwise I'd have that to contend with when learning a programming language. I wonder if there are compilers that use "native" keywords? For instance instead of "Include, for, using", you'd have""Incluya, para, el usar" . Of course maybe that'd be more trouble than it's worth.

  4. #4
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,823
    > For each file in the subfolder?

    Yeah, I figured that out, thanks to babelfish. I've got a postit with my quick-translation guide on it now The only thing I'm really worried about is abbreviations where he uses part of a Spanish word and I can't figure out any meaning.

    > Often a client or customer will never see the code so they are out of the loop.

    Usually that's the case here (I would assume that's why there are no comments, at least). He was really resistant to the idea of handing it over to me - probably because of the bad style, use of Spanish (my boss told me he's been warned about that before), and job security.

    > I wonder if there are compilers that use "native" keywords?

    I was wondering the same thing.

  5. #5
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    I ran into this as well when researching graphics. Downloaded some code from the net and then realized all the comments and all the variables were in german. Took me forever to figure out what each variables was.

    I guess just because its in C/C++ doesn't mean the entire C/C++ world is going to understand your code. After all your variables, function names, class names, macro names, etc, etc., are all probably words that are native to your spoken language.

  6. #6
    and the Hat of Clumsiness GanglyLamb's Avatar
    Join Date
    Oct 2002
    Location
    between photons and phonons
    Posts
    1,110
    When coding for any programming class in school i use my native language ( dutch ), since its compulsory.
    On the other hand while writing code which is not schoolwork i do it in english...
    I didnt used to write it in english but i can still remember one of the very first times i posted some code here it was in dutch, i got little response , i even had to edit my code and translate all my variables, after that experience i just decided i should always write it in english.

    Greets,

    Ganglylamb.

  7. #7
    Registered User
    Join Date
    Dec 2001
    Posts
    367
    Swedish.

  8. #8
    Registered User whackaxe's Avatar
    Join Date
    Mar 2004
    Posts
    332
    often when i code french projects, i force myself to give french variable names and stuff, but french is the worst language to use with computers. there isn't any real translation for login/logon (i use the word connection). sometimes i slip though and start commenting in english
    I loathe pointers

  9. #9
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,829
    >>> I wonder if there are compilers that use "native" keywords?

    A little creativity with the pre-processor could produce that. Hmmm...
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  10. #10
    All code is writen in English where I work. Fo comments, you can choose (dutch or english)
    I usualy make all my comments in English because the source is property of our customers and thir native tongue can be dutch or french.

  11. #11
    S Sang-drax's Avatar
    Join Date
    May 2002
    Location
    Göteborg, Sweden
    Posts
    2,072
    When I program, it can actually be easier for me to write comments and name variables in English, rather than Swedish. The programming language is in English, along with the documentation, most web resources and message boards, so it becomes natural to write my comments in English.

    A little creativity with the pre-processor could produce that. Hmmm...
    You could translate most of C++ into your language of choice using the preprocessor, but you'd still be stuck with #include, #ifdef etc.
    Last edited by Sang-drax : Tomorrow at 02:21 AM. Reason: Time travelling

  12. #12
    Bob Dole for '08 B0bDole's Avatar
    Join Date
    Sep 2004
    Posts
    618
    It makes it fun when the variables names don't have any meaning, like : int asdhjjghsdf;

    reading code like that is fun, I do it in my spare time.
    Hmm

  13. #13
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,868
    I was working for a Polish boss. We had Russian, Sri Lankan, Canadian, Chinese, Korean, Italian and Australian workers (in a team of 10).

    With the accents, and technical terms, it took me a month before I could understand what was going on in the team meetings.
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

  14. #14
    Bob Dole for '08 B0bDole's Avatar
    Join Date
    Sep 2004
    Posts
    618
    >We had Russian, Sri Lankan, Canadian, Chinese, Korean, Italian and Australian workers (in a team of 10).

    Holy crap. (what the I am sillyI am sillyI am sillyI am silly is Sri Lankan?)
    Hmm

  15. #15
    Toaster Zach L.'s Avatar
    Join Date
    Aug 2001
    Posts
    2,686
    Island sorta south of India.

    *edit*
    Well, just slightly southeast.
    The word rap as it applies to music is the result of a peculiar phonological rule which has stripped the word of its initial voiceless velar stop.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Why C Matters
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 136
    Last Post: 01-16-2008, 09:09 AM
  2. Strange loop
    By D@rk_force in forum C++ Programming
    Replies: 22
    Last Post: 12-18-2004, 02:40 PM
  3. Languages dying
    By Zewu in forum A Brief History of Cprogramming.com
    Replies: 31
    Last Post: 07-29-2003, 10:08 AM
  4. Languages
    By KrAzY CrAb in forum A Brief History of Cprogramming.com
    Replies: 23
    Last Post: 02-18-2003, 12:23 PM
  5. Programming Languages
    By DarkViper in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 12-12-2002, 02:28 PM