earning a new language isn�t the easiest thing to do. It can, however, be a very rewarding experience if you are persistent enough. Luckily, if you know how to code in one language, it is much, much easier to learn another language. Here are some tips that can help you.
Really, practicing is the only way you can learn a programming language. It is useful to have some standard programs that are the first programs you try out. Since you would already have the logic worked out, the focus would be more on grasping the language�s syntax. Here are some program ideas you can start off with:
Ask the user for his/her favorite number, and then send back a message saying that (favorite_number+1) would have been a bigger and better favorite number.
Implement some form of fractal terrain generation.
You aren�t going to get anywhere if you keep going back to your favorite language to solve everyday problems. You need to pro-actively force yourself to use the language you are trying to master. If, for instance, you know Ruby and want to learn C, stop writing those small, everyday code snippets in Ruby and do them in C instead.
Do it Often
Learn a new language every once in a while. If you keep doing it, you never get out of the flow or settle down with what you know so much that learning something new becomes a struggle. Some people say that you should learn a new language every year, but I think that�s too often. Do what seems right to you.
Don�t Blatantly Reject New Ideas
Seriously, don�t. You need to change your perspective, and even if you can�t move on. Every language has it�s pros and cons. There is no �One True Way�, and something need not be right just because you believe it to, or because it�s how your current favorite language implements it. I think I�ll mention an example here. Python forces indentation, so what? It may not be so bad after all, maybe you�ll prefer it�s way later on, and even if you don�t, so what? There are loads of other cool features in it.
I can�t possibly stress this enough. Read as much code written by people proficient in the language you are learning. You need to read loads of code. Reading code helps you learn a lot about the language itself, common idioms, quirks and lots of other stuff. Ideally, you should be reading at least as much code as you write.
This isn�t the first or the final article about this. It�s just what I have to say. Having said that, I�m open to criticism. I�d like to know what you liked and what you didn�t like about this article. I�d appreciate it if you left a comment here.
Be open and be sure to enjoy learning. It shouldn�t be mechanical or forced.