There are some steps that you can taken to aid in the learning of a new programming language. These are some of the things I’ve come across whilst attempting to learn Python Programming.
When initally learning to code, it is better to learn in small stages.
As tempting as it can be to rush through video tutorials or chapters of a textbook. It’s better to practice each section and become familiar before moving along.
It is important to conduct regular practice when attempting to learn something new. This helps cements the topic and allow you to remember.
Once you have completed several lessons, undertake a big project that incorporates all that you have learnt so far. I found this to be the biggest asset in helping to remember what each function did.
Make sure to add comments to any code that you write, this will help you identify its function later on. For example: This code prints a variable.
This will make the process easier later on when attempting to make changes to the code you’ve already written.
I found that upon returning to a project at a later date where I had failed to add sufficient comments, made it difficult for me to remember what each section of code did. This means I had to go over parts I’d already done before I could continue further.
It is important to use variable names that relate to the code you are writing, for example if you’re creating a multi-player game. Naming variables, player_1 and player_2 will help differentiate the functions for each player.
Most importantly of all, is when writing larger programs; e.g. two hundred lines of code. It is better to write each section and then test that code works before continuing on. This will help locate where the error exists within the code. The thought of completing the project and then having to error check two hundred lines of code is a somewhat daunting prospect.
Whilst it is important to memory recall to attempt writing a big program by yourself, there are plenty of sources of help on the internet, such as; Google or dedicated forums where you can search for answers or ask questions that help reach the answer you’re looking for. Also, chances are, somebody has already written code similar to what you need and it should be easy enough to adapt to your project.
Caution Always be certain about what the code you are copying does before you execute it. Especially if you cannot verify the source the code came from.
As always with any new project, it is important to save the data at regular intervals. This will ensure that if anything goes wrong, you have a backup of the data.