<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by ZhangJie (Kn) on Medium]]></title>
        <description><![CDATA[Stories by ZhangJie (Kn) on Medium]]></description>
        <link>https://medium.com/@hitzhangjie?source=rss-e879ddf1d25e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*g-CnePnBwUJmc1hp_mjuoA.jpeg</url>
            <title>Stories by ZhangJie (Kn) on Medium</title>
            <link>https://medium.com/@hitzhangjie?source=rss-e879ddf1d25e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 16:46:12 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@hitzhangjie/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[TopNotch: reclaim the macbook screen]]></title>
            <link>https://hitzhangjie.medium.com/topnotch-reclaim-the-macbook-screen-3a397d7a53c0?source=rss-e879ddf1d25e------2</link>
            <guid isPermaLink="false">https://medium.com/p/3a397d7a53c0</guid>
            <category><![CDATA[apps]]></category>
            <category><![CDATA[macbook]]></category>
            <category><![CDATA[productivity-tools]]></category>
            <category><![CDATA[apple]]></category>
            <category><![CDATA[notch]]></category>
            <dc:creator><![CDATA[ZhangJie (Kn)]]></dc:creator>
            <pubDate>Tue, 27 Oct 2026 09:51:17 GMT</pubDate>
            <atom:updated>2026-10-27T09:51:17.262Z</atom:updated>
            <content:encoded><![CDATA[<p>A small app to hide the notch — and why I built it</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*FhippO0MGRBhNxVk.jpg" /><figcaption><a href="https://hitzhangjie.itch.io/topnotch">itch.io/topnotch</a></figcaption></figure><p>For some reason, the MacBook Pro ended up with a notch. Some people love it. Some people hate it.</p><p>I genuinely envy the friends who’ve turned that strip into a playground — tap it to open an app, glance at the calendar or the weather, check and control music, stack several notch apps at once. Someone even built a little “dock” just to manage them all.</p><p><strong>I’m serious: I really do envy that crowd of users and developers. They look at the problem differently. They make use of it instead of complaining about it.</strong></p><p><strong>Unfortunately, I’m not one of them. Maybe I’m more conservative about new design. Maybe I just prefer something cleaner. Or maybe I don’t want to dodge one problem by inviting a bunch of new ones. Anyway — whether it’s taste or habit — I really don’t want the notch.</strong> And yet both of my machines, an M1 and an M4 MacBook Pro, still have it. They’re fantastic laptops, especially on battery: I can work five to eight hours straight on a China high-speed rail without worrying about the charge. The only thing that keeps pulling at my attention is that notch.</p><p>When the notch first showed up, developers built apps that faked a hide by controlling the color of the wallpaper’s menu-bar strip. I actually liked that approach. A few years on, though, those apps are barely maintained, and they no longer work properly on newer macOS versions.</p><p><strong>In the AI era, solving a small, personal customization like this is much easier. I could build an app the way I actually use a Mac: nothing big or all-in-one — just a simple Launch at Login helper that sets the menu-bar strip color from the wallpaper.</strong> I even added support for dynamic and video wallpapers, with the technical limits that come with that. The idea alone felt like a rare kind of ease and freedom. We can build what we want, instead of depending on someone else who no longer has the time or the will to keep maintaining it.</p><p>That’s how <a href="https://hitzhangjie.itch.io/topnotch">TopNotch</a> happened. I spent about a week building and testing it, and I learned how many technical edges sit behind something that looks simple. The core problem, though, isn’t “perfect on every wallpaper with zero side effects.” It’s not wanting to be distracted by the notch. Some issues don’t need solving — you work around them, then put your energy where it actually belongs.</p><p>So I built TopNotch: hide the notch, reclaim a little screen, cut down on the distraction. That’s the whole pitch. I’m not trying to get rich from this app — it couldn’t make much money anyway. But I do believe paying is a real positive incentive. In the AI era, it helps keep small tools maintained, so users aren’t stuck hunting for replacements when an author walks away. AI is powerful, but not everyone wants to build something from scratch. It still takes real effort.</p><p><strong>How it works</strong></p><p>TopNotch hides the notch by painting the wallpaper’s menu-bar strip black. That needs read-write access to the system wallpaper store.</p><p><strong>Features</strong></p><ul><li><strong>Enabled</strong> — Turns wallpaper masking on, or restores the originals when you turn it off.</li><li><strong>Built-in display only</strong> — Limits masking and rounded-corner fills to the Mac’s built-in display.</li><li><strong>Fill rounded corners</strong> — Fills the small gaps beside rounded display corners.</li><li><strong>Launch at login</strong> — Starts TopNotch automatically after you sign in.</li><li><strong>Per-Space wallpapers</strong> — Masks each existing Space from its own static or video wallpaper.</li><li><strong>Restore Wallpapers &amp; Reset</strong> — Restores recorded originals and removes TopNotch’s processed wallpaper files.</li><li><strong>Hide</strong> — Removes the menu bar icon while TopNotch keeps running. Open it again from Applications or Spotlight to show the icon until the next launch.</li></ul><p>If you need something like this, you can try it for only $2: <a href="https://hitzhangjie.itch.io/topnotch">hitzhangjie.itch.io/topnotch</a>. Your support goes toward token costs while I keep exploring and shipping small tools people might actually need.</p><p>Enjoy it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3a397d7a53c0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cross-Certificates: The Cryptographic Bridge That Keeps the Internet Working]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://hitzhangjie.medium.com/cross-certificates-the-cryptographic-bridge-that-keeps-the-internet-working-0c94a36b27f8?source=rss-e879ddf1d25e------2"><img src="https://cdn-images-1.medium.com/max/2550/1*Bqmkl8EzI3YlWEo8BDRz4Q.png" width="2550"></a></p><p class="medium-feed-snippet">When GlobalSign decided to migrate from its aging Root R3 to the newer Root R46, it created a paradox: the very upgrade meant to improve&#x2026;</p><p class="medium-feed-link"><a href="https://hitzhangjie.medium.com/cross-certificates-the-cryptographic-bridge-that-keeps-the-internet-working-0c94a36b27f8?source=rss-e879ddf1d25e------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://hitzhangjie.medium.com/cross-certificates-the-cryptographic-bridge-that-keeps-the-internet-working-0c94a36b27f8?source=rss-e879ddf1d25e------2</link>
            <guid isPermaLink="false">https://medium.com/p/0c94a36b27f8</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[information-security]]></category>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[communication]]></category>
            <category><![CDATA[tls-certificate]]></category>
            <dc:creator><![CDATA[ZhangJie (Kn)]]></dc:creator>
            <pubDate>Tue, 30 Jun 2026 07:46:31 GMT</pubDate>
            <atom:updated>2026-06-30T07:46:31.189Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[TCP’s Dirty Little Secret: Why Write() Returning Success Means Almost Nothing]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://blog.stackademic.com/tcps-dirty-little-secret-why-write-returning-success-means-almost-nothing-fc824be32600?source=rss-e879ddf1d25e------2"><img src="https://cdn-images-1.medium.com/max/1080/0*vlvl8EIndRRXpSnr" width="1080"></a></p><p class="medium-feed-snippet">A colleague pinged me the other day with a question that stopped me cold: &#x201C;In our RPC framework, if send doesn&apos;t return an error, can we&#x2026;</p><p class="medium-feed-link"><a href="https://blog.stackademic.com/tcps-dirty-little-secret-why-write-returning-success-means-almost-nothing-fc824be32600?source=rss-e879ddf1d25e------2">Continue reading on Stackademic »</a></p></div>]]></description>
            <link>https://blog.stackademic.com/tcps-dirty-little-secret-why-write-returning-success-means-almost-nothing-fc824be32600?source=rss-e879ddf1d25e------2</link>
            <guid isPermaLink="false">https://medium.com/p/fc824be32600</guid>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[tcp]]></category>
            <category><![CDATA[golang]]></category>
            <category><![CDATA[distributed-systems]]></category>
            <dc:creator><![CDATA[ZhangJie (Kn)]]></dc:creator>
            <pubDate>Fri, 26 Jun 2026 06:46:31 GMT</pubDate>
            <atom:updated>2026-06-26T06:46:31.725Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[The Two Faces of GC Barriers: Why Java (ZGC) Reads and Go Writes]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://blog.stackademic.com/the-two-faces-of-gc-barriers-why-java-zgc-reads-and-go-writes-9cae1632f901?source=rss-e879ddf1d25e------2"><img src="https://cdn-images-1.medium.com/max/1168/1*GA8uGPUf_JmDqlJYI5rDFg.png" width="1168"></a></p><p class="medium-feed-snippet">If you&#x2019;ve spent any time in the weeds of garbage collection, you&#x2019;ve probably heard the term &#x201C;GC barrier&#x201D; thrown around. And if you&#x2019;re like&#x2026;</p><p class="medium-feed-link"><a href="https://blog.stackademic.com/the-two-faces-of-gc-barriers-why-java-zgc-reads-and-go-writes-9cae1632f901?source=rss-e879ddf1d25e------2">Continue reading on Stackademic »</a></p></div>]]></description>
            <link>https://blog.stackademic.com/the-two-faces-of-gc-barriers-why-java-zgc-reads-and-go-writes-9cae1632f901?source=rss-e879ddf1d25e------2</link>
            <guid isPermaLink="false">https://medium.com/p/9cae1632f901</guid>
            <category><![CDATA[java]]></category>
            <category><![CDATA[golang]]></category>
            <category><![CDATA[golang-development]]></category>
            <category><![CDATA[golang-tutorial]]></category>
            <dc:creator><![CDATA[ZhangJie (Kn)]]></dc:creator>
            <pubDate>Mon, 22 Jun 2026 07:34:59 GMT</pubDate>
            <atom:updated>2026-06-24T07:23:38.196Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[The Art of Concurrent GC: How Go’s Hybrid Write Barrier Tamed Garbage Collection]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://blog.stackademic.com/the-art-of-concurrent-gc-how-gos-hybrid-write-barrier-tamed-garbage-collection-555c6f3b0bd2?source=rss-e879ddf1d25e------2"><img src="https://cdn-images-1.medium.com/max/1400/1*wx8hmNitkYK4aY6Z9dZ1rQ.png" width="1400"></a></p><p class="medium-feed-snippet">Designing a concurrent garbage collector that can accurately identify live objects without stopping your program is one of the most&#x2026;</p><p class="medium-feed-link"><a href="https://blog.stackademic.com/the-art-of-concurrent-gc-how-gos-hybrid-write-barrier-tamed-garbage-collection-555c6f3b0bd2?source=rss-e879ddf1d25e------2">Continue reading on Stackademic »</a></p></div>]]></description>
            <link>https://blog.stackademic.com/the-art-of-concurrent-gc-how-gos-hybrid-write-barrier-tamed-garbage-collection-555c6f3b0bd2?source=rss-e879ddf1d25e------2</link>
            <guid isPermaLink="false">https://medium.com/p/555c6f3b0bd2</guid>
            <category><![CDATA[golang-tutorial]]></category>
            <category><![CDATA[golang-development]]></category>
            <category><![CDATA[golang]]></category>
            <category><![CDATA[garbage-collection]]></category>
            <dc:creator><![CDATA[ZhangJie (Kn)]]></dc:creator>
            <pubDate>Wed, 17 Jun 2026 00:37:23 GMT</pubDate>
            <atom:updated>2026-06-18T14:07:45.128Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Go/Linux Memory Management: Understanding THP (Transparent Huge Pages)]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://blog.stackademic.com/go-linux-memory-management-understanding-thp-transparent-huge-pages-f90e066f3e61?source=rss-e879ddf1d25e------2"><img src="https://cdn-images-1.medium.com/max/1049/1*R-D7NjXhHq70Dd5MW6xdSg.png" width="1049"></a></p><p class="medium-feed-snippet">Foreword</p><p class="medium-feed-link"><a href="https://blog.stackademic.com/go-linux-memory-management-understanding-thp-transparent-huge-pages-f90e066f3e61?source=rss-e879ddf1d25e------2">Continue reading on Stackademic »</a></p></div>]]></description>
            <link>https://blog.stackademic.com/go-linux-memory-management-understanding-thp-transparent-huge-pages-f90e066f3e61?source=rss-e879ddf1d25e------2</link>
            <guid isPermaLink="false">https://medium.com/p/f90e066f3e61</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[golang]]></category>
            <dc:creator><![CDATA[ZhangJie (Kn)]]></dc:creator>
            <pubDate>Fri, 12 Jun 2026 23:49:19 GMT</pubDate>
            <atom:updated>2026-06-18T14:07:40.358Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Why SDKMAN! Is the Version Manager Every JVM Developer Needs]]></title>
            <link>https://hitzhangjie.medium.com/why-sdkman-is-the-version-manager-every-jvm-developer-needs-2ddad51b03bb?source=rss-e879ddf1d25e------2</link>
            <guid isPermaLink="false">https://medium.com/p/2ddad51b03bb</guid>
            <category><![CDATA[sdkman]]></category>
            <category><![CDATA[java]]></category>
            <dc:creator><![CDATA[ZhangJie (Kn)]]></dc:creator>
            <pubDate>Wed, 10 Jun 2026 10:07:00 GMT</pubDate>
            <atom:updated>2026-06-10T10:07:00.399Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YWxyDpyJjQdQBfiE9bpx1Q.jpeg" /><figcaption>sdkman</figcaption></figure><p>A few weeks ago, I dusted off my Java skills to dive into some open-source projects. The first step — setting up a JDK — should have been trivial. It wasn’t.</p><p>One project targeted JDK 8. Another ran on JDK 17. A third was already experimenting with JDK 21 virtual threads. On top of that, Maven, Gradle, and Kotlin each had their own version requirements per project. I’d spent the last few years writing Go, where go install handles multiple versions natively. Coming back to the JVM ecosystem, I realized I&#39;d forgotten how fragmented the tooling landscape could be.</p><p>So I did what any reasonable developer would do: I took a step back and asked, <em>what’s the best way to manage all of this in 2026?</em></p><h3>The Problem: Version Chaos in the JVM World</h3><p>If you’ve done Linux development, you’ve probably wrestled with update-alternatives. It&#39;s the classic Debian/Ubuntu mechanism for switching between installed versions of a program. For Java, it looks something like this:</p><pre>sudo update-alternatives --install /usr/bin/java java /opt/jdk-17/bin/java 1 \<br>  --slave /usr/bin/javac javac /opt/jdk-17/bin/javac \<br>  --slave /usr/bin/javadoc javadoc /opt/jdk-17/bin/javadoc \<br>  --slave /usr/bin/jar jar /opt/jdk-17/bin/jar</pre><p>And that’s the short version. A real-world registration script for a single JDK can easily run 40+ lines, one per tool in the JDK bin directory. Every time you install a new JDK version, you repeat this ritual. Then you run sudo update-alternatives --config java to switch. It works — but it&#39;s the manual transmission of version management.</p><p>The pain points are obvious:</p><ol><li><strong>Boilerplate overload.</strong> Registering master and slave symlinks for every JDK binary is tedious and error-prone.</li><li><strong>No cross-platform story.</strong> macOS uses Homebrew, Windows relies on manual PATH manipulation. Three platforms, three completely different approaches.</li><li><strong>One toolchain, one config.</strong> Java has update-alternatives, Node has nvm, Python has pyenv, Ruby has rbenv, Go has goenv. Each with its own syntax, its own mental model, its own quirks.</li></ol><p>And in the JVM ecosystem, managing the JDK is only half the battle. You also need to juggle Maven versions, Gradle versions, Kotlin, Scala, Groovy — sometimes all within the same project.</p><h3>Enter SDKMAN!</h3><p><a href="https://sdkman.io/">SDKMAN!</a> was built specifically to solve this. Its pitch is simple: <strong>one tool to manage every SDK in the JVM ecosystem.</strong> And after using it for a while, I can say it delivers.</p><h3>What Can It Manage?</h3><p>SDKMAN! calls each installable piece of software a “candidate.” The coverage is impressive:</p><ul><li><strong>JDK distributions:</strong> Oracle JDK, OpenJDK, GraalVM, Liberica, Zulu, Adoptium, Amazon Corretto, Microsoft, IBM Semeru — 20+ distributions across dozens of versions</li><li><strong>Build tools:</strong> Maven, Gradle, Ant, sbt</li><li><strong>JVM languages:</strong> Kotlin, Scala, Groovy</li><li><strong>Frameworks:</strong> Spring Boot CLI, Micronaut, Quarkus CLI</li><li><strong>Utilities:</strong> JBang, VisualVM, Spark, Leiningen</li></ul><p>That’s a lot of ground covered by a single tool.</p><h3>Design Philosophy</h3><p>SDKMAN! borrows the best ideas from other version managers and combines them:</p><ul><li><strong>From nvm:</strong> The .nvmrc pattern becomes .sdkmanrc — drop a file in your project root, and SDKMAN! auto-switches to the right versions when you cd in.</li><li><strong>From pyenv/rbenv:</strong> All candidate versions live isolated under ~/.sdkman/candidates/. No system-wide pollution, no sudo required.</li><li><strong>From update-alternatives:</strong> sdk use for temporary switching within a shell session, sdk default for setting persistent defaults.</li></ul><h3>Getting Started</h3><p>Installation is a one-liner that works on macOS, Linux, and WSL:</p><pre>curl -s &quot;https://get.sdkman.io&quot; | bash</pre><p>The installer adds initialization to your shell config (~/.bash_profile or ~/.zshrc):</p><pre>export SDKMAN_DIR=&quot;$HOME/.sdkman&quot;<br>[[ -s &quot;$HOME/.sdkman/bin/sdkman-init.sh&quot; ]] &amp;&amp; source &quot;$HOME/.sdkman/bin/sdkman-init.sh&quot;</pre><p>Open a new terminal or source the file, and you&#39;re ready. One quirk: sdk is a <strong>shell function</strong>, not a binary, so which sdk won&#39;t find it. Use type sdk instead to verify.</p><h3>Everyday Commands</h3><pre># Browse available candidates<br>sdk list</pre><pre># See all Java versions available<br>sdk list java</pre><pre># Install specific versions<br>sdk install java 17.0.9-tem<br>sdk install maven 3.9.6<br>sdk install gradle 8.5</pre><pre># Temporarily switch for the current shell<br>sdk use java 21.0.1-graal</pre><pre># Set the global default<br>sdk default java 17.0.9-tem</pre><pre># Check what&#39;s currently active<br>sdk current java</pre><pre># See installed versions<br>sdk list java | grep installed</pre><pre># Uninstall a version<br>sdk uninstall java 8.0.392-tem</pre><pre># Upgrade to the latest<br>sdk upgrade java</pre><pre># Show everything that&#39;s installed and active<br>sdk current</pre><h3>Project-Level Version Locking</h3><p>The real power move is .sdkmanrc. Initialize it in your project root:</p><pre>sdk env init</pre><p>This creates a file that locks versions for the project:</p><pre>java=17.0.9-tem<br>maven=3.9.6</pre><p>Enable auto-switching in ~/.sdkman/etc/config:</p><pre>sdkman_auto_env=true</pre><p>Now whenever you cd into the project directory, SDKMAN! automatically activates the right versions. Team members get the exact same environment with zero additional setup.</p><h3>SDKMAN! vs. jenv</h3><p>These two tools are frequently compared, but they serve fundamentally different purposes:</p><p>SDKMAN!jenv<strong>Scope</strong>JDK + Maven + Gradle + Kotlin + Scala + Groovy + …JDK only<strong>JDK installation</strong>Built-in — downloads and installs for youManual — you download JDKs yourself, jenv just registers them<strong>Footprint</strong>Heavier, feature-richLightweight, does one thing<strong>Setup</strong>One-line curlHomebrew or git clone</p><p>The choice comes down to philosophy:</p><ul><li><strong>SDKMAN!</strong> is for developers who want a complete JVM environment manager. Install, switch, and forget — everything handled in one place.</li><li><strong>jenv</strong> is for minimalists who just need a lightweight JDK router. You handle downloads, jenv handles JAVA_HOME and PATH switching.</li></ul><p>If you work across multiple JVM projects with different build tool and language requirements, SDKMAN! is the clear winner.</p><h3>The Cross-Language Dream</h3><p>Once you’ve tasted a unified version manager for one ecosystem, the natural question arises: <em>is there a tool that handles every language?</em></p><p><strong>asdf</strong> is the most prominent attempt. It uses a plugin architecture to support hundreds of tools across Ruby, Node.js, Python, Go, Java, and more. The idea is compelling, but the execution has rough edges:</p><ul><li><strong>Shim overhead.</strong> Every command goes through a shim layer. For frequently executed tools like go or node, the performance hit is noticeable.</li><li><strong>Plugin quality varies wildly.</strong> Core plugins are well-maintained; niche ones may be abandoned.</li><li><strong>Abstract configuration.</strong> .tool-versions is more generic than .nvmrc or .sdkmanrc, but that generality comes at the cost of ergonomics.</li></ul><p><strong>mise</strong> (formerly rtx) is a Rust rewrite of asdf with better performance and asdf plugin compatibility. It’s promising, but the community and ecosystem still lag behind the purpose-built tools for each language.</p><p>From a pragmatic standpoint, here’s my recommendation:</p><ul><li><strong>JVM ecosystem</strong> → SDKMAN! It’s the nvm + rbenv + Homebrew of the Java world, and the unified experience is worth it.</li><li><strong>Node.js</strong> → Stick with nvm or try fnm (a faster Rust alternative).</li><li><strong>Go</strong> → The official go install multi-version support is good enough. You probably don&#39;t need a third-party tool.</li><li><strong>Python</strong> → pyenv, or just use venv/conda.</li></ul><p>A single cross-language version manager that handles everything well is still a dream. Each language has its own packaging conventions, build systems, and version semantics. A unified abstraction inevitably loses the details that make each ecosystem’s tooling feel natural. Right now, <strong>using the best tool for each ecosystem</strong> is the most practical approach.</p><h3>The Bottom Line</h3><p>update-alternatives served its purpose, but the JVM tooling landscape has moved on. SDKMAN! replaces dozens of manual symlink registrations with a handful of memorable commands. It handles not just the JDK but every tool in the Java development chain — from build systems to companion languages — with a single, consistent interface.</p><p>If you’re setting up a Java development environment in 2026, SDKMAN! is the lowest-friction starting point I’ve found. One tool, one syntax, one config file per project. The way it should be.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2ddad51b03bb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Quiet Joy of Supporting Indie Creators in the Age of AI]]></title>
            <link>https://hitzhangjie.medium.com/the-quiet-joy-of-supporting-indie-creators-in-the-age-of-ai-7f9fe7bf45c6?source=rss-e879ddf1d25e------2</link>
            <guid isPermaLink="false">https://medium.com/p/7f9fe7bf45c6</guid>
            <category><![CDATA[indie-game]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[game-development]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[ZhangJie (Kn)]]></dc:creator>
            <pubDate>Sat, 06 Jun 2026 04:03:20 GMT</pubDate>
            <atom:updated>2026-06-06T04:03:20.095Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IBqoNm8Jt-5NAMVV8QrXlw.jpeg" /></figure><p>A few weeks ago, I spent <strong>$200</strong> on a piece of software called <strong>WaterPro</strong>. To many people, that decision sounds irrational. Why pay full price for a niche water simulation tool when cracked versions float around the internet in seconds? Why not just prompt a large language model to reverse-engineer similar effects? Why support a solo developer when big companies give away impressive demos for free?I bought it anyway — and I’d do it again in a heartbeat.</p><p>I don’t buy software merely because it helps me prototype personal games or might someday earn money. I buy it because certain creations move me on a deeper, almost spiritual level.</p><p>When I fire up <strong>SpaceEngine, TerraVision, Google Earth, or Microsoft Flight Simulator</strong>, I stop being a programmer staring at a screen. I become a traveler. I drift from the edge of the solar system, plunge through glowing clouds, skim over snow-capped mountains, winding rivers, bustling cities, and peaceful parks. I’ve watched digital herds of animals cross vast plains and felt genuine awe at the scale and beauty of our planet recreated in code.</p><p>Last year I stumbled upon a <strong>photography simulator</strong>. The core loop was taking pictures, but what truly captured my heart was the loving reconstruction of real-world landmarks. The rapid rise of <strong>3D Gaussian</strong> Splatting (3DGS) has now convinced me: we are entering the era of true digital twins. Soon we won’t just explore space or fly across continents — we’ll stroll through city alleys at dusk, hike hidden mountain trails, and sit quietly on park benches that feel indistinguishable from reality.</p><p><strong>There is so much beauty left to craft</strong>: the way morning light filters through leaves, the slow roll of ocean waves, the dance of clouds at golden hour, the intricate lives of creatures big and small. Imagine switching perspectives like in The Ants — seeing the world as an eagle, then as an ant — and suddenly understanding, viscerally, how every life form experiences this shared planet. This is more than technology. This is an act of love. And I am happy to lose myself in it for years to come.</p><p><strong>I am not a professional game developer. I still have mountains to learn</strong>. Yet when I saw WaterPro — stunning visual quality paired with fully open-sourced code — I didn’t hesitate. Inside that $200 package was something priceless: the physics, the mathematics, and the hard-won technical insights laid bare by a generous creator. I will always support developers who don’t just sell a product, but share the map that got them there.</p><p>People often ask me: “<strong>Why don’t you just download the cracked version</strong>?” The question always reminds me of a story that still warms my heart.</p><p>Years ago, a couple poured their spare evenings and weekends into improving <strong>Fork</strong>, a beloved open-source Git GUI. It was completely free. The community watched their dedication, their sacrifices, their genuine care. Instead of just saying thanks, users actively encouraged them to start charging so they could quit their day jobs and work on it full-time. The price? It’s cheap, and it’s a one-time purchase with lifetime updates. That wasn’t greed. That was reciprocity. That was love meeting love. That story crystallized something for me.</p><p>I choose to <strong>support the people whose fingertips carry both technical brilliance and a quiet yearning for beauty</strong>. I may never be rich. I may never create anything groundbreaking myself. But I believe someone will — and I want to be part of the reason they can keep creating.</p><p>From childhood, many of us absorbed the habit of chasing small advantages: the free lunch, the pirated copy, the shortcut. I used to do it too. After I started working, I realized this mindset doesn’t just save a few dollars — it slowly erodes our faith in creativity itself. Every pirated copy wasn’t protecting my wallet; it was quietly selling out the very future I claim to care about.</p><p><strong>In the AI era, this choice feels more important than ever. When ideas can be scraped, remixed, and regenerated in seconds, how do we protect the original dreamers? </strong>How do we separate genuine human passion from clever imitation? Supporting solo developers and small passionate teams — especially those who open their source code and share their process — has become an act of cultural preservation.</p><p>So I keep buying. Full price. No hesitation. Because every time I watch sunlight dance across simulated waves, or fly over a digital mountain range at sunset, or read elegant, well-commented code from a generous stranger, I remember why all of this matters.</p><p>We are not just building better graphics. We are building new worlds — together — and <strong>the most beautiful ones are made with love</strong>.</p><p>If this story resonates with you, I hope you’ll consider supporting an indie creator today. Whether it’s a game, a tool, an artwork, or an open-source project — your purchase might be the reason they get to keep dreaming. The future of digital wonder depends on it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7f9fe7bf45c6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Git Conflict Detection: Diff Blocks, xscr, and the Merge Engine]]></title>
            <link>https://hitzhangjie.medium.com/git-conflict-detection-diff-blocks-xscr-and-the-merge-engine-8dec9647687e?source=rss-e879ddf1d25e------2</link>
            <guid isPermaLink="false">https://medium.com/p/8dec9647687e</guid>
            <category><![CDATA[git]]></category>
            <dc:creator><![CDATA[ZhangJie (Kn)]]></dc:creator>
            <pubDate>Fri, 05 Jun 2026 09:08:05 GMT</pubDate>
            <atom:updated>2026-06-05T09:08:05.639Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><em>Ever seen this? </em><em>git merge succeeded with no conflicts, but `git-vis` tool flagged &quot;possible conflict&quot;? This isn&#39;t your tool misreading Git&#39;s output — it&#39;s reading a completely different layer of data than Git&#39;s merge engine uses internally. Well, sometimes we think it should conflict, but </em><em>git doesn’t report it. The purpose of `git-vis` is simulating different algorithms that would result in different results in order to help git users understand more deeply.</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Sa5aZa3R9dJNfGF_Vx6oTw.png" /></figure><h3>1. Where the Problem Comes From</h3><p>To understand the gap between git-vis’s “Diff &amp; Conflict Detection” tab and real Git three-way merging, we ran a controlled experiment on a minimal teaching repo.</p><h3>The Setup</h3><p>On the master branch, we ran git merge feature. Both branches inserted code at different line positions in the same file:</p><ul><li><strong>Side a</strong> (master): inserted two lines after line 1</li><li><strong>Side b</strong> (feature): inserted the same two lines after line 1, and additionally inserted different code after line 2</li></ul><h3>The Results</h3><p>What we observedResultReal git mergeSucceeded, Auto-merging, no conflictgit-vis &quot;Diff &amp; Conflict Detection&quot;Path flagged as &quot;overlap · different content → possible conflict&quot;</p><p>Same inputs (identical o/a/b). Real Git says “fine, auto-merged.” The tool says “possible conflict.”</p><p><strong>What’s going on?</strong></p><h3>2. How git-vis Gets Its Diff Block List</h3><p>First, the diff block list in git-vis is <strong>not</strong> extracted from inside Git’s merge process. It is computed <strong>after the fact</strong> using plumbing commands:</p><pre>git diff o a -- &lt;path&gt;          # changes of a relative to o<br>git diff o b -- &lt;path&gt;          # changes of b relative to o<br>parseDiffToBlocks()              # parse @@ headers, each hunk = one block</pre><p>Then it does a Cartesian product pairing of every a-block × every b-block, using the hunk headers to derive o-line ranges and judge overlap, same-patch, or overlap-with-different-content.</p><p>The problem? git diff default output and Git&#39;s internal data structure for merging are <strong>not the same thing</strong>.</p><h3>3. How xscr Is Generated in Git’s Source</h3><p>Git’s three-way text merge goes through xdl_merge, and it <strong>never touches</strong> git diff:</p><pre>xdl_do_diff(o, a)         # diff o vs. a at the line level<br>xdl_change_compact         # slide and compact change groups<br>xdl_build_script           # → xscr (xdchange_t linked list)</pre><p>git diff, while sharing the first half of this pipeline, adds a critical extra step:</p><pre>xdl_emit_diff → xdl_get_hunk()<br># merges multiple xdchanges into fewer @@ hunks using ctxlen (default 3)</pre><p>This means:</p><ul><li><strong>Git merge decisions</strong> use the xscr linked list (atomic change granularity)</li><li><strong>Default </strong><strong>git diff</strong> outputs merged hunks (display granularity, coarser)</li></ul><p><strong>The unified diff is a downstream presentation of xscr, not the upstream source of xscr.</strong></p><h3>4. Back to the Experiment: Why the Discrepancy?</h3><p>In our experiment, side b had two independent insertions (after line 1 and after line 2). Git’s internal xdl_build_script treats them as <strong>two independent xdchanges</strong>:</p><ol><li>Same insertion as side a (xxxx) — identical, auto-merged</li><li>Side-b-only insertion (aaa/bbb) — appears on only one side, applied directly</li></ol><p>But default git diff, because of context lines (ctxlen=3), collapses the entire file into <strong>a single hunk</strong>. git-vis receives this hunk, sees that both sides&#39; hunks overlap in o-line range with different patches, and flags &quot;possible conflict.&quot;</p><p>The truth: <strong>Git’s merge didn’t get it wrong. We were reading a different layer of output.</strong></p><h3>What if we use git diff -U0?</h3><p>With -U0 (zero context), side b&#39;s diff is correctly split into 2 hunks, much closer to the actual xscr partitioning. At this point, git-vis&#39;s block-level judgment aligns with Git merge.</p><p>This is exactly the evolution path for git-vis: default diff → -U0 → anchor-point intervals, progressively approaching Git merge&#39;s xscr granularity.</p><h3>5. The Two-Layer Logic of Conflict Detection</h3><h3>Layer 1: Definite Conflicts (Fact)</h3><p>git-vis reads ls-files -u to get stage 1/2/3 entries in the index. This is <strong>100% consistent</strong> with Git internals — unmerged entries in the index are hard facts.</p><h3>Layer 2: Block-Level Prediction (Heuristic)</h3><p>Block-level “possible conflict” judgments based on parsed diff blocks are <strong>teaching heuristics</strong>. The UI copy must clearly distinguish “definite conflict” from “block-level hint,” and must not claim bit-level consistency with ORT/xdl_do_merge.</p><h3>Git’s Internal Three-Way Judgment</h3><p>At xscr granularity, Git’s block-level logic is clean:</p><pre>Sorted by (i1, chg1) in o, dual-pointer walk:<br>  → Ranges don&#39;t overlap: apply independently (may produce conflict-free duplicated code)<br>  → Ranges overlap AND start line, range, content all identical: same change, auto-merge<br>  → Ranges overlap AND differ: conflict</pre><h3>6. Consistency Analysis: git-vis vs. Git Block Logic</h3><h3>What’s Consistent</h3><p>DimensionConsistent?NotesPath-level single/both-side分流Largely yesUses diff-tree to judge who changed the path; aligns with Git process_entryOverlap on o-line rangesLargely yesIncludes chg1=0 anchor handling; typical &quot;different anchor insertions&quot; correctly judged as non-overlappingConflict judgment directionMostly yesPresence of overlapping-and-different block pairs → flagged as &quot;possible conflict&quot;</p><h3>What’s Not</h3><p>DimensionGitgit-visAlgorithm structureOrdered dual-pointer merge walkCartesian product full pairing + aggregationSame-change judgmentCompares start line, range, AND contentOnly compares o-range + diff ± line fingerprintApplication simulationSimulates application inside merge, handles line shiftsNone; only does static range comparison</p><h3>7. Product Alignment Roadmap</h3><p>StageApproachEffectCurrentDefault git diff(o,a/b)Display granularity; may not match merge&#39;s xscrShort-termgit diff -U0Reduces hunk merging, closer to xscr partitioningMid-termAnchor-point intervals + dual-pointer pairingSimulates xdl_build_script-level block partitioning in JSStrict (not implemented)libxdiff / reimplement build_scriptUI only shows explanation: understanding the progression captures ~99% of Git&#39;s merge thinking</p><p>All three implemented approaches are heuristic approximations. When “Git merge blocks (xscr)” is selected from the dropdown, the boundary explanation above is shown; no block-level analysis is run.</p><h3>8. One-Sentence Summary</h3><p><strong>Git merge judges conflicts using </strong><strong>xscr (line-level atomic diff changes). If git-vis uses default </strong><strong>git diff hunks, it&#39;s doing block comparison at a coarser display layer. Definite conflicts come from the index (</strong><strong>ls-files -u); block-level predictions are heuristics — these two layers must be kept separate. Alignment should target </strong><strong>xdl_build_script&#39;s block granularity, not post-hoc splitting of unified diff.</strong></p><p><strong>Related Resources</strong>:</p><ul><li><em>Demystifying Git’s Three-Way Merge</em></li><li><em>git-vis: Making Git’s Internals Visible</em></li><li>Git source: xdiff/xmerge.c (xdl_merge), xdiff/xemit.c (xdl_get_hunk)</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8dec9647687e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[git-vis: Making Git’s Internals Visible]]></title>
            <link>https://hitzhangjie.medium.com/git-vis-making-gits-internals-visible-ca3f7ac5f86b?source=rss-e879ddf1d25e------2</link>
            <guid isPermaLink="false">https://medium.com/p/ca3f7ac5f86b</guid>
            <category><![CDATA[git]]></category>
            <dc:creator><![CDATA[ZhangJie (Kn)]]></dc:creator>
            <pubDate>Thu, 04 Jun 2026 07:02:28 GMT</pubDate>
            <atom:updated>2026-06-04T07:02:28.349Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><em>You know how to run </em><em>git merge, </em><em>git rebase, and </em><em>git cherry-pick. But do you know what Git is actually doing under the hood when you run those commands? git-vis exists to make those invisible processes visible, interactive, and explainable.</em></blockquote><h3>Why git-vis Exists</h3><p>Git is powerful, but its core mechanisms are not intuitive for many users:</p><ul><li><strong>Snapshot model</strong>: Git stores complete snapshots, not diff chains</li><li><strong>Object store</strong>: the commit → tree → blob hierarchy</li><li><strong>Three-way merge</strong>: how o/a/b snapshots determine merge outcomes</li><li><strong>Conflict detection</strong>: how Git decides “conflict” vs. “auto-mergeable”</li></ul><p>Most Git GUI tools show commit history and diff results, but <strong>they don’t explain the “why”</strong> — why did this conflict happen? Why did that code get dropped? Why did cherry-pick produce duplicated code?</p><p>git-vis answers those “whys.”</p><h3>What git-vis Already Does</h3><h3>1. Commit History and Relationship Graphs</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AFmyN7mVxr3jxgdxLwVP4Q.png" /></figure><p>git-vis provides two relationship graph views:</p><p><strong>Full Commit Graph</strong>: similar to git log --graph, showing the entire repository&#39;s DAG topology. Distinguishes first-parent edges from merge-introduced parents, labels branch tips (master, feature/xxx, etc.), and uses color coding to distinguish mainline from merge branches.</p><p><strong>Multi-Select Relationship Graph</strong>: when multiple commits are selected, shows parent pointer relationships within the selected subset. Arrow direction follows the actual parent pointers in commit objects (child → parent).</p><h3>2. Commit Metadata</h3><p>Click any commit to see the full object chain: hash, tree, parent list, author, commit message, and the commit → tree → blob expansion.</p><h3>3. Terminal Simulator</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kmSrmPRUiUYFKeQyH_127w.png" /></figure><p>The terminal simulator is git-vis’s core differentiator. It doesn’t just show existing history — it <strong>captures and visualizes the o/a/b relationship in real time</strong> when you run git merge, git cherry-pick, git rebase, or git apply.</p><p>Take git merge feature as an example. The terminal simulator shows in the &quot;Relationship Graph&quot; tab:</p><pre>a (master tip)          b (feature tip)<br>            \           /<br>             o (merge-base = common ancestor)<br>                   |<br>               result (merge commit)</pre><p>The values of o/a/b all come from real plumbing commands: merge-base, rev-parse, MERGE_HEAD, etc. — ensuring what&#39;s displayed reflects <strong>what Git actually used</strong>, not a simulation or guess.</p><h3>Design Philosophy: Real Execution + Structured Observation + Explanatory Reconstruction</h3><p>We evaluated several technical approaches:</p><p>ApproachAdopted?ReasoneBPF / uprobe tracing of Git binaryNoPlatform-dependent symbols; unstable after upgrades; high maintenance costlldb function-level tracingNoRequires rebuildable Git with debug symbols; fragile outputGit hooksSupplementary onlyLimited lifecycle; cannot cover merge algorithm internals100% in-app Git simulationNoEquivalent to maintaining “another Git”; long-term consistency is hardReal Git + Trace2 + plumbing<strong>Yes (mainline)</strong>Balances authenticity, explainability, and cross-version maintainability</p><p>The final architecture is a <strong>three-layer observation model</strong>:</p><p><strong>Layer 1: Command Event Layer (Trace2)</strong> — captures Git command stage events, subprocesses, timing, and return codes. Answers: “Which stage did the command reach? Where did it slow down? Where did it fail?”</p><p><strong>Layer 2: State Snapshot Layer (plumbing)</strong> — samples repository state at key points via plumbing commands: rev-parse, cat-file, merge-base, ls-files -u, diff-tree, etc. Answers: &quot;What was the input? Where exactly is the conflict? How was the result formed?&quot;</p><p><strong>Layer 3: Explanatory Visualization Layer (product core)</strong> — maps events and snapshots into a user-understandable model. Every displayed conclusion can be traced back to real Git input and state snapshots.</p><h3>The Feasible Boundary of Post-Hoc o/a/b Reconstruction</h3><p>An important constraint: git-vis is a tool for reading existing commit graphs. We must distinguish between <strong>“what o/a/b Git used at merge time”</strong> and <strong>“what o/a/b can be inferred from objects after the fact.”</strong></p><h3>Reliably Reconstructable: merge commit</h3><p>For a merge commit with 2+ parents:</p><pre>a = parent[0]<br>b = parent[1]<br>o = merge-base(a, b)</pre><p>No need to know which command was run at the time. As long as a merge commit exists in history, o/a/b can be computed after the fact.</p><h3>Unreliably Reconstructable: cherry-pick / rebase (single-parent commits)</h3><p>ProblemExplanationStructurally indistinguishableIndistinguishable from a hand-written ordinary commit (1 parent)o/b not in parent chainAfter the fact, only C&#39;.parent[0] ≈ the a at the timeWeak cluescherry picked from &lt;hash&gt; in message can be stripped with -n or message editing</p><p>Hence git-vis’s product boundary is clear:</p><ol><li><strong>Guaranteed</strong>: selecting a merge commit → show o/a/b triangle</li><li><strong>Optional enhancement</strong>: parse cherry picked from → label &quot;possible cherry-pick&quot;, clearly marked as <strong>not guaranteed</strong></li><li><strong>Not promised</strong>: reconstructing rebase/cherry-pick steps for arbitrary single-parent commits</li></ol><h3>Current Status of the Terminal Simulator Relationship Graph</h3><p>The terminal simulator already supports relationship graph display for the following commands:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MPlGAdzqPtk29EFewmoHCA.png" /></figure><h3>git merge</h3><p>Draws the o/a/b/result diamond layout. Supports three-way merge (new commit created), fast-forward (pointer move only), and --continue (completing a conflicted merge).</p><h3>git cherry-pick</h3><p>Draws the o-b-a-result layout. o is taken from the parent of the picked commit, not the merge-base.</p><h3>git rebase</h3><p>Adds a <strong>reset → step-by-step pick</strong> process timeline on top of merge/cherry-pick. When a conflict pauses execution, a small o/a/b diagram for the current step is attached. Data sources are tried in priority order: sequencer files (rebase-merge/) → pre-command capture → inference mode.</p><p>The no-effect scenario (HEAD unchanged and sequencer never entered) is correctly identified, and no misleading pick timeline is drawn.</p><h3>Degradation Strategy</h3><p>When parameters cannot be parsed (e.g., shell alias !, complex rebase expressions), the system degrades to showing only pre/post HEAD changes, with notes explaining why — rather than displaying fabricated data.</p><h3>Product Roadmap</h3><h3>Already Implemented</h3><ul><li>Commit history DAG visualization</li><li>Commit → tree → blob object chain display</li><li>Terminal simulator o/a/b relationship graph (merge / cherry-pick / rebase / apply)</li><li>Rebase process timeline</li><li>Conflict explanation panel: show stage 1/2/3 per file, conflict type, post-resolution diff</li><li>Diff explanation panel: show hunk and strategy used</li><li>Failure diagnosis: locate the specific stage when a command fails and provide minimal reproduction context</li><li>Auto-compute and display o/a/b for merge commits in the history view</li></ul><h3>Summary</h3><p>The core value of git-vis is <strong>making Git’s internals visible</strong>: when you run git merge in the terminal simulator, you don&#39;t just see a success or failure result. You can visually see the relationship between o/a/b, understand why a conflict arose, and see why the merge result looks the way it does.</p><p>This is not about “rewriting Git.” It is about building a layer of <strong>observable, explainable, and traceable</strong> visualization on top of real Git execution — helping developers evolve from “knowing commands” to “understanding mechanisms,” and reducing merge incidents caused by misunderstandings of the underlying workings.</p><p><strong>Related Resources</strong>:</p><ul><li>Project: <a href="https://markdown-to-medium.surge.sh/">github.com/hitzhangjie/git-vis</a></li><li>Three-way merge deep dive: <em>Demystifying Git’s Three-Way Merge</em></li><li>Diff blocks and conflict detection: <em>Git Conflict Detection: The Truth About Diff Blocks, xscr, and the Merge Engine</em></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ca3f7ac5f86b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>