Programming Learning Guide

Source: Internet
Author: User
Tags html interpreter

My personal favorite programming learning Guide will also serve as an important reference for my own programming learning and skill enhancement.

The author of this article is @ Kanki, based on the personal collection for the sake of a slight change in format.

Objective

Programming now becomes an increasingly important skill: as a designer, knowing some programming might help you better understand what you're doing, and as an entrepreneur, the identity of a technology founder can make a lot of your job easier. As a novice, just want to get started, face the vast amount of information, perhaps do not know where to start; easy access to the elementary materials after learning, find learning more and more difficult, steep learning curve and let you shy; you know how to print some lines of text on a page, But you don't know when to start a really useful project; you don't know what else you don't, and you can't even figure out what to learn next.

The content of this article will not only have some directional suggestions, but also include a core programming primer. Of course, the step by step route is unrealistic, and everyone will have their own characteristics, so the introduction of this programming guidance is more in order to trigger the reader's thinking, and ultimately help you form a learning route for your own.

But note: This article is for those who really want to learn programming people look--those who suppress a strong, must make a real thing, do not learn to stop the people, rather than those who "heard programming fun" people, in my opinion, such people will never enter the programming door, not to mention the whole of a decent thing to come.

Mindset Adjustment Set goals

You can code. they cannot. That's pretty damn cool.

–learn Python the Hard

Think about your goals before you learn programming, and the road will be clearer when you have the ultimate goal. So, what do you want to write? Website? Game? iOS or Android apps? Or do you want to automate some tedious tasks so that you have more time to look out of the window? Maybe you just want to be more competitive and find a good job. All of these are valuable goals that are part of the driving force of your programming learning, and those who have no motivation cannot go far in a dull, long learning journey.

This video may inspire you: What's most schools Don ' t Teach

Don't be impetuous.

Bad programming are easy. Even dummies can learn it in. Good programming requires thought, but everyone can does it and everyone can experience the extreme satisfaction that comes With it.

Whether online or offline, the 21-day Learning Java is a fast-tracked book that promises to enable you to learn about technology in a very short period of time. Matthias Felleisen the "crash" trend in his book, How-to Design, and has made the above-mentioned irony.

The so-called "shortcut" or "silver bullet" does not exist, the wise man said, proficient in something takes 10 years or 10,000 hours, that is, in Chinese "Ten years grinding a sword", so do not worry, not Tang donated.

Cultivate interest

Most good programmers does programming not because they expect to get paid or get adulation by the public, but because it is Fun-to-program.

–linus Torvalds

Addicted to programming, programming is more interest. Interest is an inexhaustible source of motivation to maintain this feeling of interest so that you can devote it to your 10/10,000-hour programming time. Programming is fun, that's the joy of exploration. That is the joy of creation. It's interesting to see the work you've done with your own hands displayed on the screen. It's fun to be amazed at your code. It's interesting to have someone in public praising your product, your neighbor's use of your product, and discussing your product in the media. Programming should be interesting, and if not, find the problem that causes programming to be boring and then solve it.

Start learning a sobering story

Just when I was in junior high school, I started programming learning, unfortunately, I have read a few of the popular at that time, such as "21 days proficient in C + +" This kind of rubbish book, at that time reading is no big deal, even can write a little program. But the software is out of the question. I do not know why, a little large programming problems, encounter the existing library do not have to do things can only one stand. Although I keep coding every day, I find that my programming ability is so slow that there is only a very limited understanding of the concept of "iteration" and "recursion", which can be said to be used only as a calculator.

After entering university, I majored in physics, and for the first time I had been memorizing those physics formulas without understanding how they were drawn, how they were connected, or what they meant. I kept learning how to calculate and answer some common physical problems, but I knew nothing about the whys behind these hows.

And when I tried to do some physics-based computer games, I once again encountered the difficulties: in the face of new problems, the fear of new problems constantly accumulated breeding, I began to escape, not to really understand, but fantasy can be copied through Google search and paste code to solve the problem. Fortunately, a sophomore class completely changed my way of learning. It was the first time I had the "open-eyed" feeling, and I painfully realized that I had only a few pathetic real understandings of some subjects, including my major in physics and minor computer science.

About the class: At that time we had just finished studying electricity and special relativity, and the professor wrote down the two themes on the blackboard and drew a line to connect them together. "Suppose we have an electron moving along a wire at a relativistic level of speed ..." At first the professor just wrote down the familiar formulas of electricity and special relativity, but after the algebra derivation of several blackboards, the formula of the magnetic field magically appeared. Although I knew this formula a few years ago, I had no idea that there was such a potential connection between these phenomena. The difference between magnetism and electricity is just an "angle of view," and I suddenly wake up, and then I'm not just chasing what I'm going to do, I'm starting to ask why, I'm starting to go back, * * Pick up the most basic parts * *, and learn the knowledge that I should have learned before. This process of turning back is painful, and I hope you will be vigilant and never do such a foolish thing.

Reflection after the Awakening

This picture is taken from the writings of Douglas Hofstadter Gödel, Escher, Bach. Each letter in the figure is made up of other smaller letters. At the highest level, we look at "MU", the letter M is made up of three holism (holism), and U is made up of a reductionism (reductionism), each of which contains the latter's entire word, and vice versa. At the lowest level, you will find that the smallest letters are made up of duplicate "MU". Each level of abstraction contains information, and if you are only naïve to use holism at the highest level to observe, or use reductionism to observe the lowest level, you get Only "mu" (mu means nothing in the dialects of some regions). The question is, how can you get as much information as possible for each level? Or, in other words, how do you learn a lot of the knowledge involved in complex areas, such as programming?

There is a key problem in education and learning: Beginners often tend to be overly inclined to holism and neglect the basics, and for a common example, students want to be a robot, but the

Understanding the physical model → understanding the fundamentals of Electronic engineering → understanding servo systems and sensors → let the robot move.

This process is entirely of no interest.

There are two big pits for beginners here. 1. If beginners are only in contact with pre-built "engines and components" (without understanding and thinking about how they are constructed), this can severely limit their ability to build these things in the future, and will not be able to diagnose and solve problems. 2. The second pit is not as obvious as the first: the naïve "holism" approach sometimes appears to be very effective, which is somewhat covert and misleading, but after a year or two (perhaps not so long), when you go far in your learning path, you want to look back. To make up the foundation "there will be great psychological obstacles, you have to abandon your own narrow concept, and patiently slowly move forward, which is more difficult than the basic knowledge of your first school hours."

But also can not be overkill, plunged into the great pit of reductionism, beginners are bent on trying to do grand theory, so not only have all the dangers of theory, boring and boring will let you lose the impetus. This often happens in computer science students.

To get a better understanding, you can compare learning programming to learning the culinary arts: you bought some books on recipes to cook a good meal, and if you just want to cook for your family, it would be a good idea to repeat the steps on the recipe to make a great meal, but if you have more ambition, you really want to show off in front of your friends, To make some unique delicacies and even become a "chef", you must understand the ideas behind the recipes and understand the theories, not just the practice. But if your only job every day is to read those heavy theoretical books, because of the lack of practice, you will only become a bad cook, and never become a cook, because after a few days of reading you are bored to give up the culinary study.

In a word, programming is the link between theory and practice, and it is the field of computer science and computer application technology. The correct programming learning method should be: Through the top-down exploration and project practice, to obtain programming intuition and impetus, from the bottom-up of the foundation process, to obtain the most important common methods and consolidate the understanding of programming ideas.

As a beginner, the latter should be the main, the former as a supplement * *.

Enlightenment

"Which language should I learn in programming?" "This is often the first question a beginner asks, but this is a wrong question, and the first question you should consider is"** which tools * * will form the basis of programming learning "?

The bottom of the pyramid of programming knowledge is three key parts:

    • Algorithmic thinking: How do you get the largest number in a group of numbers, for example? First you have to have a Maxsofar variable, and then for each number ...
    • Syntax: How do I express these algorithms in a programming language that the computer can understand?
    • System Basics: Why does the thread never end when while (1)? Why
      int *foo () {     int x = 0;     Return &x; }

      is not feasible?

It is difficult and tedious for beginners to choose c as their first language because they are forced to learn the three parts at the same time and spend a lot of time before they can make things.

Therefore, in order to minimize the "grammar" and "System fundamentals" of the two parts, it is recommended to use Python as the first language to learn, although Python is very friendly to beginners, but this does not mean that it is just a "toy", in large projects you can see its strong and flexible figure. When you're familiar with Python, learning C is a good choice: Learning C will help you think in a way that is close to the bottom and help you understand some of the principles behind the OS hierarchy, and if you just want to be a regular (mediocre) developer you can not learn it.

Here is a reference to the Enlightenment stage guidance, you will be completed in the mind to build up a computer science framework, to help you carry out the top-down exploration.

    1. Complete the Python section of the Codecademy. This is just the warm-up part, * * * * As soon as possible, because you will always be in the browser, you will not learn how to build a development environment. The little things that you learn from programming learning sites like Codecademy, even if you just want to do a small, small project, you don't know where to start.
    2. Complete the MIT Computer Introduction course (if you don't pass English: MIT Open Course: Introduction to Computer science and programming). MOOC is an effective way to learn programming. Although the language of the course is Python, it is an excellent introductory course that emphasizes learning important concepts and paradigms in the field of computer science, rather than just teaching your specific language. If you are not a student, this will allow you to broaden your horizons in self-study. Course Content: Computational concepts, Python programming languages, simple data structures and algorithms, testing and debugging. Feeder tasks:
      1. Complete Python core programming
    3. Complete Harvard CS50 (if you don't pass English: Harvard public Class: Computer science CS50). It is also an introductory course, but complements MIT's introductory course. Teaching language involves C, PHP, JavaScript + SQL, HTML + CSS, the breadth and depth of the content is very reasonable, but also can understand the latest scientific and technological achievements, can be very good to stimulate the interest of computer learning. Feeder tasks:
      1. read The Secrets of coding
      2. completion of programming in C language
      3. [OPTIONAL] If your goal is to become a Hacker: Read Hacker ' s delight

PS: If the educational object is still a child, the following resources will be helpful (age for reference):

    • 5-8 years: Turleacademy
    • 8-12 years: Python for Kids
    • Over 12 years: MIT Scratch (Don't underestimate Scratch, have children use it to write 3D-rendered ray-tracing systems) or Khanacademy
Entry

After the initiation stage, the beginner accumulates a certain amount of code, and has a certain understanding of programming. At this point you may want to learn a specific technology, such as Web development, Android Development, iOS development and so on, you can try to do something as simple as possible, give yourself some positive feedback, add your own impetus. * * But remember not to go deep, these technologies have countless details, there will be time to learn in the future, and again, don't get too deep into specific frameworks and languages, and now it's time to learn the basics of computer Science * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

So what exactly is the entry stage? What you need to do is reflect on the program you've written and think about why the program is designed like this. , think about how to write better programs? Trying to understand the nature of programming: Using computers to solve problems * *. Imagine: X = time to think about the solution to the problem, that is, the "Problem solving" section Y = time to implement the code, "using the computer" as part of "programming capability = F (x, y) (x>y)

To improve the programming ability, you have to improve the X, Y and function F (x, y), very few book content can focus on these three points at the same time, but a book did--structure and interpretation of Computer Programs (SICP) " The construction and interpretation of a computer program that shows you the direction to raise these three variables. Before reading SICP, you may be able to solve a simple problem by invoking several functions. But after reading the SICP, you will learn how to abstract and decompose the problem to deal with more complex and larger problems, which is a huge leap in programming ability, which essentially changes the way you think and solve problems with code. In addition, SICP's teaching language is scheme, which gives you an initial understanding of functional programming. More importantly, his grammar is very simple, you can quickly learn it, so that more time to learn the book of programming ideas and complex problems in the solution.

Peter Norvig once wrote a very wonderful SICP book review, which includes:

To a analogy, if SICP were about automobiles, it would is for the person who wants to know how cars work, how they ar E built, and how one might design fuel-efficient, safe, reliable vehicles for the 21st century. The people who hate SICP is the ones who just want to know what to drive their car on the highway, just like everyone else .

If you are the former in the text, * * Reading SICP will become a key point in your initiation and entry stages * *

Although SICP is an "introductory book", but for beginners still have some difficulty, the following are some very useful auxiliary resources:

    • Udacity CS212 Design of computer program: The language of instruction is Python, and the content is somewhat difficult, by Peter Norvig, Google Research director, mentioned above.
    • How to Design PROGRAM:HTDP's starting point is lower than SICP, the content of the book is very friendly to beginners, if you feel that the completion of SICP too difficult, you can consider reading first read HTDP.
    • Video of UC Berkeley SICP and SICP's two authors ' training for Hewlett-Packard Company employees (Chinese cultural Program)
    • Composing Programs: An introduction to programming that inherits the SICP thought but uses python as the instructional language (contains a few small items that can be learned now)
    • SICP Problem Solving set: For the book after the exercise, as a beginner should * * * * * * * * * possibilities.

After completing this part of the study, you will gradually build up your own program design model, your mind is no longer mess, you will realize that remembering library and grammar does not teach you how to solve programming problems, what to learn next, in your heart will be a lot of clarity. * * This is a good time to really start Project practice and add momentum. About Project Practice: For beginners in the entry stage, it's too early to take part in an open source project, so it's time to start a few simple projects, such as building a website and maintaining it, or writing a small game to continue expanding, and if your own ideas are unclear, you can select items from the Mega project list. In short, be sure to take the first drop of blood in your project practice at this point.

If you think SICP is not going to make it, don't force yourself to skip it, go on the regular route: start reading the Elements of Computing Systems, and it will teach you to start building your computer from the most basic Nand door until the Tetris runs smoothly on your computer. Not much to say, this book runs through your entire programming phase, and your goal in the introductory phase is to stick to all the projects in the book (including a minimalist compiler and OS).

In order to complete the book, in order to continue to lay a good foundation. For the future of thin hair, in the following areas you have to do your homework (note: The following content does not have an absolute order of precedence):

Fundamentals of computer Systems

With the foundation of the previous program design, want to take a deeper grasp of the context of computer science, may wish to look at this book: "In-depth understanding of computer systems" (Computer systems A Programmer ' s perspective abbreviated CSAPP). Here the name of criticism of the book's translation, in fact, there is nothing in depth, this book is only the "Introduction of computer Systems" in the CMU textbook. The computer science major of CMU is relatively partial software, the book is from a programmer's perspective to observe the computer system, "How the program in the computer implementation" as the main line, a comprehensive description of the internal implementation of many details of the computer system.

If you read a bit boring, you can follow a coursera on the mooc:the hardware/software Interface, the course content is a subset of Csapp, but the most classic experimental parts are transplanted. Also, take a look at the C programming Language and review the knowledge of the C language.

By completing this book, you will have a solid system foundation, as well as a prerequisite for learning about the operating system, compilers, computer networks and other content. When learning more advanced system content, read the corresponding chapters of this book, while programming to achieve the examples, will certainly have a more perceptual understanding of the theory of books, really do handle the code, from the upper design to the bottom of the implementation are clear in the chest, and can play back in the brain data in the network---memory--Cache- The flow of >CPU.

In addition, it is time to contact UNIX philosophy: Kiss-keep it simple, Stupid. In practice, this means that you will start to familiarize yourself with the command line interface, configuration files. and gradually detach from the previously used IDE in development, and learn to use VIM or emacs (or preferably both).

    • Read "UNIX Programming Environment"
    • Read "Unix Programming Art"
    • Toss your un*x system
Data structure and Algorithm basics

Today, many people think that the main part of programming (especially web development) is to use other people's code, can express their ideas in a clear and concise way more important than mastering the hard core math and algorithm skills, data structure sorting function binary search is this built-in? Work will never be used, learning algorithms have what use AH? This kind carries the pragmatism the banner "The Code farmer" The behavior certainly is not advisable, does not have the solid theory background, meets the bottleneck to be sooner or later the matter.

Data structures and algorithms are matched, the main content that you should master in the introductory phase should be: what algorithm and data structure can solve this problem faster. This requires you to be familiar with the common data structures and algorithms that you do not necessarily have to knock on the code, and the paper-based handwriting process is faster. For data structures and algorithms that you don't understand, you're going to search it for what it's doing, what it's used for.

Learning resources for your reference:

    • Introduction to the algorithm: Some people say don't take this book as an introductory book, this book is not an introductory book, although the title is Introduction to algorithms, this is only because the author does not want to make this book with other books. Of course, there is no way to get the book, read the first time to skip the exercise and proof on the line, if still feel guilty first look at this data structure and algorithm analysis
    • Coursera algorithms:design and Analysis Parts 1 & Part 2:stanford algorithm class, non-qualifying language, two sections follow down the basic of the algorithm; English is out of bounds: MIT Open Class: An Introduction to Algorithms
    • The introductory phase also takes care of the ability to use conventional algorithms to solve small-scale problems, which can be read in conjunction with previous programming sections: "Programming Zhu Ji Nanxiong", "Program Design Practice"
Programming language Basics

Different languages solve the same problems in Different ways. By learning several different approaches, you can help broaden your thinking and avoid getting stuck in a rut. Additionally, learning many languages is far from easier now, thanks to the wealth of the freely available software on the Internet

-the Pragmatic Programmer

Also know that the difficulty of learning the Nth programming language is half of the n-1 gate, so try to experiment with different programming languages and programming paradigms, if you follow the guidance of the previous article, you have contacted: "clean" scripting language python, traditional command-language C, and a romantic functional language scheme/racket three good friends. But the mere touch is not enough, you still need to continue to deepen friendships with them, and try to make new friends, beautiful and elegant Ruby girl, Hindley-milner language family's palm is a good choice. But there's a big partner you can't hide, you have to know,--c++, you have to be prepared to be with him:

    • Getting Started: *c++ primer*;
    • [Optional] Advanced:
      • Efficient Use: *effective c++*
      • Deep dive: Deep Exploration of C + + object model; *c++templates*
      • Research reflection: *the Design and Evolution of c++*; for C + + this necessary Evil, reading this book allows you to choose whether to be a night watchman or a Japanese person.

The reality is brutal, in the field of software engineering is still filled with some fanatics, they only have a programming language, but also want to master a language, they think they have mastered the language is the best, and other heresy are stupid x. This kind of person is not without medicine, there is a very simple treatment: let them write a compiler. To really understand the programming language, you have to implement one yourself. This is the introductory phase and does not require you to go to a compiler course, but it requires you to implement at least one simple interpreter.

Learning resources for your reference:

    • "Programming language-the Road to Practice": CMU programming language principles of textbooks, program language primer, now you can see, will greatly expand your horizons, open up your gap with ordinary people.
    • Coursera programming language MOOC: In class You can access extreme FP (functional) SML, neutral FP racket, and extreme oop (object-oriented) Ruby, and learn the problem of FP decomposition vs oop decomposition, ml pattern matching, Lisp macros, immutability and variability , the principle of interpreter implementation, etc., make it easier for you to learn a new language in the future and write better programs.
    • Udacity CS262 Programming Language: Warm-up, teach you to write a simple browser-in fact, a JavaScript and HTML interpreter, finished the finished product is still very interesting; Try to complete a project previously mentioned in the SICP section: Write a Scheme with Python interpreter
Other

The introductory phase of programming is a relatively easy to overlook:

    1. Learn English well: English is the main tool for you to acquire high-quality learning resources, but in the entry stage, the reading of the translation of the book information loss is not so serious, in your own situation weigh it. In addition to the importance of English in communication, Linus Torvalds a Finnish, fluent English has always been his recruiting developers to work for Linux, this is your role model.
    2. Learn to ask questions: The study will certainly encounter problems, the first should learn the search engine "advanced search", when a single retrieval can not solve the problem, go to Stack Overflow or ask questions, read this article before the question: What has you tried?
    3. Do not be a lone wolf: try to build a simple personal site like this, not just a lonely about page, to learn Markdown and LaTeX, try to record their ideas on the blog, and subscribe to their favorite programming blog. A few recommendations for your reference: Joel on software, Peter Norvig, Coding Horror
Summary

You should not be afraid of the above content, the introduction of programming is not a few weeks to complete the small project. You will also encounter countless difficulties, when you hit the wall when trying to try the "Feynman" skills: The difficulties are divided into small pieces of knowledge, and then dealt with one by one, and then through the clear explanation to others to test whether they really understand. Of course, there will still be problems you can't solve, so don't force yourself--many times when you go back and look at the problem later, everything is going to be enlightened.

Also, do not confine yourself to the materials mentioned above, as well as some books that are worth reading over and over in the introductory phase and in future stages of Ascension. *the Pragmatic programmer* is such an introductory book for programmers, the ultimate book. Some people call this book a code-wide: from dry to KISS, from man to programmer, this book teaches you everything, all you need is to follow the instructions in the book.

Postscript

If you can manage to accomplish all of the above tasks, congratulations, you have really achieved the introduction of programming. This means that you will not be afraid of the task of learning a new language after more in-depth study, not afraid of the "complex" API, not afraid to learn specific techniques, and even feel easy. Of course, in order to master these things you still need a lot of practice, the waist or pain, walking or will be laborious, can not go to the 5 floor in one breath. But I can guarantee that you will have a great change in your mind, get great confidence, see the teacher classmate and Csdn's eyes will become very delicate, although only completed the introduction of programming, but has become the programmer of the spirit of the world Gaofu. No, I said wrong, even if the high-rich handsome will not have the strength of the spirit, he will doubt himself, feel that they do not have the money is nothing. But in short, you follow the guide to read a book, it will experience the "when the Ling" feeling.

Welcome to the students who have practiced.

Programming Learning Guide

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.