Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

View Poll Results: Should javascript always be coded in english?
Yes, always! 24 54.55%
Mostly, but diff language okay for internal applications. 12 27.27%
Not feasible, non-english speaking scripters only know the english that is in javascript. 1 2.27%
My primary language is not english, why should I accomodate the rest of you?!? 2 4.55%
No. 0 0%
Who cares. 5 11.36%
Voters: 44. You may not vote on this poll

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-26-2003, 05:25 PM   PM User | #1
beetle
Senior Coder

 
Join Date: Aug 2002
Posts: 3,467
Thanks: 0
Thanked 0 Times in 0 Posts
beetle has a little shameless behaviour in the past
Always code in English?

I've run into this several times over the months, and just did again a little bit ago. I think most of us agree that functions and variable names should be, for the most part, semantically accurate towards what they represent or are being used for.

As far as I'm concerned, I think it's equally important that variables and function names be in english as well. Not only because the ECMA script vocabulary is english (which is the most important point) but also because when someone comes here looking for help and their code is in spanish or something, it easily takes me 2-3 times longer to figure out the problem.

What do you think? Should javascript code always be written in english?
__________________
My Site | fValidate | My Brainbench | MSDN | Gecko | xBrowser DOM | PHP | Ars | PVP
“Minds are like parachutes. They don't work unless they are open”
“Maturity is simply knowing when to not be immature”

Last edited by beetle; 02-26-2003 at 05:31 PM..
beetle is offline   Reply With Quote
Old 02-26-2003, 05:39 PM   PM User | #2
jkd
Senior Coder

 
jkd's Avatar
 
Join Date: May 2002
Location: metro DC
Posts: 3,163
Thanks: 1
Thanked 18 Times in 18 Posts
jkd will become famous soon enough
Esperanto. All the way.
__________________
jasonkarldavis.com
jkd is offline   Reply With Quote
Old 02-26-2003, 05:41 PM   PM User | #3
Jerome
Regular Coder

 
Join Date: Oct 2002
Posts: 299
Thanks: 0
Thanked 0 Times in 0 Posts
Jerome is an unknown quantity at this point
I don't say English is the most important language and it's not my mother-tongue however, for programming and business please stick to one language: ENGLISH...

Jerome
Jerome is offline   Reply With Quote
Old 02-26-2003, 06:35 PM   PM User | #4
maltrecho
Regular Coder

 
Join Date: Feb 2003
Posts: 345
Thanks: 0
Thanked 0 Times in 0 Posts
maltrecho is an unknown quantity at this point
Better English than Chinese, Japanese, Greek, Arabian...

A foreigner survivor...
maltrecho is offline   Reply With Quote
Old 02-26-2003, 07:07 PM   PM User | #5
joh6nn
wei wu wei


 
joh6nn's Avatar
 
Join Date: Jun 2002
Location: 72° W. 48' 57" , 41° N. 32' 04"
Posts: 1,887
Thanks: 0
Thanked 1 Time in 1 Post
joh6nn is an unknown quantity at this point
i think good coding practice is more important. brace style and such. generally, based on the code itself, you can figure out what it's doing. how many functions has anyone seen, where the variable and function names made enough of a difference, that you couldn't have figured it out anyway?
__________________
bluemood | devedge | devmo | MS Dev Library | WebMonkey | the Guide

i am a loser geek, crazy with an evil streak,
yes i do believe there is a violent thing inside of me.
joh6nn is offline   Reply With Quote
Old 02-26-2003, 08:13 PM   PM User | #6
mordred
Senior Coder


 
Join Date: Jun 2002
Location: frankfurt, german banana republic
Posts: 1,848
Thanks: 0
Thanked 0 Times in 0 Posts
mordred is an unknown quantity at this point
joh6nn, I see a great difference between method names like getElementById() and gtElmBI(), or even xyz123_2(). IMO the first choice is the most readable, and I always take the time to name variables, classes and methods in such a way that describes their purpose in a good way. I even refactor my objects sometimes only to change method names.

Back to topic: I always code in english, and in the company I work it's convention to do so. I think it makes a lot of sense because all programming terms and languages are in english anyway, and mixing languages leads IMO only to confusion.

Comments may be written in native language. It's often easier and faster to describe a process if you don't have to translate it, but if I have the time, I try to write them in english. Maybe someday I get so used to it that commenting in english is done much more fluently than I do now.
mordred is offline   Reply With Quote
Old 02-26-2003, 08:13 PM   PM User | #7
beetle
Senior Coder

 
Join Date: Aug 2002
Posts: 3,467
Thanks: 0
Thanked 0 Times in 0 Posts
beetle has a little shameless behaviour in the past
I started doing some PHP development in this CMS/development framework application, and with their manual they published a coding standard. I never gave much thought to certain things, but since I've read it, I agree with them so much I've completely adopted it for PHP, and Javascript as well.

P.S. Part of their standard was to use english names for everything, and they live in Norway
__________________
My Site | fValidate | My Brainbench | MSDN | Gecko | xBrowser DOM | PHP | Ars | PVP
“Minds are like parachutes. They don't work unless they are open”
“Maturity is simply knowing when to not be immature”
beetle is offline   Reply With Quote
Old 02-26-2003, 08:57 PM   PM User | #8
Stoffel
New Coder

 
Join Date: Jan 2003
Location: Belgium
Posts: 74
Thanks: 0
Thanked 0 Times in 0 Posts
Stoffel is an unknown quantity at this point
I think it should be done in dutch


I agree with you, Beetle
I always try to translate my functions (I also forget to translate half of it, but hey, nobody is perfect )
__________________
SToFFeL
Stoffel is offline   Reply With Quote
Old 02-26-2003, 09:03 PM   PM User | #9
beetle
Senior Coder

 
Join Date: Aug 2002
Posts: 3,467
Thanks: 0
Thanked 0 Times in 0 Posts
beetle has a little shameless behaviour in the past
Sanskrit! We musn't forget Sanskrit!

nevermind
__________________
My Site | fValidate | My Brainbench | MSDN | Gecko | xBrowser DOM | PHP | Ars | PVP
“Minds are like parachutes. They don't work unless they are open”
“Maturity is simply knowing when to not be immature”
beetle is offline   Reply With Quote
Old 02-26-2003, 10:56 PM   PM User | #10
Vladdy
Senior Coder

 
Join Date: Jun 2002
Location: Nashua, NH
Posts: 1,724
Thanks: 0
Thanked 0 Times in 0 Posts
Vladdy is an unknown quantity at this point
Even though English is not my native language, I 100% agree that coding should be done in English only.
My problem however, is having patience to spell out the variable names. Another day I needed to name an array of title strings and being on "autopilot" typed:
tits = new Array();
Fourtunately, my girlfriend, peeked over my shoulder and asked: "What kind of site are you working on " ...
__________________
Vladdy | KL
"Working web site is not the one that looks the same on common graphical browsers running on desktop computers, but the one that adequately delivers information regardless of device accessing it"
Vladdy is offline   Reply With Quote
Old 02-26-2003, 11:03 PM   PM User | #11
beetle
Senior Coder

 
Join Date: Aug 2002
Posts: 3,467
Thanks: 0
Thanked 0 Times in 0 Posts
beetle has a little shameless behaviour in the past
Quote:
Originally posted by Vladdy
Another day I needed to name an array of title strings and being on "autopilot" typed:
tits = new Array();
LOL
__________________
My Site | fValidate | My Brainbench | MSDN | Gecko | xBrowser DOM | PHP | Ars | PVP
“Minds are like parachutes. They don't work unless they are open”
“Maturity is simply knowing when to not be immature”
beetle is offline   Reply With Quote
Old 02-26-2003, 11:28 PM   PM User | #12
beetle
Senior Coder

 
Join Date: Aug 2002
Posts: 3,467
Thanks: 0
Thanked 0 Times in 0 Posts
beetle has a little shameless behaviour in the past
Only 18 votes? ptbhhbhbbhb, I thought dozens of people came here daily....
__________________
My Site | fValidate | My Brainbench | MSDN | Gecko | xBrowser DOM | PHP | Ars | PVP
“Minds are like parachutes. They don't work unless they are open”
“Maturity is simply knowing when to not be immature”
beetle is offline   Reply With Quote
Old 02-26-2003, 11:37 PM   PM User | #13
mordred
Senior Coder


 
Join Date: Jun 2002
Location: frankfurt, german banana republic
Posts: 1,848
Thanks: 0
Thanked 0 Times in 0 Posts
mordred is an unknown quantity at this point
So what? 18 are one and half a dozen.

While we are at languages, let me just say that coding in Hungarian Notation is definitely *not* coding in english - so stay away from that practice. Just adds to obscurity of your code.
mordred is offline   Reply With Quote
Old 02-27-2003, 12:46 AM   PM User | #14
Borgtex
Regular Coder

 
Join Date: Aug 2002
Location: Spain
Posts: 420
Thanks: 0
Thanked 0 Times in 0 Posts
Borgtex is an unknown quantity at this point
If I create a new function or a new variable, I do it in my language; after all, I am who is using it!
However, if I have a problem and/or have to show my code to a non Spanish/Catalan person, I try to translate it for that person (but I still use the right version)
__________________
Don't resist to assimilation. Billions of Borgs can't be wrong!
Borgtex is offline   Reply With Quote
Old 02-27-2003, 01:19 AM   PM User | #15
whammy
Senior Coder

 
Join Date: Jun 2002
Location: 41° 8' 52" N -95° 53' 31" W
Posts: 3,660
Thanks: 0
Thanked 0 Times in 0 Posts
whammy is an unknown quantity at this point
Well, it seems that nearly 100% of the programmers here (if you don't count Borgtex) that don't use English as their "mother" or native language agree... it should be in English.

I can't argue with that.

P.S. I have never had a problem understanding Borgtex's code, and he seems to have no problem understanding code in English, so I guess that's a moot point.

P.P.S. As far as I understand hungarian notation, is it not just camelCasing ?!?

From a quick search of some very confused programmers websites, that seems to be the case...
__________________
Former ASP Forum Moderator - I'm back!

If you can teach yourself how to learn, you can learn anything. ;)

Last edited by whammy; 02-27-2003 at 01:26 AM..
whammy is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:02 AM.


Advertisement
Log in to turn off these ads.