News for hackers. Stuff that matters.
Re:Geographically isolated bugs by pavel_lishin on Tuesday January 13, 2015 @07:07PM (#8883447)
> the most important reason, it allows the most people on this planet to understand it

But I'm usually not writing code for most people on the planet. I'm usually writing it for work, or myself.

> I worked on a Korean piece of code. All the variable names were in English but the comments were in Korean. Why, just why?

Because the writers were probably not fluent in English! The purpose of a comment is to explain something; if you cannot explain it fluently, then the comment is useless.

I speak a tiny bit of Spanish, but if history had turned out differently only in that Spanish was the language 99% of programming was based on, I would still not leave comments in Spanish, because they would be nearly incomprehensible to everyone, including myself.

> at the end of the day you need to understand two languages in addition to the programming language.

At the end of the day, someone needs to learn two languages; you're saying that it should never be you, but someone writing some code you happened to run across.

Re:Geographically isolated bugs by kijin on Tuesday January 13, 2015 @09:12PM (#8883880)
> The purpose of a comment is to explain something; if you cannot explain it fluently, then the comment is useless.

Exactly. If a piece of code needs a comment in the first place, it means that there's something subtle about the task that cannot be fullly conveyed using code alone. But that's exactly the kind of thing that people have trouble expressing clearly in a non-native language.

I would much prefer a clearly written comment in another language that I can ask a colleague to translate for me, than a misleading comment in English.

Re:Geographically isolated bugs by kruczek on Wednesday January 14, 2015 @08:05AM (#8885941)
> But I'm usually not writing code for most people on the planet. I'm usually writing it for work, or myself.

Even in such cases I tend to write code and comments in English, which is not my native language. English naming convention just fits better with English keywords and yeah, who knows if I'll really be the only one reading that code..

> Because the writers were probably not fluent in English! The purpose of a comment is to explain something; if you cannot explain it fluently, then the comment is useless.

Well, sorry, but in such case I am tempted to consider writers of such code as amateurs. In this age, if we speak about anything more than the smallest local projects, then English is a de-facto standard language to be used for coding (naming conventions and comments).

If a comment doesn't explain something fluently, then it may still be useful - it may provide hints as to what is going on. But if a comment is in an unknown language, then it is completely useless clutter, a distraction which just makes the code itself harder to read. So yes, I'd rather prefer a writer to use his not-so-fluent English (which actually is quite common in many projects; and this also gives the writer an opportunity to improve his English) rather than write in another language, which most likely won't be understood at all.

> At the end of the day, someone needs to learn two languages; you're saying that it should never be you, but someone writing some code you happened to run across.

He mentioned English is not his native language, so he already learned two languages.