Getting started with Python is easy, with or without experience with other languages. Python has simple and intuitive syntax, convenient syntax candy, and rich third-party libraries. With a basic Python tutorial, almost everyone can get started. After getting started, many people’s suggestions for further learning are “do projects” and “look at the source code”. However, such suggestions are actually difficult to implement, and the efficiency of their implementation will be very low.
“It would be nice to have a well-organized Snippet of Python code and a tutorial to analyze good open source code.”
With such an idea, I began to sort out the “efficient” dry goods from my “inefficient” study, hoping to help beginners. This is the Python Code Reading series.
This series starts with a lot of Pythonic code snippets that show not only how to use the Python syntax and standard library, but also some interesting techniques and ways of thinking.
There are plans to add simple Python projects popular on GitHub in the future. And some small practical system implementation.
Follow the links below to go to the construction site for the Python Code Reading series.
Link: Python Code Reading series
Frequently asked Questions about Python for beginners
For starters, Getting started with Python is easy. After the entry only by basic grammar can also be done at ordinary times to write scripts, to solve their own work, life on the repetitive labor. Want any function, basically can find convenient library. In the case of application only, not understanding, it will soon be able to achieve daily form processing, file download, email and other functions. Even “high end” functions such as image processing and OCR are available in libraries.
But this level of development is not enough to actually use Python for development, or to contribute open source on GitHub. At this point, the common questions for beginners focus on the following four points:
- Learn the grammar, but can’t use it.
- I’m still writing Python code in other language logic, not Pythonic code.
- Python projects are not structured properly.
- Lack of research into more in-depth topics such as decorators, exception handling, multithreading, design patterns, etc.
Traditionally suggested solutions
For starters who already know the basic syntax and have learned Python’s basic data structures, the traditional advice is to project and read the source code. Such advice can not be said to be incorrect, but there will be various problems in the implementation, resulting in low learning efficiency.
Let’s talk about projects first
For starters, getting hired to work on a Python development team is obviously unrealistic. So basically the source of the project is to find their own practice topics or participate in the open source project on GitHub.
Finding a project of your own is arguably the least effective way to practice. It is still feeling its way across the river, without access to good source code and implementation methods, and without guidance. In the end, only the function was realized. Both the code design and the project structure were developed behind closed doors with limited improvement. The biggest benefit is to improve your proficiency in syntax, basic data structures, and standard libraries.
When it comes to finding projects on GitHub, the average newbie can find great projects that are mostly past the initial stage. In this case, it is difficult for beginners to participate in the maintenance, and more work can be done to find and fix minor bugs, or even from the documentation side.
Then talk about the source code
For beginners, although directly look at the source code complexity is higher, but as long as you are willing to work hard, with a good search engine, most of the functional source code can still understand. But if there is no guidance, efficiency is certainly not high. At the same time, it is likely that they just understand the logic and understand how the function is implemented. It is difficult to discover and understand the design ideas and reasons of code without certain knowledge of design patterns. The actual “look at the source” role is less than half, not the essence.
My method
My method also comes from the traditional method. To put it bluntly, they suffer from their “inefficient” “look at the source code” and “do the project” learning, sorting out the “efficient” dry goods, choose the right source code and project, with the appropriate explanation, so as to be better accepted by beginners, improve learning efficiency.
This is the Python Code Reading series.
The series is still being serialized, and you can access the Python Code Reading collection by following the link below.
Link: Python Code Reading series
The “Python Code Readings” series starts with simple and useful functions, focusing on single-function functions. It not only shows how to write Pythonic code using Python syntax and the standard library, but also shows some interesting techniques and ways of thinking. These snippets are also very useful, and I use them myself on other projects.
The plan is to increase GitHub’s access to the source code for great Python projects that are both useful and interesting. Start from the project structure, clarify the functions and logic, explain the code design and implementation.
There are also plans to add some interesting implementations of small systems. Examples include small blockchains, databases, Docker, Git and even programming languages. By implementing these systems step by step, you can learn not only Python programming, but also the design philosophy and internal implementation logic of these systems.
Construction schedule and location
The “Python Code Reading” series is currently in the first stage of writing, and is best suited to beginners who have just finished learning the basics of Python syntax. The code snippets shown in this series will help beginners learn how to use Python syntax and the standard library as quickly as possible, while using functionality that can be used later in development.
Follow the links below to go to the construction site for the Python Code Reading series.
Link: Python Code Reading series