Hacker News new | ask | show | jobs
by axegon_ 2116 days ago
> Names From Other Languages

This is the worst thing that you could ever end up dealing with. Back at an old job many many years ago, the company bought a smaller one with the same business. Me and my at the time tech lead were given the task to migrate the database from the system they were using into ours. "How hard could it be" we thought. Well... All 51 tables scattered around two databases were in Romanian. Needless to say neither of us knew a single word in Romanian. I was surprised how much we managed to learn in a month though.

3 comments

I write all my personal code, including comments, in English and not Swedish precisely because I want non-Swedish devs to be able to perfectly understand the code even without Swedish language or cultural knowledge. Also, thinking and writing in English is much simpler than jumping between two languages.
Personally I've always wrote my code and comments in English, even if I never fully understood why. That said, having studied abroad and returning after graduating I did hit a few rocks: My tech lead at my first job upon returning(the same job when we had to migrate the Romanian database) was telling me how to do something and he said something along the lines of "You take those and shove them into an array" in Bulgarian(my native tongue). As you could imagine, "array" in Bulgarian sounds nothing like that. I nodded with approval(having no idea what he had just said), and google-translated the word he used 5 minutes later. When "array" came up on the screen I felt like someone had smacked me in the head with a sledgehammer.
масив? I had a similar experience wondering what this thing is when I first heard this. I wonder what the etymology is.

Python dicts seem to be „асоциативен масив“ but „речник“ is also acceptable, so at least that's understandable.

Precisely. I truly have no idea how it's made it's way into CS, but I suspect it has to do with:

> Голямо пространство, заето от еднородни предмети. Горски масиви.

It's probably from the Russian CS.
Students from different countries are asked to write an essay on elephants.

An English student: "Elephants and their import for the industrial production"

A French student: "Elephants and their sexual life"

A German student: "Elephants as the precursors of tanks"

A Soviet student: "The USSR: the country where elephants originally came from"

A Bulgarian student: "Bulgarian elephant, the younger brother of the Soviet elephant".

Personally, I don't write comments. I write self explanatory method names. Comments become unmaintainable
Regarding the relative usefulness of a well-named method vs an explanatory comment, I think it depends on the culture of refactoring for the codebase. If a codebase sees its code very regularly refactored, then comments can be downright dangerous/misleading while methods are easily renamed throughout. On the other hand, a well placed comment can tell you a lot of “why” or “how-to” that a method name / signature cannot.
Comments can get stale really fast but I probably write at least twice the amount of comments as code because that's how I reason about the function and intention of the code. Sometimes the code seems simple but the reason why it exists can be really complex.
How do you deal with the domain language? Translating that can be a pain and a source of unclarity too.
I had fun adding https support to a decade old PHP app for managing a domain registry where the entire thing was in German :) I spoke neither German nor PHP.
I have to concede that I write doc:s and code comments in my native tongue so moving development like this gets more expensive. Also writing in English takes like double the time.