3 ms·
One thing that helps me a lot when learning new languages is to NOT copy and paste but actually re-type the code. You will be forced to read more carefully and
by cardanome 4y ago
One thing that helps me a lot when learning new languages is to NOT copy and paste but actually re-type the code.
You will be forced to read more carefully and, more importantly, you will make typing mistakes. Hunting down your own mistake will teach you the subtleties of the syntax as well as further increase your understanding of the code.
For more advanced programmers, there is also the challenge of translating the code into another language entirely, which requires a actual semantic understanding of the code.
Also once the project is done, adding small additional bonus features will further deepen your understanding.
- culopatin 4y agoI re type it but I don’t necessarily learn how to come up with that code when I’m off the leash. It’s useful when learning new syntax for sure though.
- grugagag 4y agoIt’s a stepping stone. Doing that will make you a little bit less uncomforable when you get out of your depth, that until you hit another stepping stone and feel even more comforable.
- gre 4y agoYou can try to retype it from memory too. Or write down a list of the crux functions (like a word bank) and then figure it out again.
- zem 4y agoi once sent an online book author a bug report that the font used in the code samples contained ligatures, so i couldn't just copy and paste them in. he replied that it was a feature :)