Are you working in a non-English codebase?

I’m wondering if any of you are working in a non-English Elixir codebase and how you deal with it especially if you are not proficient in the language the code is written in (German in this case).

Few months back I started working in a non-English codebase and while I consider myself a pretty okay developer, I struggle a lot because I’m not proficient in the language the code is written in.

Luckily my team consists of fellow developers who are also not proficient in the language and we tend to write comments above the function name in English every time we touch a particular piece of code and have plans to translate (most of) the codebase into English.

I have tried plugins like DeepL or Google Translate inside my editor but it just does not feel right.

Any tips? Please share :wink:

Edit: clarification that it’s an Elixir codebase written in German

1 Like

What do you mean by non-English codebase? Maybe that function and variable names are written in another living language e.g. Italian / Spanish / French / German?

Yes, it’s Elixir but everything is written in German.

I would give you the normal recommendations of just using Google Translate or pair with German-speaking colleague but I am positive you already thought of that.

So maybe ChatGPT? :thinking:

1 Like

All the companies my friends or I worked in, which had non-English codebase, were a complete garbage. So my tip is to refactor and translate all of it at once or leave the company

6 Likes

That’s a ridiculous take. Plenty of English codebases are garbage too, and if teams working on that codebase don’t understand English this tip can’t be applied anyway.

3 Likes

I’ve had to do something similar once. I had a gig where I had to migrate the data from one ERP system to another, but the source ERP system code (names, etc) were all in French and I didn’t have access to any technical resources familiar with the source ERP system to call on… and I don’t speak any French at all.

So I did as @dimitarvp has suggested and used online translators. I did three things to get through: 1) I’d take words from the code and translate them; 2) I’d take the English names (I speak English natively) of the concepts I knew should be in an ERP system and translate those into French; 3) I used multiple online translators since different translators might give me different answers (and thoroughness).

Items 1 and 2 above helped where the French words had been abbreviated in some way for brevity and so couldn’t be translated directly from what was in the code.

In the end I got through it and it wasn’t that bad. Mind you I did have that advantage of really knowing the kinds of things that should be there, being able to evaluate if the data matched my assumptions, and I also had an English UI that I could validate against as well.

4 Likes

No, it is not. Code is a text which is designed to be understood by machines and humans. If you write your code in your native language, you make it hard to understand for those, who do not speak this language.

I used to work in teams where 100% of devs, users and managers were Russian-speaking, and we still wrote our program in English, because writing transliteration or using Russian terms (even though Russian language has it’s own broad and deep software development vocabulary) in English programming language would result in a mess nobody would understand. Even if we wrote everything in a Cyrillic alphabet and wrapped every dependency into Russian language wrapper, we would still have an ugly fusion of two languages.

I didn’t say that every English codebase is good.

I am sorry, but how do they program in Elixir? Language constructs, documentation, tutorials, libraries, maintainers, conferences: all in English. How do they explain what does the Supervisor or GenServer mean?

I started programming when I was a kid and I didn’t know any English back then, so I learned terms and gave them my own special meaning (I can sometimes pronounce “header” as “heedr”). But when I learned English, it all finally connected together like a huge puzzle. I understood that I had know only like 50% of what actually was meant in the first place.

If you program in Elixir without knowing English, you’re just combining magic words with a hope that this time it works

6 Likes

Such overhead. :tired_face: Did you at least get paid more because of the extra work?

I read online

It’s considered best practice that code is written in English

and I agree with that. It makes sense since programming languages are a special form of language so the underlying base - just language - should be consistent. I can understand why some people would prefer writing in their mother tongue, just wouldn’t consider it “best practice”. :cowboy_hat_face:

On yeah, the gig was time and materials and it wasn’t unexpected by the client either; they had warned me in advance that they knew a lot of the underlying stuff was all in French.

…and I keep saying “French”… it actually the Québécois variety of Canadian French; not a big difference for what I was doing, but something that needed to be considered when consulting the online translators.

In code, broken English is still better than poetry in other languages. A program is a piece of writing that is utilitarian to the extreme; your audience is the world and no one is going to translate for you.

I just have to mention this but I’m working in Norway, in a company that consistently in legacy code is using a mix of Norwegian and English. And it’s a complete mess to read the code. Its like our famous race car driver said “I isn’t only only, but but”

Not Elixir though. But equally painful

3 Likes

Why would it be a problem? Overall, very few companies are international.

I don’t like mixing English-like syntax with French so I code 100% in English, but conversely, if I coded in a language which uses French syntax I wouldn’t mix English comments in there. This said, if people in a company are not fluent in English it makes sense commenting the code in their own language.

Language syntax is easily learned without knowing even an ounce of English. Not knowing English well can even make it easier, because as you must know, language constructs have much narrower definitions and usage than standard English. It’s true that it’s going to be harder for documentation as Elixir is not a widely used language, but it’s easy to find tutorials and fora in French (and probably even easier in German as Elixir is more hyped there).
Why wouldn’t a tutorial be able to translate what Supervisor or GenServer mean? You should try to ask any English speaker who isn’t a programmer what GenServer could mean, they won’t know.

Whether you speak English or not, those are magic words. People have dreamt about creating a computer language that can be used like a natural language, and it will never happen.

Except it isn’t for the vast majority of programs.

I feel for OP though. I would personally avoid working on a project written in a language I don’t understand…

Without aspiration, we may as well quit coding and go back to farming.

Programming is one of the few occupations that transcend borders.

1 Like

I knew before joining that the codebase was in German. The reason I decided to join was that the team was new, does not speak or write German either, understood the problem and had a plan in place to improve it. Other dev teams in the company are German speaking and one day I will get them to translate everything as well :wink:

Maybe my initial message came across as me being frustrated but I actually find it an interesting challenge.

1 Like

No, your audience really is the entire world. If not for any other romantic reasons (which I don’t view as important, just like you don’t) but for the simple pragmatic reason that sometimes people leave, get sick, start families and quit the work force, get fired, take long sabbaticals etc. – and then the company shareholders are left with the hot potato. Suddenly they can’t hire anyone from the local market (f.ex. due to low salaries – happens a lot) and have to look for remote, 99% likely English-speaking, contractors.

It’s not just sensible, but downright mandatory, to write all your code – function names, module names, variable names, environment variable names – in English even if you’re in a 100% Arabic or Chinese team.

2 Likes

Exactly my point. If you’re learning only by tutorials in your native language, chances are you have extremely limited knowledge. English is lingua franca for software development, and with English knowledge you can learn 99.9% of all software development ideas. If you learn only in your local language, you have access only to poor translations. Even in active community (and Russian-speaking community is the third largest Elixir community after English-speaking and Brazil), you’ll have only poor and outdated translations and a few blogs.

So, you just have to know English to have a broad and deep Elixir knowledge. Even if you don’t read blogs and only read source code, terms and comments there will be in English. And if you know English (even as poorly as I do), there is no reason to use your native language in a codebase.

3 Likes

The important thing is that you are not alone in this, and that you are allowed to change the codebase so thoroughly :+1:

1 Like

Hiring low cost contractors you can’t communicate with because their version of English pidgin is quite different from yours is not such a great idea.
If programmers were as fluent in English as you think they are then I would agree :wink:

@hst337 You seem to think that localised tutorials are going to be of lesser quality or even poor translations, but I don’t think that’s the case. I agree about Elixir because it is still a niche language, but anyone can learn 99.9% of software development concept and ideas using French, Chinese or Russian. All the courses in my university where 100% in French, and it’s never been a problem. Comments would be written in French, and the code itself in “English”, but not the kind of English that a native could understand easily, let alone someone from a completely different cultural background.

Sure, this could be a case of a filter bubble. I would never agree to work on non-English codebase unless (1) given unfettered access to a translator and (2) the shareholders understand the work is going to go slowly and will be difficult to sneak any features at all; 95% will be refactoring.

As long as they’re on board that their previous mistakes will cost them, dearly, I can work with them. If not, I wish them luck.

I’d think most know basic English however, enough to give their variables okay names. But maybe I am wrong.

1 Like