RSSAmplifier

Blog

Giovanni Dicanio's Blog

Giovanni Dicanio s Programming Corner on the Internet

giodicanio.comRSS feed ↗10 posts

Latest posts

Why We Should Double-Check the AI Output: A Bug Which Wasn’t

This is a concrete real-world example showing how AI-generated results should not be 100% completely trusted.

How to Declare a C++ Function that Takes a Blob of Memory?

Discussing several options, starting from the good old C-style void* pointer.

The char-TCHAR-wchar_t Pendulum in Windows API Native C/C++ Programming

A trip down memory lane for Windows C/C++ text-related coding patterns: from char, to TCHAR, to wchar_t... and back to char?

The IsoCpp.org Process for Suggesting Articles Is Broken and Should Be Fixed

The process of submitting article suggestions to IsoCpp.org can be kind of "frustrating", with inconsistencies in acceptance timing and a lack of communication. Making suggestions requires some effort, yet the outcomes feel random. I propose some improvements.

Finding the Next Unicode Code Point in Strings: UTF-8 vs. UTF-16

How does the simple ASCII "pch++" map to Unicode? How can we find the next Unicode code point in text that uses variable-length encodings like UTF-16 and UTF-8? And, very importantly: Which one is *simpler*?

Converting Between Unicode UTF-16 and UTF-8 in Windows C++ Code

A detailed discussion on how to convert C++ strings between Unicode UTF-16 and UTF-8 in C++ code using Windows APIs like WideCharToMultiByte, and STL strings and string views.

Getting a Descriptive Error Message for a Windows System Error Code

Let's see how to wrap the low-level and kind of "kitchen sink" C-interface FormatMessage Windows API in convenient C++ code, to get the error message string corresponding to a Windows system error code.

Axialis Developer Suite 82%-off Discount

Just a heads up to let you know that Axialis is offering an 82%-off discount on their Developer Suite V3 Bundle. I used some Axialis icons in past projects, and I really liked them. Click this link and save now!

Linus Torvalds and the Supposedly “Garbage Code”

Linus Torvalds criticized a RISC-V Linux kernel contribution from a Google engineer as “garbage code.” The discussion focuses on the helper function make_u32_from_two_u16() versus Linus's proposed explicit code. Let's discuss the importance of using proper type casting, bit manipulation, and creating a safer, reusable macro or function for clarity and bug reduction.

How to Set the C++ Language Standard Version in VS Code

Manually editing the tasks.json to add the desired C++ compiler option.