00 Design patterns based on C language _ write before beginning

Write before you start

Why start writing?

Has been engaged in embedded software development for many years. Although I have done many projects and solved numerous bugs. But looking back, I always feel that the work experience and the knowledge system used should be sorted out and summarized. After all, I think that mastering a knowledge point requires at least three steps: 1 know, 2 practice, and 3 speak clearly. Without achieving these three points, I dare not confidently say that I have mastered xx knowledge.

So, where do you start?

I read posts about embedded software on the Internet. Most of them talk about MCU/ARM architecture, bootloader, linux transplantation, driver development, cross-compilation, and so on.

These are indeed the basis of embedded software engineers, but one problem can be discovered from them: most "embedded software engineers" only pay attention to "embedded" and ignore "software engineers". The "design patterns" that are very important to the software field rarely appear in the language of "embedded software engineers". What's more, it is believed that design patterns are based on object-oriented technology, while the process-oriented C language is commonly used in embedded software, so object-oriented design patterns are not required for embedded software. This kind of thinking is ridiculous~~~

Take linux kernel as an example. Although linux kernel is mainly implemented in C language, linux kernel embodies object-oriented thinking everywhere. Many design patterns can be found in the Linux kernel. I do not believe that a person who does not understand design patterns can understand the architecture of the linux kernel.

So, I plan to start from this point and write about the use of the GOF design pattern based on C language embedded .

Guess you like

Origin blog.csdn.net/weixin_46826913/article/details/106008872