Practical Debugging Skills

A blog about C++ programming, more or less.

PPTS: VM Resources Oversubscription

Oversubscribing physical resources on a VMs host is a common practice among administrators, who try to maximize the utilization of that host machine. Light oversubscription has only minor impact on the performance of applications running inside VMs, but if they push oversubscription too far, then the applications’ performance will suffer along with the host. As one of the applications’ engineer, it is important for you to understand what oversubscription is and when a performance issue is indeed caused by oversubscription.

Read more…


PDS: Stack Backtrace

Stack backtraces play a crucial role in programming, particularly in debugging and troubleshooting scenarios. Backtraces are essential tools for diagnosing a wide range of issues. Utilizing backtrace effectively when debugging is a core programming skill every developer should master. In this post, we’d like to discuss this skill in detail.

Read more…


PDS: Logging Rate Limiter

Logging is an important and integral part of software development. However, just like everything else, logging has its own downside as well. One of the typical issues with logging is actually having too many log entries. In today’s post, we are going to talk about the common ways to limit logging into a sensible rate.

Read more…


PDS: Assertions

In a programming language, such as C++, an assertion is a statement at a specific point in a program to help you to confirm that the statement it makes about your program is indeed true. Judicious use of assertions in a program may bring many benefits, especially, experience has shown that writing assertions while programming is one of the quickest and most effective ways to detect and correct bugs.[1] Thus, having assertions at the right places of a program is one of the most commonly used preemptive techniques for debugging.

Read more…


PDS: Compiler Warnings

Compiler warnings are messages produced by a compiler who is trying to warn you about potential issues in your code. Although, warnings don’t interrupt the compilation process, they should not just be ignored, as warnings may provide valuable insight and advice to keep your programs away from certain bugs. Paying attention to compiler warnings and keeping a low number of warnings is a commonly used preemptive technique to prevent bugs in the earlier phase of software development life circle. As it is said, it is much easier and cheaper to fix bugs in earlier stages than later ones.

Read more…