Views on linux and postgresql source code

Source: Internet
Author: User
For more information about linux and postgresql source code-Linux general technology-Linux programming and kernel, see the following. Many people plan to read the source code of linux shortly after learning programming. Many experts on the Internet say that they really master an excellent program and read its source code. linux is so good, it's free. Why not study its source code. But it's easy to get started.

For operating systems such as linux and databases such as postgresql, the source code is the essence, and the source code will surely get a lot of GAINS. However, they have a wide range of knowledge, and many knowledge points are intertwined. without the guidance of a famous teacher, you are not an absolute genius. It is a tough task to look at the source code. Linux, as an operating system, includes file systems, process management, memory management, device management, network management, and a series of other things. Each system has many small systems, the sub-systems are very detailed and the organizations are connected with each other. For example, the upper layer of the file system is VFS, and the lower layer is EXT2, EXT3, XFS, and reiserfs under VSF. Each file system has different performance in the same situation, and some are suitable for storing large files, some are suitable for storing small files, some are suitable for storing frequently-changed files, some file systems can restore deleted files, and some are not. The file system is closely related to process management, in linux, all files are implemented. The file system has a lot to do with all linux systems. Although there is a unified interface, there are still some internal connections, if you study the file system first, the process management is not familiar, you must first study the process and memory management. These are all very tightly mixed. The functions call each other internally and reference each other in the structure, in linux, many rules are defined. Many global variables, global functions, and books on the market are not enough. When you read a book, you may have a rough understanding, but when you open the book and read the code, the code is not as simple as it is in the book. The book just shows you a line, and you may be able to walk along this line, this kind of possibility is not very big. When you leave this line, you will be very confused. The content in the book is often a little outdated. Although the ideas and theories are the same, the actual operations are confusing. When you study a system, the system contains a lot of functions, and the function contains a lot of functions. If you want to understand a function, it involves a lot of functions. For such system-level source code, you can understand it, but when you actually write your own code to replace the original code to test whether you really understand it, you will find that this is more difficult to understand and write by yourself. A large system like linux involves many internal algorithms, design patterns, and compatibility code. If you want to look at the code, you must have a deep understanding of it. A beginner, or a person who was not familiar with the Linux kernel before, without the guidance of senior experts, it is very difficult for a person to collect information on the Internet to understand the kernel, it is easy to talk about small achievements. Reading the linux source code is not as simple as the online experts say. It may be confusing to read the source code.

I suggest that common programmers do not read the linux source code as quickly as they can, nor do they see other people's articles as encouraging. If they are talented, they will be encouraged to study the source code. It is a good thing to see the source code, however, it is not an easy task. It may not have been achieved in the last few months.

Open source code is a treasure, and it is a free treasure. The code inside is the essence of ideas, the best in code, and the crystallization of experts, but do not go to the source code, looking at other people's code is not a simple matter. Figuring out the ideas in it is not something that can be solved simply by looking at code. Code is the embodiment of thoughts and a theoretical form, it is the best way to first have a certain understanding of the theory and then combine it with the code.

Here, I am not opposed to looking at the source code. It does have a lot of benefits to look at the source code. It can eliminate your sense of indifference to the program, and have a deeper understanding of the program design and theoretical knowledge. I hope that those who read the source code of the program will not be lost in the code of such a huge system as linux and postgresql. When you cannot find a way out, jump out of this circle, you can see more clearly.

Do not read the source code too early into the details of the Code. At the beginning, you should have a general feeling about the code to create an overall impression and clarify their logic, based on your own needs, you can decide whether to conduct in-depth research. Do not drag the target.
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.