Take the 2-minute tour ×

I know that learning a language, you can simply buy a book, follow the examples, and whenever possible try the exercises. But what I'm really looking is how to master the language once you've learned it.

Now I know that experience is one major factor, but what about learning the internals of the language, what is the underlying structure, etc.

There are articles out there saying read this book, read that book, make this game and that game. But to me this doesn't mean to master a language. I want to be able to read other people's code and understand it, no matter how hard that is. To understand when to use a function and when another, etc etc.

The list could go on and on but I believe I've made the point. :)

And finally, take whatever language as an example if needed, though best would be if C was taken as an example.

share|improve this question
Experience is all it really boils down to. All the theory you're an expert in is useless unless you can apply it practically. –  Simon Whitehead Sep 19 '12 at 14:09
Implement a compiler for this language. Actually, that's my favourite way of trying out any new language. If it sounds a bit too easy and boring, try defining formal language semantics instead, using K framework or something similar. –  SK-logic Sep 19 '12 at 14:14
"man, potato is dinossaur, car universe". it doesn't matter how much you master a language, if the code is bad and doesn't make sense, it still hard to understand. –  Renato Dinhani Conceição Sep 19 '12 at 14:36
I feel like were missing the point a little. Langauges evolve, so there is no mastery of a language, you grow with it, the more you use it the more you have to learn. –  nycynik Sep 19 '12 at 18:51
Code and read code. Take a random piece of the linux kernel (C Programming) and figure out what a function does. –  Alex Hart Sep 28 '12 at 12:08

15 Answers 15

up vote 140 down vote accepted

I have to answer, "All of the above." People argue about whether coding is an art, a craft, an engineering discipline, or a branch of mathematics, and I think it's fairest to say it's some of each. As such, the more techniques you bring to mastery of the language, the better. Here is a partial list:

  • Use the language all day, every day. Usually this means being full-time employed in the language.

  • Read all you can about the language. Especially, "best practices" and idioms.

  • Join a users group to talk with others about the language and what they do with it.

  • Work with other people's code! There is no faster way to learn what not to do in a language than to have to clean up after someone who did something awful.

  • Support the code you write - every bug becomes a tour of your worst decisions!

  • Study computer science and languages in general

  • Learn a very different language. A great compliment to C would be a functional language like Lisp. This will turn the way you think about your procedural language inside out.

  • Learn to use the frameworks and APIs available for that language.

  • Take the time to do your own experiments with the language. SICP is not applicable to C, but the attitude of learning a language by testing its limits is a very productive one.

  • Read the history of the language to learn why it was made the way it is.

  • Attend conferences to hear the language authors speak, or to hear what industry leaders are doing with the language.

  • Take a class in the language.

In summary, do everything you can think of. There is no way to know everything about most languages. Every learning technique you use brings an additional perspective to your understanding.

share|improve this answer
+5 for Support the code you write - every bug becomes a tour of your worst decisions! –  Jennifer S Sep 19 '12 at 15:18
+1 solely for the final sentence: Every technique you use to learn brings and additional perspective to your understanding. –  Izkata Sep 19 '12 at 18:03
@Izkata: OMG, did I write that? I'm actually a native English speaker! I've corrected it. Thanks! –  GlenPeterson Sep 19 '12 at 18:48
@GlenPeterson ...Actually, I just copied pasted without paying much attention to the sentence being "off". The +1 was indeed for the intent behind it. =P –  Izkata Sep 19 '12 at 18:55
+1 for "Learn a very different language. A great compliment to C would be a functional language like Lisp. This will turn the way you think about your procedural language inside out." - this is probably the most important. It helps you learn how to learn about programming (i.e. what to look for in what situation). –  naught101 Sep 20 '12 at 1:00

10,000 hours of practice is what it takes.

Read "Teach Yourself Programming in Ten Years"

Key points from above:

  • Get interested in programming, and do some because it is fun. Make sure that it keeps being enough fun so that you will be willing to put in your ten years/10,000 hours.
  • Program. The best kind of learning is learning by doing.
  • Talk with other programmers; read other programs.
share|improve this answer
That's what I was going to post! I haven't spent enough hours on P.SE yet, obviously. –  Martijn Pieters Sep 19 '12 at 14:09
@MartijnPieters: :-D –  vartec Sep 19 '12 at 14:10
Great title for a book! I can't wait for the sequel, "Teach Yourself to Program Well in 20 Years!" –  GlenPeterson Sep 19 '12 at 14:12
However, you do have to make sure you're not repeating the same 10 hours 1000 times... –  Izkata Sep 19 '12 at 17:01

NEVER consider yourself the master of the whole language until you have implemented a better language than that. Which means, to learn how a particular language works from beneath, get a book that teaches you the compiler/interpreter concepts of the language. For example:

  • C: The LCC Compiler book

  • C++: The Design and Evolution of C++(And then go on build your own C++ compiler or atleast understand the implementation of one using the GNU C++ Compiler code)

  • Java: Get "Inside JVM" and get the javac source code. "java"'s .C code is also helpful

  • Python: CPython implementation.

  • ObjectiveC: Almost any material from Apple about the internals of ObjC runtime env and compiler source codes is going to help you.

  • Lisp: SICP Book (teaches you Scheme and a basic interpreter-compiler for lisp like language) : Lisp in Small Pieces(another good book).

share|improve this answer
Now this is what I call an answer. I have already accepted one but this would deserve a "best answer" if it were a little earlier –  cprogcr Sep 19 '12 at 16:14
thanks :-) Hope it helps you! –  Aniket Sep 19 '12 at 16:16
You have no idea how much your answer helped. I'm reading about the books you mentioned and they're the kind of thing I need. –  cprogcr Sep 19 '12 at 16:18
hehe I learned from them. Glad to help :-) –  Aniket Sep 19 '12 at 16:20
yeah by Andrew Tenenbaum, that's the book. Any edition is good to read. It doesn't tell you how "C" works, but when you see how the C library is implemented to work with an operating system YOU built, you begin to understand C even better! Maybe enough to let you modify it.(And that's where OOC comes in) –  Aniket Sep 19 '12 at 16:52

Try using the language for something it wasn't intended to be used for. Write a device driver in Python, or a matrix manipulation library in COBOL. I think one of the best ways to master a language is to really push it, trying to make its strengths overcome its weaknesses.

share|improve this answer
When I was in college I would decide that I'd "mastered" a language once I wrote Pong in it. This worked quite well until I learned MIPS. I still have nightmares. –  Roddy of the Frozen Peas Sep 19 '12 at 22:15
Website in C can be done? –  BigSack Sep 1 '13 at 18:27

I'll make it easy on you. You'll never master a language. Period. If you think you have, then you very obviously have not. There's no mountain top you suddenly reach and say "Well, now, I've fully mastered that language. What now?" Even seasoned programmers who've been working with the same language for decades will tell you that sometimes they still run across new ideas, processes, practices, etc. The true goal is to master your conceptual understanding of a language or languages. The ability to learn new concepts and the speed with which you can adopt new or changed features in the language is far more important than rote knowledge of every keyword and syntax. Stop worrying about "mastering" a language, and simply worry about continually improving and refining the quality and efficiency of your code. That's what "masters" do.

share|improve this answer
The true goal is to master your conceptual understanding of a language or languages. Exactly. That's what I really meant. –  cprogcr Sep 19 '12 at 16:15
Any programming language is finite. It is built of a finite number of concepts, requires a finite number of idiomatic tricks. Therefore, it is easy to master any language. Of course, one cannot master programming in general, there is always a potential for a further improvement, but the question is specifically about a given language. –  SK-logic Sep 19 '12 at 16:40
SK-logic: programming languages change, and so do their libraries and environments. As a result the way you work with the language changes as well. For example, jQuery changed the way we work with Javascript. –  orlp Sep 19 '12 at 20:42
It's probably true that no one can really master a language like C++, but for somewhat minimalistic ones like Scheme it should be quite possible — as @SK-logic says, it's really the programming, in whatever language, that cannot be mastered, because the field of applications is infinite. –  leftaroundabout Sep 19 '12 at 21:01
@nightcracker, languages do not "evolve". C99 will always be C99 and won't ever change. C++11 will always remain C++11, even after it is superseded by a next generation language. Environments do "evolve", yes, but jQuery did not introduce any new techniques not known before to the other languages communities. They were new to the narrow Javascript community only. –  SK-logic Sep 19 '12 at 22:21

You already know the answer to this

  • You have to use the language. A lot. To solve as diverse a range of problems as possible
  • You have to read (and, ideally, work with) other peoples code, preferably ones who have a degree of mastery (i.e. a deep understanding of at least some aspect of the language). By extension, if you can talk to people about solving problems with the language then so much the better.

It comes down to hard work and determination and for all that you may never get there.

Think of where we get the term from - to become a Master Craftsman you had to be an apprentice and then a journeyman and only them might you have the chance to become a master. Along the way you would be taught and you would practice and you would observe and question others at their craft and (hopefully) learn from them.

There's no magic bullet...

share|improve this answer

There is no substitute for experience. In order to master something, you have to do/use it, at lot, for many different things.

So go ahead and use that language for exercises (like Project Euler) and personal projects, stuff you actually need, or stuff you just think is interesting. Write a game, write a webapp, write a parser, whatever you like. And at every step, strive to understand what you're doing rather than just pasting together code or following instructions.


That is something you can do right away once you've understood the basic syntax. Just take some code and take the time to figue it out in detail. Look up stuff you don't understand, or ask specific questions on places like Stack Overflow.

share|improve this answer

On the high level side of the problem, learn about architecture: how to organize your projects, what's its structure. Don't just let them grow randomly.

On the middle level, learn different techniques and paradigms. The more diverse tools you have in your repertoire, the more power to you. If you only have studied java, python and ruby, you've been exposed just to a very little portion of the programming space. Learn imperative and functional programming, learn prolog and J. The idea is not to "master" hundred languages, but to learn about different ways of solving the same problems.

On the low level side of the problem, one thing that could be help you to be a better programmer (in fact better at whatever you do) is to have a good mental model of the platform. For example, you can learn how C control structures work and know the most common libraries, but if you don't have a mental model of how pointers and memory work, then you'll have troubles with moderately complex expressions.

share|improve this answer

May I make a couple of suggestions?

First if you can find a mentor to discuss your use of the language with, and to get the best tips and tricks, and to answer when one technique is better than another.

Secondly, practice as much as possible and try the language out to the max! I used to work in a team, that would (as a matter of fun) pick out a verb or other piece of the programming language from the manual each day. It was a mark of honour if you could work it into your coding that day. This meant the whole programming team needed to look at and understand the (sometimes) obscure term in order to understand and use it effectively. Some days we failed, but that team was fun to work in and really technically switched on!!

share|improve this answer

To build on what @TMN said. I've had great success in learning languages by writing the same program in a different language.

For example writing a program that reads in a CSV file, parses the text and then writes it back to a second CSV with the columns in reverse order.

Like this,




This will get you a basic understanding or the language. Then see what else you can do. Maybe allow for value substitution or reordering or reading from the command-line. Make it as complex as you want.

Also I think what @GlenPeterson said about,


Is a great Idea. I'd suggest a language like Haskell because in the latest versions you can program using all four programming paradigms of OO, procedural, logical or functional. Even though it's actually a functional language you can with some effort implement the other paradigms which would be a good learning experience.

Great language to play around with.

share|improve this answer

Start by reading and understanding what is SDLC (aka, Software development life-cycle) . It is an iterative process that involves self-improvement, learning, **practicing, practicing...**

enter image description here

That would open your horizons on what areas do you need to learn or improve. There are several core software engineering books that you would also find very useful to read once you build couple of applications on your own.

In addition, once you would feel confident with an OOP language, you may start learning design patterns, and Head First Design patterns is really good book to consider. I love this book.

share|improve this answer
Thanks. I had already chose answer by the time I read this but will definitely take your advice. –  cprogcr Sep 19 '12 at 14:19
not sure why down-voted, please let me know what needs to be improved. –  Yusubov Sep 19 '12 at 15:43

The key point I agree with most from other answers is experience and lots of it. But in so doing the experience must keep your level of learning accelerating and not plateauing.

Several months ago I started with F#.

  • For the first week I read all of the links from the F# site.

  • For the next few weeks I ordered several books on F# and read them. Do yourself a favor and stay away from e-books that aren't PDF. The hard print versions are good but the e-books are terrible.

  • For the next few weeks I finally joined StackOverflow and started reading lots of questions and writing some code from scratch.

  • At this point I didn't want to plateau which sounds like where you are at. Having learned many languages in the past, the best way I found to learn a language is to learn about it and its relatives.


  • C#, Java
  • Different dialects of SQL
  • ML, Ocaml, F#
  • HTML, LaTeX are distant relatives
  • ANTLR, JavaCC

The big difference here is that in learning the relative language you will have to learn the environment and particulars of the relative and thus in resolving how to understand the underlying common concept will learn the language you want better. Now to learn something meaningful, pick a real world application and translate that, it will push you into learning things like debugging, modules if they have it, tools, user groups, and so on. A programming language is more than just a language.

When I did this for F# a several months ago I started translating a Proof Assistant from OCaml to F#. While I still have holes in some of my F# knowledge, my rate of learning has far surpassed any previous level of learning a new language. Since I am nearing the completion of this project, I am now seeking more advanced concepts of the language.

So not only accumulate experience, but accumulate experience that pushes you to keep researching. I spend more than half my time researching topics related to F# and sometimes spend whole weeks without writing one line of F#, but when I come back to the problem or concept that sent me off to learn, I am so much more ready for it the next time. If you look at my OCaml to F# and other F# questions under my stackoverflow profile you will see how fast my learning has progressed. In some areas I have reached the point that I can't ask specific F# questions because it is the concept I need and people in other languages sometimes unknowingly have the answer.

share|improve this answer

You cant learn a language from the book. All you need is practice and practice . Don't think You can learn a language from that particular book or that particular source .Just think programming language is same as human language .You cant simply learn English or French by reading a particular book.All you need is using it in day to day life. Code from scratch , extend its functionality try to build something that will make you little bit satisfied.And if you are thinking mastering a language as knowing whole language and using each element of programming language in practical coding ..YOU CAN'T. Or even if you can it might take 10-15 years.

share|improve this answer

Programming languages reflect the ideas behind the programming paradigms that were developed targeting general-purpose software development or for developing special-purpose software. For example, a program language like Java represents the object-oriented program paradigm, but AspectJ (an extension of Java) is used to program according to aspect-oriented programming.

Given this short introduction, in order to really master a language, buying and reading a book by itself wouldn't be much helpful. You'd need to understand the environment in which you can program using the desired language, learn about the paradigm, and more importantly build a meaningful application using the language. Building a small application that can give you a taste of various tools provided by the language is a really helpful learning approach.

I have seen people coming from the pure C community without learning anything about object-orientation and struggle in learning Java or objective-c. I also have seen people struggle with programming user interfaces when they haven't really gone through understanding of user interface elements, event-driven programming, etc...

I hope this helps!

share|improve this answer

I would add two items to Glen's list

  • Try to solved hard problem that others have e.g. give answers on SO
  • Read language designers blogs/book. That's the best resource of deep knowledge. You would know what's the design decision behind reason X.
share|improve this answer

protected by World Engineer Jul 1 '13 at 3:00


Would you like to answer one of these unanswered questions instead?
