How to train your own programming ideas

Source: Internet
Author: User

How to train your own programming ideas

Recently a weekend class of students, asked Huang elder brother you in the programming thinking training, how to think of this idea.

First of all to solve a problem, learning programming is learning what? Is it pure learning grammar? No, is to learn computational thinking, programming ideas.
What is computational thinking: the concept of computational thinking (computational thinking) is a natural product of the development of computer science. The first clear use of this concept was Professor Zhou Yijien (Jeannette M. Wing), Carnegie Mellon University, USA. Computational thinking is the basic concept of computer science to solve problems, design systems and understand human behavior, the fundamental content of computational thinking, that is, its essence is abstract and automated. What is the programming idea, words too literally, thinking, thinking of the road, direction also. That is, where to start, where to begin to solve the problem. In fact, is the concrete embodiment of computational thinking, the use of grammar to express the problem-solving methods, algorithms.

No one is programmed, computer scientists have summed up a lot of problem solving methods (i.e. algorithms), now learning to program, not
Inventing the algorithm from scratch, not reinventing the wheel, standing on the shoulders of giants, learning the solutions that computer scientists have summed up, using
These mature algorithms, combinations and micro-innovations to solve their own problems.

Programming ideas are trained (self-training or follow others).
Huanggo python training, Huanggo remind you to solve the problem, to the task of slicing, big problems to solve for small problems, some of them small problems, there are mature solutions, directly to use, the remaining will not solve the small problems, then focus on solving it. Training is to learn the mature method of solving the problem: If statement used to do branch judgment, loop to solve the problem of repeated operations. Exhaustive, recursive, recursive, sequencing, backtracking, and so on (if required as a professional programmer, need to learn data structures and algorithms, design patterns and so on, need to learn a lot of things.) But one of the first things to solve is that you can write code to solve general problems. Training function abstraction, class abstraction solves the problem. such as to an ordered array, to find a specific value, not trained, beginners, directly with the loop traversal. If the algorithm is trained by the dichotomy method, the next time this problem is encountered, it is solved by the dichotomy method. Do exercises, like the development of the project process (requirements and requirements analysis----design------coding-----delivery, etc.), to get an exercise, has not been analyzed, the rush to knock code, this learning method, is a bad way to learn. First of all to analyze the problem (so-called demand analysis, what is demand analysis, please search), redesign, with that data type (data structure) to organize or save data, which algorithm to calculate the most efficient, with the process-oriented, object-oriented programming paradigm, or functional programming and so on. After the design, write the code, and finally write the test. (can also adopt the software development process application method, test drive development, etc.)
A lot of basic things, for programmers, think is a logical thing, but for beginners have a habit of the process.
   1, there are super small white students asked Huanggo, counting cycle from 1. It was a surprise at the time, why there was such a problem,       this is what it says for programmers, it is a logical thing, but for beginners there is a habit of the process.        counting cycle from 1 is for convenience, everyone from childhood count, wrench refers to also starting from 1 AH.        if from negative 100, start counting, not not, inconvenient ah.    2, for such a problem. There are two variables in       python list, and beginners don't understand and get used to them.       list  in this data type (or structure), you can put Python arbitrary objects. The       python  variable is a reference to the object, and of course it can be placed.       computer =  "Scissors"       people =   "stone"       guess_lst = [computer, people]  equivalent   guess_lst = ["Scissors",  "stone"]   3, to see what the programmer took for granted.        Python method chain with Huang python sequence article (method chaining)        https://zhuanlan.zhihu.com/p/20931492   4, more knock code, more training, to find the feeling.        do not knock the code, do not know that the variable name will be wrong before and after the mistake.        do not knock the code, do not know will commit indentation error.        do not knock code, do not know how to see the python error message quickly troubleshoot errors.      &NBSP, ....... .........
Summary (no one is born with programming ideas, programming thinking is after a certain training, nurturance!) )
Huanggo python training, Huanggo remind you how to have ideas, only through the training of common algorithms, will decompose the problem, will do the demand analysis, slowly training, will form a conscious thinking. No one is programmed at birth, only trained to learn to program. A lot of good programmers use Vim, knocking on the screen code, for a while, why so skilled use of vim, accustomed to natural. When you have more training, learn certain routines (methods to solve the problem), develop the habit of independent thinking, in time, naturally there are ideas. Develop the habit of independent thinking, develop the problem of segmentation, form a big problem to solve small problems, to form a learning algorithm, will have ideas. Simple judgment, the cycle will not write, just want to play Django, where the idea? Lofty high-rise from the ground, I hope everyone down-to-earth from the basic training, the first to achieve independent write code to solve the general problem, and then talk about the project. Have seen blindly known as the program of the training of the programmer, did not learn to write code to solve the general problem of the ability to develop projects such as the dog Bites the Hedgehog.

Share!
Huanggo written on 2016-5-22 morning in Beijing

Click Huanggo python Training sample video playback address


How to train your own programming ideas

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.