You have to accept that Japanese grammar might have some basic concepts in common with the grammar of western languages (verbs, objects, adjectives, etc) but that really doesn't get you far.
(for japanese learners reading this comment, the article that pushed the first domino for me was this one: http://www.guidetojapanese.org/blog/2007/09/03/repeat-after-... )
Regarding your question about programming, I'd encourage you to read both The Little Schemer and Structure and Interpretation of Computer Programs.
With regards to your link. Japanese absolutely has subjects.
The question of presisly what -ga marks is a bit more controversial, but calling it a subject marker is a perfectly defensible position. Indeed, having studied linguistics before studying Japanese, I found that thinking of -ga as a subject marker and -wa as a topic marker made the distinction easy for me.
The point of this comment is not to say that we should be teaching English-native Japanese students that Japanese does have subjects and -ga marks them. I am not qualified to make that judgement, and my benefit likely came as a result of leveraging my linguistic studies.
As others have pointed out, thinking of Japanese as analogous to English is counter-productive for most students. This is despite the fact that Japanese is analogous to English in most cases, including (potentially) cases where seeing the analogy could be counter productive.
Returning to the original article; this is a good indication that just because something is wrong does not mean that it is not useful. Anthropomorphizing might not be technically correct, but it could still be a useful tool to help our human brains make sense of the world or subject matter. In the same way that saying "Japanese does not have subjects" might not be technically correct, but it might still be useful.
That seems like a total non sequitur. Do you also find the expression "like comparing apples to oranges" cringey, since apples and oranges are quite similar when compared to black holes?
I tried to avoid the "apple to oranges" objection you are raising by restricting the domain to that of "potential languages", which seems like the "fair" point of reference to take. Since Japanese and English are both natural human languages, I would consider comparing them more akin to comparing red apples and green apples.
The main point I was trying to make (which admittadly got berried at the end of my post) was that "wrong" and "not useful" are two very different concepts.
[0] This is best observed in deaf children who are not exposed to sign language at a young age.
The poster clearly wasn't making any broader claim about the "qualitative similarity of all human languages" (whatever that might be).
Anthropomorphized code reads like someone reading off a gigantic checklist that keeps getting longer and longer. Each time a new problem comes up, we solve it by adding another "If A then B" except it's something like this
if foo.bar.baz[0][1]['value']
if (foo.bar.baz[0][1]['value'] == 'undocumented business rule')
globalVariable = false # why? who knows
else
globalVariable = true
globalVaraiable = foo.bar.baz[0][1]['value']
Relying on “If A then B” quickly get out of hand. The number of possible paths that your code can take grows quickly, even exponentially depending on the structure of your program. I don't want to be dogmatic, but always be asking yourself if you can structure your code as to avoid relying heavily on conditionals, especially nested ones.Focus on the problem you're trying to solve, not the operational details of the language or other tools you're using. However, keep exposing yourself to more languages, that are different from each other in semantics, run-times. Learn about different programming paradigms: declarative, imperative, functional, etc, focusing on semantics and not syntax.
The second example I can't judge. Probalby the variable name is bad, but not extraordinarily so. It's a lookup table, I can't tell if it is a good or bad idea without know what is being looked up.
As for more advanced primality testing methods, I guess it depends on where the the fancier algorithms begin to pay off. It would not surprise me if this simple algorithm was the fastest for any input small enough to be stored in a single machine word.
Here's something from this codebase, with names and variables altered but for the most part left alone. Note the hardcoded `ajax_max` variable.
https://gist.github.com/anonymous/2d06bd45222999647d99df54fb...
So for programming the same gimmick would amount to, rather than just building code out of the constructs you're most comfortable with, also read code written by experts and try to imitate the patterns you find there.
I'm now doing sysadmin work, and do a little bit of scripting here and there while working on teaching myself Python and C. Do you have any advice to avoid the kind of anthropomorphic thinking you mentioned your coworker does? The last thing I want to do is learn the "wrong way" and potentially struggle to rethink how to code.