Day 98: C Language Style and Maintainability Recommendations

Day 98: C Language Style and Maintainability Recommendations

Review of the Previous Session: The last session introduced the evolution of the C standard (K&R, C89/C90, C99, C11, C17, C23, etc.), focusing on the impact of new standards on old code, including keyword conflicts, the failure of implicit declarations, changes in the type system, and differences in struct initialization. Compatibility recommendations were provided, such … Read more

How to Use Pointers Properly in Embedded Development? What Issues Can Pointer Operations Cause?

In embedded development, pointers are core tools for directly accessing hardware and optimizing memory access. However, due to the limited resources of embedded systems (small memory, limited computing power) and the nature of direct hardware interaction, improper use of pointers can lead to serious issues such as system crashes and hardware anomalies. This article will … Read more

Summary of High-Quality C++ Programming Guidelines

The core goal of high-quality C++ programming is to write maintainable, scalable, efficient, and safe code. Below are practical high-quality programming guidelines covering key dimensions such as coding standards, design principles, performance optimization, and security practices: 1. Coding Standards and Style 1. Naming Conventions Variables/Functions: Use <span>snake_case</span> (e.g., <span>user_name</span>, <span>calculate_sum</span>), avoid abbreviations (unless they are … Read more

Sharing Interview Experiences for Embedded Development Positions at Major Tech Companies (Huawei/Xiaomi/DJI) (2025)

October has arrived, and the campus recruitment at major tech companies is in full swing. Are you ready for embedded development engineer positions at tech giants like Huawei, Xiaomi, and DJI? As a fresh graduate, how can you stand out in the fierce competition? Today, Newton will take you through the complete interview process for … Read more

Detailed Explanation of C++ Naming Conventions

The Importance of Naming Conventions In C++ programming, good naming conventions are a key factor in writing high-quality code. They not only affect the readability and maintainability of the code but also reflect the professionalism of the programmer. Although the C++ language itself is quite lenient regarding naming rules, it is crucial to adhere to … Read more

Detailed Explanation of C++ Keywords

Basic Concept of Keywords Keywords are reserved words in the C++ language that have special meanings. They define the syntax structure and basic operations of the language. Keywords cannot be used as identifier names (such as variable names, function names, etc.). Key Features: Reserved: Keywords are specific to C++ and cannot be used for other … Read more

The Origins of C++ File Extensions: What is the Difference Between .cc and .cpp?

The Origins of C++ File Extensions: What is the Difference Between .cc and .cpp?

In C++ development, we encounter various source file extensions: .cpp, .cc, .cxx, .c++, and even the older .c. Among these, .cpp and .cc are the most common, widely found in various open-source projects and corporate codebases. Is there a substantial difference between them? Which one is better to choose? This article will discuss the C++ … Read more

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

FreeRTOS – Coding Standards Part Nine

FreeRTOS - Coding Standards Part Nine

This article introduces the <span>FreeRTOS</span> coding standards. Good coding practices are the foundation for writing quality code and collaborative software development. Data Types <span>FreeRTOS</span>‘ data types are defined in the <span>portmacrocommon.h</span> file. From the definitions, <span>FreeRTOS</span> has redefined the standard data types in <span>C</span>. For example, <span>char</span> is redefined as <span>portCHAR</span>. /** * @brief Type … Read more

Differences Between C++ Pointers and References: A Guide to Avoid Confusion

Differences Between C++ Pointers and References: A Guide to Avoid Confusion

Introduction In C++ programming, pointers and references are two commonly used features that allow indirect access to variables. However, many developers, especially beginners, often confuse their usage and differences. This article will detail the core differences between pointers and references and provide practical advice to help you avoid confusion in actual programming, enabling you to … Read more