C Language Naming Beyond ‘Hundred Family Surnames’: Discussing the ‘Hidden Rules’ Known Only to Experts

C Language Naming Beyond 'Hundred Family Surnames': Discussing the 'Hidden Rules' Known Only to Experts

In the last lesson, we used the metaphor of “Hundred Family Surnames” to easily grasp the basic rules of C language identifiers. We learned that names must start with a letter or an underscore, can be followed by numbers, but cannot use keywords. However, this is just the “beginner’s guide” to the art of naming … Read more

Mastering C/C++: A Comprehensive Guide to Identifiers and Naming Conventions

Mastering C/C++: A Comprehensive Guide to Identifiers and Naming Conventions

Overview: This article primarily introduces the meaning of identifiers in C/C++ and their naming conventions. It aims to help readers quickly understand what variable names, function names, macro definitions, array names, etc., are, as well as their respective naming methods and rules. 1. Identifiers In C language, identifiers mainly refer to variable names, array names, … Read more

The Art of Naming in C Language: Understanding Identifiers and Overcoming Code Illiteracy!

The Art of Naming in C Language: Understanding Identifiers and Overcoming Code Illiteracy!

In the last lesson, we discussed the “past and present” of the C language and the art of “white space” in code. Today, we will explore a more fundamental and extremely important concept—identifiers. When you hear the term “identifier”, does it sound a bit academic and hard to grasp? Don’t worry! Simply put, it is … Read more

Bluetooth: The Most Colorful Naming Blunder in Tech History

Bluetooth: The Most Colorful Naming Blunder in Tech History

Connecting phones to headphones and cars to speakers is all thanks to “Bluetooth,” but have you ever wondered why this technology is neither “blue” nor resembles “teeth”? Today, let’s delve into the naming blunders in the tech world that will surely make you laugh! The “Ancestor” of Bluetooth is a Viking King! The story begins … Read more

FPGA Chip Naming Conventions: A Guide to Decoding Manufacturer ‘Jargon’

The naming of FPGA models is akin to the “identity card” of chips, containing key information such as architecture, process technology, and performance. Mastering these rules allows for quick identification of device characteristics, helping to avoid pitfalls in selection. This article analyzes the naming logic of four major manufacturers (Xilinx, Intel, Lattice, Microchip), enabling you … Read more

Embedded Design Guidelines 1: Leave the Camp Cleaner Than You Found It

Embedded Design Guidelines 1: Leave the Camp Cleaner Than You Found It

[Image]1. Coding Purpose Unified Steps: The regular army’s approach has a consistent style: tidy, understandable, clear, and straightforward. Function Integration: Unified management of interfaces to reduce conflicts. Efficient Portability: Quick “copying” to minimize omissions. Leave the camp cleaner than you found it. 2. Coding Principles Written Neatly with Clear Logic 2.1. Written Neatly 2.1.1. Unified … Read more

Optimizing Readability in C Code: Naming and Comments

Optimizing Readability in C Code: Naming and Comments

Optimizing Readability in C Code: Naming and Comments In C programming, code readability is a very important factor. To make it easier for others (or your future self) to understand your code, it is crucial to use naming and comments effectively. This article will detail how to enhance code readability through reasonable naming and effective … Read more

Embedded Design Guidelines 2: Naming and Definitions

Embedded Design Guidelines 2: Naming and Definitions

[Image]2.1.1.2. Variable definitions should always use lowercase snake_case naming convention. Pointers: Level 1 pointers should have the prefix “p_”, level 2 pointers should have the prefix “pp_”, and level 3 pointers should have the prefix “ppp_”. Static global variables (only in one C file) should start with “s_”, for example, void* s_p_sys_nparam = NULL; ; … Read more

C Language Coding Standards: Naming Conventions and Commenting Styles

C Language Coding Standards: Naming Conventions and Commenting Styles

C Language Coding Standards: Naming Conventions and Commenting Styles In the process of learning and using the C language, adhering to certain coding standards is very important. Reasonable naming conventions and good commenting styles can not only improve the readability of the code but also enhance coding efficiency during team collaboration. This article will discuss … Read more