DEV Community

Discussion on: How many programming languages do you know?

Collapse
 
jxpx777 profile image
Jamie Phelps

I tend to give an answer to this question that is long-winded and frustrating to people. First, once you reach a level of proficiency with programming where you understand the big pieces that you'll see in any particular language (loops, conditionals, value vs reference, comparison, common design patterns) it's not very difficult to pick up the syntax to apply those concepts in a new language, so in that sense, I don't find this question all that useful. "Do you know $LANGUAGE?" "No, but I can probably be reasonably productive in it within a couple weeks."

But! Do I think that this means I "know" all the languages? Not. At. All. For me, knowing a language in programming is more about knowing what is idiomatic and which design patterns apply most commonly. So, in that sense, I think I really, truly know maybe 3-5 languages starting with Ruby, Javascript, and Objective-C but then I would include in a second tier of lower fluency Typescript, Go, and Swift.

I also think it's a mistake to think that because you know the syntax or even the idioms of a language means you'll be able to be productive in it without learning some ropes. I have been writing Javascript professionally for about 8 years but the last few months have been my first time working in Node.JS projects, and adding that to the mix has presented a whole different set of challenges. Conversely, someone with a lot of Node expertise would probably struggle to work productively in the architecture required for browser extensions at the beginning.

What I would advise people looking to expand their knowledge of different programming languages is to learn about different paradigms of programming and the advantages and disadvantages, analyze the tradeoffs. Prototype-based languages like Javascript and Lua have different strengths from languages that emphasize functional programming paradigms like Clojure and Haskell. And dynamically typed languages like Ruby and Python have advantages and challenges compared to statically typed languages like Go or Swift. What are the advantages of concepts like pattern matching and which languages leverage them the best? These are actually useful questions and learning about the different paradigms expands your toolset so that you have more kinds of information to bring to bear on solving problems. I think the biggest challenge and probably the biggest benefit to learning wildly different languages from what you already know is this process of learning that these different paradigms even exist. For instance, I wasn't even aware I should know about pattern matching until I dipped my toe into Elixir and now I see that it's a powerful feature that enables some very elegant solutions to really thorny problems.

If you already feel comfortable in a programming language or two, maybe learn to implement different paradigms there. What constraints does that impose or what possibilities does it expose? Before I left my last job, I had a coworker that introduced some pretty pure functional programming to a Javascript project. It was really challenging to think about the problem in a way that I wasn't accustomed to thinking about Javascript code.

Like I said, my answer to this "simple" question is long-winded, but I hope it's helpful to break folks out of the mindset of treating programming languages like Pokemon. Instead, I hope you'll focus on learning the concepts that will expand your programming toolbox so you can find elegant solutions to interesting problems.