A
A
Alexander Skusnov2019-08-08 06:35:45
Programming
Alexander Skusnov, 2019-08-08 06:35:45

What about the translation of identifiers?

There are recommendations that identifiers should be translated, and Russian words should not be written in Latin letters (Vvod, Vyvod).
First I dealt with the valve (Valve) and the pump (Pump). But I stumbled on the fan. Instead of Fan, I had to separate the supply (Supply) from the exhaust (Exhaust, a nightmare, if anyone knows the pronunciation). For numbering, the hand trembled and I designated them: P10, V20.
And then came the refrigeration system. Google translations Freeze (why frost?), Refrigerator rejected, used Cooling.
But what to do with "filling", "draining" and "feeding"?
Will stones be thrown at me if I write Podpitka?
(I love algorithms myself. For me, there is nothing nicer if the formulas contain x, y, z.)

Answer the question

In order to leave comments, you need to log in

4 answer(s)
E
EVGENY T., 2019-08-08
@AlexSku

I came to the conclusion that it is better to make variables from two words, even truncated ones. Let it be longer, but in the end you won’t get confused if a new entity suddenly appears with the same name, and more options with the same vocabulary.
For example, then you would not have to abandon the capacious word Fan: fanIn, fanOut, better than Supply and Exhaust.

D
DDDsa, 2019-08-08
@DDDsa

Perhaps this is professional, but for me, transliteration in the names of entities looks disgustingly collective farm. I advise you to take pity on your colleagues and take normal translations. Even if this is not a completely accurate translation, it is Freezermuch better than KholodilnayaSistema.
In addition, in English words are shorter than in Russian, which means that the code will not only look competent, but also more concise.
For translations, I advise you not to go to Google Translate (he still tries to slip one of the most popular, in his opinion, option, and you have specific terms), but, for example, to multitran , it is filled with users, including professional translators. And although because of this there is a lot of garbage, there are much more options. And this is perhaps the only place where you can find a translation of rare terms.

A
Adamos, 2019-08-08
@Adamos

Here they often ask - does a programmer need a higher education?
So, at our Faculty of Civil Engineering, half of the English course was still memorizing terms from a dictionary.
Transliteration is terrible both in that it produces errors when writing, and in that it forces the reader to constantly "switch the context" from the programming language to Russian, and even proofread wild constructions like borzhch instead of fluent reading.
You can quite freely use inaccurate words and outright pidgin - the main thing is that you understand what is written without peering and the person who reads your code does not curse you for it. Nothing else matters.
Worrying about the Indians, who someday accidentally fall into the hands of your code, you still will not seriously.

K
Konstantin Tsvetkov, 2019-08-08
@tsklab

In order for translators to understand the context, phrases need to be translated.
заполнение холодильной системы- filling of the refrigeration systemorfilling the refrigeration system

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question