How To Write In English?

How do non-English speaking people write code, when the syntax is in English?

  • How would they code Java or PHP or Javascript or any major language, when the syntax is written in English. Also the errors it throws is in English as well. How would they know what the error means. Some errors can be pretty verbose.

  • Answer:

    For non english speaking developers the opposite thing is even more surprising: how does english speaking developers write code? Every word actually means something in their language! That idea looks silly for non english speaking developers. For us (for whom english is not native) it is only the set of abstract commands. We understand what they do and use them when we need them. It's like learning new language: initially you just know what the word means and how to use it, it's a mapping, like any other non-programming language. You don't think of "protected" as of actually something you need to protect. You don't think of "break" as of something you need to destroy. These words simply does not have any mapping in the native language, unless you know english. So you kind of add these new words to your native language, but their meaning is in the context of programming. "break" - only means the command you use to stop executing the cycle, not something being broken. Also, and this is important, english is wide spread over the world, developers are likely to know english anyway (they need it for better programming, reading docs online, browsing the web, etc), and the set of reserved words in any language is small. There are a lot of words which probably mean nothing to most people and you use them a lot in english language, like company names, for example, Google. But it is so common to say "google it". The same with other new words you don't know for long time, like scientific terms: you just use them.

Andrey Mima at Quora Visit the source

Was this solution helpful to you?

Other answers

I started coding in Basic back when I was in 5th grade.  I started learning English from the 3rd grade.  By the time I went to college, my English was pretty decent. Yet it was only when I started playing with Pascal for my CS studies, my brain made the connection that all those commands I type are actually English words.  Until then I used them as abstract terms, much like in math. Learning COBOL reinforced that connection significantly. That realization made reading code much easier - almost as reading it out loud and getting the story right.  But it temporarily made writing the code much harder.  As now I was getting the order of things wrong, because they would work in English but wouldn't in the programming language. Until I discovered Perl, which has more flexibility for things "print $foo if $blah".  Then I just started hating all programming languages that weren't designed by a linguist. :)

Leonid Mamchenkov

Learning programming expects learning the programming language (therefore the commands/syntax) .. i.e. javascript `var test = 1`; (learning the language teaches what `var` means). You can still write code in your own language; though the commands/syntax are limited to the programming-language used; you can still name classes/methods/functions/etc in your native language (though this is not the norm).The other point. I assume the main point; errors in english; comes down to documentation; documentation should explain (doc should be available in most languages). a good error has a universal code and a localized message. via the code you should be able to find (google) everything about the error.

Anonymous

They learn English

Khandar William

I'm a non native english speaker (well english is not my mother tongue) I learned english from programming, not vice versa. 99.99% of decent programmers speak (at least write!) and understand english.

Nadjib Bait

Well, I am a Software Enginer from China. We have to learn English since In middle School. You Know In China People think that English is a basic Skill for a programmer. And most of us,search using Google, quey Answer in StackOverflow,Share Code or find open source code from Github. In Conclusion, We learn English before We Programing.

Haizhen Lee

We just learn enough English to be able to code. For example: hashing. It means you reduce a complex class to a 4-byte integer, and it has some properties that are quite difficult to explain in a short english post (non-invertible, uniform,...) But I have no idea what hashing means in Dutch, my mother tongue.

Gerwin Dox

I imagine a large percentage of developers actually know English to some degree, but anything can be learned if you want to. Just consider all the symbols we learn and use every day. Symbols that are often outdated (a floppy disk for Save?) or ambiguous outside a specific context (a church bell for notifications?).When you look at it from a distance it's kind of interesting that all programming languages (at least those I know of) are in English. Why not Chinese, Japanese etc?It's also interesting that somehow 7-bit ASCII, that pretty much only covers English-speaking languages, is still so dominating: E-mail addresses, URLs etc. Sure, there are in cases escapes for using other encodings, but it's rather bottom-up than top-down.

Anders Borg

Because English is understood by educated people of most countries. In Spain for example, we learn English in primary school. Thus, you could live here and communicate only in English (as some of my colleagues do).

Alejandro Ramirez

The thing here is.... The Syntax is not English, that's the beauty of code. You can write it in any language you articulate or understand best.For example, can you tell me how this would be English?<?PHP f00 = 12;foo2 = 12;foo3 = foo*foo2;?>Foo is not an English word, it can be anything, php is the Syntax, numbers are a universal language.

Rob Crabb

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.