Recently I have been spending an unholy amount of time learning a new programming language and improve my existing knowledge with lots of practice. My eventual goal is to reach a stage with a single programming language where I won’t have to refer to the documentation as frequently as I currently do, I should be able to read a problem and get to work on the solution without having to use my google-fu to search for answers. It’s not easy by any means, I have seen some industry veterans whose bread and butter is programming often get stuck while programming and has to look up things. This is not necessarily a bad thing – being able to research for a solution to a programming problem is a skill in itself. Not everyone knows the right question to ask or the right place to search for solutions.
But at the same time, there is a value in having the knowledge deep enough that you don’t get stuck very often. It’s important to note that everyone gets stuck, the idea is to not get stuck often. How does one reach that point? The short answer is lots of practice – the long answer is to follow the same process when learning a new programming language. This is the process I follow when I am trying to learn a new programming language:
|1||Get an introductory book on the language you are trying to learn.||2||Take extensive notes on programming concepts||3||Practice, practice, practice. You can read all you want – but if you don’t actually practice code examples, it’s useless.||4||Also read a lot of codes, everyone has their own style – there is a lot to learn by just reading existing codes.||4||Solve actual problems – do competitive programming.|
Let me expand a bit on what I mean by the above-mentioned points.
Get an introductory book on the language you are trying to learn.
In the world of blogs and extensive online documentation of popular programming language and sites like CodeAcademy who reads a book?
Everyone who is serious about learning a programming language. Not all programming books are equal so it helps to do some research on good books on your discipline.
The reason why it’s a good idea to read a book (several books) because books tend to go through a process and break down the act of learning a programming language into small digestible chunks with a lot of example codes and exercise to follow up on. People still use the same template in programming books as they did in high-school because the process works. It’s battle tested over many many years. But it’s important that you go through the process.
Take extensive notes on programming concepts.
Taking notes is your own way of writing down things that you are trying to understand or just learned. Someone who writes a programming book comes from a different mindset (a mindset of someone who is already good at programming), than someone of who is reading the book and learning from it. But rewriting concepts you are trying to learn in your own word, you are teaching yourself the concepts instead of just passively reading some text. This is called active reading – you are an active participant in the knowledge written in the book. To me, it made a huge difference. People have their own style on taking notes, I personally use Asciidoctor, and highly recommend it.
Practice, practice, practice.
Don’t just read codes in the book, write them down, even if you don’t understand it. Go through all the exercise at the end of a chapter. The act of going through those exercises will push you to do online research on the problem and will push you to learn a world of new concepts that might not be present in the book – in a different way. Try not to move to the next chapter until you are done with the exercise at the end of each chapter and comfortable with them.
Also read a lot of codes.
I spend an insane amount of time reading codes at GitHub, Rosetta Code, Daily Programming Challenges, reading codes written by others on relative simple or clever problems can give new insights in to programming – that you might not get by reading problem sets in a book.
Do Competitive Programming
Not everyone has positive views on competitive programming when learning to program. I happen to think that it is a great way to push you out of your comfort zone. Competitive programming tends to be heavy on algorithms, not that it’s a bad thing. However, Most real-life programming tends to not deal with algorithms as much. But it does take a specific type of skill sets to learn algorithmis in programming. Now package it into a platform where other programmers are competing with you to be on the top. If you are a competitive person in nature this can push into new height of programming. Some competitive programming site I recommend: HackerRank, CodeWars, CodeFight, Kaggle (machine learning, data science), TopCoder.
Being really good at programming can take many years – depending on how committed you are and how much time to spend on it. But having a structured process to learning can help you go a long way.