It will be about using in the program code the names (classes, variables, methods) in the native language (in my case - in Russian).
Experience has shown that Russian identifiers are ideal for creating an object model and for discussing it with the Customer (for domestic projects).
')
One of the general trends of IT development is the gradual “humanization” of technologies. Each new technology is initially focused on a narrow circle of specific specialists, but gradually adapts to an ever wider circle of users, including different cultures. Take at least the introduction of Cyrillic domains (* .) - even if not all browsers normally support the display of Cyrillic addresses, but the process is on!
Having started programming in the early 90s, I never had any problems due to the fact that the files needed to be called only in Latin letters and no longer than 8 characters, but when in the next version of Windows I realized that there were no more restrictions - I thought: same convenient! Every time, giving the name of a new file, I thought out of habit: what if this file was tried to be opened in a system that does not support the Cyrillic alphabet? But the likelihood of this became less and less, and with time the habit disappeared.
About three years ago, I suddenly discovered that in dotNET identifiers can be called any characters - English or Russian, it does not matter. This follows from the fact that dotNET is oriented to work with unicode. The first thing that came to mind - what problems are fraught with the use of Russian names? Having experimented with “russified” code on different versions of Windows and the dotNET Framework, I did not identify a single problem.
Thus, I came to the conclusion that in dotNET there are no technical problems with the use of Russian identifiers.
Of course, there are cases when the question of using Russian names disappears by itself:
- if the customer of the product for some reason requires - that all the code was in English;
- if there is a suspicion that the project will be laid out in OpenSource or transferred to foreign developers;
- if the team of developers does not all speak Russian;
- if the project is a zoo of various languages ​​and technologies (including MS-DOS times);
- if the Russian identifiers confuse the inherited code.
It is clear that having an opportunity does not mean the need to use it.
I started using Russian identifiers in almost all of my projects. And over time, I made the following conclusion for myself:
Russian identifiers are ideal for creating an object model , and they do not need anything else in the rest of the code.
Now an example:
Suppose a customer is an educational institution and wants a system of accounting for students, classes, subjects, grades, etc. In a conversation with a customer, you use the words “student”, “subject”, “academic performance” - so why should they be translated into English in the code? ? Create an object model:

In VisualStudio we create a class diagram:

Such a class diagram can even be shown to the customer while talking to him literally “in the same language” - that is, using the same terms. The customer may even have a feeling that he is well versed in your code :)
At the same time, of course, you should not get carried away and call in the code in Russian initially English-language technical terms like “File”, “Stream”, “Collection”, “WebClient”, etc.
Communicating with colleagues on this topic, I notice that the attitude towards Russian identifiers gradually changes over time. From sharply negative to moderately condescending. Here is my list of reasons why programmers want to write code exclusively in English:
- Too lazy to frequently switch layout. This is a strange problem - such as frequent switch layouts reduces performance. Is the work of the developer is in high-speed ten-finger tamping code? In my opinion, code readability is more important than a few seconds (or even minutes) per day spent on switching layouts. Why, then, programmers do not complain when they write a code of the form Console.Write ("Hello World!"); - because here, too, need to switch. In addition, these same developers call personal files on the disk in Russian. So this problem is “sucked from the finger” and means that there were no real problems.
UPD: Switching layouts when editing code is only a matter of habit. The brain will adapt to this task for two or three days and it will cease to strain - tested by experience. - To make the code look as complicated as possible for the uninitiated. If the code is understandable to the customer, other programmers, the boss, then they may have the opinion that programming is not so difficult, which will lead to some tarnishing of the programmer's image, which, as a wizard, writes some strange characters to anyone ... In other words, so the desire to look very smart and indispensable.
- Fear of glitches To argue that because of the Russian names there can be difficult to explain problems - you must at least try to use them. And the mere assertions, not supported by practice, are only a cover for the inertness of thinking. In my personal practice there was one such small glitch (in the Silverlight project), but against the background of dozens of other glitches it is irrelevant. This fear for some reason does not prevent programmers from working on 64-bit Russified Windows and using localized Google J
- What if foreigners buy the code? If the code is written initially for the purpose of transfer to foreign customers - then there are no questions. In other cases, the probability that your code will go to bourgeois or Hindus is extremely small. If so, then the user interface should be done only in English, even if the end user is an accountant in the next room.
- The object model repeats the structure of the database. Often, the object model of an application is the tables in the database and the relationships between them. In this case, it is convenient to name the classes and properties in the same way as the tables and fields in the database are called. Ideologically, this approach has long been outdated - now Domain-driven design (DDD) is driving, in which the customer’s domain is taken as the basis.
By the way, I recently learned that 1C programmers write the code literally “in Russian” :)
In conclusion, the findings:
- Russian identifiers are excellent for describing the object model of domestic projects.
- I think - over time, developers will no longer be afraid to use Russian identifiers.
- No need to extremes: write in Russian all the code is absurd.
Update: Bourgeois, whose tools we use when developing, see the code in their own language just ...