Writing code in Russian. Pros and cons of such a programme. - page 16

 
Vitaly Muzichenko:

The worst thing that can happen is if someone asks you to edit something in that code. That's where it starts. Variables in Cyrillic are simply disrespectful to the native language, and editing such code is outrageous.

I can imagine what kind of code would be written by a Ukrainian in his own language, and then it will be further edited by a Chinese and commented on in his own language.)

Nothing terrible will happen. With requests to correct something must go to the author. If the author refuses a few times, his reputation will go south... That's when the code will vanish from the Internet and everybody will forget about the programmer... What to worry about... But for beginners, for better understanding, especially in replying to questions it is even useful to use the Cyrillic alphabet.

I already told you that I'm equally ignorant of English, Chinese and Korean. Tried giving the variables Russian words in Latin... even worse. And writing in Cyrillic I'm afraid I'll lose all my experience...

 
Реter Konow:
No, nothing bothers me. Have you tried writing an expert in Russian? If you have not, I advise you to try. Then share your impressions. By the way, I suggest that everyone do it.

I tried it, that's how I started, but then I realised it was incompetent and primitive and switched to English in order to be international.

 
Реter Konow:
You're exaggerating a bit)) Of course the code must be in English if it is to be viewed by programmers speaking other languages. By the way, about disrespect to the native language, English-speakers do not have such a complex. They write programs in their native language and do not bother).

I won't go on.

Here's one from here.

Is it really nice and readable?


 
Vladimir Zubov:

I tried it, that's how I started, but then I realised it was incompetent and primitive and switched to English in order to be international.

Well, then it turns out that I went from international to incompetent and primitive)))
 
Реter Konow:
I didn't even know there were people who also support this approach among those who write programming books. It's cool and nice. )) I agree too that open source must be in English. Although if it is distributed in Russian-speaking environment, then why not in Russian?
I often saw it in programming textbooks. A free paraphrase. Include comments in your native language into your code as often as possible. Both before and after and in the function itself. And better yet, name variables in your native language. One minute of commentary will save you from hours of not understanding your own code after a week-long break or drinking. You won't look at your own code like a sheep at a new gate.
 
Vitaly Muzichenko:

I won't go on.

It's taken from here.

Is it nice and readable?


And why did you choose such an avoidable example? There's another one in there:

(And look at the front page.)

 for(int Позиция = Исходная_позиция; Позиция < 3000; Позиция += Шаг)
   {
    Номер_кнопки    = Номер_кнопки_по_позиции(Позиция);
    //------------------------------------------------
    if(G_CORE[_TASKBAR][Номер_кнопки][_OBJECT_HIDE])
      {
       //-------------------
       G_CORE[_TASKBAR][Номер_стираемой_кнопки][_X]     = G_CORE[_TASKBAR][Номер_последней_кнопки][_X];
       G_CORE[_TASKBAR][Номер_стираемой_кнопки + 1][_X] = G_CORE[_TASKBAR][Номер_последней_кнопки + 1][_X];
       G_CORE[_TASKBAR][Номер_стираемой_кнопки + 2][_X] = G_CORE[_TASKBAR][Номер_последней_кнопки + 2][_X];
       G_CORE[_TASKBAR][Номер_стираемой_кнопки + 3][_X] = G_CORE[_TASKBAR][Номер_последней_кнопки + 3][_X];
       G_CORE[_TASKBAR][Номер_стираемой_кнопки + 4][_X] = G_CORE[_TASKBAR][Номер_последней_кнопки + 4][_X];
       //-------------------
       //Alert("Ротация_кнопок_таскбара  -  новая Позиция стертой кнопки   ",G_CORE[_TASKBAR][Номер_стираемой_кнопки][_X]);
       break;
      }

 
Indeed, comments are allowed in any language, so what's the problem?
 
Yuri Evseenkov:
I've seen this a lot in programming textbooks . A free paraphrase. Include native language comments in the code as often as possible. Both before and after and in the function itself. And better yet, name the variables in their native language. One minute of commentary will save you from hours of misunderstanding your own code after a week-long break or drinking. You won't look at your own code like a sheep at a new gate.
Well said.)
 
Vladimir Zubov:
Indeed, comments are allowed in any language, so what's the problem?
Comments take longer to write than variable and function names. If the names are self-explanatory, you can reduce comments to a minimum and not waste time writing them. You can also reduce the time to parse in your own code, if it is large. You can save a lot of time and effort in all aspects of programming and development, while expanding your capabilities.
 
Реter Konow:

And why choose such an avoidable example? There's another one in there:

Here is not selective, but it is a particular case:

Comments in code are like paragraphs in a poem, without them you get an unbroken mess.