Static Code Analysis Tool for Linux Shell Scripts: ShellCheck

Static Code Analysis Tool for Linux Shell Scripts: ShellCheck

<span>Shell</span> scripts are indeed prone to errors during development, especially for beginners who may feel overwhelmed. In previous articles, I introduced some debugging techniques and tools, and today I will introduce a <span>static code analysis tool</span> for Shell: <span>ShellCheck</span>, an open-source project with 38.5k[1] stars on Github[1]. As an open-source static code analysis tool, ShellCheck … Read more

Day 99: Testing and Assertion Practices in C Language

Day 99: Testing and Assertion Practices in C Language

Review of the Last Session: The previous lecture systematically organized the style and maintainability suggestions for C language, emphasizing the importance of unified naming, reasonable comments, modular division, macro usage, avoiding magic numbers, and team style specifications for code quality and subsequent maintenance. It demonstrated the significant improvement in engineering efficiency through comparisons of erroneous … Read more

Code Linting in Rust

Rustc provides us with the lints (code checks) feature, which is an important part of the Rust compiler used to detect potential issues in the code. Lint Levels Initially, there were four levels, which were later expanded to include <span>expect</span> and <span>force-warn</span>: Level Meaning Compilation Behavior Overridable Introduced Version <span>allow</span> Allow No report Yes 1.0 … Read more

Practical Python Programming: Object-Oriented and Advanced Syntax

Python is known for its “elegance”, “simplicity”, and “readability”, and one of the keys to achieving these characteristics is good coding standards and clear type annotations. As project scales increase and team members grow, writing Python code that is “understandable and modifiable” becomes more important than just writing “working code”. This article will take you … Read more

Standards, Methods, and Tools for Static Analysis of Embedded C/C++ Code

Standards, Methods, and Tools for Static Analysis of Embedded C/C++ Code

In embedded C/C++ development, due to the flexibility and complexity of the language, defects such as memory leaks, buffer overflows, and undefined behaviors are prevalent. Static Code Analysis (SCA) is a technique that can identify potential issues before code compilation and execution, making it an indispensable part of building high-reliability and high-security software. This article … Read more

Static Analysis Standards, Methods, and Tools for Embedded C/C++ Code

Static Analysis Standards, Methods, and Tools for Embedded C/C++ Code

Follow usLearn Embedded Together, learn and grow together In C/C++ development, due to the flexibility and complexity of the language, defects such as memory leaks, buffer overflows, and undefined behavior are rampant. Static Code Analysis (SCA) is a technique that can identify potential issues before code compilation and execution, making it an indispensable part of … Read more

Top Ten Best Practices for Designing and Implementing C++ Classes

Top Ten Best Practices for Designing and Implementing C++ Classes

From WeChat Official Account: DeepNoMind Author: Yu Fan C++ code offers sufficient flexibility, making it challenging for most engineers to grasp. This article introduces ten best practices to follow for writing good C++ code and provides a tool at the end to help analyze the robustness of C++ code. Original text: 10 Best practices to … Read more

BDE: A High-Performance C++ Development Environment by Bloomberg

BDE: A High-Performance C++ Development Environment by Bloomberg

BDE: A High-Performance C++ Development Environment by Bloomberg BDE (Basic Development Environment) is a set of foundational C++ libraries developed and maintained by Bloomberg L.P. Originally designed for building large-scale, high-performance financial software systems, its powerful features and excellent architectural design make it widely applicable in other fields as well. 1. Main Components of BDE … Read more

Python 3.10+ Hidden Features: Match-Case + Type Annotations for Code as Precise as Mathematical Formulas!

Python 3.10+ Hidden Features: Match-Case + Type Annotations for Code as Precise as Mathematical Formulas!

Have you ever faced this dilemma? Using if-elif to handle complex data makes the code as tangled as spaghetti; without type checking, AttributeError always pops up at runtime; debugging involves guessing types by looking at variable names… The structured pattern matching in Python 3.10+ (match-case) combined with type annotations allows you to write code that … Read more

Essential Tips for Self-Taught Python Programmers: Bad Habits to Change

Essential Tips for Self-Taught Python Programmers: Bad Habits to Change

As a self-taught Python programmer, do you often find yourself writing code and feeling that something is off, but you can’t quite put your finger on it? It might be due to some bad habits holding you back! Today, let’s discuss the bad habits in Python that you should change to help you write cleaner … Read more