<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Programming on kenji.blog</title><link>http://kenji.blog/en/tags/programming/</link><description>Recent content in Programming on kenji.blog</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>kenjinote</copyright><lastBuildDate>Tue, 15 Jul 2025 18:03:03 +0900</lastBuildDate><atom:link href="http://kenji.blog/en/tags/programming/index.xml" rel="self" type="application/rss+xml"/><item><title>Collatz Conjecture</title><link>http://kenji.blog/en/p/%E3%82%B3%E3%83%A9%E3%83%83%E3%83%84%E4%BA%88%E6%83%B3/</link><pubDate>Tue, 15 Jul 2025 18:03:03 +0900</pubDate><guid>http://kenji.blog/en/p/%E3%82%B3%E3%83%A9%E3%83%83%E3%83%84%E4%BA%88%E6%83%B3/</guid><description>&lt;img src="http://kenji.blog/p/%E3%82%B3%E3%83%A9%E3%83%83%E3%83%84%E4%BA%88%E6%83%B3/img.png" alt="Featured image of post Collatz Conjecture" />&lt;h1 id="is-it-true-that-any-number-eventually-becomes-1--playing-with-the-collatz-conjecture">Is it true that &amp;ldquo;any number eventually becomes 1&amp;rdquo;? ── Playing with the Collatz Conjecture
&lt;/h1>&lt;p>Hello! I&amp;rsquo;m kenji.&lt;/p>
&lt;p>Suddenly, but if you hear &amp;ldquo;a rule where any number eventually becomes 1&amp;rdquo;,
isn&amp;rsquo;t it a bit mysterious?&lt;/p>
&lt;blockquote>
&lt;p>For example, 19, or 87, or even 1000000.
If you tweak the numbers according to appropriate rules, for some reason it converges to &amp;ldquo;1&amp;rdquo; at the end.&lt;/p>
&lt;/blockquote>
&lt;p>Such a dream-like story is the &lt;strong>Collatz Conjecture&lt;/strong>.&lt;/p>
&lt;hr>
&lt;h2 id="what-is-the-collatz-conjecture-anyway">What is the Collatz Conjecture anyway?
&lt;/h2>&lt;p>First, let me introduce the rules.&lt;/p>
&lt;ul>
&lt;li>
&lt;p>Start: Choose any &lt;strong>positive integer&lt;/strong>&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Operation:&lt;/p>
&lt;ul>
&lt;li>If it is even → Halve it (n → n / 2)&lt;/li>
&lt;li>If it is odd → Triple it and add 1 (n → 3n + 1)&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;p>If you repeat this forever, the conjecture says that &lt;strong>any number will eventually reach 1&lt;/strong>.&lt;/p>
&lt;p>For example, starting from &lt;code>6&lt;/code>:&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-fallback" data-lang="fallback">&lt;span class="line">&lt;span class="cl">6 → 3 → 10 → 5 → 16 → 8 → 4 → 2 → 1
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>It properly became &amp;ldquo;1&amp;rdquo;. Welcome back!&lt;/p>
&lt;hr>
&lt;h2 id="lets-do-it-in-code-collatz-in-python">Let&amp;rsquo;s do it in code: Collatz in Python
&lt;/h2>&lt;p>Now, in times like this, it&amp;rsquo;s faster to try it in code!
Let&amp;rsquo;s output the &amp;ldquo;Collatz sequence&amp;rdquo; in Python.&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt"> 1
&lt;/span>&lt;span class="lnt"> 2
&lt;/span>&lt;span class="lnt"> 3
&lt;/span>&lt;span class="lnt"> 4
&lt;/span>&lt;span class="lnt"> 5
&lt;/span>&lt;span class="lnt"> 6
&lt;/span>&lt;span class="lnt"> 7
&lt;/span>&lt;span class="lnt"> 8
&lt;/span>&lt;span class="lnt"> 9
&lt;/span>&lt;span class="lnt">10
&lt;/span>&lt;span class="lnt">11
&lt;/span>&lt;span class="lnt">12
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-python" data-lang="python">&lt;span class="line">&lt;span class="cl">&lt;span class="k">def&lt;/span> &lt;span class="nf">collatz&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">n&lt;/span>&lt;span class="p">):&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">steps&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="p">[&lt;/span>&lt;span class="n">n&lt;/span>&lt;span class="p">]&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="k">while&lt;/span> &lt;span class="n">n&lt;/span> &lt;span class="o">!=&lt;/span> &lt;span class="mi">1&lt;/span>&lt;span class="p">:&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="k">if&lt;/span> &lt;span class="n">n&lt;/span> &lt;span class="o">%&lt;/span> &lt;span class="mi">2&lt;/span> &lt;span class="o">==&lt;/span> &lt;span class="mi">0&lt;/span>&lt;span class="p">:&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">n&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="n">n&lt;/span> &lt;span class="o">//&lt;/span> &lt;span class="mi">2&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="k">else&lt;/span>&lt;span class="p">:&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">n&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="mi">3&lt;/span> &lt;span class="o">*&lt;/span> &lt;span class="n">n&lt;/span> &lt;span class="o">+&lt;/span> &lt;span class="mi">1&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">steps&lt;/span>&lt;span class="o">.&lt;/span>&lt;span class="n">append&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">n&lt;/span>&lt;span class="p">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="k">return&lt;/span> &lt;span class="n">steps&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1"># Example: Starting from 19&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="nb">print&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">collatz&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="mi">19&lt;/span>&lt;span class="p">))&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>When you execute it:&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-fallback" data-lang="fallback">&lt;span class="line">&lt;span class="cl">[19, 58, 29, 88, 44, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1]
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>It splendidly reaches 1.
Even though it takes quite a detour, it firmly reaches the goal at the end!&lt;/p>
&lt;p>By the way, even if you start from 29, it reaches 1 in the same way.&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-python" data-lang="python">&lt;span class="line">&lt;span class="cl">&lt;span class="nb">print&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">collatz&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="mi">29&lt;/span>&lt;span class="p">))&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>When you execute it:&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;span class="lnt">2
&lt;/span>&lt;span class="lnt">3
&lt;/span>&lt;span class="lnt">4
&lt;/span>&lt;span class="lnt">5
&lt;/span>&lt;span class="lnt">6
&lt;/span>&lt;span class="lnt">7
&lt;/span>&lt;span class="lnt">8
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-fallback" data-lang="fallback">&lt;span class="line">&lt;span class="cl">[27, 82, 41, 124, 62, 31, 94, 47, 142, 71, 214, 107, 322, 161, 484, 242,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">121, 364, 182, 91, 274, 137, 412, 206, 103, 310, 155, 466, 233, 700, 350,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">175, 526, 263, 790, 395, 1186, 593, 1780, 890, 445, 1336, 668, 334, 167,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">502, 251, 754, 377, 1132, 566, 283, 850, 425, 1276, 638, 319, 958, 479,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">1438, 719, 2158, 1079, 3238, 1619, 4858, 2429, 7288, 3644, 1822, 911,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">2734, 1367, 4102, 2051, 6154, 3077, 9232, 4616, 2308, 1154, 577, 1732,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">866, 433, 1300, 650, 325, 976, 488, 244, 122, 61, 184, 92, 46, 23, 70, 35,
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">106, 53, 160, 80, 40, 20, 10, 5, 16, 8, 4, 2, 1]
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>Surprisingly, it takes 111 steps!&lt;/p>
&lt;p>Moreover, there are scenes where it balloons to over 9000 along the way.
It&amp;rsquo;s a pattern that takes a huge detour before reaching the goal.&lt;/p>
&lt;hr>
&lt;h2 id="so-whats-amazing-about-it-in-the-end">So, what&amp;rsquo;s amazing about it in the end?
&lt;/h2>&lt;p>What&amp;rsquo;s amazing about this conjecture is,&lt;/p>
&lt;blockquote>
&lt;p>&lt;strong>Even though it hasn&amp;rsquo;t been proven, it seems to become 1 no matter what number you use&lt;/strong>&lt;/p>
&lt;/blockquote>
&lt;p>That&amp;rsquo;s the point.&lt;/p>
&lt;p>Eh? Then, what about 1 trillion, or 10 quadrillion&amp;hellip;?&lt;/p>
&lt;p>If you thought that, you are sharp.
Actually, it has been verified up to about &amp;ldquo;2 to the 68th power&amp;rdquo; using computers,
and &lt;strong>all have reached 1&lt;/strong>. Unbelievable&amp;hellip;&lt;/p>
&lt;p>But, &lt;strong>it hasn&amp;rsquo;t been theoretically proven that &amp;ldquo;it always happens&amp;rdquo;&lt;/strong>.
This is what they call an &amp;ldquo;unsolved problem&amp;rdquo; in the world of mathematics.&lt;/p>
&lt;hr>
&lt;h2 id="who-is-mr-collatz">Who is Mr. Collatz?
&lt;/h2>&lt;p>So, reading this far, you might wonder &amp;ldquo;who is Collatz anyway?&amp;rdquo;.
Let me introduce him properly!&lt;/p>
&lt;ul>
&lt;li>Name: &lt;strong>Lothar Collatz&lt;/strong>&lt;/li>
&lt;li>Nationality: Germany&lt;/li>
&lt;li>Year of birth: 1910 - 1990&lt;/li>
&lt;li>Title: Mathematician (Active in the fields of functional analysis and number theory)&lt;/li>
&lt;/ul>
&lt;p>He proposed this conjecture in 1937,
and since then, for over 80 years, &lt;strong>no one has been able to prove or disprove it&lt;/strong>.&lt;/p>
&lt;p>By the way, this problem is so simple yet so deep that
even Paul Erdős (a super famous mathematician) is said to have said this:&lt;/p>
&lt;blockquote>
&lt;p>&amp;ldquo;Mathematics may not be ready for such problems.&amp;rdquo;&lt;/p>
&lt;/blockquote>
&lt;p>In other words, the theory that human mathematics hasn&amp;rsquo;t caught up with this mystery yet&amp;hellip;&lt;/p>
&lt;hr>
&lt;h2 id="no-complex-math-formulas-are-necessary">No &amp;ldquo;complex math formulas&amp;rdquo; are necessary
&lt;/h2>&lt;p>The good thing about the Collatz Conjecture is that &lt;strong>anyone can play with it&lt;/strong>.&lt;/p>
&lt;p>You can do it if you have paper and pen.
If you write code in Python, you can test it automatically.
And yet, &lt;strong>cutting-edge mathematicians are seriously challenging it&lt;/strong>.&lt;/p>
&lt;p>Doesn&amp;rsquo;t it make you excited?&lt;/p>
&lt;hr>
&lt;h2 id="bonus-code-to-test-it-all-at-once">Bonus: Code to test it all at once
&lt;/h2>&lt;p>I&amp;rsquo;ll also include code to test various numbers all at once.&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;span class="lnt">2
&lt;/span>&lt;span class="lnt">3
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-python" data-lang="python">&lt;span class="line">&lt;span class="cl">&lt;span class="k">for&lt;/span> &lt;span class="n">n&lt;/span> &lt;span class="ow">in&lt;/span> &lt;span class="nb">range&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="mi">1&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="mi">21&lt;/span>&lt;span class="p">):&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">steps&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="n">collatz&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">n&lt;/span>&lt;span class="p">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nb">print&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="sa">f&lt;/span>&lt;span class="s2">&amp;#34;&lt;/span>&lt;span class="si">{&lt;/span>&lt;span class="n">n&lt;/span>&lt;span class="si">}&lt;/span>&lt;span class="s2">: &lt;/span>&lt;span class="si">{&lt;/span>&lt;span class="n">steps&lt;/span>&lt;span class="si">}&lt;/span>&lt;span class="s2"> (Steps: &lt;/span>&lt;span class="si">{&lt;/span>&lt;span class="nb">len&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">steps&lt;/span>&lt;span class="p">)&lt;/span>&lt;span class="o">-&lt;/span>&lt;span class="mi">1&lt;/span>&lt;span class="si">}&lt;/span>&lt;span class="s2">)&amp;#34;&lt;/span>&lt;span class="p">)&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>This outputs the Collatz sequences from &amp;ldquo;1 to 20&amp;rdquo; all at once.&lt;/p>
&lt;hr>
&lt;h2 id="conclusion-this-world-is-indeed-mysterious">Conclusion: This world is indeed mysterious
&lt;/h2>&lt;p>So, that&amp;rsquo;s the Collatz Conjecture.&lt;/p>
&lt;ul>
&lt;li>Even though it&amp;rsquo;s super simple&lt;/li>
&lt;li>No one can prove it&lt;/li>
&lt;li>It&amp;rsquo;s a huge problem in the math community&lt;/li>
&lt;/ul>
&lt;p>It&amp;rsquo;s an existence like a cluster of mysteries.&lt;/p>
&lt;p>Even programming beginners can try it, so please definitely play with it~!&lt;/p>
&lt;hr>
&lt;h2 id="recommended-links-for-interested-people">Recommended Links (For interested people)
&lt;/h2>&lt;ul>
&lt;li>&lt;a class="link" href="https://en.wikipedia.org/wiki/Collatz_conjecture" target="_blank" rel="noopener"
>Wikipedia: Collatz conjecture&lt;/a>&lt;/li>
&lt;li>&lt;a class="link" href="https://arxiv.org/abs/1909.03562" target="_blank" rel="noopener"
>Terence Tao Paper (English)&lt;/a>&lt;/li>
&lt;li>It&amp;rsquo;s also fun to try making a visualizer in Python! (I&amp;rsquo;ll make one if there&amp;rsquo;s a request)&lt;/li>
&lt;/ul>
&lt;hr>
&lt;p>If you want to know more about this kind of &amp;ldquo;mysterious math x programming&amp;rdquo; topics,
please feel free to request &amp;ldquo;tell me more&amp;rdquo;.
Eventually, I&amp;rsquo;ll introduce various things like the Riemann hypothesis and prime numbers!&lt;/p>
&lt;hr>
&lt;p>📮 The End!&lt;/p>
&lt;hr></description></item><item><title>Advantages and Disadvantages of Creating Programs with Win32API + C++</title><link>http://kenji.blog/en/p/win32api-c-%E3%81%A7%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%A0%E3%82%92%E4%BD%9C%E3%82%8B%E3%83%A1%E3%83%AA%E3%83%83%E3%83%88%E3%81%A8%E3%83%87%E3%83%A1%E3%83%AA%E3%83%83%E3%83%88/</link><pubDate>Sat, 12 Jul 2025 12:30:35 +0900</pubDate><guid>http://kenji.blog/en/p/win32api-c-%E3%81%A7%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%A0%E3%82%92%E4%BD%9C%E3%82%8B%E3%83%A1%E3%83%AA%E3%83%83%E3%83%88%E3%81%A8%E3%83%87%E3%83%A1%E3%83%AA%E3%83%83%E3%83%88/</guid><description>&lt;img src="http://kenji.blog/p/win32api-c-%E3%81%A7%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%A0%E3%82%92%E4%BD%9C%E3%82%8B%E3%83%A1%E3%83%AA%E3%83%83%E3%83%88%E3%81%A8%E3%83%87%E3%83%A1%E3%83%AA%E3%83%83%E3%83%88/img_1.png" alt="Featured image of post Advantages and Disadvantages of Creating Programs with Win32API + C++" />&lt;h1 id="the-appeal-and-challenges-of-developing-with-win32api--c">The Appeal and Challenges of Developing with Win32API + C++
&lt;/h1>&lt;p>For those who want to master Windows application development, &lt;strong>Win32API + C++&lt;/strong> remains a powerful option today.
This combination, which allows for interacting with the OS at the closest distance, combines high speed and flexibility.&lt;/p>
&lt;p>On the other hand, since it is vastly different from modern development styles, learning it requires dedication.&lt;/p>
&lt;p>On this page, from the perspective of an &lt;strong>active Windows app developer&lt;/strong>, we explain its advantages and disadvantages in an easy-to-understand manner.&lt;/p>
&lt;hr>
&lt;h2 id="advantages">Advantages
&lt;/h2>&lt;h3 id="ultra-fast-native-execution">Ultra-Fast Native Execution
&lt;/h3>&lt;p>Because C++ and Win32API operate at the layer closest to the OS, there is almost no unnecessary overhead.
It boasts &lt;strong>overwhelming execution speed&lt;/strong> and highly efficient use of CPU and memory.&lt;/p>
&lt;h3 id="high-flexibility-and-freedom">High Flexibility and Freedom
&lt;/h3>&lt;p>You can &lt;strong>minutely control all aspects of an application yourself&lt;/strong>, such as window control, asynchronous processing, COM integration, and process management.
It&amp;rsquo;s also possible to build purpose-built tools and your own custom frameworks.&lt;/p>
&lt;h3 id="easy-to-distribute-without-runtimes">Easy to Distribute Without Runtimes
&lt;/h3>&lt;p>Since external runtimes like .NET or Java are unnecessary, it &lt;strong>can be distributed as a single executable file&lt;/strong>.
Troubles during redistribution are less likely to occur, and it&amp;rsquo;s appealing that it can easily run without an installer.&lt;/p>
&lt;h3 id="capable-of-creating-lightweight-apps">Capable of Creating Lightweight Apps
&lt;/h3>&lt;p>Because it requires only a bare-minimum configuration, a major feature is its &lt;strong>extremely small memory footprint&lt;/strong>.
It runs comfortably even on low-spec PCs or in virtual machine environments.&lt;/p>
&lt;h3 id="advanced-os-level-control-is-possible">Advanced OS-Level Control is Possible
&lt;/h3>&lt;p>Global hooks for mouse and keyboard, fine-tuning of window styles, manipulation of system menus, and other forms of control that are &lt;strong>difficult with standard languages and libraries&lt;/strong> can be realized.&lt;/p>
&lt;hr>
&lt;h2 id="disadvantages">Disadvantages
&lt;/h2>&lt;h3 id="low-development-efficiency">Low Development Efficiency
&lt;/h3>&lt;p>GUI construction must also be done entirely in code, and &lt;strong>creating a single button can sometimes require dozens of lines of code&lt;/strong>.
Modifications during design changes are also cumbersome, making productivity lower compared to developing with UI frameworks.&lt;/p>
&lt;h3 id="maintainability-tends-to-decrease">Maintainability Tends to Decrease
&lt;/h3>&lt;p>The code often has a &lt;strong>specialized structure&lt;/strong>, such as message loops and window procedures, leading to issues with readability and reusability.
It also has aspects that make it unsuitable for team development and long-term maintenance.&lt;/p>
&lt;h3 id="difficult-to-support-modern-ui">Difficult to Support Modern UI
&lt;/h3>&lt;p>Supporting UX expected in recent years, such as high DPI support, touch interfaces, accessibility, and dark mode, is &lt;strong>difficult&lt;/strong>.
Each must be handled manually one by one, which requires a lot of effort.&lt;/p>
&lt;h3 id="no-cross-platform-support">No Cross-Platform Support
&lt;/h3>&lt;p>Because it is a completely Windows-exclusive API, it &lt;strong>cannot be ported to macOS or Linux&lt;/strong>.
If you are planning multi-platform deployment, you will need to select other technologies.&lt;/p>
&lt;h3 id="extremely-high-learning-cost">Extremely High Learning Cost
&lt;/h3>&lt;p>You must understand &lt;strong>concepts and mechanisms that are rarely used today&lt;/strong>, such as handles, GDI, COM, and OLE.
Much of the documentation is old, requiring time and perseverance to learn.&lt;/p>
&lt;hr>
&lt;h2 id="suitable-uses">Suitable Uses
&lt;/h2>&lt;ul>
&lt;li>&lt;strong>Lightweight tools&lt;/strong> such as file launchers and hotkey assistants&lt;/li>
&lt;li>&lt;strong>System utilities&lt;/strong> like clipboard manipulation and IME control&lt;/li>
&lt;li>&lt;strong>Native control applications&lt;/strong> like global hooks and window captures&lt;/li>
&lt;li>&lt;strong>Driver auxiliary tools&lt;/strong> that work closely with hardware&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h2 id="unsuitable-uses">Unsuitable Uses
&lt;/h2>&lt;ul>
&lt;li>&lt;strong>General consumer apps&lt;/strong> where modern UI/UX is important&lt;/li>
&lt;li>&lt;strong>Prototyping and MVP development&lt;/strong> built with a priority on speed&lt;/li>
&lt;li>&lt;strong>Large-scale projects&lt;/strong> intended for long-term operation and team development&lt;/li>
&lt;li>&lt;strong>Cross-platform products&lt;/strong> that need to support multiple OSs&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h2 id="evaluation-summary">Evaluation Summary
&lt;/h2>&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Aspect&lt;/th>
&lt;th>Evaluation&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>Execution Speed&lt;/td>
&lt;td>◎ Very Fast&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Memory Efficiency&lt;/td>
&lt;td>◎ Excellent&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Development Speed&lt;/td>
&lt;td>× Slow&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Maintainability&lt;/td>
&lt;td>× Low&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Cross-Platform Support&lt;/td>
&lt;td>× Not Supported&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Modern UI Support&lt;/td>
&lt;td>× Weak&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Freedom of OS Control&lt;/td>
&lt;td>◎ Overwhelmingly High&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;hr>
&lt;h2 id="conclusion">Conclusion
&lt;/h2>&lt;p>&lt;strong>Win32API + C++ is a tool suited for developers who want to &amp;ldquo;handle everything in the OS themselves.&amp;rdquo;&lt;/strong>
While its power is immense, learning and operating it requires a corresponding level of dedication.&lt;/p>
&lt;blockquote>
&lt;p>Whether it&amp;rsquo;s worth &amp;ldquo;daring to choose&amp;rdquo; it depends entirely on the nature of the app you are aiming for.&lt;/p>
&lt;/blockquote>
&lt;hr>
&lt;p>Diving into the world of &lt;code>#include &amp;lt;windows.h&amp;gt;&lt;/code> without relying on GUI frameworks or modern languages――
That choice still remains meaningful today.&lt;/p></description></item><item><title>Collection of Fonts Useful for Programming</title><link>http://kenji.blog/en/p/%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%9F%E3%83%B3%E3%82%B0%E3%81%A7%E4%BD%BF%E3%81%88%E3%82%8B%E3%83%95%E3%82%A9%E3%83%B3%E3%83%88%E9%9B%86/</link><pubDate>Sat, 30 Mar 2024 02:21:31 +0900</pubDate><guid>http://kenji.blog/en/p/%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%9F%E3%83%B3%E3%82%B0%E3%81%A7%E4%BD%BF%E3%81%88%E3%82%8B%E3%83%95%E3%82%A9%E3%83%B3%E3%83%88%E9%9B%86/</guid><description>&lt;img src="http://kenji.blog/p/%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%9F%E3%83%B3%E3%82%B0%E3%81%A7%E4%BD%BF%E3%81%88%E3%82%8B%E3%83%95%E3%82%A9%E3%83%B3%E3%83%88%E9%9B%86/img.png" alt="Featured image of post Collection of Fonts Useful for Programming" />&lt;h2 id="jetbrains-mono">JetBrains Mono
&lt;/h2>&lt;p>An open-source programming font provided by JetBrains.&lt;/p>
&lt;p>Download: &lt;a class="link" href="https://www.jetbrains.com/ja-jp/lp/mono/" target="_blank" rel="noopener"
>https://www.jetbrains.com/ja-jp/lp/mono/&lt;/a>&lt;/p>
&lt;h2 id="hackgen">HackGen
&lt;/h2>&lt;p>HackGen is a programming font that combines the English programming font Hack with Genjyuu Gothic, a derivative of Source Han Sans.&lt;/p>
&lt;p>Download: &lt;a class="link" href="https://github.com/yuru7/HackGen/releases" target="_blank" rel="noopener"
>https://github.com/yuru7/HackGen/releases&lt;/a>&lt;/p>
&lt;h2 id="ricty-diminished">Ricty Diminished
&lt;/h2>&lt;p>&lt;code>Ricty Diminished&lt;/code> is a sister font to &lt;code>Ricty&lt;/code>. Instead of &lt;code>Inconsolata&lt;/code> and &lt;code>Migu 1M&lt;/code>, it is synthesized using &lt;code>Inconsolata&lt;/code> and &lt;code>Circle M+ 1m&lt;/code> with the &lt;code>Ricty&lt;/code> generation script. Since it does not include IPA Gothic glyphs, the number of available kanji glyphs is limited, but in exchange, it can be distributed under the &lt;code>SIL Open Font License&lt;/code>.&lt;/p>
&lt;p>Download: &lt;a class="link" href="https://rictyfonts.github.io/diminished" target="_blank" rel="noopener"
>https://rictyfonts.github.io/diminished&lt;/a>&lt;/p>
&lt;h2 id="cica">Cica
&lt;/h2>&lt;p>It uses &lt;code>Hack&lt;/code> + &lt;code>DejaVu Sans Mono&lt;/code> for alphanumeric characters and symbols.
For other characters, it uses &lt;code>Rounded Mgen+&lt;/code>. It is a programming font designed for coding.&lt;/p>
&lt;p>Download: &lt;a class="link" href="https://github.com/miiton/Cica/releases" target="_blank" rel="noopener"
>https://github.com/miiton/Cica/releases&lt;/a>&lt;/p>
&lt;p>References:&lt;/p>
&lt;ul>
&lt;li>&lt;a class="link" href="https://sourcefoundry.org/hack/" target="_blank" rel="noopener"
>Hack&lt;/a>&lt;/li>
&lt;li>&lt;a class="link" href="https://dejavu-fonts.github.io/" target="_blank" rel="noopener"
>DejaVu Sans Mono&lt;/a>&lt;/li>
&lt;li>&lt;a class="link" href="http://jikasei.me/font/rounded-mgenplus/" target="_blank" rel="noopener"
>Rounded Mgen+&lt;/a>&lt;/li>
&lt;/ul>
&lt;h2 id="migu">Migu
&lt;/h2>&lt;p>A synthesized font of M+ and IPA.&lt;/p>
&lt;p>Download: &lt;a class="link" href="https://itouhiro.github.io/mixfont-mplus-ipa/migu/" target="_blank" rel="noopener"
>https://itouhiro.github.io/mixfont-mplus-ipa/migu/&lt;/a>&lt;/p>
&lt;h2 id="osaka">Osaka
&lt;/h2>&lt;p>A font that allows you to use &lt;code>Osaka&lt;/code>, a standard Mac OS font, on Windows.&lt;/p>
&lt;p>Download: &lt;a class="link" href="http://ifs.nog.cc/osakattf.hp.infoseek.co.jp/" target="_blank" rel="noopener"
>http://ifs.nog.cc/osakattf.hp.infoseek.co.jp/&lt;/a>&lt;/p>
&lt;h2 id="plemoljp">PlemolJP
&lt;/h2>&lt;p>A programming font that combines IBM&amp;rsquo;s open-source Japanese font &lt;code>IBM Plex Sans JP&lt;/code> with &lt;code>IBM Plex Mono&lt;/code>, also from IBM&amp;rsquo;s Plex series.&lt;/p>
&lt;p>Download: &lt;a class="link" href="https://github.com/yuru7/PlemolJP/releases" target="_blank" rel="noopener"
>https://github.com/yuru7/PlemolJP/releases&lt;/a>&lt;/p></description></item><item><title>[By Language] Summary of Online Code Execution Environments</title><link>http://kenji.blog/en/p/%E3%82%AA%E3%83%B3%E3%83%A9%E3%82%A4%E3%83%B3%E3%81%AE%E3%82%B3%E3%83%BC%E3%83%89%E5%AE%9F%E8%A1%8C%E7%92%B0%E5%A2%83%E3%81%BE%E3%81%A8%E3%82%81/</link><pubDate>Sun, 09 Apr 2023 14:01:00 +0900</pubDate><guid>http://kenji.blog/en/p/%E3%82%AA%E3%83%B3%E3%83%A9%E3%82%A4%E3%83%B3%E3%81%AE%E3%82%B3%E3%83%BC%E3%83%89%E5%AE%9F%E8%A1%8C%E7%92%B0%E5%A2%83%E3%81%BE%E3%81%A8%E3%82%81/</guid><description>&lt;img src="http://kenji.blog/p/%E3%82%AA%E3%83%B3%E3%83%A9%E3%82%A4%E3%83%B3%E3%81%AE%E3%82%B3%E3%83%BC%E3%83%89%E5%AE%9F%E8%A1%8C%E7%92%B0%E5%A2%83%E3%81%BE%E3%81%A8%E3%82%81/img.png" alt="Featured image of post [By Language] Summary of Online Code Execution Environments" />&lt;h2 id="python">Python
&lt;/h2>&lt;ul>
&lt;li>&lt;a class="link" href="https://colab.research.google.com/#create=true" target="_blank" rel="noopener"
>Google Colaboratory&lt;/a>&lt;/li>
&lt;/ul>
&lt;p>Google Colaboratory is an online execution environment for Python.&lt;/p>
&lt;ul>
&lt;li>GPU usage is possible.&lt;/li>
&lt;li>With Colab notebooks, you can combine executable code and rich text (images, HTML, LaTeX, etc.) in a single document.&lt;/li>
&lt;/ul>
&lt;p>It is based on Jupyter Notebook.&lt;/p>
&lt;h2 id="rust">Rust
&lt;/h2>&lt;ul>
&lt;li>&lt;a class="link" href="https://play.rust-lang.org/?version=stable&amp;amp;mode=debug&amp;amp;edition=2021" target="_blank" rel="noopener"
>Rust Playground&lt;/a>&lt;/li>
&lt;/ul>
&lt;h2 id="javascript">JavaScript
&lt;/h2>&lt;ul>
&lt;li>&lt;a class="link" href="https://playcode.io/" target="_blank" rel="noopener"
>Javascript Playground&lt;/a>&lt;/li>
&lt;/ul>
&lt;h2 id="java">Java
&lt;/h2>&lt;ul>
&lt;li>&lt;a class="link" href="https://paiza.io/ja/projects/new?language=java" target="_blank" rel="noopener"
>paiza.IO Online Java compiler&lt;/a>&lt;/li>
&lt;/ul>
&lt;h2 id="haskell">Haskell
&lt;/h2>&lt;ul>
&lt;li>&lt;a class="link" href="https://play.haskell.org/" target="_blank" rel="noopener"
>Haskell Playground&lt;/a>&lt;/li>
&lt;/ul>
&lt;h2 id="swift">Swift
&lt;/h2>&lt;ul>
&lt;li>&lt;a class="link" href="https://online.swiftplayground.run/" target="_blank" rel="noopener"
>Online Swift Playground&lt;/a>&lt;/li>
&lt;/ul>
&lt;h2 id="c">C++
&lt;/h2>&lt;ul>
&lt;li>&lt;a class="link" href="https://www.onlinegdb.com/online_c&amp;#43;&amp;#43;_compiler" target="_blank" rel="noopener"
>C++ 14&lt;/a>&lt;/li>
&lt;/ul>
&lt;h2 id="others">Others
&lt;/h2>&lt;ul>
&lt;li>&lt;a class="link" href="https://aws.amazon.com/jp/cloud9/" target="_blank" rel="noopener"
>AWS Cloud9&lt;/a>&lt;/li>
&lt;/ul>
&lt;p>An online integrated development environment provided by Amazon AWS. Tools for over 40 programming languages such as Node.js, JavaScript, Python, PHP, Ruby, Go, and C++ are pre-packaged.&lt;/p>
&lt;ul>
&lt;li>&lt;a class="link" href="https://vscode.dev/" target="_blank" rel="noopener"
>Visual Studio Code for the Web&lt;/a>&lt;/li>
&lt;/ul>
&lt;p>An online development environment provided by Microsoft. However, languages that require compilation cannot be executed or debugged.&lt;/p>
&lt;ul>
&lt;li>&lt;a class="link" href="https://paiza.io/projects/CGAcQLfW-IOXYy8Dq2OHBw?locale=ja-jp" target="_blank" rel="noopener"
>paiza.IO&lt;/a>&lt;/li>
&lt;/ul>
&lt;p>An online execution environment supporting 24 major languages such as C, C++, Java, Ruby, Python, PHP, Perl, etc.&lt;/p>
&lt;ul>
&lt;li>&lt;a class="link" href="https://codepen.io/" target="_blank" rel="noopener"
>CodePen&lt;/a>&lt;/li>
&lt;/ul>
&lt;p>An online execution environment for HTML, CSS, and JavaScript.&lt;/p>
&lt;ul>
&lt;li>&lt;a class="link" href="https://codeanywhere.com/" target="_blank" rel="noopener"
>codeanywhere&lt;/a>&lt;/li>
&lt;/ul>
&lt;p>An online IDE. Allows code sharing and chatting.&lt;/p></description></item></channel></rss>