Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Irrelevant details in variable naming section #3608

Closed
carlosperez-dev opened this issue Nov 1, 2023 · 4 comments
Closed

Irrelevant details in variable naming section #3608

carlosperez-dev opened this issue Nov 1, 2023 · 4 comments

Comments

@carlosperez-dev
Copy link

carlosperez-dev commented Nov 1, 2023

Hello,
Thank you for maintaining this guide, it's great! Raising this as I think the last two sentences in the variable section are unnecessary as they're neither technical nor stylistic details and add no value to the point being expressed. Moreover the last sentence assumes that English is the only language spoken in other countries, specially given the big push for all translations.

image

@joaquinelio
Copy link
Member

I disagree.
Imagine the author of this tutorial doing examples in Cyrillic...

If you like your script to be maintainable for others (worldwide!),
do prefer basic alphabet
and use english var/func names.

@carlosperez-dev
Copy link
Author

carlosperez-dev commented Nov 1, 2023

I think that by using Cyrillic the author would be breaking the international convention, and fewer people worldwide would be able to maintain it. I don't disagree with the point you're making as you're right international standards greatly increase chances it can be maintained internationally. However the sentences in question don't portray that, at least when I read it. As a matter of fact if the point that is trying to be passed on to the reader is: to have the best chance at maintainability stick to international standards, then the way you've described is more eloquent. Perhaps a redaction e.g. "...it may have a long life ahead. By obliging to international standards we greatly increase its chances of our scripts being maintained by others in the future." is better suited for that point.

@Alexandre887
Copy link
Member

Alexandre887 commented Nov 2, 2023

English is an officially recognized international language. And, pretty much all programming languages use English to describe the "instructions", the commands that a computer must understand. The vast majority of programming literature, documentation, specifications, manuals - all this is written in English. And the message of the last two sentences is exactly the same: if a programmer wants his code to be readable for people from all over the world, no matter who will work with his code, he should invent such names for various structures in the language that these names will be understandable to everyone who will read the code. An English speaker will not understand variables in Russian, a Russian speaker will not understand variables in Chinese, a Chinese speaker will not understand variables in Korean, and so on. But everyone will understand English, for the reasons I have already listed above.

It specifically says what this tutorial teaches beginner programmers: first of all, provide readability and maintainability of your code. It doesn't matter whether you are writing a 25-line script for some website or a complex 3D engine using extremely complicated mathematical algorithms. Because this script can actually have a long life, which is what the paragraph you quoted states. You can invite your programmer friend to continue writing the code, but together, who, for example, does not speak the language in which you made up the names for your functions.

We can take any software development company as an example - let's say, Google. Google employs tens of thousands of people, and not all of them have English as their native language. Imagine that all these people start writing code using their native languages to describe variables/functions or something else. How will you ensure code maintainability in such a situation? Then, in order to fix a bug in the code, or at least understand what this code does, the programmer should also sit with an open online translator and a lot of dictionaries in different languages?

I don't understand the point of this Issue and the point in deleting these sentences.

@carlosperez-dev
Copy link
Author

Fair enough, closing the issue

@carlosperez-dev carlosperez-dev closed this as not planned Won't fix, can't repro, duplicate, stale Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants