<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"><channel><title>AlphaTechnic Tech Blog</title><description>Writing about the problems I run into and what I learn from them.</description><link>https://alphatechnic.github.io/</link><item><title>Keeping Backward Compatibility While Changing the Reward Structure</title><link>https://alphatechnic.github.io/refactoring-reward-structure/</link><guid isPermaLink="true">https://alphatechnic.github.io/refactoring-reward-structure/</guid><description>Each reward type expressed conversions in its own way. I changed them into one structure. I also describe the methods I used to avoid breaking old data under event sourcing.</description><pubDate>Fri, 27 Nov 2026 00:00:00 GMT</pubDate><category>backward compatibility</category><category>event sourcing</category><category>protobuf</category><category>scala</category></item><item><title>The Hidden Trap of Scala lazy val and Kryo Serialization</title><link>https://alphatechnic.github.io/scala-lazy-val-kryo-classcastexception/</link><guid isPermaLink="true">https://alphatechnic.github.io/scala-lazy-val-kryo-classcastexception/</guid><description>A ClassCastException appeared after we moved to Scala 3. Kryo was serializing a lazy val that was still being computed.</description><pubDate>Sun, 09 Aug 2026 00:00:00 GMT</pubDate><category>ClassCastException</category><category>kryo</category><category>lazy val</category><category>scala</category></item><item><title>Trading 100% Certainty for 99.99% Efficiency</title><link>https://alphatechnic.github.io/monte-carlo-algorithm-bingo-logic/</link><guid isPermaLink="true">https://alphatechnic.github.io/monte-carlo-algorithm-bingo-logic/</guid><description>How I used the Monte Carlo algorithm to quickly find a board with no bingo, with a small and acceptable risk of failure.</description><pubDate>Sun, 26 Oct 2025 00:00:00 GMT</pubDate><category>Miller-Rabin</category><category>monte carlo</category><category>non-deterministic</category><category>probabilistic</category></item><item><title>IEEE 754 Distorts My Ranking System</title><link>https://alphatechnic.github.io/long-to-double-precision-loss-redis/</link><guid isPermaLink="true">https://alphatechnic.github.io/long-to-double-precision-loss-redis/</guid><description>Scores in our Redis ranking were slightly wrong. The cause was converting a 64-bit Long to a Double, which has only 53 bits of precision.</description><pubDate>Sun, 12 Oct 2025 00:00:00 GMT</pubDate><category>floating-point number</category><category>IEEE754</category><category>precision</category><category>redis</category><category>Sorted Set</category></item><item><title>The Mysterious CRDB OOM Killer</title><link>https://alphatechnic.github.io/troubleshooting-crdb-oom-killer/</link><guid isPermaLink="true">https://alphatechnic.github.io/troubleshooting-crdb-oom-killer/</guid><description>A TTL job in CockroachDB used too much memory. I find out why a simple delete reads so much data, and fix it with smaller batches.</description><pubDate>Mon, 18 Aug 2025 00:00:00 GMT</pubDate><category>cockroachdb</category><category>crdb</category><category>TTL</category><category>ttl_job_cron</category></item><item><title>One Pass, N Types: Efficient Type Filtering with Scala 3 Macros</title><link>https://alphatechnic.github.io/efficient-collect-types-macro/</link><guid isPermaLink="true">https://alphatechnic.github.io/efficient-collect-types-macro/</guid><description>How to pick elements of N types from a collection in one pass, step by step, from foldLeft to Scala 3 macros.</description><pubDate>Sun, 17 Aug 2025 00:00:00 GMT</pubDate><category>macro</category><category>scala</category></item><item><title>Building Static and Dynamic Gacha Validation Systems</title><link>https://alphatechnic.github.io/gacha-validation-static-dynamic-analysis/</link><guid isPermaLink="true">https://alphatechnic.github.io/gacha-validation-static-dynamic-analysis/</guid><description>A user got an item that was not on the rate table. I built a static check and a simulator to prevent this kind of bug.</description><pubDate>Fri, 27 Jun 2025 00:00:00 GMT</pubDate><category>gacha</category><category>probability</category><category>random</category></item><item><title>Building a Reliable Server Maintenance with ZIO</title><link>https://alphatechnic.github.io/scala-cli-maintenance-tool/</link><guid isPermaLink="true">https://alphatechnic.github.io/scala-cli-maintenance-tool/</guid><description>Our server maintenance was manual and risky. I built an interactive tool for it with ZIO, Scala-CLI, and Scopt.</description><pubDate>Fri, 27 Jun 2025 00:00:00 GMT</pubDate><category>fp</category><category>scala-cli</category><category>scopts</category><category>scripts</category><category>zio</category></item><item><title>Journal Optimization Strategies in Event Sourcing DB Architecture</title><link>https://alphatechnic.github.io/journal-optimization-strategies/</link><guid isPermaLink="true">https://alphatechnic.github.io/journal-optimization-strategies/</guid><description>One request saved too many events in our Event Sourcing DB. I compare two ways to merge them.</description><pubDate>Mon, 23 Jun 2025 00:00:00 GMT</pubDate><category>db optimization</category><category>event sourcing</category><category>fp</category></item><item><title>Covariance, Contravariance</title><link>https://alphatechnic.github.io/covariance-contravariance/</link><guid isPermaLink="true">https://alphatechnic.github.io/covariance-contravariance/</guid><description>What covariance and contravariance mean, and why they depend on whether a type is used as an output or an input.</description><pubDate>Sun, 22 Jun 2025 00:00:00 GMT</pubDate><category>contravariance</category><category>Covariance</category><category>fp</category></item><item><title>The Way I Understand Monads</title><link>https://alphatechnic.github.io/monads/</link><guid isPermaLink="true">https://alphatechnic.github.io/monads/</guid><description>What is a Monad, and why is it defined that way? I work through both questions, from flatMap and Option to IO and ZIO.</description><pubDate>Sun, 22 Jun 2025 00:00:00 GMT</pubDate><category>fp</category><category>monad</category></item><item><title>Solving the Ambiguous Error Problem in Trampolined Effects Using Compile-Time Macros</title><link>https://alphatechnic.github.io/scala-zpure-debugging-with-sourcecode/</link><guid isPermaLink="true">https://alphatechnic.github.io/scala-zpure-debugging-with-sourcecode/</guid><description>ZPure errors did not show where they came from. I used implicit parameters and the sourcecode library to add the caller&apos;s location.</description><pubDate>Sun, 22 Jun 2025 00:00:00 GMT</pubDate><category>Implicit</category><category>scala</category><category>sourcecode</category></item><item><title>CPython Memory Management and the GIL</title><link>https://alphatechnic.github.io/cpython-memory-management-and-gil/</link><guid isPermaLink="true">https://alphatechnic.github.io/cpython-memory-management-and-gil/</guid><description>How CPython manages memory with reference counting and garbage collection, and why it needs the GIL.</description><pubDate>Sat, 17 May 2025 00:00:00 GMT</pubDate><category>gil</category><category>gc</category><category>python</category></item><item><title>How CPython Handles Hash Collisions</title><link>https://alphatechnic.github.io/cpython-hash-collision/</link><guid isPermaLink="true">https://alphatechnic.github.io/cpython-hash-collision/</guid><description>Separate chaining or open addressing? I read CPython&apos;s source to see how dict handles hash collisions.</description><pubDate>Thu, 21 Apr 2022 00:00:00 GMT</pubDate><category>cpython</category><category>Hash Collision</category></item></channel></rss>