Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: Differences in Programming Style by Nationalities
39 points by chestertn 55 days ago | hide | past | favorite | 37 comments
In mathematics some people say that there are three different styles of doing mathematics: the French style, the Russian style, and the American style. Each one has its own peculiarities and stereotypes. For instance, French-style mathematics tends to be very abstract compared with Russian-style. Of course, these are all generalizations.

Does something like this exist in the programming world? Example: programmers trained in X tend to be more Y compared to those trained in Z.

I've observed from my personal job experiences that Eastern European developers tend to pay more attention to detail.

It's a double-edged sword as it can yield more correct code but also spend time in things that a formatter/linter would do.

Or implement requirements very literally without trying to second-guess them, or ask for clarification.

IMO the bigger divide is between West Coast and East Coast programming styles.

I think California developers tend to be more forward-thinking, and embrace a “move fast and break things” style. Whereas East Coast devs tend to be more academic, structured and top-down.

Speculatively, I’d attribute this to the lack of non compete enforceability in California. Innovation tends to diffuse a lot faster, and that’s rewarded more of a forward-thinking culture. Then again, if there was a piece of code that could kill me if it fails, I’d go with an engineer in Boston before one from Palo Alto.

I've seen this as well. The West coast division of the large company I worked at tended somewhat toward 'architecture astronaut' situations, highly abstract languages and tools and was fairly cavalier toward error cases and operational considerations.

The East coast was very opinionated about handling every single error case with case-specific logic, deviated very little from plain-old-C / non-threaded implementations and had copious operational input and tools/insight, etc.

Both had their strengths and could get caught up in cultural blindness to the others. It was an interesting challenge.

You touched on it in your post but I think industry plays a big role in the differences. East coast has more financial and medical based industries (broad generalization with several hundred counter examples) so you're going to have a slower more deliberate pace than something like slack or uber

This sounds like the age old "Do the right thing" vs "Worse is better". MIT (vs Princeton) Stanford (vs Berkeley) https://en.wikipedia.org/wiki/Worse_is_better

not sure about specifics in training but I had quite a lot of fun reading regular c++ code with variables in english only to scroll and find pages of comments in foreign language like russian or japanese...

another fun with languages happens when coders for whatever reason insist on naming their variables using fusion of english and other language, such as "HornyWidget" (horny means upper in my language)

MPlayer is originally a Hungarian project and IIRC the code suffered a bit from comments being written in Hungarian, which no one but Hungarians understand.

But that was around 2002 or so. IDK if it is so today. Probably not.

even their main website was full of hungarian IIRC which was difficult for me :)

I interviewed at a Dutch company that had offices in Paris and the French programmers insisted in using French for all identifiers. Effectively it was job security for them.

I worked for a startup where the working language is French and the management mandated that all code and comments were to be written in English. Their justification was that the most likely exit would be by being acquired by an English speaking (ie American) company and that they wouldn't buy assets that couldn't be worked on by English coders.

Having worked at companies in both languages I didn't notice much difference in style. One thing that was pointed out to me is that trends and practices (TTD, agile etc.) take longer to reach the francosphere and that French companies are always X years behind their Silicon Valley contemporaries.

A Dutch company I worked for had much of their legacy code with Dutch words throughout. It was rather challenging to onboard international non-Dutch colleagues.

I don’t know how true it still is, but didn’t Russian programmers earn a reputation for doing amazing things within very restrictive constraints, particular in memory?

https://en.wikipedia.org/wiki/Conway%27s_law is related to this on a org/architecture level.

And on a further tangent, I read the following (from a 'frustrated' dev) on a discussion about micro-services.

>Micro-services allow us to push our org chart to production.

I still think about that from time to time.

Programming style could mean different things: architecture, design patterns, spelling, naming, favorite languages, favorite domains, coding styles (tab vs spaces, where to put braces, space or no space before functions).

What probably matters a lot is how programming was learned (self taught, at school, availability of resources from the country / in the language of the person…) as well as the variety of code which the person read / contributed to.

No, that does not answer the question at all because I have no idea :-)

With respect to naming, English being a Germanic language rooting a good part of its vocabulary to the French language, it would be interesting to compare German code and French code both written in English and find out whether German (resp. French) people tend to use more words rooted from the German (resp. French) language.

I did witness a Japanese style in the 1990's - a book of coding blocks was being used with the primary value the coder was adding was glueing then together.

Back then, I thought it was idiotic; how could a professional sit there and copy from others.

I now view it as genius - save your effort for the hard problems.

Sounds like that book was their StackOverflow of the 90s?

“Never memorize what you can look up in books” (paraphrased) - Einstein

I first noticed a difference in national styles when I contributed a patch to fastjson, a JSON parser in Java from Alibaba.

Take a look around the repo; it'll look odd to a western programmer. There is a lot of duplication. And the tests don't have names, they are numbered.


This was several years ago. I did end up choosing it since it really was the fastest.

> Test generated by Diffblue Deeptest.

I think this is the reason for that duplication and numbering

It's not just the tests.

There is a fairly active research field in computational linguistics for Authorship Attribution and Native Language Identification. These try to identify a specific person or a persons first language by idioms in their writing style.

I have seen some people apply similar techniques to code (eg identify authorship of malware) and I assume what you're asking would be a pretty simple variation of that.

I often use "pom" as a temporary variable name. It's short from "(aux)iliary" in my language. Other words sometimes sneak into local variable names too. Meta-syntactic variables too like "jablko" and "hruška" instead of foo bar. On paper, some people are surprised when I put stroke on 7.

This topic seems like a bad idea

I do not see why, everyone is being respectful. Perceiving and understanding diversity of styles is something nice which to me, as seen in other fields like mathematics, leads to new ideas and insights.

Unfortunately, seems like more people share your opinion that this post is a bad idea. Les than 30 min ago this post was in the second page of HN but now I cannot find it anywhere.

I don't know if it is common and not just a local sampling bias, but I've noticed my Indian colleagues (in the UK) are more often Java programmers. Perhaps java, and thus OOP, is more popular in India?

Lots of indian bootcamp like classes seem to use java


dumb code are nationless, that's for sure

As is "good" code, actually.

I started coding in the UK in assembler on tiny 64k machines and cavalier heroic coding to save space and cycles was the norm. I moved to the US coding in C and while there was no shortage of clever heroic coding, simple brute force approaches were usually tried first. Nowadays, most of the heroism is bundled in the toolset.

My experience, is that there is a greater degree of similarity between coders and their mode(s) of practice, when grouping them by their tools/language choices, than by their nationalities.

My sample size is infinitesimal, so YMMV.

(Potentially apocryphal or true for other countries) I remember a Romanian developer telling me that in the days of communism (as well as shortly thereafter) computer time was so rationed that students learned to program almost entirely on pen and paper and the instructor would grade it before even putting it into a computer.

He said that even to this day, programmers in Romania still have a deep emphasis on book learning and an intolerance for bugs or mistakes.

Have observed a strong correlation between conscientiousness and how developed a country is.

This is undoubtedly due to a self-selection bias in developed countries, where there are a million opportunities, wherein only those deeply interested in programming choose (and stick with) it as a career.

Those in less developed countries don't have the same privilege, with many choosing programming as an easy ticket out of poverty.

Another factor is that in less developed countries outsourced projects are the norm. Those projects tend to look for cheap work force instead of skilled developers. Therefore a lot of projects tend to have poor code quality. Basically you have thousands of developers working most of their career in poor implemented projects. It becomes a vicious circle.

If you live in a less developed country and you choose to work for outsource companies you have to be careful about choosing good quality projects, otherwise you could spend years learning bad practice after bad practice.

I don't see what conscientiousness means in this context, could you expand?

The amount of effort expended, e.g.

- always additive, never proactively refactoring

- a proclivity towards reaching for SO rather than reading the manual

- inconsistent formatting, number of line breaks, ordering of identifiers, etc

I have noted that chinese guys write code just like others but when they write comments in English, they mess them up. For example almost always, when they to save "imap clients typically request multiple messages at a time", they will invariably write "imap clinent typically request multiple message at a time". Note the lack of plurals.

Lots of Southeast/East-Asian languages lack plurals; I can only imagine it's difficult to pick up if you have not grown up using plurals.

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