

Programming as a Foreign Language - redsquirrel
http://nuts.redsquirrel.com/post/23200685522/programming-as-a-foreign-language

======
h2s
I wish more developers treated learning to program like learning a foreign
language. When you're learning a foreign language, your #1 goal is to cast off
any poor grammar or pronunciation and sound like an intelligent native
speaker. It's been my experience that people often don't care very much about
doing this with the programming languages they use.

Routines that are too long and ought to be refactored into smaller ones are
akin to run-on sentences. Leaving out semicolons in your JavaScript is like
speaking French in an Italian accent because you already know Italian and
French people seem to more or less understand it. And people who refuse to
follow prevailing code style guidelines? Those are your "Everyone there speaks
English anyway" folks.

Such poor communication skills would be humiliating when trying to communicate
in a foreign language, but for some reason people often wear them like a badge
of honour when trying to communicate in a programming language.

~~~
EliRivers
"I wish more developers treated learning to program like learning a foreign
language. When you're learning a foreign language, your #1 goal is to cast off
any poor grammar or pronunciation and sound like an intelligent native
speaker."

I'm not sure that's true at all. When I learn a foreign language, my aim is to
be able to communicate. The extra effort required to be perfect far outweighs
what I need from it. The native speakers I talk to are quite capable of taking
my bad grammar and understand my meaning. Wanting to sound like an intelligent
native speaker isn't just at the bottom of my list of needs; it's not even on
the list.

When learning a programming language, I have no choice; I must have perfect
grammar.

"Such poor communication skills would be humiliating when trying to
communicate in a foreign language"

Not at all, in my experience. Simply having some simple grasp of the local
language is met with delight; just having made the effort goes a long way,
even if the locals themselves prefer to speak with me in English.

------
masterponomo
Makes me think about programming IN a foreign language. One time we had to fix
some code a Turkish client had added to our system. The spec and the code were
in Turkish (imagine Turkish COBOL if you will). We somehow got it done by
trial and error (Is THIS what you want? No? How about THIS?) I have no idea
whether this means anything, but we came away saying "Berklat bokari" to each
other at random moments on future assignments. Those words or something like
them kept appearing in the Turkish code.

~~~
luminarious
For a lot of the world population, english, as common as it may be in
programming, is still a foreign language. People less fluent in English are
that much less likely to try scripting something. Not only would the language
keywords make little to no sense, but the supporting materials and comments as
well.

~~~
TazeTSchnitzel
Thanks to the British Empire and partly to the United States, English is
effectively the international language of Business, though.

------
yuchi
My girlfriend is seriously interested in linguistics. When she discovered I
learned to code when I was a kid, and given the speed at which I learn (and
forget!) foreign languages during my journeys in Europe, she ended up with the
idea that learning a programming language is a similar procedure to that of a
speaking language.

She also thinks that my ability to learn languages has been maintained strong
by the fact I learnt a new __programming __language every year.

Also, the fact that bilingual kids are able to retain for a longer time the
ability to learn languages made her think that as a kid I could be considered
as bilingual.

I had the chance to confirm this looking at a colleague of mine who started to
code as a kid too. Looks like we have some common abilities in language
learning.

------
Zenst
I had to work on some dutch COBOL once, was actualy realy easy if you take the
standard approach and that is to ignore ALL comments as the code is the only
documentation you can truely trust.

But the only truely universal language for programming has to be bainfuck :).

------
tikhonj
It's funny, but I've actually used the opposite idea: approaching the grammar
of foreign languages like a programming language. Most programming languages
are just historic collections of arbitrary rules, most of which make some
amount of sense. Most natural languages are the same thing on a much grander
scale. Thinking about grammar like this helped me learn it properly.

------
tom_b
There are some interesting research efforts that explore the link between
early-age bilingual learners and positive cognitive effects [1].

What is striking to me is that hackers have long made statements that learning
different programming language paradigms makes us better hackers. While we can
make anecdotal arguments that being a good functional and a good imperative
programmer makes us better hackers in general, the above research is exploring
the idea that multi-language proficiency has positive cognitive effects that
_cross domains._

[1] Carlson S. M. & Meltzoff A. N. (2008). Bilingual experience and executive
functioning in young children. Developmental Science, 11, 282–298. Availabe at
[http://ilabs.washington.edu/meltzoff/pdf/08Carlson_Meltzoff_...](http://ilabs.washington.edu/meltzoff/pdf/08Carlson_Meltzoff_Bilingualism.pdf)

------
jwingy
Interesting comparison, but I find it hard to relate to at all simply due to
the sheer amount of words you need to learn in a real foreign language to
achieve fluency. Seems much more daunting to me...but I guess my glasses are
tinted.

~~~
njs12345
Try <http://memrise.com/> for vocab learning - it's really helped expand my
French vocabulary quite lot and seems to make it stick well. Doesn't really
help with spoken fluency though, for that you just need lots of practice!

~~~
chousho
Thank you so much for bringing this site to my attention. It seems to have
become a nice replacement for smart.fm which I used a few years ago.

