DEV Community

OnRampDev
OnRampDev

Posted on

How Long Will It Take To Learn A Language

A better question is "How long until I'm productive". Here's a short checklist that'll tell you if you're ready. This advice generalizes to any language.

Productivity vs Mastery

A really common question I stumble across on the Internet is "How long will it take me to learn X" where "X" is Javascript, Python, Vue.js, Angular.js, etc. A hidden assumption in this question is that at some point "you get it". That there's some magical 10,000 hour number where you hit it and now you can challenge Brendan Eich to Javascript duels at dawn. But that's not really how it works. Let me explain...

If you're read my prior post on choosing a programming language, then you know that programming languages can be similar to human languages. And like human languages, programming languages are never really mastered. It's much more common to learn a little bit, get your task done, learn a little bit more, get the next task done, etc. Instead of asking "when will I know X", a better question is "when can I be productive in X". And the answer to that is usually "a couple of hours".

Getting Productive

Here's a simple checklist of questions you can ask yourself to figure out if you can actually get stuff done in a language:

  1. I can use conditionals.
    • "If <some condition> then <something> else <something else>"
  2. I can write loops.
    • Display every number from 1-10
  3. A combination of the prior 2, the fizzbuzz test.
    • Up to 100, for every number divisible by 3 print "fizz", for every number divisible by 5 print "buzz" but for numbers divisible by both print "fizzbuzz"
  4. I can define variables.
  5. I can define functions or methods.
  6. I can use basic data structures effectively.
    • Arrays, dictionaries
  7. I can define and use basic "compositions" in the language.
    • For an object-oriented programming languages this means being able to define and use classes and objects.
    • In a functional language, this might mean being able to define/use first-order functions and/or composite data structures.

With the knowledge from this list in hand you'll have enough to write small to medium sized programs. Anything you find yourself needing after this can be Googled or discovered on an as-needed basis. Project-based learning is the best way to push your knowledge forward. My go-to project for really testing the limits of my knowledge and forcing me to learn a language is Tic Tac Toe.

If this post was helpful, you should join the mailing list.

Top comments (0)