Is the Python tutorial finished or not programmed?

Source: Internet
Author: User
Tags abstract language sqlite database
MU class Network Tutorial read, the above problems can be written out, but let me do something, or no clue, I heard that the only way to learn programming is programming, then I can't make up, copy People's blog code can learn point?
PS: Now is copying a Baidu paste stick crawler code.

Reply content:

Make a table dish, but all buy ready-made cooked food, the work you do is just put on the plate. Each import module is equivalent to a piece of cooked beef, but it really can't be made for ourselves. First of all, I was just in touch shortly, the following is only based on personal experience of the views expressed

Learn to program, the first rule is to be lazy

What's a "lazy" method? For example, I have to go to school every day to login account to the Internet, do not log on to see how much traffic. But I don't want to repeat the following series of actions for this every day:

Turn on your phone/computer--browser--school--gateway--Enter your account login

These actions are meaningless and cumbersome for me, so I want to try to write a program to do it for me, just recently learned Python and reptiles, and then started to do it.

Alas, there is a urllib and URLLIB2 library
Oh, so I can post the data.
Oops, can disguise as browser alas

You see, it's written. I am self-taught php,1 months when I want to write a message board, can not write, so Baidu has a simple message board source code, while reading one side write.
2 months when the message board changed to a blog, every few days add a function, every few days add a function, and then found a job, and now in the development of CRM.
At first, like a teapot boiled dumplings, mouth can not come out, the main is no clue, as long as the first step to understand why, the second step to do, you will be able to do what you want to do. Do not ask for a self-answer.

0 Basic or more students who do not have much experience in writing a complete project, after a preliminary understanding of the basic Python syntax,
You can learn in more detail in the following ways:
    • Write crawler, learn scrapy frame (difficulty two stars)
    • Build a website or build a blog, learn the Django framework, and familiarize yourself with the flask frame (difficulty three stars)
    • Learning NumPy and other packages, using Python to do scientific calculations or data mining, etc. (difficulty four stars, need certain scientific research spirit)
    • See the Python project on GitHub, see the project source code, write to the project issue-> do test-write document---bug-> add function (difficulty five stars)

I think learning a language, first of all through the network channels or physical book channels, to do a complete small project (do not need too big).

Then recommend two of their own previous study columns (Mask, escape ...):
    1. Favorite Python-Anthology Learning Crawler Series topics
    2. Django Song-Anthology learn the Django topic and finally build a complete blog.

Finally, good luck! Learn a programming language, the best thing is to take the needs to learn. The situation of the main problem should be the process of learning is only to understand, and not to join the thinking of how to apply, so the study will not be very solid, when used to locate the corresponding knowledge.
My experience of learning programming is to set a big goal, such as to complete a crawler, or to complete a shopping site recommendation algorithm, etc., combined with the need to learn, so that your goal is the completion of the day is done.

In addition, we recommend the original English learning materials.

Hope to help perhaps the Lord is not sure what to do.

In particular, programming languages tend to have different levels of encapsulation of the underlying functionality to simplify development, while using encapsulation means using libraries, which means knowing what libraries are available first. Python is a more abstract language than C + +, and there is no library.
But it's not that you have to learn all the usual libraries one by one.

The general approach is to pick a function that you want and then try to achieve it. This function can be large and small. Then gradually add to the function, what they want to learn the relevant knowledge.

The first web crawler I developed was a comic downloader (Ifcomicdownloader), written in C + + and Windows SDK. Later, in order to simplify the network (mainly those detection reference anti-chain site) to use the Libcurl, in order to facilitate the addition and modification of the supported Web site using LUA, in order to automatically update the script crawling Web pages to find a free server, in order to persist data using the SQLite database. Last night I also modified a script to bypass the work of a comic site screen (...). )。 Therefore, there is no need to learn the direction.

The main said is copying Baidu paste the crawler code. According to my point of view, the disadvantage of copying code is that it is difficult to know the reason why (why use a list here, why the other side to use lambda and so on). This could lead to future demand and unexpected handling. If you have a need, you can avoid this problem by looking for a code copy with the problem.

Rather than copy Baidu paste the crawler code, it is better to think about what the crawler needs, and then take the initiative to find information. Start with a simple beginning, such as entering the URL of a post, and downloading all replies (and buildings) from a post to a text file. Then the demand will naturally come out slowly. For example, how to bypass Baidu's "non-Baidu users can not view the picture", how to easily count the most active users in the post and so on. Later may evolve into statistics which several users pay attention to each other, and then make a Baidu Paste User association diagram. To analyze which users are the trumpet of an ID, or the number of an ad, then you will probably learn numpy to play big data statistics. A lot of people can learn programming language, use it to do a lot of math problems, but it is useful to create products, very few people, because most people do not have done things do not know how to start. So I think the right thing to do is:
1, clear what you want to do something, have what function.
2. Want to know what technology is needed to realize these functions.
3, the entire software function subdivision, then the Step subdivision module.
4, the code to achieve each function of each module provides interface and debugging.
5, integrated Access function module and the overall debugging to complete the development.




Sophomore dog, do things by themselves inadvertently summed up the method, use with caution. MU-Class network. These people are not going to teach you how to program, of course you can't learn. An Introduction to Interactive programming in Python

Open class is great, every little bit will let you make a small game, very simple, but used to get acquainted with and develop programming habits just good, very interesting, highly recommended landlord look,

With learning, you can exchange first to find some exercises to do

Find some more items to do.

Your reason is: no programming ideas.

Please look at the article written by Huanggo himself.
How to break the layer of Python-programmed paper
https:// Github.com/pythonpeixun /article/blob/master/pythonstudy.md

Scissors stone cloth Small exercise three languages python2, PHP, go code
https:// Github.com/pythonpeixun /article/blob/master/jdstb.md
A small code description of the use of the @property adorner
A small code description of the use of the @property adorner
  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.