This is a question from a new knowledge planet reader: How can mechanical engineering majors teach themselves Python with zero foundation? I usually recommend some books and courses because advanced Python programming techniques are mostly shared, while introductory tutorials for beginners are less involved. After all, introductory content is easily available online and there are many resources.

Programmers are like magicians in the eyes of ordinary people. A script can easily grab dozens of boxes of moon cakes (though they were fired eventually), a plug-in can solve the problem of snatching tickets during the Spring Festival Travel rush, and dozens of lines of code can build a Web site and automatically chat with girls through wechat. These things are too common in the eyes of programmers. They are simply using programming languages to direct computers to automate tedious processes that humans need to do repeatedly, until you can program them.

Photo by PICSELI on Unsplash

Some people are hot at the beginning of learning programming. They buy a lot of books, download a lot of videos, and collect 100G of information. Within a few days, their enthusiasm fades, and finally they finish the whole process from getting started to giving up. If you really want to learn programming, the first to think about why to learn programming, to find a job programming, or in order to solve some complicated problem, or do a website for yourself, or to write an App, or climb a data for analysis, the most afraid of be don’t know why and learn, even in order to get rid of the anxiety and learning you also hard to learn, A lot of people come up to me and ask me what to read next after READING the primer. This is typical of not knowing what learning is like, learning for learning’s sake.

Our aim is to apply what we have learned to further our study

Take learning a reptile as an example. What motivates you to learn a reptile? Your motivation can be to get some data from the Internet for data analysis. For example, some time ago, a friend came to me and told me that he wanted to start a factory leasing company. Before starting a factory leasing company, he needed to select a site. The best way is to use a platform like Crawler 58 to crawl down relevant transaction data for data analysis, which is a good motivation, and the goal is very clear.

Python programming has many directions, including Web crawler, data analysis, Web development, test development, operation and maintenance development, machine learning, artificial intelligence, quantitative trading and so on. Each direction requires specific skills. For example, to learn data analysis, one needs to master statistics, SQL and other knowledge, and to be familiar with Linux system for operation and maintenance. So you should first know what direction you are choosing and what knowledge of this direction is important to master.

To Web development, the focus is to understand HTTP protocol, to know what happens in the process of a Web page from the browser input URL to the page display content, and then to know the front-end knowledge involved in Web development HTML, JavaScript, CSS are what to do, and then learn Python, To master the basic grammar, commonly used data type, the common module, you can almost to achieve your goals, almost all websites need to use the database, so you’ll need at least a little bit of knowledge database, add and delete operations should be SQL, program is finished, we are going to deploy, and systems are typically run on Linux environment, At this point you also need to know how to operate Linux commands.

Next, we will introduce in detail how to learn each process, the learning resources used and the degree of mastery.

The HTTP protocol is the communication medium between the browser and the server. After the user enters the URL, the browser immediately sends a request to the server. After receiving the request, the server queries the appropriate data from the database and finally returns the data to the browser. Communication between the browser and the server strictly follows the HTTP protocol, and if you understand the HTTP protocol, then you understand the fundamentals of Web programming. Two books on HTTP are recommended.

Illustrated HTTP, the Definitive guide to HTTP

The former is biased towards entry, while the latter is suitable for advanced reading. It is not necessary to read carefully in the early stage, but it is probably understandable, and you will come back to study later.

No matter how busy you are, keep practicing for more than 3 hours every day

Any one do Web development, can not leave the front three musketeers, the three musketeers here refers to HTML, JavaScript, CSS. HTML is the skeleton, CSS is the coat, JS controls the first two, in order to meet more user interaction needs JavaScript to control. The following recommended books are enough for a beginner. Just pick one or two books. You don’t need to read all of them.

HTML5 Secrets (2nd edition), HTML5 Authoritative Guide, Head First HTML & CSS (2nd edition), CSS Authoritative Guide (3rd edition), JavaScript DOM Programming Art (2nd Edition), JavaScript Advanced Programming (3rd Edition)

No matter how busy you are, keep practicing for more than 3 hours every day

Js, Boostrap, React, jquery, etc. Although you may not have to learn every framework, you should at least know the function of each framework, because in the future you will not be able to repeat everything by yourself.

After learning the front-end knowledge, you should be able to simply make some static pages now, however, are now almost all websites are dynamic (not animation effects, but the page data is dynamic change), means that the data are based on the logged in user personalized recommendation, browser requests sent to the server, the server get data from a database query is returned to the browser, The server side of the implementation logic needs to use Python to achieve, now is the time to start learning Python, Python entry needs to master the content including basic syntax, data structure, common data types and common module API method operation. There are many books on Python, and here are a few for beginners and advanced ones.

An introduction to

Getting Started with Python Programming: Automating Tedious Tasks

The advanced

Smooth Python, Python Cookbook, Effective Python

Concise course is a very thin booklet, hope you can read seriously, behind two introductory books, want to finish the foundation in front at least, as to the actual combat behind, do not learn worth mentioning, because your interest point is not necessarily over there.

No matter how busy you are, keep practicing for more than 3 hours every day

You can do a lot of things with Python now, but you don’t know how to write a Web application yet, because you probably don’t know how to operate a database, how to write SQL statements, how to add, delete, or change a database, so don’t worry, learn about databases first, MySQL is the most popular database system, Big companies use it. The most basic understanding of the database is to know what table, row, column, primary key, foreign key, index these concepts, slightly complex is query, group query, joint query and other conditional query, you need to master these basic operations.

MySQL > MySQL >

The basis of the book is for beginners tutorial, pick a book is enough, in addition to MySQL, PostgreSQL, Oralce, SQL Server belong to a relational database, but there are also the mongo, Redis non-relational database, corresponding to you can understand, You don’t have to learn right away. One of the things you need to think about after learning about databases is how to manipulate database CRUD in Python. Although there are no books on this, there are many tutorials on how to use MySQL in Python, so it is very important to know how to use search engines. Because a lot of time is going to be programming for Google. In order to prevent forgetting the previous content, also want to review and practice the previous content from time to time.

No matter how busy you are, keep practicing for more than 3 hours every day.

Now that you’ve got the basics pretty much in hand, you’re ready to start your first real work, because you already know HTTP, so now you can pick a Web framework and use it to develop our Web site. Flask is recommended, which is popular, but is also a lightweight framework that is very flexible. Flask Web Development: A Python Based Web Application Development Tutorial. A complete Web site, from front-end HTML, CSS, JavaScript to back-end Flask, can basically run the database connection, CRUD operation, the project is almost basically formed, only the last step is how to release the finished program to the server to make it run stably and continue to provide services.

Most of our Web applications will be deployed on a Linux server, and Windows is rarely used as a server, so it is very necessary to be familiar with the Linux system, how much Linux to master? Of course, at least basic command operation is necessary, the following books are recommended

“Happy Linux command line” “Bird brother Linux private house dishes” “Linux command line and shell script programming complete”

Familiar with Linux, the program is also deployed, in fact, there is still a step, the site needs a good memory of the domain name for others to visit, after all, no one can remember your IP, so, later domain name purchase, HTTPS configuration, Nginx configuration, can find the corresponding answer on the Internet.

No matter how busy you are, keep practicing for more than 3 hours every day.

Learning programming is a fight strange upgrade process, this process must be tortuous, but the future is bright, pain and happiness.

Finally, good luck with your upgrade.

Feel good to help like, forward

If you don’t know how to learn, you can find me. Python Learning Group: 593088321