11 tips for learning Python for 'newbie'

We believe that the first step in learning any programming language is to ensure that you understand how to learn because this is arguably the most important skill related to computer programming.

What is the best way to learn Python? This is probably one of the most common questions that the 'newbie' feet wet feet into the world of Python questions and learns.

We believe that the first step in learning any programming language is to ensure that you understand how to learn because this is arguably the most important skill related to computer programming.

Why know how to learn so important? The answer is simple: as language grows, libraries of languages ​​and tools will also be upgraded. Knowing how to learn will be necessary to keep up with these changes and become a successful programmer.

Picture 1 of 11 tips for learning Python for 'newbie'

It can be affirmed that Python is a great language. If you've just decided to 'engage' on the journey with the goal of becoming a 'class' Python programmer, these will be some learning strategies. Let's find out with Quantrimang!

Make Python become attached to you

Tip # 1: Write code everyday

Perseverance is very important when you are learning a new language. The first tip for you is to persist in writing code every day. When you repeat an action, the brain will gradually remember. Over time, you will perform better, faster, better. This is called "Muscle Memory". Persistently writing code everyday will help you develop this 'muscle'! Maybe at first it will make you a bit bored, so try starting with about 25 minutes a day and increasing the time.

Picture 2 of 11 tips for learning Python for 'newbie'

Visit More than 100 Python exercises that have a solution to get started with Python from easy-to-difficult exercises.

Tip # 2: Boldly write the code out

When you have made progress on your journey to becoming a programmer, you will wonder if you need to write code, write down notes to note? The answer is yes, sure! In fact, studies show that handwritten note writing is most beneficial for remembering and maintaining long-term work. This will be especially beneficial for those who aim to become full-time developers / developers, because many interviews will involve writing code on a whiteboard.

When you start working on small projects and programs, writing by hand can help you plan your code before you switch to writing on a computer. You can save a lot of time if you write down what functions and classes need, and how they will interact.

Tip # 3: Code directly on Python's command line window

Whether you're starting to learn about Python's basic data structure or you're familiar with debugging an application, Python's command line window - Python shell is always one of the best learning tools of friend.

Picture 3 of 11 tips for learning Python for 'newbie'

To use a Python shell (sometimes called a Python REPL), first make sure Python is installed on your computer. To activate the Python shell command line, just open the terminal and run python or python3 depending on the installation.

Tip # 4: Have a reasonable break time

Taking breaks is very important to have a good study session and work, especially when you are receiving new information. When faced with a process, you should split up into small tasks to do in a short period of time, alternating between short working intervals will be break-time intervals. This method will train your brain to focus on working for a short time, to help you fall into a situation where there are always deadlines to complete the job and also to regularly recharge the energy.

Picture 4 of 11 tips for learning Python for 'newbie'

These break-time intervals are especially important when you are debugging. If you encounter an error and can't understand where it is, take a break to see it. Step out of your computer, take a walk or chat with someone.

In programming, your code always has to follow exactly the rules and logic of the language, so maybe just a single quotation mark can break everything. Always keep your eyes bright and clear.

Tip # 5: Become Bug Bounty Hunter

Talking about 'deer' problems fixing errors, this is inevitable when you start writing more complex programs. Everyone will have this situation, don't worry! Important, do not let these errors 'take down' and disappoint you. Instead, when finding and fixing that 'nasty thing', enjoy the moment and think of yourself as a Bug Bounty Hunter - a bounty hunter.

When debugging, it is important to have a methodical method to help you find out where the error is broken. Take a look at your code in the order of execution and make sure each part works quite well.

When you find the area where the error occurred, insert the following line of code into your script and run it:

 import pdb; pdb.set_trace() 

This is the Python debugger and will put you in interactive mode. The debugger can also be run from the command line:

 python -m pdb . 

Collaborate with others

When things start to stick, work on your learning through collaboration. Here are some strategies to help you make the most of your work with others.

Tip # 6: Study together with people who are searching like you

Although the code sounds like a solitary activity, it really works best when more people work together. This is a very important tip, you should learn to write Python code with others who share the same goals. This will allow you to share and learn more tips or tricks.

Picture 5 of 11 tips for learning Python for 'newbie'

Don't worry if you don't know who to study with. There are many ways to meet Python enthusiasts! In Vietnam, there are not many events connecting people who learn Python but the forums still have quite a few talented people ready to help you. If you understand English well, join PythonistaCafe - a peer learning community for Python enthusiasts like you!

Tip # 7: Teach Python to others

It is said that to learn what is best, you should first learn about it and teach it to others. There are many ways to do this: present or teach back to your favorite people and need to learn Python just like you, write a blog post explaining newly learned concepts, record videos explaining something you have found out. Each of these methods will help reinforce your knowledge as well as expose the gap in understanding to help you quickly gain knowledge.

Picture 6 of 11 tips for learning Python for 'newbie'

Tip # 8: Apply Double Programming - Pair Programming method

Pair Programming is a programming method consisting of 2 programmers, sharing a common workspace (mouse, keyboard, screen, work content .) Users of the keyboard are called "drivers" , the other person is also programming but interested in navigating more, this person is called "navigator". The roles of these two people will be exchanged continuously for a certain period of time (usually about 30 minutes ~ 1 hour). Both of them must exchange with each other at the highest level, to work towards resolving the work effectively, high quality, limiting individual errors.

Picture 7 of 11 tips for learning Python for 'newbie'

Pair Programming has many benefits: it gives you the opportunity not only to have someone review your code, but also to listen, consult other people about the same problem. Being exposed to many ideas and ways of thinking will help you solve the problem better when you come back to writing the code yourself.

Tip # 9: Ask reasonable and necessary questions if you need help from others

People always say that when learning, nothing is called a bad question, but for programming, you will probably ask a bad question that makes the person uncomfortable if not prepared well. more. When you are looking for help from someone who does not know what you are having, it is best to ask clear questions for higher performance and quality.

  1. Give an overview of what you are trying to do, clearly describe the problem.
  2. Outline what you have tried to overcome.
  3. Give your prediction about the problem. This lets people who are helping you know what you are thinking and understanding that you have made some thoughts yourself.
  4. Demo what's going on. Include code, error messages and explanations of the steps you have taken resulting in an error. In this way, the helper does not have to try to reproduce the problem.

Suitable and moderate questions can save a lot of time. Ignoring any of these steps can lead to a conversation going back and forth easily. As a newcomer, you should make sure you ask reasonable questions to convey your thoughts, and for those who help you will be happy to continue to help you in the future.

Build your own program

Tip # 10: Practice, practice, practice

For beginners, practicing many small exercises will help you be confident with Python, as well as develop muscle memory that we mentioned above. Once you have mastered the basic data structures (string, list, dictionary, set), object-oriented programming is when you are ready to start building the program yourself.

Picture 8 of 11 tips for learning Python for 'newbie'

What you build doesn't matter how you build it. The journey of building yourself will teach you the most. You can also learn a lot from reading articles, books, blogs . Most of your learning will come from using Python to build something. The problems you have to solve will teach you a lot.

Tip # 11: Contribute to open source projects

In the open source model, software source code is available, public and anyone can collaborate. There are many Python libraries that are open source projects and you are contributing to. In addition, there are many companies that publicize open source projects. This means you can work with code written and produced by engineers working in these companies.

Contributing to an open source Python project is a great way to create extremely valuable learning experiences. Suppose you send a pull request, someone who is interested can review the changes, or discuss potential revisions, and may then push their commits if necessary. This will allow you to learn best practices for Python programming, as well as practice communicating with other developers.

Moving forward and constantly learning. Now that you have the strategies to learn Python, are you ready to start your Python journey?

Wish you learn Python very fun and effective!

See more:

  1. What is Python? Why choose Python?
  2. 10 harsh facts about success in IT
  3. 27 things I wish I knew before programming
  4. Open source Python projects for beginners
Update 25 May 2019
Category

System

Mac OS X

Hardware

Game

Tech info

Technology

Science

Life

Application

Electric

Program

Mobile