How programmers learn mathematics (a hot article)

Source: Internet
Author: User

I have spent 15 months making up for my bad math skills since I read the biography of Johnny Von norann. I have read a lot of mathematics books, but it seems that I have not read more. Of course I will do it later ..

Now let me tell you this ..

 

Farewell to traditional ideas

First, programmers do not think they need to understand mathematics. I often hear this; I don't know if I disagree. Even programmers who used to major in mathematics told me that they didn't always use mathematics! They said that it is more important to understand design patterns, object-oriented principles, software tools, interface design, and other similar things.

Do you understand? They are completely correct. You don't need to know much about mathematics, so you can be a great, professional programmer.

However, at the same time, you do not really need to know how to program. There are many professional programmers who realize that they are not very good at mathematics, but they still look for ways to improve.

What do you think if you suddenly feel bad about yourself and the people around you are far behind you? Well, you may find that you are good at project management, personnel management, interface design, technical writing, or system management, and many other programmers do not have to be proficient. You will start to pile up those ideas (because work can never be done). When you find something you can master, you will probably move to full time to do this job.

In fact, I don't think you need to know something, but you can still rely on it to survive.

So they are right: You don't need to know mathematics, and you can do well without it.

But recently I learned something that may surprise you: it is easier to learn mathematics after you know how to program it. As a matter of fact, if you learn mathematics first and then work as a programmer, you will find that programming is just a piece of cake.

The method for teaching mathematics in school is wrong. Only the teaching method is wrong, not the mathematics itself. If you study mathematics in the correct way, you will learn faster. Remember this, it is of great value to you as a programmer.

Even if you know a little bit about mathematics, you can write cute and interesting programs. Otherwise, it will be a little difficult. In other words, mathematics can be learned slowly as long as you have time.

No one knows about all mathematics, or the best mathematician. When people invent new forms to solve their own problems, the field of mathematics is constantly expanding. Some given mathematical problems, just like programming, can be solved in more than one way. You can pick your favorite method.

The mathematics is... well, please don't tell anyone that I said this. Of course, I don't expect anyone to invite me to such a party when I am still alive. However, mathematics is actually... I'll keep it quiet. (She is actually a pleasure !)

 

The mathematics you learned (and the mathematics you forgot)

Here is the mathematics I can remember at school:

Junior high school: Number, number, arithmetic knowledge, elementary algebra ("A short story with problems ")

High school: algebra, ry, Higher Algebra, triangle, calculus (quadratic curve theory and limit)

University: calculus, differential formula, linear algebra, probability and statistics, discrete mathematics

What is the above list of high school mathematics courses? Almost all American high schools have such curriculum settings. I think other countries will look very similar, except for students who have mastered these courses before the age of 9. (American children are also keen on playing the devil's truck competition. Even so, it is not a big loss .)

Algebra? Yes. No problem. You need algebra and some knowledge about analytic ry. Those are useful and you will be able to learn everything you want in the next few months. What about the rest? I think a basic introduction may be useful, but it seems ridiculous to spend the entire semester or year on it.

I now realize that the book list was originally designed to serve students who will be scientists and engineers in the future. The mathematics courses they teach in high school are not prepared for your programming career. The simple fact is, the mathematical knowledge required by most programming jobs is faster than that required by other engineers.

Even if you want to be a scientist or engineer, after you understand what mathematics is, how it comes, how it goes, and why it is born, I found it easier to learn and appreciate ry and ry. You don't have to study and remember the geometric proof and triangular identity, although it is indeed what high school requires you to do.

Therefore, such a book list is no longer useful. What the school taught us is not the most appropriate mathematics, and the method is not correct. It's not surprising that Programmers think they no longer need mathematics: Most of the mathematical knowledge we have learned is not very helpful to our work.

 

They didn't teach you that part of mathematics.

In reality, computer scientists often use only a small overlap with the mathematics listed above. For example, most of the mathematics you learn in middle school is continuous: that is, it is a real number of mathematics. For computer scientists, 95% of their interest may be more discrete: for example, the mathematics of integers ..

I plan to talk about computer science, software engineering, programming, some interesting stuff, and other training that is often confusing in my blog later. I have learned an unrelated basic framework from Richard Gabriel's "Software patterns. If you cannot wait, read it. It's a good book.

So far, do not bother you with the word "computer scientist. It sounds terrible. In fact, mathematics is not a field exclusive to computer scientists. You can also learn it as a hacker and do what they can. Your background as a programmer will help you stay focused only on those practical aspects.

We use discrete mathematics to build a computing model. This is a common practice. If you are reading this blog today, you are learning more about mathematics from now on, and you will realize that such a general practice is wrong. From now on, you will be confident that you can ignore this and learn it in the way you want.

For programmers, the most effective branch of discrete mathematics is probability theory. This is the next lesson after you finish basic arithmetic at school. What is probability theory? How many times have you seen it? Or it may be flush. No matter what the problem you are thinking about, if it is "How many ways..." or "How likely...", it is a discrete problem. When this happens, it is converted into a "simple" count. Let's take a look at a coin ...? Undoubtedly, they will teach you probability theory after they teach you basic computing usage.

I also saved Discrete Mathematics Textbooks in my college. Maybe he only takes 1/3 of the courses, but it covers the mathematics most of our computer programming work every day.

That's strange enough. My professor never told me what mathematics is for, or I have never heard of it. For various reasons. So I never paid enough attention: I just pass the test and forget them all, because I don't think she has anything to do with programming, the change is that after I have completed some computer science courses in college, maybe 25% courses, poor! I must understand what is the most important for myself, and then develop deeply.

I think it would be nice if every math takes a whole week to show you how to get started. This is the most interesting assumption, then you know what kind of monster you are learning. Monsters, probably suitable for every course.

Apart from probability and discrete mathematics, there are also many other mathematical branches that may be quite useful to programmers. Schools generally do not teach you unless your minor subject is mathematics, the number list includes:

Statistics, some of which are included in my discrete mathematics class, some of her training is limited to her own. Naturally, it is also very important, but you do not need any special entry points if you want to learn.

Algebra and linear algebra (such as matrices ). They will teach linear algebra immediately after teaching the algebra. This is also simple, but it is very useful in many fields, including machine learning.

Mathematical logic. I have not read a complete book about this subject, written by Stephen Kleene, inventor of the kilin closure, and I know other things like Kleenex. Do not read this. I swear that I have tried the second chapter for no more than 20 times. If you have any suggestions for getting started, you can recommend them to me. Although, this is obviously a very important part.

Information Theory and kolmorgorov complexity theory. That's incredible, isn't it? I bet no high school will teach you any of these courses. They are all emerging disciplines. Information Theory is (rather difficult to understand) about data compression. kolmorgorov's Complexity Theory is (also very difficult to understand) about algorithm complexity. That is to say, You need to compress it as little as possible, and the time you need to spend will become longer. Similarly, the program or data structure will become more elegant at the same price.

They are both interesting and useful.

Of course, there are also some other factors that are repeated in some fields. Let's also say: the part of mathematics that you find useful is different from those that you think useful at school.

What about calculus? Everyone learns it, so it must be important, right?

Well, calculus is actually quite easy. Before I learned it, it seems to be the most difficult thing in the world, as if it was similar to quantum mechanics. Quantum mechanics is not that easy to understand for me, But calculus is not. When I realized that programmers could quickly learn mathematics, I picked up some calculus textbooks and read the entire book one month, one night reading for an hour.

Calculus is about continuity-the ratio of change, the area of the curve, and the volume of the three-dimensional. Some useful things, but the actual details contain a large amount of memory and are boring. As a programmer, they are not needed at all. A better way is to understand the concepts and technologies as a whole and query the details when necessary.

Ry, triangle, differential, integral, conical curve, differential equation, and their multi-dimensional and multi-dimensional-all have important applications. However, you do not need to understand them at this time. This is probably not a good note, so you can prove and exercise their exercises year after year, aren't you? If you want to spend a lot of time learning mathematics, it is also related to your life.

 

The correct method for learning mathematics

The correct method for learning mathematics is breadth first, not depth first. You need to examine the entire mathematical world, learn the names of each concept, and differentiate what is.

Specifically, how can we use long division? If you can perform long division on paper, raise your hand now. Will someone raise your hand? At least I don't think so.

Looking back at the long division you 've learned in school, it's strange if you don't feel upset or angry. Of course, this is obvious, but you do not have to do it yourself, because it is easy to use a calculator, even if you are unfortunately on a desert island without electricity. You have at least a calculator, on your watch, on what stuff to fill your teeth, or on anything else.

Why do they still teach you this? Why are we confused? If we cannot remember how to do it? It's not like we need to know her again. In addition, you can use any large number for long division if your life hangs over the line. As if you were imprisoned in the dungeon of the third world, the authoritarian here won't let you out unless you calculate 219308862/103503391. What would you do? Okay, it's easy. You start to subtract the denominator from the numerator until you can no longer subtract the remainder. If there is pressure, you can find a way to continue to use the subtraction, estimation as the remainder of the decimal number (in this case, 0.1185678219, emacs M-x calc told me. Accurate enough !)

You may understand that division is a repetition reduction. In this way, our intuitive understanding of the Division concept is deeply rooted!

The correct way to learn mathematics is to ignore the actual algorithms and proofs. In most cases, their names, their roles, their general calculation steps (sometimes) who invented them, how long have they been invented, what are their defects, and what are related to them. Take mathematics as a liberal arts course.

Why? Because the first step is mathematical determination of the problem. If you have a problem to solve and assume you have no clue how to start, it will take a long time for you to understand. However, if you know that this is a variant problem, a convex optimization problem, or a boolean logic problem, you can at least find a solution from where to start.

There are now many mathematical technologies and the entire branch of the discipline. If you do not know what the combination logic is or even have never heard of it, then you cannot realize the problems that can be found in the combination logic to solve the answer, aren't you?

But that is really a big news, because reading these fields, learning practical algorithms, modeling and computing results methods, it is easy to remember these names. They teach you the chain rules in school, and you can also recall that they can be used in exam questions, but how many students can really understand what they actually mean? So when they encounter a variant chain problem, they don't know how to use the formula. The irony is that it is easier to understand what this is than to remember how to use formulas. The chain rule is just how to evaluate the meaning of the chain function, function f () References function g (), you need to export F (G (). Well, the programmer knows all the functions related to them. We use them every day, so now it is easier to imagine the problem than in school.

That's why I think they are teaching mathematics in the wrong way. For most high school graduates, what they teach is not how to prove the usefulness of mathematics by experience. What they teach is just non-empirical content. Before you learn how to seek and do points, you will learn how to count and program.

I think the best way to learn mathematics is to spend 15 to 30 minutes on Wikipedia every day. There are thousands of articles related to the mathematics branch above. You can start with some articles you are interested in (such as string theory, or Fourier transformation, or tensor theory, which is something that can affect your attention. If you do not understand anything, you can learn about those links. This is the case until you are exhausted.

A few months later, this will expand your knowledge in mathematics vertically, and you will find some patterns. For example, every branch of mathematics seems to include a complex variable with multiple elements, then linear algebra will gradually fill your book list until you force yourself to learn how he actually works, and you need to download an ebook or buy a book until you can have fun.

With Wikipedia, you can quickly find a way to understand the basic principles of mathematics. In some fields, mathematics almost always formalizes our "Common Sense", so we can reduce or prove new things in those fields. The Research on Mathematics itself is endless and fascinating: the ability to construct the essence of the Form Model, proving, self-evident systems, rule representation, information, and computing.

A symbol is a very important thing that will soon give up. Math is the curse that closes your journey to another world. Even if you are familiar with accumulation, points, polynomials, exponent, and so on, if you see a pile of symbols heap through the exception of complexity, you can simply regard the functions implemented by him as an atomic operation.

However, from the perspective of mathematics, we try to understand what people are trying to solve (the proven problems may be useful to you someday ), you will start to see the same type in the symbol, and you will not reject them. For example, the accumulate symbol (uppercase symbol-sigma) or π (uppercase symbol-Pi, multiplication symbol) seems to be confusing at first, and you understand their basic principles in real time. But if you are a programmer, you will realize that he is just a loop: a cumulative value, a multiplication. Points are the addition of a continuous curve, so it won't make you feel depressed for too long.

Once you get used to many branches of mathematics and many different symbol formats, you will be on the road to learning a lot about mathematics. Because you are no longer afraid, you will find problems. In fact, they will automatically jump to you. "Hi," you will think, "I understand this. This is a multiplication symbol !"

In this way, you can discard the calculator. There is an image-filled calculator such as R, Matlab, Mathematica, or even a C language library that supports vector machines. But almost all useful mathematics are heavy-duty automated machines, so you can automate everything.

 

What is the use of exercises?

After years of working as a hobbyist in mathematics, you plan to do more mathematics, even if you have never touched a pencil or paper. For example, you will always see polynomials, so at last you will be confused to start polynomial operations. Similarly, logarithm, root, beyond number, and other general mathematical principles.

I still feel like I have to do a lot of exercises myself. I am looking for a way to follow the verification steps, such as using a "seemingly credible test". If their results look more or less correct, then I will pat my ass. But if I see a situation that proves I have never heard of it, or it seems wrong or impossible, I will explore more.

This is similar to reading the program source code, isn't it? When you read someone's code, you don't need to manually simulate the entire program State: If you know what will happen in the computing process, you can infer the result by reason. For example, if the result is a list and they return a scalar, you may dig deeper. But under normal circumstances, you can scan the source code at almost the speed you read the English text (sometimes just at the speed), and you are confident that you understand the full state, at the same time, you may find an error that truly shocked you.

I think that's how a math enthusiast (A matcher and a real math fan) reads a math paper, or any essay that contains a lot of math. They do the same classification check, as you did when you read the code, but not just that unless they don't want to bring down the author's point of view.

In that case, I will occasionally do math exercises. If some problems (such as algebra and linear algebra) Keep running, I will do some exercises to make sure that I really understand her.

But I want to emphasize this: do not distract you from exercises. If an exercise (or even a special article or chapter) begins to upset you, you can leave the exercise to continue. This is the only way to go. Let your intuition guide you. You will learn more, faster, and your confidence will grow.

 

How can this help me?

Maybe not -- it cannot work immediately. But it can indeed help improve your logical reasoning ability: for example, you do exercises in the gymnasium. If you do something every day, your overall ability will be improved.

For me, I have noticed that many fields of interest (including artificial intelligence, machine learning, natural language processing, and pattern recognition) are used in mathematics. For example, if I have already dug a deep field, I have found that the mathematics they use is no longer more difficult than the mathematics I learned in middle school. Most of them are just different fields. Instead of making it harder, and learning enables me to write (or use it in my own code) neural networks, genetic algorithms, bepes classifier, cluster algorithms, and image recognition, and other trendy things can produce cool applications. I often show up to my friends.

I have gradually realized this. When someone else showed me an article containing mathematical symbols, I no longer suddenly feel like a cold sweat: combination, differentiation, truth table, definite column, unlimited series, and so on; those mathematical symbols are now easy to get along with, but (like programming language syntax) It's a little weird at the beginning. Now I can better understand it. When I have no idea what I am talking about, I no longer feel like I am a person who doesn't understand mathematics. Because I know that I can understand it. That's good.

I will continue to do better. I have many other active headers and many books and articles to read. Sometimes I spend the whole weekend reading a math book, and sometimes I don't think about her for weeks. Just like other interests, if you trust her, you will be interested, and it will be easier to spend time. You can often try to apply what you think is interesting and benefit from it.

 

Good study, mathematics every day!

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.