1. 28
  1.  

  2. 15

    The main advantage I see in learning a second programming language as a beginner is that it will help you differentiate between programming concepts in such-and-such a paradigm/language/etc from programming concepts in general (eg, understanding how map/hash/dicts work in ruby vs the concept of a map/hash/dict generally). It’s not always obvious when you are first learning.

    1. 1

      Thank you, that’s perfectly summing up an idea I often paraphrase very badly when I encourage people to look at a second language.

    2. 20

      You should learn a second human language as well. Most of the benefits described for programming languages apply there too.

      1. 8

        I don’t have much experience with “real world” developers, so I might have a wrong impression, but are there people who really think that knowing one language is enough to be a good developer (not to do their job – you often don’t even need to know your language entirely to do so). It seems like something rather basic, and at least in a academical context, you can’t even get around it.

        1. 22

          You could spend your entire career writing a single language, and indeed some programmers believe in the power of a single language to the point of zealotry.

          Personally I concur with the article; a language is just a tool.

          The Seven Languages in Seven Weeks book was transformative for my career and personal development. I recommend it.

          1. 5

            I only bothered to read about 1/3rd of the words in your post completely at random, so I’m going to assume you were most likely advocating that new programmers chase large stable salaries by learning COBOL as soon as possible. ;)

            I have a gut feeling that working in a JVM language without also learning Java might be a bad plan. I suspect that one might eventually learn Java by accident anyway if one works with a JVM language for long enough. So that’s two programming languages already. :)

            1. 2

              Rich hickey much? :)

              1. 1

                I for one recommend checking out “unknown” languages wherever possible, because they often harbour other lessons, or ways of thinking, from what you might be used to.

                When I went through my CS undergrad degree, the University was in the process of changing its CS curriculum. In particular, they were starting to do away with some of the “one language for a term” courses, like taking COBOL or APL for a full academic term. I took a couple of these, though just sat in on COBOL enough to admit that I didn’t want to admit knowing it.

                A friend took one of these multiple-language courses during a spring session, which is compressed into about six weeks. Basically, he had to learn about something totally different, and write an assignment using it, per week. The prof (hey, Dr. Bate!) was brilliant, and could change languages the way most people change socks, but mere mortals found it a challenge. I think I would have liked that one myself.

              2. 4

                Such people absolutely exist. I help my company’s recruiter review resumes from software engineering candidates, and I’ll regularly see someone who learned Java in school, got a job writing Java code, got some Java certifications, left their job to get a job at another Java shop, and to make themselves stand out, point out that they are a regular attendee at some Java conferences.

                I’ve noticed a few patterns, though they’re “patterns” only in that they happen often enough for me to notice them, not in that they represent anywhere near the majority of candidates.

                Java: The language of choice for monoglots with university CS degrees. I can’t remember the last time I saw a CS-degree-holding candidate whose sole language was anything but Java.

                Ruby: The language of choice for non-degree-holding monoglots who go to programming retreats like Recurse Center to sharpen their skills.

                JavaScript: The language of choice for full-stack monoglot web developers, unsurprisingly.

                Python: The language of choice for monoglots who transitioned into software development from some unrelated profession.

                Of those, Java is the most common, Ruby and JavaScript are less common but not too unusual, and Python I only see occasionally. I never see Clojure or Haskell or Scala or Rust or Go monoglots. We’re not a .NET shop, so it’s possible there are a lot of C#-only folks we’re just not seeing.

                The other pattern I see: Monoglot candidates tend to do worse in our technical interviews than polyglots. This holds true even for coding questions in their language of choice that don’t involve any obscure algorithmic trickery. I often ask a question that involves extracting substrings from an input string, and it’s shocking to me, for example, how many “Java developer with 8 years of experience” candidates don’t appear to have solidly internalized the idea that Java strings are immutable.

                1. 1

                  As a C# developer (It’s been the main language I’ve made money with over the years), I’ve bounced between a few .NET shops. I don’t think I’ve encountered a C# monoglot yet. Often, C# is paired with another programming language, either SQL (Specifically T-SQL), or Javascript, at least in a business context. I’ve seen people with VBScript in their backgrounds, people with C++ in their backgrounds, people that knew SQL far better, and people who where a bit too fond of copy-paste, but there’s usually at least one other programming language involved.

                  That being said, I’ve only worked at 5 companies that use .NET.

                  Unlike the other languages you’ve mentioned, I don’t think there are many ways to do just C# usefully, unless you’re a diehard Microsoft fanboy who doesn’t want to do websites or database work.

                2. 2

                  I think you can be effective if you know just one language (especially if it is well suited to the domain, or has a lot of specialized libraries). But I think that you’ll be radically more effective if you know more, just because of the cross pollination. I find it’s harder to generalize if you don’t have at least two languages under your belt.

                  1. 2

                    I see no reason a person theoretically couldn’t learn only one language in their entire career but it would be relatively rare, like living in the same house your while life.

                  2. 4

                    I would suggest to most importantly really learn and understand them. That doesn’t mean one read a book about it or wrote some small thing. There is more to knowing a language. There’s the syntax sure, there’s patterns, okay. But way too often there’s people that have been in a job and while they are able to mold code in a way that it works it rapidly becomes clear that this person doesn’t know the language. Usually this results in jumping through hoops, destroying all of readability, simplicity, performance and maintainability at the same time. You can still have a good career doing so and it’s fine. If you do learn languages that way however you won’t get much from additional languages. You will likely end up hating that other language and most likely every other language.

                    There is more to programming languages than syntax, “features” or attributes we give to them, like whether it’s (purely) functional, object oriented, what kind of typing it uses, etc.

                    To learn something like that I think it’s good to stay close to the core. That means reading official documentation and articles, having used the standard library a lot, rather than only touching the language through frameworks, also reading standard library code. These things tend to teach a lot in regards to thinking in a certain language.

                    Else it’s really easy that a different approach is seen as a weakness, rather than a difference. And that’s a kind of mistake that prevents one from learning, rather than helping.

                    1. 2

                      This is really key. You don’t have to get a full-time job writing code in your new language, but you have to at least finish a project of nontrivial complexity, and while you’re doing it, you have to make an effort to follow the idioms of the language even when it doesn’t force you to. That last part is usually much harder than learning the syntax, in my experience.

                      But every time I’ve done that, it has made me a better programmer in my main day-job languages.

                    2. 2

                      Getting to two for beginners is good, but eventually you should work your way to four.

                      1. Learn one language to pay the bills.
                      2. Learn another for the thrills.
                      3. One more with which to automate.
                      4. Yet another for a job at a future date.

                      Current job. Intellectual curiosity. Time saving. Not becoming obsolete. For me it’s (in order): C++, Haskell, Python, and Rust.

                      1. 1

                        Ooh, I like that.

                      2. 1

                        If we talk about the main programming language, then I can imagine a developer who knows only one and have a successful career and a happy life. However knowing more languages is always useful, even if you do not use them regularly and do your jobs mostly in your main language. Some people recommend that you should learn a new language every year (or new technology).

                        But if we are talking about languages at all, I can hardly imagine that one language could be enough. Such jobs are very rare and you are very limited (you will need help of your colleagues very often). According to my experience, most of jobs require more than one language – you will do e.g. Java (C++/Rust/PHP) + SQL + regular expressions + XPath (XSLT, XQuery…) + Bash or Perl for scripting + maybe sometimes C for interaction with OS and low-level libraries + domain specific languages…

                        1. 1

                          I’ve learned a few different languages in the past. Some of them (Java & C++) I used for years. But I wouldn’t want to ever use either of them again. Does that still count…?

                          1. 1

                            Seems to me that it does. I know perl, but haven’t written it for years. But I still know it.