SOLID:
SRP | Single Responsibility Principle | 单一责任原则 |
OCP | The Open Closed Principle | 开放封闭原则 |
LSP | The Liskov Substitution Principle | 里氏替换原则 |
DIP | The Dependency Inversion Principle | 依赖倒置原则 |
ISP | The Interface Segregation Principle | 接口分离原则 |
Polymorphism 多态: Using child class behavior from base class pointers / use base class pointer to reference or make calls on derived classes
static and dynamic/ static - function overloaded / dynamic - virtual operations
Encapsulation 封装:- public/private / "Data Hiding" / "binding data and methods via a class
inheritance 继承: resusability"
inheritance vs Composition "Is-a == inheritance" "Has-a == data member"
DataStruct:
Array insert : O(1) using index. Run time would be O(n) / Delete would be similar situation O (n) / Find would be O(n)
Linked list : insertion is O(n), Deletion O(n), Find O(n)
Binary Balanced Tree : Smallest elements in left hand tree. Largest on right hand side. Insertion is Nlogn, Delete is Nlogn, Find is O(logn)
Multi-thread:
1. re-entrance
2. Shared data between threads can cause data to be corrupted
3. Deadlock : caused by more than two threads and two resources
4.Race condition: use a mutex to lock the critical section to prevent data corruption.
Design Pattern:
solving same problem similar ways.
Readability, reuse, organization, proven
Others:
Until now, the boundaries between PCI Express (PCIe) and Ethernet were clearly defined
- PCIe as a chip-to-chip interconnect, and
- Ethernet as a system-to-system technology
While Ethernet switches are most commonly used in inter-system communication, the native chip-to-chip interconnect and dominating serial extension bus PCIe is on its way to compete with Ethernet, especially for the intra-system communication. Key benefits are very low latency and simple switching logic in combination with reduced design complexity, power consumption and costs. Especially in times of IoT and Industry 4.0 applications where everything is connected and massive 'big' data needs to be processed, high-speed switching is is gaining more and more importance for embedded system designs. It is used to orchestrate the data flow between multiple CPU boards, storage media and high-speed I/Os in applications like image processing, autonomous driving, video surveillance or for building up supercomputers. - https://www.menmicro.com/news-media/product-news/highly-efficient-switching-ethernet-vs-pcie/