Kickstart a new language
When learning a new language you are going to:
- make a lot of mistakes.
- get stuck with a lot of things you don’t know yet.
- feel again you know nothing about programming.
- use the documentation, tutorials and examples.
- experiment a lot to fully understand the concepts.
The time you spend in that process is an investment. You are going to be a better programmer because of it.
Let’s imagine the following scenario: You have written some code and after executing it, you find that there is a mistake in it (syntax, behaviour or something else). You spent 20 minutes writing the code, 10 more finding where the problem is and another 10 fixing it. That’s 40 minutes to try a simple thing.
Those mistakes are inevitable. They are part of the learning process. But, is really necessary to spend that amount of time to learn from that mistake? Are the extra 20 minutes of searching for the mistake and fixing it really necessary? You already know the basics. How can you spend only the necessary amount of time learning what you don’t know yet?
It helps a lot if you are conscious of when and why you are losing time you don’t need to.
The two main aspects I know that influence the process are: the feedback loop and the source of knowledge.
Feedback loop
By feedback loop I mean the amount of time between the moment you make a mistake and the moment you realize you made a mistake.
If you have a slow feedback loop, you are going to be losing time. The ideal scenario would be to know the mistake you made exactly at the same moment you made it. That would be similar to having a pair that knows really well the language constantly looking at the code you are writing.
Having tools like testing frameworks and automating those tests to run as frequently as possible is one way to speed up the feedback loop.
Using a repl is another way of speeding up the feedback loop.
Source of knowledge
Another significant factor is the source of knowledge.
At some point you are going to need information about something you don’t understand or don’t know.
The usual way is looking at the documentation or search in the Internet. But to do that you need to know the thing you are looking for. Most of the times, the concepts you are trying to learn are new or have a different name to refer to them. So, because you don’t know how to look for it, is hard to find the precise information you want.
The most efficient way is having a person who already knows the language so he/she can explain the concepts with the amount of conciseness you need and when you need it. But that is not always possible.