<?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 Zach Saw on Medium]]></title>
        <description><![CDATA[Stories by Zach Saw on Medium]]></description>
        <link>https://medium.com/@zach-saw?source=rss-808f4062f3b8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*sib4BTLooyXGtiEpftgBgw.png</url>
            <title>Stories by Zach Saw on Medium</title>
            <link>https://medium.com/@zach-saw?source=rss-808f4062f3b8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 03:46:38 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@zach-saw/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[If I Were to Rewrite carsales’ 1search in Rust]]></title>
            <link>https://zach-saw.medium.com/if-i-were-to-rewrite-carsales-1search-in-rust-6a4aa57ab653?source=rss-808f4062f3b8------2</link>
            <guid isPermaLink="false">https://medium.com/p/6a4aa57ab653</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[csharp]]></category>
            <category><![CDATA[dotnet]]></category>
            <category><![CDATA[rust]]></category>
            <dc:creator><![CDATA[Zach Saw]]></dc:creator>
            <pubDate>Mon, 19 Oct 2026 07:03:15 GMT</pubDate>
            <atom:updated>2026-10-19T07:03:15.885Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Garbage collection isn’t always a tax to be engineered away. For 1search, it was part of the design.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*UFonCU3EopqUr-Sf" /></figure><p>Something using too much memory? Rewrite it in Rust. Startup too slow? Rust. Tired of hauling a heavyweight runtime around? Rust. CPU bill creeping up? You can probably guess what the next comment says.</p><p>It has become the reflex answer to performance problems, and I think it deserves a little more scrutiny than it gets.</p><p>Take Stephen Toub’s recent write-up of GitHub moving the Copilot agent runtime from TypeScript and Node.js to more than 800,000 lines of production Rust.¹ It is seriously impressive engineering. And to be fair to Stephen, his reasoning was far more nuanced than “Rust good”. The runtime had grown up around Node.js and V8, but it increasingly needed to be embedded in other applications and services, and the native runtime delivered substantial improvements. It ended up at 832,378 lines of production Rust after roughly fourteen and a half weeks of incremental migration, with agents writing most of the code.</p><p>What I like most about his write-up is how candid it is about the aftermath. Porting the code was the easy part. Making it <em>correct</em> was hard. The regressions they hunted down included state and lifetime bugs, not just performance ones.</p><p>I completely get wanting to get a runtime like that off Node.js and V8. What fascinates me is how effortlessly the industry now makes the <em>next</em> jump: we want something native, small and fast, therefore Rust.</p><p><strong>Why?</strong></p><p>I spent many years working on high-performance search. I was the architect of <strong>1search</strong>, the faceted search engine we built at carsales, including its navigation engine, iNav. And when I look back at that architecture today, what strikes me most is how much we benefited from the very thing everyone now treats as an unfortunate tax: <strong>garbage collection.</strong></p><p>So here’s my thought experiment. If I had to build 1search again today, would I write it in Rust?</p><p><strong><em>I wouldn’t.</em></strong></p><p>Let me be precise about why, because this is exactly the sort of statement that gets misread. It’s not because I <em>know</em> Rust would be slower. I don’t. Neither does anybody else until they’ve built both systems properly and benchmarked the workload that actually matters. I’d pick C# again because, for this particular architecture, Rust would have me spend engineering effort on memory-management problems that I largely didn’t have before.</p><p>I’m aware of how this reads. C# guy defends his garbage collector. Fair enough. But stick with me, because this isn’t about language loyalty. It’s about what the architecture needs the language to do.</p><h3>iNav Had a Graph, Not an Ownership Graph</h3><p>A faceted search engine doesn’t just return matching cars. It also has to work out the <em>navigation</em> around the result set. Say you’ve selected SUVs in Victoria. The engine needs to know which makes are still available, which models sit underneath them, what other filters remain valid, how many results each refinement would give you, and so on.</p><p>iNav represented this naturally as a graph. There were parent-child relationships, sure, but it wasn’t a neat tree. Paths could split and merge again, producing diamonds, and there were references pointing back up to parent nodes because the algorithms needed to navigate that way.</p><p>Conceptually, something like this:</p><pre>        A<br>       / \<br>      B   C<br>       \ /<br>        D</pre><p>…plus reverse relationships wherever the navigation algorithm wanted them.</p><p>Here’s the important bit. In C#, I never had to decide whether this was technically a tree, a DAG or a general cyclic graph <em>for the purpose of memory management</em>. The topology obviously mattered to the search algorithm, because you have to traverse it correctly. But it didn’t also decide which objects were allowed to keep which other objects alive.</p><p>There was a root. We traversed from the root. Nodes referenced whichever nodes the algorithm needed.</p><p>That was basically it, e.g.</p><pre>class NavigationNode<br>{<br>    public List&lt;NavigationNode&gt; Parents = [];<br>    public List&lt;NavigationNode&gt; Children = [];<br>}</pre><p>Multiple parents? Fine. A child pointing back at its parent? Fine. Add a relationship next year that happens to create a cycle? Also fine, as far as memory is concerned.</p><p>The garbage collector never asked me which of those edges was the <em>true owner</em> of the object.</p><p>Now, Rust can absolutely represent this graph, and I don’t want to pretend otherwise, because that isn’t my objection. The obvious route is reference counting. Shared nodes use Rc (or Arc when ownership has to cross threads), and the reverse edges use Weak so the strong counts don&#39;t form cycles. That&#39;s the exact pattern Rust&#39;s own documentation describes: strong references in one direction, weak in the other, because mutually owning references will never reach a count of zero.²</p><p>Perfectly legitimate implementation.</p><p>But notice the new question I now have to answer:</p><p><strong>Which relationships are strong, and which are weak?</strong></p><p>When I built iNav, I didn’t need an answer to that.</p><p>The graph had a <strong>navigation topology</strong> because the search algorithm demanded one. It never needed an <strong>ownership topology</strong> as well.</p><p>Once I reach for reference counting, those same edges suddenly carry lifetime semantics. A strong edge keeps something alive; a weak one doesn’t. And as the graph evolves, every new relationship raises two questions instead of one: what does it mean to the search algorithm, <em>and</em> what does it mean to reclamation? Did I just create a strong cycle? Should this edge be weak? If I upgrade this weak reference later, could the target already be gone?</p><p>None of this is impossible. In a well-designed Rust implementation it may not even be hard. But it’s an extra problem that simply didn’t exist in the C# version.</p><p>The edges in iNav described the problem domain and nothing else. Reachability took care of lifetime.</p><p><strong>That separation is worth a lot.</strong></p><h3>Rust Will Happily Compile Your Leak</h3><p><em>“Memory safe”</em> and <em>“has a correct lifetime model”</em> are <strong>two very different things</strong>, and they get blurred together far too easily.</p><p><strong><em>Memory leak is entirely possible while being memory safe.</em></strong></p><p>Rust doesn’t prove that the ownership topology you’ve chosen for a complicated graph is <em>logically</em> right. Its own book discusses reference-counting cycles as memory leaks, says that preventing leaks entirely isn’t one of Rust’s guarantees, and says you can’t rely on Rust to catch them.² They’re memory-safe logic bugs, and you avoid them through design, testing and review.</p><p>So you can have perfectly valid Rust, with the borrow checker satisfied, no dangling references and no undefined behaviour, and still have a huge graph that never goes away because someone, somewhere, introduced a strong ownership cycle.</p><p>For a simple tree, “children strong, parents weak” is easy. For a graph that splits, merges, picks up new relationships and evolves through years of feature work, you have to keep understanding which paths contribute to ownership. Forever.</p><p>Again, exactly the thing I never had to carry around in iNav.</p><p>With a tracing GC, a cycle <em>inside</em> the graph is irrelevant to whether the graph is dead. The only question is whether something <em>outside</em> it can still reach it.</p><p><strong>That’s the semantic I wanted.</strong></p><h3>Or You Can Use an Arena</h3><p>The other obvious way to avoid encoding all those edges as reference-counted pointers is an arena. Park the nodes in one place and swap the object references for handles or indices:</p><pre>type NodeId = u32;</pre><pre>struct NavigationNode {<br>    parents: Vec&lt;NodeId&gt;,<br>    children: Vec&lt;NodeId&gt;,<br>}<br><br>struct Graph {<br>    nodes: Vec&lt;NavigationNode&gt;,<br>}</pre><p>Looks quite nice, doesn’t it? The complicated ownership relationships have suddenly become far less complicated.</p><p>Why?</p><p>Because as far as Rust is concerned, they aren’t references any more.</p><p>They’re integers.</p><p>We know what those integers mean, of course. NodeId(42) means there&#39;s a region somewhere containing nodes, and this number identifies one of them. Whenever we want the object, we take that application-level address back to the arena and translate it into the thing it represents.</p><p>Now I need to be careful here, because I’m <strong>not</strong> saying arenas are inherently hacks. There are excellent reasons to choose one deliberately: contiguous storage for cache locality, cheap bulk allocation, compact handles, stable identities, a known lifetime for a whole region, or the ability to destroy everything in one go. If the arena improves the algorithm or the data layout, that’s just good systems engineering.</p><p>That’s not what I’m calling a hack.</p><p>I’m calling it a <em>workaround</em> when I start with a natural object graph and introduce an arena mainly because the language’s ownership model made that graph awkward to express.</p><p>Very different motivations.</p><h3>Reinventing the Address Space in User Land</h3><p>This is the part I find genuinely funny from a systems-engineering point of view.</p><p>Computers already have a thoroughly sophisticated system for giving software addresses. A process works with virtual addresses, the MMU translates them through page tables, and they eventually land on physical memory. Hardware protection, address translation, decades of OS and processor work making that abstraction fast.</p><p>Very roughly:</p><pre>virtual address<br>      ↓<br>MMU / page tables<br>      ↓<br>physical memory</pre><p>Rust then lays a sophisticated borrowing and ownership model over the references in that virtual address space, trying to prove which references may exist, how they can alias and how long they live.</p><p>That’s one of Rust’s headline features.</p><p>Unfortunately, my graph doesn’t sit nicely inside those rules. So I allocate another region of memory and invent another addressing scheme inside my own program:</p><pre>NodeId<br>  ↓<br>software bounds / handle validation<br>  ↓<br>arena lookup<br>  ↓<br>process virtual address<br>  ↓<br>hardware virtual memory<br>  ↓<br>physical memory</pre><p>We’ve effectively built a little logical address space in user space.</p><p>No, an arena is obviously not literally an MMU. No page tables, no demand paging, no hardware isolation. The point is that we’ve added <em>another addressing abstraction</em>: application-defined numbers standing in for references into a separately managed region.</p><p>And because the CPU’s memory protection knows nothing about what NodeId(42) means, safe access generally needs software validation, such as bounds-checked indexing, unless the compiler can prove the check unnecessary. I can skip it with unchecked access if I&#39;m happy to push more responsibility back into unsafe, but that doesn&#39;t change the architectural point.</p><p>Let’s replay what just happened.</p><p>We started with pointers into an address space.</p><p>Rust added a sophisticated compile-time system for controlling those pointers.</p><p>The graph didn’t fit that system.</p><p>So we created another address space, turned the pointers into integers, and suddenly Rust stopped worrying about them.</p><p><strong>Come on!</strong></p><p>The compiler that once cared deeply about whether node A could safely refer to node B is perfectly relaxed the moment I encode the exact same relationship as a u32, because it no longer knows the integer is a reference.</p><p>Of course, it also no longer knows whether NodeId(327) still points to the logical object I think it does. If slots get reused, perhaps I need generation counters. If handles can be mixed up between arenas, perhaps I want typed handles. If nodes can vanish independently, perhaps I need free lists and yet more lifetime machinery.</p><p>All solvable. Good arena implementations solve many of them.</p><p>But at some point we should admit what happened: we built another memory-management abstraction on top of the language’s memory-management abstraction, because the latter was inconvenient for the structure we wanted.</p><p>If the arena is useful in its own right, great.</p><p>If the language <em>forced</em> me there, I call that a workaround.</p><h3>It Was Bigger Than iNav</h3><p>Everything above is specifically about iNav, because that’s where the gap between graph topology and ownership topology is easiest to see.</p><p>But the way garbage collection helped 1search went much further than iNav.</p><p>The whole engine was built around a related idea: <strong>indexes were published through root replacement.</strong></p><p>Every index had a root, and readers accessed the current version through it. When an index needed to change, we built the replacement away from the readers and then published the new root. Requests that had already captured the old root carried on using the old index. New requests saw the new one.</p><p>So the general pattern across 1search was never really “atomic graph replacement”. iNav just happened to be a graph. The broader architecture was <strong>atomic index replacement</strong>.</p><p>Conceptually:</p><pre>Volatile.Write(ref _activeIndex, newIndex);</pre><p>A new request captures the new root. A request already running against the previous index keeps using the previous root. This was fundamental to the engine’s concurrency model.</p><p>The original implementation was designed and tuned for x64. We actually checked the generated assembly, and on x64 that volatile reference write effectively reduced to an ordinary pointer store at the hardware level. The volatile semantics still mattered, because we wanted the necessary ordering and didn’t want compiler/JIT reordering to break publication, but we weren’t paying for some heavyweight atomic read-modify-write every time we published a replacement index.</p><p>The same acquire/release pattern can be implemented correctly on ARM64 too. Its weaker memory model means different instructions achieve the ordering, and they may cost differently, but the architecture isn’t inherently x64-only.</p><p>The really interesting part, though, is what happens <em>after</em> the swap.</p><h3>Who Frees Yesterday’s Index?</h3><p>Index B has just replaced index A.</p><p>There may still be thousands of requests using A. We obviously can’t free it right now, because some thread (it’s a bit more complicated than just a thread due to IEnumerable and async-await) could be halfway through a search against that exact version.</p><p>So when is A safe to reclaim?</p><p>This is where 1search’s memory-management story gets far more interesting than “iNav had circular references”. Every index had this problem.</p><p>My solution in C# was wonderfully sophisticated:</p><p><strong>I did nothing.</strong></p><p>A request that had captured index A held ordinary managed references into A. That made A reachable, so it stayed alive. Once the last reader finished and nothing else could reach it, the old index became collectible.</p><p>Whether the thing behind that root was a tree, a graph, lookup tables, arrays of other index structures or something else was simply not part of the reclamation protocol.</p><p>No special ownership mechanism for iNav and another for every other index. No one lifetime strategy for graph nodes and a different one for old index generations.</p><p>One rule handled everything:</p><p><strong>If a reader can still reach it, keep it. If nobody can, it can eventually go away.</strong></p><p>For a search engine built around publishing new read-only index generations while large numbers of readers are still working against old ones, that is an extraordinarily useful property.</p><p>I didn’t keep a reader count for every index.</p><p>I didn’t increment and decrement a shared ownership counter every time a query captured one.</p><p>I didn’t pin an epoch at the start of a search and unpin it at the end.</p><p>I didn’t maintain hazard pointers.</p><p>I didn’t write a bespoke reclamation protocol.</p><p>The GC already had a reachability mechanism that happened to solve the problem across the entire engine.</p><p>And that’s not the GC merely making the code more <em>convenient</em>. <strong>The semantics of tracing GC were part of what made the concurrency model so simple.</strong></p><h3>Yes, Rust Can Do That Too. So Can Assembly.</h3><p>A Rust implementation can obviously solve old-index reclamation.</p><p>One straightforward option is Arc. Readers take shared ownership of whichever generation they&#39;re using, and the old one disappears when the last strong reference is released.</p><p>That works.</p><p>A straightforward shared-reference-counting design means readers take part in atomic ownership bookkeeping. More sophisticated mechanisms can cut that cost or move reclamation elsewhere: guarded loads, epochs, hazard-pointer-like approaches and others, depending on the exact implementation.</p><p>Again, none of this is beyond Rust. Quite the opposite. Rust has an ecosystem full of clever engineering around exactly these problems (does this sound like clever workarounds now?).</p><p>My question is why I want to introduce the problem in the first place.</p><p>Five minutes ago I had a root pointer.</p><p>Now I’m deciding how readers announce that they’re still using yesterday’s index.</p><p>Maybe Arc. Maybe an epoch scheme. Maybe the whole index belongs in an arena. Maybe I can arrange a particular data structure so lifetime gets simpler.</p><p>All solvable.</p><p>But they’re memory-reclamation decisions I never had to make in 1search.</p><p>This is usually the moment someone chimes in that Rust can do everything I just described.</p><p>Of course it can.</p><p><strong>So can assembly.</strong></p><p>Choosing a programming language was never about whether the desired program is theoretically expressible. That’s an extraordinarily low bar. I could implement 1search entirely in assembly, write my own allocator and hand-pick every SIMD instruction. Nobody would conclude that assembly is therefore the ideal application language.</p><p>The useful question is what the language makes easy, what it makes hard, and whether those trade-offs line up with the problem you’re actually solving.</p><p>For 1search, Rust makes ownership and reclamation <em>explicit</em> in parts of the architecture where I benefited enormously from them being <em>implicit</em>.</p><h3>C Owned the Instructions</h3><p>There’s another thing about the “rewrite it in Rust for performance” argument that doesn’t sit well with how 1search actually worked.</p><p>We already had native code.</p><p>A big chunk of search work was bitmap operations, and those had to run extremely fast. At the time, C# didn’t have the SIMD/vector APIs we have in modern .NET, so some of the core bitmap operations lived in external C DLLs using CPU intrinsics.</p><p>The memory was allocated and owned on the C# side. The native routine was handed that memory, did the bitmap operation with SIMD, and returned.</p><p>The C code never had to build the engine’s object graph. It never decided the lifetime of an index. It never needed to know when some old generation of a search structure could finally disappear.</p><p>There wasn’t really a memory-management problem for it to solve.</p><p>What I wanted from that layer was a pointer, a length, access to the CPU intrinsics, and the fastest, most mature compiler optimiser and linker I could get my hands on.</p><p>Then I wanted it to get out of the way.</p><p>That distinction matters. The performance-critical part of an application doesn’t necessarily need a systems <strong>application language</strong>. Sometimes it just needs systems <em>code</em>.</p><p><strong>C# owned the memory.</strong></p><p><strong>C owned the instructions.</strong></p><p>It worked extremely well.</p><p>Most of a production search system isn’t the five lines where you care whether the compiler picked exactly the right vector instruction. It’s APIs, logging, configuration, telemetry, networking, serialisation, business rules, and all the other code needed to keep a real system running.</p><p>Then there are the small kernels where every cycle genuinely counts. For us, the bitmap routines were those kernels, and we dropped down to C wih SIMD intrinsics where it made sense, rather than letting the memory-management model of those kernels dictate the architecture of the entire application.</p><h3>So Where Exactly Does Rust Go?</h3><p>This is the question I keep coming back to.</p><p>Suppose most of the application benefits from tracing GC, because the domain naturally contains large shared object structures and I don’t want ownership encoded into every relationship.</p><p>Then suppose the really hot code at the bottom works over preallocated, caller-owned memory and has essentially no ownership problem at all.</p><p>Where, exactly, is the sweet spot for making Rust’s ownership system the organising principle of the whole program?</p><p>If I specifically wanted a reference-counted application model, I’d personally rather reach for something like Swift, where ARC and shared object references fit a far more conventional application programming model.</p><p>If I want deterministic destruction and RAII, C++ has been doing that for decades. Those of us who remember the Boost era were using smart pointers and scoped resource management long before Rust existed.</p><p>Rust’s genuinely important contribution isn’t that it discovered ownership. It’s that it pushes much more of the ownership, borrowing and aliasing discipline into the compiler, and makes entire classes of memory bugs impossible in safe code.</p><p>That is genuinely valuable.</p><p>For kernels, drivers, embedded runtimes and similar low-level systems, where a tracing collector may not be appropriate and memory corruption is catastrophic, I can see immediately why that trade-off is attractive.</p><p>What I question is how we got from <em>that</em> proposition to treating Rust as <strong>the</strong> language for anything that needs to be fast.</p><p>Those are very different claims.</p><h3>And Now the LLM Will Deal With It</h3><p>There’s a newer answer to Rust’s ergonomic cost: humans no longer need to care, because agents can write the Rust for us.</p><p>DHH has been making this argument loudly.³ He has publicly described Rust as, in his opinion, the ugliest programming language in roughly the last 40 years, while arguing at the same time that the output is excellent and that it becomes far more attractive if agents write it and he never has to look at the implementation.</p><p>I understand the appeal. If an agent can generate tens or hundreds of thousands of lines while I specify behaviour at a higher level, the cost of physically typing a cumbersome language has collapsed.</p><p>But typing was never the expensive part of software engineering.</p><p><strong>Understanding the system is.</strong></p><p>That matters especially for ownership, because Rust only proves the invariants it actually models. The compiler can guarantee that a safe reference isn’t dangling while being perfectly happy with an ownership graph that accidentally retains an enormous structure forever. Rust’s own documentation is explicit: reference cycles are memory-safe, and you can’t rely on Rust to catch them.²</p><p>So an LLM can produce Rust that compiles perfectly, sails through the borrow checker, contains no use-after-free, and still has the wrong lifetime architecture.</p><p>That’s not a claim that LLMs are uniquely bad at Rust. I have no evidence for that and I wouldn’t make it.</p><p>The problem is that cheap code generation doesn’t make architectural complexity cheap.</p><p>Historically, whoever wrote low-level systems software was often the type of engineer who thought hard about ownership, allocation, topology and lifetime. And when the implementation started bending into a strange shape, that friction itself would trigger a useful question. Why does this thing own that thing? Why have I suddenly got weak links everywhere? Why am I translating all these references into handles? Is the model telling me something about the architecture, or am I just fighting the language?</p><p>An agent has no inherent reason to have that crisis of faith.</p><p>If the instruction is “implement this in Rust”, adding another Arc, flipping an edge to Weak, introducing an arena or turning a pointer relationship into an ID may well count as a successful implementation.</p><p>The code compiles.</p><p>The tests pass.</p><p>Then six months later the process has a hard-to-explain memory-growth pattern, and somebody still has to understand what owns what.</p><p><strong>An LLM producing the ownership machinery cheaply doesn’t make the ownership machinery conceptually cheap.</strong></p><h3>Why I Still Call a Forced Arena a Hack</h3><p>Imagine a systems engineer looking at iNav and deciding an arena would improve locality, pack nodes more tightly and give us a useful lifetime boundary around a published generation.</p><p>Great. That’s an intentional data-structure choice. I wouldn’t call it a hack.</p><p>Now imagine the graph representation was otherwise perfectly fine, but we introduce an arena mainly because expressing the relationships directly has become awkward under Rust’s ownership rules.</p><p>We flatten the objects into another region.</p><p>We replace references with integer handles.</p><p>We add software validation around those handles.</p><p>Maybe generation counters to catch stale ones.</p><p>Maybe more machinery to stop handles crossing arenas.</p><p>And the Rust code gets simpler, because the compiler no longer knows the integers are references.</p><p>That’s a workaround.</p><p>Maybe an excellent one. Maybe it turns out to be incredibly fast. Maybe the resulting layout is better than the original anyway.</p><p>It’s still a workaround.</p><p>Systems engineering is full of hacks. “Hack” doesn’t mean “stupid” or “slow”. Some of the best systems I’ve worked on contain very clever hacks.</p><p>The useful test is this: <strong>would I have introduced that machinery if the constraint forcing it didn’t exist?</strong></p><p>If the answer is no, then the programming language changed the architecture to satisfy the programming language.</p><p>Sit with that for a moment. That cost belongs in the engineering calculation.</p><h3>Engineering Effort Is Not Free</h3><p>Another thing that gets lost in systems-language debates: we’ll happily spend hours arguing about the cost of an atomic instruction while treating the time of the people who have to understand a production system as if it were free.</p><p>It isn’t.</p><p>For most businesses, another CPU core or another gigabyte of RAM is far easier to buy than the time of an engineer capable of working out why a large, evolving object graph has started retaining memory after six months of feature development.</p><p>LLMs change the cost of <em>producing</em> code enormously. They can obviously help investigate and debug it too. But complexity doesn’t vanish just because an agent generated the implementation faster. Somebody still needs an architectural model that tells them whether what was generated makes sense.</p><p>So when I compare tracing GC with explicit ownership, I think we have to count both sides properly.</p><p>If GC costs me some runtime overhead but removes an entire category of ownership topology, cycle breaking and read-side reclamation from application code, that’s not obviously a bad performance trade.</p><p><strong>Engineering effort is part of performance engineering too.</strong></p><h3>Why Rust?</h3><p>This is the question I want to ask every time I see another large application rewritten in Rust.</p><p>Not “can Rust implement it?” Obviously it can.</p><p>Not even “will Rust produce fast code?” Almost certainly, assuming the application is designed well.</p><p>The more interesting question is:</p><p><strong>What property of this particular application makes Rust’s ownership model desirable?</strong></p><p>Writing a kernel or driver and need memory safety without a tracing runtime? Easy answer.</p><p>An application with strict hierarchical ownership and deterministic destruction? Again, perfectly reasonable.</p><p>“It needs to be fast”? I’m less convinced.</p><p>Stephen Toub’s Copilot rewrite is interesting precisely because it shows both sides. The migration achieved what GitHub wanted, and agents made a port of that size economically feasible. But Toub’s own write-up is also very clear that correctness still mattered enormously, and that state and lifetime errors were among the recurring classes of regression they had to hunt down afterwards.¹</p><p>The language doesn’t abolish architecture.</p><p>The agent doesn’t abolish architecture either.</p><h3>Would Rust Make 1search Faster?</h3><p>I don’t know.</p><p>And I’m deliberately not claiming otherwise.</p><p>Maybe a really good Rust implementation would beat the C# one. Maybe C# would win on the workload that actually mattered. Maybe the difference would be tiny next to the architectural and algorithmic choices.</p><p>My experience optimising 1search was that the very large gains came from understanding what the system was doing and removing work, not from moving code into a supposedly faster language. When we <a href="https://medium.com/carsales-dev/how-we-sped-up-the-carsales-search-engine-by-10x-5893d1e027d8">took our slowest navigation and refinement requests from 800ms to 80ms</a>, the single biggest win was simply not doing work the front end never needed.</p><p>If I’m doing unnecessary work, Rust can perform that unnecessary work extremely quickly.</p><p>I’d rather remove it.</p><p>The same principle applies to memory management. If my application genuinely needs an ownership and reclamation protocol, I want a very good one. But if tracing reachability already matches the lifetime semantics of the problem, I’d rather not invent another protocol just so I can say I got rid of the GC.</p><h3>If I Rebuilt 1search Today</h3><p>I’d use C# again.</p><p>Not because garbage collection is free. It isn’t. But today’s C# supports a lot of allocation free data structures.</p><p>Not because Rust can’t represent iNav. It can.</p><p>Not because Rust can’t efficiently reclaim old index generations. It can.</p><p>Not because arenas are inherently bad. They’re not.</p><p>And not because I know Rust would produce slower code. I’ve made no such claim.</p><p>I’d choose C# because <strong>the memory model fits the architecture I actually want to build.</strong></p><p>iNav can stay whatever graph makes sense for search. It can split and merge. Nodes can point forwards, backwards or sideways if the algorithm benefits. I don’t need those edges doubling as an ownership protocol.</p><p>And that’s only one part of the story.</p><p>Every search index can be published through a root. Readers capture whichever root is current and keep using that generation for the duration of their work. A replacement index is built separately and atomically published, while ordinary managed references keep the previous generation alive until the last reader is genuinely done.</p><p>Whether the thing behind that root is iNav’s graph or some completely different index structure doesn’t change the reclamation mechanism.</p><p><strong>That simplicity was system-wide.</strong></p><p>Where I need absolute CPU performance, I’ll do exactly what we already did with the SIMD bitmap kernels: isolate the code, hand it preallocated memory, and use the low-level tool that generates the machine code I want.</p><p>That leaves me with a system where tracing GC handles the complicated lifetime problem, while the lowest-level performance code barely has a lifetime problem at all.</p><p>I find that a far more attractive engineering trade than making explicit ownership the organising principle of everything in between.</p><p>And if the alternative eventually has me take a perfectly natural graph, allocate another region of memory, turn every reference into an integer handle, bolt software checks around those handles, and effectively build a little user-space address space so the language no longer sees my graph edges as references, I’m still going to call that what it is.</p><p>It’s a hack when I’m forced into it.</p><p>Sometimes a very clever one.</p><p>But I’d rather ask why I needed it in the first place.</p><p><em>If you’ve built something like this in Rust and think I’ve got it wrong, I’d genuinely like to hear how you handled it. Bring the benchmarks.</em></p><h3>References</h3><p>¹ Stephen Toub’s post on migrating the GitHub Copilot agent runtime from TypeScript to Rust (link to the original post to be added). Coverage: <a href="https://www.theregister.com/a/5297549">Microsoft agentically ports Copilot runtime to Rust for $120K, The Register</a></p><p>² <a href="https://doc.rust-lang.org/book/ch15-06-reference-cycles.html">Reference Cycles Can Leak Memory, The Rust Programming Language</a></p><p>³ DHH on Rust and agent-written code. Coverage: <a href="https://www.theregister.com/a/5301494">Rails originator roasted over Rust boosterism, The Register</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6a4aa57ab653" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Internet is DEAD]]></title>
            <link>https://zach-saw.medium.com/the-internet-is-dead-96a3f3ed866e?source=rss-808f4062f3b8------2</link>
            <guid isPermaLink="false">https://medium.com/p/96a3f3ed866e</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[internet]]></category>
            <dc:creator><![CDATA[Zach Saw]]></dc:creator>
            <pubDate>Mon, 15 Jun 2026 11:36:00 GMT</pubDate>
            <atom:updated>2026-06-16T01:16:05.714Z</atom:updated>
            <content:encoded><![CDATA[<p>You’re Just Too Distracted by AI To Notice.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*2w7MyQLIVZ39D_i6" /><figcaption>Photo by <a href="https://unsplash.com/@jensaber?utm_source=medium&amp;utm_medium=referral">Jens Aber</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><em>Yes, that title was bait. It worked, didn’t it? You clicked. You’re still reading. That’s the most I can hope for in 2026 — four seconds of your attention before the next notification pulls you somewhere else. I’ll try to make it worth it.</em></p><p><strong>The open internet is over.</strong></p><p>Not dying. Not struggling. Not “facing challenges.” Over. Finished. Captured. What you are using right now is the Matrix — a simulation of an internet, designed by corporations to feel like freedom while every meaningful exit has been quietly sealed. The difference is nobody offered you a red pill. They just slowly replaced the real thing while you were looking at your feed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-m66crJVeOOnE2O-Pe9_AQ.png" /><figcaption>The Real Internet © 2026 (fair use of copyrighted material)</figcaption></figure><p>I’ve been building software since before most of today’s developers were born. Long enough to have a bug citation to my name on Wikipedia — a Windows <a href="https://en.wikipedia.org/wiki/WoW64">WOW64 edge case</a> that was documented. Long enough to remember when the internet was a place, not a product. I wrote <a href="https://forum.doom9.org/showthread.php?t=171120">MediaPlayerDotNet</a>. More recently, made my multi-USB mic audio recorder <a href="https://coherenceaudio.app/">Coherence Audio</a> which I hacked up during COVID public. These are tools that do specific, difficult things well — not because there was a market, not because a VC told me the TAM was attractive, but because the problems were real and someone had to solve them properly. I have watched, over the course of a career, the ecosystem that made that work possible get systematically dismantled and replaced with something that wears its skin.</p><p>This essay is my account of what happened. It will not go viral. The algorithm will not surface it. You probably found it through a search engine (oh yes, once upon a time, there was this thing called the search engine), or someone sent it to you directly, which means you are one of the last people alive who still finds things that way. We are a dying breed. We’re branded “niche” these days and I’m writing this for us.</p><p>I am aware of how this reads. A veteran developer, grey at the temples, shaking his fist at the algorithm. Nostalgic for a time that probably wasn’t as good as he remembers it. Romanticising the past because the past is where his relevance lives.</p><p>Maybe. I’ve sat with that possibility.</p><p>But here’s the thing about getting old in technology: you are one of the few people alive who has the before <em>and</em> the after. You cannot gaslight someone who was there. I didn’t read about the old internet in a history article — I lived in it, built things for it, watched it get dismantled piece by piece while the people doing the dismantling called it progress.</p><p>Wisdom and bitterness can look identical from the outside. The difference is whether you’re wrong.</p><p>I don’t think I’m wrong. I think the evidence is sitting right in front of us, if we’re willing to look at it without the filter of whatever the algorithm (<strong><em>**cough**</em></strong> the Matrix) decided we should feel about it today.</p><p>But I’m an old man. What do I know.</p><h3>The Graveyard You Used To Live In</h3><p>There were places once. Real places. <strong>Doom9. Hydrogenaudio. AVSForum. VideoHelp</strong>. Forums built by obsessives for obsessives — ugly, slow, completely irreplaceable. A person could spend three days reading a single thread and emerge genuinely transformed. A tool author could release something and be met by five hundred people who understood exactly what they were looking at, who could see the craft in a codec decision and argue coherently about whether it was the right one. Don’t get me wrong, there were naysayers and defensive ones too who have chosen their poison and were always going to be unwilling to change. But for the most part, there was a genuine sense of belonging, people willing to try new things, testing it out for you, engaging with you when they found bugs, asking for features etc.</p><p><strong>That world is gone.</strong></p><p>It was replaced by <strong>Reddit</strong>, which was replaced by an algorithm that runs Reddit. By <strong>Hacker News</strong>, which has the “aesthetic” of a technical forum and the soul of a popularity contest. By <strong>Twitter</strong>, now a billionaire’s (now trillionaire’s?) mood board. By <strong>Discord</strong>, which creates community without creating knowledge — all conversation, no memory, nothing indexable and searchable by search engines, nothing that accumulates into anything a stranger could find three years later when they have the same problem.</p><p>And then there is <strong>GitHub</strong>. Which sounds like a solution until you think about it for thirty seconds. GitHub is where the code lives — but it is not a discovery engine, it is a storage vault. You can find something on GitHub if you already know it exists. The search is rudimentary, the ranking opaque, the signal-to-noise ratio on any given topic catastrophic. Stars are the only real currency and stars are a popularity metric, which means they measure momentum, not merit. A library that solves your exact problem brilliantly, written three years ago by someone who stopped promoting it, sits in total darkness next to a half-finished project with a polished README and a launch on YouTube via an influencer. GitHub does not surface the quiet excellent thing. It surfaces the thing that was already being talked about somewhere else — which brings you back, always, to the platforms that were already captured.</p><p>But here is the thing nobody talks about when they mourn the forums: discoverability was never a feature. It was a culture.</p><p>Nobody needed an algorithm to find <strong>Doom9</strong> if you cared about video encoding. Nobody needed a recommendation engine to find Hydrogenaudio if you cared about lossless audio. The enthusiasts found each other the way enthusiasts always have — by following the obsession wherever it led. A link in a readme. A signature in an email. Word of mouth in the literal sense, one person telling another person because they thought they’d care. The forums didn’t need to surface themselves because the people who needed them were already looking. Actively, hungrily, with genuine intent.</p><p>This is the thing the modern internet destroyed that it doesn’t even have a name for. Call it <strong><em>motivated discovery</em></strong> — the kind that happens when someone cares enough about a subject to go find where the serious people are, rather than waiting for the serious people to be served to them. The old internet rewarded that impulse at every turn. You searched, you found a thread, the thread led to a forum, the forum had a sidebar, the sidebar linked to three tools you didn’t know existed, one of those tools had a readme that mentioned a paper, the paper cited someone whose personal website had exactly the thing you needed. It was a web in the actual sense — nodes connecting to nodes, traversable by anyone with enough curiosity and patience to follow the thread. Fully connected but completely decentralised.</p><p>The new internet has severed those connections. Everything flows through platforms, and platforms have no incentive to send you somewhere else. The link that leads outside the ecosystem is a user they might lose. So the web of connections that let enthusiasts navigate toward each other has been replaced by walls with doors that only open inward.</p><p>The enthusiasts still exist. They are just atomised now, scattered, unable to find each other without the connective tissue that used to bind them.</p><p>The replacement wasn’t an equal. <strong>The old forums were <em>incubators, with experts and enthusiasts lurking and ready to participate and help</em></strong>. These forums held ideas long enough for them to grow. They had patience baked into their architecture — threaded discussions that stayed open for years, institutional memory that persisted, reputation systems based on whether <em>your tech was good</em> rather than whether you were <em>engaging </em>or your <em>ability to say something funny</em>. An on-going r/rust joke that will always give you upvotes is to respond with anything to do with the word <em>pointer</em>. That’s <em>very funny</em>, apparently — Rust and pointer.</p><p>The new platforms are the opposite of incubators. They are <em>accelerators</em>. Everything moves faster. Everything dies faster. A post lives for 48 hours on Reddit. A HN thread is archaeological history by Tuesday. This is not a neutral difference in pace. It is a different physics — one in which certain kinds of things simply cannot exist. Patient, technical, niche, difficult, important things.</p><p>Those things are gone with the platforms that could hold them.</p><h3>The Door Is Locked From The Inside</h3><p>Here is the detail that transforms this from a sad story into a dark one.</p><p>You cannot post on Reddit anymore. Not meaningfully. Not as a newcomer with something worth saying. You need karma — which you earn by posting on Reddit — which requires an existing presence — which you don’t have because you’re new. A perfect closed loop that permanently advantages incumbents and permanently excludes everyone else.</p><p>Hacker News is effectively the same karma system. Account history, posting patterns, invisible scores determining whether your submission surfaces or dies in silence.</p><p><em>Why did this happen?</em> Because of AI slop. Because the same tech that gave indie developers new tools gave spammers and vibe coders infinite content. The platforms, drowning, built walls. <strong>The flood of AI-generated nothing made genuine human voices indistinguishable from noise.</strong> The newcomer posting for the first time, with something real to say, is algorithmically identical to a spam account. So they are treated as one.</p><p>Meanwhile Vercel posts a product update and it’s on the front page of HN within twenty minutes. Microsoft announces something and r/programming is saturated for a day. They don’t need karma. They have brand recognition, PR machinery, and thousands of existing accounts positioned like chess pieces, ready to move on cue. The walls keep out individuals. Corporations flow through them like water.</p><p>This was not an accident. It is the shape of a completed capture.</p><h3>If Linux Were Announced Today</h3><p>August 1991. Linus Torvalds posts to a mailing list. <em>“I’m doing a (free) operating system (just a hobby, won’t be big and professional like gnu).”</em></p><p>That message reached the right people in the right place at the right time. A mailing list of technical minds who could immediately understand what was being proposed. No hook required. No landing page. No growth strategy. Just a channel with the patience and density of expertise to recognise significance when it was plainly stated.</p><p>Imagine that post today.</p><p>It goes up on r/programming. Twelve upvotes. Top comment: <strong><em>“just use BSD lol.”</em></strong> Buried within hours. The algorithm measured low early engagement and made its decision. The people who might have cared — scattered across forty Discord servers, three Slack workspaces, a newsletter nobody reads — never formed critical mass. Never found each other. The moment dissolved.</p><p><strong>Linus would need a content strategy before he had a kernel.</strong></p><p>Sit with that. <strong>Really. Sit. With. It.</strong></p><p>And now imagine Linus Torvalds as a content creator…</p><p>The operating system that runs the majority of the world’s servers, the backbone of Android, the infrastructure of the cloud itself — it required an internet willing to let a hobby project gestate in obscurity, nurtured by a small community of patient experts, for years, before it was ready to matter.</p><p><strong>That internet is gone. </strong>What replaced it cannot incubate anything. It can only amplify what is already large.</p><p>The next Linux almost certainly already exists. Sitting on a GitHub page with 40 stars, maintained by someone who is slowly running out of reasons to keep going.</p><h3>The Religion of React and The Death of Better Ideas</h3><p>Imagine you have built something genuinely new. Maybe a UI framework that solves problems React doesn’t. Better architecture. Cleaner mental model. Real performance improvements at scale. You have the benchmarks. The work is sound.</p><p>You try to tell people.</p><p>You post on HN (assuming you’ve gone enough karma to begin with). The React faithful arrive within the hour. The comments are not technical engagement. They are antibodies. <em>“But React has hooks now.” “Our team standardised on React for a reason.” “Spend 15 minutes to learn React, you might find it better than you think”</em>Fifteen minutes of visibility. Then the thread ages out and you’re gone.</p><p>You post on Reddit. Same response, less vocabulary.</p><p>You try Twitter. Unless you’re a celebrity or that eccentric billion/trillionaire, you’re essentially shouting in an empty room.</p><p>The people with audiences — the YouTubers, the newsletter writers, the voices that could actually reach someone — won’t cover you because you’re unproven. You can’t get proven without coverage. Airtight. Inescapable.</p><p>This is not competition. Competition implies a fair contest. This is <em>structural invisibility</em> — an architecture that cannot evaluate technical merit on its own terms, slowly, over time, by people qualified to judge it.</p><p>React is no longer a technology. It is a religion. An identity. Religions do not evaluate heresy on its merits. They burn it. The old forums were brutal but empirical — show your benchmarks, defend your assumptions, survive the stress test. That was a system for converging on truth. Ugly, slow, occasionally cruel, but honest and supportive in its core mechanism.</p><p>What we have now is a system for confirming priors at scale. At enormous, suffocating scale. The best idea in the room cannot be heard over the noise of ten thousand people repeating the last best idea.</p><h3>The “They Don’t Make Money” Lie</h3><p>Someone will read this and say: <em>“Indie developers don’t matter. There’s no money in what they’re doing.”</em></p><p>This is the voice of the captured internet speaking. Internalised. Automated. Delivered with total confidence by people who have never built anything that outlasted a sprint cycle.</p><p><strong>VLC. Audacity. foobar2000. WinRAR. SQLite. ShareX. ffmpeg. Log4J. MediatR… </strong>Libs and tools with billions of cumulative hours of use. Tools that sit silently inside the products of the very corporations that have “won” the internet. Built by people earning nothing or close to it. And don’t get me started on the corporations exploiting open source — earning billions without paying a single cent back, without open sourcing their own code, without even the basic dignity of acknowledgment. <strong>They take. That is the entire relationship. </strong>MIT/Apache? Great! Thank you very much! 💲💲💲</p><p>Log4J is particularly vicious because it proves the point twice over: corporations embedded it everywhere <strong><em>without paying</em></strong>, then when the vulnerability hit, the maintainer — a single volunteer — got blamed, by everyone in the world, for not moving fast enough to fix <em>their</em> infrastructure. I was there when it happened — everyone around me laughed at and made crude jokes about the maintainer. The audacity is breathtaking and the anger I’m feeling as I am typing this out is making me mad!</p><p>I need a break to calm myself down… BRB!</p><p>Let’s keep going…</p><p>SQLite is probably the most widely deployed database engine in the world. It powers your iPhone, your browser, your car’s infotainment system. Its authors have famously resisted commercialisation. By the logic of the modern internet — by the logic of engagement metrics and TAM and Series B valuations — SQLite should not exist and does not matter.</p><p>The “no money” dismissal is not a neutral observation. It is a <em>symptom</em>. It is the specific cognitive failure that the modern internet has encoded into its infrastructure and scaled to billions of people. When the only legible signal is revenue or virality, you become structurally blind to public goods, to infrastructure, to the compounding value of niche excellence, to everything that matters over a long enough time horizon.</p><p><strong>Big corporations did not win by building better things. They won by making “better” mean something so narrow that only they could qualify.</strong></p><h3>Who Already Left</h3><p>I want to tell you something uncomfortable.</p><p>I think about quitting.</p><p>Not because the work is hard. Not because the problems aren’t interesting. Because there is a specific class of exhaustion that comes not from effort but from <em>building in a room with no windows</em>. From shipping something excellent and watching it fall into a void that was not designed to receive it. From the slow accumulation of a broken feedback loop — the growing distance between the quality of the work and the legibility of that quality to the world around you.</p><p>The old forums gave builders something that no platform gives them now: <em>peers who could see what they were doing</em>. Not fame. Not followers. Just the experience of being accurately understood by people qualified to understand you. That is not a luxury. For the kind of person who builds the things worth building, it is the thing that makes continued building possible. Perhaps the most important part of all —<strong> learning from those experts lurking around in the forums.</strong></p><p><strong>It is gone.</strong></p><p>And so I ask, quietly, into the void: how many people who felt exactly this felt it for the last time?</p><p>You cannot measure the absent. You cannot count the libraries that were never released, the tools that died half-finished, the ideas abandoned not because they were wrong but because the person carrying them ran out of reasons to keep going. The cost is invisible by design. It will never appear in any metric. No dashboard will ever show you the software that wasn’t written.</p><p>The internet did not lose its average engineers. Average engineers are fine. They learn the current framework, follow the current trend, collect their salary from whichever corporation absorbed the last indie project they used to love. The system works for them.</p><p>What the internet is losing — has perhaps mostly already lost — is something more specific. The builders with the highest standards and the lowest tolerance for performance. The ones who wouldn’t compromise the work to make it more shareable/twittable. The ones who refused to become content creators as the price of having their software seen. The ones for whom the only acceptable feedback loop was the honest, brutal, accurate assessment of genuine peers.</p><p>Those people are tired. Some of them are gone. More will follow.</p><h3>The Completed Capture</h3><p>Let me be precise about what has happened, because it is important not to sentimentalise it.</p><p><strong>The open internet had a window.</strong> It was not large and it did not stay open long. Roughly <strong>from the early 1990s to the mid-2010s</strong>, there existed an internet where a person of no means, no connections, and no corporate backing could build something technically excellent, find their audience through focused communities, and matter. The infrastructure for this existed: mailing lists, forums, IRC, Usenet. Unglamorous, distributed, owned by no one, optimised for nothing except communication.</p><p>That window closed. It closed because advertising-driven platforms replaced forums — because engagement metrics reward velocity over depth, controversy over correctness, emotion over expertise. It closed because mobile-first design made long-form technical discourse structurally incompatible with the dominant interface paradigm. It closed because venture capital flooded into the platforms that could reach millions of generalists and starved the infrastructure serving thousands of specialists. It’s designed to capture the attention span of the “modern generation”, who’ve had their attention span shortened further and further by exactly this design in a vicious cycle.</p><p>And then, as a final insult, it closed from the <em>inside</em>. The platforms, drowning in AI slop and spam, erected walls. Karma requirements. Account age minimums. Shadowbans for new accounts. The last doors shut, not by corporate decree but by the automated logic of platforms trying to survive the mess they’d helped create.</p><p><strong>Vercel. Microsoft. Google. Amazon. Meta.</strong></p><p>These companies did not win because they built better things. They won because they existed before the window closed and accumulated the mass — the users, the karma, the brand recognition, the armies of accounts — that the new architecture rewards. They are permanent. The infrastructure now serves them. The doors are locked to everyone else.</p><p>This is not a phase. This is not a cycle. This is not something that will self-correct when the market matures. The window is closed. The capture is complete.</p><p>Welcome to the post-open-internet era. It looks almost exactly like the internet. That is the most frightening thing about it.</p><h3>The 40 (or 4) People</h3><p>This essay will not land. It will not be shared widely. It will not surface on any platform optimised for any metric that matters to the companies that own those platforms. It will float in what remains of the open web — indexable, findable, patient — waiting.</p><p>In three years, perhaps, someone with a very specific search query will find it at 2am. They will be a developer. They will have recently shipped something they’re quietly proud of into complete silence. They will read this and feel, for a moment, precisely located — named, understood, not alone in what they’ve been thinking.</p><p>That is enough. That is the whole point.</p><p>The 40-star GitHub repository I mentioned at the beginning — the one with the exceptional code and the abandoned README — it matters. Not because anyone knows it. Because it exists. Because someone cared enough about a problem to solve it well, even in a world that had stopped providing any reason to.</p><p>The people still building, in the dark, without the feedback loop, without the community, without any realistic prospect of being seen by a platform that has already decided who gets to be seen —</p><p>They are not naive. They are not deluded. They are the last practitioners of something the internet has decided it no longer has room for.</p><h3>The Future with AI</h3><p>And here is the final dark turn. The thing that keeps me awake.</p><p>Artificial intelligence was supposed to democratise everything. Lower the barrier. Give the lone builder superpowers. And in some narrow technical sense, it has — I can write code faster, prototype quicker, move through problems that used to take days. I won’t pretend otherwise.</p><p>But look at what AI is trained on. Look at what it amplifies.</p><p>AI does not discover buried gems. It cannot. It is trained on the visible web — the indexed, the surfaced, the algorithmically promoted. It ingests what the platforms decided to show people. It learns from the winners. It encodes, at civilisational scale, the exact bias that killed the forums: that what is popular is what is good, that what was seen was worth seeing, that the distribution was fair. Google’s AI in place of search will never recommend something niche even if it’s perfect for the job. Try asking it why and you’ll get a perfectly valid reason.</p><p>It wasn’t fair. It was captured.</p><p>So AI will give us faster, more fluent, more confident repetition of the things that were already large. React will be more React. The established frameworks will be taught to millions who will never be told there was ever a serious alternative. The corporate products will be summarised, explained, promoted, and integrated. The 40-star repository will never be recommended.</p><p>What we are losing is not nostalgia. It is not a preference for the old way. What we are losing is the mechanism by which genuinely new things — things that threaten incumbents, things too strange or niche or difficult to immediately monetise — could find the people who needed them and survive long enough to matter.</p><p>Every generation of technology should expand what is possible for the individual against the institution. The printing press did. The early internet did. Personal computing did. Each one cracked the door open a little wider.</p><p>AI, as currently deployed, in the world as currently structured, is doing the opposite. It is the most powerful pattern-matching and content-generation system ever built — pointed at an internet that has already been captured, trained on a corpus that reflects that capture, and deployed by the very corporations that completed it.</p><p>It will not surface the next Linux. It will recommend the current one.</p><p>It will not find the framework that is genuinely better than React. It will help you learn React faster.</p><p>We are not losing the past. <strong>We are losing the future</strong> — the specific futures that only become possible when a genuinely new idea can find oxygen before the incumbents notice it exists.</p><p>That window is closing. Maybe already closed. <strong>And we are building, with enormous sophistication and tremendous excitement, a machine that will help us live more efficiently inside the room we are locked in.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*L5_65Af6DVSFeC2r" /><figcaption>Photo by <a href="https://unsplash.com/@markusspiske?utm_source=medium&amp;utm_medium=referral">Markus Spiske</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><em>If you read this far: you are the person this was written for. There are not many of you. That’s the whole problem. Reach out if you know how we could fix this or just want to share your thoughts.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=96a3f3ed866e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Simultaneously Record Multiple USB Mics on Windows]]></title>
            <link>https://zach-saw.medium.com/how-to-simultaneously-record-multiple-usb-mics-on-windows-3ef4f4ff42e5?source=rss-808f4062f3b8------2</link>
            <guid isPermaLink="false">https://medium.com/p/3ef4f4ff42e5</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[podcasting]]></category>
            <category><![CDATA[audio-engineering]]></category>
            <category><![CDATA[windows]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Zach Saw]]></dc:creator>
            <pubDate>Sun, 26 Apr 2026 21:34:21 GMT</pubDate>
            <atom:updated>2026-04-26T21:34:21.705Z</atom:updated>
            <content:encoded><![CDATA[<p><em>For years, recording two or more USB microphones on a PC has been a frustrating, hacky mess.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*chE1NGjE24k6Zi5s" /><figcaption>Multi USB Mic audio recording is difficult on Windows</figcaption></figure><p>Almost everyone I know has a specific drawer in their house holding the ghosts of 2020: a tangle of webcams, ring lights, and at least two perfectly good USB microphones bought during the pandemic Zoom boom.</p><p>Now, maybe you want to put those mics to good use. Maybe you want to start a podcast with a friend sitting across the table, or record a live jam session. You grab a Blue Yeti and a Samson Meteor from the junk drawer, plug them both into your Windows laptop, open your recording software, and immediately hit a brick wall.</p><p>Digital audio workstations (DAWs) are designed to listen to <em>one</em> audio interface at a time. If you want to be <strong>simultaneously recording multiple USB mics on Windows</strong>, you will quickly discover a harsh reality: there is simply no native, plug-and-play way to do it.</p><p>Before you spend hours wrestling with sketchy third-party drivers or confusing virtual cables, you should know that I got so frustrated with this OS-level headache that I built a native Windows 11 application to fix it. It’s called <strong>Coherence Audio</strong> (you can grab the <a href="https://coherenceaudio.app/">free version</a> right now).</p><p>But to understand why Coherence works where everything else fails, you have to understand the absolute nightmare of how computers handle audio aggregation.</p><h3>The Problem with “Aggregate Devices”</h3><p>If you ask a Mac user how to record multiple inputs, they’ll smugly point you to macOS’s built-in “Aggregate Device” utility. But let’s be honest about what that actually is — it’s just an OS-level driver wrapper, and it comes with a host of compromises. It doesn’t allow you to record at any bit depth or sample rate per device; it forces everything into a unified format, resampling your audio on the fly. And if you want to quickly adjust the hardware recording gain of one specific microphone? Get ready to juggle two separate windows, frantically clicking between your DAW and the Audio MIDI Setup utility while your guest is talking.</p><p>On Windows, however, the situation is even worse. Historically, PC users have been forced to rely on clunky workarounds like ASIO4ALL or virtual mixers like Voicemeeter.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*NxHJaP0BjuL91_cs" /><figcaption>Typical individual track setup with Reaper and VoiceMeeter</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*I9v5GO5thZyLb4DQ.png" /><figcaption>All in one beginner friendly modern UI of Coherence Audio</figcaption></figure><p>I spent a lot of time testing Windows workarounds, and the biggest flaw isn’t just the crashes — it’s the ‘baked-in’ audio trap.</p><p>Most virtual drivers default to summing every USB device into a single stereo track. If you’re recording a three-person podcast and someone coughs, that noise is permanently glued to everyone else’s voice. Even with advanced virtual mixers that <em>allow</em> multi-track isolation, you’re forced to jump through complex routing hoops and downgrade every microphone to the same <strong>sample rate and bit depth</strong> just to keep the system from collapsing. Even then, you’re still fighting clock drift, where tracks slowly slide out of sync over time.</p><h3>My Origin Story: The Piano Problem</h3><p>I didn’t actually set out to build podcasting software. It all started with an acoustic piano.</p><p>My son was preparing for his piano performances, and I wanted to capture the true depth and resonance of the instrument. The best way to do this is through “close miking” — placing one microphone to capture the low strings and another to capture the high strings — and an omni directional mic for recording room ambience. When I tried to use three USB mics to do this, the forced stereo mixdowns and the headache + time spent on setting up the virtual mixers of existing Windows workarounds completely ruined the experience and recording. If the microphone on the lower strings was significantly louder than the high strings, I couldn’t fix it in post processing. I had to get it right every single time, and if you’ve ever recorded piano, you know that every piece needs a different mix to capture the mood. I spent more time troubleshooting virtual cables than listening to the music.</p><p>That frustration is exactly why I wrote Coherence Audio. I needed a way to strip away the technical overhead and get straight to the multi-track files. For a long time, it was just a private tool I used for those piano sessions, but I realized that the same beginner friendly simplicity I needed for my son’s piano is exactly what’s missing for everyone else trying to record on Windows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*86T7IpLRy7ty7DjklDgEHA.jpeg" /><figcaption>Piano recording</figcaption></figure><h3>Independence Over Aggregation</h3><p>Coherence takes a completely different approach. Instead of fighting the Windows audio architecture by aggregating devices, it opens every WASAPI-compatible audio device as a completely independent recording stream.</p><p>There is no forced mixing, no summing down to stereo, and no forced resampling. Each device is captured raw, unprocessed, and at its own native sample rate and bit depth. You get perfectly isolated tracks for every single input.</p><p>Everything you need is in one elegant window. You can adjust the hardware gain for each individual mic right next to its real-time waveform and VU meter — no digging through the Windows Control Panel (good luck finding that in Windows 11 modern UI).</p><p>When your session is done, everything is saved into a self-contained “.coh” project file. Using the Audacity LOF (List of Files) export feature, you can instantly bounce out your individual .wav stems to mix in your DAW of choice.</p><p>And the best part? <strong>The Basic Edition is completely free.</strong> It includes unlimited tracks and USB mics (only limited by your machine’s USB ports and USB bandwidth), per-device latency compensation, and a USB hot-plug recovery feature, so if a cable gets accidentally yanked mid-recording, your session doesn’t crash.</p><h3>The Elephant in the Room: Clock Drift</h3><p>If you’ve ever successfully recorded isolated tracks from multiple USB mics, you inevitably encountered the final boss of digital audio: <strong>Clock Drift.</strong></p><p>Every digital audio device is driven by its own internal USB clock source — usually a microscopic quartz crystal oscillator. Because these are physical components, no two crystals vibrate at the exact same frequency. Even if you have two identical microphones set to record at 48,000 Hz, one might actually be capturing 48,000.1 samples per second, while the other captures 47,999.8.</p><p>In a quick 5-minute recording, you won’t notice. But over a longer session, those tiny fractions of a second accumulate into a massive problem.</p><p>Let me give you a real-world example. Even if you pull two high-quality, reputable USB microphones out of your drawer — say, a Samson Meteor and a Blue Yeti Pro — a standard one-hour recording can easily drift by <strong>150 milliseconds</strong> without correction.</p><p>Here is what that actually does to your project:</p><ul><li><strong>In a podcast:</strong> If you and your co-host laugh at the same time, or talk over each other for a brief moment, that 150ms delay creates a jarring, slap-back echo. It sounds like one of you is broadcasting from the bottom of a canyon.</li><li><strong>In instrument recording:</strong> For something like my acoustic piano setup, 150ms is catastrophic. It’s way past the point of mere phase cancellation or “comb filtering.” At 150ms, a single piano strike actually sounds like two distinct hits. It creates a phantom “grace note” that wasn’t there to begin with, completely ruining the timing, feel, and integrity of the recording.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0-maHzUUV7m9VIwABwETlg.png" /><figcaption>138ms drift after 53 mins of recording without drift correction</figcaption></figure><h3>Why the “Clap Test” Fails 👏</h3><p>Now, the old-school manual workaround for this is the “clap test.” You clap loudly at the beginning of your recording, and clap again at the very end. Then, you manually time-stretch the audio in your DAW to make the ends line up.</p><p>But there’s a fatal flaw with this method: it assumes the clock drift is perfectly linear. In reality, as the microphones heat up or the room temperature changes over that hour, the clocks fluctuate. Manual stretching doesn’t take into account these mid-recording drifts. Your start and end points might line up, but the middle of your recording will still drift in and out of sync.</p><h3>The Hard Truth: Not All Audio Devices Are Created Equal</h3><p>During development, I spent a massive amount of time analyzing how different devices communicate their timing data. And I have to be brutally honest here: I didn’t magically solve clock drift for <em>every</em> device on the market, because for some hardware, it is mathematically impossible.</p><p>To understand why, we have to look at the three distinct categories of audio devices you might try to record with:</p><ol><li><strong>The “Good” USB Mics (The Solvable Ones) 👍</strong><br>Microphones like the Blue Yeti Pro or Samson Meteor use Asynchronous USB Audio. They have a high-quality local crystal oscillator that never “negotiates” its speed — it runs at exactly its rated frequency. Crucially, they utilize a “Feedback Endpoint.” This is a dedicated data pipe that constantly tells the PC: <em>“I am currently at X samples; adjust your consumption to match me.”</em> Because they use high-end chips (like XMOS or C-Media) designed for low-latency monitoring, they don’t store audio in massive internal buffers. They stream it immediately. These mics drift, but they drift <em>predictably</em>, meaning software can calculate a slope and correct it.</li><li><strong>The Cheap, “Knockoff” USB Mics (The Jitter Problem) 👎</strong><br>Ultra-cheap USB mics operate on an “open loop.” They just shout data at the PC and hope it catches it. The fatal flaw here is <strong>variable internal latency</strong>. Imagine a cheap mic with a tiny, underpowered internal processor. If that processor gets “distracted” by a USB power fluctuation, it might hold onto an audio packet for an extra 2 milliseconds before sending it.<br>When the software receives that delayed packet, it timestamps it and fills the gap. On your DAW timeline, the file length looks “perfect.” But the reality is that the audio <em>inside</em> that packet actually happened 2ms earlier than the timestamp suggests. The result? The sound is jittering in time. If you combine it with another mic, you get a weird, subtle “phasing” or “flanging” effect that ruins the recording.</li><li><strong>Realtek / Onboard Motherboard Audio (The Rubber-Band Effect) 👎</strong><br>People often conflate onboard Realtek chips with USB, but they are completely different beasts. Realtek chips sit on the motherboard’s High Definition Audio (HDA) bus. Instead of relying on a dedicated, ultra-precise hardware clock, they are heavily host-driven. They rely on your PC’s CPU and Windows’ internal scheduling to move data into system RAM via Direct Memory Access (DMA). Because Windows is not a real-time operating system, the time it takes to process these buffers fluctuates wildly depending on what else your CPU is doing (known as DPC latency). To prevent audio dropouts, the driver uses massive, variable-sized buffers. The latency effectively “rubber-bands” back and forth randomly due to Scheduling Quantum or Interrupt/DPC Latency. Because the CPU is busy, it misses the “ideal” time to empty the audio buffer, forcing the chip to wait for the next available CPU cycle. Because the timing is constantly shifting, it is impossible to establish a true, continuous drift slope to correct. You can’t stretch a file to match a target if the speed of the source was changing every few milliseconds.</li></ol><h3>Coherence Pro: The $129.99 Solution</h3><p>But for those proper, class-compliant USB microphones (Category 1) that provide stable clock streams, this mathematical puzzle <em>can</em> be solved. That is why I created the <strong>Pro Edition</strong> of Coherence Audio, available for <strong>$129.99 USD</strong>.</p><p>While the free version lets you record as many mics as you want, Coherence Pro introduces <strong>Automatic Clock-Drift Correction</strong> that actively accounts for those mid-recording fluctuations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*BHOsWr8guFMQDe96rKHWoA.png" /><figcaption>Pro Edition Automatic Drift Correction</figcaption></figure><p>Here is the crucial detail: <strong>drift correction in Coherence Pro is a post-recording step, not a real-time process.</strong> This was a very deliberate design choice. Coherence isn’t designed for real-time monitoring via headphones anyway, and trying to resample multiple audio streams on the fly is incredibly CPU-intensive. If your computer is under strain — especially when recording a high number of microphones — real-time resampling can introduce nasty pops, clicks, and crackles into your audio.</p><p>By applying the correction immediately after you hit stop, we aren’t bound by real-time CPU limits. This allows Coherence Pro to use vastly superior, studio-grade resampling algorithms. Specifically, we use a Kaiser-windowed filter that achieves a massive 117dB of stopband rejection.</p><p>You simply designate one microphone as the “Clock Master.” When you finish recording, Coherence mathematically recalculates and resamples the audio streams of the other devices to perfectly lock in with it at an incredibly high quality. You can plug in a high-end Shure mic and a standard Blue Yeti, hit record for an hour, and Coherence Pro will ensure every single track is sample-accurate, perfectly synced, and artifact-free by the time you’re ready to export.</p><h3><strong>Stop Fighting Your OS and Start Recording</strong></h3><p>I built Coherence Audio because I believe creators shouldn’t need a degree in audio engineering — or have to sacrifice their isolated multi-tracks — just to record a podcast with a friend or track a piano performance.</p><p>If you’re tired of fighting with ASIO4ALL, sick of Voicemeeter routing your mics into a single stereo file and want a stable recording environment without the compromises of macOS aggregate drivers, it’s time to try a better way.</p><p><strong>Coherence Audio is available exclusively on the </strong><a href="https://apps.microsoft.com/detail/9nbst9thch5r"><strong>Microsoft Store</strong></a><strong>.</strong> This means it is fully certified, rigorously tested, and guaranteed safe to download — no sketchy third-party installers required.</p><p>You can download the free Basic Edition right now on the Microsoft Store or learn more at <a href="https://coherenceaudio.app/">Coherence Audio website</a>. The free version gives you everything you need to start recording unlimited, isolated tracks today. And if you value your time and want a truly plug-and-play, sync-locked recording experience that handles the nightmare of clock drift for you, the Pro upgrade is there to do the heavy lifting.</p><p>Dust off those mics, plug them in, and get back to creating.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3ef4f4ff42e5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[20 Years Ago I Gamed Intel’s OKRs and Emailed the CEO About It.]]></title>
            <link>https://zach-saw.medium.com/ive-waited-20-years-to-tell-this-story-how-i-gamed-intel-s-okrs-and-emailed-the-ceo-about-it-e00521ea9c1c?source=rss-808f4062f3b8------2</link>
            <guid isPermaLink="false">https://medium.com/p/e00521ea9c1c</guid>
            <category><![CDATA[corporate-culture]]></category>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[management]]></category>
            <category><![CDATA[okr]]></category>
            <dc:creator><![CDATA[Zach Saw]]></dc:creator>
            <pubDate>Tue, 06 May 2025 12:06:12 GMT</pubDate>
            <atom:updated>2025-05-07T07:25:23.226Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ifGWLTkJCYpJQSaV" /><figcaption>OKRs (Objectives and Key Results) are like the rules of a chess game</figcaption></figure><p>It was 2003.</p><p>I was a fresh graduate, barely two years into my first real job at Intel — <em>the</em> Intel. The company that practically invented the modern processor, run by legends, and driven by a management system that originated within its own walls long before the rest of the tech world caught on: Objectives and Key Results, or OKRs. It felt like being in the engine room of innovation.</p><p>This wasn’t some newfangled trend Intel had just adopted. OKRs were pioneered right there by the legendary CEO <a href="https://en.wikipedia.org/wiki/Andrew_Grove">Andy Grove</a> back in the 1970s¹. Intel had been running on this system for <em>decades</em>, using it to navigate massive strategic shifts, long before<a href="https://en.wikipedia.org/wiki/John_Doerr"> John Doerr</a> introduced it (then called iMBO — Intel Management by Objectives) to a young Google in 1999 and sparked its popularity across Silicon Valley². This deep history meant OKRs weren’t just a process at Intel; they were deeply ingrained in the corporate DNA, woven into the fabric of how performance was measured and discussed.</p><p>And on one of my last days there, I did something audacious. I wrote an email to the then CEO, Craig Barrett. I didn’t just wish him well; I told him, point-blank, how this revered, homegrown OKR system was being systematically gamed, right under management’s nose. And I knew exactly how, because I was doing it too. This is the story I’ve held onto for two decades.</p><p>Intel had this famous “Open Door Policy³.” It was drilled into us — feedback was welcome, speak your mind, challenge the status quo. It sounded great on paper, a testament to the company’s engineering roots. I decided to take them at their word.</p><p>You see, the air at Intel back then wasn’t just buzzing with Moore’s Law; it was thick with the constant chatter of “<strong>low-hanging fruit</strong>.” Because OKRs, despite their strategic intent, had become subtly, or perhaps not-so-subtly, intertwined with performance reviews over those many years. And performance reviews, naturally, influenced compensation and career progression⁴. This linkage, baked in over decades, set the stage for a culture of optimisation — not necessarily for innovation, but for the review cycle itself.</p><p>The result? The incentive structure wasn’t truly rewarding groundbreaking work or tackling the complex, risky challenges that drive long-term innovation. Instead, it rewarded <em>visibility</em> and <em>checkmarks</em>. This didn’t just affect individual choices; it permeated the culture:</p><ul><li><strong>Internal Team Conflict<br></strong>Within teams, colleagues often found themselves subtly (or not so subtly) competing for the same “low-hanging fruit” — those easy, visible tasks that would look good on a review. Collaboration suffered as the focus shifted to individual KR achievement.</li><li><strong>Inter-Departmental Rivalry<br></strong>The intense focus on departmental OKRs, sometimes coupled with budget battles, could make different groups feel like rivals rather than collaborators working towards a common company goal. This siloed mentality is a known risk when OKR implementation lacks strong top-down alignment and has been noted in critiques of Intel’s internal dynamics over the years.</li></ul><p>Here’s how the game worked at the individual level (using more relatable examples in the software industry where I recently sadly had to play this game <em>again</em>):</p><ul><li><strong>Identify the Visible<br></strong>Find tasks or small projects that were easy to complete but highly visible to management. Fixing a minor but annoying bug that a VP had complained about? Gold. Plenty of brown bag (tech sharing) sessions? Perfect.</li><li><strong>Quantify the Trivial<br></strong>Frame these tasks using the OKR structure. Objective: Enhance Team Productivity. Key Result: Reduce build time by 5% (even if that 5% saved mere minutes and required minimal effort). Key Result: Close 10 ‘papercut’ bugs (even if they had negligible impact).</li><li><strong>Maximise Volume<br></strong>Focus on racking up <em>quantity</em> of completed KRs linked to seemingly reasonable Objectives. The more you had to write on your performance review, the better.</li><li><strong>Avoid the Hard Stuff<br></strong>Shy away from the truly difficult, long-term projects. The ones that might actually lead to a breakthrough but carried the risk of failure or, worse, had results that wouldn’t neatly manifest by the next review cycle. Why risk “Missing” your KRs on something hard when you could guarantee “Exceeds Expectations” on a dozen easy things?</li></ul><p>We weren’t lazy. We were responding rationally to the incentives laid out for us. The system encouraged us to polish the chrome while the engine might need an overhaul. We were hitting our Key Results, our managers were happy, and performance reviews often reflected this flurry of activity. But something felt fundamentally wrong. Was this really driving Intel forward? Was this the best use of some of the brightest minds in the world?</p><p>It gnawed at me. This wasn’t the innovative powerhouse I had imagined. It felt like we were optimising for the review cycle, not for market leadership or genuine progress.</p><p>So, leveraging the “Open Door Policy,” I typed out my email to Mr. Barrett. I explained the “low-hanging fruit” phenomenon. I described how the pressure to achieve measurable KRs tied to reviews incentivised gaming the system, fostering internal competition over collaboration. I confessed I’d done it myself to secure that coveted “Exceeds Expectations.” I expressed my concern, as a departing junior employee, that this focus on easily quantifiable, visible, short-term wins could, over the long run, dull Intel’s innovative edge.</p><p>Then, heart pounding, I cc’d a huge swath of Intel’s worldwide employee list (excluding China, due to company policy).</p><p>I hit <strong><em>send</em></strong>.</p><p><strong><em>Silence</em></strong>.</p><p>No black helicopters descended, no angry VPs called me into their office. Perhaps it was lost in the noise, dismissed as naive given my lowly ranks, or maybe, just maybe, it struck a chord somewhere, only to be buried under corporate inertia. For 20 years, it remained just a personal memory, a story of youthful audacity.</p><p>Fast forward over those 20 years. In April 2025, news broke that Intel was making its formal OKR requirements <em>optional⁵</em>. This decision came under the leadership of the new CEO, Lip-Bu Tan — who, in a connection that resonates personally, happens to be a fellow Malaysian. In his communication, he cited the need to simplify, reduce time spent on internal administrative work, eliminate unnecessary meetings, and find more flexible ways to maintain accountability. Reading between the lines, it felt like an acknowledgment that the system, as implemented over decades, might have become more of a hindrance than a help. Bravo, Mr. Tan!</p><p>A sense of validation washed over me. Not because I claimed to have changed anything back then, but because the very dynamic I tried to flag — the potential for OKRs, when tied too closely to evaluation and compensation, to become counterproductive — seemed to be implicitly recognised decades later, under the stewardship of someone who shares my Malaysian roots. The time finally felt right to share this story.</p><p>My experience isn’t unique to Intel (or more recently Atlassian with their new CTO recruit from Meta Rajeev Rajan). Countless other companies adopt OKRs hoping to replicate the magic of Google or Intel’s glory days. But they often miss the crucial caveat emphasised by John Doerr and many OKR experts: <strong>OKRs should be decoupled from compensation⁷.</strong></p><p>When you tie ambitious goals directly to paychecks and promotions, you invite sandbagging (setting safe goals), stifle risk-taking, kill psychological safety, and incentivise people to game the system, focusing on looking good rather than doing good. You get busywork that mimics progress, mistaking motion for action, and can even foster unhealthy internal competition.</p><p>OKRs can be a powerful tool for alignment, focus, and tracking progress towards ambitious goals. But they are a tool for <em>management</em>, not for <em>measurement</em> tied to reward⁶. Culture and implementation matter more than the framework itself, especially when a system has been in place for so long.</p><p>That day back in 2003, I used the Open Door Policy to send a warning flare about a system Intel itself had created. It took over two decades, but the smoke seems to have finally signaled something worth changing. And after 20 years, it feels good to finally tell the story.</p><p>[1]: Objectives and key results<br><a href="https://en.wikipedia.org/wiki/Objectives_and_key_results">https://en.wikipedia.org/wiki/Objectives_and_key_results</a></p><p>[2]: A History of Objectives and Key Results (OKRs)<br><a href="https://peoplelogic.ai/blog/history-of-objectives-and-key-results">https://peoplelogic.ai/blog/history-of-objectives-and-key-results</a></p><p>[3]: Intel Global Citizenship Report 2001: Vision &amp; Values<br><a href="https://csrreportbuilder.intel.com/PDFfiles/archived_reports/Intel%202001%20CSR%20Report.pdf">https://csrreportbuilder.intel.com/PDFfiles/archived_reports/Intel%202001%20CSR%20Report.pdf</a></p><p>[4]: Should You Connect OKRs and Compensation? (Spoiler Alert: No)<br><a href="https://www.whatmatters.com/articles/should-you-connect-okrs-and-compensation-spoiler-alert-no">https://www.whatmatters.com/articles/should-you-connect-okrs-and-compensation-spoiler-alert-no</a></p><p>[5]: Lip-Bu Tan: Our Path Forward<br><a href="https://www.intc.com/news-events/press-releases/detail/1738/lip-bu-tan-our-path-forward">https://www.intc.com/news-events/press-releases/detail/1738/lip-bu-tan-our-path-forward</a></p><p>[6]: Building OKR Compatible Performance Management Systems<br><a href="https://agile-strategies.com/building-okr-compatible-performance-management-systems/">https://agile-strategies.com/building-okr-compatible-performance-management-systems/</a></p><p>[7]: Book Notes #52: Measure What Matters by John Doerr<br><a href="https://williammeller.com/measure-what-matters-by-john-doerr/">https://williammeller.com/measure-what-matters-by-john-doerr/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e00521ea9c1c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Escape MediatR’s Debugging Nightmare: Step Into Your Code & Get 146x Faster Startup]]></title>
            <link>https://zach-saw.medium.com/escape-mediatrs-debugging-nightmare-step-into-your-code-get-146x-faster-startup-fa8d63855443?source=rss-808f4062f3b8------2</link>
            <guid isPermaLink="false">https://medium.com/p/fa8d63855443</guid>
            <category><![CDATA[csharp]]></category>
            <category><![CDATA[performance]]></category>
            <category><![CDATA[design-patterns]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[dotnet]]></category>
            <dc:creator><![CDATA[Zach Saw]]></dc:creator>
            <pubDate>Thu, 24 Apr 2025 12:55:31 GMT</pubDate>
            <atom:updated>2025-04-24T12:55:31.899Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5kyARWXAAVcb3_ozQ3sj3Q.png" /></figure><p>You hit F11 on mediator.Send(), holding your breath, hoping to land neatly inside your IRequestHandler. What happens next?</p><p><strong>Scenario A:</strong> Your debugger, seemingly possessed, skips straight over your handler logic, leaving you bewildered.<br><strong>Scenario B:</strong> You disabled “Just My Code” (because you <em>had</em> to), and now you’re plunged into the seventh circle of reflection hell — deep inside MediatR’s internal caching, delegate factories, and service provider calls. Welcome to “crazy doo doo land,” where breakpoints fear to tread and hours go to die.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l8CHnjBJ2I81Hylab8XYjA.png" /><figcaption>Yeah, this guy takes over when I have to debug my code using MediatR</figcaption></figure><p>Feel familiar? For countless .NET developers, <strong>debugging MediatR is arguably the single biggest source of friction.</strong> It’s an opaque black box that fights against the intuitive step-through debugging we expect from our own code. This frustration, compounded by sluggish startup times caused by assembly scanning and the nagging worry of runtime handler-not-found exceptions, has become the accepted “cost” of using the pattern.</p><p><strong>But what if that cost was entirely unnecessary?</strong></p><p>What if you could press F11 on mediator.Send() and <strong>step directly into clean, generated C# code</strong> — seeing a simple dictionary lookup (TryGetValue) followed by a direct call to your handler’s wrapper method? What if you could visually trace the exact nesting of your IPipelineBehavior calls within that same generated file?</p><p>And what if this <strong>crystal-clear debuggability</strong> came bundled with jaw-dropping performance gains — like <strong>146x faster startup</strong>, <strong>6.7x faster notifications with ZERO allocation</strong>, and <strong>3x faster request dispatch?</strong></p><p>This isn’t wishful thinking. This is <a href="https://github.com/zachsaw/SwitchMediator"><strong>SwitchMediator</strong></a>.</p><p>We built SwitchMediator, a fully MIT-licensed alternative, using <strong>C# Source Generators</strong> specifically to eliminate the debugging pain and performance bottlenecks inherent in reflection-based mediators. By generating explicit C# code at compile time, SwitchMediator provides:</p><ol><li><strong>Unparalleled Debugging:</strong> Step directly into the SwitchMediator.g.cs file. See the exact Dictionary&lt;Type, Func&lt;…&gt;&gt; lookup for your request type and the subsequent direct call to the generated handler method (which itself calls your pipelines and handler). No magic, no reflection maze.</li><li><strong>Compile-Time Safety:</strong> Missing handlers become build errors, not runtime explosions.</li><li><strong>Blazing Performance:</strong> The benchmarks don’t lie (<a href="https://github.com/zachsaw/SwitchMediator/blob/main/src/Mediator.Switch.Benchmark/benchmark_results.md">See Full Results Here</a>). We’ve shifted the work to compile time, making your runtime fly.</li></ol><p>If you’re tired of fighting your debugger and paying the MediatR performance tax, it’s time to see how source generation changes the game. It’s time to make the <em>Switch</em>.</p><h3>Why SwitchMediator? (The Problem with Runtime Reflection)</h3><p>Traditional mediator implementations often rely on runtime reflection to discover handlers and construct pipelines. While flexible, this approach introduces overhead:</p><ul><li><strong>Runtime Performance Cost:</strong> Reflection and dictionary lookups (often populated via reflection) add latency to every request dispatch.</li><li><strong>Startup Delay:</strong> Scanning assemblies and building internal mappings takes time when your application starts.</li><li><strong>Debugging Complexity:</strong> Stepping through the mediator logic involves navigating complex internal library code, delegates, and reflection calls, making it hard to see the direct path to your code.</li><li><strong>Trimming/AOT Challenges:</strong> Reflection can make code less friendly to .NET trimming and Ahead-of-Time (AOT) compilation scenarios.</li></ul><p><strong>SwitchMediator tackles these issues head-on by moving the work to compile time.</strong></p><h3>The Compile-Time Advantage &amp; Key Benefits</h3><p>SwitchMediator uses C# Source Generators to analyze your code during the build and generate a concrete SwitchMediator implementation tailored to your specific handlers, messages, and pipelines.</p><ul><li><strong>Compile-Time Discovery:</strong> Finds all necessary components during the build.</li><li><strong>Optimized Code Generation:</strong> Creates explicit C# code. Instead of runtime reflection for dispatch, it generates static Dictionary&lt;Type, Func&lt;…&gt;&gt; lookups (initialized efficiently at startup based on compile-time knowledge) that map directly to generated wrapper methods calling your handlers and pipelines.</li><li><strong>Pay at Build, Not Runtime:</strong> The setup cost is incurred during compilation, leading to a lean and fast runtime.</li></ul><p>This results in several key advantages over reflection-based mediators:</p><ul><li>🧐 <strong>Enhanced Debuggability:</strong> This is a game-changer. You can directly <strong>step into the generated </strong><strong>SwitchMediator.g.cs file</strong>! See the exact dictionary lookup (SendSwitchCase.Cases.TryGetValue(…)) matching your request type, observe the explicit nesting of pipeline behavior calls (await next(…)) within the generated Handle_YourRequestType method, and step directly into your handler code. This provides unparalleled transparency.</li><li>🚀 <strong>Maximum Performance:</strong> Eliminates runtime reflection for dispatch. The pre-built dictionary lookup is highly efficient (O(1) average), and subsequent calls are direct. Ideal for performance-critical paths. <em>(See benchmark results below)</em>.</li><li>✅ <strong>Compile-Time Safety:</strong> Handler discovery happens during the build. Missing request handlers result in <strong>build errors</strong>, not runtime exceptions, catching issues earlier.</li><li>✂️ <strong>Trimming / AOT Friendly:</strong> Avoids runtime reflection for dispatch, making the core mechanism inherently more compatible with .NET trimming and AOT compilation.</li><li>🔍 <strong>Explicitness:</strong> The generated code serves as clear, inspectable documentation of how requests are routed and pipelines are constructed for each message type.</li></ul><h3>The Proof: Benchmarks Don’t Lie</h3><p>Talk is cheap. We built SwitchMediator for speed and developer happiness, but how does it <em>actually</em> stack up against the veteran MediatR? We put it to the test using BenchmarkDotNet, scaling the number of request/notification handlers (N) and the number of pipeline behaviors (B).</p><p>The results are staggering.</p><p><em>(Note: Benchmarks run on macOS Ventura 13.7.5, Intel Core i7–7820HQ @ 2.90GHz, .NET 9.0.3. Full benchmark code and raw results are available </em><a href="https://github.com/zachsaw/SwitchMediator/blob/main/src/Mediator.Switch.Benchmark/benchmark_results.md"><em>here</em></a><em>).</em></p><h3>🚀 Startup: From Milliseconds to Microseconds (Up to 146x Faster!)</h3><p>This is where the difference is most dramatic. MediatR’s reliance on runtime assembly scanning imposes a significant startup tax that grows with your application. SwitchMediator, doing its work at compile time, barely breaks a sweat.</p><p><strong>With 600 Handlers (N=600):</strong></p><ul><li>MediatR: ~114 <strong>milliseconds</strong> (113,893,678 ns)</li><li>SwitchMediator: ~0.78 <strong>milliseconds</strong> (779,252 ns)</li><li><strong>Result:</strong> SwitchMediator starts <strong>~146 times faster</strong>.</li></ul><p><strong>Scaling:</strong> MediatR’s startup time skyrockets as N increases. SwitchMediator’s line stays incredibly flat near the bottom.</p><p><strong>Memory:</strong> It’s not just time. At N=600, MediatR allocated ~24 MB <strong>(!!)</strong> during startup. SwitchMediator? A mere ~145 KB.</p><p><strong>Why this matters:</strong> Faster cold starts for serverless/containers (not even taking AOT into account yet!), quicker deployments, snappier developer feedback loops, and significantly less memory pressure on launch.</p><h3>✅ Request Dispatch (Send): ~3x Faster, 3x Less Garbage</h3><p>How fast can you send a request and get a response (without pipelines)?</p><p><strong>Performance (N=600):</strong></p><ul><li>MediatR: ~231 ns</li><li>SwitchMediator: ~82 ns</li><li><strong>Result:</strong> SwitchMediator is consistently <strong>~2.8x faster</strong>.</li></ul><p><strong>Memory Allocation:</strong></p><ul><li>MediatR: 288 Bytes per Send</li><li>SwitchMediator: 96 Bytes per Send</li><li><strong>Result:</strong> SwitchMediator produces <strong>3x less garbage</strong> for the GC to collect.</li></ul><p><strong>Why this matters:</strong> Lower latency for your critical API endpoints and request handlers. Reduced GC pressure means more predictable performance under load. The source-generated dictionary lookup and direct calls clearly outperform reflection-based dispatch.</p><h3>✨ Notification Dispatch (Publish): ~6.5x Faster with ZERO Allocation!</h3><p>Publishing events efficiently is key for many architectures.</p><p><strong>Performance (N=600):</strong></p><ul><li>MediatR: ~503 ns</li><li>SwitchMediator: ~75 ns</li><li><strong>Result:</strong> SwitchMediator is <strong>~6.7x faster</strong>.</li></ul><p><strong>Memory Allocation:</strong></p><ul><li>MediatR: 592 Bytes per Publish</li><li>SwitchMediator: <strong>0 Bytes</strong> per Publish</li><li><strong>Result:</strong> <strong>ZERO allocation!</strong></li></ul><p><strong>Why this matters:</strong> This is a massive win. For applications firing off many notifications, SwitchMediator eliminates dispatch-related GC pressure entirely. Your event publishing becomes virtually free from an allocation perspective.</p><h3>⚡ Pipeline Execution: Faster and Leaner</h3><p>Real-world applications use pipelines for cross-cutting concerns. How does SwitchMediator handle them?</p><p><strong>Performance (Send with B Behaviors):</strong></p><ul><li>B=1: SwitchMediator is <strong>~1.37x faster</strong> (1.24 µs vs 1.70 µs)</li><li>B=5: SwitchMediator is <strong>~1.21x faster</strong> (4.54 µs vs 5.49 µs)</li></ul><p><strong>Memory Allocation (Send with B Behaviors):</strong></p><ul><li>B=1: SwitchMediator allocates <strong>~2x less</strong> memory (312 B vs 640 B)</li><li>B=5: SwitchMediator allocates <strong>~1.6x less</strong> memory (1.02 KB vs 1.63 KB)</li></ul><p><strong>Why this matters:</strong> Your cross-cutting concerns run more efficiently. SwitchMediator’s source-generated pipeline execution introduces less overhead and allocates less memory per step compared to MediatR.</p><h3>The Verdict: Speed AND Sanity</h3><p>The numbers clearly show SwitchMediator delivering significant performance gains across the board — startup, send, publish, and pipelines — while drastically reducing memory allocations.</p><p>Combine this raw speed with the vastly improved <strong>step-through debugging experience</strong> and <strong>compile-time safety</strong>, and the choice becomes clear. SwitchMediator isn’t just faster; it’s designed to make your development process smoother and your application runtime leaner.</p><h3>Getting Started is Easy</h3><p>Ready to make the switch?</p><p><strong>Install Packages:</strong></p><pre># Add the source generator (analyzers don’t get published)<br>dotnet add package Mediator.Switch.SourceGenerator<br># Add DI extensions (optional, but recommended)<br>dotnet add package Mediator.Switch.Extensions.Microsoft.DependencyInjection</pre><p><strong>Register in Program.cs:</strong></p><pre>using Mediator.Switch.Extensions.Microsoft.DependencyInjection;<br>// … inside host builder or service configuration …<br><br>services.AddMediator&lt;SwitchMediator&gt;(op =&gt;<br>{<br>    // Pass compile-time types (generator populates SwitchMediator.KnownTypes)<br>    op.KnownTypes = SwitchMediator.KnownTypes;<br>    op.ServiceLifetime = ServiceLifetime.Singleton; // Or Scoped/Transient<br>    // Optionally configure notification handler order, etc.<br>    // op.OrderNotificationHandlers&lt;MyEvent&gt;(typeof(Handler1), typeof(Handler2));<br>});</pre><p><strong>Define Handlers &amp; Messages:</strong> Create your IRequest, IRequestHandler, INotification, INotificationHandler, and IPipelineBehavior implementations as usual.</p><p><strong>Inject &amp; Use:</strong> Inject ISender or IPublisher and dispatch messages:</p><pre>public class MyService(ISender sender)<br>{<br>    public async Task DoWork(int id)<br>    {<br>        var result = await sender.Send(new MyRequest(id));<br>        // …<br>    }<br>}</pre><p>Check out the <a href="https://github.com/zachsaw/SwitchMediator/tree/main/src/Sample.ConsoleApp">Sample Console App</a> (AOT enabled) for a more detailed example.</p><h3>Time to Switch?</h3><p>If you’re looking for significantly better performance, reduced memory allocation, improved debuggability, compile-time safety, and a fully MIT-licensed mediator for your .NET applications, SwitchMediator is ready for you.</p><p>The numbers don’t lie, and the debugging experience is night-and-day. Considering the performance tax of runtime reflection and the conversations sparked by MediatR’s recent commercial trajectory which hasn’t been very well received by the community, SwitchMediator provides a powerful, open-source escape route. Maybe it’s time to leave the old limitations behind?</p><ul><li><strong>GitHub:</strong> <a href="https://github.com/zachsaw/SwitchMediator">SwitchMediator Repository</a></li><li><strong>NuGet:</strong> <a href="https://www.nuget.org/packages/Mediator.Switch.SourceGenerator/">Link to NuGet Package</a></li><li><strong>Benchmark Results:</strong> <a href="https://github.com/zachsaw/SwitchMediator/blob/main/src/Mediator.Switch.Benchmark/benchmark_results.md#raw-benchmark-data">Link to Benchmark Results Raw Data</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fa8d63855443" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How We Sped Up the carsales Search Engine by 10x]]></title>
            <link>https://medium.com/carsales-dev/how-we-sped-up-the-carsales-search-engine-by-10x-5893d1e027d8?source=rss-808f4062f3b8------2</link>
            <guid isPermaLink="false">https://medium.com/p/5893d1e027d8</guid>
            <category><![CDATA[dotnet-core]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[dotnet]]></category>
            <category><![CDATA[optimisation]]></category>
            <category><![CDATA[high-performace-computing]]></category>
            <dc:creator><![CDATA[Zach Saw]]></dc:creator>
            <pubDate>Mon, 19 Apr 2021 03:20:50 GMT</pubDate>
            <atom:updated>2021-04-19T03:20:50.161Z</atom:updated>
            <content:encoded><![CDATA[<h3>How we sped up the carsales Search engine by 10x</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OICLXiTzOgWTt-LAbo0PrQ.png" /></figure><p>Our high performance NoSQL faceted search engine with guided navigation, <a href="https://medium.com/carsales-dev/1search-we-innovate-so-others-can-innovate-faster-b6071c5568bb">1search</a> (more information <a href="https://clientportal.syd.prd.1search.csnglobal.net/doc/home">here</a>), serves <a href="https://www.carsales.com.au/">carsales</a> traffic at 9ms on average. That is fast. However, ‘average’ can be very misleading. For instance, if most responses are significantly faster, an average of 9ms might indicate a problem. Perhaps there is some inherent slowness with some parts of the search engine? In fact, it is only by looking at the various percentile graphs that this slowness revealed itself.</p><p>It is natural to be fooled by the ‘average’ figure but especially after scoring a 15x ‘average’ speed improvement (story for another day) for some of the sites we migrated over from the old search engine. We would have been none the wiser if we did not have the many AWS Cloudwatch metrics available, which allowed us to trigger our service performance degradation alerting system via PagerDuty when a Cloudwatch metric threshold is violated.</p><p>To our surprise, a 9ms average was not enough to prevent the dreaded (but very useful) PagerDuty from ringing our phones. Its frequency has reduced significantly compared to the old search engine, but not enough to stop it completely. It was this that nudged us to investigate.</p><p>As it turned out, several types of requests were very CPU heavy and took a long time to process. These were the guided navigation and refinement filter requests. They show you all the choices, allowing you to filter your selections to get a narrower set of results. These were CPU heavy requests because they needed to provide the front end with a lot of information.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/494/1*g75spJkfHxqmr12H6cQWeg.png" /><figcaption>List of makes populated in real time</figcaption></figure><p>For example, if you open the ‘Make’ refinement on the <a href="https://www.carsales.com.au/cars/">carsales website</a>, you get a list of makes that is populated in real time with their counts, as well as an indicator showing you if there’s any models to refine further, based on your current filter. On our other sites like <a href="https://www.chileautos.cl/vehiculos/">Chileautos</a>, we show these on the refinement panel itself without you having to open a separate dialog. Behind the refinement links, we also provide SEO friendly URLs so internet search engines like Google can crawl and index our sites to attract organic traffic.</p><p>Google crawling our deep links was the bulk of the problem. With the number of URLs the crawl bots can visit via navigations and refinements greatly outnumbering the usual operations human visitors would also perform such as pagination and sorting, the ‘average’ response time figure jumped significantly due to the CPU heavy requests. In fact, every time there is more navigation and refinement requests even from human visitors, we see the same increase in the ‘average’ figure, especially if there’s been a significant number of multiselected items. For example, someone could have selected all 50 models across different makes. This could also be a screen scrapper that we have failed to block, especially if the requests had over 300 models selected but that’s a topic for another day. Regardless, these were things that skewed our ‘average’ figure.</p><p>The one that presented the most problem was Google, or rather Googlebot. Less than a year ago, in July 2020, Google commissioned Deloitte to do a research (<a href="https://www2.deloitte.com/content/dam/Deloitte/ie/Documents/Consulting/Milliseconds_Make_Millions_report.pdf">Milliseconds make Millions</a>) on the cost of latency in site response time and deemed it costly enough that they subsequently changed their ranking algorithm to give bonus points to sites with fast response times. Unfortunately for us, while our search engine is plenty fast for most request types, it is precisely the ones Googlebots crawl that we are slow at. For some combinations of navigations and refinements, we can be as slow as 800ms or more. Coupled with the front end rendering out HTML etc., we were well outside of Google’s ‘green’ region for site performance for the deeper links.</p><p>At the same time, Googlebots were extremely aggressive in their crawl behaviour, sending over 2000 unique IPs in parallel to crawl our navigations and refinements, skipping the speedy operations like pagination and sort. On top of that, they seemed to be testing our breaking point and scaling strategies, by going completely silent for a few hours and coming back to hit us without any ramp up. With these expensive requests costing two order of magnitudes more than the ‘average’ requests, we ended up having to manually overprovision and run a huge number of AWS instances.</p><p>It’s easy to stop Googlebots by banning them but that would inevitably hurt our SEO ranking and subsequently our organic traffic, so that was not an option.</p><h3>What’s the solution?</h3><h4>Usage Optimisation</h4><p>The best and perhaps simplest optimisation is achieved when we can drop the workload completely. Doing <em>some</em> work is always slower than doing <em>no</em> work.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/349/1*DKlyn9P2hA0gg0jEOe5yNg.png" /><figcaption>Only Audi and Victoria are shown</figcaption></figure><p>We looked at how the navigation and refinement feature is used. On carsales, the front-end opens a modal dialog box to present the selections. Normally when the dialog is not visible, we only need to show the selected nodes for users to remove their current selections. We can therefore defer the additional selection (e.g. showing all the ‘makes’) to a separate request, and only for one parent node at a time. In other words, there is no need to do the work that isn’t going to be used by the front-end anyway. For example, if we are showing a list of ‘makes’, there is no need to populate a list of ‘locations’ in the same request. This had the biggest impact in performance but required small changes in the front-end. We went from 800ms to 400ms.</p><p>But can we speed up the parts we had to do the work too?</p><h4>Code Optimisation One</h4><p>Avoiding writes to memory as much as possible — only creating memory to store our temporary results when we need it. Most of the navigation and refinement feature involves tree traversal. We store intermediate results as we traverse deeper because the child nodes need them. In leaf nodes, we only need to calculate the ‘count’, which can be achieved without storing another intermediate result first. If we stop prematurely storing temporary results by checking to see if we needed to traverse further first, we could score a big win.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/761/1*0mxTFAQTkBhqLz_WNEr_uw.png" /><figcaption>Only a single write (Temp Result) is required for this tree structure</figcaption></figure><p>As with all modern CPU architectures, the random access memory (RAM) is orders of magnitudes slower than CPU arithmetic ops. As it turned out, this had a big impact on performance for the deep links we were optimising for because most nodes do not need to store intermediate results. We went from 400ms to 200ms.</p><h4>Code Optimisation Two</h4><p>Converting massive expression trees to string when serialising to JSON also turned out to be expensive. Each expression tree is only slightly different to its parent. For example, when presented with a list of ‘Makes’ and you had Audi selected, adding a node means you would also select BMW in addition to Audi. Removing a node means removing the BMW from your selection of Audi and BMW. As you could see, the only thing that is changing in the expression tree is BMW. Instead of just Audi, however, imagine you have a plethora of different selections. In that case, you’d be replicating the same work over and over for each node even when you know most of them do not change.</p><p>e.g.</p><blockquote>(And.State.Victoria._.Year.range(2018..)._.GenericGearType.Automatic._.Odometer.range(..60000)._.Condition.Used._.&lt;more&gt;.(Or.Make.Audi._.Make.&lt;<strong>only this changes</strong>&gt;.))</blockquote><p>The optimisation technique here was to store a base expression <em>string</em> and manipulating the string for each node instead of converting them from expression trees to strings each time. Combined with the new-ish <a href="https://docs.microsoft.com/en-us/archive/msdn-magazine/2018/january/csharp-all-about-span-exploring-a-new-net-mainstay">.Net Core Span feature</a>, this allowed us a hyper efficient way to manipulate the strings. The impact on performance was significant. We went from 200ms to 100ms.</p><h4>Code Optimisation Three</h4><p>No SEO with multiselect and other smaller optimisations — we do not support SEO friendly URLs for OR operators (e.g. both BMW and Audi are selected) so do not attempt to generate it to begin with (i.e. early exit strategy).</p><p>e.g. We know the following does not have an SEO friendly URL representation.</p><blockquote>Or.Make.Audi._.Make.BMW.</blockquote><p>There were also some convoluted algorithms we simplified that yielded more performance gains. It is always nice to be able to simplify the algo and yet gain performance as a result. All in all, these had the smallest impact on performance but non-trivial, nevertheless. We went from 100ms to 80ms.</p><h3>Results</h3><p>The navigations and refinements of 800ms is now 80ms (10x speed up). This also improved our average response time from 9ms to 3.5ms. This also means that the CPU load is greatly reduced, cutting the average number of instances we need to run normally by more than half, and a lot more when Googlebot hits. The speed up can also be felt by our human visitors especially when you spend a lot of time refining your search.</p><p>More importantly, we have not had a PagerDuty alarm since the improvements, and we are now much more prepared to handle the onslaught of Googlebot’s next deep crawl.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5893d1e027d8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/carsales-dev/how-we-sped-up-the-carsales-search-engine-by-10x-5893d1e027d8">How We Sped Up the carsales Search Engine by 10x</a> was originally published in <a href="https://medium.com/carsales-dev">carsales-dev</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Dependency Injection in a .Net Core Console App?]]></title>
            <link>https://zach-saw.medium.com/dependency-injection-in-a-net-core-console-app-f3bab9afbcd6?source=rss-808f4062f3b8------2</link>
            <guid isPermaLink="false">https://medium.com/p/f3bab9afbcd6</guid>
            <category><![CDATA[dotnet-core]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[csharp]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[dotnet]]></category>
            <dc:creator><![CDATA[Zach Saw]]></dc:creator>
            <pubDate>Wed, 05 Feb 2020 12:07:20 GMT</pubDate>
            <atom:updated>2020-10-09T01:19:14.914Z</atom:updated>
            <content:encoded><![CDATA[<h3>Dependency Injection in a .Net Core Console App?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*0DRKwGysZhj22fAFaRShbw.png" /></figure><h3>Dependency Injection</h3><p>DI (Dependency Injection) is a common technique employed across all ASP.Net Core applications and we are no stranger to this. .Net Core itself has built-in support for DI.</p><h3>Console Application</h3><p>Not every app can be an ASP.Net Core application. Sometimes you have to write a console application. What most people find, however, is that they do not know where to begin coding. Your IDE will create an empty class with a static main entry point and leave the rest to you. Not very helpful when you’re from ASP.Net Core world, is it?</p><h3>Manual Way</h3><p>You can add the ASP.Net Core equivalent DI support for your console app manually by importing the following NuGet packages into your project.</p><pre>Microsoft.Extensions.Configuration<br>Microsoft.Extensions.Configuration.CommandLine<br>Microsoft.Extensions.Configuration.EnvironmentVariables<br>Microsoft.Extensions.Configuration.Json<br>Microsoft.Extensions.DependencyInjection<br>Microsoft.Extensions.Logging<br>Microsoft.Extensions.Logging.Console<br>Microsoft.Extensions.Logging.Debug<br>Microsoft.Extensions.Options.ConfigurationExtensions</pre><p>You can then instantiate a ConfigurationBuilder and take it from there. However, it is tedious and repetitive. Programmers are lazy people — we don’t like tedious work! And to ask us to remember the long list of NuGet packages we need to import every time we create a console app? Forget it!</p><h3>The Lazy Way</h3><p>The lazy way is what I often argue is the right way — it is the way that forces you to do things “right” in software. We automate CI/CD pipeline because we’re lazy — seriously, who wants to manually deploy each time you need to release a new version? We created AI (machine learning) because we’re lazy — if machine can do the tedious work, why should we? We do SOLID principles because we’re lazy — we don’t want to rewrite existing code. And, we put reusable things into NuGet packages because we are lazy — we are really after something that’s already afforded by an empty ASP.Net Core app. Not something we need to hand craft!</p><p>This is exactly what our NuGet package <a href="https://www.nuget.org/packages/Neo.ConsoleApp.DependencyInjection/">Neo.ConsoleApp.DependencyInjection</a> does (GitHub page: <a href="https://github.com/search-for-the-one/Neo.ConsoleApp.DependencyInjection">https://github.com/search-for-the-one/Neo.ConsoleApp.DependencyInjection</a>).</p><p>Instead of the plethora of NuGet packages you need to import, there’s only a single one. Not only that, you can now use DI in the same familiar way.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2d5af010c2172ecd6e3065d7b1bc99dc/href">https://medium.com/media/2d5af010c2172ecd6e3065d7b1bc99dc/href</a></iframe><h3>Summary</h3><p>The next time you create a console app in .Net Core and feeling a little lost because there’s no skeleton unit that your IDE usually creates for your ASP.Net Core projects, try out our NuGet package. It is open source under the MIT license.</p><p>While this article only discusses .Net Core, the NuGet package targets .Net Standard 2.0, which means it is compatible with .Net Frameworks too!</p><p>While you’re here, why not take your DI skills even further? Find out what <a href="https://medium.com/@zach.saw/configuration-driven-dependency-injection-di-with-net-core-d960965d7f8a">Configuration Driven DI</a> is!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f3bab9afbcd6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Binaron.Serializer — A really fast Binary Serializer for .Net Core 3.0 and above]]></title>
            <link>https://zach-saw.medium.com/binaron-serializer-binary-serializer-for-net-core-3-0-and-above-24ad5091eb4?source=rss-808f4062f3b8------2</link>
            <guid isPermaLink="false">https://medium.com/p/24ad5091eb4</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[net-core]]></category>
            <category><![CDATA[nuget]]></category>
            <category><![CDATA[serialization]]></category>
            <category><![CDATA[github]]></category>
            <dc:creator><![CDATA[Zach Saw]]></dc:creator>
            <pubDate>Thu, 30 Jan 2020 11:35:06 GMT</pubDate>
            <atom:updated>2021-01-11T04:40:24.259Z</atom:updated>
            <content:encoded><![CDATA[<h3>Binaron.Serializer — for .Net Core 3.0 and above</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*LLVTAY089oPKsYlxs_Ailg.jpeg" /></figure><p><a href="https://github.com/zachsaw/Binaron.Serializer">GitHub Project Page</a><br><a href="https://www.nuget.org/packages/Binaron.Serializer">Binaron.Serializer NuGet package</a></p><h3>Performance vs BinaryFormatter and Protobuf</h3><p>vs BinaryFormatter: <strong><em>3x</em></strong> faster in both serialization and deserialization<br>vs Protobuf.NET: <strong><em>9x faster</em></strong> in serialization and <strong><em>2.5x faster</em></strong> in deserialization</p><p>Head over to <a href="https://dotnetfiddle.net/6wl56P">.NET Fiddle</a> to see for yourself.</p><h3>What is Binaron.Serializer?</h3><p>Binaron.Serializer is an MIT licensed open source binary serializer. It is designed and written from ground up to be <em>really</em> fast for modern programming languages with an open source <a href="https://gist.github.com/zachsaw/BinaryObjectNotation.md">binary object notation format</a>.</p><p>In the GitHub repository above, you’ll find 2 benchmarks using BenchmarkDotNet comparing Binaron.Serializer to Newtonsoft.JSON.</p><p>The first one showcases best case scenario vs a JSON serializer, where we serialize an array of double with 64k items. In reality, this could be your typical weights from a CNN model.</p><h3>Benchmark 1</h3><p>In this benchmark, Binaron.Serializer is <em>nearly 150x faster</em> than Newtonsoft.JSON in serialization and <em>around 137x faster</em> in deserialization!</p><h4>Array of Doubles — e.g. Weights from a CNN Model</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Yx8TFqhpLbR3H-dHgnBWPQ.png" /></figure><h3>Benchmark 2</h3><p>The second benchmark is your typical DTO where Binaron.Serializer’s advantage is not as pronounced, but is over <em>3.5x faster</em> in serialization and <em>4.3x faster</em> in deserialization nonetheless.</p><h4>Book Object (Typical DTO)</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F_zap7wzdFbtRe76jaifMg.png" /></figure><h3>Usage</h3><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5707010abd936a8d29eac1ba35b71129/href">https://medium.com/media/5707010abd936a8d29eac1ba35b71129/href</a></iframe><h3>Polymorphism Support</h3><p>Binaron.Serializer can be configured to support serialization / deserialization of interfaces and abstract types.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/97fa029790355a454d4b275eb7cabc0e/href">https://medium.com/media/97fa029790355a454d4b275eb7cabc0e/href</a></iframe><p>If you are using a service provider, you would use it in the PersonFactory to construct Employee and Customerinstead.</p><p>For serialization / deserialization, you’ll need to provide the PersonIdentifierProvider as well as the PersonFactory as follows.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/56cc762d1e2d5e27bb73a6b4773acb22/href">https://medium.com/media/56cc762d1e2d5e27bb73a6b4773acb22/href</a></iframe><h3>Ignore Attributes</h3><p>Binaron.Serializer supports the following ignore attributes: System.NonSerializedAttribute and System.Runtime.Serialization.IgnoreDataMemberAttribute.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0cf096dcdc7e72c436fdb71e97433025/href">https://medium.com/media/0cf096dcdc7e72c436fdb71e97433025/href</a></iframe><h3>Limitations</h3><p>Binaron.Serializer uses and relies heavily on the newly released features of .net standard 2.1 for maximum performance and thus is only compatible with .net core app 3.0 and above.</p><h3>High Unit Test Coverage</h3><p>Writing a serializer was easy. Writing a deserializer that deserializes to ExpandoObject(dynamic type) was just as easy. However, deserializing to a specific type was a PITA simply because of the need to make Binaron.Serializer fit its serialized data as best it could (to sensible limits set in the Binary Object Notation documentation) to the destination object. For example, an int32 type should fit int64 and the deserializer shoud be smart enough to do that transparently. Likewise, an object with properties / fields that&#39;s been serialized should be deserializable to a dictionary.</p><p>To make sure all these permutations are covered and tested, the unit tests in this repository has a 94% coverage. Not perfect but most would agree it is high enough and will be improved in the near future.</p><h3>Why Another Serializer?</h3><h3>Big payloads</h3><p>In the world of microservices, data payloads tend to be pretty big these days with how the data is now consumed. As network bandwidth becomes cheaper, bigger data becomes the norm as it opens up UI/UX that would otherwise have been impossible (e.g. responsive web apps and mobi/mobile apps). Converting from text to object and vice versa is a very slow process. The bigger the payload, the slower it is, naturally.</p><p>JSON was created for consumption of the old web days where Javascript had limited support for binary. Unfortunately for everyone else on first class languages, they’ve had to dumb down to the common lowest denominator.</p><h3>But… JSON is human readable</h3><p>JSON does have its merits such as human readability. But, does machine really care about human readability? At what cost are we sacrificing performance — thus infra cost, latencies and ultimately user experience? If we really care about human readability, we could simply have the endpoint support two different types of accept-headers — one for JSON, the other Binary. In a normal day to day operation, you would go binary. For debugging purposes, give it a JSON only accept-header and you would get JSON sent back to you. How many microservices are doing this though?</p><h3>What about protobuf?</h3><p>Granted there are myriad of libraries that have tried to do binary serialization. The most popular is arguably protobuf. All of these libraries are fast (by normal standards but very slow compared to Binaron.Serializer) but they lack the one key feature that JSON serializers offer — the ability to serialize from / de-serialize to any unstructured object.</p><p>For example, protobuf requires a schema to be defined for the structure of the object — i.e. a .proto file. This itself is a massive burden on the developers to learn, create, debug and maintain. What do you do if you’re storing data in a NoSQL manner where data is simply unstructured?</p><p>Unfortunately, all the binary serializers for .NET have one fundamental flaw — they assume your data is structured, including <a href="https://github.com/neuecc/ZeroFormatter">ZeroFormatter</a>.</p><h3>But… Binary serializers are brittle, aren’t they?</h3><p>No. Only the .NET BinaryFormatter is brittle because it serializes the type’s full name (including namespace). It encodes exact type names etc, making it useless for archiving data such as in a document format for an application for example.</p><p>Binaron.Serializer has the same brittleness as JSON serializers.</p><h3>TL;DR</h3><p>In other words, I wanted a drop-in replacement for <a href="https://www.newtonsoft.com/json">Json.NET</a> with near zero learning curve that promises vastly superior performance but couldn’t find one.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=24ad5091eb4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Configuration Driven Dependency Injection (DI) with .NET Core]]></title>
            <link>https://zach-saw.medium.com/configuration-driven-dependency-injection-di-with-net-core-d960965d7f8a?source=rss-808f4062f3b8------2</link>
            <guid isPermaLink="false">https://medium.com/p/d960965d7f8a</guid>
            <category><![CDATA[c-sharp-programming]]></category>
            <category><![CDATA[net-core]]></category>
            <category><![CDATA[nuget]]></category>
            <category><![CDATA[dependency-injection]]></category>
            <category><![CDATA[configuration-management]]></category>
            <dc:creator><![CDATA[Zach Saw]]></dc:creator>
            <pubDate>Thu, 30 Jan 2020 02:33:54 GMT</pubDate>
            <atom:updated>2020-01-30T02:33:54.102Z</atom:updated>
            <content:encoded><![CDATA[<h3>Configuration Driven Dependency Injection (DI) with .NET Core</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iNCkRz3wyjSmCYfUreqX8w.jpeg" /></figure><h3>Configuration — What is it?</h3><p>Configuration drives how your application behaves. Your application may be a web app, console app, WPF / Windows Form app but it won’t be very useful if its behaviour can’t be tailored to users’ preference.</p><p>For web / console app running in a server environment, behaviour driven by configuration means you can run the same codebase but allow users to decide how they want to use the service. For example, a microservice that sends out reports via email may need to have SMTP settings configured. A Windows app such as an advanced video player tailored for HTPC enthusiasts will need to be able to have its video processing pipeline fully configurable.</p><h3>Dependency Injection (DI)</h3><p>Dependency Injection (DI) is a widely used technique to ease the pain of manually creating objects that has dependencies on other objects, hence the name <em>dependency injection</em>. It is also very opinionated about the way it works and how it should be used. This is great from a standardisation standpoint — it reduces the cognitive load when others read your code. However, as soon as you need something that isn’t supported out of the box, you do not have the luxury of relying on the opinions too.</p><h3>.NET Core DI</h3><p>In the case of the .Net Core DI, it stops short of allowing you a convenient and opionated way of binding types based on config (e.g. from appsettings.json). Veterans will use a factory pattern without second thoughts while others will fumble and get it wrong but that’s beyond the scope of this article.</p><p>The problem arises when you have a lot of configs. Using the video player example, you would have your basic settings (the DirectX version, GPU, number of render ahead frames etc.), as well as the settings afforded by each video processor that can be inserted into the video processing pipeline. That itself is also configurable. At this point, you can have hundreds of factories. Or, you can be smart about it and create something opinionated and reusable to reduce the cognitive complexities.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/692/1*jWhaKne4YLuOGaZhd7pPeA.png" /><figcaption>Example of Video Processors that are Individually Configurable</figcaption></figure><p>Imagine you could do something like the following instead.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3cce49bfc2c01caf8c7724fcc0f1d19f/href">https://medium.com/media/3cce49bfc2c01caf8c7724fcc0f1d19f/href</a></iframe><p>Your settings would come from the normal places supported by .NET core — environment vars, appsettings.json etc.</p><h3>Plugin Architecture</h3><p>What if you want the video processors to be plugins instead? In this case, you should dynamically load the assemblies like you normally would and call AddConfig()/ factory.AddService()programmatically for each of the plugins to register them.</p><h3>GitHub Project and Nuget Package</h3><p>The good news is we don’t have to imagine all of the above. This pattern is already used in anger in most of our production systems and we have open sourced our Nuget package on GitHub under the MIT license: <a href="https://github.com/search-for-the-one/Neo.Extensions.DependencyInjection">https://github.com/search-for-the-one/Neo.Extensions.DependencyInjection</a>.</p><p>Nuget package can be found here: <a href="https://www.nuget.org/packages/Neo2.Extensions.DependencyInjection/">https://www.nuget.org/packages/Neo2.Extensions.DependencyInjection/</a></p><p>Note that the Nuget package has a different namespace, Neo2. The originally Neo namespace was recently reserved by a different author on the public Nuget server.</p><h3>Limitations</h3><p>For apps running in a server environment, this is generally not a problem, but ReloadOnChangefrom IOptionsis not supported. Instead, it is recommended that you create a separate and isolated service provider for objects that need to be changed at run-time (e.g. when user changes config via GUI). This way, you can get that service provider to give you a new set of objects and easily replace the ones you are currently using. In the video processing pipeline example above, Process()is a method of IVideoProcessorPipeline. Swapping the instance out under it would automatically cause video processing to switch to the new pipeline when Process()is called for the next video frame.</p><h3>Summary</h3><p>Configuration driven apps are ubiquitous but we do not have an opinionated way of achieving config-driven DI. Hopefully, this article and its GitHub project will give you an easy way to achieve config driven DI.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d960965d7f8a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[1search — We innovate so others can innovate faster]]></title>
            <link>https://medium.com/carsales-dev/1search-we-innovate-so-others-can-innovate-faster-b6071c5568bb?source=rss-808f4062f3b8------2</link>
            <guid isPermaLink="false">https://medium.com/p/b6071c5568bb</guid>
            <category><![CDATA[marketplaces]]></category>
            <category><![CDATA[search-engines]]></category>
            <category><![CDATA[innovation]]></category>
            <category><![CDATA[search]]></category>
            <category><![CDATA[development]]></category>
            <dc:creator><![CDATA[Zach Saw]]></dc:creator>
            <pubDate>Fri, 31 May 2019 03:43:56 GMT</pubDate>
            <atom:updated>2019-06-12T01:07:49.069Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>1search — We innovate so others can innovate faster</strong></h3><p>What is the most important thing in a marketplace? Discoverability.</p><p>carsales is a marketplace. While it is important to have lots of vehicles on the site, it is even more important to make it easy for users to discover the vehicles. Sellers simply won’t sell on your platform if their vehicles cannot be discovered easily, and we need to help users find that 1 car out of the 200,000+ cars on our website.</p><p>It is precisely this that carsales excel at and we do it via our patented and proprietary search and refinement engine called 1search.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1009/1*OVGptWzsDkc3d9HsDMAHSA.png" /><figcaption>Powered by 1search</figcaption></figure><h3><strong>What is 1search?</strong></h3><p>It never ceases to amaze me that people always interject to help me finish my sentence whenever I explain the salient features of 1search. If you have ever searched for a car on <a href="https://www.carsales.com.au/">carsales.com.au</a>, you would have used 1search. It is the technology that gives you your search results and the ability to drill down to the car you want via refinements. Not just any bulk standard refinements too. We show you the live number of cars currently for sale in each refinement link to guide your next selection. We also remove the ones that are not available so you are not inundated with useless selections — why bother showing a link for <strong><em>Pink Ferrari</em></strong> when the search engine knows there are none available? We provide all of these and more with a 95th percentile response time of 30ms!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/613/1*ZBHyaLgEP37qLGSWmxCLJw.png" /><figcaption>Everyone knows there’s no <strong><em>p</em>ink</strong> Ferrari California</figcaption></figure><p>As you can see, this technology directly contributes to improved user experience (UX). It is this secret sauce that makes us so successful!</p><h3><strong>Verticals use 1search</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/390/1*1g1cZQP2O3kFj_CzDzoyNw.png" /></figure><p>At carsales, we not only have the <a href="https://www.carsales.com.au/">carsales.com.au</a> marketplace but also several others such as <a href="https://www.boatsales.com.au/">boatsales.com.au</a> and <a href="https://www.bikesales.com.au/">bikesales.com.au</a> which we call verticals. We also have the relatively recent additions to the carsales family from our international acquisitions and partnerships. All these verticals use 1search. As end-users, you are familiar with the listing sites our clients built using 1search. They are the direct clients of 1search and we constantly thrive to improve UX for them the same way they improve UX for you as the end-users.</p><h3><strong>The Problem</strong></h3><p>In the past, we have allowed for very deep and intimate customisations within the search engine that served its purpose for each vertical. It made life easier for our clients at the time. Unfortunately, this resulted in the verticals running their own custom codebase and quickly became unmanageable as the business grew. Other clients became reliant on a single team to make changes necessary to bring an idea to market.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/951/1*iwnZkihmuE1-2wxKL3Fd7Q.png" /><figcaption>Trivia: How big do you think the Search Team is?</figcaption></figure><p>It was even more painful for our international families living across different time zones where we only had a mere few hours to communicate each day. The additional language barrier certainly did not make things easier. Each vertical also ran a different version of our search engine codebase, thus pushing out bug fixes and new features was a very painful, slow and error prone process. It became apparent immediately that it was against the very DNA of carsales where we thrive to innovate <em>fast and furious</em>.</p><h3><strong>The Solution</strong></h3><p>The Search Team set out on the journey to improve 1search around 9 months ago. We have rearchitected it from the ground up with the DevSecOps culture in mind, i.e. we enable our clients to be the DevSecOps. This means that not only should our clients be able to spin up our service via their own configuration, but they should also be responsible for the security and operations related to the service. On top of that, we also want our clients to fully integrate the configuration changes related to our service into their CI/CD pipelines. We want our clients to “self-serve”. That said however, it should still be as “managed” as possible — i.e. not burdening the clients with unnecessary aspects of the service. There are trade-offs that we have to make as we shift this clients-vs-our responsibility “line” to cater for our fast moving verticals.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eLbz8MFX_thFaazaolj0tw.png" /><figcaption>Disclosure: 1search is actually the new name for our search engine and you can see why we renamed it!</figcaption></figure><p>This way, the teams who innovate to bring you new and exciting features on the sites you already love so much can do so at a much faster pace. Along the same line, as our business continues to grow horizontally, new search engines can be spun up quickly by our new clients — in other words, we aim to provide our clients with a turn-key experience. Our international clients such as Encar (<a href="http://encar.com/">encar.com</a>) and Webmotors (<a href="https://www.webmotors.com.br/">webmotors.com.br</a>) will always be on the same version of 1search as carsales and have access to the bug fixes, security patches and more importantly the latest and greatest features!</p><h3><strong>Conclusion</strong></h3><p>We are shifting the responsibility line with one goal in mind — to empower our customers to innovate at the speed they are capable of. It was this speed of innovation that got us to where we are and it will get us where we want to go. There is substantial risk taking the search engine to where no one’s taken it before (we will blog about this in future posts) but the entire tech team is energised, confident and excited. No one would have it any other way — because <strong><em>at carsales, we innovate!</em></strong></p><p>At carsales we are always looking for fun and talented people to work with. If you liked what you read and are interesting in joining, please check out what positions we have available in our <a href="https://www.carsales.com.au/work-with-us">careers </a>section.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b6071c5568bb" width="1" height="1" alt=""><hr><p><a href="https://medium.com/carsales-dev/1search-we-innovate-so-others-can-innovate-faster-b6071c5568bb">1search — We innovate so others can innovate faster</a> was originally published in <a href="https://medium.com/carsales-dev">carsales-dev</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>