Self-cultivation, misunderstandings and directions for Python beginners

Misunderstandings of Python

I don't know how beginners think about the language of Python and how they think about the skills of programmers. According to my understanding, there may be some misunderstandings. In fact , the application scenarios of any language may not only be in one direction, but often in multiple directions , especially Python, a relatively mature and popular language, which has made great achievements in many fields, which leads to There are so many things that Python can do, and there are so many things to learn accordingly.

Maybe in the eyes of a novice, a relatively powerful Python user (such as me) should be able to kill all technologies and know all aspects of Python very well. Unfortunately, this is very difficult or almost impossible . The reason for the difficulty is also very simple, because human energy is limited, and it is very difficult to be excellent in a field. It takes a lot of technology and knowledge to learn, not to mention mastering all directions. So everyone should have a clear answer to such a question. For a language like Python, what is the purpose of learning it?

Maybe you have many answers, but unfortunately, for your future career development, you may only choose one of them .

direction selection

If you've played Diablo, World of Warcraft or similar RPG games, then you should know a lot about choosing a career. When we just entered the game or shortly after entering the game, we need to face a career choice. Once the career choice is often unchangeable, you need to continue playing in this career. If you want to change careers, you can only start from scratch and play a new one. No.

In the workplace, it is very similar to games. We ultimately need to choose our occupation, and we can only choose one position , which cannot be easily changed. If you want to change, you need to start from scratch, and all the accumulated experience will be cleared. Because different positions have completely different requirements for ability, beginners will actually face such a choice, but this choice is invisible. When you choose a position to submit your resume, this choice will be subtle. happened.

There are not many basic syntaxes commonly used in Python, and almost half of them are covered in our previous articles. When we have completed this part of the study, there is no way out for learning grammar alone. In the next step, you must learn some application content, that is, you have to face a technical selection.

For Python, there are several common directions: web development, machine learning, web crawler, operation and maintenance, game development .

I will briefly introduce these directions below. You can compare your interests and choose one that you are interested in or are more suitable for.

web development

Web development should be the most common job position for programmers at the moment. The application of Python on the web is mainly the back-end development of the web , that is, the part responsible for server logic processing.

We all know that the most popular language in China in the back-end field should be Java, and almost half of the companies use Java as the back-end language. I can hardly distinguish several other languages ​​after Java, just to name the emerging Go, the ancient PHP, of course Python, and the almost extinct C++ and C#. Python should only be considered a small minority in this field, and it is still relatively small in general .

The reason for the niche is related to the characteristics of Python itself, because Python is an interpreted language, not a compiled language. Therefore, compared with compiled languages ​​such as Java and Go, there is a natural disadvantage in performance. And due to the limitation of Python global lock, Python multithreading performs very badly in computationally intensive concurrent scenarios, so few large companies use Python as the main backend language. As far as I know, some of the well-known ones in China should only be Douban and Zhihu, and there are YouTube in foreign countries, but it is said that some have been migrated to other languages, and some have already had corresponding migration plans.

The main advantage of Python in the backend is agility , that is, the development efficiency is relatively high. Python's Django, Falsk and other frameworks are still very complete and easy to use. We can quickly build a decent backend from scratch, and the iteration speed is also very fast . Therefore, for some small companies that need to run in small steps and have low performance requirements, they may choose Python, that is, large companies will hardly choose Python as the development language for the web back-end, and the technology stack must be completely different.

If you need to choose this direction, in addition to learning the relevant knowledge of Python back-end development, such as Django, Flask and other frameworks, you also need a certain understanding of computer networks and front-end , which are also required courses for back-end engineers.

Generally speaking, the development direction of the Python backend is relatively flat, and the difficulty of exerting force in the later stage is relatively high, and the ceiling is relatively low. Compared with the Java backend, the learning difficulty may be a little easier, and the employment pressure should also be good. Although there are not too many related jobs, it will not be too few.

If you want to choose this field, you can choose some more conventional projects as entry projects . For example, building a personal blog, or XX management system, after these are proficient, you can learn more other tool libraries, such as database ORM framework, kafka, redis and other commonly used middleware. Combine these contents into the web to create new projects. After this part is almost done, we can study advanced content such as architecture design, design patterns and so on.

machine learning

I am relatively familiar with this field. For machine learning, Python is currently the main language . In the early years, I could still see some engineers who used R for machine learning, but now they are almost invisible, almost all of them are Python. But to be honest, Python only acts as a glue language in machine learning, and almost all the core implementation logic is not supported by Python.

In machine learning, the native content requirements of Python are very common, and it is almost enough to know the basic syntax, iterators and generators . Because most of the content is implemented through frameworks or tools, Python just glues the logic together. Practitioners in this direction have very few skill points in Python, and most of them have experience in machine learning related theories, the use of some library tools, the use of deep learning frameworks, and data processing.

And machine learning itself is a relatively large field, and it also has many applications. For example, traditional application scenarios such as search, advertising, and recommendation , as well as newer fields such as CV (computer vision), NLP (natural language processing), and risk control . Therefore, after choosing the general direction of machine learning and completing the learning of the basic knowledge, you still have to face another choice, because you still need to choose a small direction for further subdivision. According to my personal experience, their development prospects are recommendation, search, advertising > NLP > CV > risk control , this is only my personal judgment, for your reference only.

The overall prospect of machine learning is very good. At present, almost all large, medium and small companies have machine learning or deep learning positions. Although there are many jobs, the competition is not low , because there are too many people who want to come in. Especially in the past two years, AI has been hot, and a large number of people want to squeeze into this industry, so the recruitment threshold is still not low.

If you want to choose this direction, you only need basic Python syntax, but you need to have a relatively in-depth study of the field of machine learning . For example, the core concepts of machine learning, some commonly used models, some methods of data processing, evaluation criteria for model effects, etc. When you have enough understanding of machine learning, you can find some competitions such as kaggle and Tianchi big data to practice it.

reptile

Everyone is not unfamiliar with the direction of crawlers. Many people should have seen some related negative news, such as stealing user privacy or stealing data from a certain company. In fact, the essence of the crawler is to use the program to simulate manual access to the web page, so as to store the relevant valuable information in the web page .

Due to its simple syntax and perfect network-related tool library, Python can run directly without compiling. More importantly, Python's global lock is very suitable for IO-intensive scenarios such as network requests without affecting efficiency. Moreover, Python can easily integrate the functions and features of other languages, making Python very suitable as a crawler, so that most crawler engineers on the market are developed in Python. And now many distributed crawler frameworks and tools have been derived.

Since everyone uses crawlers, some large companies do not want their relevant information to be acquired by competitors. For example, if a certain Dong crawled all the product information on Taobao, and then lowered the price in a targeted manner to forcibly attract users, it would obviously be a blow to Taobao. In order to prevent similar and other situations that are unfavorable to the company, these large companies will set up some anti-crawling mechanisms . For example, when a request comes, it will determine whether it is a robot, or it will limit the number of products that an ip can access at most, and so on.

Since there is an anti-climbing mechanism, there is naturally a mechanism to break the anti-climbing mechanism. Therefore, the daily work of real reptile engineers in the company is often to compete with anti-crawling engineers from some large companies . You have set up this anti-crawling mechanism, and I will find a way to break it. Tomorrow you find my method and fix it, I will continue to think of a way... and before writing a crawler, you need to do a lot of web page analysis to find the source api of the data in the web page or application . Some companies will hide the api, or require certain verification to access, then you need to set up some methods to break it before you can use the crawler.

Some people don't like this kind of work with a lot of wits and courage and little development time, while some people enjoy it. You can make a choice based on your own situation. If you want to choose this direction, you can start from some public data without an anti-crawling mechanism , learn some of the more advanced crawler frameworks, and then gradually increase the difficulty to try to break the anti-crawling mechanism of large companies and become a An excellent reptile engineer.

Operations and Game Development

To be honest, I don’t know much about these two fields, so I will bite the bullet and simply say that my level is limited. If there are any mistakes, please forgive me.

As we all know, operation and maintenance is responsible for maintaining the machine environment of the computer room, project release and launch, etc. As the number of machines used by the company is increasing, the entire release and maintenance process is becoming more and more troublesome. In the past, when it was extremely rare, it could be done manually one by one. Now that there are more machines, it is obviously unrealistic to use manual work. In order to solve this problem, the current operation and maintenance of cash will use Python to write scripts to operate the machine installation environment or release projects in batches .

To put it bluntly, Python is actually used as a tool such as a scripting language. The core capabilities are actually still in the part of Linux commands, operating systems, and distributed clusters . For the field of operation and maintenance, I personally feel that it is similar to machine learning. Python is just a pure tool. If you want to start a project, you may still focus on the skills related to operation and maintenance, and use Python as a tool to assist.

I know a little bit about game development, and I have done some simple games in Python before. pygame in Python is very easy to use, and it is very suitable for writing small games . And Python can also be connected to Unity, and many games made with Python can be found in github. But I don't know if any game company recruits Python programmers for game development. After all, it's not in this industry, but at least it's no problem for everyone to make some small games to entertain themselves. If you want to practice your hands, you can consider doing a relatively simple game such as 2048 and doodle jump.

Summarize

If you are just looking for a novice entry project for Python, there are a lot of results from a casual search on the Internet. But that doesn't make a lot of sense because these programs aren't necessarily for everyone . Before clarifying the direction you want to pursue, there is no way to talk about whether it is suitable or not, so I hope everyone can clarify their own direction first , and then find the corresponding advanced path is much easier. So if you just want to learn the language of Python well before, but you haven't considered the direction, I suggest you think about it.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326641609&siteId=291194637