How long to learn a programming language?

<p>Language, shmanguage.</p>

<p>Learning the basics of how to do basic, beginner-type programs in a language ought to take a month if you stick with it (get one of those “teach yourself C in 30 days” or whatever books). But once you try writing actual programs for assignments you’ll find that knowing the language is not the hard part. If you forget syntax or something you can just look it up. No, the hard part is coming up with the faster algorithm or creating the right data structure.</p>

<p>A typical CS education at a 4-year university usually goes like this:</p>

<p>Class The First: learning how to write simple programs in C++ or Java, using loops and functions and variables and basic (usually text-based) screen I/O and file I/O (usually just creating text files)
Class the Second: learning the basics of algorithms and data structures, using things like recursion, arrays, sequences, partial-maps, binary trees, to do things like, say, remove all HTML tags from an HTML file to produce a text file
Class the Third: learning the basics of creating classes and new types, sorting methods, etc.
After that you branch out into things like: pointers, more data structures and algorithm analysis, assembly language and systems programming, operating systems, formal language theory, etc.</p>

<p>Unfortunately, it takes a while until you are able to write “interesting” programs that are actually fun and useful, instead of just academic exercises to learn how to use arrays and pointers. So, learning a language: one month for the basics. Being competent at the cool stuff: a year or two.</p>