Wen/Lai Yonghao
Although most programmers write code on the same platform, programmers have different understandings of the same platform. Some Programmers think that the platform should be transparent to themselves, and they do not have to understand it themselves, the other part of Programmers think that understanding the platform helps them to give full play to the platform's advantages and avoid platform defects when writing programs. Over time, the former may fall into the category of Internet discussions about what programmers should do when they are thirty or thirty-thirty years old. The latter may gradually develop their dream of becoming a superior programmer.
Because there are too few books on the computer architecture in China, even if there are some very theoretical or always discussing architectures that are no longer popular, the lack of learning materials makes it difficult for anyone who wants to understand the computer architecture. Fortunately, Randall Hyde, author of The Art of assembly language, brings us four volumes of write great code, the first volume of the book, understanding the machine, has been translated into a Chinese version. This is truly the gospel of programmers who are pursuing superior code! After I got to the book "The first excellent way of programming, deep understanding of computer", I was reluctant to put it down. After reading it, I thought it had three major features: new, vulgar, and general.
This book is new. It describes the current popular PC hardware technology, such as high-performance cache, pipeline architecture CPU, parallel and superscalar and out-of-order execution technology, AGP interface, PCI-E interface, FireWire) or even USB. These technologies that keep up with the times must be much better than the introduction to computer, which is only about 8086/286 in the age of students. Because I read a few books on hardware, I read this book to know how the original assembly line is organized, how is the amount of excess is going on, where the advanced AGP interface and PCI-E interface, you can even understand the principle of why peripherals with USB interfaces become popular around the world.
This book is vulgar. The more advanced and complex the technology described in a book, the more difficult it is to understand. Randall Hyde writes this book as a popular programmer-oriented manual. The expression of integers, fixed points, floating points, and strings in the machine is explained in a simple way. His step-by-step structure is easy to read. Randall Hyde not only deeply analyzes the popular ASCII character set and x86 instruction set, but also puts forward its own opinions on the two main sections of Character Set and instruction set, and then rigorously discusses the advanced and significance of such design, such chapters cannot be found in traditional books on computer theory. In each chapter, the author tries to explain to readers why a computer module is designed to be like this and what are the advantages and disadvantages of designing a module, how can we write code to make better use of the advantages of this solution and avoid code deterioration. Such a book has great guiding significance.
This book is good. Superior code can "feel" the underlying hardware, because the code runs on a computer consisting of hardware. Computer components can be visible to programmers, or help to understand why System Architects have chosen a specific system design scheme. The purpose of learning computing components is not to allow readers to design their own CPU or computer systems, instead, it aims to teach readers how to make the most effective use of existing computer designs. In this regard, randall Hyde concatenates computer data representation, Memory organization and access, complex data types, memory objects, Boolean logic and digital design, CPU architecture, instruction set architecture, memory the architecture and Memory organization and input and output are integrated in this book. The transition from Chapter orchestration to content is just like heaven and earth, so that readers can enjoy their passion and happiness.
Solid basic computer knowledge is the cornerstone of writing excellent code, and typical computer science or computer engineering courses are just vague and simple about these underlying details. This book integrates the content of several courses in computer science. The most valuable thing is that this book is explained from the programmer's perspective, so that we can know more about it, write Excellent code. Well, for example, after reading this book, when you look for a job and encounter an interview question about rewriting the memcpy function in the CRT, your answer will be much more efficient than before. This is not because this book tells you how to write an efficient memcpy, but because it lets you know the computer's memory organization and access principles, and you can avoid its shortcomings.
This book is not perfect. It is impossible to require a book containing more than four hundred pages to clarify all aspects of the complex x86 computer architecture. This book only describes the hardware features that programmers need to understand from the perspective of programmers, many details are hidden. These hidden details are still important for many programmers. If you are interested, you can refer to other monographs devoted to related topics. In the Chinese version of this book, it can be seen that the translator has spent a lot of time and effort, and the quality is good. Although there are some typographical errors and the last chapter is slightly hard to translate, it cannot be concealed, it is still a good book worth reading by teachers and students and professional programmers in colleges and universities.
After a thorough understanding of the computer architecture, how can we apply this knowledge in practical work? Coming soon, the second volume of writing high-level language code using underlying language ideas will bring you the answer to the story of programming excellence. Now let's get started on the express scream!