Some Tips for C/C++ Programming

(Some of these entries only consider usability and do not take optimization into account; use with caution in production environments.)1. C++ Universal Header (*Only usable with the GCC compiler)#include<bits>**Recommended only for competitive programming; otherwise, it may lead to unpredictable issues.2. Improve yourself by practicing on Luogu’s theme library; for exams, use Luogu’s beginner and interview … Read more

C++ Programming Tips: Avoid Implicit Type Conversions

C++ Programming Tips: Avoid Implicit Type Conversions

C++ performs “implicit conversions” between different types, such as silently converting char to int or int to char. “Implicit conversions” allow us to successfully provide a short or int to a function that requires a double.The above “implicit conversions” are provided by the language, and we cannot refuse them. However, C++ allows us to provide … Read more

Attention Freshmen! Learning Python This Way Really Gives You an Edge!

Attention Freshmen! Learning Python This Way Really Gives You an Edge!

Previously, I really took a lot of detours while learning Python. 😭 I blindly watched online courses 📺 and took a ton of notes 📒, but when it came to coding, my mind went blank… I knew the syntax, I had filled three notebooks, and felt like I understood everything, but when I first tried … Read more

C++ Programming Tips: Resource Management Classes Must Provide Access to Raw Resources

C++ Programming Tips: Resource Management Classes Must Provide Access to Raw Resources

Many libraries and functions we use require us to pass raw resources instead of a resource management class object. Therefore, it is essential to design methods in resource management classes to access raw resources. Currently, there are two mainstream methods: 1. Explicit Conversion (Recommended) This method involves designing a function that returns the internal raw … Read more

Avoiding Pitfalls in C Language: 2 Core Concepts to Help Beginners!

Avoiding Pitfalls in C Language: 2 Core Concepts to Help Beginners!

For those just starting with C language, do you often encounter these confusions: Your program compiles without errors, but suddenly crashes at runtime? You want to change the input every time the program runs, but can only modify the code and recompile? Today, we will break down two core concepts in C language that are … Read more

Python Programming Tips – Generating Infinite Loop Iterations with Cycle

Python Programming Tips - Generating Infinite Loop Iterations with Cycle

In some problems involving “cycles” (such as looping playback or polling tasks), it is necessary to iterate over a given list multiple times. Here, iteration means going from the first element to the last, and then starting again from the first element, repeating this process. Let’s start with some music~ The following example will cyclically … Read more

Slow PLC Programming? Master These 4 Tips in TIA Portal for Maximum Efficiency!

Slow PLC Programming? Master These 4 Tips in TIA Portal for Maximum Efficiency!

Introduction In the world of PLC programming, do you often encounter the frustration of completing the same task in a day while others finish it in half a day? In fact, aside from differences in software proficiency, the correct methods and tool usage habits are often the key to efficiency gaps. Today, we will share … Read more

17 Tips to Improve Your Python Programming Skills

17 Tips to Improve Your Python Programming Skills

Follow + Star, learn new Python skills every day Source: Internet “Python is a truly wonderful language. When someone has a good idea, it takes about a minute and 5 lines of code to write something that can almost achieve what you want. Then it takes just an hour to expand the script to 300 … Read more

Essential Knowledge Points for C Language Beginners: Arithmetic Operators

Essential Knowledge Points for C Language Beginners: Arithmetic Operators

“From today on, study hard and make progress every day” Repetition is the best method for memory; spend one minute each day to remember the basics of C language. “Essential Knowledge Points for C Language Beginners: 100 Articles Series“ 17. Arithmetic Operators: Addition, Subtraction, Multiplication, Division, and Modulus are Simple, but There are 2 Common … Read more

C Language Programming Tips and Techniques Applicable to Microcontroller Learning

C Language Programming Tips and Techniques Applicable to Microcontroller Learning

We encourage clear philosophical thinking in programming rather than rigid rules. I do not expect you to agree with everything, as they are merely opinions that change over time. However, if I had not written them down until now, these opinions, based on much experience, have long accumulated in my mind. Therefore, I hope these … Read more