Possible Duplicate:
Do you use another language instead of english ?
Few days ago friend of mine asked me to look at the CMS written in PHP. He asked me to review the code, and provide my comments to check if the company he hired did a good job.
Apart from few design and security related bugs I found one thing that annoyed the hell out of me: PHP code used both English and Polish language to name variables and functions.
As a native Polish speaker myself, I didn’t have any troubles understanding following code:
$szer=$x1/$max_image_width;
$wys=$y1/$max_image_height;
I know “szer” stands for “szerokość” and it means “width” and “wys” is “wysokość” - “height”. I found hundreds of similar examples:
function drzewo_kategorii_dod_prod($id_kat, $adres, $kategorie_tab) { ... }
..and I was thinking to myself – how the heck any other person who doesn’t speak Polish would be able to maintain this code?
I work in London so I am used to “English environment” and even though my English is not perfect, I believe that all code should be written in English. I’m ok with comments written in the local language, but for the god’s sake people... why do you mix languages in your code? We use ‘if’, and ‘true’ and all the English keywords.. is it worth introducing another language in the code?
Am I just being ignorant? Do I care too much about global code maintenance? Maybe it is ok to use local language for small high-school project, but what about serious business applications?
Did you experience similar issues? Do you write your code entirely in English or do you use your native language because it’s ‘easier’?
I hope I will never see:
bool jestCzerwony = prawda;
jeśli (prostokąt.szerokość == 70) { ... }
==
bool isRed = true;
if (rectangle.width == 70) { ... }