Beautiful Mind-Role of good algorithms in programs

Source: Internet
Author: User

Algorithm What is it? This is the confusion that everyone who is new to computer programming has ever had. As for this, if you have been on this line for more than a year (such as me), then we will discuss "algorithm is important or not important", which makes no sense. Any Program Whether you are a veteran or a newbie, an application programmer or a System Programmer, or a development programmer, it is inevitable to deal with algorithms, and then happily or helplessly admit that algorithms are really important.
But what is an algorithm? The introduction to algorithms in the Chinese version explains this: An algorithm is a well-defined computing process. It takes one or more values as input, and generate one or more values as the output. In fact, we can understand that algorithms are used to solve one or more specific problems, of course, the so-called question here must be a question about computing or at least be abstracted into a question about computing. The initial and core function of a computer is computing. The program we compile is to tell a computer in a language that a computer can understand, then let me know the result. Computing is the algorithm mentioned above. This is actually the core issue of computer programs.
Plato's cosmic view is actually a mathematical cosmic view. Ancient Greek philosophers used to use mathematics to explain the world long ago, although subsequent philosophical developments prove that they have all made metaphysical mistakes to some extent. However, we can draw inspiration from this: If we assume certain conditions, then we can abstract the objective world in a certain range. In my opinion, many mathematical problems can be solved through computer programs (computers are actually used to simulate logical functions in mathematics. Early Addition Machines were built on the basis of Boolean algebra, however, computer development lags far behind the development of mathematics, so it can only be used to solve some mathematical problems, rather than the problems related to mathematics ). Specific computer languages, such as C, Java, and C #, are all manually defined symbolic systems used to express the logic for solving the problem. This logic is the algorithm. This is just like two people talking together. What we want to tell each other is our thoughts. Language is just a carrier.
Forgive me for saying so much about my own understanding of the algorithm. In fact, I want to clarify the problem in a more simple way. I have always been pursuing microwords, however, the ability to understand and summarize is still to be further strengthened. It is actually a truth to look at the quality of a program, not just the appearance (not the importance of the outside, but the readability and beauty of the program is what programmers should pursue ), more importantly, it depends on the mind. For a program, its mind is an algorithm. To write or read a program well, you must think of a way to give it a beautiful soul, so that everyone who reads it can be amazed and the computer can run it more economically. If we regard computer as a smart creature, it certainly does not have human morality, so how does it distinguish between good and evil and the ugly (I should not use such humanized words here )? Computers have their own standards. In my personal understanding, it is savings. The saving I mentioned here is not just about saving time or space, but about integrating various factors that can be considered within the tolerable range of the current computer, this allows computers to do their jobs with less losses. A good algorithm is the most approximate generalization of this process, so I say that an algorithm is the soul of a program.
In fact, in the process of programming, we often do not need to design algorithms completely by ourselves, and many programmers do not have the ability to design excellent algorithms. What we do more often is to use some excellent algorithms in our programs to make our programs elegant and beautiful, writing such a program should be the pursuit of every programmer who loves programming.
The program uses good algorithms, just as a person has a beautiful mind. So how can we learn about algorithms? If you are a doctor in mathematics or computer science, you can ignore this sentence, because I believe that even if you have not designed excellent algorithms, you must have read many books about algorithms. However, if you are new to programming or have not systematically studied algorithms, the beauty of programming is your best choice. I used to call this book the beauty of programming, because I have basically never learned programming in windows, my current job is to use C language for embedded development on the Linux platform. As I have mentioned earlier, the language is just a system and the algorithm is important. Therefore, whether you are a fan of Microsoft or a believer in Linux philosophy, your interest in this book will not be affected.
The beauty of programming cannot be regarded as an excellent algorithm entry book. It does not specifically talk about how many sort algorithms there are, or about linked lists, stacks, queues, trees, and graphs, so that the network, there is no detailed analysis of time complexity. However, I think this is the advantage of this book. If you want to systematically learn algorithms, the introduction to algorithms is a good entry-level book. However, I have to say that there are a lot of content in the introduction, which is boring. Those who are not great at perseverance and perseverance cannot read it all. The beauty of programming is great. I think editing may be the same as my thoughts, they put aside all the basic knowledge of boring algorithms, and simply put the beautiful things in those programs in an approachable tone, so that you can immerse yourself in it and cannot stop it. Imagine putting such a book on the head of the shelf. When you are out of work, you can read several pages with confidence, or think carefully about the mysteries of those questions, or look at the brilliant wisdom in the answers to the questions, will it also be infected by those beautiful things, and then prefer their own programming work, not to mention the answers to those questions will also bring you practical knowledge.
I love this book for so many reasons, but I still hope that I will not be involved in programming as soon as I do (not a school study time, I have been working for more than a year) programmers can also read books such as "Data Structure" and "Introduction to algorithms" to learn about nutrition. Let's love programming and write more elegant and beautiful programs.

Original post address:Http://book.douban.com/review/3071846/

The beauty of programming:Douban,Weibo

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.