Hacker News new | past | comments | ask | show | jobs | submit login

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.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: