"Breakthrough by Delphi Masters" has been published for nearly a year. During this period, many readers sent emails. I did not reply to every email, which may have offended many readers. I can only say sorry. However, many readers come to email asking about the technical details of the system they are building, and some readers also send source code to ask for help. I hope these readers can put themselves in my shoes. I am also working part-time, and I have to build the system required by my boss. The source code I wrote also has many problems that need to be corrected. I also want to find someone to help me look at my code. ah.
Today, I want to talk about the text editor example in the last chapter of the book. Haha, some readers think the design is too complicated, but I actually think so too. However, I do not deny the insertion of such an example of "complex design" in the last chapter.
First of all, this is a book. The content of the book must be coherent and consistent. The content of this book actually revolves around one theme, which is "how to build well-designed code." The first six chapters are basically theoretical descriptions and very abstract examples, such as putting gasoline in a Coke pipe, haha. Without a real example, readers will definitely still be confused after reading the entire book. They will understand what they understood before, and they still don’t understand what they didn’t understand before. With examples, readers at least have some sense of "implementation" of those theories.
Secondly, perhaps the code design of this example is too complex for practical applications. To implement a text editor, it doesn’t have to be that troublesome, haha. For this kind of application, the code size is generally around one thousand to two thousand lines. If you really need to change the editor component, it is not troublesome to rewrite it. However, the problem is that this example is still in the book, that is, as a teaching aid, its role is not only to demonstrate, but also to leave the reader with the impression of "design". Therefore, the traces of "design" are very heavy, and overcorrection must be overcorrected.
In addition, I believe that the growth of professional programmers will be divided into three stages:
1. Elementary level, characteristics: focus on implementation, take pride in being able to realize functions, and use the sense of accomplishment as an incentive to move forward.
2. Intermediate level, characteristics: As the amount of code accumulates, I want to reuse what I wrote before, start to pay attention to design, worship design, and take pride in using dazzling design techniques in my own programs.
3. Advanced, features: Return from the "worship" design, can easily build better-designed code, but will not go crazy, design for design
Although the title of "Delphi Master's Breakthrough" is "Master's Breakthrough", it is not actually written for the above-mentioned senior or intermediate programmers (the title of the book is specified by the publisher, and I can't help it, but you can also write "Master's Breakthrough" Understood as "the breakthrough point on the ultimate road to becoming a master"). It is written for junior programmers who are still focused on implementing functions. At least, I want to point out a direction for improvement.
Finally, the length of the book is limited, and it is impossible to make a very large application as an example, at least it is not suitable in this book. Chinese programmers are still much poorer, their writing is thicker, and fewer people are buying it :). My original intention of writing this book was just to bring some help to programmers who were as confused as I was and to arouse some awareness. If we really want to study and research in depth, one book is definitely not enough. If you have this awareness, you can buy a large book and read it.