<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>CodeProject Latest postings for Hall Of Shame</title>
    <link>https://www.codeproject.com</link>
    <description>Latest postings for Hall Of Shame from CodeProject</description>
    <language>en-us</language>
    <image>
      <title>CodeProject Latest postings for Hall Of Shame</title>
      <url>https://www.codeproject.com/App_Themes/Std/Img/logo100x30.gif</url>
      <link>https://www.codeproject.com</link>
      <width>100</width>
      <height>30</height>
      <description>CodeProject</description>
    </image>
    <copyright>Copyright  CodeProject, 1999-2024</copyright>
    <webMaster>Webmaster@codeproject.com (Webmaster)</webMaster>
    <lastBuildDate>Mon, 22 Jul 2024 22:22:00 GMT</lastBuildDate>
    <ttl>20</ttl>
    <generator>C# Hand-coded goodness</generator>
    <item>
      <title>CSS &amp;amp; Sophocles, more related than you know</title>
      <description>While working on a SPA I had some CSS that I was applying on the click of a button.&lt;br /&gt;
When the button was clicked, it would make one or the other DIVs go fullscreen (except for a small portion at the top where the nav bar was).&lt;br /&gt;
&lt;br /&gt;
Imagine you have these two divs -- one yellow and one cyan;&lt;br /&gt;
&lt;div class='pre-lang' id='premain935058'&gt;&lt;div&gt;CSS&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode935058' class='copy-code' data-index='935058' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre935058' style='margin-top:0;' class='lang-css' data-language='CSS' data-allowShrink='True' data-collapse='False'&gt;
&lt;span class="code-leadattribute"&gt;#&lt;/span&gt;&lt;span class="code-leadattribute"&gt;first&lt;/span&gt;{
  &lt;span class="code-attribute"&gt;background&lt;/span&gt;&lt;span class="code-keyword"&gt;:&lt;/span&gt;&lt;span class="code-keyword"&gt; yellow&lt;/span&gt;;
}

&lt;span class="code-leadattribute"&gt;#&lt;/span&gt;&lt;span class="code-leadattribute"&gt;second&lt;/span&gt;{
  &lt;span class="code-attribute"&gt;background&lt;/span&gt;&lt;span class="code-keyword"&gt;:&lt;/span&gt;&lt;span class="code-keyword"&gt; cyan&lt;/span&gt;;
}&lt;/pre&gt;Then when you click a button in the navbar it would make one or the other go fullscreen by applying a fullscreen CSS class.&lt;br /&gt;
It worked great &amp;amp; I was very happy with the simplicity of it all.&lt;br /&gt;
If you really want to see it work (toggle), &lt;a href="https://jsfiddle.net/raddevus/2yk7pLov/47/"&gt;take a look at this simple jsfiddle&lt;/a&gt;[&lt;a href="https://jsfiddle.net/raddevus/2yk7pLov/47/" target="_blank" title="New Window"&gt;^&lt;/a&gt;].&lt;br /&gt;
&lt;div class='pre-lang' id='premain500520'&gt;&lt;div&gt;CSS&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode500520' class='copy-code' data-index='500520' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre500520' style='margin-top:0;' class='lang-css' data-language='CSS' data-allowShrink='True' data-collapse='False'&gt;
&lt;span class="code-leadattribute"&gt;.&lt;/span&gt;&lt;span class="code-leadattribute"&gt;fullScreen&lt;/span&gt;{
  &lt;span class="code-attribute"&gt;width&lt;/span&gt;&lt;span class="code-keyword"&gt;:&lt;/span&gt;&lt;span class="code-keyword"&gt; 100%&lt;/span&gt;;
  &lt;span class="code-attribute"&gt;height&lt;/span&gt;&lt;span class="code-keyword"&gt;:&lt;/span&gt;&lt;span class="code-keyword"&gt; 90%&lt;/span&gt;;
  &lt;span class="code-attribute"&gt;z-index&lt;/span&gt;&lt;span class="code-keyword"&gt;:&lt;/span&gt;&lt;span class="code-keyword"&gt; 20&lt;/span&gt;;
  &lt;span class="code-attribute"&gt;position&lt;/span&gt;&lt;span class="code-keyword"&gt;:&lt;/span&gt;&lt;span class="code-keyword"&gt; absolute&lt;/span&gt;;
  &lt;span class="code-attribute"&gt;top&lt;/span&gt;&lt;span class="code-keyword"&gt;:&lt;/span&gt;&lt;span class="code-keyword"&gt; 12%&lt;/span&gt;;
  &lt;span class="code-attribute"&gt;padding&lt;/span&gt;&lt;span class="code-keyword"&gt;:&lt;/span&gt;&lt;span class="code-keyword"&gt; 10pt&lt;/span&gt;;
}&lt;/pre&gt;Here's the button click code.&lt;br /&gt;
&lt;div class='pre-lang' id='premain653206'&gt;&lt;div&gt;JavaScript&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode653206' class='copy-code' data-index='653206' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre653206' style='margin-top:0;' class='lang-javascript' data-language='Javascript' data-allowShrink='True' data-collapse='False'&gt;
&lt;span class="code-comment"&gt;//&lt;/span&gt;&lt;span class="code-comment"&gt; select the div and add the style&lt;/span&gt;
&lt;span class="code-sdkkeyword"&gt;document&lt;/span&gt;.querySelector(&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;#first"&lt;/span&gt;).classList.add(&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;fullScreen"&lt;/span&gt;);
&lt;span class="code-comment"&gt;//&lt;/span&gt;&lt;span class="code-comment"&gt; remove style from other div so it isn&amp;#39;t fullscreen&lt;/span&gt;
&lt;span class="code-sdkkeyword"&gt;document&lt;/span&gt;.querySelector(&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;#second"&lt;/span&gt;).classList.remove(&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;fullScreen"&lt;/span&gt;);
&lt;span class="code-comment"&gt;//&lt;/span&gt;&lt;span class="code-comment"&gt; vice versa for the other div -- not showing all the toggle code&lt;/span&gt;&lt;/pre&gt;&lt;b&gt;It Worked, Then Didn't!&lt;/b&gt;&lt;br /&gt;
It was all working.  I copied the code to another project and had it all set up.  &lt;br /&gt;
But suddenly clicking the button wouldn't do the fullscreen. I tried all manner of things.&lt;br /&gt;
Was the button click working?  I added an &lt;code&gt;alert()&lt;/code&gt; and saw the button was working.&lt;br /&gt;
I was going out of my bleedin' mind.&lt;br /&gt;
Then I looked real hard at the styles that I had copied to the new project. &lt;br /&gt;
&lt;b&gt;Can You See It?&lt;/b&gt;&lt;br /&gt;
Do you see the problem?  &lt;br /&gt;
&lt;br /&gt;
&lt;div class='pre-lang' id='premain596198'&gt;&lt;div&gt;CSS&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode596198' class='copy-code' data-index='596198' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre596198' style='margin-top:0;' class='lang-css' data-language='CSS' data-allowShrink='True' data-collapse='False'&gt;
&lt;span class="code-leadattribute"&gt;#&lt;/span&gt;&lt;span class="code-leadattribute"&gt;first&lt;/span&gt;{
  &lt;span class="code-attribute"&gt;background&lt;/span&gt;&lt;span class="code-keyword"&gt;:&lt;/span&gt;&lt;span class="code-keyword"&gt; yellow&lt;/span&gt;;
}

&lt;span class="code-leadattribute"&gt;#&lt;/span&gt;&lt;span class="code-leadattribute"&gt;second&lt;/span&gt;{
  &lt;span class="code-attribute"&gt;background&lt;/span&gt;&lt;span class="code-keyword"&gt;:&lt;/span&gt;&lt;span class="code-keyword"&gt; cyan&lt;/span&gt;;
}&lt;span class="code-leadattribute"&gt;;&lt;/span&gt;

&lt;span class="code-leadattribute"&gt;.&lt;/span&gt;&lt;span class="code-leadattribute"&gt;fullScreen&lt;/span&gt;{
  &lt;span class="code-attribute"&gt;width&lt;/span&gt;&lt;span class="code-keyword"&gt;:&lt;/span&gt;&lt;span class="code-keyword"&gt; 100%&lt;/span&gt;;
  &lt;span class="code-attribute"&gt;height&lt;/span&gt;&lt;span class="code-keyword"&gt;:&lt;/span&gt;&lt;span class="code-keyword"&gt; 90%&lt;/span&gt;;
  &lt;span class="code-attribute"&gt;z-index&lt;/span&gt;&lt;span class="code-keyword"&gt;:&lt;/span&gt;&lt;span class="code-keyword"&gt; 20&lt;/span&gt;;
  &lt;span class="code-attribute"&gt;position&lt;/span&gt;&lt;span class="code-keyword"&gt;:&lt;/span&gt;&lt;span class="code-keyword"&gt; absolute&lt;/span&gt;;
  &lt;span class="code-attribute"&gt;top&lt;/span&gt;&lt;span class="code-keyword"&gt;:&lt;/span&gt;&lt;span class="code-keyword"&gt; 12%&lt;/span&gt;;
  &lt;span class="code-attribute"&gt;padding&lt;/span&gt;&lt;span class="code-keyword"&gt;:&lt;/span&gt;&lt;span class="code-keyword"&gt; 10pt&lt;/span&gt;;
}&lt;/pre&gt;&lt;br /&gt;
Oy!! I have only myself to blame.&lt;br /&gt;
&lt;blockquote class="quote"&gt;&lt;div class="op"&gt;As Sophocles said:&lt;/div&gt;The keenest sorrow is to recognize ourselves as the sole cause of all our adversities.&lt;/blockquote&gt;&lt;br /&gt;
Sophocles was obviously a software developer.</description>
      <author>raddevus</author>
      <link>https://www.codeproject.com/Messages/6010979/CSS-amp-Sophocles-more-related-than-you-know</link>
      <pubDate>Mon, 22 Jul 2024 22:22:00 GMT</pubDate>
      <guid>3_6010979</guid>
      <subject>Hall Of Shame</subject>
    </item>
    <item>
      <title>Linux C PreProcessor: Who Knew?</title>
      <description>I'm going through a book right now which is fantastic!  &lt;br /&gt;
It's the best intro to OSes (how they are designed/programmed) I believe you'll ever read.  &lt;br /&gt;
&lt;br /&gt;
First of all, you can read it for FREE online (PDFs).&lt;br /&gt;
&lt;a href="https://pages.cs.wisc.edu/~remzi/OSTEP/"&gt;Operating Systems: Three Easy Pieces&lt;/a&gt;[&lt;a href="https://pages.cs.wisc.edu/~remzi/OSTEP/" target="_blank" title="New Window"&gt;^&lt;/a&gt;]&lt;br /&gt;
&lt;br /&gt;
Have you read the book?  It's fantastic because it starts out with simple code examples (in C) that teach one specific point at a time.  Amazing!&lt;br /&gt;
&lt;br /&gt;
If you've never read it, please skip all the (intro nonsense) &amp;amp; go right for the meat (to get an idea of how great the book is).  Read &lt;a href="https://pages.cs.wisc.edu/~remzi/OSTEP/intro.pdf"&gt;this chapter&lt;/a&gt;[&lt;a href="https://pages.cs.wisc.edu/~remzi/OSTEP/intro.pdf" target="_blank" title="New Window"&gt;^&lt;/a&gt;] (be aware this will open the PDF in your browser) &amp;amp; I believe you'll be convinced how great the book is too.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;And Now For the Weird &amp;amp; Wonderful&lt;/b&gt;&lt;br /&gt;
While examining the common_threads.h file for the 3rd example I stumbled upon these lines:&lt;br /&gt;
&lt;div class='pre-lang' id='premain291190'&gt;&lt;div&gt;&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode291190' class='copy-code' data-index='291190' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre291190' style='margin-top:0;' data-allowShrink='True' data-collapse='False'&gt;
&lt;span class="code-preprocessor"&gt;#ifdef __linux__
&lt;/span&gt;#include &amp;lt;semaphore.h&amp;gt;
&lt;span class="code-preprocessor"&gt;#endif&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
I always wonder about strange things like that and in this case I thought, "Where is the __linux__ defined?"&lt;br /&gt;
&lt;br /&gt;
I looked it up and discovered Gnu docs for the &lt;a href="https://gcc.gnu.org/onlinedocs/cpp/System-specific-Predefined-Macros.html"&gt;C PreCompiler (cpp exe)&lt;/a&gt;[&lt;a href="https://gcc.gnu.org/onlinedocs/cpp/System-specific-Predefined-Macros.html" target="_blank" title="New Window"&gt;^&lt;/a&gt;].&lt;br /&gt;
&lt;br /&gt;
I tried the command they suggested:&lt;br /&gt;
&lt;div class='pre-lang' id='premain971597'&gt;&lt;div&gt; &lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode971597' class='copy-code' data-index='971597' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre971597' style='margin-top:0;' data-language='text' data-allowShrink='True' data-collapse='False'&gt;
$ cpp -dM&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
But when I did I could see that cpp was running but just had an empty string.&lt;br /&gt;
&lt;br /&gt;
You actually have to point it at an exe and it'll pull out all the preprocessor commands.  What!?!&lt;br /&gt;
&lt;br /&gt;
&lt;div class='pre-lang' id='premain714127'&gt;&lt;div&gt; &lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode714127' class='copy-code' data-index='714127' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre714127' style='margin-top:0;' data-language='text' data-allowShrink='True' data-collapse='False'&gt;
$ cpp -dM ./threadx&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
When I ran that I saw a huge list of PreProcess commands.  Huge!&lt;br /&gt;
&lt;br /&gt;
I then ran it thru grep like this:&lt;br /&gt;
&lt;div class='pre-lang' id='premain580357'&gt;&lt;div&gt; &lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode580357' class='copy-code' data-index='580357' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre580357' style='margin-top:0;' data-language='text' data-allowShrink='True' data-collapse='False'&gt;
$ cpp -dM ./iox | grep -i linux&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
I saw the following!!&lt;br /&gt;
&lt;div class='pre-lang' id='premain474081'&gt;&lt;div&gt;C++&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode474081' class='copy-code' data-index='474081' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre474081' style='margin-top:0;' class='lang-cplusplus' data-language='C++' data-allowShrink='True' data-collapse='False'&gt;
&lt;span class="code-preprocessor"&gt;#define __linux 1
&lt;/span&gt;&lt;span class="code-preprocessor"&gt;#define __gnu_linux__ 1
&lt;/span&gt;&lt;span class="code-preprocessor"&gt;#define linux 1
&lt;/span&gt;&lt;span class="code-preprocessor"&gt;#define __linux__ 1&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
So, I can see that over the years the convention to determine which OS the compiler is running on has changed.  &lt;img src="https://www.codeproject.com/script/Forums/Images/smiley_WTF.gif" align="top" alt="WTF | :WTF:" /&gt;  &lt;br /&gt;
&lt;br /&gt;
Wow, things get messy as time goes on, don't they.&lt;br /&gt;
&lt;br /&gt;
BONUS &lt;br /&gt;
Here's my favorite pre-processor define I found in the list.   &lt;img src="https://www.codeproject.com/script/Forums/Images/smiley_rolleyes.gif" align="top" alt="Roll eyes | :rolleyes:" /&gt;  &lt;br /&gt;
&lt;br /&gt;
&lt;div class='pre-lang' id='premain234181'&gt;&lt;div&gt;C++&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode234181' class='copy-code' data-index='234181' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre234181' style='margin-top:0;' class='lang-cplusplus' data-language='C++' data-allowShrink='True' data-collapse='False'&gt;
&lt;span class="code-preprocessor"&gt;#define __FLT128_DENORM_MIN__ 6.47517511943802511092443895822764655e-4966F128&lt;/span&gt;&lt;/pre&gt;</description>
      <author>raddevus</author>
      <link>https://www.codeproject.com/Messages/6008567/Linux-C-PreProcessor-Who-Knew</link>
      <pubDate>Thu, 04 Jul 2024 16:26:00 GMT</pubDate>
      <guid>3_6008567</guid>
      <subject>Hall Of Shame</subject>
    </item>
    <item>
      <title>Does this scare anyone else?</title>
      <description>In LVGL you can set an image source to either be a file path or a structure.&lt;br /&gt;
&lt;br /&gt;
&lt;div class='pre-lang' id='premain477394'&gt;&lt;div&gt;C++&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode477394' class='copy-code' data-index='477394' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre477394' style='margin-top:0;' class='lang-cplusplus' data-language='C++' data-allowShrink='True' data-collapse='False'&gt;
lv_obj_t* ui_img = lv_img_create(ui_screen);
lv_img_dsc_t img_dsc;
img_dsc.header.always_zero = &lt;span class="code-digit"&gt;0&lt;/span&gt;;
img_dsc.header.cf = LV_IMG_CF_RAW;
img_dsc.header.w = &lt;span class="code-digit"&gt;800&lt;/span&gt;;
img_dsc.header.h = &lt;span class="code-digit"&gt;480&lt;/span&gt;;
img_dsc.data_size = &lt;span class="code-digit"&gt;800&lt;/span&gt;*&lt;span class="code-digit"&gt;480&lt;/span&gt;*LV_COLOR_DEPTH/8;
uint8_t *img_mem = (uint8_t*)ps_malloc(img_dsc.data_size);
img_dsc.data = img_mem;
memset(img_mem,&lt;span class="code-digit"&gt;0&lt;/span&gt;,img_dsc.data_size);
&lt;b&gt;lv_img_set_src(ui_img,&amp;amp;img_dsc);&lt;/b&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
That's one option.&lt;br /&gt;
&lt;br /&gt;
Here's another&lt;br /&gt;
&lt;br /&gt;
&lt;div class='pre-lang' id='premain880018'&gt;&lt;div&gt;C++&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode880018' class='copy-code' data-index='880018' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre880018' style='margin-top:0;' class='lang-cplusplus' data-language='C++' data-allowShrink='True' data-collapse='False'&gt;
lv_obj_t* ui_img = lv_img_create(ui_screen);
&lt;b&gt;lv_img_set_src(ui_img,&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;A:/minou_480.jpg"&lt;/span&gt;);&lt;/b&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
The &lt;code&gt;lv_img_set_src()&lt;/code&gt; function takes a &lt;code&gt;void*&lt;/code&gt; for the second argument and either accepts an instance of a lv_img_dsc_t structure or a string!&lt;br /&gt;
&lt;br /&gt;
Worse, there's no lv_img_dsc_init() function to set the struct to a known state (with for example, a magic cookie in it that can be used to flag it as the structure rather than a string)&lt;br /&gt;
&lt;br /&gt;
Ultimately here's how it checks:&lt;br /&gt;
&lt;div class='pre-lang' id='premain135235'&gt;&lt;div&gt;C++&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode135235' class='copy-code' data-index='135235' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre135235' style='margin-top:0;' class='lang-cplusplus' data-language='C++' data-allowShrink='True' data-collapse='False'&gt;
&lt;span class="code-keyword"&gt;if&lt;/span&gt;(u8_p[&lt;span class="code-digit"&gt;0&lt;/span&gt;] &lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;= &lt;span class="code-digit"&gt;0x20&lt;/span&gt; &amp;amp;&amp;amp; u8_p[&lt;span class="code-digit"&gt;0&lt;/span&gt;] &lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;= &lt;span class="code-digit"&gt;0x7F&lt;/span&gt;)&lt;/pre&gt; where u8_p[0] is the first byte of the source argument.&lt;br /&gt;
&lt;br /&gt;
This is in battle tested production code used in many many devices in the real world.&lt;br /&gt;
&lt;div class="signature"&gt;Check out my IoT graphics library here:&lt;br /&gt;
https://honeythecodewitch.com/gfx&lt;br /&gt;
And my IoT UI/User Experience library here:&lt;br /&gt;
https://honeythecodewitch.com/uix&lt;/div&gt;</description>
      <author>honey the codewitch</author>
      <link>https://www.codeproject.com/Messages/6008512/Does-this-scare-anyone-else</link>
      <pubDate>Thu, 04 Jul 2024 10:44:00 GMT</pubDate>
      <guid>3_6008512</guid>
      <subject>Hall Of Shame</subject>
    </item>
    <item>
      <title>What the hell GCC, again</title>
      <description>Given
&lt;div class='pre-lang' id='premain81270'&gt;&lt;div&gt;C&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode81270' class='copy-code' data-index='81270' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre81270' style='margin-top:0;' class='lang-c' data-language='C' data-allowShrink='True' data-collapse='False'&gt;
&lt;span class="code-keyword"&gt;#include&lt;/span&gt;&lt;span class="code-preprocessor"&gt; &lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;&lt;span class="code-leadattribute"&gt;string.h&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;
&lt;span class="code-keyword"&gt;void&lt;/span&gt; swap(&lt;span class="code-keyword"&gt;char&lt;/span&gt; foo[&lt;span class="code-digit"&gt;10&lt;/span&gt;][&lt;span class="code-digit"&gt;20&lt;/span&gt;], &lt;span class="code-keyword"&gt;int&lt;/span&gt; i1, &lt;span class="code-keyword"&gt;int&lt;/span&gt; i2)
{
    &lt;span class="code-keyword"&gt;if&lt;/span&gt;(i1 != i2)
    {
        &lt;span class="code-keyword"&gt;char&lt;/span&gt; buff[&lt;span class="code-digit"&gt;20&lt;/span&gt;];
        strcpy(buff, foo[i1]);
        strcpy(foo[i1], foo[i2]);
        strcpy(foo[i2], buff);
    }
}&lt;/pre&gt; when compiling with any optimization level above -O0, gcc complains about the second strcpy, saying
&lt;div class='pre-lang' id='premain265630'&gt;&lt;div&gt;&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode265630' class='copy-code' data-index='265630' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre265630' style='margin-top:0;' data-allowShrink='True' data-collapse='False'&gt;
warning: ‘strcpy’ accessing &lt;span class="code-digit"&gt;1&lt;/span&gt; &lt;span class="code-keyword"&gt;byte&lt;/span&gt; at offsets [-4611686018427387904, 4611686018427387903] and [-4611686018427387904, 4611686018427387903] overlaps &lt;span class="code-digit"&gt;1&lt;/span&gt; &lt;span class="code-keyword"&gt;byte&lt;/span&gt; at offset [-4611686018427387904, 199] [-Wrestrict]&lt;/pre&gt;  clang doesn't complain, even at -O3.  I &lt;i&gt;think&lt;/i&gt; what gcc is trying to tell me is that there is an issue when &lt;code&gt;i1 == i2&lt;/code&gt;, even though there's a test to not swap if &lt;code&gt; i1 == i2&lt;/code&gt;!  If I replace &lt;code&gt;i1, i2&lt;/code&gt; with integer values (eg. 1, 2) the warning goes away! Weird.&lt;br /&gt;
So far, the only way I've found to stop gcc from issuing a warning is to use &lt;code&gt;memcpy&lt;/code&gt; instead of &lt;code&gt;strcpy&lt;/code&gt;. Though both have &lt;code&gt;restrict&lt;/code&gt; qualifiers to both arguments.&lt;br /&gt;
Or maybe I'm missing something?&lt;br /&gt;

&lt;div class="signature"&gt;"A little song, a little dance, a little seltzer down your pants"&lt;br /&gt;
Chuckles the clown &lt;/div&gt;</description>
      <author>k5054</author>
      <link>https://www.codeproject.com/Messages/6008309/What-the-hell-GCC-again</link>
      <pubDate>Tue, 02 Jul 2024 21:32:00 GMT</pubDate>
      <guid>3_6008309</guid>
      <subject>Hall Of Shame</subject>
    </item>
    <item>
      <title>Dynamic SQL</title>
      <description>Has anyone ever seen a DB stored procedure where the queries weren't written using SQL, but rather using string concatenation to build the queries, and then submitting the queries with the EXEC command?&lt;br /&gt;
&lt;br /&gt;
I can't think of a more horrifically error-prone way of coding in T-SQL. But I see this from a prominent maker of Warehouse Management Systems.&lt;br /&gt;
&lt;br /&gt;
The first time I ever saw that, I was taken aback because I couldn't understand why anyone would do that. But then I saw that it was done so that the queries could be written to target different databases, tables, and columns depending upon the values of local variables. &lt;br /&gt;
&lt;br /&gt;
So even something as weird and wonderful as that has a use. I wonder if any other RDMS has a more elegant solution?&lt;br /&gt;
&lt;br /&gt;
EDIT:&lt;br /&gt;
&lt;br /&gt;
I realize that the queries could still be written using regular T-SQL, but in a more structured way. But I see that this strange practice waas done for the sake of simpler, straight-line code.&lt;br /&gt;
&lt;div class="signature"&gt;The difficult we do right away...&lt;br /&gt;
...the impossible takes slightly longer.&lt;/div&gt;</description>
      <author>Richard Andrew x64</author>
      <link>https://www.codeproject.com/Messages/6008021/Dynamic-SQL</link>
      <pubDate>Sun, 30 Jun 2024 19:43:00 GMT</pubDate>
      <guid>3_6008021</guid>
      <subject>Hall Of Shame</subject>
    </item>
    <item>
      <title>How, VS Code? This is amazing.</title>
      <description>The intellisense for C++ in VS Code - at least when it works, is nothing short of incredible.&lt;br /&gt;
&lt;br /&gt;
&lt;div class='pre-lang' id='premain636642'&gt;&lt;div&gt;C++&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode636642' class='copy-code' data-index='636642' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre636642' style='margin-top:0;' class='lang-cplusplus' data-language='C++' data-allowShrink='True' data-collapse='False'&gt;
&lt;span class="code-keyword"&gt;template&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;&lt;span class="code-sdkkeyword"&gt;size_t&lt;/span&gt; BitDepth&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="code-keyword"&gt;using&lt;/span&gt; bgrx_pixel = pixel&lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;
	channel_traits&lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;channel_name::B,(BitDepth/4)&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;,
    channel_traits&lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;channel_name::G,((BitDepth/4)+(BitDepth%4))&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;,
    channel_traits&lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;channel_name::R,(BitDepth/4)&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;,
	channel_traits&lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;channel_name::nop,(BitDepth/4)&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;    
&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;;

&lt;span class="code-keyword"&gt;using&lt;/span&gt; rgb18_pixel = pixel&lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;
    channel_traits&lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;channel_name::R,&lt;span class="code-digit"&gt;6&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;,
    channel_traits&lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;channel_name::nop,&lt;span class="code-digit"&gt;2&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;,
    channel_traits&lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;channel_name::G,&lt;span class="code-digit"&gt;6&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;,
    channel_traits&lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;channel_name::nop,&lt;span class="code-digit"&gt;2&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;,
    channel_traits&lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;channel_name::B,&lt;span class="code-digit"&gt;6&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;,
    channel_traits&lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;channel_name::nop,&lt;span class="code-digit"&gt;2&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
What you're looking at is two arbitrarily defined pixels. One is N-bit pixel where 3/4 of the bits are used, and the second example is a 24-bit pixel where 18-bits are used.&lt;br /&gt;
&lt;br /&gt;
That's not really important, but the channel names are, because consider this:&lt;br /&gt;
&lt;br /&gt;
&lt;div class='pre-lang' id='premain752734'&gt;&lt;div&gt;C++&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode752734' class='copy-code' data-index='752734' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre752734' style='margin-top:0;' class='lang-cplusplus' data-language='C++' data-allowShrink='True' data-collapse='False'&gt;
rgb18_pixel::is_color_model&lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;
            channel_name::R,
            channel_name::G,
            channel_name::B&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;::value&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
If you know C++ you can tell there's metaprogramming magic here. What I'm doing is querying a "list" of channel traits at compile time looking for ones with particular names.&lt;br /&gt;
&lt;br /&gt;
The thing is, if you hover over value, the extension will resolve it to true in the tooltip that pops up - no easy feat.&lt;br /&gt;
&lt;br /&gt;
More impressive even is this:&lt;br /&gt;
&lt;br /&gt;
&lt;div class='pre-lang' id='premain170974'&gt;&lt;div&gt;C++&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode170974' class='copy-code' data-index='170974' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre170974' style='margin-top:0;' class='lang-cplusplus' data-language='C++' data-allowShrink='True' data-collapse='False'&gt;
&lt;span class="code-keyword"&gt;using&lt;/span&gt; color18_t = color&lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;rgb18_pixel&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;;
&lt;span class="code-keyword"&gt;auto&lt;/span&gt; px = color18_t::gray;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
It will determine the actual numeric value for that color and display it when you hover over "gray"&lt;br /&gt;
(2155905024)&lt;br /&gt;
&lt;br /&gt;
You think that's easy? No.&lt;br /&gt;
&lt;br /&gt;
&lt;div class='pre-lang' id='premain580199'&gt;&lt;div&gt;C++&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode580199' class='copy-code' data-index='580199' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre580199' style='margin-top:0;' class='lang-cplusplus' data-language='C++' data-allowShrink='True' data-collapse='False'&gt;
&lt;span class="code-keyword"&gt;constexpr&lt;/span&gt; &lt;span class="code-keyword"&gt;static&lt;/span&gt; &lt;span class="code-keyword"&gt;const&lt;/span&gt; PixelType gray = convert&lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;source_type,PixelType&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;(color&lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;PixelType&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;::source_type(&lt;span class="code-keyword"&gt;true&lt;/span&gt;, 
    &lt;span class="code-digit"&gt;0&lt;/span&gt;.&lt;span class="code-digit"&gt;501960784313725&lt;/span&gt;, 
    &lt;span class="code-digit"&gt;0&lt;/span&gt;.&lt;span class="code-digit"&gt;501960784313725&lt;/span&gt;, 
    &lt;span class="code-digit"&gt;0&lt;/span&gt;.&lt;span class="code-digit"&gt;501960784313725&lt;/span&gt;));&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Notice it's running a constexpr function &lt;code&gt;convert()&lt;/code&gt; to get the destination pixel format. This is a non-trivial function.&lt;br /&gt;
&lt;br /&gt;
So one of two things is happening here.&lt;br /&gt;
&lt;br /&gt;
Either the C++ extension for VS Code has a compliant C++ compiler front and middle built in (I suspect it does) or it is managing to link itself to existing compilers like GCC tightly enough to determine this output (which doesn't seem possible to me)&lt;br /&gt;
&lt;br /&gt;
Either way, go Microsoft.&lt;br /&gt;
&lt;div class="signature"&gt;Check out my IoT graphics library here:&lt;br /&gt;
https://honeythecodewitch.com/gfx&lt;br /&gt;
And my IoT UI/User Experience library here:&lt;br /&gt;
https://honeythecodewitch.com/uix&lt;/div&gt;</description>
      <author>honey the codewitch</author>
      <link>https://www.codeproject.com/Messages/6006845/How-VS-Code-This-is-amazing</link>
      <pubDate>Sun, 23 Jun 2024 00:51:00 GMT</pubDate>
      <guid>3_6006845</guid>
      <subject>Hall Of Shame</subject>
    </item>
    <item>
      <title>What the hell gcc?</title>
      <description>&lt;div class='pre-lang' id='premain66144'&gt;&lt;div&gt;C++&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode66144' class='copy-code' data-index='66144' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre66144' style='margin-top:0;' class='lang-cplusplus' data-language='C++' data-allowShrink='True' data-collapse='False'&gt;
&lt;span class="code-keyword"&gt;float&lt;/span&gt; mpu6886::inv_sqrt(&lt;span class="code-keyword"&gt;float&lt;/span&gt; x) {
    &lt;span class="code-keyword"&gt;float&lt;/span&gt; halfx = &lt;span class="code-digit"&gt;0&lt;/span&gt;.&lt;span class="code-digit"&gt;5f&lt;/span&gt; * x;
    &lt;span class="code-keyword"&gt;float&lt;/span&gt; y     = x;
&lt;span class="code-comment"&gt;// required, or "y is unintialized":
&lt;/span&gt;&lt;span class="code-preprocessor"&gt;#pragma GCC diagnostic ignored "-Wuninitialized"
&lt;/span&gt;&lt;span class="code-preprocessor"&gt;#pragma GCC diagnostic ignored "-Wstrict-aliasing"
&lt;/span&gt;    &lt;span class="code-keyword"&gt;long&lt;/span&gt; i = *(&lt;span class="code-keyword"&gt;long&lt;/span&gt; *)&amp;amp;y;
    i      = &lt;span class="code-digit"&gt;0x5f3759df&lt;/span&gt; - (i &lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt; &lt;span class="code-digit"&gt;1&lt;/span&gt;);
    y      = *(&lt;span class="code-keyword"&gt;float&lt;/span&gt; *)&amp;amp;i;
&lt;span class="code-preprocessor"&gt;#pragma GCC diagnostic warning "-Wuninitialized"
&lt;/span&gt;&lt;span class="code-preprocessor"&gt;#pragma GCC diagnostic warning "-Wstrict-aliasing"
&lt;/span&gt;    y = y * (&lt;span class="code-digit"&gt;1&lt;/span&gt;.&lt;span class="code-digit"&gt;5f&lt;/span&gt; - (halfx * y * y));
    &lt;span class="code-keyword"&gt;return&lt;/span&gt; y;
}&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Tell me how y is uninitialized? This isn't the first time I've encountered this. &lt;img src="https://codeproject.freetls.fastly.net/script/Forums/Images/smiley_squeamish.gif" align="top" alt="Unsure | :~" /&gt; &lt;br /&gt;
&lt;div class="signature"&gt;Check out my IoT graphics library here:&lt;br /&gt;
https://honeythecodewitch.com/gfx&lt;br /&gt;
And my IoT UI/User Experience library here:&lt;br /&gt;
https://honeythecodewitch.com/uix&lt;/div&gt;</description>
      <author>honey the codewitch</author>
      <link>https://www.codeproject.com/Messages/6006078/What-the-hell-gcc</link>
      <pubDate>Tue, 18 Jun 2024 07:20:00 GMT</pubDate>
      <guid>3_6006078</guid>
      <subject>Hall Of Shame</subject>
    </item>
    <item>
      <title>WTF-8</title>
      <description>Reviewing a CSV file today (which already has inconsistent quotes and such), I noticed it has a few characters (e.g. non-breaking space) encoded as UTF-8 -- fine, no big deal. But they still look odd after decoding... ah, they're encoded as UTF-8 &lt;i&gt;twice&lt;/i&gt;... &lt;b&gt;double&lt;/b&gt;-UTF-8. &lt;img src="https://codeproject.freetls.fastly.net/script/Forums/Images/smiley_doh.gif" align="top" alt="D'Oh! | :doh:" /&gt;  &lt;br /&gt;
&lt;br /&gt;
So now I have to write a recursive UTF-8 decoder... &lt;img src="https://codeproject.freetls.fastly.net/script/Forums/Images/smiley_sigh.gif" align="top" alt="Sigh | :sigh:" /&gt;   Why doesn't .net simply do that to begin with? &lt;img src="https://codeproject.freetls.fastly.net/script/Forums/Images/smiley_mad.gif" align="top" alt="Mad | :mad:" /&gt;  &lt;small&gt; &amp;lt;&amp;lt;== That's a rhetorical question. &lt;/small&gt;&lt;br /&gt;
&lt;br /&gt;
It'll be breakfast at Milliways again.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Edit: 4/20 -- I have a working recursive UTF-8 decoding algorithm, in a custom decoder for a custom encoding (derived from the built-in UTF-8 encoding, so encoding should be as per normal).&lt;br /&gt;
&lt;br /&gt;
What was unexpected was that the &lt;code&gt;GetString&lt;/code&gt; method of the encoding didn't call the custom Decoder.&lt;br /&gt;
I just had a look at the refercence code GetString and I see:&lt;br /&gt;
&lt;br /&gt;
&lt;div class='pre-lang' id='premain903268'&gt;&lt;div&gt;C#&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode903268' class='copy-code' data-index='903268' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre903268' style='margin-top:0;' class='lang-csharp' data-language='C#' data-allowShrink='True' data-collapse='False'&gt;
&lt;span class="code-comment"&gt;//&lt;/span&gt;&lt;span class="code-comment"&gt; Returns a string containing the decoded representation of a range of&lt;/span&gt;
&lt;span class="code-comment"&gt;//&lt;/span&gt;&lt;span class="code-comment"&gt; bytes in a byte array.&lt;/span&gt;
&lt;span class="code-comment"&gt;//&lt;/span&gt;&lt;span class="code-comment"&gt;&lt;/span&gt;
&lt;span class="code-comment"&gt;//&lt;/span&gt;&lt;span class="code-comment"&gt; Internally we override this for performance&lt;/span&gt;
&lt;span class="code-comment"&gt;//&lt;/span&gt;&lt;span class="code-comment"&gt;&lt;/span&gt;
[Pure]
&lt;span class="code-keyword"&gt;public&lt;/span&gt; &lt;span class="code-keyword"&gt;virtual&lt;/span&gt; &lt;span class="code-sdkkeyword"&gt;String&lt;/span&gt; GetString(byte[] bytes, &lt;span class="code-keyword"&gt;int&lt;/span&gt; index, &lt;span class="code-keyword"&gt;int&lt;/span&gt; count)
{
    &lt;span class="code-keyword"&gt;return&lt;/span&gt; &lt;span class="code-keyword"&gt;new&lt;/span&gt; &lt;span class="code-sdkkeyword"&gt;String&lt;/span&gt;(GetChars(bytes, index, count));
}
&lt;/pre&gt;&lt;br /&gt;
Does that mean that it doesn't actually use my decoder?&lt;br /&gt;
Shouldn't it call &lt;code&gt;GetDecoder()&lt;/code&gt; and use that decoder?&lt;br /&gt;
(I'm not experienced at reading the reference source.)&lt;br /&gt;
I'll get back to it on Monday.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Edit: 4/21 -- Reading some more about UTF-8 on the 'pedia, I see:&lt;br /&gt;
&lt;br /&gt;
&lt;div class='pre-lang' id='premain870798'&gt;&lt;div&gt; &lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode870798' class='copy-code' data-index='870798' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre870798' style='margin-top:0;' data-language='text' data-allowShrink='True' data-collapse='False'&gt;
The Unicode Standard requires decoders to
"... treat any ill-formed code unit sequence as an error condition. This guarantees that it will neither interpret nor emit an ill-formed code unit sequence."&lt;/pre&gt;&lt;br /&gt;
and&lt;br /&gt;
&lt;div class='pre-lang' id='premain510652'&gt;&lt;div&gt; &lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode510652' class='copy-code' data-index='510652' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre510652' style='margin-top:0;' data-language='text' data-allowShrink='True' data-collapse='False'&gt;
The standard also recommends replacing each error with the replacement character "�" (U+FFFD).&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Which I choose not to do...&lt;br /&gt;
&lt;br /&gt;
&lt;div class='pre-lang' id='premain809753'&gt;&lt;div&gt; &lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode809753' class='copy-code' data-index='809753' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre809753' style='margin-top:0;' data-language='text' data-allowShrink='True' data-collapse='False'&gt;
These recommendations are not often followed.&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
But it makes me think that the few &lt;code&gt;U+FFFD&lt;/code&gt; characters I see in the file may have begun as unencoded characters which were errantly read with a UTF-8 decoder. Which means that the file I have is in even worse condition than I thought.&lt;br /&gt;
Anyway, my current decoder is quite permissive in what it accepts -- preferring not to throw exceptions, but rather pass any errant bytes along to the caller. I will likely alter that next week.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Edit: 4/22 -- A rough logic diagram of my algorithm.&lt;br /&gt;
&lt;div class='pre-lang' id='premain132760'&gt;&lt;div&gt; &lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode132760' class='copy-code' data-index='132760' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre132760' style='margin-top:0;' data-language='text' data-allowShrink='True' data-collapse='False'&gt;
         --------------------------------------------------------------------
         | My custom Decoder                                                |
         |                                                                  |
bytes ---------&amp;gt; Is UTF-8 encoded multi-byte?---NO----------------------------- chars --&amp;gt;
         |   ^                              |                               |
         |   |                              |    --------------------       |
         |   |                              |    |                  |       |
         |   |                              YES----&amp;gt; UTF-8 decoder ----V    |
         |   |                                   |__________________|  |    |
         |   |                                                         |    |
         |   ^---------------------------------------------------------&amp;lt;    |
         |                                                                  |
         |__________________________________________________________________|&lt;/pre&gt;&lt;br /&gt;
The thing to remember is that the UTF-8 Decoder will only ever be presented with byte sequences which are (or appear to be) valid UTF-8 encoded multi-byte characters. Anything else is passed along unchanged, this includes single-byte UTF-8 encoded characters.&lt;br /&gt;
&lt;br /&gt;
I may need to implement a UTF-8 Encoder which won't double-encode UTF-8 characters.</description>
      <author>PIEBALDconsult</author>
      <link>https://www.codeproject.com/Messages/6006063/WTF-8</link>
      <pubDate>Tue, 18 Jun 2024 04:40:00 GMT</pubDate>
      <guid>3_6006063</guid>
      <subject>Hall Of Shame</subject>
    </item>
    <item>
      <title>.NET Core &amp;amp; (auto)binding: Is it a bug?</title>
      <description>My career seems to be entirely described by the following:&lt;br /&gt;
&lt;br /&gt;
"Use a &lt;i&gt;simple&lt;/i&gt; technology to do a thing that 80% of Devs take for granted and who also tell you it works, but discovering that the thing doesn't actually work the way they say it works."&lt;br /&gt;
&lt;br /&gt;
Here's the latest. I will try to keep it short (because I'm going to write an article on it, but I can't wait to share this one because it is so weird (from multiple angles)).&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;1) JavaScript FormData Posted To Backend Is All Strings&lt;/b&gt;&lt;br /&gt;
Mabye a lot of you know this, but all of the values in the following (real) example end up being strings when they get to the backend.&lt;br /&gt;
&lt;br /&gt;
&lt;div class='pre-lang' id='premain505835'&gt;&lt;div&gt;JavaScript&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode505835' class='copy-code' data-index='505835' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre505835' style='margin-top:0;' class='lang-javascript' data-language='Javascript' data-allowShrink='True' data-collapse='False'&gt;
&lt;span class="code-comment"&gt;//&lt;/span&gt;&lt;span class="code-comment"&gt;first notice that I&amp;#39;m appending two items to the formData.&lt;/span&gt;
&lt;span class="code-comment"&gt;//&lt;/span&gt;&lt;span class="code-comment"&gt; 1. string uuid&lt;/span&gt;
&lt;span class="code-comment"&gt;//&lt;/span&gt;&lt;span class="code-comment"&gt; 2. journalEntry object with numerous values&lt;/span&gt;

&lt;span class="code-keyword"&gt;var&lt;/span&gt; formData = &lt;span class="code-keyword"&gt;new&lt;/span&gt; FormData();
formData.append(&lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;uuid"&lt;/span&gt;,currentUuid);

&lt;span class="code-keyword"&gt;var&lt;/span&gt; entryId = &lt;span class="code-digit"&gt;9&lt;/span&gt;;
&lt;span class="code-keyword"&gt;var&lt;/span&gt; jentry = {
        Id:entryId,
        Title: titleText,
        Note: noteText,
        Created: createdDate,
        Updated: &lt;span class="code-keyword"&gt;null&lt;/span&gt;
    };

&lt;span class="code-comment"&gt;//&lt;/span&gt;&lt;span class="code-comment"&gt; You have to do this weird thing to add the data to FormData.&lt;/span&gt;

 &lt;span class="code-keyword"&gt;for&lt;/span&gt; (&lt;span class="code-keyword"&gt;var&lt;/span&gt; key &lt;span class="code-keyword"&gt;in&lt;/span&gt; jentry) {
        formData.append(key, jentry[key]);
   }&lt;/pre&gt;&lt;b&gt;Odd, But Acceptable&lt;/b&gt;&lt;br /&gt;
Ok, so the point of that is that all of the values in the jentry object are converted to string values.  That means Updated = "null" (string) and the Id = "9".  &lt;br /&gt;
This is odd, to me, but acceptable.&lt;br /&gt;
If you refute this, please provide citations.  I've searched far &amp;amp; wide and asked Copilot -- all says they are strings when they hit the backend.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Now It Gets Real Weird&lt;/b&gt;&lt;br /&gt;
My WebAPI method which gets called by the JS Fetch with the previously shown FormData looks like:&lt;br /&gt;
&lt;br /&gt;
&lt;div class='pre-lang' id='premain524999'&gt;&lt;div&gt;C#&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode524999' class='copy-code' data-index='524999' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre524999' style='margin-top:0;' class='lang-csharp' data-language='C#' data-allowShrink='True' data-collapse='False'&gt;
&lt;span class="code-keyword"&gt;public&lt;/span&gt; ActionResult Save([FromForm] &lt;span class="code-sdkkeyword"&gt;String&lt;/span&gt; uuid,[FromForm] JournalEntry jentry)&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;AutoBinding In .NET Core Works With JS Fetch&lt;/b&gt;&lt;br /&gt;
1. The JS Fetch works.  &lt;br /&gt;
2. The C# JournalEntry is created from the data posted via the FormData variables.&lt;br /&gt;
3. I can examine the data in the C# JournalEntry object and (almost) everything looks fine.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Autobinding Ignores The Id Value!&lt;/b&gt;&lt;br /&gt;
However, at some point I needed the Id value which was being passed in.&lt;br /&gt;
But I noticed that the Id value in the C# object was &lt;b&gt;always ZERO Id = 0&lt;/b&gt;.&lt;br /&gt;
&lt;b&gt;FormData Value Is Non-Zero, But Autobound Object Is 0&lt;/b&gt;&lt;br /&gt;
But, keep in mind that the FormData object shown above is passing in a non-zero value for Id (9 in the example.&lt;br /&gt;
&lt;br /&gt;
What!?!&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Why Is This Happening?&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
The only thing I could guess is that since the Id value (from the FormData) was being passed as a String that the autobinding just ignores the value and sets it to 0.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Here's How My C# Object (Used for Autobinding) Is Defined&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class='pre-lang' id='premain762513'&gt;&lt;div&gt;C#&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode762513' class='copy-code' data-index='762513' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre762513' style='margin-top:0;' class='lang-csharp' data-language='C#' data-allowShrink='True' data-collapse='False'&gt;
&lt;span class="code-keyword"&gt;public&lt;/span&gt; &lt;span class="code-keyword"&gt;class&lt;/span&gt; JournalEntry{
    &lt;span class="code-keyword"&gt;public&lt;/span&gt; &lt;span class="code-sdkkeyword"&gt;Int64&lt;/span&gt; Id{&lt;span class="code-keyword"&gt;get&lt;/span&gt;;&lt;span class="code-keyword"&gt;set&lt;/span&gt;;}
    &lt;span class="code-keyword"&gt;public&lt;/span&gt; &lt;span class="code-sdkkeyword"&gt;String&lt;/span&gt;? Title{&lt;span class="code-keyword"&gt;get&lt;/span&gt;;&lt;span class="code-keyword"&gt;set&lt;/span&gt;;}
    &lt;span class="code-keyword"&gt;public&lt;/span&gt; &lt;span class="code-sdkkeyword"&gt;String&lt;/span&gt; Note{&lt;span class="code-keyword"&gt;get&lt;/span&gt;;&lt;span class="code-keyword"&gt;set&lt;/span&gt;;}
    &lt;span class="code-keyword"&gt;public&lt;/span&gt; &lt;span class="code-sdkkeyword"&gt;String&lt;/span&gt; Created{&lt;span class="code-keyword"&gt;get&lt;/span&gt;;&lt;span class="code-keyword"&gt;set&lt;/span&gt;;}
    &lt;span class="code-keyword"&gt;public&lt;/span&gt; &lt;span class="code-sdkkeyword"&gt;String&lt;/span&gt;? Updated{&lt;span class="code-keyword"&gt;get&lt;/span&gt;;&lt;span class="code-keyword"&gt;set&lt;/span&gt;;}
}&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Yes, the point is that the Id is an Int64 (not a string).&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;This Part Should Alarm You!!!  This Should Be The Bug&lt;/b&gt;&lt;br /&gt;
So, somehow the autobinder is able to bind the JournalEntry to the FormData object but it just ignores the Id value and sets it to 0!!!!  &lt;br /&gt;
&lt;br /&gt;
Why?? !! Please someone explain it to me.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;A "Workaround" Test&lt;/b&gt;&lt;br /&gt;
I altered my JournalEntry class so the Id is a String &lt;br /&gt;
&lt;div class='pre-lang' id='premain758904'&gt;&lt;div&gt;C#&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode758904' class='copy-code' data-index='758904' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre758904' style='margin-top:0;' class='lang-csharp' data-language='C#' data-allowShrink='True' data-collapse='False'&gt;
&lt;span class="code-keyword"&gt;public&lt;/span&gt; &lt;span class="code-keyword"&gt;class&lt;/span&gt; JournalEntry{
    &lt;span class="code-keyword"&gt;public&lt;/span&gt; &lt;span class="code-sdkkeyword"&gt;String&lt;/span&gt; Id{&lt;span class="code-keyword"&gt;get&lt;/span&gt;;&lt;span class="code-keyword"&gt;set&lt;/span&gt;;}
   &lt;span class="code-comment"&gt;//&lt;/span&gt;&lt;span class="code-comment"&gt; ....snip....&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
and posted the data again.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Autobinder Works!  What?!&lt;/b&gt;&lt;br /&gt;
After that change, the autobinder sets the Id value properly (non-zero value that is read from FormData). &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Not What I Expected&lt;/b&gt;&lt;br /&gt;
This is not what I expected.  &lt;b&gt;JSON data is _supposed_ to get autobound to the C# object, right?&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Just Binds the Parts It Wants To Bind?&lt;/b&gt;&lt;br /&gt;
It's weird because it doesn't fail to bind it just skips parts of the object that it wants to skip.&lt;br /&gt;
I could accept it if it failed to bind because it was the wrong type. &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Article Is Coming Later Today&lt;/b&gt;&lt;br /&gt;
This was long but I will be writing it up in an article with associated examples and an example project you'll be able to download and try for yourself.</description>
      <author>raddevus</author>
      <link>https://www.codeproject.com/Messages/6005830/NET-Core-amp-auto-binding-Is-it-a-bug</link>
      <pubDate>Sun, 16 Jun 2024 15:15:00 GMT</pubDate>
      <guid>3_6005830</guid>
      <subject>Hall Of Shame</subject>
    </item>
    <item>
      <title>Untested Backups with IonicZip</title>
      <description>Over a decade ago, I wrote a SQL Server backup/rotation manager. Backups are zipped and password protected using IonicZip, then copied to a local repository on another disk, and optionally pushed out to an FTP resource. This is handy for when I find myself working on the laptop away from the home/office. This system has been used on multiple servers without issues.&lt;br /&gt;
&lt;br /&gt;
A couple of weeks ago, I started using it on a newish Azure VM for one of our latest projects to manage 2 customer databases. It appeared to be working fine...backups/zips/copies all getting created with no errors...or so I thought. Yesterday, I was away from the office and decided to grab the previous day's backups and restore them on my laptop. Using 7-zip, the zips extracted, but with a CRC error detected. &lt;img src="https://www.codeproject.com/script/Forums/Images/smiley_confused.gif" align="top" alt="Confused | :confused:" /&gt;  Of course, the backups were useless. Native windows zip refused to extract anything, failing with a generic error message. 'unrecognized error'.  &lt;img src="https://www.codeproject.com/script/Forums/Images/smiley_WTF.gif" align="top" alt="WTF | :WTF:" /&gt;  Every backup from that system was corrupted!  &lt;img src="https://www.codeproject.com/script/Forums/Images/smiley_OMG.gif" align="top" alt="OMG | :OMG:" /&gt;  &lt;br /&gt;
&lt;br /&gt;
Backups from the other 2 systems are/were fine...one of the other systems is also an Azure VM with practically identical setups and has been working fine for years. &lt;img src="https://www.codeproject.com/script/Forums/Images/smiley_confused.gif" align="top" alt="Confused | :confused:" /&gt; &lt;br /&gt;
&lt;br /&gt;
I'll skip the troubleshooting details and get to the fix. IonicZip has a property that I had never heard of before, and which until now had not been important: &lt;b&gt;ParallelDeflateThreshold&lt;/b&gt; which needed to be set to -1. Doing so fixed the problem. If I understand correctly, IonicZip has a known problem with files that compress to &amp;lt; 4MB. In my case, mine were slightly over 2MB compressed. All of my other backups are much larger which is perhaps the reason why I've never seen this problem before.&lt;br /&gt;
&lt;br /&gt;
At any rate, I wanted to post this here in case someone else here is using this component and not aware of this issue. The bottom line is, test your backups!  &lt;img src="https://www.codeproject.com/script/Forums/Images/smiley_laugh.gif" align="top" alt="Laugh | :laugh:" /&gt;  Have a great weekend!  &lt;img src="https://www.codeproject.com/script/Forums/Images/smiley_smile.gif" align="top" alt="Smile | :)" /&gt; &lt;br /&gt;
&lt;div class="signature"&gt;"Go forth into the source" - Neal Morse&lt;br /&gt;
"Hope is contagious"&lt;/div&gt;</description>
      <author>kmoorevs</author>
      <link>https://www.codeproject.com/Messages/6003757/Untested-Backups-with-IonicZip</link>
      <pubDate>Sun, 02 Jun 2024 15:30:00 GMT</pubDate>
      <guid>3_6003757</guid>
      <subject>Hall Of Shame</subject>
    </item>
    <item>
      <title>Looking at the very topmost line ...</title>
      <description>... it occurred to me: What if CP itself, or any subsystem employed, has chosen to use the top 8 bits e.g. to flag privileges or other user properties, leaving only 24 bits for the member number?&lt;br /&gt;
&lt;div class="signature"&gt;Religious freedom is the freedom to say that two plus two make five.&lt;/div&gt;</description>
      <author>trønderen</author>
      <link>https://www.codeproject.com/Messages/6003681/Looking-at-the-very-topmost-line</link>
      <pubDate>Sat, 01 Jun 2024 21:21:00 GMT</pubDate>
      <guid>3_6003681</guid>
      <subject>Hall Of Shame</subject>
    </item>
    <item>
      <title>Blessed endian mismatches collide with progress</title>
      <description>Almost all embedded MCUs are little endian.&lt;br /&gt;
Almost all display controllers that can connect to them are big endian.&lt;br /&gt;
&lt;br /&gt;
My graphics library builds pixels in big endian order on little endian machines as a consequence. It's just more efficient.&lt;br /&gt;
&lt;br /&gt;
LVGL is another embedded graphics library - one I contribute to - and they removed a feature on version 9+ where you could set it to swap the bytes on a 16 bit color value. This is to compensate for the endian issues.&lt;br /&gt;
&lt;br /&gt;
Not swapping during the draw operation means you need to scan and rearrange the transfer buffer before you send it to the display.&lt;br /&gt;
&lt;br /&gt;
&lt;div class='pre-lang' id='premain229732'&gt;&lt;div&gt;C++&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode229732' class='copy-code' data-index='229732' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre229732' style='margin-top:0;' class='lang-cplusplus' data-language='C++' data-allowShrink='True' data-collapse='False'&gt;
evoid lcd_flush_display( lv_display_t *disp, &lt;span class="code-keyword"&gt;const&lt;/span&gt; lv_area_t *area, uint8_t * px_map) {
    &lt;span class="code-sdkkeyword"&gt;size_t&lt;/span&gt; count = (area-&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;x2-area-&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;x1+1)*(area-&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;y2-area-&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;y1+1);
    &lt;span class="code-keyword"&gt;for&lt;/span&gt;(&lt;span class="code-keyword"&gt;int&lt;/span&gt; i = &lt;span class="code-digit"&gt;0&lt;/span&gt;;i&lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;count;++i) {
        uint16_t* p = &amp;amp;((uint16_t*)px_map)[i];
        *p = ((*p&lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt;&lt;span class="code-digit"&gt;8&lt;/span&gt;)&amp;amp;0xFF00)|((*p&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;&lt;span class="code-digit"&gt;8&lt;/span&gt;)&amp;amp;0xFF);
    }
    esp_lcd_panel_draw_bitmap(lcd_handle,area-&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;x1,area-&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;y1,area-&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;x2+1,area-&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;y2+1,px_map);
    LV_UNUSED(disp);
}&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
This is less efficient. It's also ugly. This is what's for dinner now in LVGL. This is "progress".&lt;br /&gt;
&lt;br /&gt;
The worst part is I understand and even sort of agree with why they did it.&lt;br /&gt;
&lt;br /&gt;
The issue is multiple displays, and the fact that some displays may not need the swap, perhaps because they're monochrome or something. Previously prior to 8 LVGL simply didn't support that scenario because the swap option was a &lt;code&gt;#define&lt;/code&gt; (LVGL is C, not C++) and it applied to all displays as a consequence.&lt;br /&gt;
&lt;br /&gt;
But to remove it entirely seems like it was a decision guided by expediency more than anything. It's unfortunate.&lt;br /&gt;
&lt;br /&gt;
And all of it reminds me of why I hate the fact that humans couldn't universally agree on endian order.&lt;br /&gt;
&lt;div class="signature"&gt;Check out my IoT graphics library here:&lt;br /&gt;
https://honeythecodewitch.com/gfx&lt;br /&gt;
And my IoT UI/User Experience library here:&lt;br /&gt;
https://honeythecodewitch.com/uix&lt;/div&gt;</description>
      <author>honey the codewitch</author>
      <link>https://www.codeproject.com/Messages/6003671/Blessed-endian-mismatches-collide-with-progress</link>
      <pubDate>Sat, 01 Jun 2024 17:30:00 GMT</pubDate>
      <guid>3_6003671</guid>
      <subject>Hall Of Shame</subject>
    </item>
    <item>
      <title>implementing interface method, same signature, from two interfaces</title>
      <description>Here's a little test for you.&lt;br /&gt;
&lt;br /&gt;
Does this code compile?&lt;br /&gt;
&lt;div class='pre-lang' id='premain806438'&gt;&lt;div&gt;C#&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode806438' class='copy-code' data-index='806438' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre806438' style='margin-top:0;' class='lang-csharp' data-language='C#' data-allowShrink='True' data-collapse='False'&gt;
&lt;span class="code-keyword"&gt;public&lt;/span&gt; &lt;span class="code-keyword"&gt;interface&lt;/span&gt; IStorage{
    &lt;span class="code-keyword"&gt;int&lt;/span&gt; Save();
}

&lt;span class="code-keyword"&gt;public&lt;/span&gt; &lt;span class="code-keyword"&gt;interface&lt;/span&gt; IPersist{
    &lt;span class="code-keyword"&gt;int&lt;/span&gt; Save();
}

&lt;span class="code-keyword"&gt;public&lt;/span&gt; &lt;span class="code-keyword"&gt;class&lt;/span&gt; SaveImplementor : IStorage, IPersist{
    &lt;span class="code-keyword"&gt;public&lt;/span&gt; &lt;span class="code-keyword"&gt;int&lt;/span&gt; Save(){
        &lt;span class="code-keyword"&gt;return&lt;/span&gt; &lt;span class="code-digit"&gt;1&lt;/span&gt;;
    }
}&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
I'm implementing two interfaces which contain the same virtual method signature. &lt;br /&gt;
&lt;br /&gt;
Well, it seems a little odd to me.&lt;br /&gt;
&lt;br /&gt;
Obviously, if you want the separate implementations you have to write them explicitly. &lt;br /&gt;
&lt;br /&gt;
Like this:&lt;br /&gt;
&lt;br /&gt;
&lt;div class='pre-lang' id='premain618433'&gt;&lt;div&gt;C#&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode618433' class='copy-code' data-index='618433' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre618433' style='margin-top:0;' class='lang-csharp' data-language='C#' data-allowShrink='True' data-collapse='False'&gt;
&lt;span class="code-keyword"&gt;public&lt;/span&gt; &lt;span class="code-keyword"&gt;class&lt;/span&gt; SaveImplementor : IStorage, IPersist{

    &lt;span class="code-keyword"&gt;int&lt;/span&gt; IStorage.Save(){
        &lt;span class="code-keyword"&gt;return&lt;/span&gt; &lt;span class="code-digit"&gt;1&lt;/span&gt;;
    }

    &lt;span class="code-keyword"&gt;int&lt;/span&gt; IPersist.Save(){
        &lt;span class="code-keyword"&gt;return&lt;/span&gt; &lt;span class="code-digit"&gt;2&lt;/span&gt;;
    }
}&lt;/pre&gt;&lt;br /&gt;
&lt;b&gt;IMPORTANT NOTE&lt;/b&gt;: Notice that in the first example you HAVE to include the &lt;code&gt;public&lt;/code&gt; modifier on the method implementation.&lt;br /&gt;
&lt;br /&gt;
HOWEVER, on the second example where you explicitly implement the Interface method you &lt;b&gt;CANNOT include&lt;/b&gt; the &lt;code&gt;public&lt;/code&gt; modifier.&lt;br /&gt;
&lt;br /&gt;
I'm filing this one under weird.  &lt;br /&gt;
&lt;br /&gt;
But, I guess I accept it.  I have to, or else the C# compiler doesn't accept me.   &lt;img src="https://codeproject.global.ssl.fastly.net/script/Forums/Images/smiley_rolleyes.gif" align="top" alt="Roll eyes | :rolleyes:" /&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Answer&lt;/b&gt; - The first example does indeed compile.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;EDIT&lt;/b&gt; &lt;br /&gt;
&lt;br /&gt;
Oh, and after I posted that, I went back and new'd up a &lt;code&gt;SaveImplementor()&lt;/code&gt; and then I couldn't figure out how to call either of those explicit methods.  &lt;br /&gt;
Hmm... It's got me thinking now.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;EDIT 2&lt;/b&gt;&lt;br /&gt;
Here's the simple example that explains the explicit implementation: &lt;a href="https://learn.microsoft.com/en-us/dotnet/csharp/programming-guide/interfaces/explicit-interface-implementation"&gt;Explicit Interface Implementation - C# Programming Guide - C# | Microsoft Learn&lt;/a&gt;[&lt;a href="https://learn.microsoft.com/en-us/dotnet/csharp/programming-guide/interfaces/explicit-interface-implementation" target="_blank" title="New Window"&gt;^&lt;/a&gt;] .</description>
      <author>raddevus</author>
      <link>https://www.codeproject.com/Messages/5998605/implementing-interface-method-same-signature-from</link>
      <pubDate>Thu, 25 Apr 2024 19:55:00 GMT</pubDate>
      <guid>3_5998605</guid>
      <subject>Hall Of Shame</subject>
    </item>
    <item>
      <title>Given enough eyeballs - a Sunday rant...</title>
      <description>... after a frustrating week, this could be taken as a general rant at the quality of open-source software with applications to particular pieces. &lt;br /&gt;
&lt;br /&gt;
Given enough eyeballs, where are those eyeballs looking? Surely not at &lt;a href="https://libpng.sourceforge.io/"&gt;libpng&lt;/a&gt;[&lt;a href="https://libpng.sourceforge.io/" target="_blank"&gt;^&lt;/a&gt;] - the reference implementation for the PNG format. It is a smallish library of about 20 kLOC but the configuration file with all the possible options has over 200 different options. That makes for 200x200 = 40k potentially different ways you could build the library. Either that or some of the options are redundant.&lt;br /&gt;
&lt;br /&gt;
The code quality is atrocious. I understand that it's a project started in the '90es but that's no excuse for not cleaning it up from time to time. You cannot let &lt;a href="https://github.com/pnggroup/libpng/blob/libpng16/contrib/libtests/pngvalid.c"&gt;one test program&lt;/a&gt; get to 12000 lines in a single file. And those 12000 lines are full of miracles like parameters and structure members called &lt;code&gt;this&lt;/code&gt;! Don't you worry! At the beginning of the file there is this fragment:&lt;br /&gt;
&lt;div class='pre-lang' id='premain115202'&gt;&lt;div&gt;C++&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode115202' class='copy-code' data-index='115202' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre115202' style='margin-top:0;' class='lang-cplusplus' data-language='C++' data-allowShrink='True' data-collapse='False'&gt;
&lt;span class="code-preprocessor"&gt;#ifdef __cplusplus
&lt;/span&gt;#  define &lt;span class="code-keyword"&gt;this&lt;/span&gt; not_the_cpp_this
#  define &lt;span class="code-keyword"&gt;new&lt;/span&gt; not_the_cpp_new&lt;/pre&gt;  &lt;img src="https://codeproject.global.ssl.fastly.net/script/Forums/Images/smiley_OMG.gif" align="top" alt="OMG | :OMG:" /&gt;  &lt;br /&gt;
&lt;br /&gt;
Also, if the byzantine compile time configuration options make it impossible for the program to run would you think of throwing an error using a &lt;code&gt;#error&lt;/code&gt; directive? NO, good quality open-source code just wraps the whole program in an &lt;code&gt;#if&lt;/code&gt; block with the &lt;code&gt;#else&lt;/code&gt; clause, 12000 lines below:&lt;br /&gt;
&lt;div class='pre-lang' id='premain278623'&gt;&lt;div&gt;C++&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode278623' class='copy-code' data-index='278623' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre278623' style='margin-top:0;' class='lang-cplusplus' data-language='C++' data-allowShrink='True' data-collapse='False'&gt;
&lt;span class="code-preprocessor"&gt;#else /* write or low level APIs not supported */
&lt;/span&gt;&lt;span class="code-keyword"&gt;int&lt;/span&gt; main(&lt;span class="code-keyword"&gt;void&lt;/span&gt;)
{
   fprintf(stderr,
      &lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;pngvalid: no low level write support in libpng, all tests skipped\n"&lt;/span&gt;);
   &lt;span class="code-comment"&gt;/*&lt;/span&gt;&lt;span class="code-comment"&gt; So the test is skipped: */&lt;/span&gt;
   &lt;span class="code-keyword"&gt;return&lt;/span&gt; SKIP;
}
&lt;span class="code-preprocessor"&gt;#endif&lt;/span&gt;&lt;/pre&gt;Remember: these are compile time conditions; why would you fail at run time?&lt;br /&gt;
&lt;br /&gt;
Have you heard of semantic versioning? Well, check this out (straight from the LIBPNG) web site:&lt;br /&gt;
&lt;blockquote class="quote"&gt;&lt;div class="op"&gt;Quote:&lt;/div&gt;At present, there are eight branches:&lt;br /&gt;
&lt;br /&gt;
    master (actively developed)&lt;br /&gt;
    libpng16 (equivalent to master)&lt;br /&gt;
    libpng17 (frozen, last updated on 2017-Sep-03)&lt;br /&gt;
    libpng15 (frozen, last updated on 2017-Sep-28)&lt;br /&gt;
    libpng14 (frozen, last updated on 2017-Sep-28)&lt;br /&gt;
    libpng12 (frozen, last updated on 2017-Sep-28)&lt;br /&gt;
    libpng10 (frozen, last updated on 2017-Aug-24)&lt;br /&gt;
    libpng00 (frozen, last updated on 1998-Mar-08)&lt;br /&gt;
&lt;/blockquote&gt;These translate in version numbers as 1.6.x, 1.7.x, 1.5.x, and so on. So, let me get this straight: version 1.7 is frozen and version 1.6 is actively developed? Have you guys ran out of numbers? And, guess what, in code you find many tests like these:&lt;br /&gt;
&lt;div class='pre-lang' id='premain961117'&gt;&lt;div&gt;C++&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode961117' class='copy-code' data-index='961117' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre961117' style='margin-top:0;' class='lang-cplusplus' data-language='C++' data-allowShrink='True' data-collapse='False'&gt;
&lt;span class="code-preprocessor"&gt;#if PNG_LIBPNG_VER &amp;gt;= 10700
&lt;/span&gt;        &lt;span class="code-keyword"&gt;if&lt;/span&gt; (!for_background &amp;amp;&amp;amp; image-&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;bit_depth &lt;span class="code-keyword"&gt;&amp;lt;&lt;/span&gt; &lt;span class="code-digit"&gt;8&lt;/span&gt;)
          image-&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;bit_depth = image-&lt;span class="code-keyword"&gt;&amp;gt;&lt;/span&gt;sample_depth = &lt;span class="code-digit"&gt;8&lt;/span&gt;;
&lt;span class="code-preprocessor"&gt;#endif&lt;/span&gt;&lt;/pre&gt;???&lt;br /&gt;
I will stop here although, after a week of frustrations, I could go on and on.&lt;br /&gt;
&lt;br /&gt;
There is a well-known commencement speech: Make your own bed - &lt;a href="https://www.youtube.com/watch?v=pxBQLFLei70"&gt;University of Texas at Austin 2014 Commencement Address - Admiral William H. McRaven - YouTube&lt;/a&gt;[&lt;a href="https://www.youtube.com/watch?v=pxBQLFLei70" target="_blank" title="New Window"&gt;^&lt;/a&gt;]. As a developer, and specially as an open-source maintainer, before writing a single line of new code, do everyone a favour: clean the project you are working on; make your own bed!&lt;br /&gt;
&lt;div class="signature"&gt;Mircea&lt;/div&gt;</description>
      <author>Mircea Neacsu</author>
      <link>https://www.codeproject.com/Messages/5997884/Given-enough-eyeballs-a-Sunday-rant</link>
      <pubDate>Sun, 21 Apr 2024 17:32:00 GMT</pubDate>
      <guid>3_5997884</guid>
      <subject>Hall Of Shame</subject>
    </item>
    <item>
      <title>Country code</title>
      <description>Requiring the country code seems unusual (for a site in the U.S.) -- but what would prompt a web developer to make it an elephanting drop-down?!&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://www.codeproject.com/Uploads/Membership/Uploads/2587207/StupidCountryCode.png"&gt;https://www.codeproject.com/Uploads/Membership/Uploads/2587207/StupidCountryCode.png&lt;/a&gt;[&lt;a href="https://www.codeproject.com/Uploads/Membership/Uploads/2587207/StupidCountryCode.png" target="_blank" title="New Window"&gt;^&lt;/a&gt;]</description>
      <author>PIEBALDconsult</author>
      <link>https://www.codeproject.com/Messages/5997161/Country-code</link>
      <pubDate>Wed, 17 Apr 2024 03:07:00 GMT</pubDate>
      <guid>3_5997161</guid>
      <subject>Hall Of Shame</subject>
    </item>
    <item>
      <title>SQL (Transact-SQL) needs a proper FOR loop!</title>
      <description>The other day I wrote an SQL function with a bug of the following form:&lt;br /&gt;
&lt;br /&gt;
&lt;div class='pre-lang' id='premain75351'&gt;&lt;div&gt;SQL&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode75351' class='copy-code' data-index='75351' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre75351' style='margin-top:0;' class='lang-sql' data-language='SQL' data-allowShrink='True' data-collapse='False'&gt;
&lt;span class="code-keyword"&gt;DECLARE&lt;/span&gt; &lt;span class="code-sdkkeyword"&gt;@i&lt;/span&gt; INTEGER = &lt;span class="code-digit"&gt;0&lt;/span&gt;

&lt;span class="code-keyword"&gt;WHILE&lt;/span&gt; ( &lt;span class="code-sdkkeyword"&gt;@i&lt;/span&gt; &amp;lt; foo )
&lt;span class="code-keyword"&gt;BEGIN&lt;/span&gt;
  &lt;span class="code-keyword"&gt;IF&lt;/span&gt; &lt;span class="code-comment"&gt;--&lt;/span&gt;&lt;span class="code-comment"&gt; test something&lt;/span&gt;
  &lt;span class="code-keyword"&gt;BEGIN&lt;/span&gt;
    &lt;span class="code-comment"&gt;--&lt;/span&gt;&lt;span class="code-comment"&gt; do stuff&lt;/span&gt;

    &lt;span class="code-keyword"&gt;SET&lt;/span&gt; &lt;span class="code-sdkkeyword"&gt;@i&lt;/span&gt; = &lt;span class="code-sdkkeyword"&gt;@i&lt;/span&gt; + &lt;span class="code-digit"&gt;1&lt;/span&gt;
  &lt;span class="code-keyword"&gt;END&lt;/span&gt;
&lt;span class="code-keyword"&gt;END&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
I expected the function to be inefficient, but not infinite the first time the test returns false.  &lt;img src="https://codeproject.freetls.fastly.net/script/Forums/Images/smiley_doh.gif" align="top" alt="D'Oh! | :doh:" /&gt;</description>
      <author>PIEBALDconsult</author>
      <link>https://www.codeproject.com/Messages/5995072/SQL-Transact-SQL-needs-a-proper-FOR-loop</link>
      <pubDate>Tue, 02 Apr 2024 03:30:00 GMT</pubDate>
      <guid>3_5995072</guid>
      <subject>Hall Of Shame</subject>
    </item>
    <item>
      <title>.bash_history makes me happy, how about you?</title>
      <description>I had used Windows since 3.0 (ca 1991) before I switched to main usage of Linux in 2019 so please don't make fun of me for this too much.  &lt;br /&gt;
&lt;br /&gt;
I've been working on setting up my .NET Core WebAPIs (hosted under various domains but running on one copy of a DigitalOcean droplet (running Debian)) and setting up the services and forwarding via Nginx and all that.  It's all command-line there are a lot of steps that I forget often.&lt;br /&gt;
&lt;br /&gt;
1. set up a service file in /etc/systemd/system/&lt;br /&gt;
2. build the WebAPI and deploy it under a folder in /var/www/&lt;br /&gt;
3. configure nginx to point at your webAPI&lt;br /&gt;
4. create link to the nginx config ln -s /etc/nginx/sites-available/&amp;lt;apiName&amp;gt; /etc/nginx/sites-enabled/&lt;br /&gt;
&lt;br /&gt;
There's a bunch of things and I would lose the commands and forget things I should do.&lt;br /&gt;
And, I be forever up-arrowing to get to old commands that I had used.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;.bash_history&lt;/b&gt;&lt;br /&gt;
Then I stumbled upon the .bash_history file and noticed I can open it up in an editor (nano, of course, because I am vim-weak and don't know how to exit vim  &lt;img src="https://codeproject.global.ssl.fastly.net/script/Forums/Images/smiley_laugh.gif" align="top" alt="Laugh | :laugh:" /&gt;    ) &lt;br /&gt;
&lt;br /&gt;
Wow, that is really cool that all those commands are just sitting in there like that so I can now pull them out and save them to a file with some documentation.  &lt;br /&gt;
&lt;br /&gt;
Thank you, Linux, it seems like you get better all the time.   &lt;img src="https://codeproject.global.ssl.fastly.net/script/Forums/Images/smiley_laugh.gif" align="top" alt="Laugh | :laugh:" /&gt;  &lt;br /&gt;
&lt;br /&gt;
I bet you already knew about .bash_history didn't you?  Well, try not to laugh at me too hard for only finding it now.   &lt;img src="https://codeproject.global.ssl.fastly.net/script/Forums/Images/smiley_smile.gif" align="top" alt="Smile | :)" /&gt;</description>
      <author>raddevus</author>
      <link>https://www.codeproject.com/Messages/5991749/bash-history-makes-me-happy-how-about-you</link>
      <pubDate>Sun, 10 Mar 2024 00:34:00 GMT</pubDate>
      <guid>3_5991749</guid>
      <subject>Hall Of Shame</subject>
    </item>
    <item>
      <title>Standards? Eat your heart out, Randall</title>
      <description>Inspired by &lt;a href="https://xkcd.com/927/"&gt;xkcd: Standards&lt;/a&gt;[&lt;a href="https://xkcd.com/927/" target="_blank" title="New Window"&gt;^&lt;/a&gt;] ...&lt;br /&gt;
&lt;code&gt;iconv --list&lt;/code&gt; produces this:&lt;br /&gt;
&lt;br /&gt;
&lt;div class='pre-lang' id='premain866627'&gt;&lt;div&gt; &lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode866627' class='copy-code' data-index='866627' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre866627' style='margin-top:0;' data-language='text' data-allowShrink='True' data-collapse='False'&gt;
The following list contains all the coded character sets known.  This does
not necessarily mean that all combinations of these names can be used for
the FROM and TO command line parameters.  One coded character set can be
listed with several different names (aliases).

  437, 500, 500V1, 850, 851, 852, 855, 856, 857, 858, 860, 861, 862, 863, 864,
  865, 866, 866NAV, 869, 874, 904, 1026, 1046, 1047, 8859_1, 8859_2, 8859_3,
  8859_4, 8859_5, 8859_6, 8859_7, 8859_8, 8859_9, 10646-1:1993,
  10646-1:1993/UCS4, ANSI_X3.4-1968, ANSI_X3.4-1986, ANSI_X3.4,
  ANSI_X3.110-1983, ANSI_X3.110, ARABIC, ARABIC7, ARMSCII-8, ARMSCII8, ASCII,
  ASMO-708, ASMO_449, BALTIC, BIG-5, BIG-FIVE, BIG5-HKSCS, BIG5, BIG5HKSCS,
  BIGFIVE, BRF, BS_4730, CA, CN-BIG5, CN-GB, CN, CP-AR, CP-GR, CP-HU, CP037,
  CP038, CP273, CP274, CP275, CP278, CP280, CP281, CP282, CP284, CP285, CP290,
  CP297, CP367, CP420, CP423, CP424, CP437, CP500, CP737, CP770, CP771, CP772,
  CP773, CP774, CP775, CP803, CP813, CP819, CP850, CP851, CP852, CP855, CP856,
  CP857, CP858, CP860, CP861, CP862, CP863, CP864, CP865, CP866, CP866NAV,
  CP868, CP869, CP870, CP871, CP874, CP875, CP880, CP891, CP901, CP902, CP903,
  CP904, CP905, CP912, CP915, CP916, CP918, CP920, CP921, CP922, CP930, CP932,
  CP933, CP935, CP936, CP937, CP939, CP949, CP950, CP1004, CP1008, CP1025,
  CP1026, CP1046, CP1047, CP1070, CP1079, CP1081, CP1084, CP1089, CP1097,
  CP1112, CP1122, CP1123, CP1124, CP1125, CP1129, CP1130, CP1132, CP1133,
  CP1137, CP1140, CP1141, CP1142, CP1143, CP1144, CP1145, CP1146, CP1147,
  CP1148, CP1149, CP1153, CP1154, CP1155, CP1156, CP1157, CP1158, CP1160,
  CP1161, CP1162, CP1163, CP1164, CP1166, CP1167, CP1250, CP1251, CP1252,
  CP1253, CP1254, CP1255, CP1256, CP1257, CP1258, CP1282, CP1361, CP1364,
  CP1371, CP1388, CP1390, CP1399, CP4517, CP4899, CP4909, CP4971, CP5347,
  CP9030, CP9066, CP9448, CP10007, CP12712, CP16804, CPIBM861, CSA7-1, CSA7-2,
  CSASCII, CSA_T500-1983, CSA_T500, CSA_Z243.4-1985-1, CSA_Z243.4-1985-2,
  CSA_Z243.419851, CSA_Z243.419852, CSDECMCS, CSEBCDICATDE, CSEBCDICATDEA,
  CSEBCDICCAFR, CSEBCDICDKNO, CSEBCDICDKNOA, CSEBCDICES, CSEBCDICESA,
  CSEBCDICESS, CSEBCDICFISE, CSEBCDICFISEA, CSEBCDICFR, CSEBCDICIT, CSEBCDICPT,
  CSEBCDICUK, CSEBCDICUS, CSEUCKR, CSEUCPKDFMTJAPANESE, CSGB2312, CSHPROMAN8,
  CSIBM037, CSIBM038, CSIBM273, CSIBM274, CSIBM275, CSIBM277, CSIBM278,
  CSIBM280, CSIBM281, CSIBM284, CSIBM285, CSIBM290, CSIBM297, CSIBM420,
  CSIBM423, CSIBM424, CSIBM500, CSIBM803, CSIBM851, CSIBM855, CSIBM856,
  CSIBM857, CSIBM860, CSIBM863, CSIBM864, CSIBM865, CSIBM866, CSIBM868,
  CSIBM869, CSIBM870, CSIBM871, CSIBM880, CSIBM891, CSIBM901, CSIBM902,
  CSIBM903, CSIBM904, CSIBM905, CSIBM918, CSIBM921, CSIBM922, CSIBM930,
  CSIBM932, CSIBM933, CSIBM935, CSIBM937, CSIBM939, CSIBM943, CSIBM1008,
  CSIBM1025, CSIBM1026, CSIBM1097, CSIBM1112, CSIBM1122, CSIBM1123, CSIBM1124,
  CSIBM1129, CSIBM1130, CSIBM1132, CSIBM1133, CSIBM1137, CSIBM1140, CSIBM1141,
  CSIBM1142, CSIBM1143, CSIBM1144, CSIBM1145, CSIBM1146, CSIBM1147, CSIBM1148,
  CSIBM1149, CSIBM1153, CSIBM1154, CSIBM1155, CSIBM1156, CSIBM1157, CSIBM1158,
  CSIBM1160, CSIBM1161, CSIBM1163, CSIBM1164, CSIBM1166, CSIBM1167, CSIBM1364,
  CSIBM1371, CSIBM1388, CSIBM1390, CSIBM1399, CSIBM4517, CSIBM4899, CSIBM4909,
  CSIBM4971, CSIBM5347, CSIBM9030, CSIBM9066, CSIBM9448, CSIBM12712,
  CSIBM16804, CSIBM11621162, CSISO4UNITEDKINGDOM, CSISO10SWEDISH,
  CSISO11SWEDISHFORNAMES, CSISO14JISC6220RO, CSISO15ITALIAN, CSISO16PORTUGESE,
  CSISO17SPANISH, CSISO18GREEK7OLD, CSISO19LATINGREEK, CSISO21GERMAN,
  CSISO25FRENCH, CSISO27LATINGREEK1, CSISO49INIS, CSISO50INIS8,
  CSISO51INISCYRILLIC, CSISO58GB1988, CSISO60DANISHNORWEGIAN,
  CSISO60NORWEGIAN1, CSISO61NORWEGIAN2, CSISO69FRENCH, CSISO84PORTUGUESE2,
  CSISO85SPANISH2, CSISO86HUNGARIAN, CSISO88GREEK7, CSISO89ASMO449, CSISO90,
  CSISO92JISC62991984B, CSISO99NAPLPS, CSISO103T618BIT, CSISO111ECMACYRILLIC,
  CSISO121CANADIAN1, CSISO122CANADIAN2, CSISO139CSN369103, CSISO141JUSIB1002,
  CSISO143IECP271, CSISO150, CSISO150GREEKCCITT, CSISO151CUBA,
  CSISO153GOST1976874, CSISO646DANISH, CSISO2022CN, CSISO2022JP, CSISO2022JP2,
  CSISO2022KR, CSISO2033, CSISO5427CYRILLIC, CSISO5427CYRILLIC1981,
  CSISO5428GREEK, CSISO10367BOX, CSISOLATIN1, CSISOLATIN2, CSISOLATIN3,
  CSISOLATIN4, CSISOLATIN5, CSISOLATIN6, CSISOLATINARABIC, CSISOLATINCYRILLIC,
  CSISOLATINGREEK, CSISOLATINHEBREW, CSKOI8R, CSKSC5636, CSMACINTOSH,
  CSNATSDANO, CSNATSSEFI, CSN_369103, CSPC8CODEPAGE437, CSPC775BALTIC,
  CSPC850MULTILINGUAL, CSPC858MULTILINGUAL, CSPC862LATINHEBREW, CSPCP852,
  CSSHIFTJIS, CSUCS4, CSUNICODE, CSWINDOWS31J, CUBA, CWI-2, CWI, CYRILLIC, DE,
  DEC-MCS, DEC, DECMCS, DIN_66003, DK, DS2089, DS_2089, E13B, EBCDIC-AT-DE-A,
  EBCDIC-AT-DE, EBCDIC-BE, EBCDIC-BR, EBCDIC-CA-FR, EBCDIC-CP-AR1,
  EBCDIC-CP-AR2, EBCDIC-CP-BE, EBCDIC-CP-CA, EBCDIC-CP-CH, EBCDIC-CP-DK,
  EBCDIC-CP-ES, EBCDIC-CP-FI, EBCDIC-CP-FR, EBCDIC-CP-GB, EBCDIC-CP-GR,
  EBCDIC-CP-HE, EBCDIC-CP-IS, EBCDIC-CP-IT, EBCDIC-CP-NL, EBCDIC-CP-NO,
  EBCDIC-CP-ROECE, EBCDIC-CP-SE, EBCDIC-CP-TR, EBCDIC-CP-US, EBCDIC-CP-WT,
  EBCDIC-CP-YU, EBCDIC-CYRILLIC, EBCDIC-DK-NO-A, EBCDIC-DK-NO, EBCDIC-ES-A,
  EBCDIC-ES-S, EBCDIC-ES, EBCDIC-FI-SE-A, EBCDIC-FI-SE, EBCDIC-FR,
  EBCDIC-GREEK, EBCDIC-INT, EBCDIC-INT1, EBCDIC-IS-FRISS, EBCDIC-IT,
  EBCDIC-JP-E, EBCDIC-JP-KANA, EBCDIC-PT, EBCDIC-UK, EBCDIC-US, EBCDICATDE,
  EBCDICATDEA, EBCDICCAFR, EBCDICDKNO, EBCDICDKNOA, EBCDICES, EBCDICESA,
  EBCDICESS, EBCDICFISE, EBCDICFISEA, EBCDICFR, EBCDICISFRISS, EBCDICIT,
  EBCDICPT, EBCDICUK, EBCDICUS, ECMA-114, ECMA-118, ECMA-128, ECMA-CYRILLIC,
  ECMACYRILLIC, ELOT_928, ES, ES2, EUC-CN, EUC-JISX0213, EUC-JP-MS, EUC-JP,
  EUC-KR, EUC-TW, EUCCN, EUCJP-MS, EUCJP-OPEN, EUCJP-WIN, EUCJP, EUCKR, EUCTW,
  FI, FR, GB, GB2312, GB13000, GB18030, GBK, GB_1988-80, GB_198880,
  GEORGIAN-ACADEMY, GEORGIAN-PS, GOST_19768-74, GOST_19768, GOST_1976874,
  GREEK-CCITT, GREEK, GREEK7-OLD, GREEK7, GREEK7OLD, GREEK8, GREEKCCITT,
  HEBREW, HP-GREEK8, HP-ROMAN8, HP-ROMAN9, HP-THAI8, HP-TURKISH8, HPGREEK8,
  HPROMAN8, HPROMAN9, HPTHAI8, HPTURKISH8, HU, IBM-803, IBM-856, IBM-901,
  IBM-902, IBM-921, IBM-922, IBM-930, IBM-932, IBM-933, IBM-935, IBM-937,
  IBM-939, IBM-943, IBM-1008, IBM-1025, IBM-1046, IBM-1047, IBM-1097, IBM-1112,
  IBM-1122, IBM-1123, IBM-1124, IBM-1129, IBM-1130, IBM-1132, IBM-1133,
  IBM-1137, IBM-1140, IBM-1141, IBM-1142, IBM-1143, IBM-1144, IBM-1145,
  IBM-1146, IBM-1147, IBM-1148, IBM-1149, IBM-1153, IBM-1154, IBM-1155,
  IBM-1156, IBM-1157, IBM-1158, IBM-1160, IBM-1161, IBM-1162, IBM-1163,
  IBM-1164, IBM-1166, IBM-1167, IBM-1364, IBM-1371, IBM-1388, IBM-1390,
  IBM-1399, IBM-4517, IBM-4899, IBM-4909, IBM-4971, IBM-5347, IBM-9030,
  IBM-9066, IBM-9448, IBM-12712, IBM-16804, IBM037, IBM038, IBM256, IBM273,
  IBM274, IBM275, IBM277, IBM278, IBM280, IBM281, IBM284, IBM285, IBM290,
  IBM297, IBM367, IBM420, IBM423, IBM424, IBM437, IBM500, IBM775, IBM803,
  IBM813, IBM819, IBM848, IBM850, IBM851, IBM852, IBM855, IBM856, IBM857,
  IBM858, IBM860, IBM861, IBM862, IBM863, IBM864, IBM865, IBM866, IBM866NAV,
  IBM868, IBM869, IBM870, IBM871, IBM874, IBM875, IBM880, IBM891, IBM901,
  IBM902, IBM903, IBM904, IBM905, IBM912, IBM915, IBM916, IBM918, IBM920,
  IBM921, IBM922, IBM930, IBM932, IBM933, IBM935, IBM937, IBM939, IBM943,
  IBM1004, IBM1008, IBM1025, IBM1026, IBM1046, IBM1047, IBM1089, IBM1097,
  IBM1112, IBM1122, IBM1123, IBM1124, IBM1129, IBM1130, IBM1132, IBM1133,
  IBM1137, IBM1140, IBM1141, IBM1142, IBM1143, IBM1144, IBM1145, IBM1146,
  IBM1147, IBM1148, IBM1149, IBM1153, IBM1154, IBM1155, IBM1156, IBM1157,
  IBM1158, IBM1160, IBM1161, IBM1162, IBM1163, IBM1164, IBM1166, IBM1167,
  IBM1364, IBM1371, IBM1388, IBM1390, IBM1399, IBM4517, IBM4899, IBM4909,
  IBM4971, IBM5347, IBM9030, IBM9066, IBM9448, IBM12712, IBM16804, IEC_P27-1,
  IEC_P271, INIS-8, INIS-CYRILLIC, INIS, INIS8, INISCYRILLIC, ISIRI-3342,
  ISIRI3342, ISO-2022-CN-EXT, ISO-2022-CN, ISO-2022-JP-2, ISO-2022-JP-3,
  ISO-2022-JP, ISO-2022-KR, ISO-8859-1, ISO-8859-2, ISO-8859-3, ISO-8859-4,
  ISO-8859-5, ISO-8859-6, ISO-8859-7, ISO-8859-8, ISO-8859-9, ISO-8859-9E,
  ISO-8859-10, ISO-8859-11, ISO-8859-13, ISO-8859-14, ISO-8859-15, ISO-8859-16,
  ISO-10646, ISO-10646/UCS2, ISO-10646/UCS4, ISO-10646/UTF-8, ISO-10646/UTF8,
  ISO-CELTIC, ISO-IR-4, ISO-IR-6, ISO-IR-8-1, ISO-IR-9-1, ISO-IR-10, ISO-IR-11,
  ISO-IR-14, ISO-IR-15, ISO-IR-16, ISO-IR-17, ISO-IR-18, ISO-IR-19, ISO-IR-21,
  ISO-IR-25, ISO-IR-27, ISO-IR-37, ISO-IR-49, ISO-IR-50, ISO-IR-51, ISO-IR-54,
  ISO-IR-55, ISO-IR-57, ISO-IR-60, ISO-IR-61, ISO-IR-69, ISO-IR-84, ISO-IR-85,
  ISO-IR-86, ISO-IR-88, ISO-IR-89, ISO-IR-90, ISO-IR-92, ISO-IR-98, ISO-IR-99,
  ISO-IR-100, ISO-IR-101, ISO-IR-103, ISO-IR-109, ISO-IR-110, ISO-IR-111,
  ISO-IR-121, ISO-IR-122, ISO-IR-126, ISO-IR-127, ISO-IR-138, ISO-IR-139,
  ISO-IR-141, ISO-IR-143, ISO-IR-144, ISO-IR-148, ISO-IR-150, ISO-IR-151,
  ISO-IR-153, ISO-IR-155, ISO-IR-156, ISO-IR-157, ISO-IR-166, ISO-IR-179,
  ISO-IR-193, ISO-IR-197, ISO-IR-199, ISO-IR-203, ISO-IR-209, ISO-IR-226,
  ISO/TR_11548-1, ISO646-CA, ISO646-CA2, ISO646-CN, ISO646-CU, ISO646-DE,
  ISO646-DK, ISO646-ES, ISO646-ES2, ISO646-FI, ISO646-FR, ISO646-FR1,
  ISO646-GB, ISO646-HU, ISO646-IT, ISO646-JP-OCR-B, ISO646-JP, ISO646-KR,
  ISO646-NO, ISO646-NO2, ISO646-PT, ISO646-PT2, ISO646-SE, ISO646-SE2,
  ISO646-US, ISO646-YU, ISO2022CN, ISO2022CNEXT, ISO2022JP, ISO2022JP2,
  ISO2022KR, ISO6937, ISO8859-1, ISO8859-2, ISO8859-3, ISO8859-4, ISO8859-5,
  ISO8859-6, ISO8859-7, ISO8859-8, ISO8859-9, ISO8859-9E, ISO8859-10,
  ISO8859-11, ISO8859-13, ISO8859-14, ISO8859-15, ISO8859-16, ISO11548-1,
  ISO88591, ISO88592, ISO88593, ISO88594, ISO88595, ISO88596, ISO88597,
  ISO88598, ISO88599, ISO88599E, ISO885910, ISO885911, ISO885913, ISO885914,
  ISO885915, ISO885916, ISO_646.IRV:1991, ISO_2033-1983, ISO_2033,
  ISO_5427-EXT, ISO_5427, ISO_5427:1981, ISO_5427EXT, ISO_5428, ISO_5428:1980,
  ISO_6937-2, ISO_6937-2:1983, ISO_6937, ISO_6937:1992, ISO_8859-1,
  ISO_8859-1:1987, ISO_8859-2, ISO_8859-2:1987, ISO_8859-3, ISO_8859-3:1988,
  ISO_8859-4, ISO_8859-4:1988, ISO_8859-5, ISO_8859-5:1988, ISO_8859-6,
  ISO_8859-6:1987, ISO_8859-7, ISO_8859-7:1987, ISO_8859-7:2003, ISO_8859-8,
  ISO_8859-8:1988, ISO_8859-9, ISO_8859-9:1989, ISO_8859-9E, ISO_8859-10,
  ISO_8859-10:1992, ISO_8859-14, ISO_8859-14:1998, ISO_8859-15,
  ISO_8859-15:1998, ISO_8859-16, ISO_8859-16:2001, ISO_9036, ISO_10367-BOX,
  ISO_10367BOX, ISO_11548-1, ISO_69372, IT, JIS_C6220-1969-RO,
  JIS_C6229-1984-B, JIS_C62201969RO, JIS_C62291984B, JOHAB, JP-OCR-B, JP, JS,
  JUS_I.B1.002, KOI-7, KOI-8, KOI8-R, KOI8-RU, KOI8-T, KOI8-U, KOI8, KOI8R,
  KOI8U, KSC5636, L1, L2, L3, L4, L5, L6, L7, L8, L10, LATIN-9, LATIN-GREEK-1,
  LATIN-GREEK, LATIN1, LATIN2, LATIN3, LATIN4, LATIN5, LATIN6, LATIN7, LATIN8,
  LATIN9, LATIN10, LATINGREEK, LATINGREEK1, MAC-CENTRALEUROPE, MAC-CYRILLIC,
  MAC-IS, MAC-SAMI, MAC-UK, MAC, MACCYRILLIC, MACINTOSH, MACIS, MACUK,
  MACUKRAINIAN, MIK, MS-ANSI, MS-ARAB, MS-CYRL, MS-EE, MS-GREEK, MS-HEBR,
  MS-MAC-CYRILLIC, MS-TURK, MS932, MS936, MSCP949, MSCP1361, MSMACCYRILLIC,
  MSZ_7795.3, MS_KANJI, NAPLPS, NATS-DANO, NATS-SEFI, NATSDANO, NATSSEFI,
  NC_NC0010, NC_NC00-10, NC_NC00-10:81, NF_Z_62-010, NF_Z_62-010_(1973),
  NF_Z_62-010_1973, NF_Z_62010, NF_Z_62010_1973, NO, NO2, NS_4551-1, NS_4551-2,
  NS_45511, NS_45512, OS2LATIN1, OSF00010001, OSF00010002, OSF00010003,
  OSF00010004, OSF00010005, OSF00010006, OSF00010007, OSF00010008, OSF00010009,
  OSF0001000A, OSF00010020, OSF00010100, OSF00010101, OSF00010102, OSF00010104,
  OSF00010105, OSF00010106, OSF00030010, OSF0004000A, OSF0005000A, OSF05010001,
  OSF100201A4, OSF100201A8, OSF100201B5, OSF100201F4, OSF100203B5, OSF1002011C,
  OSF1002011D, OSF1002035D, OSF1002035E, OSF1002035F, OSF1002036B, OSF1002037B,
  OSF10010001, OSF10010004, OSF10010006, OSF10020025, OSF10020111, OSF10020115,
  OSF10020116, OSF10020118, OSF10020122, OSF10020129, OSF10020352, OSF10020354,
  OSF10020357, OSF10020359, OSF10020360, OSF10020364, OSF10020365, OSF10020366,
  OSF10020367, OSF10020370, OSF10020387, OSF10020388, OSF10020396, OSF10020402,
  OSF10020417, PT, PT2, PT154, R8, R9, RK1048, ROMAN8, ROMAN9, RUSCII, SE, SE2,
  SEN_850200_B, SEN_850200_C, SHIFT-JIS, SHIFTJISX0213, SHIFT_JIS,
  SHIFT_JISX0213, SJIS-OPEN, SJIS-WIN, SJIS, SS636127, STRK1048-2002,
  ST_SEV_358-88, T.61-8BIT, T.61, T.618BIT, TCVN-5712, TCVN, TCVN5712-1,
  TCVN5712-1:1993, THAI8, TIS-620, TIS620-0, TIS620.2529-1, TIS620.2533-0,
  TIS620, TS-5881, TSCII, TURKISH8, UCS-2, UCS-2BE, UCS-2LE, UCS-4, UCS-4BE,
  UCS-4LE, UCS2, UCS4, UHC, UJIS, UK, UNICODE, UNICODEBIG, UNICODELITTLE,
  US-ASCII, US, UTF-7, UTF-8, UTF-16, UTF-16BE, UTF-16LE, UTF-32, UTF-32BE,
  UTF-32LE, UTF7, UTF8, UTF16, UTF16BE, UTF16LE, UTF32, UTF32BE, UTF32LE,
  VISCII, WCHAR_T, WIN-SAMI-2, WINBALTRIM, WINDOWS-31J, WINDOWS-874,
  WINDOWS-936, WINDOWS-1250, WINDOWS-1251, WINDOWS-1252, WINDOWS-1253,
  WINDOWS-1254, WINDOWS-1255, WINDOWS-1256, WINDOWS-1257, WINDOWS-1258,
  WINSAMI2, WS2, YU&lt;/pre&gt;1179 by my count. No, I am not going to find out how many are unique and how many are aliased.&lt;br /&gt;
&lt;div class="signature"&gt;Software rusts.  &lt;small&gt;Simon Stephenson, ca 1994.&lt;/small&gt;  So does this signature. &lt;small&gt;me, 2012&lt;/small&gt;&lt;/div&gt;</description>
      <author>Peter_in_2780</author>
      <link>https://www.codeproject.com/Messages/5989650/Standards-Eat-your-heart-out-Randall</link>
      <pubDate>Mon, 26 Feb 2024 02:07:00 GMT</pubDate>
      <guid>3_5989650</guid>
      <subject>Hall Of Shame</subject>
    </item>
    <item>
      <title>Supporting multiple cores from bare metal C</title>
      <description>I always wondered what a bare metal C implementation - the kind you'd use to write even parts of low level boot loader code would do to expose things like a 2nd core.&lt;br /&gt;
&lt;br /&gt;
Or rather, how do you use a 2nd core without a scheduler? I've always kinda wondered about that.&lt;br /&gt;
&lt;br /&gt;
The answer is simple. You activate the core in the bootloader and then get the core to JMP to your code. One main() in effect, for each core.&lt;br /&gt;
&lt;br /&gt;
&lt;div class='pre-lang' id='premain647695'&gt;&lt;div&gt;C++&lt;/div&gt;&lt;div class='pre-action-link'&gt;&lt;span id='copycode647695' class='copy-code' data-index='647695' style='visibility:hidden'&gt;&lt;svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' viewBox='0 0 460 460' style='width: 16px;height:16px;' xml:space='preserve'&gt;&lt;g&gt;&lt;path d='M425.934,0H171.662c-18.122,0-32.864,14.743-32.864,32.864v77.134h30V32.864c0-1.579,1.285-2.864,2.864-2.864h254.272     c1.579,0,2.864,1.285,2.864,2.864v254.272c0,1.58-1.285,2.865-2.864,2.865h-74.729v30h74.729 c18.121,0,32.864-14.743,32.864-32.865V32.864C458.797,14.743,444.055,0,425.934,0z'&gt;&lt;/path&gt;&lt;path d='M288.339,139.998H34.068c-18.122,0-32.865,14.743-32.865,32.865v254.272C1.204,445.257,15.946,460,34.068,460h254.272 c18.122,0,32.865-14.743,32.865-32.864V172.863C321.206,154.741,306.461,139.998,288.339,139.998z M288.341,430H34.068    c-1.58,0-2.865-1.285-2.865-2.864V172.863c0-1.58,1.285-2.865,2.865-2.865h254.272c1.58,0,2.865,1.285,2.865,2.865v254.273h0.001 C291.206,428.715,289.92,430,288.341,430z'&gt;&lt;/path&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;pre id='pre647695' style='margin-top:0;' class='lang-cplusplus' data-language='C++' data-allowShrink='True' data-collapse='False'&gt;
&lt;span class="code-keyword"&gt;extern&lt;/span&gt; &lt;span class="code-string"&gt;"&lt;/span&gt;&lt;span class="code-string"&gt;C"&lt;/span&gt; &lt;span class="code-keyword"&gt;void&lt;/span&gt; aux_core_main()
{
    &lt;span class="code-comment"&gt;// 2nd core just starts here. Spin a loop. Be happy.
&lt;/span&gt;}&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Synchronization is a whole different story, but if you don't need to synchronize, why waste any overhead on scheduling?&lt;br /&gt;
&lt;div class="signature"&gt;Check out my IoT graphics library here:&lt;br /&gt;
https://honeythecodewitch.com/gfx&lt;br /&gt;
And my IoT UI/User Experience library here:&lt;br /&gt;
https://honeythecodewitch.com/uix&lt;/div&gt;</description>
      <author>honey the codewitch</author>
      <link>https://www.codeproject.com/Messages/5987489/Supporting-multiple-cores-from-bare-metal-C</link>
      <pubDate>Tue, 13 Feb 2024 17:17:00 GMT</pubDate>
      <guid>3_5987489</guid>
      <subject>Hall Of Shame</subject>
    </item>
    <item>
      <title>Source Generators in C# and TDD misadventure time</title>
      <description>I'm very new to the source generator technology in C# so bear with me, as my information is probably incomplete or inaccurate but what I've discovered so far is amusing and annoying at the same time.&lt;br /&gt;
&lt;br /&gt;
I tried to get a source generator referenced from one project for use in another project and I was getting weird results when crawling the syntax tree. I don't even know how to google about the results I'm getting back. It's hard to explain, but it breaks the thing.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://andrewlock.net/creating-a-source-generator-part-1-creating-an-incremental-source-generator/"&gt;Creating an incremental generator&lt;/a&gt;[&lt;a href="https://andrewlock.net/creating-a-source-generator-part-1-creating-an-incremental-source-generator/" target="_blank" title="New Window"&gt;^&lt;/a&gt;]&lt;br /&gt;
&lt;br /&gt;
I followed this code precisely, and it didn't work on my system.&lt;br /&gt;
&lt;br /&gt;
However, it will work when I invoke the generator to run specifically as part of a unit test. I haven't had as much luck invoking it outside a test framework. I have no idea why this is.&lt;br /&gt;
&lt;br /&gt;
I *believe* (read: hope) it will work when packaged as a NuGet package as well, which is how it was designed to be deployed and used.&lt;br /&gt;
&lt;br /&gt;
Of course, I don't want to deploy a NuGet package of code still in initial development.&lt;br /&gt;
&lt;br /&gt;
The bottom line for all of this is that this leaves me in the position of being forced to perform Test Driven Development in order to make source generators.&lt;br /&gt;
&lt;br /&gt;
I don't know if this is a weirdness with my machine, or perhaps a quirk in this relatively new technology or what, but it's just bizarre to be forced into a particular development paradigm like this.&lt;br /&gt;
&lt;div class="signature"&gt;Check out my IoT graphics library here:&lt;br /&gt;
https://honeythecodewitch.com/gfx&lt;br /&gt;
And my IoT UI/User Experience library here:&lt;br /&gt;
https://honeythecodewitch.com/uix&lt;/div&gt;</description>
      <author>honey the codewitch</author>
      <link>https://www.codeproject.com/Messages/5985324/Source-Generators-in-Csharp-and-TDD-misadventure-t</link>
      <pubDate>Wed, 31 Jan 2024 17:30:00 GMT</pubDate>
      <guid>3_5985324</guid>
      <subject>Hall Of Shame</subject>
    </item>
  </channel>
</rss>