Learn Python find it difficult to learn a programming language, what are the methods or techniques to learn programming?

Source: Internet
Author: User
Tags python script

Reply content:

Which is the hardest programming language?
Not C + +, not Lisp, but your first language.
Where is the hardest language?
Getting started is the hardest.

For example, the following code:
print"hello world!"
As a slowly starting from Python, learning for nearly 2 years, I share the following, looking at rather than fraught.

1. Quick Start
The Dive into Python / http Woodpecker.org.cn/divei ntopython/
This tutorial is a quick start of the model, I remember the first day of the supervisor let me read this tutorial, two weeks to read, can master the basic Python grammar. If you need more skins, you can try Head first Python (Chinese version)

2. Advanced Entry
"Python core programming 2", the book is divided into basic and senior two parts, the most important is a solid foundation, last year bought this book, has been read three times, every time is a new feeling and summary. Then in advanced Python high-level section, such as regular, multi-threading, multi-process, network programming and so on.

3. Actual combat section
In the process of learning, light reading is not enough, actual combat is the most important, so-called learning, such as in the "Python core programming 2" after class exercises/learning some small script/etc., here are several sites for the Python script instance study:
(1). Code share list--Python
(2). Python Code Library
(3). https:// searchcode.com/
(4). GitHub best choice, more search some related projects, look at someone else's code, copy the wheel!!

4. Advanced entry
The Python advanced section of learning can refer to "Python Core programming 2", which is not enough. We can learn from the following books:
(1). Writing high-quality code: 91 Tips for improving Python programs
(2). "In-depth understanding of Python"

5.Python Library Learning
Learn about Python's common standard libraries and third-party libraries, which can be found in Python's commonly used standard libraries and third-party libraries.
Online Hot sale of the "Python standard library" personal advice is best not to buy, last year to start a book, turn to see let people regret. This knowledge of Python's official documentation has been exhaustive and its translation of the book ' Passable '.

6. Website Recommended Learning
(1). Learn 11 resources for Python programming (Recommended here: Online python tutor:python a good helper for beginners, through which a teacher or student can write Python code directly in a Web browser and execute the program in a step-by-step visual manner.) Online Python Tutor )
(2). Python-Tags (Cnblog netizen Vamei's python summary)
(3). Python-China Zope user Group
(4). pyzh-writing Python articles together and reading Python articles

7. Application Development
    • Website development--Django,flask, Tornado. (documents are quite complete)
    • Game development--pygame
    • Graphical interface Development
    • Server development
    • Big Data (now more) "Python Natural language processing ", "Data analysis using Python"
These are in the process of learning will slowly contact, compared to recommend Django. For API development, the preferred asynchronous network framework tornado, for small and beautiful Web services recommended flask more pythonic.

Python learning path is flat and far away, I have been exploring the road, step by step to interpret the beauty of Python ...

Updated on 2015/12/21

In retrospect, from the beginning of 2013 until now, learning about Python has been uninterrupted, and here are some more books or methods to recommend.

Consolidation Class: The Python Learning Handbook (4th edition) "Bedside, desk, pillows can be necessary, basically covering the basic knowledge of Python, for the consolidation of learning is a good choice.

Python3: "Dive into Python 3 Or take a look at the Python3 Tutorial Python tutorial-Liaoche's official website

Advanced class: "Python Cookbook Chinese version, 3rd edition "," Python advanced programming And a French-written "Python Master's Road."

In the Python server development, the total escape Network ProgrammingThis word, personally recommended books are as follows:
    • UNIX Network Programming: Volume 1th: Set of Interface APIs (3rd edition)
    • The basics of Python network programming: A comprehensive guide to building network programs using Python
    • "Linux High Performance server programming"
personally feel that the environment is very important, a good company environment and development environment can make you more effective, more and peer exchanges (in addition to colleagues, Daniel, as well as GitHub, know, StackOverflow and other platforms), do not work behind closed doors. Would you please not recommend the same books as the chicken Soup of the soul? People clapped their breasts and said, those books are really more conducive to the master to learn to program it?

The Lord says Python is difficult, and we don't want to think about why he finds python difficult. Could he possibly find the Python syntax difficult? Isn't that a violation of common sense?

It is obvious that the master did not understand what he was doing when he was programming.

The main idea is to buy a booklet and learn C language. It's true. Spending the same time learning C doesn't allow you to make software faster, but it's quicker to let you know what you're really doing. I am also halfway decent to learn programming, I understand the same as I halfway decent learning programming people did not learn to rely on writing code to work, not because of low IQ is not because of poor memory, but they have no way to code and the real thing in the computer to correspond. Many books solve this situation is taken for granted, they think that the more advanced the interface encapsulation, the more "natural" language design, the more conducive to learning. But actually, the more advanced the interface and the language, the more beneficial the user borrows from these learning more complex knowledge, but it is not conducive to learning programming itself.

Especially today's high-level language, the more simple, the more mixed object-oriented, template, functional programming and other advanced programming models. These things are often mixed with the most basic things in the same textbook, so that the novice is confused.

You can buy this "C program Language" or something else, get to know the memory and CPU, understand what the variables and variables are, what the if is, what the C code is saying, what the compilation is and what it turns into. These things can give you a whole grasp, and then look back at Python at least feel not to read a page and half a page do not know what to say. When you write a few lines of code in C, you can see why Python is there, where it is, and what it introduces for simplicity.

And, first of all, forget what the object-oriented, in fact, most programmers also do not understand what it is.

I used to have a colleague, do production, hobby hobby programming, their department internal use of gadgets are he wrote with VB6. Also seconded to research and development to participate in the development of MIS system. I was an intern at that time, he was actually taller than me. Once he wanted to test what certificate, one day came to ask me what is a pointer to the pointer ... I thought he was entertaining me, but I didn't know it.

Another former colleague elder brother, said this science soft open, has done Java, has done. NET, said also the Web, ran our department to write C + +, a trip to adjust the bug transferred to the midnight, I thought to help seniors look at the problem Bai, and then impressively see the Old man home in code to the mutex Built on the stack to be used to lock functions ... What do you think he can't do? It's quite capable. You mean he's a layman? is not a layman. But...... Some things are like this, you start to understand what you are doing, the longer the time, the more trouble. I have always objected to Python as the first language.

Python is simple for people with basic procedural concepts, but it's not necessarily easy for beginners.

(I said the novice, is a little C have not learned, many of you, in fact, in the undergraduate study C, but you did not learn it, but a lot of things are conceptual. )

simple to write doesn't mean a simple concept., a lot of the concepts that we take for granted, a a novice with absolutely no foundationIs hard to understand. For example, dynamic type and duck typing, it is possible that a novice even the data type concept is not established AH. such as self-examination, novice will have a concept? Is it difficult to understand why list and list parsing is important, and what is the use of dictionaries, without programming experience and data structure concepts? And lambda, high-order functions, generator and Python's oo mechanism, and so on?

I still think there are two ways to get started: one is to assemble +c or Pascal, and the other is SICP (scheme). These two roads, a primer from the computer, a mathematical concept, Lay down the foundation to play well,After entering the door, consider the others.

Well, if you could have a programming language. Learning Python can be used in a few hours.
If you are 0 basic, there is no concept of programming. Then you may need 3-6 months to understand what programming is.
For non-English speaking countries, it takes more time to understand programming. Because programming is essentially a description. But non-English-speaking countries look at a bunch of abstract English characters and mystification the programming greatly. Starting with SICP, this will give you a better understanding of some of the math courses in the university and even interest in statistics ....
And then you can lose python. The top-floor recommended "dive into Python" is a very bad book, which is no longer helpful to beginners or other language programmers today.

The book was written in 10 ago, and many of the content is obsolete (which is not the point, of course).

The point is that this book has never been considered for novice programmers. For example, the first program of the book is as follows, I do not know what the author is thinking, anyway, I saw it after the collapse ( Of course, they said it was written for an experienced programmer.
def buildconnectionstring(params):    "" " Build a connection string from a dictionary of parameters.Returns string. "" "    return ";".Join(["%s=%s" % (k, v)  for k, v inch params.Items()])if __name__ == "__main__":    Myparams = {"Server":"Mpilgrim",\"Database":"Master",\"UID":"SA",\"PWD":"Secret"\}    Print buildconnectionstring(Myparams)
First of all, I would like to say that for those who want to learn the programming, regardless of the language from which to start, the language itself is not the most we should care about, at least not as a beginner first concern. It can also be said that the beginning makes you feel difficult place It's not necessarily the language itself.(such as grammar syntax, etc.), but The whole idea of programming and the structure of programming。 As a matter of fact, the syntax and manipulation of the Python language you're learning, compared to languages such as C + + and Java, is for beginners. relatively simple to get started withThe
Before you learn to program, you understand What is programmingWhy do we need to program? Knowing what we are going to learn, we can know which way to do it well. As for my own understanding, programming in the narrow sense is actually writing different codes for different languages ( What is programming? , and the purpose of programming is to communicate with the computer through a programming language and manipulate it to work for us, to achieve what we need (algorithm algorithm, etc.) ( Why do we need to program? )。 However, depending on what we need to implement to choose the programming language, for example, for Android, it is java,xml and so on, for iOS, it is the object C. So, as I described earlier, programming languages are for us to communicate with computers, just as we learn the language of a country in the world in order to communicate with people in a particular country, not to learn a language in order to learn a language. language is not our ultimate goal of learning programming, it is just the beginning!
After knowing why we need to program, we'll discuss how to learn it well. In fact, the introduction of programming, should be a learning programming ideas, in-depth understanding of what is a programming process. And as for what language to choose is not so important at first, and can even use pseudo-code to learn, but in order to facilitate the learning of beginners, the actual implementation of the language can be more able to let beginners understand programming. That's why most schools (at least most American computer science) have the first class called Intro to Computer sciences with XXX language (an Introduction to computer science in the language of XXX). again the weary statement, here's with also explained the following XXX language is to assist us to learn computer science introduction of tools, Introduction to Computer science is our focus, not XXX language class。 Here also have to spit groove, some domestic computer training institutions in order to be able to quickly develop programmers and specifically advocating such a strong language, and only focus on cultivating students programming language learning itself. The only way to develop this is to imitate the other person's program callers, not the computer scientists they had hoped for.
OK, so much talk, here are some dry goods, so you can get a quick introduction to computer science.
The first lesson of the introduction to computer science Besides what I said before about programming, what is the theory of programming, the first practical thing that all programmers know is Hello World (at least for most cases).
In Python it is: print "Hello, world!"
In Java is: public class ClassName {
public static void Main (String [] args) {
System.out.print ("Hello, world!");
}
}
In C + + is: #include
int main{
Std::cout << "Hello, world!";
return 0;
}
These three actually mean the same thing. output A string (string) through the system


There are outputs that have input, such as input () (Python), CIN (C + +), and so on. inputs and outputs are available in almost every programming language and are one of the most fundamental means of communication between people and computers.

And then, generally, we'll start introducing datatype (data type), such as Int,double,long,boolean (relatively simple in Python, because the system can automatically recognize the initialization value of the variable or the data type of the assigned value when defining the variable (variable)). It's important to emphasize that although the data type looks simple, we know The exchange of information is the most fundamental purpose, regardless of whether people communicate with people or between people and computers, and the exchange of information in computer science is based on data exchange, so data is very important for computer science. And with the future of learning, to gradually master and skilled use of the data types, clear when to use what data type. Abstract data type is even learned in the future.

Followed by learning some Judgment Statement(if/else statements, switch statements, etc.) and Looping Statements(While loop, for-loop, do-while loop, etc.), which involves a very important data type ( Boolean boolean value), simply right and wrong ( trueAnd false)。 Although the basic concept of Boolean is well understood, Boolean is the basis of Boolean algebra. The underlying Boolean algebra is involved in discrete mathematics, so here's a little bit of emphasis, mathematics is very important for computer science students or for learning computers, especially for discrete mathematics. Unlike many universities or training institutions on the indifference of mathematics, instead they should pay attention to the cultivation of mathematical ideas in computer learning. Discrete mathematics is the basis of computer science, calculus linear algebra is the basis of discrete mathematics, so the University of mathematics curriculum should not be neglected by students and teachers. in the future, whether it is the data structure or algorithm learning, the basis of mathematics can be very good to help you learn computer science.

Then it's learning. functions (function)The concept. function is essentially the process of communicating and manipulating our computer to form a method that is convenient for us to use many times, so the function is also called method in programming. It allows us to do the same type of operation with a similar approach, rather than repeatedly entering a large amount of similar content each time. In computer science, simplifying is a good habit, and the function is a foundation to help us simplify our programs. Functions typically consist of the return type or the data type of the function ( we want to get through the function), Parameterswe give the function the necessary), and body of the functionHow the function works)。 Functions also represent a way for people to communicate with a computer, given a function parameter, a function that gives us a return value (or sometimes a function is a void type, that is, it does not return any value, but void usually does the specific action we need). also happens to be a way of exchanging information.


The concept of pointers (pointer) is also involved in learning C + +, a very important concept in C + + and something that needs to be noticed later, and you will understand it when you learn it yourself.

After studying the concepts of computer programming that I mentioned earlier (although I don't have all the details involved), you'll be involved in OOP (object-oriented programming Object-oriented programming)a large number of high-level programming languages involve even the basics and are future programming trends. In fact, only use the previously mentioned things for programming, you can narrow the process-oriented programming. In fact, OOP is after the function, another way to simplify our programming, we make things more abstract but more convenient. By defining our own data types, we build objects (object)To achieve the management and operation of the data. Use objects to engage in deep and purposeful communication with the computer. the three main core of object-oriented programming (important but not limited to): Encapsulation (encapsulation), Inheritance (inheritance), polymorphism (polymorphism). Encapsulation is the assembly of our defined data types into a single whole, thus forming a usable object (a bit like a mold on a factory line), inheritance is to get some attributes of some or some parent class to use in the new subclass (as the children inherit from the parents of some characteristics), Polymorphism is the realization of some of the abstractions we prescribe that can be applied or redefined (in short, a variety of states that a thing can present on different objects).

object-oriented programming not only simplifies our programming, but also protects the privacy of the data during the exchange process. Like private, only their own objects can be known and owned (as if their wallets can only be controlled by themselves), similar to public, can be shown in the main function (main function) for other data. This clearly defines the limits of the use of data, and is a milestone in the history of programming a significant progress.

Speaking so much, just a simple description of the computer's entry context, in the future will also learn the data structure (how to manage our data), as well as algorithms and so on. I hope to be of some help to you.

As for the skills, I think the most important thing is that you learn programming methods, which I have repeatedly stressed, not only focus on the programming language itself, but with deep learning, and constantly grasp and understand the main idea of programming.

Recommend some websites to you:
Python Learning website: http://www.codecademy.com/

Introductory Course in Computer Science: CS 61A Fall 2013:structure and interpretation of computer Programs
This is the introductory course at the University of California, Berkeley, which began with Python. I'm sorry I'm late, and when I first approached Python, I didn't think it was easy to program.

In addition to the university with C write homework, Python should be the first language I contact, at that time in a very hot company internship, I do not say the name, in case of saliva. I remember writing code that was difficult, and I didn't know how to do it at all. I reckon you're in the same situation as I was. Then I used a stupid method, which might be helpful to someone who first contacted programming:

Find some full-featured code, run up to achieve this function, and then to the code inside the content can not understand the data inserted or read, in the code to add comments. Well, after you annotate several items, you should know how to write them. Please give up, the difficulty of a thing is to block people who do not meet the specifications. Even the PY is difficult for the industry to mix.
  • 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.