<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Structured Concurrency on miti99</title><link>https://miti99.com/en/tags/structured-concurrency/</link><description>Recent content in Structured Concurrency on miti99</description><generator>Hugo</generator><language>en</language><lastBuildDate>Mon, 16 Nov 2026 17:39:19 +0700</lastBuildDate><atom:link href="https://miti99.com/en/tags/structured-concurrency/index.xml" rel="self" type="application/rss+xml"/><item><title>Newsletter #26</title><link>https://miti99.com/en/post/2025/05/13/</link><pubDate>Tue, 13 May 2025 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2025/05/13/</guid><description>&lt;p&gt;&lt;em&gt;Enjoy Newsletter #26.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="the-philosophy-of-software-design--with-john-ousterhout"&gt;&lt;a href="https://newsletter.pragmaticengineer.com/p/the-philosophy-of-software-design" rel="noopener noreferrer"&gt;The Philosophy of Software Design – with John Ousterhout&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;In this episode of &lt;em&gt;The Pragmatic Engineer&lt;/em&gt; podcast, Stanford professor John Ousterhout (author of &lt;em&gt;A Philosophy of Software Design&lt;/em&gt;) explains why software design matters even more in the age of AI. He compares today&amp;rsquo;s AI code-generation tools to a &amp;ldquo;tactical tornado&amp;rdquo;: they crank out working code at breakneck speed while easily leaving behind a trail of technical debt, meaning high-level architectural thinking remains firmly a human responsibility. At its core, Ousterhout says, software design is the art of decomposition—breaking a complex system into relatively independent modules. He also advocates the principle of &amp;ldquo;design it twice&amp;rdquo;: always force yourself to consider at least two genuinely different approaches before committing, because your second design is almost always better than your first.&lt;/p&gt;
&lt;p&gt;Ousterhout famously disagrees with several tenets of Robert C. Martin&amp;rsquo;s &lt;em&gt;Clean Code&lt;/em&gt; school. He argues that strict TDD encourages developers to fixate on narrow tactical details rather than overall system architecture (though he likes writing tests first when fixing bugs), that splitting code into tiny methods proliferates shallow interfaces instead of the &amp;ldquo;deep modules&amp;rdquo; (simple interfaces hiding rich functionality) we should aim for, and that code comments are essential for capturing abstractions and field invariants that code alone cannot express. At Stanford, he teaches software design through intensive code reviews and comparing student solutions side by side, much like a creative writing workshop. He is currently contributing an implementation of the Homa transport protocol to the Linux kernel. It&amp;rsquo;s a must-listen episode for junior developers.&lt;/p&gt;
&lt;h2 id="20-years-of-git-still-weird-still-wonderful"&gt;&lt;a href="https://blog.gitbutler.com/20-years-of-git" rel="noopener noreferrer"&gt;20 years of Git. Still weird, still wonderful&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Marking Git&amp;rsquo;s 20th anniversary, Scott Chacon (co-founder of GitHub and GitButler) looks back on the history of the tool. In April 2005, Linus Torvalds created Git as &amp;ldquo;the stupid content tracker&amp;rdquo; to replace BitKeeper and improve how the Linux kernel community collaborated via patches and tarballs. The very first commit contained just seven low-level C programs like &lt;code&gt;write-tree&lt;/code&gt; and &lt;code&gt;commit-tree&lt;/code&gt;, with zero concern for user-friendliness. Early on, Git was almost entirely low-level &amp;ldquo;plumbing,&amp;rdquo; while usable &amp;ldquo;porcelain&amp;rdquo; interfaces came from community shell-script wrappers like Cogito. Many familiar commands emerged organically: the original &lt;code&gt;git log&lt;/code&gt; was literally a three-line shell script piping &lt;code&gt;git-rev-list&lt;/code&gt; into &lt;code&gt;LESS&lt;/code&gt;, and &lt;code&gt;git rebase&lt;/code&gt; grew out of mailing-list discussions between Junio Hamano and Linus about patch workflows in 2005.&lt;/p&gt;
&lt;p&gt;Chacon also shares his personal journey: he originally used Git as a content distribution system for digital signage displays—matching Linus&amp;rsquo;s original &amp;ldquo;content tracker&amp;rdquo; philosophy—before writing the &lt;em&gt;Pro Git&lt;/em&gt; book and co-founding GitHub. In a fun bit of trivia, Git&amp;rsquo;s &amp;ldquo;octopus merge&amp;rdquo; strategy directly inspired GitHub&amp;rsquo;s Octocat mascot. Twenty years later, Git dominates software development while remaining as &amp;ldquo;weird and wonderful&amp;rdquo; as ever: an eccentric command-line UI sitting on top of a remarkably elegant data model.&lt;/p&gt;
&lt;h2 id="a-modest-critique-of-optional-handling"&gt;&lt;a href="https://mccue.dev/pages//4-5-25-optional-critique" rel="noopener noreferrer"&gt;A Modest Critique of Optional Handling&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Ethan McCue critiques how many Java developers misuse &lt;code&gt;java.util.Optional&lt;/code&gt; when refactoring methods that previously returned &lt;code&gt;null&lt;/code&gt;. In his view, &lt;code&gt;Optional&lt;/code&gt; shines in Stream pipelines and API return types, not as a wholesale replacement for &lt;code&gt;null&lt;/code&gt; inside method bodies. The conventional wisdom to avoid &lt;code&gt;.isPresent()&lt;/code&gt;/&lt;code&gt;.get()&lt;/code&gt; in favor of &lt;code&gt;.map()&lt;/code&gt; or &lt;code&gt;.ifPresent()&lt;/code&gt; quickly falls apart when you need to throw checked exceptions, combine multiple &lt;code&gt;Optional&lt;/code&gt; values, or mutate local variables inside a lambda; nesting &lt;code&gt;.ifPresent()&lt;/code&gt; calls also pushes code into deeply indented arrow anti-patterns.&lt;/p&gt;
&lt;p&gt;McCue&amp;rsquo;s proposed alternative is refreshingly simple: unwrap the &lt;code&gt;Optional&lt;/code&gt; immediately into a nullable local variable using &lt;code&gt;.orElse(null)&lt;/code&gt; and handle it with standard &lt;code&gt;if (x != null)&lt;/code&gt; control flow. Static analysis tools and IDEs already excel at tracking nullability on local variables, checked exceptions work naturally inside regular &lt;code&gt;if&lt;/code&gt; blocks, and the method signature still explicitly forces callers to confront the possibility of a missing value. Backed by concrete before-and-after refactorings, the post is a great reminder for junior developers to favor clear, maintainable code over dogmatically following &amp;ldquo;never call &lt;code&gt;.get()&lt;/code&gt;&amp;rdquo; lint rules.&lt;/p&gt;
&lt;h2 id="project-loom-structured-concurrency-in-java"&gt;&lt;a href="https://rockthejvm.com/articles/structured-concurrency-in-java" rel="noopener noreferrer"&gt;Project Loom: Structured Concurrency in Java&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Riccardo Cardin at Rock the JVM provides a deep-dive tutorial on structured concurrency—part of Project Loom—running on Java 23 with &lt;code&gt;--enable-preview&lt;/code&gt;. He starts by showing the flaw in traditional unstructured concurrency with &lt;code&gt;ExecutorService&lt;/code&gt;: when a parent task fails or times out, child tasks can keep running in the background, leaking threads and wasting resources. Structured concurrency fixes this by enforcing the principle that the syntactic block structure of your code mirrors the runtime lifetime of its concurrent subtasks—meaning every child thread is guaranteed to finish before execution exits the enclosing lexical scope.&lt;/p&gt;
&lt;p&gt;At the center of the API is &lt;code&gt;StructuredTaskScope&lt;/code&gt;, which implements &lt;code&gt;AutoCloseable&lt;/code&gt; for &lt;code&gt;try-with-resources&lt;/code&gt; blocks and provides &lt;code&gt;fork()&lt;/code&gt; to spawn subtasks on virtual threads, &lt;code&gt;join()&lt;/code&gt; to await completion according to the scope&amp;rsquo;s policy, and &lt;code&gt;shutdown()&lt;/code&gt; to request cancellation of remaining subtasks. Cancellation is cooperative, and closing the scope still waits for all forked threads to terminate cleanly. Cardin illustrates this with a GitHub API client that fetches user profiles and repositories in parallel using the built-in &lt;code&gt;ShutdownOnFailure&lt;/code&gt; and &lt;code&gt;ShutdownOnSuccess&lt;/code&gt; policies. From there, he shows how to build custom policies by subclassing &lt;code&gt;StructuredTaskScope&lt;/code&gt; and overriding &lt;code&gt;handleComplete()&lt;/code&gt;, implementing functional helpers like &lt;code&gt;par()&lt;/code&gt;, &lt;code&gt;race()&lt;/code&gt;, &lt;code&gt;timeout()&lt;/code&gt;, and nested parent-child task trees. It is an excellent hands-on guide to writing safer, easier-to-reason-about concurrent code in modern Java.&lt;/p&gt;
&lt;h2 id="go"&gt;&lt;a href="https://mccue.dev/pages/4-5-25-go-http-server" rel="noopener noreferrer"&gt;Go&amp;rsquo;s HTTP Server Patterns in Java 25&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Ethan McCue demonstrates that modern Java can build HTTP servers in a lightweight, Go-like style by walking through a simple file-backed wiki web app written in Java 25. The application supports creating, viewing, and editing wiki pages stored as plain text files on disk. Its foundation is the JDK&amp;rsquo;s built-in &lt;code&gt;jdk.httpserver&lt;/code&gt; module, paired with McCue&amp;rsquo;s small &lt;code&gt;dev.mccue.jdk.httpserver&lt;/code&gt; helper library (which adds a clean &lt;code&gt;Body&lt;/code&gt; abstraction for writing responses), JMustache for HTML templating, and &lt;code&gt;dev.mccue.urlparameters&lt;/code&gt; for parsing form submissions.&lt;/p&gt;
&lt;p&gt;He models wiki entries with a &lt;code&gt;Page&lt;/code&gt; record exposing &lt;code&gt;save()&lt;/code&gt; and &lt;code&gt;load()&lt;/code&gt; methods, wires up dedicated request handlers for viewing, editing, and saving pages, and returns HTTP 302 redirects when users visit a nonexistent page. The walkthrough proves that with just the standard library and a few tiny, composable dependencies, you can build a clean web application in Java without reaching for a heavyweight framework. For high-traffic production workloads, he still suggests considering battle-tested servers like Jetty—while noting an important distinction in the JDK docs: the &amp;ldquo;testing, development, and debugging only&amp;rdquo; caveat applies specifically to &lt;code&gt;SimpleFileServer&lt;/code&gt; and the &lt;code&gt;jwebserver&lt;/code&gt; CLI tool, not to the underlying &lt;code&gt;jdk.httpserver&lt;/code&gt; HTTP/HTTPS API itself.&lt;/p&gt;
&lt;h2 id="java-is-dying-and-it-paid-off-my-mortgage"&gt;&lt;a href="https://alyosha.net/posts/java-is-dying-and-it-paid-off-my-mortgage/" rel="noopener noreferrer"&gt;Java is dying and it paid off my mortgage&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Alyosha looks back on the career anxiety they felt as a junior developer specializing in Java. On Hacker News and YouTube, Java was practically invisible compared to JavaScript and the latest hyped frameworks, making the author worry they were betting their career on a dying language. Once they actually entered the job market, however, they found the exact opposite: Java roles consistently led in pay, benefits, and stability, driven by profitable enterprises quietly running their core systems on the JVM.&lt;/p&gt;
&lt;p&gt;In the author&amp;rsquo;s view, Java is in the sweet spot of a mature technology: nobody talks about it on social media, yet it powers massive economic value—and precisely because it is viewed as &amp;ldquo;uncool,&amp;rdquo; fewer new developers flock to it, keeping compensation high for those who know it well. Java skills bought the author&amp;rsquo;s house and paid off the mortgage. The lesson for junior developers: online hype does not reflect real-world hiring demand, and mastering a boring, rock-solid foundation often builds a far more lucrative and stable career than chasing the trend of the week.&lt;/p&gt;
&lt;h2 id="localhost-domains"&gt;&lt;a href="https://inclouds.space/localhost-domains" rel="noopener noreferrer"&gt;.localhost domains&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Charles Chamberlain shares how he escaped having to memorize arbitrary port numbers like &lt;code&gt;localhost:4333&lt;/code&gt; or &lt;code&gt;localhost:5050&lt;/code&gt; when running multiple web apps locally. Instead, he gives each local project a memorable &lt;code&gt;.localhost&lt;/code&gt; domain such as &lt;code&gt;inclouds.localhost&lt;/code&gt;. His macOS setup has three moving parts: running each web app as a background service via &lt;code&gt;launchd&lt;/code&gt; listening on its own port; adding an entry in &lt;code&gt;/etc/hosts&lt;/code&gt; pointing the &lt;code&gt;.localhost&lt;/code&gt; domain to &lt;code&gt;127.0.0.1&lt;/code&gt;; and running Caddy as a local reverse proxy that routes each domain to its port while automatically handling internal TLS certificates and &lt;code&gt;gzip&lt;/code&gt;/&lt;code&gt;zstd&lt;/code&gt; compression. Here is the minimal config for an app running on port 5050:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;span class="lnt"&gt;6
&lt;/span&gt;&lt;span class="lnt"&gt;7
&lt;/span&gt;&lt;span class="lnt"&gt;8
&lt;/span&gt;&lt;span class="lnt"&gt;9
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# /etc/hosts&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;127.0.0.1 inclouds.localhost
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Caddyfile&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;inclouds.localhost &lt;span class="o"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; reverse_proxy localhost:5050
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; tls internal
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; encode gzip zstd
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Chamberlain admits that manually editing multiple system files is still a bit clunky and hopes to wrap the whole workflow into a single install/uninstall CLI command; a reader also pointed out that &lt;code&gt;dnsmasq&lt;/code&gt; can eliminate the manual &lt;code&gt;/etc/hosts&lt;/code&gt; edits. It&amp;rsquo;s a neat quality-of-life trick for keeping your local development environment organized when juggling several projects at once.&lt;/p&gt;
&lt;h2 id="ai-50-ai-agents-move-beyond-chat"&gt;&lt;a href="https://sequoiacap.com/article/ai-50-2025/" rel="noopener noreferrer"&gt;AI 50: AI Agents Move Beyond Chat&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;&lt;img src="https://sequoiacap.com/wp-content/uploads/sites/6/2025/04/ai-50-2025.png" alt=""&gt;&lt;/p&gt;
&lt;p&gt;Konstantine Buhler at Sequoia Capital analyzes the firm&amp;rsquo;s 2025 AI 50 list and highlights a major shift: AI is moving from answering questions in a chat box to autonomously completing end-to-end work. Powered by agentic workflows and reasoning models, the companies on this year&amp;rsquo;s list don&amp;rsquo;t just handle isolated prompts—they own entire business workflows, turning AI into an &amp;ldquo;engine of action&amp;rdquo; inside the enterprise. Standout examples include Harvey handling end-to-end legal workflows from document review and drafting to case analysis, Sierra automating customer service resolution, and Cursor generating complete software features from natural-language specs.&lt;/p&gt;
&lt;p&gt;The piece also spotlights the rise of physical robotics, where transformer models meet hardware: Figure AI is building humanoid robots powered by its new Helix model, while Skild AI is developing a shared foundation model for general-purpose robotics—a market Nvidia estimates at $50 trillion. Buhler views 2025 as the inflection point where AI agents began taking on high-value enterprise work, and predicts that by 2026 consumer AI agents will take off in earnest, automatically managing calendars, booking travel, and organizing files as enterprise breakthroughs trickle into everyday life.&lt;/p&gt;
&lt;h2 id="interesting-images-from-bytebytego"&gt;Interesting images from &lt;a href="https://bytebytego.com/" rel="noopener noreferrer"&gt;ByteByteGo&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;&lt;img src="https://substack-post-media.s3.amazonaws.com/public/images/65279cf0-3266-445d-852b-a45d6ac9afa4_2250x2862.png" alt="A Cheatsheet On OOP Design Patterns"&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;This post was rewritten by Claude Code with Opus 5.5 on 27/09/2026; reviewed and edited by Codex with GPT 6.1 Sol on 09/11/2026, and re-verified by Claude Code with Sonnet 5.5 on 16/11/2026.&lt;/em&gt;&lt;/p&gt;</description></item></channel></rss>