<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>TempleOS on Ivon's Blog</title><link>https://ivonblog.com/en-us/tags/templeos/</link><description>Recent content in TempleOS on Ivon's Blog</description><generator>Hugo -- gohugo.io</generator><language>en</language><managingEditor>infoivonblog.nkfjt@aleeas.com (Ivon Huang)</managingEditor><webMaster>infoivonblog.nkfjt@aleeas.com (Ivon Huang)</webMaster><copyright>You are welcome to share articles of Ivon's Blog (ivonblog.com). Please include the original URL when citing articles, and abide by CC BY-NC-ND 4.0 license. For commercial use, please write an e-mail to me.</copyright><lastBuildDate>Wed, 04 Feb 2026 22:00:00 +0800</lastBuildDate><atom:link href="https://ivonblog.com/en-us/tags/templeos/index.xml" rel="self" type="application/rss+xml"/><item><title>The Hardest Problem in Programming Is Resisting the Temptation of the Evil Nigger - Terry Davis on Software Development</title><link>https://ivonblog.com/en-us/posts/the-hardest-question-in-programming-by-terry-davis/</link><pubDate>Wed, 04 Feb 2026 22:00:00 +0800</pubDate><author>infoivonblog.nkfjt@aleeas.com (Ivon Huang)</author><guid>https://ivonblog.com/en-us/posts/the-hardest-question-in-programming-by-terry-davis/</guid><description>&lt;!-- Co-translated by ChatGPT --&gt;
&lt;p&gt;Terry Davis - The Hardest Question In Programming&lt;/p&gt;
&lt;p&gt;This is the question Google will ask you in an interview. &lt;strong&gt;You must answer.&lt;/strong&gt;&lt;/p&gt;

&lt;h2 class="relative group"&gt;Transcript Translation
 &lt;div id="transcript-translation" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#transcript-translation" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;




&lt;div style="position: relative; padding-bottom: 56.25%; overflow: hidden;"&gt;
 &lt;iframe style="position: absolute; width: 100%; height: 100%;"
 src="http://www.youtube.com/embed/4K8IEzXnMYk" allowfullscreen frameborder="0" loading="lazy"&gt;
 &lt;/iframe&gt;
&lt;/div&gt;
&lt;p&gt;You must answer: is this the temptation of the evil nigger, or God&amp;rsquo;s holy wisdom?&lt;/p&gt;
&lt;p&gt;That is my question. Uh, I will stop here and leave the rest for you to answer.&lt;/p&gt;
&lt;p&gt;You know Google asks interview questions, and the problem I encounter at work is: is this the temptation of the evil nigger?&lt;/p&gt;
&lt;p&gt;Is this too much black magic for our mission statement? Our mission in developing this system is to become a modern version of the Commodore 64.&lt;/p&gt;
&lt;p&gt;Is this black magic? This is&amp;hellip;&amp;hellip; this is&amp;hellip;&amp;hellip; this is black magic.&lt;/p&gt;
&lt;p&gt;The question is: is this black magic? This is the hardest question you may encounter in programming.&lt;/p&gt;
&lt;p&gt;Here, this is the hardest question. This is the hardest question in programming.&lt;/p&gt;
&lt;p&gt;For the temple of the next ten centuries, is this too much black magic?&lt;/p&gt;
&lt;p&gt;(For the coined words niggerlicious and voodoo, I did not know how to translate them. Google suggested this is &amp;ldquo;the evil nigger is tempting you&amp;rdquo;, so I adopted that.)&lt;/p&gt;

&lt;h2 class="relative group"&gt;Interpretation
 &lt;div id="interpretation" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#interpretation" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;Some people believe the meaning of Terry Davis&amp;rsquo;s unclear passage above is: is your code too complex, to the point that it cannot achieve its original purpose, and will people in the future be unable to understand it?&lt;/p&gt;
&lt;p&gt;(Note: the title of this article is slightly exaggerated and modified. This sentence is not Terry Davis&amp;rsquo;s direct meaning.)&lt;/p&gt;
&lt;p&gt;When writing programs, we should be careful not to complicate things. If we can use the simplest solution, use it.&lt;/p&gt;
&lt;p&gt;In the video, the problem Terry Davis is solving is a HolyC loop.
&lt;figure&gt;
 &lt;img
 class="my-0 rounded-md"
 loading="lazy"
 decoding="async"
 fetchpriority="low"
 alt=""
 src="https://ivonblog.com/en-us/posts/the-hardest-question-in-programming-by-terry-davis/images/a.webp"
 onerror="this.onerror=null;this.src='https://ivonblog.com/images/cannotloadimage.avif'"
 width="1280"
 height="720"&gt;&lt;/figure&gt;&lt;/p&gt;
&lt;p&gt;His goal is to use a &lt;code&gt;switch&lt;/code&gt; statement inside a for loop to print numbers, but with a special requirement: add brackets &lt;code&gt;[&lt;/code&gt; and &lt;code&gt;]&lt;/code&gt; before and after the interval from numbers 3 to 6.&lt;/p&gt;
&lt;p&gt;The expected output should look something like this:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;0 1 2 [ 3 4 5 6 ] 7 8 9&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;He brings up this example because in the code in the video, he tries writing it like this:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-c" data-lang="c"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;switch&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt; &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt; &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt; &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nl"&gt;start&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="c1"&gt;// label
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="sc"&gt;&amp;#39;[&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// he wants to print the left bracket before entering case 3
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt; &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt; &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt; &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt; &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nl"&gt;end&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="c1"&gt;// label
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="sc"&gt;&amp;#39;]&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// he wants to print the right bracket after case 6 ends
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;The problem is that the low-level operating mechanism of &lt;code&gt;switch&lt;/code&gt; involves the C language&amp;rsquo;s low-level branch table (Jump Table). When &lt;code&gt;i&lt;/code&gt; equals 3, the program directly jumps to the memory address of &lt;code&gt;case 3&lt;/code&gt;. This means the code written above &lt;code&gt;case 3&lt;/code&gt; is skipped. The CPU does not pass through there; it directly goes to &lt;code&gt;case 3&lt;/code&gt;. This code sandwiched between &lt;code&gt;case&lt;/code&gt; blocks is called Dead Code in C language logic. Unless you use a very dirty &lt;code&gt;goto&lt;/code&gt; instruction, there is no way to get there.&lt;/p&gt;</description><media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://ivonblog.com/en-us/posts/the-hardest-question-in-programming-by-terry-davis/featured.webp"/></item></channel></rss>