Non-native english coders : In which language do you comment

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems.

Moderator: Moderators

In which language do you comment your code ?

In English
15
54%
In my native language
2
7%
Sometimes english, sometimes my native language
3
11%
I don't comment code anyways
0
No votes
My native language is english anyways.
8
29%
 
Total votes: 28

User avatar
Bregalad
Posts: 8036
Joined: Fri Nov 12, 2004 2:49 pm
Location: Caen, France

Non-native english coders : In which language do you comment

Post by Bregalad »

I was wondering about this. Because I think I had to comment my code in english if I ever make it public so that people could understand the code.

But it is also a problem because I have to think a lot more to comment my code in english and it makes the coding process slower, also it is slower if I go back to some code I wrote long ago to understand the comment in (poor) english I made.

So I think it should be easier to just comment in french (my language) but then some computer related terms are just untranslatable !
So I end up mixing english and fench in my comments and I don't know if this is a good idea !
Especially becuase I always use english variable names, if they were in french it'd be ridiculously long and unpractical.
User avatar
Jeroen
Posts: 1048
Joined: Tue Jul 03, 2007 1:49 pm

Post by Jeroen »

I write comments in English (and don't do it enough) But to me it's almost like a native language...so it's not really a problem for me.
tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples »

Guido van Rossum, benevolent dictator of the Python programming language, is Dutch, but he comments in English according to PEP 8:
Guido wrote:Python coders from non-English speaking countries: please write
your comments in English, unless you are 120% sure that the code
will never be read by people who don't speak your language.
User avatar
tokumaru
Posts: 12106
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Post by tokumaru »

When programming, I write everything in english: variables, comments, documents, everything. Not because I want people from around the world to understand what I do, but because I think english is more concise and less ambiguous than portuguese, making it more efficient for describing technical things.

The only exception for me is at work, where not everyone speaks english and we make things that deal with real-life things that only exist in our country, so it would be really silly if I tried to describe such things in english.
Shiru
Posts: 1161
Joined: Sat Jan 23, 2010 11:41 pm

Post by Shiru »

It depends from purpose of the programming. If it is something that is going to be released and going to be useful for people from the whole world - in english, if it is something for personal use or is useful for local use only - in my native english. I usually don't comment code for personal use too much, though.

Commenting code in english does not slow down the process, because it is rather formal, with limited set of worlds (this does that, this changes that etc) - it is not a poetry or something.
User avatar
Zepper
Formerly Fx3
Posts: 3264
Joined: Fri Nov 12, 2004 4:59 pm
Location: Brazil
Contact:

Post by Zepper »

Everything in english. :) My mother language is portuguese-br, but I'm always writting C code using english, always. I have no special reason for it...

Image
Denine
Posts: 397
Joined: Wed Feb 17, 2010 5:42 pm

Post by Denine »

"Sometimes english, sometimes my native language"
Actually, it depends on what is shorter.Sometimes I even write mixed sentences.A for source code-I don't belive anypne will even look into it.
User avatar
miau
Posts: 189
Joined: Mon Nov 06, 2006 9:34 am
Location: Potsdam, Germany
Contact:

Post by miau »

All English for me for the same reasons tokumaru mentioned.

I can't even talk about anything computer-related in German without constantly wishing for words as precise as their English counterparts, so I end up with long sentences explaining everything which makes communication in my mother language take longer.

Then again, I suck at everyday conversations. I'd die of hunger having an American breakfast because I wouldn't know how to ask your Dad if he could pass me a particular thing whose English name I forgot.
User avatar
rainwarrior
Posts: 8062
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Post by rainwarrior »

English is my native language, but I've always been impressed that so many non-native-English coders make the effort to leave English comments. I don't expect/demand it, but I do appreciate it. (Non-English comments I attempt to translate if I need to; at least the internet has made rough translation fairly easy these days.)

On a related note, my brain seems to automatically write comments in Canadian English, but uses U.S. spellings like "color" and "center" in the actual code. This may be confusing.
User avatar
Bregalad
Posts: 8036
Joined: Fri Nov 12, 2004 2:49 pm
Location: Caen, France

Post by Bregalad »

I'm surprised how many of you comment everything in english.

Before I commented in english but I figured it slowed down me a lot and I made crappy comments anyways.
English is okay to say "this does that" etc... but when I'm doing complex things involging jongling with the X, Y regs, stack and various temporary variables (which about any routine with deals with complex maths does), it's complex to explain it to myself in english so I prefer using french so I can just write it down and read it without thinking too much.
Useless, lumbering half-wits don't scare us.
User avatar
tokumaru
Posts: 12106
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Post by tokumaru »

Bregalad wrote:when I'm doing complex things involging jongling with the X, Y regs, stack and various temporary variables (which about any routine with deals with complex maths does), it's complex to explain it to myself in english
I'm the exact opposite... I have a lot of trouble explaining in portuguese things that would need really simple and small sentences in english. I find that portuguese either lacks words to properly describe programming concepts or the words that do exist just sound weird. "Scrolling", "array", "register", "mapper" and "bank switching" are examples of things that sound really weird in portuguese, at least to me.

English also has some handy shortcuts that make it easier to describe things... For example, you can say "memory-mapped registers", and you only need the dash to connect the words. In portuguese you absolutely need a preposition to connect them: "registradores mapeados em memória". Not only individual words are usually longer (see "registradores" vs. "registers"), but you also can't take shortcuts that are possible in english.
Celius
Posts: 2159
Joined: Sun Jun 05, 2005 2:04 pm
Location: Minneapolis, Minnesota, United States
Contact:

Post by Celius »

I think if you are releasing code into the public, English is the most universally accepted, so I would recommend English comments in that case. However, if it's just for your own viewing, it's best to do what's easier for you to understand.

Like Tokumaru was pointing out, I think a lot of programming concepts are easier to explain in English. Plus, programming languages are usually much like English, so commenting on it is often like expanding on what the line of code says by itself.

I also can't help but feel like the same words feel a lot more organic in other languages, which throws me off. Like when I read "memória" in Tokumaru's post, I had a hard time thinking of RAM instead of someone's mind. Maybe that's just me, though. Plus I'm not really one to talk because English is my native language.
User avatar
Hamtaro126
Posts: 783
Joined: Thu Jan 19, 2006 5:08 pm

Post by Hamtaro126 »

I live in the USA, And most of us speak English, so I think if anyone were to use only English to comment code, it will make complete sense to 98% of the people, Making it readable for the most part!

English is really the most hard, but yet ESSENTIAL language to learn because of it's semi-universal use.
AKA SmilyMZX/AtariHacker.
User avatar
Gilbert
Posts: 479
Joined: Sun Dec 12, 2010 10:27 pm
Location: Hong Kong
Contact:

Post by Gilbert »

I'll only write comments in English ever, not only because this is easier for me to type and for others to read, but putting anything but English (or, better phrased, anything but standard ASCII) in a plain text file will just mess things up (unless you need to put string messages in another languages in your codes). Accented characters and C/J/K characters aren't actually guaranteed to be displayed correctly when the files are opened in a different system. For example, if you open a Japanese text file with notepad (and even notepad++) in Chinese Windows, 99.95% of the time the Japanese text will only appear as corrupted gibberish. Even opening simplified Chinese files in a traditional Chinese system won't work. (That's why I use Applocale and create shortcuts for launching notepad, command prompt, 7-zip manager, etc. in different languages.)

The introduction of Unicode actually doesn't help much. This problem still persists most of the time.
tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples »

Celius wrote:I also can't help but feel like the same words feel a lot more organic in other languages, which throws me off. Like when I read "memória" in Tokumaru's post, I had a hard time thinking of RAM instead of someone's mind.
I think I know why that might be: the example sentences used in foreign language classes refer to organic subjects. They don't try to teach a language and computer science at the same time. Imagine how "Memory, all alone in the moonlight..." must sound if you've been installing RAM all day in a computer factory.
Gilbert wrote:The introduction of Unicode actually doesn't help much.
I think I know why that might be too: Microsoft prefers UTF-16 over UTF-8. Writing foreign language comments in BOM-less UTF-8 is probably the cleanest way to do so in programming languages that expect the program to be written in ASCII, and it appears common practice on UNIX. But as I understand it, it isn't possible to set a Windows app's default code page to UTF-8 the way it is with certain other multibyte code pages such as Shift JIS. Furthermore, Windows Notepad forces you to insert the BOM whenever saving a UTF-8 file, which causes programs to fail to compile because compilers don't know what to do with a BOM that isn't marked as a comment.
Post Reply