Comment by zabzonk
10 hours ago
i've always given the advice "program in english, comments, variables, function names, everything", and "always use a uk/us keyboard unless you absolutely have to enter localised strings, and even better get someone else to do that"
I've been working with a codebase for a very specific domain where hardly anyone even knew the English terms for the domain-specific things (and some of them probably didn't even exist - highly localized customs etc.). No point in using English then.
The smart projects that are going for L10N will collect all the UI strings into a file or set of files, separate from the code, and indexed so that the app can just switch language and then begin using a new set of localized strings. This also makes for easy translation where you don't need to rebuild the app, just expand the data files that it's using. Is this not the only way to build apps today, or are "localized strings" still being hardcoded??
I’ve seen before that this is not followed in certain cases, such as the entire development team being in a specific country where some or many team members don’t know English (well enough). As an anecdote, I’ve seen a team in a large multinational company (US origin) in Spain that used function names, variable names, database table names (and column names), log message text and many other things in Spanish. English was only for the language keywords because that’s what the compiler would accept.
China disregards that and there is an absolutely massive ecosystem of Free and Open Source Software out there if you can read and write their code.
I know little about china (except i like the food and art) but do they actually write code in their native language(s)?!
I can only speak for Japan, but I suspect China is the same. In Japan, English programming is the norm because all mainstream programming languages are written in English. Keywords, libraries and documentation are in English, so there's not really any getting around the fact that you have to learn to read at least some English. Some Japanese developers do write identifiers in Japanese where languages support it, and documentation / comments are often written in Japanese, of course.
I, personally, think this is a lamentable state of affairs that raises the barrier to entry for programming, especially for children. There are education-oriented Japanese programming languages that try to fill the niche for teaching children, but I think it would be beneficial if there were serious languages with a full ecosystem rather than ones designed to be training wheels before learning English programming languages.
2 replies →
Nope, they just add huge Chinese comments.
The first STM32 "bluepill"-based SCSI to SD adaptor I ever used had all its source code in Chinese.
Google Translate did a not terrible job of turning all the comments into English but also mangled the code in exciting new ways, but with a bit of ingenuity to apply the Artificial Intelligence translations, and a bit of bloodymindedness when applying the Analogue Idiocy to hacking it all about with search-and-replace, I got a pretty plausible translation of it.