<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Posts on khz</title><link>https://blog.khzaw.dev/posts/</link><description>Recent content in Posts on khz</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Sun, 22 Feb 2026 00:00:00 +0800</lastBuildDate><atom:link href="https://blog.khzaw.dev/posts/index.xml" rel="self" type="application/rss+xml"/><item><title>A self-tuning kubernetes homelab</title><link>https://blog.khzaw.dev/posts/self-tuning-kubernetes-homelab/</link><pubDate>Sun, 22 Feb 2026 00:00:00 +0800</pubDate><guid>https://blog.khzaw.dev/posts/self-tuning-kubernetes-homelab/</guid><description>&lt;p&gt;Every now and then, I wake up to a pull request. It looks something like this:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://blog.khzaw.dev/img/self-tuning-kubernetes-homelab/tune-pr_hu_8ca187341fae4fb4.webp" alt="A tuning PR opened automatically by the resource-advisor CronJob" loading="lazy" decoding="async" width="923" height="971"&gt;&lt;/p&gt;
&lt;p&gt;The diff is a handful of Kubernetes resource request and limit changes across a couple of HelmRelease manifests. The PR description explains why each change was made: which containers need more memory, which ones are overprovisioned, how the proposed state fits on each node. I review it, click merge, and &lt;a href="https://fluxcd.io/"&gt;Flux&lt;/a&gt; rolls it out. That&amp;rsquo;s it.&lt;/p&gt;</description></item><item><title>Reflection</title><link>https://blog.khzaw.dev/posts/reflection/</link><pubDate>Fri, 20 Apr 2018 00:00:00 +0800</pubDate><guid>https://blog.khzaw.dev/posts/reflection/</guid><description>&lt;figure&gt;&lt;img src="https://blog.khzaw.dev/img/reflection_hu_c468cb8ed55a04a1.webp" alt="" loading="lazy" decoding="async" width="1662" height="827"&gt;&lt;/figure&gt;

&lt;h2 id="learning"&gt;Learning&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://serverless.com/" title="Serverless"&gt;Serverless&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://boz.com/articles/career-cold-start.html" title="A Career Cold Start Algorithm"&gt;A Career Cold Start Algorithm&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://code.facebook.com/posts/1716776591680069/react-16-a-look-inside-an-api-compatible-rewrite-of-our-frontend-ui-library/" title="React 16"&gt;React 16&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id="reading"&gt;Reading&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://martinfowler.com/articles/serverless.html" title="Serverless Architectures"&gt;Serverless Architectures&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://frontiermyanmar.net/en/features/battle-of-the-fonts" title="Battle of the Fonts"&gt;Battle of the Fonts&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://medium.com/feature-creep/the-software-engineer-s-guide-to-asserting-office-dominance-ddea7b598df7" title="The software engineer's guide to asserting dominance in the workplace"&gt;The software engineer&amp;rsquo;s guide to asserting dominance in the workplace&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.goodreads.com/book/show/29965800-the-subtle-art-of-not-giving-a-f-ck" title="The Subtle Art of not Giving a F*ck"&gt;The Subtle Art of not Giving a F*ck&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;After all, the only way to overcome pain is to first learn how to bear.&lt;/p&gt;</description></item><item><title>Self-referencing Keys in JavaScript Object Declarations</title><link>https://blog.khzaw.dev/posts/self-references-in-object-declarations-in-javascript/</link><pubDate>Tue, 21 Mar 2017 00:00:00 +0800</pubDate><guid>https://blog.khzaw.dev/posts/self-references-in-object-declarations-in-javascript/</guid><description>&lt;p&gt;Often times while programming in JavaScript, which I have been doing a lot lately, I find myself wanting to refer to a key that I have just declared when I am initializing an object.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-javascript" data-lang="javascript"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kr"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;myNewObj&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="nx"&gt;a&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;xxx&amp;#39;&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="nx"&gt;b&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;yyy&amp;#39;&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="nx"&gt;c&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// doesn&amp;#39;t work
&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;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;myNewObj&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;c&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// undefined
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Here, neither &lt;code&gt;a&lt;/code&gt; or &lt;code&gt;this.b&lt;/code&gt; would work since there is no &lt;code&gt;a&lt;/code&gt; yet while &lt;code&gt;c&lt;/code&gt; is being defined and &lt;code&gt;this&lt;/code&gt; does not refer to &lt;code&gt;myNewObj&lt;/code&gt;. Obviously, you could define &lt;code&gt;xxx&lt;/code&gt; and &lt;code&gt;yyy&lt;/code&gt; in separate variables first and refer to them later in the object initialization. Or you could initialize the object without &lt;code&gt;c&lt;/code&gt; key and later define &lt;code&gt;c&lt;/code&gt; as &lt;code&gt;myNewObj.c = myNewObj.a + myNewObj.b;&lt;/code&gt;. But a neater way that I found out is to utilize &lt;code&gt;getters&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>Finding A Knight's Tour</title><link>https://blog.khzaw.dev/posts/finding-a-knights-tour/</link><pubDate>Fri, 12 Feb 2016 00:00:00 +0800</pubDate><guid>https://blog.khzaw.dev/posts/finding-a-knights-tour/</guid><description>&lt;figure&gt;&lt;img src="https://blog.khzaw.dev/img/chess-knight_hu_dc022dd327205ba2.webp" alt="" loading="lazy" decoding="async" width="1024" height="685"&gt;&lt;/figure&gt;

&lt;p&gt;A Knight&amp;rsquo;s Tour is a sequence of moves done by a knight on a chessboard such that it visits each and every square exactly once. Subsequently, the objective of &lt;a href="https://en.wikipedia.org/wiki/Knight%27s_tour"&gt;the Knight&amp;rsquo;s Tour problem&lt;/a&gt; is to determine whether there exists a Knight&amp;rsquo;s Tour from a given starting position. In graph theory terms, it is a form of Hamiltonian path where you visit each vertex of the graph exactly once along the path. Tours can also be &lt;strong&gt;cyclic&lt;/strong&gt; or &lt;strong&gt;closed&lt;/strong&gt; if the final square is a knight&amp;rsquo;s move away from the first and &lt;strong&gt;acyclic&lt;/strong&gt; or &lt;strong&gt;open&lt;/strong&gt; otherwise.&lt;/p&gt;</description></item><item><title>A Look-back at 2015</title><link>https://blog.khzaw.dev/posts/a-look-back-at-2015/</link><pubDate>Thu, 31 Dec 2015 00:00:00 +0800</pubDate><guid>https://blog.khzaw.dev/posts/a-look-back-at-2015/</guid><description>&lt;figure&gt;&lt;img src="https://blog.khzaw.dev/img/hand-with-reflecting-globe_hu_471dc9b38a306d5e.webp" alt="Hand with Reflecting Globe by M. C. Escher" loading="lazy" decoding="async" width="567" height="850"&gt;&lt;figcaption&gt;Hand with Reflecting Globe by M. C. Escher&lt;/figcaption&gt;&lt;/figure&gt;

&lt;p&gt;As the year comes to a close, I would like to take a moment to reflect on 2015. Looking back, it will mostly be remembered as the year I dealt with depression and self-esteem issues. Other than the endeavour to conquer my inner demons, I made a couple of new friends and acquaintances, lost some, burnt some bridges, built new ones, discovered new pastimes and grew out of some old ones. In the grand scheme of things, it wasn&amp;rsquo;t a very fruitful year as I wished it would be.&lt;/p&gt;</description></item></channel></rss>