<?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"><channel><title><![CDATA[jorzel]]></title><description><![CDATA[Backend developer with special interest in software design, architecture and system modelling.
Trying to stay in a continuous learning mindset.
Enjoy refactorin]]></description><link>https://jorzel.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Thu, 19 Nov 2026 10:12:26 GMT</lastBuildDate><atom:link href="https://jorzel.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Intelligence is Cheap. What's Expensive?]]></title><description><![CDATA[Quo Vadis, Software Engineering?]]></description><link>https://jorzel.hashnode.dev/intelligence-is-cheap-what-s-expensive</link><guid isPermaLink="true">https://jorzel.hashnode.dev/intelligence-is-cheap-what-s-expensive</guid><category><![CDATA[Software Engineering]]></category><category><![CDATA[software development]]></category><category><![CDATA[AI]]></category><category><![CDATA[technology]]></category><dc:creator><![CDATA[jorzel]]></dc:creator><pubDate>Thu, 26 Feb 2026 11:39:08 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/619f85ec9829fb749bcbe87b/b30cc514-7498-427b-854c-b79fea0e7ebc.jpg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2>The Drudgery is Gone</h2>
<p>The growing tempo of <a href="http://medium.com/p/4e9d48b7d0fd">AI and agentic coding is changing the software industry</a>. Not threatening to change it, not promising to. Actually changing it, right now.</p>
<p>Software engineers spend less time on manual coding activity, delegating more and more to AI agents. Something that used to need several people and weeks of experimenting can now be done within hours by a single person, delivering a proof of concept. The entry level to test ideas is much lower. You can sketch an architecture, point an agent at it, and have a working prototype before lunch.</p>
<p>Some people claim that <a href="https://medium.com/@tobrien/stop-calling-it-vibe-coding-91b0daa726fb">software engineering is back</a>. We no longer need to care about syntax, frameworks, or formatting. The drudgery that consumed most of our days—dependency hell, boilerplate, configuration—is handled. What's left, they argue, is the real engineering: thinking about architecture, trade-offs, and design decisions.</p>
<p>It's an optimistic framing. But it raises a question that the optimists tend to skip over. If we keep getting rid of more and more aspects of software and delegate them to AI, what will remain of it? What if it's an onion? You peel layer after layer, and at some point, there's nothing left.</p>
<h2>What Can Be Automated, Will Be Automated</h2>
<p>We can already see the pattern: what can be automated eventually will be. The tempo of improvement leaves little doubt. The question worth asking is different: what can be automated, and what resists it?</p>
<p>Anything measurable. Anything with clear rules and fast feedback. If the input-output relationship is stable and the success criteria are unambiguous, a computer will eventually do it better than a human. This isn't speculation—it's the history of every industry that computers have touched.</p>
<p>This reminds me of the distinction between <a href="https://medium.com/@orzel.jarek/when-deliberate-practice-isnt-enough-e3d8812e9a0d">kind and wicked domains</a>. Kind domains have stable patterns, clear rules, and tight feedback loops. Chess is kind. Assembly lines are kind. Wicked domains are the opposite—the rules shift, the feedback is delayed or ambiguous, and the same action can produce different outcomes depending on context.</p>
<p>AI thrives in kind domains. Automation there is almost inevitable because computers are built for stable patterns. Code generation—translating a clear spec into syntax—is a kind problem. So is formatting, linting, boilerplate, and dependency resolution. These are the parts of software engineering that are disappearing fastest, and they should.</p>
<p>Some people draw the line at creativity. Maybe. But creativity is usually a great craft with a lot of trial and error—and trial and error is exactly what machines are good at.</p>
<p>The harder line is elsewhere—judgment and decisions. Not because they're mystical, but because they require valuing trade-offs where the values themselves are unclear. Assessing long-term effects that won't be visible for months or years. Weighing competing priorities that can't be reduced to a metric. These are wicked problems—the feedback loop is broken or deferred, and there's no objective function to optimize against.</p>
<p>Catalini, Hui, and Wu frame this precisely in <a href="https://papers.ssrn.com/sol3/papers.cfm?abstract_id=6298838">Some Simple Economics of AGI</a>: the cost to automate drops exponentially, but the cost to verify is biologically bottlenecked by human time and experience. The gap between what AI can execute and what humans can afford to verify keeps widening. Scale without verification is debt.</p>
<img src="https://cdn.hashnode.com/uploads/covers/619f85ec9829fb749bcbe87b/16673e70-3c65-4fe7-bec6-5f2fe94cd605.png" alt="" style="display:block;margin:0 auto" />

<p>source: <a href="https://x.com/ccatalini/status/2026311831317561829">https://x.com/ccatalini/status/2026311831317561829</a></p>
<p>The more we automate everything else, the harder the remaining part—judgment—becomes.</p>
<h2>The Fragile Foundation of Judgment</h2>
<p>Judgment relies on understanding. Understanding what we have, what is working and how, and why. Without that foundation, judgment is guesswork dressed up as decision-making.</p>
<p>And understanding is more fragile than we think. I see two forces that erode it—two kinds of cognitive debt that accumulate silently, especially now that we're moving faster than ever.</p>
<h3>Phantom Understanding</h3>
<p>Even in human-to-human cooperation, misalignment is the default. You sit in a meeting, discuss a feature, nod along. Everyone seems to agree. Then implementation starts, and it turns out you were picturing different things. Your mental models of the problem were never the same—you just never collided them hard enough to notice.</p>
<p>This is the hardest thing to tackle, because it feels like alignment. When you have phantom understanding, your requirements become phantom too. The decisions you make aren't wrong in some obvious way—they're wrong in a way that only reveals itself later, when the cost of correction is high. It feels like progress, but it isn't. You're moving faster, but in the wrong direction.</p>
<p>Does the human-AI relationship change anything here? I think it makes it worse. An AI agent gives confident answers. You nod along—just like in that meeting. But how can you be sure its model of the problem matches yours, when you're not even sure what you want? The same phantom understanding, now with a collaborator that never pushes back, never says "I think we're picturing different things."</p>
<h3>Shallow Awareness</h3>
<p>There's a second kind of debt, and it comes not from misalignment but from speed itself.</p>
<p>You delegate more. You ship faster. You cover more ground in a week than you used to in a month. But your capacity to be aware of what you've built doesn't scale with your output. You build more, understand less of what you built. Breadth increases, depth erodes.</p>
<p>You ask an agent to design a service. It delivers clean code, good tests, and reasonable structure. You approve it and move on. Months later, the system struggles under growing traffic. You're asked why the architecture doesn't scale—and you don't have an answer. Not because the design was bad, but because you never understood the trade-offs behind it. The agent made choices. You accepted them. Now you own a system whose rationale lives nowhere except in a conversation you've long forgotten.</p>
<p>Simon Willison calls this <a href="https://simonwillison.net/2026/Feb/15/cognitive-debt/">cognitive debt</a>—the gap between what your system does and what you understand about it. This is subtle because it doesn't feel like a problem at first. Everything works. The tests pass. The features ship. But your system thinking becomes shallow—you lose track of what is working, what was done, and what should be done next. In the long run, this backfires. You lose control over the thing you're supposedly driving.</p>
<h3>The Driver's Seat—For Now</h3>
<p>Both of these debts operate under one assumption: that you are still the driver of change. That judgment, navigation, and verification are your job.</p>
<p>Right now, that assumption holds. The emerging role in software—call it a software orchestrator—is about exactly this: directing, supervising, setting quality criteria rather than typing code. You define what "done" looks like, break the problem into subtasks, review what the agent produces, and redirect when it drifts. Less typing, more steering. The central skill is easing misalignment. Between humans. Between humans and AI. Between intent and implementation.</p>
<p>What helps, practically? Make your mental models visible. Draw before you discuss. Write specs before you delegate. Review not just whether the code works, but whether you understand why it was built that way. And even when you delegate, remain the intentional source of changes—not just an acceptor of working things. The goal isn't to slow down. It's to keep your understanding close to your output. The moment those two diverge, you're accumulating debt you can't see.</p>
<h2>Where Could This Go</h2>
<p>The tempo of improvement doesn't let you rest on the assumption that humans stay in the driver's seat. AGI, superintelligence. These aren't science fiction anymore; they're research agendas with funding and timelines. What happens when AI gets consistently better than most humans at most decisions?</p>
<p>Catalini, Hui, and Wu describe two possible endpoints. In the "Hollow Economy," nominal output explodes but human agency decays—we produce more and understand less, drifting into a world where unverified systems accumulate hidden debt. In the "Augmented Economy," verification scales alongside agentic power, and the same forces that threaten collapse become the engine of discovery. The difference between the two isn't the technology. It's whether we scale our capacity for oversight as fast as we scale our capacity for execution.</p>
<p>If we drift toward the hollow end, the question stops being about software engineering. Why do you need human engineers if AI makes better architectural decisions? But then, why do you need human managers if AI allocates resources better? Why do you need human strategists if AI forecasts outcomes more accurately?</p>
<p>This isn't a software question anymore. It's a civilization question. What is the role of humans in a world where intelligence—including judgment—is no longer scarce?</p>
<p>I don't have a prediction. Just honesty: we don't know. And anyone who claims to know which way this goes hasn't sat long enough with the question.</p>
<p>What I do know is what's true today. Clear thinking is the bottleneck, not intelligence. AI didn't change what's hard about software. It revealed it.</p>
]]></content:encoded></item><item><title><![CDATA[The Scaffolding Trick]]></title><description><![CDATA[Scaffolding is temporarily lowering the bar so someone can experience genuine success, then gradually raising it.]]></description><link>https://jorzel.hashnode.dev/the-scaffolding-trick</link><guid isPermaLink="true">https://jorzel.hashnode.dev/the-scaffolding-trick</guid><category><![CDATA[personal development]]></category><category><![CDATA[Life lessons]]></category><category><![CDATA[Self Improvement ]]></category><category><![CDATA[Personal growth  ]]></category><category><![CDATA[learning]]></category><dc:creator><![CDATA[jorzel]]></dc:creator><pubDate>Thu, 12 Feb 2026 08:34:39 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/ppZL8a4tMuY/upload/3b7cff35022628835203666d557cedf9.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In <a target="_blank" href="https://medium.com/@orzel.jarek/talent-as-a-system-17ac05b8950a">"Talent is a Loop,"</a> I argued that talent isn't a gift — it's a system. A positive reinforcement loop: you practice, you improve, improvement feels good, so you practice more. The question isn't "Do I have talent?" but "Can I build the conditions where this loop starts spinning?"</p>
<p>That reframe matters. But it leaves a harder question unanswered: how do you actually build conditions for the loop to start?</p>
<p>To practice, you need some enjoyment — or at least the willingness to keep going. To enjoy something, you usually need a bit of competence. And to build competence, you need practice. It's a chicken-and-egg trap. The loop needs momentum to sustain itself, but it also needs momentum to start.</p>
<p>Sometimes the answer is simple. You try something, you like it, and the loop kicks in on its own. Enjoyment drives practice, practice builds competence, and the whole thing takes off. No intervention needed. That's the easy path.</p>
<p>But what about when enjoyment doesn't come first? When you need to start from the competence side — trying to get good enough at something that you start caring about it? That's where it gets interesting. Because there are two very different strategies for building that early confidence, and from the outside they look almost the same.</p>
<p>The first is the self-esteem approach: tell someone they're capable, and hope the belief carries them through. "You're smart. You can do this." The idea is that if they feel confident, they'll persist long enough for real competence to arrive.</p>
<p>The second is scaffolding: adjust the challenge so that someone can experience a genuine win, not a fabricated one. The bar is lower, but the success is real. Then you raise the bar.</p>
<p>One inflates the person. The other calibrates the challenge. One produces fragile confidence. The other produces real, if small, competence. The rest of this post is about why that difference matters.</p>
<h2 id="heading-the-self-esteem-trap">The Self-Esteem Trap</h2>
<p>The self-esteem movement had a simple logic: if we build strong self-esteem in children, they'll develop the confidence and resilience to persist through difficulty. And the way to build it? Praise. Tell kids they're capable, smart, special. Make them believe it. Once they believe it, they'll be confident — and confidence will carry them through.</p>
<p>It sounds reasonable. But it doesn't work.</p>
<p>Empty praise — "You're the best" — doesn't ignite loops and perseverance. It eventually kills them. Several authors have converged on this conclusion from different angles.</p>
<p><a target="_blank" href="https://www.amazon.com/Hard-Things-Resilience-Surprising-Toughness/dp/0063275872">Steve Magness argues in <em>Do Hard Things</em></a> that lasting self-esteem doesn't come from being told we're great. It should be a by-product of overcoming challenges and making meaningful connections — not the starting point. When we shift focus away from the joy of actually doing the work and toward external praise and rewards, we create an artificial kind of self-esteem. Fragile and based on delusion.</p>
<p><a target="_blank" href="https://www.amazon.com/Happiness-Hypothesis-Finding-Modern-Ancient/dp/0465028020/">Jonathan Haidt makes an even sharper point in <em>The Happiness Hypothesis</em>:</a> direct self-esteem enhancement can foster unstable narcissism. And unstable narcissism, when threatened by reality, can react with hostility and even violence. We should teach kids self-esteem based on skills they can actually be proud of — not on words disconnected from reality.</p>
<p><a target="_blank" href="https://www.amazon.com/Optimistic-Child-Safeguard-Depression-Resilience/dp/0618918094/">Martin Seligman saw this in children specifically</a>. "You are the best" is usually false — and kids know it. When we rush to make a child feel better after a failure, we send a message: when things don't go as you want, give up and wait for rescue. Failure itself isn't bad for a kid. The interpretation of failure can be harmful. You can validate a child's feelings. But you can't solve the problem for them.</p>
<p>The self-esteem approach tries to skip the loop — to inject confidence without competence. But confidence without competence is a house built on sand.</p>
<h2 id="heading-a-different-kind-of-support">A Different Kind of Support</h2>
<p>Scaffolding is temporarily lowering the bar so someone can experience genuine success, then gradually raising it.</p>
<p>It's like a ladder — you climb on it to reach a place you couldn't get to on your own, and once you're there, you throw it away. You don't need it anymore. The ladder wasn't the point. Getting up was.</p>
<p>Instead of inflating the person, you redesign the challenge. Not necessarily making it easier — but making it fit better. You change the context so that success is real but reachable. The bar is lower, but the win is genuine. And that first genuine win can be enough to get the loop spinning.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1770884973704/8d058c66-fa91-4590-acfe-1be72941c2e8.png" alt class="image--center mx-auto" /></p>
<p>This isn't a new idea. Psychologists have a name for the sweet spot where scaffolding works: Vygotsky's Zone of Proximal Development — the gap between what a learner can do alone and what they can do with a bit of guidance. Jerome Bruner and colleagues built the scaffolding concept on top of it: provide high support when a task is new, then systematically withdraw it as competence grows. You're not pretending someone is competent. You're placing them where competence is within reach.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1770885019655/f4a8aa81-e71a-4cb3-ad91-d03cdf7b3d45.png" alt class="image--center mx-auto" /></p>
<p>If you've read my earlier post on demand and support, this should sound familiar. Scaffolding is support that doesn't remove the demand — it calibrates it. Both must be flexible, contextual, dependent on age, skill, and emotional readiness. There's no formula. It's a judgment call every time.</p>
<p>And honestly, none of this is rocket science. A lot of parents and coaches scaffold without ever knowing the concept. They intuitively manage the context to allow progressing — adjusting difficulty, offering just enough help, stepping back at the right moment. If you can do that naturally, you don't need to overthink the process.</p>
<p>But some people get stuck. A stalled start, a plateau that feels like an ultimate wall. In those cases, it helps to think more deliberately about what you're doing. About activity design. About how to tinker with the conditions so that the first win becomes possible. Scaffolding gives you a framework for that tinkering.</p>
<p>Here's what it looks like in practice. A kid in gymnastics struggles with a routine. The coach has options. She can simplify the routine itself — break it into smaller pieces, let the child nail each one before combining them.</p>
<p>But she might also spot something deeper: the child's legs are too weak for the move. The scaffolding then, isn't about the routine at all — it's about designing drills that build the underlying strength first. The child doesn't even realize she's being scaffolded. She's just doing exercises that happen to make the real challenge possible later.</p>
<p>Or take a math teacher with a struggling student. Instead of repeating the same problem and hoping it clicks, she gives a slightly easier version of the same type. The student solves it. Feels capable. Then gets the standard version. The confidence from that first success carries them through the second attempt. The teacher didn't lower her expectations — she lowered the entry point.</p>
<p>In both cases, the scaffolding isn't about removing the challenge. It's about finding the right challenge for right now.</p>
<h2 id="heading-knowing-when-to-let-go">Knowing When to Let Go</h2>
<p>Scaffolding has a built-in expiration date. Leave it too long, and you create dependency — the coddling trap. Remove it too early, and confidence collapses before the loop has a chance to sustain itself. Educational psychology calls this process "fading" — the deliberate, gradual withdrawal of support as competence grows.</p>
<p>There are two kinds of errors you can make here. The first: not helping when help is needed. "She needs to face the challenge. If she can't do it, it's not for her." The second: helping when help isn't needed. "She needs support. I always helped her and it worked."</p>
<p>There's no easy answer for which is worse. As always, it depends on the context and the situation. But you need to be aware of both. The overprotective parent who never lets go produces a different kind of damage than the hands-off coach who lets a beginner drown. Both break the loop — one by never letting it run on its own, the other by never letting it start.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1770885128707/051ac690-c898-4456-9fa3-1a22ecceab31.png" alt class="image--center mx-auto" /></p>
<p>The art is in reading the signals. Is the person still relying on the support, or going through the motions out of habit? Are they starting to solve problems without prompting? Can they explain what they're doing and why? When you see those signs, it's time to step back — not all at once, but gradually. Let the loop prove it can carry itself.</p>
<h2 id="heading-you-can-scaffold-yourself">You Can Scaffold Yourself</h2>
<p>Scaffolding isn't just something coaches and parents do for children. Adults scaffold themselves all the time — most just don't call it that.</p>
<p>You pick the beginner book instead of the advanced one. You join the slow-running group. You start with the easy recipe before attempting the complex dish. You're not being lazy. You're engineering an early win so the loop has something to feed on.</p>
<p>Some environments do this for you automatically. Video games are the purest example — early levels are deliberately easy, teaching you mechanics through play. Difficulty scales with your skill. You never notice you're being scaffolded because it feels like fun, not instruction. Language apps like Duolingo work the same way — tasks sit right at the edge of your current ability, adjusted in real time.</p>
<p>I recently started painting by numbers. The scaffolding is built right into the canvas — outlines, numbered sections, matched colors. You don't need to know how to compose or mix. You just paint. But along the way, your hand gets steadier, your brush control improves, and you start noticing how colors work together. The structure lets you focus on the craft without the overwhelm.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1770892825419/ac0d3486-96f6-4760-a612-260f2b0ac2c3.gif" alt class="image--center mx-auto" /></p>
<p>At its core, self-scaffolding is designing and managing your own contexts — choosing the right level, the right environment, the right strategy for where you are right now. It's what "Talent is a Loop" calls building conditions, applied deliberately at every stage.</p>
<p>The people who fail to self-scaffold do the opposite. They jump into the deep end, struggle, conclude they lack talent, and quit. They didn't lack talent. They skipped the ladder.</p>
<h2 id="heading-a-loop-worth-building">A Loop Worth Building</h2>
<p>The scaffolding trick isn't about lying to someone about their ability. It's about engineering a first genuine win, so the loop has something to feed on. Then you step back and let the loop do its work.</p>
<p>And scaffolding itself is a skill — one you can learn. Whether you're a parent, a coach, a teacher, or just someone trying to pick up something new, getting better at reading when to support and when to let go is itself a loop worth building.</p>
]]></content:encoded></item><item><title><![CDATA[Single Skill: What Makes Engineers Great]]></title><description><![CDATA[When I think about one skill that separates good developers from exceptional ones, it's the ability to discern symptoms from root causes.]]></description><link>https://jorzel.hashnode.dev/single-skill-what-makes-engineers-great</link><guid isPermaLink="true">https://jorzel.hashnode.dev/single-skill-what-makes-engineers-great</guid><category><![CDATA[software development]]></category><category><![CDATA[Software Engineering]]></category><category><![CDATA[distributed system]]></category><category><![CDATA[problem solving skills]]></category><category><![CDATA[root cause analysis]]></category><dc:creator><![CDATA[jorzel]]></dc:creator><pubDate>Wed, 04 Feb 2026 21:09:11 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/OjrmUvnkMYs/upload/53a85b9f7e471ca03089cf653f2334cc.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In the AI era, where agents generate decent code fast, the idea that great developers just produce <em>more</em> is even harder to defend. Output isn't the differentiator.</p>
<p>When I think about one skill that separates good developers from exceptional ones, it's the ability to discern symptoms from root causes.</p>
<p>Consider a production incident. CPU is overutilized. The instinctive response: we need more resources. Sometimes that's true. But it's a symptom, not a cause.</p>
<p>Let's trace it. You check metrics: CPU spiked at 14:32. What else happened at 14:32? Traffic looks normal. No deployments. But memory usage also climbed—and stayed high. You dig into application metrics. One service is making database calls in a loop. Why? A cache is empty. Why is the cache empty? The cache service restarted at 14:30 after a routine update. It came back healthy, but cold. The first few requests triggered expensive queries that normally never run. Those queries weren't optimized—nobody noticed because the cache always absorbed them. One query had a missing index, causing full table scans.</p>
<pre><code class="lang-go">Why is the CPU overutilized?
  └── One service is making excessive database calls

      Why is it making excessive database calls?
        └── The cache is empty, so every request hits the database

            Why is the cache empty?
              └── The cache service restarted at <span class="hljs-number">14</span>:<span class="hljs-number">30</span>

                  Why do empty cache requests cause high CPU?
                    └── The queries aren<span class="hljs-string">'t optimized (missing index, full table scans)

                        ROOT CAUSE: Unoptimized query hidden behind cache for months</span>
</code></pre>
<p>So, the symptom was CPU overutilization. The trigger was a cache restart. The root cause was an unoptimized query hiding behind a cache for months.</p>
<p>If you stopped at "we need more resources," you'd scale up, the cache would warm, the CPU would drop, and you'd move on. The query would still be there, waiting for the next cold start. You need observability—but observability you actually understand. Observability that leads you to the source, not just confirms the symptom.</p>
<p>In distributed systems, this gets tricky. Failures cascade across services. What you observe is three hops away from where it started. AI can help, but it needs the right framing. Feed it symptoms, and it chases symptoms. Overload the context window too fast, or point it in the wrong direction early, and you've wasted your best debugging partner.</p>
<p>So what is this skill, exactly? For me, it's a blend of deep system understanding—including the business domain—and intuition. Not gut feeling. Intuition as compressed experience. You've seen enough incidents and systems that you recognize patterns before you can articulate why. <a target="_blank" href="https://www.amazon.com/Blink-Power-Thinking-Without/dp/0316010669">Malcolm Gladwell explores this in <em>Blink</em></a>: experts often know something is wrong before they know what.</p>
<p>But intuition has limits. In complex or chaotic systems, the patterns you rely on can mislead you. Confidence becomes a trap. You need awareness of where your mental models break down.</p>
<p>This is what matters in the AI era. AI can be a powerful ally in debugging—it can analyze logs, suggest hypotheses, and trace dependencies. But it follows your lead. If you point it at symptoms, it chases symptoms. If you frame the problem well, it accelerates your investigation tenfold.</p>
<p>The bottleneck isn't code generation anymore. It's navigation. Knowing what questions to ask. Knowing which logs to pull, which metrics matter, and which rabbit holes to avoid. You need to understand systems back to front—not because AI can't help, but because AI needs a skilled navigator to be useful.</p>
<p>Deep thinkers—people who don't just do things but understand why things work—are more valuable now than ever.</p>
]]></content:encoded></item><item><title><![CDATA[How to Utilize Claude Code]]></title><description><![CDATA[I collected resources on Claude Code for weeks. Then I asked Claude to synthesize them into a utilization plan. Here's the result.]]></description><link>https://jorzel.hashnode.dev/how-to-utilize-claude-code</link><guid isPermaLink="true">https://jorzel.hashnode.dev/how-to-utilize-claude-code</guid><category><![CDATA[Artificial Intelligence]]></category><category><![CDATA[General Programming]]></category><category><![CDATA[generative ai]]></category><category><![CDATA[Software Engineering]]></category><category><![CDATA[software development]]></category><dc:creator><![CDATA[jorzel]]></dc:creator><pubDate>Mon, 26 Jan 2026 16:10:36 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/FHgWFzDDAOs/upload/afa8f529787d75264a9b0c37fbdda46d.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I wanted to go deeper with Claude Code. Not just use it for quick fixes, but actually understand how to get the most out of it.</p>
<p>So I did what many of us do: started collecting resources. Blog posts, Twitter threads, GitHub repos, official docs. Over weeks, the list grew:</p>
<ul>
<li><p><a target="_blank" href="https://www.anthropic.com/engineering/claude-code-best-practices">Anthropic's best practices</a></p>
</li>
<li><p><a target="_blank" href="https://x.com/eyad_khrais/status/2010076957938188661">Eyad Khrais's playbook</a></p>
</li>
<li><p>Nick Tune's articles on <a target="_blank" href="https://medium.com/nick-tune-tech-strategy-blog/composable-claude-code-system-prompts-4a39132e8196">composable prompts</a> and <a target="_blank" href="https://medium.com/nick-tune-tech-strategy-blog/auto-reviewing-claudes-code-cb3a58d0a3d0">auto-reviewing code</a></p>
</li>
<li><p><a target="_blank" href="https://github.com/humanlayer/humanlayer/tree/main?tab=readme-ov-file#from-the-team-that-brought-you-context-engineering">HumanLayer's context engineering</a> for research/plan/implement workflows</p>
</li>
<li><p>Repositories full of <a target="_blank" href="https://github.com/mitsuhiko/agent-commands">skills and commands</a></p>
</li>
</ul>
<p>But reading everything and synthesizing it? That's where it sat.</p>
<p>Then I thought: why not ask Claude to do the synthesis for me? I'd give it all my collected resources and ask for a utilization plan. This post is the result.</p>
<h2 id="heading-the-utilization-plan">The Utilization Plan</h2>
<p>Here's what Claude produced after analyzing everything I'd gathered.</p>
<h3 id="heading-think-first-type-second">Think First, Type Second</h3>
<p>The most counterintuitive advice that kept appearing across resources: slow down before you start typing.</p>
<p>Most people assume that with Claude Code, the first thing you do is type. But that's probably one of the biggest mistakes you can make. Claude has a plan mode—hit shift+tab twice—that forces you to think through architecture before implementation. The difference in output quality is dramatic.</p>
<p>Consider the gap between "build me an auth system" and "build email/password authentication using the existing User model, store sessions in Redis with 24-hour expiry, and add middleware that protects routes under /api/protected." The second version eliminates ambiguity. Less wiggle room means better output.</p>
<p>Here's the thing about AI agents: they're incredible leverage. But leverage amplifies whatever you feed it. If you apply leverage to bullshit or a vague, too-wide input, you get amplified bullshit on the output. Garbage in, garbage out—just faster.</p>
<p>That's why Anthropic's official recommendation separates the work into phases: Explore → Plan → Code → Commit. Each stage is a filter. You explore to understand what exists. You plan to refine the approach and cut what's unnecessary. Only then do you implement. The separation lets you catch problems early, before Claude multiplies them across your codebase.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769443302646/d275ce61-8547-41bb-baf0-2b14233a972d.png" alt class="image--center mx-auto" /></p>
<p>Leverage propagates both good and bad things, <a target="_blank" href="https://www.youtube.com/watch?v=IS_y40zY-hc">source</a></p>
<h3 id="heading-clauhttpswwwyoutubecomwatchvisy40zy-hcdemd-as-your-leverage-point"><a target="_blank" href="https://www.youtube.com/watch?v=IS_y40zY-hc">CLAU</a>DE.md as Your Leverage Point</h3>
<p>This is the single most impactful thing you can configure. <code>CLAUDE.md</code> is a markdown file that Claude reads at the start of every session. It's essentially onboarding material that shapes how Claude approaches your project.</p>
<p>What makes it effective? First, keep it short. Claude can reliably follow around 150-200 instructions, and the system prompt already uses about 50 of those. Every instruction you add competes for attention. If your <code>CLAUDE.md</code> is a novel, Claude will start ignoring things randomly.</p>
<p>Second, tell it why, not just what. "Use TypeScript strict mode" is okay. "Use TypeScript strict mode because we've had production bugs from implicit any types" is better. The why gives Claude context for judgment calls you didn't anticipate.</p>
<p>Third, update it constantly. Press the <code>#</code> key while working, and Claude will suggest additions automatically. Every time you find yourself correcting Claude on the same thing twice, that's a signal it should be in the file.</p>
<h3 id="heading-claude-as-teacher">Claude as Teacher</h3>
<p>There's a risk with AI coding assistants that doesn't get talked about enough: if you use them without reflection, your own abilities can atrophy over time. You accept the code, it works, you move on. But you didn't learn anything.</p>
<p><a target="_blank" href="https://x.com/i/status/2015057205800980731">One technique</a> flips this dynamic. Add a paragraph to your CLAUDE.md that turns Claude into a teacher:</p>
<blockquote>
<p>"For every project, write a detailed FOR[yourname].md file that explains the whole project in plain language. Explain the technical architecture, the structure of the codebase and how the various parts are connected, the technologies used, why we made these technical decisions, and lessons I can learn from it (this should include the bugs we ran into and how we fixed them, potential pitfalls and how to avoid them in the future, new technologies used, how good engineers think and work, best practices, etc). It should be very engaging to read; don't make it sound like boring technical documentation. Where appropriate, use analogies and anecdotes to make it more understandable and memorable."</p>
</blockquote>
<p>Every project becomes a lesson. Claude doesn't just write code—it explains what it did and why, in a way designed to make you more technical. The feedback loop runs both ways: you're configuring Claude, and Claude is teaching you.</p>
<h3 id="heading-context-window-reality">Context Window Reality</h3>
<p>Here's something most people don't realize: context quality degrades at 20-40% capacity, not at 100%. If you've experienced Claude giving terrible output after compacting, that's why. The model was already degraded before the compaction happened.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769443336602/28df48c0-8af5-4d03-ab58-2c99a9708f21.png" alt class="image--center mx-auto" /></p>
<p>Long context model performance in a function of the context length, <a target="_blank" href="https://www.youtube.com/watch?v=tbDDYKRFjhk">source</a></p>
<p>Every message you send, every file Claude reads, every piece of code it generates—all of it accumulates. And once quality starts dropping, more context makes it worse, not better.</p>
<p>Strategies that help: scope your conversations to one feature or task. Don't use the same conversation to build your auth system and then also refactor your database layer. The contexts bleed together.</p>
<p>Use external memory. If you're working on something complex, have Claude write plans and progress to actual files—something like <code>SCRATCHPAD.md</code> or <code>plan.md</code>. These persist across sessions. When you come back tomorrow, Claude can read the file and pick up where it left off.</p>
<p>There's also the copy-paste reset trick. When context gets bloated, copy everything important from the terminal, run <code>/compact</code> to get a summary, then <code>/clear</code> the context entirely, and paste back only what matters. Fresh context with critical information preserved.</p>
<p>And know when to clear. If a conversation has gone off the rails, just <code>/clear</code> and start fresh. Claude still has your <a target="_blank" href="http://CLAUDE.md">CLAUDE.md</a>.</p>
<h3 id="heading-skills-and-commands">Skills and Commands</h3>
<p>The next level is moving beyond ad-hoc prompting to reusable components.</p>
<p>Custom slash commands live in a <code>.claude/commands/</code> folder. They're prompt templates you use repeatedly, packaged as commands. If you run the same kind of task often—debugging, reviewing, deploying—make it a command.</p>
<p>Skills are more versatile. You can reference them in system prompts, manually inject them with <code>@</code>, or trigger them automatically using keywords. Nick Tune categorizes skills into four types: orchestration (the workflow Claude follows, like a TDD process), knowledge (information to weight heavily, like design principles), task (independent tasks like analyzing code), and personality (how Claude should behave—direct, challenging, enthusiastic).</p>
<p>The insight here is important: you're not just using Claude. You're configuring it for your specific work. Several GitHub repositories—from <a target="_blank" href="https://github.com/mitsuhiko/agent-commands">mitsuhiko</a>, <a target="_blank" href="https://github.com/affaan-m/everything-claude-code">affaan-m</a>, <a target="_blank" href="https://github.com/alirezarezvani/claude-code-tresor">alirezarezvani</a>—contain extensive examples of skills and commands you can adapt.</p>
<h3 id="heading-auto-review-via-hooks">Auto-Review via Hooks</h3>
<p>A well-crafted system prompt will increase code quality. But here's the uncomfortable truth: Claude ignores instructions regularly. As one source put it, "as the context window fills up and starts to intoxicate them, all bets are off."</p>
<p>The solution is building feedback cycles. Claude Code has hooks—scripts that run automatically before or after certain events. The pattern that emerged from the resources: use a Stop hook to trigger a separate subagent that reviews modified files before control returns to you.</p>
<p>What should this review check? Semantic issues that lint tools can't catch. Naming problems like "helper" and "utils" should be better domain names. Logic leaking out of the domain model. Dangerous default fallback values that Claude loves to add.</p>
<p>The key principle: asking the main agent to mark its own homework isn't a good approach. Use a separate subagent with a critical mindset.</p>
<h3 id="heading-when-stuck">When Stuck</h3>
<p>Sometimes Claude loops. It tries the same thing, fails, tries again, fails, and keeps going. The instinct is to keep pushing—more instructions, more corrections, more context. But the better move is changing the approach entirely.</p>
<p>Start simple: clear the conversation. Accumulated context might be confusing it. Then simplify the task. If Claude is struggling with something complex, break it into smaller pieces. If it's still struggling, your plan mode was probably insufficient.</p>
<p>Show instead of tell. If Claude keeps misunderstanding what you want, write a minimal example yourself. "Here's what the output should look like. Now apply this pattern." Claude is good at pattern-matching from examples.</p>
<p>And try reframing. "Implement this as a state machine" versus "handle these transitions"—different framing can unlock progress. The meta-skill is recognizing when you're in a loop early. If you've explained the same thing three times and Claude still isn't getting it, more explaining won't help.</p>
<h2 id="heading-bonus-running-claude-locally">Bonus: Running Claude Locally</h2>
<p>Sometimes you can't access a paid Claude subscription. Maybe you're between jobs, maybe your company hasn't approved the expense yet, or maybe you just want complete privacy with no data leaving your machine.</p>
<p><a target="_blank" href="https://x.com/i/status/2014380662300533180">There's an option</a>: run Claude Code with local open-source models using Ollama. The setup involves four steps. First, install Ollama—it runs quietly in the background and hosts AI models locally. Then download a coding-focused model. For powerful machines, something like <code>qwen3-coder:30b</code> works well. For lower RAM, <code>qwen2.5-coder:7b</code> or even <code>gemma:2b</code> will do.</p>
<p>After installing Claude Code normally, you redirect it to your local Ollama instance instead of Anthropic's servers:</p>
<pre><code class="lang-bash"><span class="hljs-built_in">export</span> ANTHROPIC_BASE_URL=<span class="hljs-string">"http://localhost:11434"</span>
<span class="hljs-built_in">export</span> ANTHROPIC_AUTH_TOKEN=<span class="hljs-string">"ollama"</span>
<span class="hljs-built_in">export</span> CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1
</code></pre>
<p>Then launch with your chosen model: <code>claude --model qwen2.5-coder:7b</code></p>
<p>No API calls. No cloud processing. Zero cost. The tradeoff is that local models aren't as capable as Claude's flagship models—but for many tasks, they're good enough. And for learning the Claude Code workflow itself, the experience is nearly identical.</p>
<h2 id="heading-reflection">Reflection</h2>
<p>Using Claude to help me learn Claude actually worked. I gave it raw material—articles, threads, repos—and it produced a coherent utilization plan. Not perfect, but a solid starting point.</p>
<p>What resonates most with me is the <a target="_blank" href="http://CLAUDE.md"><code>CLAUDE.md</code></a> advice. I've been treating it as an afterthought, but the resources consistently point to it as the highest-leverage configuration. That's where I'll start—and I'll include the Claude as Teacher technique. The idea of every project becoming a learning opportunity addresses something I've worried about: letting my skills atrophy by accepting AI output without understanding it.</p>
<p>The context window degradation is something I've felt but never understood. Knowing it happens at 20-40% rather than at capacity changes how I'll approach longer sessions.</p>
<p>I'm more skeptical about the auto-review hooks. It sounds powerful but also like significant setup overhead. Maybe worth it for a team, less clear for solo work. I'll experiment—but it's lower on my list.</p>
<p>There's a meta-lesson here too. The compound effect keeps appearing: Claude makes a mistake, you review, you improve the <a target="_blank" href="http://CLAUDE.md">CLAUDE.md</a> or tooling, Claude gets better next time. Same models, just better configured.</p>
]]></content:encoded></item><item><title><![CDATA[Why Child Prodigies Rarely Become Superstars]]></title><description><![CDATA[Only about 10% of world-class performers were top achievers as children. And the reverse holds too: only about 10% of child prodigies reached elite status.]]></description><link>https://jorzel.hashnode.dev/why-child-prodigies-rarely-become-superstars</link><guid isPermaLink="true">https://jorzel.hashnode.dev/why-child-prodigies-rarely-become-superstars</guid><category><![CDATA[talent acquisition]]></category><category><![CDATA[personal development]]></category><category><![CDATA[Self Improvement ]]></category><category><![CDATA[learning]]></category><category><![CDATA[Learning Journey]]></category><dc:creator><![CDATA[jorzel]]></dc:creator><pubDate>Mon, 26 Jan 2026 09:07:44 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1769418383208/cd33c463-c3bd-4efb-828b-4963bd708683.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><a target="_blank" href="https://www.science.org/doi/10.1126/science.adt7790">A new study published in <em>Science</em></a> analyzed nearly 35,000 elite adults across 19 studies. The finding? Only about 10% of world-class performers were top achievers as children. And the reverse holds too: only about 10% of child prodigies reached elite status as adults.</p>
<p>This pattern held across sports, music, chess, and scientific research. As lead researcher Arne Güllich put it: "Early exceptional performance is not a prerequisite for long-term, world-class performance."</p>
<p>The authors offer three potential explanations. First, broad exploration instead of early narrow focus allows you to find a domain where you'll truly thrive. Second, learning many different things improves the ability to learn itself, which can accelerate the learning process as an adult. Third, lack of pressure tied to a single domain decreases the risk of burnout in later stages.</p>
<p>All three align well with <a target="_blank" href="https://medium.com/@orzel.jarek/talent-as-a-system-17ac05b8950a">the positive reinforcement loop</a> concept. Broad search is essential before committing - you need time to explore before you know where to persist. The "learned ability to learn" strengthens the loop itself, making each new skill easier to acquire. And avoiding burnout is crucial for sustaining the loop through its different stages.</p>
<p>Early specialization always risks finding a local minimum. We see early success and pour everything into it. But for life security, redundancy is the safer approach. Even if you're good at something, it's useful - and robust - to cultivate other sources of enjoyment and competence. A wide range can also make you better in the domain you choose to persist in.</p>
<p><a target="_blank" href="https://medium.com/@orzel.jarek/when-deliberate-practice-isnt-enough-e3d8812e9a0d">In wicked domains where feedback is delayed and rules are unclear</a>, a wide range of skills is essential to thrive. But even in kind domains where feedback is fast, learning other skills can boost your character and scaffold abilities in later stages.</p>
<p>This research puts even harder emphasis on building rather than discovering. Even if you discover talent early, you can still fail. Focusing on one domain robs you of life redundancy - and that can be detrimental in the long game.</p>
]]></content:encoded></item><item><title><![CDATA[The Brain That Proved Itself]]></title><description><![CDATA[If you've ever doubted whether you're on the right path—whether it's too late, whether you lack the obvious gift—Cajal's life offers something rare…]]></description><link>https://jorzel.hashnode.dev/the-brain-that-proved-itself</link><guid isPermaLink="true">https://jorzel.hashnode.dev/the-brain-that-proved-itself</guid><category><![CDATA[personal development]]></category><category><![CDATA[Self Improvement ]]></category><category><![CDATA[learning]]></category><category><![CDATA[Biography]]></category><category><![CDATA[neuroscience]]></category><dc:creator><![CDATA[jorzel]]></dc:creator><pubDate>Sun, 18 Jan 2026 18:27:06 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1768759704147/2d9d97be-9dc6-4f87-99fe-b685066904ae.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><img src="https://upload.wikimedia.org/wikipedia/commons/7/76/Cajal-va.jpg" alt class="image--center mx-auto" /></p>
<p>Santiago Ramón y Cajal in his laboratory (ca. 1885), <a target="_blank" href="https://commons.wikimedia.org/wiki/Category:Santiago_Ram%C3%B3n_y_Cajal#/media/File:Cajal-va.jpg">Wikimedia Commons</a></p>
<h2 id="heading-the-illusion-of-destiny">The Illusion of Destiny</h2>
<blockquote>
<p>"Early in the morning on Friday, October 26, 1906, there was a knock at Cajal's front door. Silveria rose from bed and received a telegram. She woke Cajal and relayed the message to him, which consisted of five German words: <em>Carolinsche Institut vertichen Sie Nobel-priess</em>—'Karolinska Institute awards you Nobel Prize.' Certain that his students were playing a trick on him, Cajal went back to sleep." [1]</p>
</blockquote>
<p>Santiago Ramón y Cajal became one of the founders of modern neuroscience. His research on histology proved that the brain is made of individual cells, not a continuous network. He shared the 1906 Nobel Prize for this discovery.</p>
<p>From the outside, this looks like the culmination of obvious genius. But rewind the tape, and there's nothing inevitable about it.</p>
<p>This is a story about a rebellious kid who hated school, failed at formal education, and didn't find his calling until his mid-thirties. A story full of wrong turns, dead ends, and stubborn persistence against the odds.</p>
<p>If you've ever doubted whether you're on the right path—whether it's too late, whether you lack the obvious gift—Cajal's life offers something rare: genuine hope. Not the cheap kind that promises quick success, but the kind built on evidence that minds grow, skills compound, and <a target="_blank" href="https://medium.com/@orzel.jarek/talent-as-a-system-17ac05b8950a">the positive reinforcement loop</a>—where enjoyment fuels practice, practice builds competence, and competence deepens enjoyment —can ignite long after others have given up on you.</p>
<h2 id="heading-the-fortified-castle">The Fortified Castle</h2>
<p>Santiago's father Justo, was born into an illiterate family. But he was determined to climb. He taught himself to read and trained his memory. He started as a barber-surgeon—the lowest rung of medical practice—then passed exams to become a certified surgeon. His dream was to reach the top: a physician.</p>
<p>He enrolled in a doctoral program at Barcelona. Then bad luck struck. He injured his leg during civil unrest and was forced to return home. He took a surgeon job, married Antonia, and started a family. But the dream of becoming a physician never died.</p>
<p>Santiago was born in 1852, followed by a younger brother and sister. Justo, regretful about his own late start, poured everything into his son's intellectual development. He believed even stubborn children could succeed if directed properly. Before mandatory schooling began at six, he was already tutoring Santiago in a cave—geography, arithmetic, grammar, and French.</p>
<p>Santiago was disorganized and restless. A small devil, they called him.</p>
<p>When Justo finally achieved his doctoral degree, the family's fortune changed. But now he was too busy to tutor. They moved to Ayerbe for better schooling. Thanks to his early lessons, Santiago was ahead of his peers academically. Socially, he was lost. "Things always interested me more than people," he later wrote. He had no friends except his brother Pedro. Classmates mocked him. The school demanded discipline and memorization—nothing that captured an eight-year-old who wandered the countryside alone.</p>
<p>He couldn't focus on what didn't interest him. But he could draw for hours.</p>
<p>He scribbled constantly—on scraps, textbooks, gates, walls, doors. He scrounged money for paper and pencils, paused during his solitary walks to sketch the scenery. At ten, he declared he wanted to be an artist.</p>
<p>His father didn't take it well. Art was a hobby, not a profession. When Santiago became a doctor, Justo said, he could spend his spare time on any hobby he liked. Until then: no. He confiscated the drawing tools. He burned the drawings.</p>
<hr />
<p>Santiago had no interest in further formal education. His father sent him anyway—to the Institute of Jaca, a religious school known for its Latin program. Spanish secondary education at the time discouraged individualism and punished critical thinking. Physical punishment. Whipping. Daylong fasts for errors. Public shaming.</p>
<p>Santiago's poor memorization skills—the opposite of his father's gift—made Latin a torture. He approached classes trembling with fear.</p>
<p>In this hostile environment, he retreated to his safe oasis: fantasy, nature, and drawings. "When the world does not accept us," he wrote later, "we can build a castle of our dreams."</p>
<p>By the end of the year, he stopped going to school entirely.</p>
<p>Justo recognized that terror had failed. He agreed to be more lenient. Santiago passed his exams with the lowest possible grades and transferred to Huesca, where teachers still used punishment, but not terror. And no Latin.</p>
<hr />
<p>Huesca opened a window to culture: bookstores, libraries, and the river where Santiago sat sketching. At the institute, he finally found a subject he enjoyed: geography. It involved drawing. Copying maps. His visual memory—his version of his father's verbal gift—came alive.</p>
<p>He still passed exams with poor grades.</p>
<p>His young life became a constant pattern: resisting his father's pressure while finding small opportunities to keep doing what he loved. When grades didn't improve, Justo tried a different cure—he apprenticed Santiago to a cobbler. Drawing tools were confiscated again.</p>
<p>But Santiago excelled. He learned to make ornamental toecaps and considered himself a shoe artist. After the apprenticeship, Justo believed his son was finally healed from "artistic madness." In 1867, he allowed Santiago to return to Huesca.</p>
<hr />
<p>This time, Santiago negotiated. He asked to enroll in a drawing course—useful for doctors and engineers, he argued. Justo agreed, on one condition: Santiago had to work at a barbershop.</p>
<p>It was worth it. The arts program in Huesca had a strong reputation, and its founder—León Abadías, a painter—became the mentor Santiago had been missing. For the first time, someone took his artistic impulse seriously. Santiago threw himself into the work. He became the most brilliant pupil. Great grades. Prizes.</p>
<p>The drawing hadn't been cured. It had found a home.</p>
<h2 id="heading-the-tipping-point">The Tipping Point</h2>
<p>In 1868, Justo decided it was time to start medical education. Santiago learned anatomy through direct experience—taking bones from cemeteries, comparing them with anatomy books. He was good at osteology. The bones became another subject for his pictures.</p>
<p>In medical school, he met teachers who expanded his horizons—who showed that the world of knowledge could be captivating.</p>
<p>Florencio Ballarín taught natural history through classification by sight, not memorization. Teaching objectively, with experiments. Bruno Solano, the chemistry teacher, was a polymath—history, literature, philosophy, art, sciences, and law. He questioned students' habitual thinking. He taught chemistry by telling stories. He showed Santiago that science could be as interesting and adventurous as literature and fiction.</p>
<p>Something was shifting.</p>
<p>Justo found a job in Zaragoza and began providing dissection classes at Santiago's school. In the afternoons, father and son spent hours in the dissection room studying anatomy together:</p>
<blockquote>
<p>"Page by page, they forged through the same mammoth textbook, meticulously dissecting muscles, blood vessels, nerves, and viscera, checking the authors' findings against their own. His father's explanations were pithy and serious, stripped of all rhetorical fat, leaving nothing but the bare bones. Sometimes they would come upon a new detail that no author had noted before. No pleasure could compare to the joy of discovery, Cajal said. It was a thrill that he first shared with his father." [1]</p>
</blockquote>
<p>With each new anatomical structure uncovered, Santiago did what he always did when encountering something new: he drew it. Only now, instead of rocks, flowers, and trees, he turned his eye toward ganglia, sheaths, and plexuses. His notebooks were filled with hundreds of drawings—pencil sketches, watercolors, colored pencil illustrations.</p>
<p>The skills were compounding. Drawing had kept him in the game. Now it was becoming something more.</p>
<hr />
<p>Reading about ideas was never enough for Santiago. He had to see for himself. Microscopes weren't widely used at the time, dismissed by conservatives. But Santiago was astonished by what they could reveal.</p>
<p>In 1877, he visited Aureliano Maestre's anatomy and histology laboratory, where microscopes were central tools. He called microscopic anatomists "Columbuses"—explorers of an invisible world. He dreamed of owning his own microscope. It cost half his yearly salary.</p>
<p>When he finally got one, he stayed up all night playing with it like a child with a new toy. Whatever he inspected—tissue, blood, saliva, plants—he found cells. He fell in love with biological research.</p>
<p>His father arranged a surgeon job for him in a small village. Santiago accepted to avoid embarrassment, but returned after several months. He didn't want to practice medicine. He wanted to focus on histology.</p>
<p>The loop of scientific research had ignited.</p>
<h2 id="heading-total-immersion">Total Immersion</h2>
<blockquote>
<p>"The laboratory is the ideal sanatorium," Cajal wrote. [1]</p>
</blockquote>
<p>He spent more and more hours locked in his attic, working with newfound vigor. No assistants, no collaborators, no noise. While universities closed at night, his attic remained open. Books became his mentors—"forever wise and calm, and unlike people, they know how to keep quiet after saying their piece."</p>
<p>Now, Cajal was master and apprentice both.</p>
<p>He channeled his most powerful character traits—obsessiveness, competitiveness—into his scientific practice. He calculated the time a task required, then devoted ten times more. For the time being, there was no one to surpass but himself. He considered that triumph the only one worth celebrating.</p>
<blockquote>
<p>"Laboratory work consumed Cajal. He went to sleep late and woke early, unable to divert his mind from the microscope in the other room. He stopped going to the café, almost completely withdrawing from the world... Colleagues, classmates, and professors, who acknowledged his hard work and talent, nonetheless mocked him for his quixotic, solitary pursuit. 'Fortunately,' Cajal said, 'I have endured the absence of social life quite well.'" [1]</p>
</blockquote>
<p>In Barcelona, he published 43 papers in four years. He founded his own journal when delays frustrated him. He sent copies to leading scientists abroad. At first, silence. Then recognition came—slowly, then all at once.</p>
<p>Twenty-five years after nearly failing secondary school, Santiago became a model student again. In his forties, he audited philosophy, law, and history classes—not for credentials, but for curiosity.</p>
<p>"Before discovering anything," he wrote, "we must first discover ourselves."</p>
<hr />
<p>His great discovery was proving what the scientific establishment denied: the brain is not a continuous network, but made of individual cells—neurons—that communicate across tiny gaps. He drew what he saw through the microscope with such precision that his illustrations became scientific evidence. The same skill his father once burned as worthless now revealed the structure of the mind.</p>
<p><img src="https://upload.wikimedia.org/wikipedia/commons/e/e2/Purkinje_cell_by_Cajal.png?20100616130225" alt="File:Purkinje cell by Cajal.png" class="image--center mx-auto" /></p>
<p>Purkinje neurons drawing, <a target="_blank" href="https://commons.wikimedia.org/wiki/File:Purkinje_cell_by_Cajal.png">Wikimedia Commons</a></p>
<p>In 1906, the telegram arrived. He thought it was a prank and went back to sleep.</p>
<p>He shared the Nobel Prize with Camillo Golgi, the man whose staining technique he had mastered, and who still disagreed with his findings. At the ceremony, Golgi used his speech to attack the neuron theory. Cajal used his to defend it.</p>
<p>The rebellious boy who couldn't memorize Latin had proven how the brain works.</p>
<h2 id="heading-the-long-game">The Long Game</h2>
<p>What does Cajal's story actually tell us?</p>
<p>Not that natural abilities don't matter. He had real ones—visual memory, obsessive focus, competitive drive. But they weren't obvious in childhood. They emerged slowly, shaped by circumstance, built on skills that seemed useless at the time.</p>
<p>The loop doesn't ignite immediately. Sometimes you need years of scaffolding before finding the tool or context that makes everything click. Drawing kept Santiago in the game when school pushed him out. It gave him enough enjoyment to persist. Then drawing opened the door to anatomy, anatomy to microscopy, microscopy to neuroscience. Each skill enabled the next. He climbed a ladder that he couldn't see.</p>
<p>This is how it often works. You acquire one skill that lets you enjoy another activity. That activity opens doors to new skills. You can't skip the rungs. Craft precedes art. Tools precede discovery. People want to be creative and innovative from the beginning, but you need to be capable first.</p>
<p>His character traits transformed along the way. The stubbornness that infuriated his father became persistence in the laboratory. The competitiveness that made him difficult became the drive to outwork everyone. The same qualities that made him a problem child made him a great scientist.</p>
<p>In his <em>Advice for a Young Investigator</em>, Cajal addressed those who thought he overemphasized willpower at the expense of natural genius:</p>
<blockquote>
<p>"I would be the last to deny that the greatest scientific pioneers belonged to an aristocracy of the spirit and were exceptionally intelligent, something that we as modest investigators will never attain, no matter how much we exert ourselves. Nevertheless... I continue to believe that there is always room for anyone with average intelligence and an eagerness for recognition to utilize his energy and tempt fate. Like the lottery, fate doesn't always smile on the rich; from time to time it brings joy to the homes of the lowly." [2]</p>
</blockquote>
<p>Great natural abilities make you faster. But ordinary minds can still arrive, just slower. What you lack in one area, you can compensate with strengths in others. Santiago couldn't memorize like his father. So he drew instead. His visual memory wasn't handed to him—it was built, hour by hour, sketch by sketch.</p>
<p>Late doesn't mean never. His obsession with neuroscience didn't arrive until his mid-thirties. Before that, nothing fully captured him. The boy who hated learning became a man who audited philosophy, law, and history classes in his forties—for curiosity alone.</p>
<p>His life demonstrated what his research established: minds grow under the right conditions. The brain is not a fixed network. New connections form. New capabilities emerge. That was the whole point of his science—and the whole arc of his life.</p>
<p>The brain that proved itself.</p>
<hr />
<h2 id="heading-references">References</h2>
<p>[1] Benjamin Ehrlich, <a target="_blank" href="https://www.amazon.com/Brain-Search-Itself-Santiago-Neuron/dp/0374110379/"><em>The Brain in Search of Itself: Santiago Ramón y Cajal and the Story of the Neuron</em> (2022)</a></p>
<p>[2] Santiago Ramón y Cajal, <a target="_blank" href="https://www.amazon.com/Advice-Young-Investigator-Bradford-Book/dp/0262681501"><em>Advice for a Young Investigator</em> (1999)</a></p>
]]></content:encoded></item><item><title><![CDATA[Why You Must Invest Before You Know]]></title><description><![CDATA[A Pragmatic Approach to Talent. Natural abilities. Experimenting.]]></description><link>https://jorzel.hashnode.dev/why-you-must-invest-before-you-know</link><guid isPermaLink="true">https://jorzel.hashnode.dev/why-you-must-invest-before-you-know</guid><category><![CDATA[Talent]]></category><category><![CDATA[personal development]]></category><category><![CDATA[Philosophy]]></category><category><![CDATA[self-improvement ]]></category><category><![CDATA[Mindset]]></category><dc:creator><![CDATA[jorzel]]></dc:creator><pubDate>Wed, 07 Jan 2026 12:21:31 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/V9KFkt1iuTc/upload/9aed9cf65dfc5eb6ef54f4026bb831d8.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-the-wow-effect">The Wow Effect</h2>
<p>When we think about ideal love, we picture a Hollywood story. Two people lock eyes across a room. Instant connection. Intense, unconditional, unquestionable. Love at first sight that lasts forever.</p>
<p>We like to think about perfect things as stable and fixed. Something that just <em>is</em>.</p>
<p><a target="_blank" href="https://www.youtube.com/watch?v=A9V2guHfR5E">Alain de Botton, in his conversation with Chris Williamson</a>, points out the problem with this view. We focus on finding the right person instead of learning how to live and solve problems with another human being. We believe the primary challenge is matching—finding someone who is compatible. However, compatibility is a side effect of a good relationship, not the entry point.</p>
<p>We treat talent the same way.</p>
<p>We look for natural abilities. We wait for a spark, a sign that "this is for me." If it doesn't come easy at first, we assume it's not our thing. We expect the wow effect—and if it doesn't arrive, we conclude we're not talented.</p>
<p>But that's treating talent like a static essence. Something that either screams at you or doesn't exist at all.</p>
<p>In my previous post, <a target="_blank" href="https://medium.com/@orzel.jarek/talent-as-a-system-17ac05b8950a">Talent as a Loop, Not a Gift</a>, I argued that talent isn't something you passively discover—it's something you build through a positive reinforcement loop. But I've noticed a recurring reaction: people think I underestimate the impact of natural abilities. That I dismiss what they see as crucial for development.</p>
<p>Maybe they're right that I downplay it. But here's my actual stance: you don't have direct access to your natural abilities. There's no test, no detector, no a priori way to know what you're "naturally" good at. You need an active approach to make them visible. They reveal themselves through action, not introspection.</p>
<p>Natural abilities exist. But they're hidden. They exist in possibility, not actuality—until the right conditions bring them forth.</p>
<p>Like in relationships, the starting point matters. But our effort should go into building, not passively discovering. Waiting for the wow effect is dangerous in two ways. First, it might never come if you only wait. Some potential stays hidden without the right context. Second, even when a loop forms easily, we underestimate the effort to sustain it. We believe having "gifts" is enough—and stop building.</p>
<p>So instead of waiting, we need to invest beforehand.</p>
<h2 id="heading-invest-first">Invest First</h2>
<blockquote>
<p>"Years into their work, they found something striking. They discovered that having a variant of a gene called 5-HTT does relate to becoming depressed. Yet there was a catch. We are all born with a genetic inheritance-but your genes are activated by the environment. They can be switched on, or off, by what happens to you. And Avshalom discovered-as Professor Robert Sapolsky explains-"that if you have a particular flavor of 5-HTT, you have a greatly increased risk of depression, but only in a certain envi- ronment." If you carried this gene, the study showed, you were more likely to become depressed-but only if you had experienced a terribly stressful event, or a great deal of childhood trauma. (They didn't test for most of the other causes of depression I've been talking about here, such as loneli- ness, so we don't know if they also interact with genes in this way.)”</p>
<p>J. Hari, Lost connections</p>
</blockquote>
<p>When I say "natural talent is a myth," people hear something I didn't say. They think I mean tabula rasa—a blank slate where everyone starts equal and anything is possible with enough effort.</p>
<p>That's a false distinction.</p>
<p>Natural abilities exist. But they're not binary—you either have it, or you don't. They're a spectrum. A range. Depending on how you actualize that range through practice and environment, you'll reach a specific destination. Your development is impacted by your genetic setup, but it's not fully determined by it.</p>
<p>Genes are activated by the environment. They can be switched on or off by what happens to you. The same applies to abilities: your genetic setup creates possibilities, but those possibilities need the right conditions to become real.</p>
<p>Here's the problem: we overestimate what we can see (early signs of genius, end product) and underestimate what we can't (context, environment, character, compounding effort). We want to believe that talented people have a self-expressed essence from the beginning. In reality, there was probably only a small seed.</p>
<p>When we see a genius—Mozart, Einstein, a Nobel laureate—we assume there was a kind of necessity in their life. That their essence was always there, and success was just its manifestation. Then we look at ourselves and don't see any genius spark. So we get discouraged.</p>
<p>But this is usually wrong. In the middle of their journey, they didn't see the light at the end of the tunnel either. You don't have to be filtered out just because you don't show early signs of brilliance. In complex domains, late success is often more common than early breakthroughs.</p>
<p>I explored this in my post about <a target="_blank" href="https://medium.com/@orzel.jarek/coming-out-of-the-shadows-how-karen-carpenter-developed-her-talent-bd449ae88bbd">Karen Carpenter</a>. Paul McCartney called her "the best female voice in the world." John Lennon stopped mid-stride just to praise her. The kind of voice people assume must be pure, god-given talent.</p>
<p>But nobody looking at fifteen-year-old Karen saw a future genius. That label was reserved for her brother Richard. She was in his shadow for years—trying instruments that didn't fit, failing a singing audition, being told she couldn't sing. She found drums first and became obsessed with them. The voice came later, shaped by a choir director named Frank Pooler who spotted something others had missed.</p>
<p>Natural abilities were there. But they didn't scream. They needed context, persistence, and the right people to emerge.</p>
<p>Frank Pooler heard potential where others heard nothing special. Without him, that voice might have stayed hidden. Sometimes you can't see your own potential—you need someone else to help uncover it. A coach, a mentor, a parent who creates opportunity. You don't have to do this alone.</p>
<p>So what should you do instead?</p>
<p>The question shouldn't be: "Do I have talent?" That question is unanswerable from where you stand. The better question is: "Can I set up an environment where I'll love to practice this activity?"</p>
<p>This reframing doesn't make things easy. The amount of effort required—even in a well-designed, supportive environment—can be immense. But it shifts your focus from speculation to action.</p>
<p>And maybe your aim shouldn't be genius anyway. Maybe a small improvement—being a better version of yourself after each iteration—is enough. We underestimate how far we can get by providing the right context and support. Compounding is real, but invisible until you're deep into the process.</p>
<p>The talent is not a fixed thing waiting to be discovered. It's dynamic—potentially both discovered <em>and</em> created. If you wait for the essence to express itself, you've already lost.</p>
<hr />
<h2 id="heading-the-pragmatic-approach">The Pragmatic Approach</h2>
<p>I once thought a lot about religious questions and came across William James's approach to religious belief. I liked it.</p>
<p>You cannot be sure whether God exists. The evidence isn't conclusive either way. You could spend your whole life waiting for certainty—or you could find a path where the question is suspended. A way to live meaningfully regardless of the answer.</p>
<p>This isn't blind faith. It's a pragmatic commitment. You act without knowing whether the path is right—and let the results provide you with some indication.</p>
<p>James's pragmatism asks: if two concepts lead to the same practical effects, are they really different concepts? What matters isn't abstract truth—it's what works.</p>
<p>I think a similar approach applies to talent.</p>
<p>You want to know whether you're talented before you commit. That's natural. In an ideal world, we'd have a genetic detector—sequence your genome, get an assessment, and make an informed choice. But that world doesn't exist. And even if it did, genes don't work that way. They're not deterministic blueprints. They're potentials that need activation.</p>
<p>So you're stuck with uncertainty. The common sense approach says: verify whether the essence exists, then commit. But that's backwards. It is an illusion you can verify without commitment. The information you need only emerges through action.</p>
<p>Here's what I find clarifying. Whether talent is mostly genetic, mostly environmental, or an interaction of both, the practical action is the same: create test conditions and observe what happens.</p>
<p>Three different theories. Identical practical action. From a pragmatic perspective, the nature vs. nurture debate is theoretically interesting but practically irrelevant. Asking whether Mozart's talent came from gifts or environment is an intellectual riddle. It doesn't help you decide whether to pursue music or engineering.</p>
<p>What does help is a different question: Can I create conditions that might reveal or build ability? And then: Did it work?</p>
<p>Here's the reframe that matters. From your perspective, these two statements are equivalent:</p>
<ol>
<li><p>"I don't have genetic gifts for music."</p>
</li>
<li><p>"I haven't created supporting contexts for musical development."</p>
</li>
</ol>
<p>Why equivalent? Because you can't distinguish between them without testing. And if testing reveals no progress, you still don't know which was true—you only know the combination didn't work.</p>
<p>So stop speculating. Start experimenting. The loop is your verification tool.</p>
<hr />
<h2 id="heading-the-limits">The Limits</h2>
<p>In my previous post, I also discussed when to persist and when to pivot. Here's the uncomfortable truth: there's no algorithm.</p>
<p>After everything I've said about testing, scaffolding, and iteration, you're left with a question that has no clean answer:</p>
<p><em>"I've tested sincerely for 18 months. Tried different approaches. Had proper instruction. The loop still isn't forming. Do I persist or pivot?"</em></p>
<p>This is where pragmatism meets its limits. And this is the most intellectually honest place to be uncomfortable.</p>
<p>The fundamental problem is simple. Persist too little, and you miss your true domain—a false negative. Persist too much, and you waste resources on the wrong path—opportunity cost. No external indicator tells you which mistake you're making.</p>
<p>Time-based rules don't work. "Try for 2 years then quit"—but what if the loop forms in month 25? Progress-based rules don't work. "If no progress in 6 months, quit"—but what if you're building foundations that pay off later? Enjoyment-based rules don't work. "If you don't enjoy it, quit"—but what about competence-first paths, like my own story with coding?</p>
<p>You're making a bet with incomplete information. Always.</p>
<p>Some signals suggest one more iteration might work: little progress visible, a specific diagnosis of why the loop isn't forming, interest still present even if not passionate, and external validation from someone credible. These aren't guarantees—they're probabilistic reads.</p>
<p>There are also signals that suggest it's time to pivot: zero progress despite multiple sincere attempts, active dread rather than just difficulty, massive effort for tiny gains compared to peers, and other domains showing dramatically better progress-per-effort.</p>
<p>But these are tendencies, not laws.</p>
<p>What makes it harder is that you have limited resources. Time, money, energy, opportunity cost. You can't test everything forever. Perfect testing would require unlimited resources. You don't have that. So you're optimizing under constraints—which means accepting imperfect information and making bets.</p>
<p>A few things help, even without certainty. Diversify early—test multiple domains before committing all resources to one hypothesis. Have clear iteration plans: "I'll try this approach for six months, then reassess." Seek external perspectives—coaches and mentors can see patterns you can't. And be honest about trade-offs: what are you giving up to persist here? What could you gain by pivoting?</p>
<p>None of this eliminates risk. But it's better than either premature quitting or indefinite flailing.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1767787970477/bcda6303-69b4-4862-97b4-006b7fcd3738.png" alt class="image--center mx-auto" /></p>
<p>source: <a target="_blank" href="https://x.com/freyaindiaa/status/2006064242877735261">https://x.com/freyaindiaa/status/2006064242877735261</a></p>
<p>We're bad at visualizing compounding. We overestimate the initial state and underestimate what accumulates over time. That's why we fixate on natural abilities—they're visible at the start. But the start isn't where the story ends.</p>
<p>Natural abilities matter. I've never denied that. They can provide more entry points to loops. They can make cycling faster. But they don't determine the outcome. Each development is constrained by where you begin—but it's not fully determined by it. The range is wider than you think.</p>
<p>The reframe I'm proposing isn't about denying reality. It's about teaching ourselves to put effort in the right place. Instead of speculating about essence, start building conditions. Instead of waiting for certainty, commit and observe.</p>
<p>This means committing to something you're not ready for. Like building a boat while you're already sailing.</p>
]]></content:encoded></item><item><title><![CDATA[Gateway Skills]]></title><description><![CDATA[How some activities are opportunity unlockers]]></description><link>https://jorzel.hashnode.dev/gateway-skills</link><guid isPermaLink="true">https://jorzel.hashnode.dev/gateway-skills</guid><category><![CDATA[skills]]></category><category><![CDATA[learning]]></category><category><![CDATA[Self Improvement ]]></category><category><![CDATA[personal development]]></category><dc:creator><![CDATA[jorzel]]></dc:creator><pubDate>Wed, 10 Dec 2025 10:03:13 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/zOhAH0M9QT0/upload/62fc01182ac28d6eefa2798e995eb4ea.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Skills are typically seen as isolated tools—you learn to swim, you can swim. You learn to drive, you can drive. The skill serves its purpose, and that's it.</p>
<p>But some skills don't just do their job. They unlock entirely new territories. They're not endpoints; they're enablers. I call them gateway skills.</p>
<p>Gateway skills are peculiar. They function as skills on their own, but they also influence other skills. They build bridges to paths you couldn't access otherwise. Reading, writing, drawing—these are the most striking examples.</p>
<p>However, a potential gateway skill only becomes an enabler through dense, sustained use. Knowing how to read isn't enough. You need to practice it a lot. Being a power user of a gateway skill isn't about amplifying the skill itself—it's about opening opportunities that remain locked without it. Side effects and byproducts start appearing. New doors reveal themselves.</p>
<h2 id="heading-reading-the-knowledge-opportunity">Reading: The Knowledge Opportunity</h2>
<p>Reading is the most powerful gateway skill. Not because reading itself is magical, but because of what it enables.</p>
<p>First, reading lets you learn almost anything without formal schooling. A programmer who reads voraciously—documentation, blogs, books—can outpace someone with a CS degree who doesn't. Reading unlocks access to expertise that would otherwise require expensive courses or mentors. It's the cheapest and most accessible path to knowledge.</p>
<p>Second, reading builds intuitions and cross-pollinates ideas. The more you read, the more mental models you accumulate. You develop pattern recognition, taste, judgment—things that can't be taught directly but emerge from exposure. Darwin read geology, economics (Malthus), and biology—and that <a target="_blank" href="https://friendsofdarwin.com/articles/darwin-reads-malthus/">cross-disciplinary reading led to evolution theory</a>. Reading across domains lets you import concepts and see connections others miss. Innovation often comes from combining ideas from unrelated fields, and reading is the primary vehicle for that.</p>
<p>But here's the thing: none of this works unless you enter the loop.</p>
<p>I'm a strong proponent of starting with anything that brings you enjoyment. Crime novels, Harry Potter, whatever hooks you. The genre doesn't matter at the beginning—what matters is building the habit, finding pleasure in the act itself. I started with crime fiction and fantasy. Then classical novels. Now I read mostly non-fiction. But the progression only happened because I first entered the loop.</p>
<p>The Polish author Szczepan Twardoch once argued that the positive effects of reading are exaggerated. That we can find equally good sources of cultural development elsewhere. Watching a good TV show beats reading a poor book. In some ways, he's right. But this misses the point. When you treat reading as an enabler—a tool that pulls you toward more knowledge—the comparison falls apart. We need reading, and we need enjoyment in reading, to reach something bigger than reading itself. Reading becomes a vehicle, not a destination.</p>
<h2 id="heading-writing-and-drawing-gateways-to-understanding">Writing and Drawing: Gateways to Understanding</h2>
<p>Writing and drawing are often seen as communication tools—ways to express what you already know. But their deeper power lies elsewhere. They're tools for thinking itself.</p>
<h3 id="heading-writing-as-thinking">Writing as Thinking</h3>
<p>Writing isn't primarily about putting thoughts on paper. It's about discovering what your thoughts actually are. The process exposes gaps in your thinking like nothing else. Until you write your ideas down, you're usually convinced they're consistent and logical. But when you start writing, you see how many things are unclear, how many concepts need refining, how many holes need filling.</p>
<p>As Paul Graham put it in <a target="_blank" href="https://paulgraham.com/words.html">"Putting Ideas into Words"</a>: writing about something, even something you know well, usually shows you that you didn't know it as well as you thought. Putting ideas into words is a severe test.</p>
<p><img src="https://pbs.twimg.com/media/GWO8z_zaIAEUq8n?format=jpg&amp;name=900x900" alt="Zdjęcie" /></p>
<p>source: <a target="_blank" href="https://x.com/LibraryPath/status/1829513503763472650/photo/1">X.com</a></p>
<p>This is why writing clarifies. It forces you to confront the mess in your head and turn mental clutter into clarity. Journaling can process emotional turmoil. Technical writing can untangle complex problems. The cognitive work happens in the act of articulating.</p>
<h3 id="heading-drawing-as-understanding">Drawing as Understanding</h3>
<p>Drawing works similarly, but through the hand and eye. It's a tool for understanding, visualizing, and explaining complex things.</p>
<p>Santiago Ramón y Cajal, the father of modern neuroscience, loved art from the very beginning. He had no early inclination toward science. But his drawing ability provided scaffolding for everything that came later. When he learned anatomy, he drew bones. When he analyzed histological material, he visualized it through sketches. Drawing was a tool that gave him a helpful hand whenever he got stuck.</p>
<p>Cajal's ability to draw opened doors. It was a perfect match of supply and need—he was immersed in microscopy, anatomy, and histology, and drawing became his trampoline to understand complex biological structures. The skill that seemed basic became the enabler of his scientific breakthroughs. He believed in a simple motto: "drawing develops understanding."</p>
<p>Both writing and drawing share this quality: they seem like output skills, but they function as input skills. They don't just express understanding—they create it.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>Gateway skills share a pattern: they seem basic, they require dense practice to become enablers, and they produce cascading effects that extend far beyond the skill itself.</p>
<p>The mistake is to see these skills as paths to obvious vocations—writer, critic, artist. That's narrow thinking. The real power of gateway skills is that they enable everything <em>else</em>. A scientist who writes thinks more clearly. An engineer who sketches understands systems better. A manager who reads widely makes better decisions. Gateway skills aren't about becoming a professional in that skill. They're about using the skill as a lever for whatever you actually do.</p>
]]></content:encoded></item><item><title><![CDATA[Coming Out of the Shadows. How Karen Carpenter Developed Her Talent]]></title><description><![CDATA[Karen Carpenter. One of the most gifted singers in history. And perhaps the strongest case against everything I've written about talent. Or maybe not.]]></description><link>https://jorzel.hashnode.dev/coming-out-of-the-shadows-how-karen-carpenter-developed-her-talent</link><guid isPermaLink="true">https://jorzel.hashnode.dev/coming-out-of-the-shadows-how-karen-carpenter-developed-her-talent</guid><category><![CDATA[Biography]]></category><category><![CDATA[personal development]]></category><category><![CDATA[Personal growth  ]]></category><category><![CDATA[Self Improvement ]]></category><category><![CDATA[music]]></category><dc:creator><![CDATA[jorzel]]></dc:creator><pubDate>Fri, 05 Dec 2025 21:00:26 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1764968327326/abbb9917-6b69-4bd8-8b21-d83b0cb942ab.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><img src="https://upload.wikimedia.org/wikipedia/commons/5/55/Karen_Carpenter_on_drumkit.jpg" alt class="image--center mx-auto" /></p>
<p>source: <a target="_blank" href="https://en.wikipedia.org/wiki/Karen_Carpenter#/media/File:Karen_Carpenter_on_drumkit.jpg">Wikipedia</a></p>
<h2 id="heading-the-challenge">The Challenge</h2>
<p>In <a target="_blank" href="https://medium.com/@orzel.jarek/the-myth-of-natural-talent-ac74787f5826">one of my posts about talent</a>, a reader posed what appeared to be a definitive counterexample to my argument.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1764967887286/ced6b221-8ef6-4308-9aba-e6c93655dbf7.png" alt class="image--center mx-auto" /></p>
<p>My first instinct wasn't to argue. It was to investigate. Maybe I'm wrong. Maybe this really is the purest example of inborn talent—a voice so extraordinary that no amount of practice or environment could explain it.</p>
<p>So I started digging. And the first thing I found was the praise.</p>
<p>Paul McCartney called her "the best female voice in the world: melodic, tuneful and distinctive." [1]</p>
<p>John Lennon, walking into a Los Angeles restaurant, stopped mid-stride to say: "I want to tell you, love, that you've got a fabulous voice." [2]</p>
<p>Elton John said she had "one of the greatest voices of our lifetime." [3]</p>
<p>Two Beatles. Elton John. Not casual compliments—declarations. The kind of praise that builds legends.</p>
<p>When giants of music speak like this about someone, it's easy to conclude the debate is over. This must be pure, undeniable, god-given talent. What else could explain a voice that made McCartney, Lennon, and Elton John pause in awe?</p>
<p>Karen Carpenter. One of the most gifted singers in history. And perhaps the strongest case against everything I've written about talent.</p>
<p>Or maybe not.</p>
<h2 id="heading-a-girl-in-the-shadows">A Girl in the Shadows</h2>
<p><img src="https://m.media-amazon.com/images/I/81SVGSc1+sL._SY522_.jpg" alt="Lead Sister: The Story of Karen Carpenter" class="image--center mx-auto" /></p>
<p>source: <a target="_blank" href="https://www.amazon.com/Lead-Sister-Story-Karen-Carpenter/dp/153818446X">Amazon.com</a></p>
<p>Karen's musical world developed in a basement.</p>
<p>Her father Harold had turned the cellar into a space for the kids—but more importantly, it housed his record collection. Classical, jazz, swing, novelty acts. Everything from Rachmaninov to Spike Jones. For Karen and Richard, this basement was where music lived.</p>
<p>Karen's brother Richard, four years older, was obsessed with music. He listened constantly, dissecting arrangements, gravitating naturally toward the piano. At eight, he started lessons—though his first teacher was so rigorous he sucked the joy out of playing. Richard quit. Three years later, they found Will, a teacher whose approach clicked. Richard flourished, eventually enrolling at Yale Music School.</p>
<p>The family always saw Richard as the talented one. The one destined to be a musician.</p>
<p>Karen was more in the shadows.</p>
<blockquote>
<p>"Richard was the family prodigy and, despite her enthusiasm for music, Karen's gift wasn't acknowledged and she was relegated to little sister, following in his shadow." [4]</p>
</blockquote>
<p>She idolised her brother, spending hours with him dancing and listening to records, singing along to melodies. But while Richard was consumed by music, Karen's world didn't end there. A self-declared tomboy, she liked baseball, enjoyed wrestling, and acrobatics. She experimented with different things—ballet lessons, multiple instruments. Nothing really stuck. She showed no outstanding musical gifts.</p>
<p>And yet, she was always in the vicinity of music. An active listener, absorbing every melody she heard.</p>
<h2 id="heading-finding-the-drums">Finding the Drums</h2>
<p>When Karen was thirteen, the family moved from New Haven to Downey, California. New environment, new opportunities. The move was largely to support Richard's musical career—more favouritism toward the prodigy. For Karen, it was harder. She was growing into an awkward teenager, reluctant to participate at school. Her obsession with sports waned. It was a tough time.</p>
<p>Richard joined the school band and a jazz group, encouraged by his teachers. Karen wanted to follow her brother. She tried the flute. Accordion. Abandoned both.</p>
<blockquote>
<p>"While Richard's musical ambition was steadily progressing, Karen was struggling to find her feet, recalling later that 'junior high was a waste and I didn't do much of anything in music until I was sixteen.'" [4]</p>
</blockquote>
<p>She was allowed to join the high school marching band, at first given a position banging a mallet on the glockenspiel. After several trials and failures with different instruments, she finally found her place: drums. The first girl in the band plays them.</p>
<p>And something clicked.</p>
<p>In contrast to every other instrument she'd tried, Karen became obsessed with drums. She practiced for hours every day. Drummers like Buddy Rich and Louie Bellson became her heroes—masters of speed and technique. She studied Joe Morello's cymbal work in the Dave Brubeck band, practicing relentlessly until her fingers were raw, determined to match what she heard on records.</p>
<blockquote>
<p>"Finding the drums was, for Karen, a liberation... It was a visceral outlet for those difficult teenage feelings, a way to fully express herself and carve out her own identity. She had the sense of being, as she described it, 'safe and lost' while marching on the football field, tuning out any thoughts of fear or anxiety by engrossing herself in the music." [4]</p>
</blockquote>
<p>Two months in, she wanted a full show kit—silver sparkle double floor tom-toms, the whole thing. She had finally found something she loved doing. Something that was hers.</p>
<p>But singing? That came later. And the first attempts were disappointing.</p>
<blockquote>
<p>"Karen wanted to try singing. Her high-school friend Corey Christensen had a band called Knights of the Sun who were looking for a vocalist, so she auditioned. She didn't get the job and was told that she couldn't sing. The sweet irony of that was not lost on Christensen when, five years later, the Carpenters became famous." [4]</p>
</blockquote>
<p>In the mid-1960s, Karen had yet to discover her deeper voice. "I used to sing in this upper voice and I didn't like it," she said. "I was uncomfortable." [4]</p>
<p>She decided to stick to the drums, joining an all-girl surf band.</p>
<p>The tipping point came later, when she met Frank Pooler.</p>
<h2 id="heading-the-voice">The Voice</h2>
<p>Richard was searching for a voice.</p>
<p>He had compositions, arrangements, a clear vision for the sound he wanted. What he needed was someone who could deliver it. He introduced Karen to his choir director at Cal State Long Beach—a man named Frank Pooler.</p>
<p>It was a turning point.</p>
<blockquote>
<p>"Behind every great artist there is the unsigned manuscript of a great teacher, and Frank Pooler was that teacher." [4]</p>
</blockquote>
<p>Pooler was both terrifying and nurturing. On Saturday mornings, he taught Karen classical lieder—Beethoven, Schumann—while also letting her sing pop, pushing her to expand her range. As her confidence grew, Richard began coaxing her to sing lead while still playing drums.</p>
<p>Many assume Karen's voice emerged fully formed. It didn't. What we hear in the Carpenters' sound carries Pooler's fingerprints everywhere.</p>
<p>He favored a tone that was straight, without much vibrato, pitched slightly high. "Being sharp is a little bit arrogant," he'd say. He demanded brightness—warm-ups focused on vowels that rang clear and cut through. That signature Carpenters sound, the unified background vocals, the precision? That came from Frank.</p>
<p>Pooler himself analyzed their technique in a 1973 article for the Choral Journal, praising their "knife-edged, razor sharp" vowel pronunciation—vocal control that created "an absolutely unified sound... from a soft to a dynamic level." [4]</p>
<p>Karen was enthralled. She followed Richard to Cal State to study music, largely because of Pooler's teaching. Academic study didn't hold her attention—she skipped classes and was eventually suspended in 1968. But Pooler's lessons stuck.</p>
<blockquote>
<p>"Frank Pooler is a genius with vocals, just a genius. There are certain choirs where you have eighty people and it sounds like eighty people yelling... but Pooler's thing is to make eighty sound like one." [4]</p>
</blockquote>
<p>She absorbed everything he offered: the varied repertoire, the precise pitching, the complex harmonics, the strength of voice. Her time at Cal State was short, but formative. The raw material was there. Pooler helped shape it into something extraordinary.</p>
<p>The voice was forming. But what was driving it?</p>
<h2 id="heading-immersion-and-identity">Immersion and Identity</h2>
<p>Alain de Botton, in conversation with Chris Williamson, described talent as something built from scattered elements. Not a gift you unwrap, but fragments you gather. The question isn't "What am I talented at?" but "How do I want to express myself in the world?"</p>
<p>Your true self, de Botton suggests, is shattered—and needs to be found and assembled.</p>
<p>For Karen Carpenter, the answer was music. Drums first, then singing. But she didn't arrive there quickly. She searched for years—ballet, baseball, glockenspiel, flute, accordion—before something finally fit.</p>
<p>Talent development, in her case, was a byproduct. The primary work was building an identity. Finding her way in the world.</p>
<p>I don't believe we're wired for specific destinations. But abilities and temperament do drag us toward certain activities. Near those activities, we feel closer to our vision of ourselves. In that sense, we have predispositions—not fixed fates, but gravitational pulls.</p>
<p>And yet, I also believe that the right context can switch the path. Rewire initial settings. Karen's story shows both sides of this.</p>
<p>When she found drums, she found herself. The instrument wasn't just something she played—it was how she expressed who she was. Behind the kit, she felt safe. Independent. Whole.</p>
<p>But as the Carpenters rose—hit after hit climbing the Billboard charts, a Grammy Awards, global recognition—the pressure mounted. It came from managers, from the industry, from the logic of marketability. A woman behind the drums didn't fit the image. A frontwoman—vulnerable, visible, center stage—that was what sold records. Karen was pushed to leave the drums and focus on singing.</p>
<blockquote>
<p>"Karen, however, was deeply reluctant to abandon the drums; they were part of her persona, her primary means of expression as a musician." [4]</p>
</blockquote>
<p>In her insecurity, she read the message as: I'm not good enough as an instrumentalist.</p>
<p>For someone who had built her identity around that instrument—who felt "safe and lost" behind the kit—this was more than a career adjustment. It was an unraveling.</p>
<p>Without drums, Karen felt insecure. The frontwoman role never fit comfortably. She had found her way to express herself, and now she was being asked to abandon it for something more sellable.</p>
<h2 id="heading-what-her-story-teaches-us">What Her Story Teaches Us</h2>
<p>When you listen to Karen Carpenter, you hear the end product. The voice that made Paul McCartney and John Lennon pause. The sound that seems to arrive fully formed, effortless, divine.</p>
<p>You don't see the path.</p>
<p>A girl in her brother's shadow. Years of trying instruments that didn't fit. A failed singing audition. Thousands of hours behind a drum kit. A choir teacher who spotted something others missed. And underneath it all, a relentless need to express herself through music.</p>
<p>We are structurally unable to imagine the process beneath the outcome we see. When we witness something extraordinary, we assume it was always there—waiting to emerge, inevitable, destined. An inner gift working its magic.</p>
<p>But nobody looking at fifteen-year-old Karen saw a future genius. That label was reserved for Richard. The greatness we see now wasn't predictable then.</p>
<p>This is the trap of retrospective analysis. From hindsight, one can say Karen had a specific essence, a unique gift. And that's probably true—she <em>was</em> unique. But it's an analysis that only works backwards. We bend facts, forget failures, and see life through the lens of eventual success.</p>
<p>The prospective view looked completely different.</p>
<p>And this matters. Because the question we actually face—"Should I persist in this domain?"—is always prospective. We don't get to know the ending before we write the story. We need a framework for decisions made in uncertainty, not explanations constructed after the fact.</p>
<p>So what does Karen's story actually teach us?</p>
<p><strong>Environment matters, but it's not enough.</strong> Karen was surrounded by music from early childhood. Records in the basement. A brother obsessed with the piano. Constant exposure to melodies and arrangements. This environment created possibilities—but it didn't guarantee anything. Lots of people grow up around music and never develop. You need to accept the environment, enjoy it somehow, and feel it making you grow.</p>
<p><strong>Trial and error is the path, not the obstacle.</strong> Karen tried many things before something stuck. She failed a singing audition. She spent years as a drummer before anyone recognized her voice. We idealize talent as a path of successes. Usually, the opposite is true—a sequence of failures treated as information, directing further progress.</p>
<p><strong>The driving force is powerful.</strong> What made Karen different wasn't a gift handed to her. It was her need to express herself through music. This inner drive kept her immersed, practicing, searching. In my previous post, I described talent as a loop—enjoyment leads to practice, practice builds competence, competence creates confidence, and confidence deepens enjoyment. But what ignites that loop? Often, it's exactly this: a deep need to express yourself through a craft. The question isn't whether you have talent—it's whether you can discover or create the drive that keeps you obsessed. And that's not magic. It's temperament, character, and life experience colliding in the right way.</p>
<p><strong>Stay in the game and keep probing.</strong> Karen tried many instruments, but she never left the music world. She stayed close to the domain, gathering feedback, adjusting. Like children raised in houses full of books who become readers—not because of genes, but because reading is simply part of their environment. Proximity matters. Persistence within that proximity matters more.</p>
<p><strong>Scaffolding from the right people can change everything.</strong> Frank Pooler heard something in Karen that others missed. Richard created opportunities for her voice to emerge. Sometimes you need someone else to see your potential before you can see it yourself. Sometimes you need the right context to click.</p>
<p>When you read comments under the Carpenters’ songs, people underscore Karen's unique and beautiful voice. It must be a gift, they say. It must be inborn.</p>
<p>But she put immense work into making it sound that way.</p>
<p>Natural abilities were there—I don't want to deny that. But for me, the crucial elements were different: the constant immersion in music from her earliest days, the self-driving force to express herself, the trial and error that eventually landed on drums and then voice, and the people who helped her find what was already forming inside her.</p>
<p>Karen Carpenter came out of the shadows—but not from nowhere.</p>
<h2 id="heading-postscript">Postscript</h2>
<p>Sometimes the very traits that drive success become the source of destruction.</p>
<p>Karen's perfectionism, her relentless drive, her need to express herself flawlessly—these qualities shaped her extraordinary voice. But they also turned inward. The same striving for perfection that made her rehearse until every note was right made her scrutinize her own body with devastating intensity.</p>
<p>She developed anorexia nervosa. The disease consumed her throughout her years of fame, hidden behind the spotlight, worsening even as the Carpenters dominated the charts.</p>
<p>On February 4, 1983, Karen Carpenter died of heart failure caused by her illness. She was thirty-two years old.</p>
<p>Her potential was never fully realized. The voice that McCartney called the best in the world was silenced far too early. We're left with what she created in barely a decade of recording—and the haunting question of what more she might have become.</p>
<p>The same intensity that builds greatness can destroy the person who carries it. Karen's story isn't just about how talent develops. It's also a reminder that the forces driving us forward don't always know when to stop.</p>
<h2 id="heading-references">References</h2>
<p>[1] NPR, "Remembering Karen Carpenter, 30 Years Later" (2013) - <a target="_blank" href="https://www.npr.org/2013/02/04/171080334/remembering-karen-carpenter-30-years-later">https://www.npr.org/2013/02/04/171080334/remembering-karen-carpenter-30-years-later</a></p>
<p>[2] BBC documentary "Only Yesterday: The Carpenters Story", recounted in Far Out Magazine - <a target="_blank" href="https://faroutmagazine.co.uk/the-singer-paul-mccartney-called-the-best-female-voice-in-the-world/">https://faroutmagazine.co.uk/the-singer-paul-mccartney-called-the-best-female-voice-in-the-world/</a></p>
<p>[3] Wikipedia, "Karen Carpenter" - <a target="_blank" href="https://en.wikipedia.org/wiki/Karen_Carpenter">https://en.wikipedia.org/wiki/Karen_Carpenter</a></p>
<p>[4] <a target="_blank" href="https://www.amazon.com/Lead-Sister-Story-Karen-Carpenter/dp/153818446X">Lucy O'Brien, "Lead Sister: The Story of Karen Carpenter"</a> (2023)</p>
]]></content:encoded></item><item><title><![CDATA[What Does It Mean to Accept Emotions?]]></title><description><![CDATA["Accept your emotions" is good advice - but only if you understand what acceptance actually means. It's not validation or reinforcement.]]></description><link>https://jorzel.hashnode.dev/what-does-it-mean-to-accept-emotions</link><guid isPermaLink="true">https://jorzel.hashnode.dev/what-does-it-mean-to-accept-emotions</guid><category><![CDATA[psychology]]></category><category><![CDATA[personal development]]></category><category><![CDATA[Personal growth  ]]></category><category><![CDATA[Life lessons]]></category><category><![CDATA[#emotional intelligence]]></category><dc:creator><![CDATA[jorzel]]></dc:creator><pubDate>Thu, 27 Nov 2025 12:28:51 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1764246393511/762a8c9e-f8c1-472f-9d13-5dbdb9ed222e.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>"Accept your emotions." You've probably heard this advice a hundred times. It sounds simple enough. But the more I've thought about it, the more I've realized that depending on how we understand the word "acceptance," it can mean very different things. And some of those meanings can actually backfire.</p>
<p>I've been exploring this question through two books that approach it from completely different angles: <a target="_blank" href="https://www.amazon.com/Do-Hard-Things-Resilience-Surprising/dp/006309861X">Do Hard Things</a> by Steve Magness (sports psychology) and <a target="_blank" href="https://www.amazon.com/Why-Buddhism-True-Philosophy-Enlightenment/dp/1439195463">Why Buddhism Is True</a> by Robert Wright (evolutionary psychology meets Buddhist practice). What surprised me is how their strategies converge on something universal - and how easy it is to get it wrong.</p>
<h2 id="heading-the-problem-with-popular-advice">The Problem with Popular Advice</h2>
<p>Here's my concern: Does emotional intelligence make the ego larger?</p>
<p>When we engage with emotions and start to identify with them, they become part of our identity. Feel sad, and you become a sad person. Feel anxiety, and you become an anxious person. Our self expands to include these emotional states as core features of who we are.</p>
<p>So I should accept emotions to not avoid or suppress them - that much is clear. But should I engage? Should I cling to the emotion?</p>
<p>What about labeling? This is where it gets tricky. Proper naming can allow us to find better solutions. If I feel anger, maybe I should go for a walk. If I feel disappointment, I need to rethink my decision or situation. However, the more judgment involved in that labeling, the higher the likelihood of rumination. Labeling can become a door to endless analysis, to building stories around the feeling, to making it more solid than it needs to be. Maybe I wasn't sad but just tired. Maybe I wasn't anxious but just unprepared.</p>
<p>This is the trap. On one side, there's suppression and avoidance - pretending emotions don't exist. On the other hand, there's reinforcement and clinging - where emotions become your identity. Both paths lead somewhere you don't want to go.</p>
<p>I think the intention behind "acceptance" is not to suppress or avoid emotions but rather to accept that they are there. However, we still need to analyze them, observe them to improve our responses and behavior. The question is: how do we do this without reinforcing them?</p>
<h2 id="heading-the-common-ground-space-between-stimulus-and-response">The Common Ground: Space Between Stimulus and Response</h2>
<p>Both Magness and Wright arrive at the same fundamental insight: create space between stimulus and response. This space allows us to evaluate reality and respond thoughtfully instead of reacting immediately.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1764245551054/7760fe55-90a1-48ab-9385-eecc0cb5b864.png" alt class="image--center mx-auto" /></p>
<p>Feelings and emotions are real, but they are not truths written in stone. They can be false - not aligned with reality - and also not good for us. This distinction matters. Something can be real (you genuinely feel it) without being true (an accurate reflection of what's actually happening).</p>
<p>Emotions bias us toward a particular response, but they don't control us. They're meant to inform and nudge us. Think of them as alarm bells signaling that something needs attention or change. Feelings are predictive, not reactive - they hint at not only our current state but also our capacity.</p>
<p>The key insight: feelings should not be overcome. They should be interpreted correctly.</p>
<h2 id="heading-the-sports-psychology-perspective">The Sports Psychology Perspective</h2>
<blockquote>
<p>"When Young and colleagues compared those who had a history of self-harm to a control group, the self-harm subjects were more aware of their feelings and sensations, but they performed worse on the interoceptive task. They felt more, but couldn't distinguish or interpret what these signals meant. As the authors concluded, self-harm 'may serve to resolve the resulting state of emotional and interoceptive uncertainty associated with the body's function in emotional experience.'"</p>
<p>Steve Magness, Do Hard Things</p>
</blockquote>
<p>Steve Magness makes a compelling case that real toughness isn't about ignoring difficulty. A key component of real toughness is acknowledging when something is hard, not pretending it isn't.</p>
<p>The more robust individuals are, the more accurately they describe what they encountered. They are not detached from reality when they encounter stressful situations. This alignment with reality - what Magness calls a quiet ego, a flexible sense of self - is what separates those who thrive under pressure from those who break.</p>
<p>Here's something crucial: signals don't provide meaning on their own. Our judgments and interpretations set meaning. How we respond is malleable. We can reframe the signal as helpful information rather than a threat. The emotion says "pay attention" - but we decide what that attention looks like.</p>
<p>The neuroscience backs this up. Monks and yoga masters show lower amygdala response, plus higher control from the prefrontal cortex. People with burnout show the opposite pattern. Expert meditators demonstrate change in biology, not only psychology. This isn't just about thinking differently - it literally rewires the brain over time.</p>
<p>The amygdala acts as an alarm bell. In a healthy response, there's an initial spike due to a stressor and then a return to baseline after several seconds. But prolonged amygdala recovery - what's called affective inertia - represents an inability to let go of emotions. You get stuck. The alarm keeps ringing long after the threat has passed. This is what we want to avoid.</p>
<p>So what's the practical advice? Put yourself in uncomfortable situations and collect experiences without judging. Name emotions with clarity but without excessive elaboration. Reframe the signal as helpful information. And remember - ignoring, avoiding, and suppressing usually backfire.</p>
<h2 id="heading-the-buddhistevolutionary-perspective">The Buddhist/Evolutionary Perspective</h2>
<p>Robert Wright approaches the same problem from evolutionary psychology. His starting point is sobering: we're operating in an environment we weren't designed for. Our emotional reactions evolved for a different world, so our feelings are often not proper guides to reality.</p>
<p>Wright mentions a framework called RAIN: Recognize, Accept, Investigate, Non-attachment. Each step matters, but the crucial part is that last one. Recognize but don't attach. This is the difference between noticing anger and becoming an angry person.</p>
<p>Feelings are judgments about how things relate to us. You should accept feelings, but do not reinforce them or the judgments they carry. Wright puts it beautifully: Dampening of feelings is clarity of vision. When the emotional noise quiets down, you see more clearly.</p>
<blockquote>
<p>"I then babbled a little about how, if you're seriously pursuing liberation, and trying to divorce yourself from cravings and aversions the most of us have, then naturally things in the world wouldn't have strong emotional connotations, and that might be part of your perception that they lack essence."</p>
<p>Robert Wright, Why Buddhism Is True</p>
</blockquote>
<p>Buddhism offers the concept of no-self or emptiness - no strong identification with a feeling. This isn't about becoming emotionless. It's about not building a theory or narrative around every emotional experience. We tend to construct stories: why we feel this way, what it means about us, what we should do about it. These expectations and judgments block a clear perception of reality.</p>
<p>The essence or story we construct has a real impact. Desire and cravings feel intrinsic to self-experience, but creating distance between yourself and the thing weakens desire. Wright asks a provocative question: unless I identify fully as a self, how could I care whether my desires are fulfilled? The attachment to outcomes is tied to attachment to identity.</p>
<p>This reframes self-discipline entirely. It's not about fighting with addictive thoughts but examining them through mindfulness meditation. You make feelings less powerful by putting them under observation. Subject your feelings to investigation - not to build a case, but to see them clearly.</p>
<p>We don't have direct access to reality - we construct the world we know. In meditation, the structure you impose can fade away. The interpretation that constructs structure and meaning loosens its grip. What remains is clearer, less cluttered by the stories we tell ourselves.</p>
<h2 id="heading-the-universal-strategy-neither-suppress-nor-cling">The Universal Strategy: Neither Suppress Nor Cling</h2>
<p>Imagine you're passed over for a promotion. Feel disappointment (recognition). Don't pretend you're fine (not suppression). But also don't start building the story of 'I'm someone who always gets overlooked' (not clinging).</p>
<p>So what's the actual practice? How do we avoid emotion reinforcement while "accepting" them?</p>
<p>The answer is space and distance versus attachment. Sometimes it's better to observe an emotion without labeling it precisely. Be non-judgmental in your investigation. Separate experience from evaluation and judgment. The feeling is there - you don't need to immediately decide what it means or what you should do about it.</p>
<p>How do you know if you're reinforcing rather than regulating? Watch for the signs. Are emotions becoming part of your identity? Are you stuck in rumination cycles, going over the same ground repeatedly? Do you experience affective inertia - an inability to return to baseline long after the trigger has passed? These are signals that acceptance has slipped into clinging.</p>
<p>Can we have a healthy identity and still maintain distance from feelings? I believe yes. It requires what Magness calls a quiet ego and a flexible sense of self. You can acknowledge who you are without making every passing emotion a permanent feature of that identity.</p>
<p>True emotion regulation means creating space for reality-aligned responses. Accept that emotions are there. Don't suppress them. But don't cling to them either. Don't let them expand your ego or become your identity.</p>
<p>This brings us back to where we started. "Accept your emotions" is good advice - but only if you understand what acceptance actually means. It's not validation. It's not reinforcement. It's not building emotions into your sense of self. It's acknowledging their presence while maintaining enough distance to respond rather than react.</p>
]]></content:encoded></item><item><title><![CDATA[Oh My Claude! How Software Development Is Changing with Agentic Coding]]></title><description><![CDATA[After spending time with CLI tools like Copilot CLI and Claude Code, I began to see genuine potential.]]></description><link>https://jorzel.hashnode.dev/oh-my-claude-how-software-development-is-changing-with-agentic-coding</link><guid isPermaLink="true">https://jorzel.hashnode.dev/oh-my-claude-how-software-development-is-changing-with-agentic-coding</guid><category><![CDATA[AI]]></category><category><![CDATA[ai agents]]></category><category><![CDATA[software development]]></category><category><![CDATA[Software Engineering]]></category><category><![CDATA[General Programming]]></category><dc:creator><![CDATA[jorzel]]></dc:creator><pubDate>Tue, 25 Nov 2025 12:57:19 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/yLcK3Itx6ok/upload/d67760365a3c8b1305d0bc2766d3096d.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Recently, the phrase "vibe coding" has gained popularity. It sounds fun — describe what you want, let the AI figure it out, and ship. But here's the uncomfortable truth: vibe coding without understanding what's happening under the hood is an irresponsible way to build software. You might get something working fast, but maintaining it? Good luck.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1764074571114/6753343b-bad7-478c-bb69-b351d6296748.png" alt class="image--center mx-auto" /></p>
<p>source: <a target="_blank" href="https://x.com/karpathy/status/1886192184808149383">https://x.com/karpathy/status/1886192184808149383</a></p>
<p><a target="_blank" href="https://simonwillison.net/2025/Oct/7/vibe-engineering/">Simon Willison coined a more thoughtful approach</a> in his concept of "vibe engineering" — using AI to build software faster while maintaining a deep understanding of what's being built and how to sustain it long-term. This distinction matters more than ever as agentic coding tools reshape our daily work.</p>
<p>I was skeptical at first. Another shiny tool promising to revolutionize development? I'd seen enough hype cycles. However, after spending time with CLI tools like Copilot CLI and Claude Code, I began to see genuine potential. Not the "AI will replace developers" kind of potential, but something more nuanced: a new way of working that requires us to think differently about our craft.</p>
<h2 id="heading-the-declarative-shift">The Declarative Shift</h2>
<p>What makes agentic coding different from simple code completion? The fundamental shift is declarative problem-solving. You describe what you need: "Here's my codebase, here's a bug, please fix it." The agent enters a loop — researching, implementing, validating against tests — until it arrives at a solution.</p>
<p>This is a departure from the imperative style, where you write every line yourself. It's closer to how senior engineers delegate to juniors: you describe the outcome, provide context, and let them figure out the path. The difference? The agent never gets tired, never forgets the spec, and can iterate at machine speed.</p>
<p>The tools are evolving rapidly. <a target="_blank" href="https://www.claude.com/product/claude-code">Claude Code</a> was released in February 2025, followed by <a target="_blank" href="https://github.com/google-gemini/gemini-cli">Gemini CLI</a> and <a target="_blank" href="https://github.com/openai/codex">Codex API</a> in the spring. The pace of change is staggering. Maybe we should wait and see what sticks? Perhaps. But ignoring this shift entirely feels like ignoring version control in the early 2000s.</p>
<h2 id="heading-does-it-actually-make-us-better">Does It Actually Make Us Better?</h2>
<p>Here's the question everyone asks: Are we more effective with these tools? Or just faster? Or neither?</p>
<p>The research is starting to come in. <a target="_blank" href="https://softwareengineeringproductivity.stanford.edu/">Stanford's Software Engineering Productivity group</a> has been tracking real-world outcomes, and the results are nuanced. Context matters enormously.</p>
<ul>
<li><p><strong>Codebase size</strong>: The larger and more complex your codebase, the harder it is for LLMs to navigate effectively. They struggle with intricate dependency chains and implicit architectural decisions that experienced developers understand intuitively.</p>
</li>
<li><p><strong>Language popularity</strong>: More common languages mean more training data. If you're working in Python or JavaScript, expect better support than if you're in Elm or Haskell.</p>
</li>
<li><p><strong>Complexity and field maturity</strong>: Greenfield projects in well-established domains? Agents excel there. Brownfield work in complex legacy systems? Much harder. The agent doesn't know why that weird workaround exists or what breaks if you touch that ancient module.</p>
</li>
</ul>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1764074675708/015a542a-848e-4175-9443-d68d632b014b.png" alt class="image--center mx-auto" /></p>
<p>source: <a target="_blank" href="https://www.youtube.com/watch?v=tbDDYKRFjhk">https://www.youtube.com/watch?v=tbDDYKRFjhk</a></p>
<p>For straightforward tasks—writing boilerplate, generating tests, scaffolding new features—the productivity gains are real. I've seen what would take hours compressed into minutes. But for truly complex problems, agents still need significant human guidance.</p>
<h2 id="heading-the-real-challenges">The Real Challenges</h2>
<p>I care about code quality. Proper logging, meaningful metrics, comprehensive tests — these aren't optional for me. So how do agentic tools fit into that picture?</p>
<p>Here's what I've discovered: you can drive agents toward quality, but it requires effort. Using <a target="_blank" href="https://github.com/jorzel/claude-vibes/tree/main/.claude">specification files</a>, I've been able to guide Claude to follow code style requirements and testing standards. With some iteration, it produced comprehensive services with proper observability—logging, metrics, unit tests, and integration tests. When something was missing, I could point it out and get corrections.</p>
<p>For what would have been two hours of manual work, the efficiency gains were substantial. But here's the catch: this wasn't magic. I had to know what good code looks like to recognize when the output fell short. I had to understand testing patterns to specify what I wanted. The agent amplified my expertise; it didn't replace it.</p>
<p>So how do you excel even in difficult conditions — large codebases, complex tasks, brownfield projects?</p>
<ul>
<li><strong>Context management is everything</strong>. Proper spec files are crucial. The less irrelevant context the agent has to process, the better its outputs. This isn't simple prompt engineering; it's a new discipline. You need to understand your codebase deeply to provide effective guidance.</li>
</ul>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1764074786635/39c800ce-5c36-4384-b896-bd1b34522884.png" alt class="image--center mx-auto" /></p>
<p>source: <a target="_blank" href="https://www.youtube.com/watch?v=tbDDYKRFjhk">https://www.youtube.com/watch?v=tbDDYKRFjhk</a></p>
<ul>
<li><p><strong>Delegation to subagents</strong> helps manage complexity. Breaking large tasks into smaller, focused subtasks with clear boundaries produces better results than asking for everything at once.</p>
</li>
<li><p><strong>The research-plan-implement pattern</strong> emerged from practitioners at projects like <a target="_blank" href="https://github.com/humanlayer/humanlayer/tree/main">HumanLayer</a>. You don't just throw a task at an agent. You guide it through phases: understand the problem space, design an approach, then execute. Each phase benefits from different prompting strategies.</p>
</li>
</ul>
<h2 id="heading-leverage-cuts-both-ways">Leverage Cuts Both Ways</h2>
<p>Here's something that doesn't get discussed enough: leverage amplifies everything, including mistakes.</p>
<p>If you fail at the specification stage, you'll propagate that failure at machine speed across your entire implementation. Bad architectural decisions encoded in prompts become bad code at scale. Incorrect assumptions about requirements become incorrect features everywhere.</p>
<p>This creates a new kind of risk profile. In traditional development, you catch many mistakes during the slow, manual coding process. With agentic coding, the implementation happens so fast that flawed thinking gets materialized before you have time to reconsider.</p>
<p>The mental alignment problem is real. When you're not writing every line, do you truly understand why the system is changing and how? Code review becomes even more critical, but it's a different kind of review. You're not just checking logic; you're verifying that the agent's interpretation matches your intent.</p>
<p>Some proponents suggest we'll eventually read specs instead of code. I'm not sure we're ready for that. The gap between specification and implementation contains enormous complexity, and that complexity doesn't disappear just because an agent handles it.</p>
<h2 id="heading-the-junior-developer-question">The Junior Developer Question</h2>
<p>Are we approaching a time when software engineers aren't needed? Probably not. But here's the more interesting question: what happens to mid and junior-level developers?</p>
<p>The traditional path to becoming a senior engineer involves years of writing code, making mistakes, and developing intuition through practice. If juniors outsource all that practice to AI, how do they develop the judgment needed to guide these tools effectively?</p>
<p>This isn't hypothetical. I've watched engineers rely so heavily on code completion that they struggle to debug when the suggestions are wrong. If agentic coding amplifies this pattern, we might produce a generation of developers who can describe what they want but can't verify whether they got it.</p>
<p>AI assistance requires great skills to validate and direct agents effectively. You need to understand software engineering practices thoroughly to recognize when an agent is heading in the wrong direction. Those practices are learned through doing, not just through watching agents do.</p>
<p>The burden of becoming skilled can't be fully outsourced. If we try, we'll face a pipeline problem: where do future senior developers come from if juniors never develop foundational skills?</p>
<h2 id="heading-what-stays-with-us">What Stays With Us</h2>
<p>The tempo of change is enormous right now. Tools are released monthly. Capabilities expand weekly. Maybe the smart move is to wait for stabilization before investing heavily in new workflows.</p>
<p>But I don't think complete waiting makes sense either. The core pattern — declarative problem description, agentic execution, iterative refinement — appears to be stable even as implementations evolve. Learning to work this way is worthwhile regardless of which specific tool dominates next year.</p>
<p>We're not in a moment where software engineers become obsolete. But engineers who can't harness these tools effectively will increasingly struggle. The skill ceiling is rising: you need everything you needed before, plus the ability to guide and validate AI collaborators.</p>
<p>The question isn't whether to adopt agentic coding. It's how to adopt it responsibly — maintaining the understanding and craftsmanship that make software sustainable while capturing the efficiency gains these tools offer.</p>
<p>That balance is the real challenge. And honestly? We're all still figuring it out.</p>
]]></content:encoded></item><item><title><![CDATA[When Deliberate Practice Isn't Enough]]></title><description><![CDATA[Why Some Domains Resist Improvement. About kind and wicked domains. And how to discern them]]></description><link>https://jorzel.hashnode.dev/when-deliberate-practice-isnt-enough</link><guid isPermaLink="true">https://jorzel.hashnode.dev/when-deliberate-practice-isnt-enough</guid><category><![CDATA[Self Improvement ]]></category><category><![CDATA[personal development]]></category><category><![CDATA[General Programming]]></category><category><![CDATA[software development]]></category><category><![CDATA[leadership]]></category><dc:creator><![CDATA[jorzel]]></dc:creator><pubDate>Sun, 02 Nov 2025 18:23:41 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/4CmGxQq1KWk/upload/6d6dc5686e38f0979c91a264497570fd.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-raising-genius">Raising genius</h2>
<h3 id="heading-head-start">Head Start</h3>
<p><a target="_blank" href="https://en.wikipedia.org/wiki/L%C3%A1szl%C3%B3_Polg%C3%A1r">László Polgár</a> is a startling example of the idea that genius is made, not born. From the very beginning, he had a conviction: proper education would be enough to nurture a greatly skilled human being. Before having kids, he wrote a book called "Bring Up Genius!" where he described his plans for raising experts. He started looking for a wife who would help him fulfill his vision. He married Klara, a Ukrainian teacher.</p>
<p>Then came the question: which domain should they use for their kids-to-be-geniuses? He chose chess. The field is objective. Success is straightforward to measure. Progress is visible.</p>
<p>The execution started. From the very beginning, the lives of <a target="_blank" href="https://en.wikipedia.org/wiki/Susan_Polgar">Susan</a>, <a target="_blank" href="https://en.wikipedia.org/wiki/Judit_Polg%C3%A1r">Judit</a>, and <a target="_blank" href="https://en.wikipedia.org/wiki/Sofia_Polgar">Sofia</a> revolved around chess. Their development was spectacular. All three daughters became world-renowned chess players. The success couldn't be denied.</p>
<p>We can find many similar stories of early specialization and a narrow focus that brought extraordinary results. Tiger Woods started "playing" golf before he could walk. Wolfgang Amadeus Mozart was raised in a musical family and connected to music from birth.</p>
<p>These stories show us something compelling: if you start early enough and enter the positive reinforcement loop, the snowball effect can lead to greatness. It's easy to take the stance that proper training, <a target="_blank" href="https://en.wikipedia.org/wiki/Practice_\(learning_method\)#Deliberate_practice">deliberate practice</a> supported by a knowledgeable mentor, leads to a certain destination.</p>
<p>In many domains and crafts, this is true.</p>
<p>It's easy to believe that all domains work this way—that everything can be mastered through early specialization and pattern recognition. But what if that's not as straightforward as we think?</p>
<h3 id="heading-how-early-specialization-works">How Early Specialization Works</h3>
<p>In domains where rules are clear, feedback is fast and straightforward, and patterns can be found, getting a head start with deliberate practice is a proven path to success.</p>
<p>This is <a target="_blank" href="https://en.wikipedia.org/wiki/Savant_syndrome">savant</a> territory.</p>
<p>You've probably heard stories about savants: playing instruments like maestros, performing difficult mathematical calculations in their heads, remembering entire city topologies after seeing a map once. Pattern recognition. Chunking complex information into learnable pieces. Deliberate practice with a close feedback loop.</p>
<p>What's fascinating about savants is the specificity of their abilities. Some were masters in their domain—chess, music, calculation—while in other areas of life, they functioned at the level of toddlers.</p>
<p>But here's a question: have you ever heard about a savant who was great at parenting? Or investing? Or any leadership domain?</p>
<p>Honestly, I don't know of any.</p>
<p>Maybe these domains don't have clear rules. Maybe feedback is deferred or hidden. Maybe patterns don't exist—or aren't stable over time.</p>
<p>Maybe these domains are somehow different. Maybe they're... wicked.</p>
<h2 id="heading-the-other-end-of-the-spectrum">The Other End of the Spectrum</h2>
<p>Let me show you a domain that couldn't be more different: parenting.</p>
<h3 id="heading-your-impact-goes-through-another-person">Your Impact Goes Through Another Person</h3>
<p>In parenting, you make decisions, but someone else executes them.</p>
<p>You decide bedtime is 8 pm. Your child decides whether to actually fall asleep. You can't directly control the outcome. Your actions work <em>through</em> another person—someone with their own will, moods, and needs.</p>
<p>And here's the harder part: that person is constantly evolving. What worked last month doesn't work this month. The techniques you learned need constant refinement—or sometimes you need to drop them entirely. Even when you figure something out, the rules change as your child grows.</p>
<p>Your child is crying. Why? Maybe she's hungry. Maybe she's tired. Maybe she's in pain. Maybe she's frustrated or scared or overstimulated. The feedback is noisy, ambiguous, and often misleading.</p>
<p>You make your best guess. Sometimes you're right. Sometimes you're not. And sometimes you won't know which it was.</p>
<h3 id="heading-you-wont-know-if-you-were-right-for-years">You Won't Know If You Were Right for Years</h3>
<p>You try to introduce rules to raise her properly. Structure and boundaries. Freedom and exploration. But whether these rules are good or bad, you'll only see years later, when you look at who she's becoming.</p>
<p>Were you too strict? Maybe you restricted her freedom and stifled her creativity.</p>
<p>Were you too permissive? Maybe she'll struggle with discipline and direction.</p>
<p>By the time you find out, it's too late to adjust. The experiment is over.</p>
<p>And it's not just your child who's evolving—you are too. Your patience shifts. Your understanding deepens. Your circumstances change—career pressures, health, stress. How you relate to your child changes with all of this.</p>
<p>So even if there <em>were</em> stable patterns to learn, they'd be moving targets on both sides.</p>
<p>And your parenting doesn't happen in isolation—teachers, peers, media, and extended family all influence your child in ways you barely control, creating many unknown unknowns you'll never fully understand.</p>
<p>In chess, you can chunk positions. In golf, you can drill your swing. In music, you can practice scales.</p>
<p>But in parenting? There's no specific narrow skill to master. No pattern to drill. No technique that transfers across all situations.</p>
<p>Being a parent isn't a narrow expertise. It's a multi-skill domain. And your effectiveness—your "meta-skill"—emerges from combining many abilities: empathy, patience, communication, consistency, adaptability, intuition.</p>
<p>This isn't just "harder chess." This is a fundamentally different kind of domain. So what makes some domains work like chess, and others like parenting?"</p>
<h2 id="heading-domains-differ">Domains Differ</h2>
<p>The following question has always fascinated me: Does experience actually provide learning?</p>
<p>I've seen research showing that physicians who diagnose patients don't improve over time (<a target="_blank" href="https://pubmed.ncbi.nlm.nih.gov/15710959/">they were even worse…</a>). In their profession, they typically make a diagnosis and then don't see the patient again. If the patient recovered, they stayed home. If they got worse, they probably went to another specialist.</p>
<p>The feedback loop was broken.</p>
<p>It seemed weird, but it's true in many domains. When we don't have access to reliable and fast feedback, it's really difficult to progress—even if we spend many hours working. We can work hard, but it's not enough to improve.</p>
<p>Healing patients has another issue too. A doctor can prescribe treatment, but it's the patient's responsibility to implement it. The doctor doesn't have a direct impact on whether it actually happens.</p>
<p>That's characteristic of what researchers call a <strong>wicked domain</strong>—a concept introduced by Robin Hogarth and popularized by David Epstein in his book <a target="_blank" href="https://www.amazon.com/Range-Generalists-Triumph-Specialized-World/dp/1035053047"><em>Range</em></a>.</p>
<h3 id="heading-kind-vs-wicked-domains">Kind vs. Wicked Domains</h3>
<p><strong>Kind domains</strong>—exemplified by activities like chess or golf—are high-fidelity feedback systems. In these environments, patterns repeat consistently, and the feedback is rapid, accurate, and direct. This reliable structure allows hyperspecialization to flourish. Repeated practice leads to pattern-matching expertise, enabling instantaneous, accurate intuition.</p>
<p><strong>Wicked domains</strong> represent the opposite. These are low-fidelity feedback systems that inhibit the growth of specialized expertise. The critical factor is the fundamental breakdown in the reliability of information available to the learner.</p>
<p>In Dave Snowden's <a target="_blank" href="https://en.wikipedia.org/wiki/Cynefin_framework">Cynefin framework</a>, these wicked domains typically fall into the "complex" or "chaotic" categories—environments where cause and effect are only clear in retrospect, where patterns emerge rather than repeat, and where probing and experimentation replace analysis and best practices.</p>
<p>We can visualize this spectrum by looking at two key factors:</p>
<ul>
<li><p><strong>Impact:</strong> Do your actions directly cause outcomes (like hitting a golf ball), or do they work indirectly through others and systems (like leading a team)?</p>
</li>
<li><p><strong>Feedback &amp; Rules:</strong> Are the rules stable and feedback immediate (like chess), or are rules ambiguous and feedback delayed (like parenting)?</p>
</li>
</ul>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1762102632891/b569f138-0908-4b7d-ad57-9f678123d2f7.png" alt class="image--center mx-auto" /></p>
<ul>
<li><p><strong>Bottom-left (Direct + Clear):</strong> Chess, golf, piano, programming—this is where the Polgár approach works brilliantly.</p>
</li>
<li><p><strong>Bottom-right (Direct + Unclear):</strong> Solo investing, software architecture—you control your decisions, but outcomes are noisy and delayed, so you need to construct feedback artificially.</p>
</li>
<li><p><strong>Top-left (Indirect + Clear):</strong> Team sports, orchestras—your impact goes through others, but at least the rules and feedback are relatively clear, requiring both technical skill and coordination.</p>
</li>
<li><p><strong>Top-right (Indirect + Unclear):</strong> Leadership, entrepreneurship, parenting—maximum complexity where traditional deliberate practice breaks down completely.</p>
</li>
</ul>
<h3 id="heading-the-strategic-implication">The Strategic Implication</h3>
<p>The question isn't "How hard is this domain?" It's "What <em>type</em> of domain is this?"</p>
<p>Chess and parenting aren't on the same difficulty scale. They're structurally different. They require fundamentally different approaches to learning.</p>
<p>And the approach that works brilliantly in one domain—early specialization, narrow focus, deliberate practice—can fail in another.</p>
<h2 id="heading-the-reinforcement-loop-in-wicked-domains">The Reinforcement Loop in Wicked Domains</h2>
<p>So if wicked domains break the traditional feedback loop—if deliberate practice doesn't work the same way—does that mean <a target="_blank" href="https://medium.com/mentally-mosaic/talent-as-a-system-17ac05b8950a">the positive reinforcement loop</a> is dead?</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1762103314653/a60f3d38-ce54-4247-b274-123453fe9700.png" alt class="image--center mx-auto" /></p>
<p>I don't think so. The loop still works. But enjoyment, confidence, progress, and practice need to come from different sources.</p>
<h3 id="heading-enjoyment-from-curiosity-meaning-and-satisfaction">Enjoyment: From Curiosity, Meaning and Satisfaction</h3>
<p>In kind domains, enjoyment naturally comes from mastery. You get measurably better, and that feels good.</p>
<p>In wicked domains, you can't fully rely on that. Outcomes are too delayed and noisy. So enjoyment may come from meaning, curiosity, and satisfaction instead.</p>
<p>Curiosity about exploring ideas, connecting patterns, and asking "why?" Satisfaction from knowing you approached a problem thoughtfully—even when the outcome is unclear. Meaning from doing something that matters.</p>
<p>Warren Buffett reads 500+ pages a day. Not to drill investment skills, but because he's genuinely curious. That curiosity sustains the loop when outcomes are invisible for years.</p>
<h3 id="heading-practice-through-analogies-and-exploration">Practice: Through Analogies and Exploration</h3>
<p>In kind domains, practice means repetition. You drill patterns, correct mistakes, and refine technique.</p>
<p>In wicked domains, patterns don't repeat reliably. What worked last time might not work now.</p>
<p>So progress must come from process quality instead. You can't practice "leadership" the way you practice golf swings. But you can study how systems work in biology, economics, engineering—and apply those insights to human organizations.</p>
<p>This is practice through breadth, not depth. Through vicarious learning, not direct repetition. Through reading, exploring, and connecting ideas across fields.</p>
<h3 id="heading-progress-from-process-quality-not-outcomes">Progress: From Process Quality, Not Outcomes</h3>
<p>In kind domains, progress is obvious. You win more. Your times improve. Performance metrics show you're getting better.</p>
<p>In wicked domains, outcomes don't reveal progress. Your startup succeeded—was it your strategy or timing?</p>
<p>So progress must come from the quality of your thinking process instead. Are you asking better questions than six months ago? Are you catching your own biases faster? Are you building better mental models?</p>
<p>You measure how you think, not whether you won.</p>
<h3 id="heading-confidence-from-environmental-awareness-not-wins">Confidence: From Environmental Awareness, Not Wins</h3>
<p>In kind domains, confidence comes from performance. You win, you execute cleanly, you know you're competent because results prove it.</p>
<p>In wicked domains, you can't rely on wins to build confidence. Good decisions can have bad outcomes. Bad decisions can get lucky.</p>
<p>So <strong>confidence must come from environmental awareness</strong> instead. Can you read the situation? Do you recognize when rules have changed? Do you know what you don't know? Can you adapt when conditions shift?</p>
<p>Confidence comes from knowing you can navigate uncertainty—not from believing you have all the answers.</p>
<h3 id="heading-creating-feedback-when-its-not-there">Creating Feedback When It's Not There</h3>
<p>When natural feedback is broken or absent, you must <strong>construct it artificially</strong>.</p>
<p>You create feedback through:</p>
<ul>
<li><p><strong>Writing</strong> (forces clarity—if you can't explain it, you don't understand it)</p>
</li>
<li><p><strong>Teaching</strong> (reveals gaps in your thinking)</p>
</li>
<li><p><strong>Peer review</strong> (find people who challenge your thinking)</p>
</li>
<li><p><strong>Metrics</strong> (track progress through insightful metrics)</p>
</li>
<li><p><strong>Long time horizons</strong> (extend your evaluation window to let real patterns emerge through noise)</p>
</li>
</ul>
<p>In wicked domains, you can't wait for the environment to teach you. You have to build the learning system yourself.</p>
<h2 id="heading-the-generalist-approach-in-software-development">The Generalist Approach in Software Development</h2>
<p>As we mentioned in the previous section, practice in wicked domains needs to change. In kind domains, we do a wide search to <em>find</em> our domain. In wicked domains, we also need breadth—but not to find the domain, but to <em>support growth within it</em>.</p>
<h3 id="heading-when-the-domain-shifted">When the Domain Shifted</h3>
<p>Programming is a relatively kind domain. You can develop through narrow, deliberate practice. Clear syntax rules. The compiler gives immediate feedback. Patterns repeat. You drill techniques and improve.</p>
<p>Early in my career, this worked. I got better at writing clean code, learning frameworks, and solving algorithmic problems.</p>
<p>But software architecture—or software development as a process of delivering value through technology—is more wicked.</p>
<p>You're not just fulfilling functional requirements anymore. You need to balance quality drivers such as testability, reliability, scalability, and flexibility. Different systems need different tradeoffs. There's no single "right" answer.</p>
<p>And whether you chose correctly? You usually find out several months or even years after the decision. The feedback is not timely.</p>
<p>So you need to construct feedback. You instrument systems with metrics to assess whether they're evolving in the right direction. You cooperate with other people. You document design decisions in ADRs. You analyze the business and look for architectural patterns and business archetypes you can implement.</p>
<p>You need a generalist approach to improve.</p>
<h3 id="heading-my-philosophy-mistake">My Philosophy "Mistake"</h3>
<p>When I started studying philosophy alongside my tech degree—three years in—people were astonished.</p>
<p><em>"What a stupid thing to waste your tech potential on humanistic stories."</em></p>
<p><em>"What vocation can a philosopher even do?"</em></p>
<p>Philosophy didn't give me a head start in engineering. But it gave me tools that made my progress faster and smoother in later stages: building mental models, understanding that precision in language creates precision in thought, critical thinking for ambiguous problems, and seeing patterns across domains.</p>
<p>Writing forced clarity in my thinking. Reading broadly gave me vicarious experience with how systems and people work. None of these gave immediate results, but they provided exactly the breadth that wicked domains like software architecture demand—even though it looked like "wasted time" to people focused on narrow specialization.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>Early specialization works brilliantly in kind domains. The Polgár sisters, Tiger Woods, and memorization experts—they're proof that when feedback is clear and direct, narrow focus pays off.</p>
<p>But here's the problem: we've started treating <em>every</em> domain like a kind domain.</p>
<p>We optimize prematurely.</p>
<p>I think that's part of the problem with the modern world. We treat universities and colleges as vocational schools. They should provide us with a <em>profession</em>—well-paid, of course, and sought by the market.</p>
<p>I've even seen profiling classes in primary schools: medical path, art path, from the very first grade.</p>
<p>We love to over-optimize early.</p>
<p>But a large part of life—especially the interesting parts—happens in wicked domains. Domains where feedback is unclear, impact is indirect, and patterns don't repeat.</p>
<p>And there, breadth isn't a distraction. It's the foundation.</p>
<p>Know your domain. If it's kind, specialize early. If it's wicked—build range.</p>
]]></content:encoded></item><item><title><![CDATA[Talent as a Loop, Not a Gift]]></title><description><![CDATA[How to build conditions to thrive instead of asking whether "I have talent"]]></description><link>https://jorzel.hashnode.dev/talent-as-a-system-how-to-build-it-when-you-think-you-lack-it</link><guid isPermaLink="true">https://jorzel.hashnode.dev/talent-as-a-system-how-to-build-it-when-you-think-you-lack-it</guid><category><![CDATA[Self Improvement ]]></category><category><![CDATA[personal development]]></category><category><![CDATA[General Programming]]></category><category><![CDATA[Life lessons]]></category><category><![CDATA[Philosophy]]></category><dc:creator><![CDATA[jorzel]]></dc:creator><pubDate>Tue, 21 Oct 2025 07:50:14 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1761032891513/0106b6b1-7a76-4802-a2c0-c842570c6bfa.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>The talent debate has always fascinated me. In my previous posts, I tried to challenge the myth that talent must come from natural gifts. But I've realized something: the nature vs. nurture debate might not be the problem to solve—it might be the <em>wrong question entirely</em>.</p>
<p>Asking "Do I have talent?" traps you. It's a binary question with no good answer. You're waiting for a verdict on something you can't measure. Am I talented enough? How would I know? It leads to paralysis or false confidence, neither of which helps you actually develop.</p>
<p>So let me propose a different question: <strong>"Can I build the conditions where I thrive?"</strong></p>
<p>This shift changes everything. Instead of searching for talent as some hidden essence inside you, you start <em>building</em> talent as a functional system. And the core of that system is surprisingly simple: a <strong>positive reinforcement loop</strong>.</p>
<h2 id="heading-the-positive-reinforcement-loop">The Positive Reinforcement Loop</h2>
<p>In <a target="_blank" href="https://www.amazon.com/Mastery-Robert-Greene-Collection/dp/178125091X"><em>Mastery</em></a>, Robert Greene describes Charles Darwin's transformation during his voyage on the HMS Beagle:</p>
<blockquote>
<p>"As the journey progressed, Darwin noted some obvious changes in himself. He used to find almost any kind of work boring, but now he could labor all hours of the day; in fact, with so much to explore and learn he hated wasting a single minute of voyage. He had cultivated an incredible eye for the flora and fauna in South America. He could identify local birds by their songs, the markings on their eggs, their manner of taking flight. All this information he could catalog and organize in an efficient manner. More important, his whole way of thinking had changed. He would observe something, read and write about it, then develop a theory after more observation, the theories and observations feeding off one another. Full of details about so many facets of the world he was exploring, ideas were sprouting up out of nowhere."</p>
</blockquote>
<p>Darwin went from finding work boring to hating wasted time. From passive to obsessed. From following instructions to generating ideas. What happened?</p>
<p>He entered a loop.</p>
<p>You've probably heard both of these ideas: the <a target="_blank" href="https://en.wikipedia.org/wiki/Outliers_\(book\)">"10,000 hours rule"</a> to achieve mastery, and the wisdom to "find a profession you love and you'll never work a day in your life".</p>
<p>They sound contradictory. One says grind hard enough and you'll succeed. The other says find your passion, and success will feel effortless. But they're actually pointing at the same underlying truth: <strong>to become really good at something, you need to practice a lot. And to practice a lot, it has to feel frictionless.</strong></p>
<p>When you genuinely enjoy something, practice doesn't feel like a burden. It becomes automatic. If you have spare time, it's one of the first things that comes to your mind. You find yourself seeking it out. That's the moment the loop starts.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1760958811274/19442048-d88c-4ccc-9b3b-bf3d3b87b79f.png" alt class="image--center mx-auto" /></p>
<p>This is it. This is the mechanism. And it's also the measure of potential.</p>
<p>In the old "talent" language (which I want to abandon), you'd say someone is talented because they can sustain this loop. And sustaining the loop makes you <em>more</em> talented. The two are inseparable.</p>
<h3 id="heading-the-easiest-path-but-not-the-only-path">The Easiest Path (But Not The Only Path)</h3>
<p>I mentioned enjoyment first because it <em>is</em> the easiest way to enter the loop. You start an activity, you have fun doing it, and you naturally want to do it again. The conditions practically build themselves.</p>
<p>But—and this is crucial—that's the easiest path, not the only path.</p>
<p>Your journey to the loop can look completely different from someone else's. Most commonly, people do experience it the "easy" way: enjoyment comes first, then practice follows naturally, then competence arrives as a result. But there's another way that works too: <strong>deliberate effort → small wins → confidence → enjoyment.</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1760987797575/3dfa5599-0baa-4e03-b548-db667c4d0bb8.png" alt class="image--center mx-auto" /></p>
<p>You start not because you love it, but because you have to. Or because you're pragmatic. You gain some competence through work or practice. Then something shifts. When you realize you <em>can</em> actually solve problems, something clicks. Suddenly, you start <em>looking for</em> problems to solve. You want to improve. And that want—that enjoyment—emerges from the competence you already built.</p>
<h3 id="heading-mindset-shift">Mindset Shift</h3>
<p>Someone might argue: "Isn't the ability to form a loop just talent by another name? You're just rephrasing the same thing."</p>
<p>The answer is no. Here's the crucial difference:</p>
<ul>
<li><p><strong>Gift thinking:</strong> "Do I have the talent?" (passive, binary, waiting for validation)</p>
</li>
<li><p><strong>Loop thinking:</strong> "Can I build the right context?" (active, variable, problem-solving)</p>
</li>
</ul>
<p>Natural talent is fixed. The loop-forming ability is <em>learnable and contextual</em>.</p>
<p>You can lack obvious predispositions but still form a loop if you find the right environment, feedback, people, and approach. Someone without a head start can absolutely develop genuine talent by building the conditions. The mindset shift means moving from <em>judging yourself</em> to <em>designing your conditions</em>.</p>
<p>This is agency. This is actionable. This is why it matters.</p>
<h3 id="heading-beyond-growth-mindset">Beyond Growth Mindset</h3>
<p>You might recognize some of these ideas from <a target="_blank" href="https://www.amazon.com/Mindset-Psychology-Carol-S-Dweck/dp/0345472322">Carol Dweck's growth mindset framework</a>. She taught us something revolutionary: effort and practice matter. You can develop ability through dedication and work.</p>
<p>That was important. But here's what's incomplete about it.</p>
<p><strong>Growth mindset says:</strong> <em>Keep trying harder.</em></p>
<p><strong>The loop framework says:</strong> <em>Try smarter. Find the right context(s).</em></p>
<p>Dweck shows us that effort matters. But this framework shows us <em>where</em> and <em>how</em> effort actually compounds into real development. It's not just about willpower and pushing through. It's about building a functional system where effort naturally sustains itself through enjoyment, feedback, and small wins.</p>
<p>Growth mindset can leave you exhausted, trying harder in the wrong context. The loop framework says: if effort isn't compounding, redesign the system first.</p>
<h3 id="heading-my-story-starting-without-love">My Story: Starting Without Love</h3>
<p>This is where the framework comes to life.</p>
<p>I didn't start by falling in love with programming. I hated it, actually. During my tech studies, I struggled constantly. I couldn't solve problems. The logic didn't make sense. I felt lost. So I concluded the obvious: "This isn't for me. I don't have talent for this."</p>
<p>If the story had ended there, I probably would have quit forever. But it didn't, for a practical reason: I had already invested years in tech studies, and software development was (and still is) a lucrative field. So I gave it another shot—partly out of sunk cost bias, partly out of pragmatism. I didn't feel love for coding. I just thought: maybe a different approach would work.</p>
<p>Working part-time as a developer changed everything. I was solving real problems. Real bugs. Real systems. I was getting feedback from actual code running, not from grades or assessments.</p>
<p>Slowly, small competencies accumulated. I solved one problem, then another, then another. Each small win gave me confidence that I <em>could</em> do this. Competence brought confidence. And then—and only then—something unexpected happened: I started <em>wanting</em> to solve technical problems. I'd see a challenge and think about how to approach it. I'd explore how systems worked.</p>
<p>The loop had formed, but backwards from the cliché. Competence came first. Enjoyment followed. And now? I'd describe myself as a talented engineer—something I never would have said during my studies.</p>
<h3 id="heading-what-this-proves">What This Proves</h3>
<p>My story isn't unique. It's just evidence of a simple truth: You don't need to start with passion. You don't need to wake up and feel a magnetic pull toward your craft. Sometimes you start with pragmatism, necessity, or just the willingness to try differently.</p>
<p>But if you can build small wins and competence in the right conditions, the loop can still form. Enjoyment can arrive later. And once it does, you're no longer waiting for talent to appear—you've actively built it.</p>
<p>The mechanism is the same. The entry point can be different. And that difference is everything for people who think they lack talent in something, when really they just haven't found the right way in yet.</p>
<h2 id="heading-when-to-persist-when-to-pivot">When to Persist, When to Pivot</h2>
<h3 id="heading-context-isnt-one-thingits-a-combination">Context Isn't One Thing—It's a Combination</h3>
<p>Here's something crucial: the loop needs multiple contexts to align. But that doesn't mean you need <em>all possible contexts</em> to be perfect.</p>
<p>Different combinations work for different people. Maybe you don't have money for formal training, but you have incredible grit and determination. Maybe you don't have a coach, but you have supportive parents who believe in you. Perhaps you don't have someone providing expert feedback, but you're a strong analyst and can identify your own gaps.</p>
<p>This is fundamentally different from the fixed talent approach. Fixed talent says: "You either have this specific thing or you don't." The loop approach says: "What combination of contexts can work for <em>you</em>?"</p>
<p>There's no single recipe. You work with what you have. You substitute what's missing. You experiment with different combinations until something clicks.</p>
<p>But—and this is the hard part—your resources are still limited.</p>
<h3 id="heading-searching-vs-investing">Searching vs. Investing</h3>
<p>You can create a setup. You can improve it. You can wait. And sometimes, despite all that, it still doesn't help. The loop doesn't form. It's probably not for you. It might be time to pivot.</p>
<p>This is the paradox that everyone faces: <strong>How do you balance investing deeply in one domain versus searching broadly for the right domain?</strong></p>
<p>The contradiction is real:</p>
<ul>
<li><p><strong>Too broad a search</strong> = you never stay long enough for a loop to actually form</p>
</li>
<li><p><strong>Too narrow a focus</strong> = you might miss your real domain entirely</p>
</li>
</ul>
<p>Either extreme wastes your limited resources—time, energy, money.</p>
<p>Sometimes sunk cost bias keeps you stuck in a choice, and it pays off later. (This was me with coding.) Sometimes it's just wasted time. No algorithm tells you which is which.</p>
<h3 id="heading-when-the-loop-doesnt-click">When The Loop Doesn't Click</h3>
<p>When you've tried, adjusted, and the loop still isn't forming, you have two equally valid options:</p>
<ul>
<li><p><strong>Adjust strategy and context.</strong> Try different environments, different mentors, different approaches. Give yourself more time, but with different strategies—the loop might form under different conditions.</p>
</li>
<li><p><strong>Try something entirely different.</strong> If you've genuinely tried to build supportive contexts and nothing is clicking, this might not be your domain. This isn't failure—it's information.</p>
</li>
</ul>
<p>Neither option is wrong. Both are strategic.</p>
<p>Sometimes persistence is exactly what you need—and you're one context adjustment away from the loop forming. Sometimes persistence is the problem—and you need permission to move on.</p>
<p>The honest truth? You won't know for certain which it is until you look back later. But you can make better bets by asking the right questions and being honest about what you're seeing.</p>
<p>Sometimes what keeps you near the possibly-forming loop—supportive parents, sunk cost bias, external pressure—is exactly what you need to stay long enough. Sometimes it's what traps you in the wrong place.</p>
<p>The wisdom isn't in knowing the answer in advance. It's in staying honest about whether the conditions are improving, whether small signs of progress are appearing, and whether you're actively building toward the loop or just hoping it happens.</p>
<p>That's the best you can do. And sometimes, that's enough.</p>
<h2 id="heading-sustaining-and-developing-the-loop">Sustaining and Developing the Loop</h2>
<p>When we create a loop, we care about finding love for the activity. In later stages, we care about not losing that love—especially to burnout.</p>
<p>Sometimes we think that once something becomes real and established, it should be stable and uniform. If it needs to evolve, something must be wrong. But I think that's a false conviction. The same applies to the loop. As your craft or skill develops, the loop takes slightly different forms, and different aspects need attention to keep it healthy.</p>
<p>I propose three stages of skill development, each requiring a different approach: <strong>Beginner, Apprenticeship, and Mastery.</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1760992712064/76482387-4992-4ce4-b412-99fd0a94311c.png" alt class="image--center mx-auto" /></p>
<h3 id="heading-stage-1-beginner-play-and-flow">Stage 1: Beginner (Play and Flow)</h3>
<p>Lots of play, exploration, and <a target="_blank" href="https://en.wikipedia.org/wiki/Flow_\(psychology\)">flow</a>. You don't need to be good yet—you just need to enjoy it enough to keep going. Small wins matter enormously. Did I do that? I did that!</p>
<p>You're at the beginning of the path, so proper practice brings fast effects. The loop circulates rapidly. Progress feels visible. This is where you fall in love.</p>
<h3 id="heading-stage-2-apprenticeship-guided-development">Stage 2: Apprenticeship (Guided Development)</h3>
<p>You've gained some competence. But it's not so easy to improve just by flowing anymore. You need guidance.</p>
<p>At this stage, a mentor or coach becomes invaluable. They provide feedback, support when you're stuck, and help you see blind spots you can't identify yourself. The loop is still there, but now it needs structure to keep circulating. You're building skill, but you must protect the enjoyment from becoming pure grinding.</p>
<h3 id="heading-stage-3-mastery-experimentation-and-deliberate-practice">Stage 3: Mastery (Experimentation and Deliberate Practice)</h3>
<p>You push toward excellence and a kind of uniqueness. Enjoyment is often traded for satisfaction—the satisfaction of solving hard problems in ways that are yours.</p>
<p>Development needs to be carefully directed now. You drill when you see weakness. <a target="_blank" href="https://en.wikipedia.org/wiki/Practice_\(learning_method\)#Deliberate_practice">Deliberate practice</a> can be self-directed, but also be supported by a mentor if you can find someone who can help at this level. Your competence is high, so you experiment. You try to find a totally new way—your way.</p>
<p>Even here, you must not completely lose the enjoyment. It keeps you going through the hard parts. Burnout is the real threat at this stage.</p>
<h3 id="heading-different-stages-different-strategies">Different Stages, Different Strategies</h3>
<p>Here's what many people don't understand: the same strategies don't work across stages.</p>
<p>If you treat Stage 2 like Stage 1, you'll never push past beginner level. You need structure. You need a mentor. If you try to keep Stage 3 like Stage 2, you'll never develop your own voice—you'll be forever following someone else's path. If you return to Stage 1 approaches during Stage 3, you'll lose momentum. You've moved past play. You need strategic direction now.</p>
<p>The loop is constant. But what sustains it changes. Understanding where you are and what that stage needs from you is the difference between people who develop real talent and those who plateau.</p>
<h2 id="heading-leave-the-door-open">Leave the Door Open</h2>
<p>We don't know what talent "really" is. We can debate nature versus nurture endlessly, but we'll never have a definitive answer.</p>
<p>So here's the pragmatic approach: if we don't know what's true, we should act to promote what works best for us.</p>
<p>The loop framework is about leaving the door open. When you start something, you hope that the right strategy and iteration can give you improvement. You might have enjoyment without reaching competence. You might be competent without enjoying it. But it's worth trying. Sometimes the process itself gives you satisfaction.</p>
<p>Of course, you need some limits on how much you invest in any single activity. But the reframe from "Do I have talent?" to "Can I build the loop?" changes everything. It gives you agency. It permits you to experiment.</p>
]]></content:encoded></item><item><title><![CDATA[Tactical DDD by Example: Can We Implement Aggregates Using Redis?]]></title><description><![CDATA[How to protect business rules using aggregates? Can we use a Redis database for it?]]></description><link>https://jorzel.hashnode.dev/tactical-ddd-by-example-can-we-implement-aggregates-using-redis</link><guid isPermaLink="true">https://jorzel.hashnode.dev/tactical-ddd-by-example-can-we-implement-aggregates-using-redis</guid><category><![CDATA[DDD]]></category><category><![CDATA[#Domain-Driven-Design]]></category><category><![CDATA[software development]]></category><category><![CDATA[General Programming]]></category><category><![CDATA[Redis]]></category><dc:creator><![CDATA[jorzel]]></dc:creator><pubDate>Mon, 20 Oct 2025 07:34:31 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1760945568653/b0bf5401-596a-4642-9ca7-e731d17a356f.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>When building distributed systems, protecting business rules becomes increasingly complex. Concurrent operations can violate constraints, and failures can leave systems in inconsistent states. These aren't just technical problems — they're business problems that can cost real money.</p>
<p>In this post, I'll show you how Domain-Driven Design (DDD) aggregates can elegantly solve these challenges, using a streaming system with lease-based concurrency control as our example. We'll explore three approaches: a naive solution you might intuitively build, a traditional aggregate pattern, and an unconventional Redis-based approach. By comparing them, you'll see how the focus shifts from <em>structure</em> to <em>behavior</em>, and why this matters for building robust systems.</p>
<h2 id="heading-the-streaming-system-our-real-world-problem">The Streaming System: Our Real-World Problem</h2>
<p>Imagine you're building a platform that manages concurrent sessions across customer accounts. Here are your requirements:</p>
<ul>
<li><p>Each account can run a maximum of X concurrent sessions</p>
</li>
<li><p>Sessions can be started and stopped on demand</p>
</li>
<li><p>The streaming service (which actually runs the sessions) is separate from the orchestration service (which manages and coordinates sessions)</p>
</li>
<li><p>If the streaming service fails or becomes unreachable, the orchestration service should remain consistent</p>
</li>
</ul>
<p>This separation between services is intentional and realistic. The streaming service might be slow, it might fail, and network calls might timeout. We need a system that gracefully handles these real-world failures.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1760945416466/7b2966fc-f0b5-440b-bb6f-5fa56e22d59a.png" alt class="image--center mx-auto" /></p>
<h2 id="heading-the-lease-based-model-elegance-through-time">The Lease-Based Model: Elegance Through Time</h2>
<p>At the heart of a robust solution lies the lease-based concurrency model. Instead of thinking in absolute terms — "this session is running" — we think in time-limited terms: "this session has a lease until time T."</p>
<p>Here's how it works in practice.</p>
<p>The orchestration service acquires a lease on behalf of a session, then attempts to start the actual session on the streaming service. While the session runs, the streaming service periodically sends session-alive events back to the orchestration service. Each alive event renews the lease, extending its expiration time. When the session stops, the streaming service notifies the orchestration service, which explicitly releases the lease.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1760945427510/66fffa94-13ee-4c8a-b15d-b6e9de6ef956.png" alt class="image--center mx-auto" /></p>
<p>But here's where the lease model shines: if the streaming service crashes or becomes unreachable, it can no longer send alive events. The leases on the orchestration side simply expire, automatically releasing the slots. No explicit coordination needed. No need to wait for failure detection or manual intervention.</p>
<p>This is remarkably elegant. We've replaced a complex protocol to handle service failures with a simple mechanism: time. The lease model is forgiving of failures, network issues, and slowness — all without explicit coordination. If the streaming service is down for five minutes, the leases expire, and those sessions' slots become available. The system self-heals.</p>
<p>The lease model works particularly well when you have two independent services that need to coordinate, you want failure handling to be simple and automatic rather than explicit and complicated.</p>
<p>In the next sections, we consider three implementation options. To not overwhelm the readers, we will focus only on the most complex operation - acquiring a lease.</p>
<h2 id="heading-the-naive-approach-following-intuition">The Naive Approach: Following Intuition</h2>
<p>Most of us start building domain models by thinking in nouns. We create a <code>User</code> object, an <code>Account</code> object, maybe a <code>Session</code> object. Each object manages its own state, and we query the database to answer questions.</p>
<p>In our example, you might model it like this:</p>
<pre><code class="lang-go">Account
  - id
  - name
  - maxConcurrentSessions

Session
  - id
  - accountId
  - leaseExpiration
  - status
</code></pre>
<p>To answer the question "can we start a new session for this account?" you'd write something like that:</p>
<pre><code class="lang-sql"><span class="hljs-keyword">SELECT</span> <span class="hljs-keyword">COUNT</span>(*) <span class="hljs-keyword">FROM</span> sessions 
<span class="hljs-keyword">WHERE</span> accountId = ? <span class="hljs-keyword">AND</span> leaseExpiration &gt; <span class="hljs-keyword">NOW</span>()
</code></pre>
<p>This works. It's intuitive. And it can have serious problems that compound as traffic increases.</p>
<p>First, there's no explicit protection of the rule. The rule "only X sessions per account" lives nowhere in your code — it lives in your head and in your documentation. Different parts of your codebase might check this rule differently, or forget to check it entirely. You might have an anemic domain model: objects that are just data containers with no real behavior.</p>
<p>Or the opposite problem happens. Over time, the <code>Account</code> object accumulates more and more responsibilities. It manages sessions, handles concurrency, coordinates with the streaming service, and suddenly it's a god object that does everything. Good naming is crucial here — if you call it <code>Account</code> instead of something more specific, it's even easier for the object to drift into becoming a catch-all.</p>
<p>But there's a deeper performance problem hiding here. With high concurrency — multiple requests trying to start sessions for the same account simultaneously — you need <a target="_blank" href="https://en.wikipedia.org/wiki/Lock_\(computer_science\)#Database_locks">pessimistic locking</a> to preserve atomicity. You need to lock the <code>Account</code> row (and possibly <code>Session</code> rows) to ensure that two concurrent requests don't both think there's an available slot when there isn't one. Imagine two requests arriving at the same moment when your account has exactly one slot left. Without locks, both queries see one available slot, both add a session, and you've violated your invariant.</p>
<p>Locking works, but it kills scalability. As traffic increases, lock contention increases, and requests pile up waiting for locks. Your throughput is hindered, and your system becomes slower the more successful you are.</p>
<p>This is the fundamental problem with the naive approach: the lack of explicit aggregate boundaries forces you into pessimistic locking, which destroys your concurrency and scalability.</p>
<h2 id="heading-the-aggregate-pattern-behavior-over-structure">The Aggregate Pattern: Behavior Over Structure</h2>
<p>This is where aggregates come in. An aggregate is one of the most powerful tactical patterns in Domain-Driven Design (but also the most misunderstood…). Instead of thinking about entities and their relationships, think about clusters of domain objects that must be consistent as a single unit.</p>
<p>However, the keyword is <strong>behavior</strong>.</p>
<p>An aggregate protects invariants. An invariant is a rule that must always be true. In our case: "an account never has more than X active sessions." We design the aggregate boundary to contain everything needed to enforce this rule, and we make all modifications go through a single entry point — the aggregate root.</p>
<p>Here's the crucial insight: the aggregate isn't defined by the data structures it contains. It's defined by the behavior it must protect. Data is secondary — it's just the tool we use to protect the rule.</p>
<p>In our streaming system, the aggregate root might be called <code>AccountSessions</code>. The name itself should signal responsibility.</p>
<p>An aggregate should be small. This isn't arbitrary — small aggregates mean faster transactions and better scalability. If your aggregate includes everything in your system, you've defeated the purpose.</p>
<p>The aggregate doesn't have to be an object. It can be a function, a procedure, or even a script. The key requirement is: be atomic and transactionally consistent. All modifications to the aggregate must happen in a single transaction, with no way for the invariant to be violated.</p>
<h2 id="heading-the-traditional-aggregate-logic-in-code">The Traditional Aggregate: Logic in Code</h2>
<p>The traditional aggregate pattern puts your domain logic in code — plain classes or functions — not in the database. This is usually the best approach.</p>
<p>You create an aggregate root with an identity. You might have additional data structures inside the aggregate boundary, but all modifications go through the root. You implement a repository pattern to load and save the aggregate (repository as a database adapter).</p>
<p>Here's the conceptual shape of it:</p>
<pre><code class="lang-go">AccountSessions (aggregate root)
  - accountId
  - maxConcurrentSessions
  - activeSessions: List[ActiveSession]
  - version (<span class="hljs-keyword">for</span> optimistic locking)

ActiveSession (objects inside aggregate)
  - sessionId
  - leaseExpiresAt
</code></pre>
<p>The key is that all business logic lives in the aggregate, protecting the invariant in code. When you want to start a new session, you load the aggregate, call <code>addSession()</code> on it, and if it succeeds, you save it back. The aggregate is responsible for enforcing the rule: you can never exceed X sessions.</p>
<pre><code class="lang-go"><span class="hljs-function"><span class="hljs-keyword">func</span> <span class="hljs-params">(m *SessionManager)</span> <span class="hljs-title">AcquireSession</span><span class="hljs-params">(ctx context.Context, spec AcquireSpec)</span> <span class="hljs-params">(error)</span></span> {
    <span class="hljs-comment">// Transaction wraps entire operation</span>
    tx, err := m.db.BeginTx(ctx, <span class="hljs-literal">nil</span>)
    <span class="hljs-keyword">defer</span> tx.Rollback()

    <span class="hljs-comment">// Load the entire aggregate from database</span>
    accountSessions, version, err := m.repo.LoadAccountSessionsInTx(ctx, tx, spec.AccountID)

    <span class="hljs-comment">// Execute business logic (invariant protection happens here)</span>
    err = accountSessions.AddSession(spec.SessionID, spec.LeaseDurationSeconds)

    <span class="hljs-comment">// Save back with optimistic locking</span>
    <span class="hljs-comment">// This will fail if another transaction modified the aggregate</span>
    err = m.repo.SaveAccountSessionsInTx(ctx, tx, spec.AccountID, accountSessions, version)

    <span class="hljs-keyword">return</span> tx.Commit()
}
</code></pre>
<p>This approach has real benefits. Your domain logic is testable and explicit (within <code>AccountSessions.AddSession</code> method). Your boundaries are clear. Anyone reading the code knows what invariants are being protected and where.</p>
<p>However, it has a small tradeoff: <a target="_blank" href="https://en.wikipedia.org/wiki/Optimistic_concurrency_control">optimistic locking</a>. With high traffic and many concurrent requests trying to start sessions for the same account, you'll get conflicts. If two transactions load the same aggregate and both try to save, only one will succeed (the other will get a version mismatch error). Your application needs to retry, which adds complexity and latency.</p>
<p>However, here's the critical difference from the naive approach: you're not blocking other requests while you hold a lock (you “optimistically” assume that the blocking is not needed). Readers can still load the aggregate. Other accounts aren't affected. You scale much better because you're not serializing all requests on one account — you're just retrying conflicts, which are typically rare unless you're already at capacity.</p>
<p>Nevertheless, in some cases, a lot of conflicts on write can be troublesome. In that case, you can turn to Redis.</p>
<h2 id="heading-the-unorthodox-approach-redis-and-lua-a-deep-dive">The Unorthodox Approach: Redis and Lua - A Deep Dive</h2>
<p>We're used to thinking about Redis as a cache layer — a temporary store to speed up access to data that lives in a real database. But modern cloud Redis services (eg, GCP Memorystore) have changed the game. They are highly available, replicated, and reliable.</p>
<p>This opens a new possibility: for certain use cases, Redis can be your <em>primary</em> storage system, not just a cache in front of something else.</p>
<p>Redis offers two critical features for implementing aggregates: it's extremely fast, and it supports Lua scripting with atomic execution. A Lua script that runs on Redis is atomic — either all of it executes, or none of it does. No race conditions, no retry logic needed. This is perfect for aggregate enforcement.</p>
<p>How to model an aggregate in Redis?</p>
<p>In our example, the aggregate boundary should consist of three interconnected data structures that must always stay consistent:</p>
<pre><code class="lang-go">session:&lt;sessionId&gt;           <span class="hljs-comment">// JSON of Session (individual session lease)</span>
accountSessions:&lt;accountId&gt;   <span class="hljs-comment">// set of account's session IDs</span>
activeSessions                <span class="hljs-comment">// sorted set of all sessions by expiration time</span>
</code></pre>
<p>Each structure serves a purpose:</p>
<ul>
<li><p><code>session:&lt;sessionId&gt;</code> stores the session data (JSON). This is the primary record for a session.</p>
</li>
<li><p><code>accountSessions:&lt;accountId&gt;</code> is a Redis SET that keeps track of all session IDs for an account. This lets us quickly count active sessions for an account.</p>
</li>
<li><p><code>activeSessions</code> is a Redis ZSET (sorted set) that tracks all sessions across all accounts, sorted by expiration time. This is used for efficient lease expiration because querying over keys in Redis is highly inefficient.</p>
</li>
</ul>
<p>Together, these three structures form the aggregate boundary. They're logically a single unit that must be kept consistent.</p>
<p>As we said earlier, to provide atomicity in Redis, we need to utilize <a target="_blank" href="https://redis.io/docs/latest/develop/programmability/eval-intro/">Lua Scripts</a>.</p>
<pre><code class="lang-lua">local session_key = KEYS[1]              -- session:&lt;sessionId&gt;
local account_sessions_key = KEYS[2]     -- accountSessions:&lt;accountId&gt;
local active_sessions_key = KEYS[3]      -- activeSessions (all sessions)
local sessions_limit = tonumber(ARGV[1])
local session_id = ARGV[2]
local session_payload = ARGV[3]
local expiration_time = tonumber(ARGV[4])

-- Check if account reached the limit
local sessions_usage = tonumber(redis.call("SCARD", account_sessions_key))
if sessions_usage &gt;= sessions_limit then
    return redis.error_reply("account has reached the maximum number of sessions")
end

-- If we reach here, we know we can safely add - all three operations happen atomically
redis.call("SADD", account_sessions_key, session_id)          -- Add to account's set
redis.call("ZADD", active_sessions_key, expiration_time, session_id)  -- Add to global sorted set
redis.call("SET", session_key, session_payload)               -- Store session data

return sessions_usage
</code></pre>
<p>This is a single atomic operation. No locks, no retries, no race conditions. Let's trace through what happens with concurrent requests:</p>
<p>Imagine two requests arrive simultaneously, both trying to start a session for the same account that's at capacity (already has 4 sessions, limit is 5):</p>
<ol>
<li><p>Request A's script begins executing on Redis</p>
</li>
<li><p>Request A check: <code>SCARD accountSessions:acc1</code> → returns 4</p>
</li>
<li><p>Request A verifies: 4 &lt; 5, so it proceeds</p>
</li>
<li><p>Request A executes all three Redis calls atomically</p>
</li>
<li><p>Request B's script, then begins (Redis serializes scripts)</p>
</li>
<li><p>Request B checks: <code>SCARD accountSessions:acc1</code> → returns 5 (because A just added one)</p>
</li>
<li><p>Request B's script hits the limit check and fails</p>
</li>
</ol>
<p>Redis is single-threaded. When you send a Lua script to Redis, the entire script executes on a single thread before any other command is processed. This means that even with thousands of concurrent clients, Redis serializes Lua script execution at the engine level. You're not competing with other transactions or race conditions — you're executing your entire script atomically, then the next script begins. There are no partial states or interleaved operations.</p>
<p>This single-threaded model might sound like a bottleneck, but it's actually why Redis is so performant. There's no context switching, no lock overhead, no coordination protocols. Each script runs to completion, and the throughput is determined by how fast Redis can execute scripts sequentially. For sub-millisecond operations like our session count check, this throughput is remarkably high — tens of thousands of operations per second even under extreme concurrency.</p>
<p>Lua scripts in Redis have constraints: <a target="_blank" href="https://redis.io/docs/latest/develop/programmability/eval-intro/#script-parameterization">they can only read/write keys that are explicitly passed in via KEYS and ARGV</a>. This can make complex logic tricky. For example, if you wanted to query sessions across multiple accounts in a single script, you'd hit limitations.</p>
<p>This constraint actually forces good design: your aggregate boundaries become very clear. You can't accidentally reach outside your aggregate. The price is that some operations that would be easy in a relational database require careful thought in Redis.</p>
<p>The whole Redis aggregate implementation can be found <a target="_blank" href="https://github.com/jorzel/streaming-system/blob/main/sessions-service/internal/redis/sessionmanager.go">here</a>.</p>
<h2 id="heading-choosing-your-approach">Choosing Your Approach</h2>
<p>The naive approach works for small, non-critical systems where lock contention isn't a problem yet. It's the simplest to understand, but it scales poorly as traffic increases.</p>
<p>The traditional aggregate is the right choice for most systems. It's maintainable, testable, and puts your domain logic where it belongs: in code you can easily understand and change.</p>
<p>But for this specific problem — high concurrency handling where retries on conflicts are problematic — Redis becomes compelling. You gain massive performance and simplicity, at the cost of learning a different paradigm and accepting in-memory storage. In that case, Redis should be your domain logic enforcer, but you also need a reporting database for long persistence.</p>
<p>The decision isn't about which approach is "better" — it's about which constraints matter most for your specific problem.</p>
<h2 id="heading-the-real-insight">The Real Insight</h2>
<p>All three approaches show a progression from thinking about structure to thinking about behavior. The naive approach asks, "What data should I store?" The aggregate approaches ask, <strong>"What rules must I protect?"</strong></p>
<p>This is the fundamental shift that makes Domain-Driven Design powerful. Data is a means to an end. Behavior — protecting your business rules — is the point.</p>
<p>When you start designing systems this way, you'll notice that your code becomes clearer, your invariants become explicit, and your systems become more robust. You're not building data structures that happen to have some logic attached. You're building coherent units of behavior that exist to protect what matters: your business rules.</p>
<p>The next time you're building a system, before you create your first object or table, ask yourself: what invariants must I protect? What rule must always be true? Then design your aggregate around that rule, not around your intuition about what data you might need.</p>
<p>That's the real power of aggregates.</p>
]]></content:encoded></item><item><title><![CDATA[Finding Balance: The Art of Living Between Extremes]]></title><description><![CDATA[The golden mean isn't a destination. It's a practice. And like any practice, it gets better the more you do it.]]></description><link>https://jorzel.hashnode.dev/finding-balance-the-art-of-living-between-extremes</link><guid isPermaLink="true">https://jorzel.hashnode.dev/finding-balance-the-art-of-living-between-extremes</guid><category><![CDATA[personal development]]></category><category><![CDATA[General Programming]]></category><category><![CDATA[Personal growth  ]]></category><category><![CDATA[Philosophy]]></category><dc:creator><![CDATA[jorzel]]></dc:creator><pubDate>Mon, 06 Oct 2025 10:27:27 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1759746374461/eb82ab6a-4ca4-4cfc-aa88-a18d05ed400a.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I'm not sure why this is the case, but people often fall into a false binary when facing complex problems. Somehow, we convince ourselves that being a demanding parent automatically means we cannot be supportive and connected. That pursuing enjoyment in life must eradicate any struggle. We must choose one extreme or the other. However, this black-and-white thinking is really harmful to our personal development.</p>
<p>Aristotle captured this perfectly in his concept of the Golden Mean: "Virtue is the golden mean between two vices, the one of excess and the other of deficiency." The idea is simple yet profound: excellence is found in a moderate, balanced path between extremes. But here's the thing: being between extremes doesn't mean sitting passively in the middle. It means taking something from both sides and finding the necessary balance. And that balance is almost always contextual. You cannot decide it in advance.</p>
<p>I want to discuss a few areas in this post where we should aim for balance rather than mutual exclusion. Instead of picking one side and going all the way in that direction, the goal is to find the right mix.</p>
<h2 id="heading-no-gratification-vs-immediate-gratification">No Gratification vs. Immediate Gratification</h2>
<p>You probably know about the <a target="_blank" href="https://en.wikipedia.org/wiki/Stanford_marshmallow_experiment">marshmallow experiment</a>. It tells us that kids who can delay gratification are usually more successful in life. And this is probably true. This ability allows us to not over-optimize locally, to see beyond the immediate moment.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1759747425315/724fb8eb-e2aa-432e-b9da-5cb54936e6fb.png" alt class="image--center mx-auto" /></p>
<p>But if we focus too much on delaying gratification, we can end up in a situation where we have no gratification at all. We keep delaying it forever, and it makes us frustrated. The reward never comes because we're always waiting for the next milestone, the next achievement, the next "right time."</p>
<p>We need to be able to defer our rewards when it matters. But we also need the ability to take pleasure and enjoy the ride. Life isn't just about the destination. If you never taste the sweetness along the way, what's the point of the journey?</p>
<h2 id="heading-demand-vs-support">Demand vs. Support</h2>
<p>Sometimes we see this duality in parenting: on one side, you're a harsh parent with demands, rules, and high standards. On the other side, you're permissive—trying to find a connection on the same level, being almost a friend and mate. No constraints, just letting kids evolve in whatever direction they choose.</p>
<p><a target="_blank" href="https://medium.com/illuminations-mirror/demand-and-support-the-universal-patterns-of-leadership-9dacf6da3bfb">In my article about wise leadership</a>, I underscored that maybe a third way is possible. You can be demanding, but also support your kids in fulfilling these demands. You give children necessary emotional validation while also maintaining reality alignment.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1759746253139/cb243947-d979-4ea5-8c8a-bb97637a6004.png" alt class="image--center mx-auto" /></p>
<p>This is about providing both orientation in the world and connection. You show them the path, but you also make sure your child doesn't feel alone on their road. The demands give structure and direction. The support gives courage and resilience. Together, they create an environment where growth can actually happen.</p>
<h2 id="heading-deep-work-vs-shallow-work">Deep Work vs. Shallow Work</h2>
<p>Several years ago, <a target="_blank" href="https://medium.com/gitconnected/deep-work-essentialism-in-asynchronous-culture-6ab41ac0e8d3">I wrote an article that was a deep work manifesto</a>. I still believe focus and deep work are critical for high performance. However, after writing that article, I changed jobs and experienced firsthand how difficult it can be when your entire team is working in deep mode—when no one is open to questions and clarifications.</p>
<p>Deep work is great when everyone knows what needs to be done and how to do it. But in chaos, you need more connection and support. And this comes from shallow work: Slack messages, meetings, shared lunch, quick check-ins. These moments create the connective tissue that holds a team together.</p>
<p>Deep work can bring you focus, but it can also bring isolation. Shallow work can provide connectedness, but it can also create distraction. You need to balance these modes to be a great team player. Sometimes you need to close the door and dive deep. Other times, you need to keep the door open and stay available.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1759746237363/399c9222-0d46-43aa-a23e-0da1172ef292.png" alt class="image--center mx-auto" /></p>
<h2 id="heading-struggle-vs-enjoyment">Struggle vs. Enjoyment</h2>
<p>For several years, I actively tried to figure out what it means to be talented. It resulted in a bunch of books read and a few articles written. I still don't have a clear standpoint. But over the journey, I encountered two great approaches for improving skills: flow and deliberate practice. And I think both can be practiced—maybe not at the same time, but as part of a development strategy.</p>
<p><a target="_blank" href="https://medium.com/illumination/can-we-work-differently-3c6d52eb0025">Flow is about being totally immersed in your activity</a>, operating at the edge of your comfort zone. It brings great enjoyment. You lose track of time. The activity itself becomes the reward.</p>
<p>Deliberate practice advocates usually underscore that practice doesn't necessarily need to be enjoyable all the time. As Scott Young points out in his article about <a target="_blank" href="https://www.scotthyoung.com/blog/2017/03/29/flow-doesnt-lead-to-mastery/">flow and mastery</a>, the characteristics of flow can actually be inconsistent with the demands of deliberate practice. Sometimes we need to tackle challenges that are difficult. We need to drill the fundamentals, work on our weaknesses, and push beyond what feels natural. This mental strain, while not enjoyable in the moment, is what produces real improvement.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1759746130567/501a1e4c-cd11-48f1-adbf-24b138b5520a.png" alt class="image--center mx-auto" /></p>
<p>However, it would be really difficult to maintain your training over a long period of time if you never feel the flow on your road. It would be overwhelming. You'd burn out. So you need to be aware of the danger zone, the comfort zone, and the learning zone. You need to be flexible and let yourself feel the flow from time to time. And sometimes you need to drill hard to take a step forward.</p>
<p>This tension exists in learning strategies too. Should you broaden your interests or drill down and develop expertise in one field? Again, it's contextual. Sometimes you need to explore new domains. Sometimes you need to gather more skills and knowledge within a specific area. The key is knowing when to do which.</p>
<h2 id="heading-action-vs-reflection">Action vs. Reflection</h2>
<p>There's also a balance between stepping back and stepping in. Sometimes you need to reflect—reading books, listening to music, watching movies, finding inspiration by meeting friends, and traveling. These activities feed your mind and soul. They give you perspective.</p>
<p>And sometimes you need to act and improve your knowledge by doing. You need to get your hands dirty, make mistakes, and learn from real feedback. All the reflection in the world won't teach you what one failed experiment will.</p>
<p>The best growth happens when you can move fluidly between these modes. Reflect to gain insight. Act to test that insight. Step back to process what you learned. Step in to apply it again, better this time.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1759747225243/9813a432-dc48-4b8d-b6cf-e757e658be8a.png" alt class="image--center mx-auto" /></p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>Life is not a series of binary choices. It's a constant navigation between extremes, a dance where you sometimes lean one way and sometimes the other. The art of living well is not about choosing sides—it's about finding the balance that works for your context, your moment, your goals.</p>
<p>This balance isn't static either. What worked last year might not work today. What works at the office might not work at home. The wisdom lies not in finding the perfect balance once and for all, but in developing the sensitivity to know when you've drifted too far toward one extreme.</p>
<p>So pay attention. When you feel isolated, add more connection. When you feel scattered, create more focus. When you're burned out from struggle, allow yourself some flow. When you're too comfortable, introduce some challenge.</p>
<p>The golden mean isn't a destination. It's a practice. And like any practice, it gets better the more you do it.</p>
]]></content:encoded></item><item><title><![CDATA[Redis and the Magic of ZSET]]></title><description><![CDATA[The post shows how Redis utilizes skiplist to get a powerful zset data structure]]></description><link>https://jorzel.hashnode.dev/redis-and-the-magic-of-zset</link><guid isPermaLink="true">https://jorzel.hashnode.dev/redis-and-the-magic-of-zset</guid><category><![CDATA[Redis]]></category><category><![CDATA[datastructure]]></category><category><![CDATA[Software Engineering]]></category><category><![CDATA[Databases]]></category><category><![CDATA[General Programming]]></category><dc:creator><![CDATA[jorzel]]></dc:creator><pubDate>Fri, 03 Oct 2025 15:23:21 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1759504852708/a58adaba-4f6d-4cbc-bf5a-7f7f4881c4ab.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Redis is often praised as one of the simplest yet most powerful databases. Its key-value model is blazing fast for direct lookups, but when it comes to querying by ranges, ranks, or sorting, Redis doesn’t give you much out of the box. Unless, of course, you know about <strong>ZSETs</strong>.</p>
<p>A ZSET (sorted set) is Redis’ answer to the question: “How do I efficiently query ordered data?” With ZSETs you can get things like <em>top N players by score</em>, <em>all values between X and Y</em>, or <em>the rank of a specific member</em> in logarithmic time. Under the hood, ZSETs are powered by a surprisingly elegant data structure: the <strong>skiplist</strong>.</p>
<p>This post breaks down how skiplists work, why Redis chose them, and how insertion, removal, and rank queries actually operate. By the end, you’ll understand why ZSETs can feel like magic when combined with normal Redis keys.</p>
<h2 id="heading-skiplist-basics-a-tower-of-linked-lists">Skiplist Basics: A Tower of Linked Lists</h2>
<p>At first glance, a skiplist looks like a bunch of linked lists stacked on top of each other. Each element (called a <strong>node</strong>) may appear in multiple levels. The higher the level, the fewer nodes exist there, acting like express lanes for fast searching.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1759504511396/051f8782-c253-4b84-bbf2-f5b32aa06e59.png" alt class="image--center mx-auto" /></p>
<p>Here’s what makes a skiplist tick:</p>
<ul>
<li><p><strong>Multilevel Nodes</strong>: Each node randomly decides how tall it is. Some are short, some are skyscrapers. Tall nodes act as shortcuts when searching.</p>
</li>
<li><p><strong>Probability</strong> <code>p</code>: This is the coin flip that determines how high a node grows. Redis uses <code>p = 0.25</code>. That means ~25% of nodes appear on level 2, ~6% on level 3, ~1.5% on level 4, etc.</p>
</li>
<li><p><strong>MaxLevel</strong>: The upper bound on how tall nodes can be. Redis picked 32. With billions of elements, you’re still safe from degenerating into O(n).</p>
</li>
<li><p><strong>Forward pointers</strong>: At each level, nodes point to the next node in order.</p>
</li>
<li><p><strong>Spans</strong>: Each forward pointer doesn’t just link to the next node, it also says <em>how many nodes are being skipped at this level</em>. That’s the secret sauce for rank queries.</p>
</li>
<li><p><strong>Backward pointer</strong>: At the lowest level, nodes also point back to their predecessor. This helps with reverse scans.</p>
</li>
</ul>
<p>The result: searching, inserting, and deleting are all expected <strong>O(log n)</strong> operations. Unlike trees, skiplists achieve this with very simple code and without painful balancing logic. The trade-off is that performance is <em>probabilistic</em>, but the odds of a bad case are astronomically small.</p>
<p>In the next few paragraphs, I would like to show how skiplists work. I am going to keep implementation out of the main text to avoid overloading readers, but it is included in the <a target="_blank" href="https://github.com/jorzel/skiplist">repository</a>.</p>
<h2 id="heading-how-random-levels-are-chosen">How Random Levels Are Chosen</h2>
<p>When inserting a new element, we don’t deterministically assign a level. Instead, we flip a weighted coin until it comes up tails.</p>
<ul>
<li><p>Start at level 1.</p>
</li>
<li><p>While <code>rand() &lt; p</code>, increase level.</p>
</li>
<li><p>Stop when tails, or when <code>maxLevel</code> is reached.</p>
</li>
</ul>
<pre><code class="lang-go">rnd := rand.New(rand.NewSource(time.Now().UnixNano()))
<span class="hljs-comment">// randomLevel generates a random level for a new node</span>
<span class="hljs-comment">// with probability p for each level</span>
<span class="hljs-comment">// the lower the p, the less likely to have high levels</span>
<span class="hljs-function"><span class="hljs-keyword">func</span> <span class="hljs-title">randomLevel</span><span class="hljs-params">()</span> <span class="hljs-title">int</span></span> {
    lvl := <span class="hljs-number">1</span>
    <span class="hljs-keyword">for</span> lvl &lt; maxLevel &amp;&amp; rnd.Float64() &lt; p {
        lvl++
    }
    <span class="hljs-keyword">return</span> lvl
}
</code></pre>
<p>This randomness ensures a geometric distribution of node heights. Most nodes are small, a few are tall, and a tiny handful become “towers” that accelerate searches. With <code>p=0.25</code> and <code>maxLevel=32</code>, you expect fewer than one node out of 10^18 to hit the max.</p>
<hr />
<h2 id="heading-insert-member">Insert Member</h2>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1759502791502/727f4f7a-170b-4d26-aed9-28ab45789ac3.png" alt class="image--center mx-auto" /></p>
<p>To insert <code>(score, member)</code>:</p>
<ol>
<li><p>Start from the header (<code>head</code>) node (a sentinel that has no real value).</p>
</li>
<li><p>At each level, move forward until you would overshoot the target.</p>
</li>
<li><p>Keep track of these <strong>insertion points</strong>.</p>
</li>
<li><p>Flip coins to decide the level of the new node.</p>
</li>
<li><p>Splice it in by updating forward pointers and spans.</p>
</li>
</ol>
<p>Because spans tell us how many nodes each jump covers, they are carefully adjusted during insertion.</p>
<h2 id="heading-remove-member">Remove Member</h2>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1759502818993/55525a4c-b01f-48f8-af60-7b2d8a1b8d8f.png" alt class="image--center mx-auto" /></p>
<p>Removal is similar:</p>
<ol>
<li><p>Find the <strong>nodes to remove</strong> at each level.</p>
</li>
<li><p>Update their forward pointers to skip over the target (the node before <code>node-to-remove</code> should now point to <code>noid-to-remove.forward</code>.</p>
</li>
<li><p>Adjust spans accordingly.</p>
</li>
<li><p>Fix backward pointers.</p>
</li>
</ol>
<p>If the removed node was the tallest, the overall skiplist level may shrink.</p>
<hr />
<h2 id="heading-rank-counting-skips">Rank: Counting Skips</h2>
<p>Rank is where spans shine. Imagine asking: <em>What’s the index of member X in sorted order?</em></p>
<p>During the search for <code>(score, member)</code>:</p>
<ul>
<li><p>Every time we move forward at level <code>i</code>, we add that edge’s <code>span[i]</code> to a running total.</p>
</li>
<li><p>When we finally land on the node, the accumulated total is its rank.</p>
</li>
</ul>
<p>That’s O(log n) rank calculation, something that would otherwise require walking the entire base linked list.</p>
<h3 id="heading-case-1-getrank8-8"><strong>Case 1:</strong> <code>GetRank(8, "8")</code></h3>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1759502471849/06a695a6-2b35-44d2-a75f-1db149041291.png" alt class="image--center mx-auto" /></p>
<p>Start: <code>x=head</code>, <code>rank=0</code>.</p>
<p><strong>Level 4</strong></p>
<ul>
<li><p><code>head.forward[4] = 11</code>.</p>
</li>
<li><p>Is <code>11 &lt; 8</code>? → no.</p>
</li>
<li><p>Stay put.</p>
</li>
</ul>
<p><strong>Level 3</strong></p>
<ul>
<li><p>Same check: <code>11 &lt; 8</code>? → no.</p>
</li>
<li><p>Stay put.</p>
</li>
</ul>
<p><strong>Level 2</strong></p>
<ul>
<li><p><code>head.forward[2] = 8</code>.</p>
</li>
<li><p><code>8 &lt; 8</code>? → no.</p>
</li>
<li><p>Stay put.</p>
</li>
</ul>
<p><strong>Level 1</strong></p>
<ul>
<li><p><code>head.forward[1] = 8</code>.</p>
</li>
<li><p><code>8 &lt; 8</code>? → no.</p>
</li>
<li><p>Stay put.</p>
</li>
</ul>
<p><strong>Level 0</strong></p>
<ul>
<li><p><code>head.forward[0] = 5</code>.</p>
</li>
<li><p><code>5 &lt; 8</code>? → yes → take jump.</p>
<ul>
<li><p><code>rank += head.span[0] = 1</code></p>
</li>
<li><p><code>rank = 1</code></p>
</li>
<li><p><code>x = 5</code></p>
</li>
</ul>
</li>
<li><p>Next forward: <code>x.forward[0] = 8</code> → <code>8 &lt; 8</code>? → no.</p>
</li>
</ul>
<p>After loop: <code>x = x.forward[0] = 8</code>. Target matches → return <code>rank = 1</code>.</p>
<h3 id="heading-case-2-getrank16-16">Case 2: <code>GetRank(16, "16")</code></h3>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1759502541198/dd9b894e-ed32-4bd6-a950-ed9dc0958455.png" alt class="image--center mx-auto" /></p>
<p>Start: <code>x=head</code>, <code>rank=0</code>.</p>
<p><strong>Level 4</strong></p>
<ul>
<li><p><code>head.forward[4] = 11</code>.</p>
</li>
<li><p><code>11 &lt; 16</code>? → yes → take jump.</p>
<ul>
<li><p><code>rank += head.span[4] = 3</code></p>
</li>
<li><p><code>rank = 3</code></p>
</li>
<li><p><code>x = 11</code></p>
</li>
</ul>
</li>
<li><p>Next forward: <code>x.forward[4] = nil</code> → stop inner loop.</p>
</li>
</ul>
<p><strong>Level 3</strong></p>
<ul>
<li>From <code>x=11</code>, <code>x.forward[3] = nil</code>. → stay.</li>
</ul>
<p><strong>Level 2</strong></p>
<ul>
<li>From <code>x=11</code>, <code>x.forward[2] = nil</code>. → stay.</li>
</ul>
<p><strong>Level 1</strong></p>
<ul>
<li><p>From <code>x=11</code>, <code>x.forward[1] = 16</code>.</p>
</li>
<li><p><code>16 &lt; 16</code>? → no. → stay.</p>
</li>
</ul>
<p><strong>Level 0</strong></p>
<ul>
<li><p>From <code>x=11</code>, <code>x.forward[0] = 16</code>.</p>
</li>
<li><p><code>16 &lt; 16</code>? → no.</p>
</li>
</ul>
<p>After loop: <code>x = x.forward[0] = 16</code>. Target matches → return <code>rank = 3</code>.</p>
<h2 id="heading-redis-trick">Redis’ Trick</h2>
<p>Redis doesn’t just use a skiplist. It combines:</p>
<ul>
<li><p>A <strong>dict (hash table)</strong>: <code>member → node</code>, for O(1) direct lookups.</p>
</li>
<li><p>A <strong>skiplist</strong>: keeps members ordered by score and member name for O(log n) range queries and rank calculations.</p>
</li>
</ul>
<p>This hybrid gives the best of both worlds. Combining those two structures allows us to easily implement basic zset operations like: <code>ZAdd</code>, <code>ZRem</code>, <code>ZRank</code> and <code>ZRange</code>.</p>
<pre><code class="lang-go"><span class="hljs-keyword">import</span> <span class="hljs-string">"github.com/jorzel/skiplist/skiplist"</span>

<span class="hljs-keyword">type</span> Zset <span class="hljs-keyword">struct</span> {
    sl skiplist.Skiplist
    dict <span class="hljs-keyword">map</span>[<span class="hljs-keyword">string</span>]<span class="hljs-keyword">float64</span>
}

<span class="hljs-comment">// Add or update member</span>
<span class="hljs-comment">// ZAdd https://redis.io/docs/latest/commands/zadd/</span>
<span class="hljs-function"><span class="hljs-keyword">func</span> <span class="hljs-params">(z *Zset)</span> <span class="hljs-title">Add</span><span class="hljs-params">(score <span class="hljs-keyword">float64</span>, member <span class="hljs-keyword">string</span>)</span></span> {
    <span class="hljs-keyword">if</span> n, ok := z.dict[member]; ok {
        z.sl.Remove(n.score, member)
    }
    n := z.sl.Insert(score, member)
    z.dict[member] = n
}

<span class="hljs-comment">// Remove member</span>
<span class="hljs-comment">// ZRem https://redis.io/docs/latest/commands/zadd/</span>
<span class="hljs-function"><span class="hljs-keyword">func</span> <span class="hljs-params">(z *Zset)</span> <span class="hljs-title">Remove</span><span class="hljs-params">(member <span class="hljs-keyword">string</span>)</span> <span class="hljs-title">bool</span></span> {
    n, ok := z.dict[member]
    <span class="hljs-keyword">if</span> !ok {
        <span class="hljs-keyword">return</span> <span class="hljs-literal">false</span>
    }
    ok = z.sl.Remove(n.score, member)
    <span class="hljs-keyword">if</span> ok {
        <span class="hljs-built_in">delete</span>(z.dict, member)
    }
    <span class="hljs-keyword">return</span> ok
}

<span class="hljs-comment">// Rank returns zero-based rank, or -1 if not present</span>
<span class="hljs-comment">// ZRank https://redis.io/docs/latest/commands/zrank/</span>
<span class="hljs-function"><span class="hljs-keyword">func</span> <span class="hljs-params">(z *ZSet)</span> <span class="hljs-title">Rank</span><span class="hljs-params">(member <span class="hljs-keyword">string</span>)</span> <span class="hljs-title">int</span></span> {
    score, ok := z.dict[member]
    <span class="hljs-keyword">if</span> !ok { <span class="hljs-keyword">return</span> <span class="hljs-number">-1</span> }
    <span class="hljs-keyword">return</span> z.sl.GetRank(score, member)
}

<span class="hljs-comment">// Range by rank inclusive [start,stop], supports negative indices like Redis</span>
<span class="hljs-comment">// ZRange https://redis.io/docs/latest/commands/zrank/</span>
<span class="hljs-function"><span class="hljs-keyword">func</span> <span class="hljs-params">(z *ZSet)</span> <span class="hljs-title">Range</span><span class="hljs-params">(start, stop <span class="hljs-keyword">int</span>)</span> []<span class="hljs-title">string</span></span> {
    n := z.sl.length
    <span class="hljs-keyword">if</span> n == <span class="hljs-number">0</span> { <span class="hljs-keyword">return</span> <span class="hljs-literal">nil</span> }

    <span class="hljs-comment">// normalize negative indices</span>
    <span class="hljs-keyword">if</span> start &lt; <span class="hljs-number">0</span> { start = n + start }
    <span class="hljs-keyword">if</span> stop &lt; <span class="hljs-number">0</span> { stop = n + stop }
    <span class="hljs-keyword">if</span> start &lt; <span class="hljs-number">0</span> { start = <span class="hljs-number">0</span> }
    <span class="hljs-keyword">if</span> stop &lt; <span class="hljs-number">0</span> { <span class="hljs-keyword">return</span> <span class="hljs-literal">nil</span> }
    <span class="hljs-keyword">if</span> start &gt; stop || start &gt;= n { <span class="hljs-keyword">return</span> <span class="hljs-literal">nil</span> }
    <span class="hljs-keyword">if</span> stop &gt;= n { stop = n<span class="hljs-number">-1</span> }

    res := <span class="hljs-built_in">make</span>([]<span class="hljs-keyword">string</span>, <span class="hljs-number">0</span>, stop-start+<span class="hljs-number">1</span>)
    node := z.sl.GetByRank(start)
    <span class="hljs-keyword">for</span> i := start; i &lt;= stop &amp;&amp; node != <span class="hljs-literal">nil</span>; i++ {
        res = <span class="hljs-built_in">append</span>(res, node.member)
        node = node.forward[<span class="hljs-number">0</span>]
    }
    <span class="hljs-keyword">return</span> res
}
</code></pre>
<p>This mirrors how Redis’ ZSET is implemented in C: <code>dict + zskiplist</code>.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>ZSETs are surprisingly versatile once you know what powers them:</p>
<ul>
<li><p>Leaderboards (players ranked by score).</p>
</li>
<li><p>Time-series queries (timestamps as scores).</p>
</li>
<li><p>Priority queues (scores as priorities).</p>
</li>
<li><p>Secondary indexes (scores encode derived values).</p>
</li>
</ul>
<p>Even though Redis doesn’t give you SQL-like querying, a clever combination of keys + ZSETs makes it possible to implement efficient searching patterns.</p>
<p>Redis ZSETs look simple on the surface, but under the hood, they rely on a beautifully clever data structure: the skiplist. With random levels, forward pointers, spans, and a hybrid design that pairs a dict with the skiplist, Redis achieves fast lookups, inserts, deletes, and rank queries—all in O(log n).</p>
<p>Compared to balanced trees, skiplists are easier to code, almost as fast, and probabilistically robust. That’s why Redis chose them. And now, hopefully, you see why ZSET is one of the most powerful features in Redis: it turns a plain key-value store into a fast, query-capable data structure.</p>
<p>Once again, the <code>skiplist</code> implementation can be found <a target="_blank" href="https://github.com/jorzel/skiplist/tree/main">here</a>.</p>
]]></content:encoded></item><item><title><![CDATA[Generating Unique and Sortable IDs in Distributed Systems]]></title><description><![CDATA[How to generate a unique and sortable ID. Autoincrement, UUID, KSUID, ULID, Snowflake ID.]]></description><link>https://jorzel.hashnode.dev/generating-unique-and-sortable-ids-in-distributed-systems</link><guid isPermaLink="true">https://jorzel.hashnode.dev/generating-unique-and-sortable-ids-in-distributed-systems</guid><category><![CDATA[General Programming]]></category><category><![CDATA[distributed system]]></category><category><![CDATA[software development]]></category><category><![CDATA[Software Engineering]]></category><category><![CDATA[software architecture]]></category><dc:creator><![CDATA[jorzel]]></dc:creator><pubDate>Wed, 03 Sep 2025 12:43:21 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/IUQH0SQ4jmk/upload/a78f628979500f6f87e593c87da2bba5.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>When building distributed systems, generating unique identifiers becomes tricky. But why do we need them to be both unique AND sortable?</p>
<p>Uniqueness is obvious - you can't have duplicate IDs causing data corruption or overwriting records. But sortability brings some real benefits, e.g:</p>
<ul>
<li><p><strong>Natural ordering</strong> - IDs created later sort after earlier ones, giving you chronological order for free</p>
</li>
<li><p><strong>Database performance</strong> - sorted inserts are faster, less index fragmentation, better query performance on ranges</p>
</li>
<li><p><strong>Easier debugging</strong> - you can instantly see which records are newer just by looking at the ID.</p>
</li>
</ul>
<p>In the following post, I would like to present possible solutions for this problem.</p>
<h2 id="heading-the-usual-suspects">The Usual Suspects</h2>
<p>Most developers reach for one of two standard approaches when they need unique IDs. Both seem reasonable at first, but they often show their limitations in distributed environments.</p>
<p><strong>The Database auto-increment</strong> works great until you realize that properly divided services don't share databases. Each service would generate conflicting IDs, thereby breaking the uniqueness of the system.</p>
<p><strong>UUIDs</strong> guarantee global uniqueness but don't provide sortability. Random UUIDs don't preserve creation order, which is often exactly what you need.</p>
<h2 id="heading-separate-id-service">Separate ID Service</h2>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1756900772162/d0234404-ae39-4e76-b46a-c360cf36daea.png" alt class="image--center mx-auto" /></p>
<p>You could create a dedicated service with access to an auto-increment database, essentially serving as a single source of truth for all other systems that generate IDs.</p>
<p>But here's the issue: it becomes a <strong>single point of failure</strong> for your entire system. It also adds a large service dependency to other systems. A simple operation like generating an ID suddenly gets additional network latency. It seems like great overhead for our task.</p>
<h2 id="heading-timestamp-based-ids-the-smart-move">Timestamp-Based IDs (The Smart Move)</h2>
<p>Using a timestamp as part of the ID and leaving some bytes to randomize the ID seems more straightforward. Depending on your use case, you can choose one of the following options:</p>
<h3 id="heading-ulid"><strong>ULID</strong></h3>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1756901512841/617d0299-1d25-4fb1-b77d-7c335f11394a.png" alt class="image--center mx-auto" /></p>
<p>A 128-bit identifier that combines a millisecond timestamp with randomness. Encoded in Base32, it produces a 26-character string that is globally unique and sortable by creation time without coordination.</p>
<pre><code class="lang-python"><span class="hljs-comment"># pip install python-ulid</span>

<span class="hljs-keyword">import</span> ulid
<span class="hljs-keyword">import</span> time

id1 = ulid.new()
id2 = ulid.new()

print(<span class="hljs-string">f"ULID 1: <span class="hljs-subst">{id1}</span>"</span>)  <span class="hljs-comment"># 01K47RE8HM22176GF3QEA5VXC4</span>
print(<span class="hljs-string">f"ULID 2: <span class="hljs-subst">{id2}</span>"</span>)  <span class="hljs-comment"># 01K47REDKRVYZ67YBB275ZFHJB</span>
print(<span class="hljs-string">f"Sortable: <span class="hljs-subst">{id1 &lt; id2}</span>"</span>)  <span class="hljs-comment"># True - chronological order preserved</span>
</code></pre>
<h3 id="heading-ksuid">KSUID</h3>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1756901562236/c3ea3fb6-b6a2-4428-bbf9-a5c741b80a95.png" alt class="image--center mx-auto" /></p>
<p>A 160-bit identifier with a second-precision timestamp and 128 bits of randomness. Encoded in Base62 as a 27-character string, it’s highly collision-resistant and naturally ordered by time, making it well-suited for event logs and analytics.</p>
<pre><code class="lang-python"><span class="hljs-comment"># pip install ksuid</span>

<span class="hljs-keyword">from</span> ksuid <span class="hljs-keyword">import</span> ksuid
<span class="hljs-keyword">import</span> time

<span class="hljs-comment"># KSUID with second precision</span>
id1 = ksuid()
time.sleep(<span class="hljs-number">1</span>)  <span class="hljs-comment"># 1 second delay for visibility</span>
id2 = ksuid()

print(<span class="hljs-string">f"KSUID 1: <span class="hljs-subst">{id1}</span>"</span>)  <span class="hljs-comment"># 1545e3c6325d397529c1124712f93aeaa3b2bf5c</span>
print(<span class="hljs-string">f"KSUID 2: <span class="hljs-subst">{id2}</span>"</span>)  <span class="hljs-comment"># 1545e3cac9c006f4bb64c753c68ff9143af33539</span>
print(<span class="hljs-string">f"Sortable: <span class="hljs-subst">{str(id1) &lt; str(id2)}</span>"</span>)  <span class="hljs-comment"># True</span>
</code></pre>
<h3 id="heading-snowflake-id">Snowflake ID</h3>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1756903168857/681d2986-6155-4f1e-9797-de66e4f876b4.png" alt class="image--center mx-auto" /></p>
<p>Snowflake fits everything into a 64-bit integer: 41 bits for timestamp, 10 bits for machine ID, and 12 bits for sequence number (plus 1 control bit at the very beginning). This gives you strictly monotonic, numeric IDs that are perfect for database primary keys. The catch? You need to coordinate machine IDs across your fleet.</p>
<pre><code class="lang-python"><span class="hljs-keyword">import</span> time
<span class="hljs-keyword">import</span> threading

<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">Snowflake</span>:</span>
    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">__init__</span>(<span class="hljs-params">self, machine_id: int</span>):</span>
        self.machine_id = machine_id &amp; <span class="hljs-number">0x3FF</span>   <span class="hljs-comment"># 10 bits for machine id</span>
        self.sequence = <span class="hljs-number">0</span>
        self.last_timestamp = <span class="hljs-number">-1</span>
        self.lock = threading.Lock()

    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">_timestamp</span>(<span class="hljs-params">self</span>):</span>
        <span class="hljs-keyword">return</span> int(time.time() * <span class="hljs-number">1000</span>)  <span class="hljs-comment"># milliseconds</span>

    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">next_id</span>(<span class="hljs-params">self</span>):</span>
        <span class="hljs-keyword">with</span> self.lock:
            timestamp = self._timestamp()

            <span class="hljs-keyword">if</span> timestamp == self.last_timestamp:
                self.sequence = (self.sequence + <span class="hljs-number">1</span>) &amp; <span class="hljs-number">0xFFF</span>  <span class="hljs-comment"># 12 bits</span>
                <span class="hljs-keyword">if</span> self.sequence == <span class="hljs-number">0</span>:
                    <span class="hljs-keyword">while</span> timestamp &lt;= self.last_timestamp:
                        timestamp = self._timestamp()
            <span class="hljs-keyword">else</span>:
                self.sequence = <span class="hljs-number">0</span>

            self.last_timestamp = timestamp
            <span class="hljs-keyword">return</span> ((timestamp &lt;&lt; <span class="hljs-number">22</span>) | (self.machine_id &lt;&lt; <span class="hljs-number">12</span>) | self.sequence)


gen = Snowflake(machine_id=<span class="hljs-number">1</span>)
id1 = gen.next_id()
id2 = gen.next_id()
print(id1) <span class="hljs-comment"># 7368985504009687040</span>
print(id2) <span class="hljs-comment"># 7368985504009687041</span>
print(id1 &lt; id2) <span class="hljs-comment"># True</span>
</code></pre>
<h2 id="heading-summary">Summary</h2>
<ul>
<li><p><strong>Snowflake</strong>: Optimized for <strong>compact, numeric IDs</strong> (good for DB primary keys, ordered event streams). Requires coordination (machine IDs). Use <strong>Snowflake</strong> if you want <strong>small, numeric IDs</strong> (e.g., for databases, primary keys, social media posts).</p>
</li>
<li><p><strong>ULID</strong>: Aimed at being a <strong>UUID replacement</strong> → globally unique, sortable, and human-readable. No coordination needed. Use <strong>ULID</strong> if you want a <strong>drop-in replacement for UUIDs</strong> with better sortability.</p>
</li>
<li><p><strong>KSUID</strong>: Similar to ULID, but with <strong>more randomness</strong> and <strong>Base62 encoding</strong>, making it great for logs and analytics. Use <strong>KSUID</strong> if you want <strong>extreme collision resistance</strong> and don't mind slightly larger IDs.</p>
</li>
</ul>
<p>Choosing the right ID scheme depends on your system’s priorities. By understanding the trade-offs (e.g. collision-free guarantees over time resolution), you can pick the approach that keeps your distributed system both scalable and easy to reason about.</p>
]]></content:encoded></item><item><title><![CDATA[Strategic DDD by Example: Bounded Contexts Mapping]]></title><description><![CDATA[Strategic DDD by Example: Bounded Contexts Mapping. Bounded contexts relationships patterns]]></description><link>https://jorzel.hashnode.dev/strategic-ddd-by-example-bounded-contexts-mapping</link><guid isPermaLink="true">https://jorzel.hashnode.dev/strategic-ddd-by-example-bounded-contexts-mapping</guid><category><![CDATA[#Domain-Driven-Design]]></category><category><![CDATA[software development]]></category><category><![CDATA[Software Engineering]]></category><category><![CDATA[software architecture]]></category><category><![CDATA[General Programming]]></category><dc:creator><![CDATA[jorzel]]></dc:creator><pubDate>Thu, 21 Aug 2025 11:24:59 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1755775319198/4434238e-b8d9-4ce8-b171-b0d8248f0b6b.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>This is the second part of our Strategic DDD series. I hoped to deliver it earlier, but it took me over 2 years to get it done. I hope it will be helpful and enjoyable.</p>
<p>In the first part, we explored how to identify subdomains within a business domain using a restaurant reservation system as our example. We discovered some real gains from domain decomposition: better modularity, team autonomy, improved scalability, and the ability to focus development efforts on the core subdomain. But now we need to face the music. There's an inevitable cost that comes with this separation.</p>
<h2 id="heading-from-subdomains-to-bounded-contexts">From Subdomains to Bounded Contexts</h2>
<p>Before we jump into integration challenges, let's clear up something that trips up a lot of people. Subdomains and bounded contexts aren't the same thing. Understanding this difference matters if you want to avoid confusion later.</p>
<p>A subdomain is part of the problem space. It's literally what the business does. In our restaurant reservation example, we identified subdomains like Booking &amp; Reservations, Restaurant Catalog, Reviews, Authentication, and Notifications. These exist whether we build software or not (Please take a moment and think about how a booking restaurant system could work without computers. Nevertheless, most of the domains nowadays are difficult to imagine without computers).</p>
<p>A bounded context lives in the solution space. We make a design decision about which subdomains we want to bundle together to share the same model. You might put multiple subdomains in one bounded context. Or you might split a single subdomain across multiple bounded contexts. It depends on what makes sense for your situation.</p>
<p>Now, what do I mean by "model" here? This trips up a lot of people. A model isn't just some data structures or a bunch of classes you wrote. A model represents the behaviors you want to provide for a specific part of your domain within a bounded context. It includes the business rules, operations, and constraints that define how that piece of the domain works.</p>
<p>Take our restaurant reservation system. The Booking &amp; Reservations bounded context might handle behaviors like "reserve a table" and "cancel a reservation". The Restaurant Catalog bounded context provides different behaviors like "search restaurants" and "manage restaurant information".</p>
<p>Here's something interesting. Each bounded context maintains its model with its language. The same concept can mean totally different things depending on which context you're in.</p>
<p>Take "User" for example. In an Authentication Context, a User represents someone's login identity. Email, password, security roles, that sort of thing. But in the Booking Context, that same person becomes a Guest with a reservation history. In the Reviews Context, they become a Reviewer with a review history and credibility score. Same person, completely different meanings depending on the context.</p>
<h2 id="heading-the-integration-challenge">The Integration Challenge</h2>
<p>In our previous post, I got pretty enthusiastic about the benefits of splitting our domain into smaller subdomains. We got better modularity. Clearer team responsibilities. Focused development efforts. Improved scalability. These benefits drove the whole microservices movement. The promise of autonomous services that can evolve independently sounds attractive.</p>
<p>But here's the thing nobody talks about upfront. There's a fundamental cost that comes with this separation. That cost is integration complexity.</p>
<p>When we split up what used to be a monolithic domain into multiple bounded contexts, we lose something valuable. The simplicity of everything living in the same process. But the bounded contexts still need to work together. Their models need to interact across context boundaries to deliver complete business functionality. You can't complete a restaurant reservation without accessing restaurant information, user authentication, and notification services.</p>
<p>If we mess up the division, we end up with what people call a "distributed monolith". Services that are physically separated but still tightly coupled logically. This creates all kinds of headaches. Since each change needs coordinated updates across services, teams lose autonomy despite having physical boundaries between the services.</p>
<p>This is exactly why context mapping becomes so critical. It's our strategic approach to managing these integration challenges before they turn into technical disasters.</p>
<p>I've heard this conversation countless times in development teams:</p>
<ul>
<li><p>"Oh, we need some data provided by service Z"</p>
</li>
<li><p>"It's not a problem, we can provide you a REST API endpoint"</p>
</li>
</ul>
<p>Don't get me wrong. Providing an API isn't bad. But it usually leads to a situation where every service calls every other service. Both involved services expose APIs for each other. We propagate tons of data. We don't think about the source of truth. We ignore temporal coupling. Before you know it, you have a mess of interconnected services that are impossible to change independently.</p>
<h2 id="heading-strategy-first-technology-second">Strategy First, Technology Second</h2>
<p>Context mapping is about identifying and defining the relationships between bounded contexts. Here's the key insight: context mapping comes before we start thinking about REST APIs, message brokers, or event streams.</p>
<p>Think of the context map like an architectural blueprint. It answers questions like: Who depends on whom? What kind of relationship should exist between these contexts? How should changes flow through the system? Once we make these strategic decisions, then we can pick the right technical patterns to implement them.</p>
<h2 id="heading-context-mapping-patterns">Context Mapping Patterns</h2>
<p>Strategic DDD gives us a vocabulary of well-established patterns. These patterns describe relationships between bounded contexts. Understanding these patterns is like learning the language of system integration.</p>
<h3 id="heading-upstream-and-downstream">Upstream and Downstream</h3>
<p>Most context relationships aren't symmetrical. There's usually an upstream or a downstream side.</p>
<p>The upstream context provides the contract and has more control over the relationship. Think about an authentication service exposing a REST API. Or a booking service publishing "ReservationConfirmed" events.</p>
<p>The downstream context needs to adapt to the upstream interface. It has less control but more flexibility in how it uses the upstream data. Examples would be a booking service calling an authentication API. Or a notification service subscribing to reservation events.</p>
<p>Some patterns, like Shared Kernel, are symmetrical. Both contexts share equal responsibility and control over the shared elements.</p>
<p>Being familiar with basic terminology, we can go through mapping patterns.</p>
<h3 id="heading-open-host-service-ohs">Open Host Service (OHS)</h3>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1755773693388/f36fc4e7-6d18-4717-801a-bf38d30fe572.png" alt class="image--center mx-auto" /></p>
<p>This pattern shows up when a bounded context provides a public API for mass consumption. The team maintaining the service is always upstream. They define the interface that everyone else has to integrate with. There's typically one well-documented interface that all consumers need to adapt to. Authentication services, notification platforms, and restaurant catalogs often follow this pattern.</p>
<h3 id="heading-published-language">Published Language</h3>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1755773705823/71bd3a15-27bd-4bab-8b61-55f1c0d3d44c.png" alt class="image--center mx-auto" /></p>
<p>Open Host service is usually used with a Published Language. This pattern establishes a well-documented, shared language between bounded contexts. It's similar to the ubiquitous language concept. But where ubiquitous language applies within a bounded context, published language serves as the contract of a bounded context. Systems translate into and out of this published language. This reduces integration complexity when multiple systems need to communicate. It's often combined with open host services and acts like a reverse anti-corruption layer.</p>
<p>Well-documented examples include OpenAPI specifications for REST APIs or AsyncAPI specs for event-driven communication. These specifications define the exact structure, data types, and contracts that all integrating systems must follow.</p>
<h3 id="heading-conformist">Conformist</h3>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1755773720437/2c4b8bbb-94a6-42d1-bec9-70671b0904a1.png" alt class="image--center mx-auto" /></p>
<p>Here, the downstream context just accepts whatever model the upstream provides. No transformation. The downstream context simply takes whatever the upstream gives. This might seem like the easy choice, but be careful. It can create tight coupling that you don't need. Your downstream model might get polluted with concepts that don't really belong there. This makes changes more difficult than they should be.</p>
<h3 id="heading-anti-corruption-layer-acl">Anti-Corruption Layer (ACL)</h3>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1755773778840/cbbc8dac-2430-429c-8fdb-2b99e4c8edce.png" alt class="image--center mx-auto" /></p>
<p>This is the defensive approach. The downstream context creates a translation layer. This layer transforms the upstream model into something that fits its domain. It's more work upfront, but it protects your model from upstream changes. It keeps your domain clean. When the upstream API changes, you only need to update the translation layer.</p>
<h3 id="heading-shared-kernel">Shared Kernel</h3>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1755773802659/c82613f1-af7c-404b-8a4c-76756f433c93.png" alt class="image--center mx-auto" /></p>
<p>Two or more teams physically share a subset of the domain model. Usually through shared code, database schemas, or data structures. This sounds efficient, but it often becomes toxic. Changes require coordination between all teams. You end up with "god objects" that try to serve everyone. You lose the independence that bounded contexts should provide. Use this pattern very sparingly.</p>
<h3 id="heading-partnership">Partnership</h3>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1755773845374/cfa0ca0e-2d01-4e36-96f3-2e57d54f3d40.png" alt class="image--center mx-auto" /></p>
<p>This is more about organization than technology. Teams that depend on each other coordinate their development schedules. They share responsibility for delivery success. It works when teams truly need to move in lockstep. But it can become a bottleneck for independent evolution.</p>
<h3 id="heading-customer-supplier">Customer-Supplier</h3>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1755773860697/8f190294-a68e-4de1-a216-811c24a04756.png" alt class="image--center mx-auto" /></p>
<p>The downstream team has some influence over the upstream team's roadmap. Requirements from the downstream factor into upstream planning. But the upstream team maintains final control over the interface. This creates a more collaborative relationship than pure conformist patterns.</p>
<h3 id="heading-separate-ways">Separate Ways</h3>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1755773923012/bde492fb-161d-44ab-bee7-8442b69da6be.png" alt class="image--center mx-auto" /></p>
<p>Sometimes the best integration is no integration at all. Bounded contexts evolve completely independently with no connection between them. This works particularly well for MVP scenarios. You can defer integration complexity until you validate the core concepts.</p>
<h3 id="heading-big-ball-of-mud-anti-pattern">Big Ball of Mud (Anti-Pattern)</h3>
<p>This is what happens when you ignore context mapping entirely. Everything becomes connected to everything else. Context boundaries disappear. Any change affects multiple parts of the system. Teams constantly fight over shared code. The ubiquitous language becomes meaningless. Development velocity grinds to a halt. It's the distributed monolith taken to its logical extreme.</p>
<h2 id="heading-some-rules-of-thumb-for-context-relationships">Some Rules of Thumb for Context Relationships</h2>
<p>Context mapping requires careful consideration of your specific domain. But some useful guidelines can help with your decisions.</p>
<p>Generic and stable contexts should generally be upstream. Authentication, notifications, and payment systems typically don't change frequently. They can provide reliable contracts that other systems depend on. This helps minimize the impact of changes across your system.</p>
<p>Core subdomains often work best as downstream contexts. They need flexibility to evolve rapidly in response to business changes. When your core domain is downstream, changes in the core don't ripple through other subsystems. This allows your most important business logic to evolve without creating widespread impact.</p>
<h2 id="heading-applying-context-mapping-to-our-restaurant-system">Applying Context Mapping to Our Restaurant System</h2>
<p>Let's examine two key relationships in our restaurant reservation system. We'll explore different integration options. Rather than getting lost in theory, let's see how these choices play out in practice.</p>
<p>We'll provide pseudocode examples for better visualization, but remember - this part is about strategic relationship decisions, not implementation. Implementation should be derived from these strategic decisions, not the other way around.</p>
<h3 id="heading-booking-context-and-notifications-context">Booking Context and Notifications Context</h3>
<p>You can implement the relationship between booking and notifications in two fundamentally different ways. The choice has significant implications for system stability.</p>
<h4 id="heading-option-1-booking-upstream">Option 1: Booking Upstream</h4>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1755774317612/492e53e5-5348-424a-8ddc-88ea4df1280f.png" alt class="image--center mx-auto" /></p>
<p>The Booking context publishes the <code>ReservationConfirmed</code> event, while the Notification context consumes the message and transforms it into a local model.</p>
<pre><code class="lang-python"><span class="hljs-comment"># Booking Context (Upstream)</span>
<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">BookingService</span>:</span>
    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">confirm_reservation</span>(<span class="hljs-params">self, reservation_id</span>):</span>
        <span class="hljs-comment"># Business logic</span>
        self.event_publisher.publish(
            <span class="hljs-string">"ReservationConfirmed"</span>, 
            {
                <span class="hljs-string">"reservation_id"</span>: reservation_id,
                <span class="hljs-string">"guest_email"</span>: <span class="hljs-string">"guest@example.com"</span>,
                <span class="hljs-string">"restaurant_name"</span>: <span class="hljs-string">"Pizza Palace"</span>,
                <span class="hljs-string">"date"</span>: <span class="hljs-string">"2024-01-15"</span>,
                <span class="hljs-string">"time"</span>: <span class="hljs-string">"19:00"</span>
            }
        )

<span class="hljs-comment"># Notifications Context (Downstream)  </span>
<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">NotificationService</span>:</span>
    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">handle_reservation_confirmed</span>(<span class="hljs-params">self, event_data</span>):</span>
        <span class="hljs-comment"># Must know about reservation structure</span>
        self.send_email(
            event_data[<span class="hljs-string">"guest_email"</span>],
            <span class="hljs-string">f"Reservation confirmed at <span class="hljs-subst">{event_data[<span class="hljs-string">'restaurant_name'</span>]}</span>"</span>
        )

    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">handle_review_posted</span>(<span class="hljs-params">self, event_data</span>):</span>
        <span class="hljs-comment"># Needs new handler for each event type</span>
        <span class="hljs-keyword">pass</span>
</code></pre>
<p>This approach makes the Notifications Context unstable. Every time we want to send a new type of notification, the Notifications Context needs to be updated to handle the new event type.</p>
<h4 id="heading-option-2-notifications-upstream">Option 2: Notifications Upstream</h4>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1755774479818/8363abdb-6f3a-41a0-b8f3-58e72355ac3b.png" alt class="image--center mx-auto" /></p>
<p>The Notification context exposes a stable API that is used by the Booking context when a reservation is made.</p>
<pre><code class="lang-python"><span class="hljs-comment"># Notifications Context (Upstream)</span>
<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">NotificationService</span>:</span>
    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">send_notification</span>(<span class="hljs-params">self, user_id, message, channel=<span class="hljs-string">"email"</span></span>):</span>
        <span class="hljs-comment"># Generic, stable interface</span>
        <span class="hljs-keyword">return</span> {<span class="hljs-string">"status"</span>: <span class="hljs-string">"sent"</span>, <span class="hljs-string">"notification_id"</span>: <span class="hljs-string">"123"</span>}

<span class="hljs-comment"># Booking Context (Downstream)</span>
<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">BookingService</span>:</span>
    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">confirm_reservation</span>(<span class="hljs-params">self, reservation_id</span>):</span>
        <span class="hljs-comment"># Business logic</span>
        self.notification_service.send_notification(
            user_id=<span class="hljs-string">"guest_1"</span>,
            message=<span class="hljs-string">"Your reservation at Pizza Palace is confirmed"</span>,
            channel=<span class="hljs-string">"email"</span>
        )
</code></pre>
<p>The choice between these approaches depends on your architectural goals. If you want notifications to be truly generic and stable, make them upstream. If you have a limited set of notification types that don't change often, the event-driven approach might be simpler.</p>
<h3 id="heading-booking-context-and-authentication-context">Booking Context and Authentication Context</h3>
<p>The relationship between booking and authentication contexts shows us three different integration approaches. Each has distinct trade-offs.</p>
<h4 id="heading-option-1-shared-kernel">Option 1: Shared Kernel</h4>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1755774714263/2065c47b-873f-4f6f-9ddf-1ff184bde5f2.png" alt class="image--center mx-auto" /></p>
<p>Both use the same <code>User</code> class shared as a library.</p>
<pre><code class="lang-python"><span class="hljs-comment"># Shared UserModel Library</span>
<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">User</span>:</span>
    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">__init__</span>(<span class="hljs-params">
            self, user_id, email, password_hash, name, 
            dietary_preferences, loyalty_level, registration_date,
        </span>):</span>
        self.user_id = user_id
        self.email = email
        self.password_hash = password_hash
        self.name = name
        self.dietary_preferences = dietary_preferences  <span class="hljs-comment"># Booking needs this?</span>
        self.loyalty_level = loyalty_level              <span class="hljs-comment"># Auth needs this?</span>
        self.registration_date = registration_date      <span class="hljs-comment"># Both need this?</span>

    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">verify_password</span>(<span class="hljs-params">self, password</span>):</span> <span class="hljs-keyword">pass</span>
    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">get_booking_preferences</span>(<span class="hljs-params">self</span>):</span> <span class="hljs-keyword">pass</span>
    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">calculate_loyalty_discount</span>(<span class="hljs-params">self</span>):</span> <span class="hljs-keyword">pass</span>  <span class="hljs-comment"># Mixed responsibilities</span>
</code></pre>
<p>This seems efficient, but it becomes a nightmare. When you change something in the library, all services are affected. The User object accumulates features needed by different services.</p>
<h4 id="heading-option-2-booking-conformist">Option 2: Booking Conformist</h4>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1755774725602/a5e52a0d-bde3-4632-935b-f7a05c847e39.png" alt class="image--center mx-auto" /></p>
<p>The Booking context uses the Authentication context API to verify users and accept the model provided by the upstream context without any modifications.</p>
<pre><code class="lang-python"><span class="hljs-comment"># Authentication Context (Upstream)</span>
<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">UserService</span>:</span>
    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">verify_user</span>(<span class="hljs-params">self, user_id</span>):</span>
        <span class="hljs-keyword">return</span> {
            <span class="hljs-string">"user_id"</span>: <span class="hljs-string">"123"</span>,
            <span class="hljs-string">"email"</span>: <span class="hljs-string">"guest@test.com"</span>, 
            <span class="hljs-string">"name"</span>: <span class="hljs-string">"John Test"</span>,
            <span class="hljs-string">"dietary_preferences"</span>: [<span class="hljs-string">"vegetarian"</span>],
            <span class="hljs-string">"loyalty_level"</span>: <span class="hljs-string">"gold"</span>,
            <span class="hljs-string">"registration_date"</span>: <span class="hljs-string">"2023-01-15"</span>,
            <span class="hljs-string">"last_login"</span>: <span class="hljs-string">"2024-01-10"</span>,
            <span class="hljs-string">"security_role"</span>: <span class="hljs-string">"customer"</span>
        }

<span class="hljs-comment"># Booking Context (Downstream) - stores everything</span>
<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">BookingService</span>:</span>
    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">verify_guest</span>(<span class="hljs-params">self, user_id</span>):</span>
        user_data = self.user_service.verify_user(user_id)
        <span class="hljs-comment"># Stores ALL data, even what booking doesn't need</span>
        guest = Guest(**user_data)  <span class="hljs-comment"># Pollution!</span>
        <span class="hljs-keyword">return</span> guest
</code></pre>
<p>Your booking context gets polluted with user information it doesn't actually need. You're storing email addresses, dietary preferences, and loyalty levels because that's what the upstream service provides.</p>
<h4 id="heading-option-3-booking-implements-acl">Option 3: Booking implements ACL</h4>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1755774740390/35207afd-34ff-405b-9af9-72fb491ee98f.png" alt class="image--center mx-auto" /></p>
<p>The Booking context uses the Authentication context API to verify users and transform the model provided by the upstream context.</p>
<pre><code class="lang-python"><span class="hljs-comment"># Authentication Context (Upstream)  </span>
<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">UserService</span>:</span>
    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">verify_user</span>(<span class="hljs-params">self, user_id</span>):</span>
        <span class="hljs-keyword">return</span> {
            <span class="hljs-string">"user_id"</span>: <span class="hljs-string">"123"</span>,
            <span class="hljs-string">"email"</span>: <span class="hljs-string">"guest@test.com"</span>,
            <span class="hljs-string">"name"</span>: <span class="hljs-string">"John Test"</span>, 
            <span class="hljs-string">"dietary_preferences"</span>: [<span class="hljs-string">"vegetarian"</span>],
            <span class="hljs-string">"loyalty_level"</span>: <span class="hljs-string">"gold"</span>,
            <span class="hljs-string">"registration_date"</span>: <span class="hljs-string">"2023-01-15"</span>,
            <span class="hljs-string">"last_login"</span>: <span class="hljs-string">"2024-01-10"</span>,
            <span class="hljs-string">"security_role"</span>: <span class="hljs-string">"customer"</span>
        }

<span class="hljs-comment"># Booking Context (Downstream) with ACL</span>
<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">Guest</span>:</span>  <span class="hljs-comment"># Domain-specific model</span>
    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">__init__</span>(<span class="hljs-params">self, guest_id, email, is_authenticated</span>):</span>
        self.guest_id = guest_id
        self.email = email
        self.is_authenticated = is_authenticated

<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">UserAdapter</span>:</span>  <span class="hljs-comment"># Anti-Corruption Layer</span>
    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">__init__</span>(<span class="hljs-params">self, user_service</span>):</span>
        self.user_service = user_service

    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">verify_guest</span>(<span class="hljs-params">self, user_id</span>):</span>
        user_data = self.user_service.verify_user(user_id)
        <span class="hljs-comment"># Transform to domain-specific model</span>
        <span class="hljs-keyword">return</span> Guest(
            guest_id=user_data[<span class="hljs-string">"user_id"</span>],
            email=user_data[<span class="hljs-string">"email"</span>], 
            is_authenticated=<span class="hljs-literal">True</span>
        )

<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">BookingService</span>:</span>
    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">__init__</span>(<span class="hljs-params">self, user_adapter</span>):</span>
        self.user_adapter = user_adapter

    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">create_reservation</span>(<span class="hljs-params">self, user_id</span>):</span>
        guest = self.user_adapter.verify_guest(user_id)
</code></pre>
<p>This requires more development effort upfront. You need to write and maintain the transformation logic. But it keeps your domain model clean and isolates you from upstream changes. The ACL approach aligns better with DDD principles because it preserves the distinct meaning of users in different contexts.</p>
<h2 id="heading-wrapping-up">Wrapping Up</h2>
<p>Context mapping takes all those theoretical benefits we talked about in subdomain identification and turns them into real architectural decisions. When you understand these relationship patterns, you can design integration strategies that preserve the autonomy and flexibility you were after in the first place.</p>
<p>Here's the main takeaway: context mapping is strategic work that should drive your technical choices, not the other way around. Don't jump straight to REST APIs or message queues. Figure out the relationship between your bounded contexts first.</p>
<p>These decisions matter more than you might think. They affect how maintainable your system becomes, whether teams can work independently, and how fast you can deliver features. Get them right early and you'll thank yourself later as your system grows and gets more complex.</p>
]]></content:encoded></item><item><title><![CDATA[The Hidden Forces Shaping Our Systems: Cognitive Biases in Software Development]]></title><description><![CDATA[Cognitive biases subtly guide our decisions down paths we often don't anticipate, reminding us that we're far less rational than we'd like to believe]]></description><link>https://jorzel.hashnode.dev/the-hidden-forces-shaping-our-systems-cognitive-biases-in-software-development</link><guid isPermaLink="true">https://jorzel.hashnode.dev/the-hidden-forces-shaping-our-systems-cognitive-biases-in-software-development</guid><category><![CDATA[cognitive bias]]></category><category><![CDATA[software development]]></category><category><![CDATA[General Programming]]></category><dc:creator><![CDATA[jorzel]]></dc:creator><pubDate>Sun, 17 Aug 2025 11:21:05 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/raJrSL-LfVg/upload/992ea66a8db23461a2e342b500234c28.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Cognitive biases subtly guide our decisions down paths we often don't anticipate, reminding us that we're far less rational than we'd like to believe. While we can't completely avoid them, recognizing their influence gives us a better chance to pause, question our instincts, and make choices that serve us — and our teams — more wisely.</p>
<p>We developers love to think we're logical creatures. We debug methodically, we architect systematically, we test rigorously. But here's the uncomfortable truth: our brains are still running the same buggy firmware that helped our ancestors survive on the savanna. And just like any legacy system, it comes with quirks that can significantly impact our code.</p>
<p>Now, there are dozens of cognitive biases out there, and the ones I'm covering here are somewhat arbitrary — probably not even the most common ones in software development. But I've chosen these particular biases because, well, I find them fascinating (if you can say you "like" mental fallacies). More importantly, I think I have a pretty good understanding of how they work and how they show up in our daily coding lives.</p>
<h2 id="heading-sunk-cost-bias-when-your-code-holds-you-hostage">Sunk Cost Bias: When Your Code Holds You Hostage</h2>
<p>You know that feeling when you've been wrestling with a problem for hours, your solution is getting messier by the minute, but you can't bring yourself to start over? That's sunk cost bias doing its dirty work.</p>
<p><img src="https://advanced-hindsight.com/wp-content/uploads/2017/10/SunkCostEffect.jpg" alt="sunk cost bias | Behavioral economics | Duke university" /></p>
<p>source: <a target="_blank" href="https://advanced-hindsight.com/blog/b-e-dogs-sunk-cost/">https://advanced-hindsight.com/blog/b-e-dogs-sunk-cost/</a></p>
<p>This bias convinces us to keep going down a path because we've already invested time or money, even when starting fresh would be smarter. The thinking goes: "I can't abandon this now — look how much I've already put into it!" <a target="_blank" href="https://www.amazon.com/Essentialism-Disciplined-Pursuit-Greg-McKeown/dp/0804137382">Greg McKeown warns in "Essentialism"</a> that sunk cost bias is particularly dangerous because it traps us in a vicious cycle where we keep investing more resources to justify what we've already spent, making the problem worse instead of better.</p>
<p>The antidote is learning to step back and reflect. Ask yourself this refreshing question: "If I were starting this project tomorrow, would I follow this same path again?" If the answer is no, you might be throwing good effort after bad.</p>
<p>Here's how it shows up in our daily work:</p>
<p><strong>Code is not an asset.</strong> You know that function you wrote six months ago that nobody uses anymore? The one that's confusing everyone who reads it? We keep it around because "hey, we might need it someday." Meanwhile, it's making the codebase harder to understand and maintain.</p>
<p><strong>We nurse dying codebases way past their expiration date.</strong> I've seen teams spend years patching up systems held together with digital duct tape, all because "we've already invested so much in this thing." Sometimes the kindest thing you can do is put the old system out of its misery and start fresh.</p>
<p>The trick is learning when to walk away, even when it hurts. Sometimes the most expensive code is the code you keep.</p>
<h2 id="heading-survivorship-bias-why-success-stories-lie">Survivorship Bias: Why Success Stories Lie</h2>
<p>Here's a story that'll make you think twice about those "how we scaled to millions of users" blog posts. During the Second World War, Abraham Wald was asked to figure out where to put armor on military aircraft. Officials wanted to reinforce the spots where returning planes had bullet holes. Wald said "nope" — armor the spots <em>without</em> holes, because planes hit there never made it back to tell their story.</p>
<p><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/b/b2/Survivorship-bias.svg/500px-Survivorship-bias.svg.png" alt class="image--center mx-auto" /></p>
<p>source: <a target="_blank" href="https://en.wikipedia.org/wiki/Survivorship_bias">https://en.wikipedia.org/wiki/Survivorship_bias</a></p>
<p>We only hear from the survivors.</p>
<p><a target="_blank" href="https://www.amazon.com/Black-Swan-Improbable-Robustness-Fragility/dp/081297381X/">Nassim Taleb calls this the "Casanova effect" in "The Black Swan"</a>. The legendary lover becomes famous for his conquests, but we never hear about all the times he struck out — or about all the other would-be Casanovas who tried the same techniques and failed. This survivorship bias leads us to focus on successful outcomes while completely ignoring the failures that were also part of the process. We get a skewed perception of what works because we only see the individuals or ventures that made it through — not the many who didn't.</p>
<p>What's worse, we underestimate the influence of luck and context. We read success stories and try to copy their advice, forgetting that our situation is different and that context is crucial for success.</p>
<p>In our world, this plays out in some pretty predictable ways:</p>
<p><strong>We only study the success stories.</strong> When we're researching architecture decisions, we read about companies that scaled successfully with microservices or NoSQL databases. But we don't hear from the dozens of teams that tried the same approach and ended up with an unmaintainable mess. The failures usually don't write blog posts or give conference talks, so we get a completely skewed view of what works (However, you can find some exceptions).</p>
<h2 id="heading-confirmation-bias-our-personal-echo-chambers">Confirmation Bias: Our Personal Echo Chambers</h2>
<p>Let's be honest — we don't want to prove ourselves wrong. Our brains are like overeager junior developers who only run the happy-path tests.</p>
<p>When we latch onto an idea, we start cherry-picking evidence that supports it while conveniently ignoring anything that doesn't. It's not that we're lying to ourselves (well, not intentionally). We're just really good at finding reasons why we were right all along.</p>
<p>This shows up everywhere:</p>
<p><strong>We fall in love with our first solution.</strong> Found an approach that seems to work? Great! Now let's spend zero time trying to poke holes in it or considering alternatives. Why waste time on a proper pros-and-cons analysis when we could just start coding? (Spoiler alert: finding problems on paper is way cheaper than finding them in production.)</p>
<p><strong>We become creatures of habit.</strong> When you've got a hammer that's worked before, everything starts looking suspiciously nail-shaped. Pretty soon, you're using the same patterns for every problem, whether they fit or not.</p>
<h2 id="heading-hindsight-bias-monday-morning-quarterbacking">Hindsight Bias: Monday Morning Quarterbacking</h2>
<p>You know how experts always seem so smart when they explain what happened after the fact? Everything feels obvious in reverse. This is hindsight bias at work — our tendency to perceive past events as more predictable than they were when they were happening.</p>
<p>It's like watching a movie for the second time. All the plot twists that surprised you initially now seem telegraphed from the opening scene. Your brain reconstructs the past with the benefit of knowing how everything turned out, making it feel like the outcome was inevitable all along.</p>
<p><a target="_blank" href="https://www.amazon.com/Superforecasting-Science-Prediction-Philip-Tetlock/dp/0804136718/">Philip Tetlock demonstrated in "Superforecasting"</a> just how terrible we are at predicting the future, yet we're all geniuses at explaining the past. Once we know what happened, we unconsciously rewrite our memory of what we thought would happen. The uncertainty, the multiple possibilities, the genuine confusion we felt at the time — all of that gets smoothed over by our brain's desire to create a coherent narrative.</p>
<p>This creates a dangerous illusion: we become overconfident in our ability to predict future events because we misremember how obvious past events were.</p>
<p>This one hits close to home:</p>
<p><strong>We judge legacy code like armchair architects.</strong> You crack open some old system and think, "What idiot wrote this garbage?" But here's the thing — you don't know what constraints they were working under. Maybe it was the best solution possible given the timeline, the team, and the technology available at the time.</p>
<p><strong>Every outage becomes obvious in hindsight.</strong> After a deployment goes sideways, managers love to say things like "the warning signs were all there." Were they, though? Because I'm pretty sure if they were obvious, someone would have caught them before they took down production. Post-mortems have this nasty habit of oversimplifying complex failures, which leads to prevention plans that miss the real complexity.</p>
<h2 id="heading-egocentric-bias-the-skewed-first-person-perspective">Egocentric Bias: The Skewed First-Person Perspective</h2>
<p>Egocentric bias stems from what psychologists call the "first-person delusion" — our natural tendency to view the world primarily through our own experiences. We have direct, vivid access to our thoughts and efforts, but only indirect access to others'.</p>
<p>This creates the "better than average" effect. When researchers ask married couples what percentage of household chores they handle, the numbers routinely add up to more than 100%. Each spouse vividly remembers their work, while others' efforts fade into the background noise.</p>
<p><a target="_blank" href="https://www.amazon.com/Originals-How-Non-Conformists-Move-World/dp/014312885X/">Adam Grant shares workplace examples in "Originals"</a>: 94% of college professors believe their work is above average, and 32% of engineers in one company thought they were top 5% performers. This isn't ego — it's the fundamental asymmetry of human perspective.</p>
<p>In our day-to-day work, this shows up as:</p>
<p><strong>We remember our heroics in HD.</strong> That time you stayed late to fix a critical bug? Crystal clear. The three times your teammate did the same thing? Kinda fuzzy. It's not that we're selfish — our own experiences just have better production values in our mental highlight reel.</p>
<p><strong>We think we're immune to bias.</strong> This is the sneaky one. We can spot irrational decisions in other people's code all day long, but somehow our own choices always seem perfectly reasonable. It's like being able to see everyone else's blind spots except your own.</p>
<p>The first-person perspective also means we judge our own mistakes more charitably than others'. When we write confusing code, we remember the time pressure and unclear requirements that led to compromises. When we encounter someone else's confusing code, we're more likely to attribute it to poor skills or careless thinking.</p>
<h2 id="heading-building-better-code-by-embracing-our-flaws">Building Better Code by Embracing Our Flaws</h2>
<p>Look, I'm not suggesting we all become paralyzed by self-doubt or start second-guessing every decision we make. These biases aren't bugs to be fixed — they're features of being human, even if they're sometimes annoying features.</p>
<p>But here's what I've learned: the developers I most respect aren't the ones who never make mistakes. They're the ones who've figured out how to catch themselves making predictable mistakes. They build in friction where they know they're likely to go wrong. They ask for fresh eyes when they know they're too close to a problem. They document their reasoning so future teams (including future versions of themselves) can understand why certain decisions made sense at the time.</p>
<p>The goal isn't to become a perfectly logical machine. It's to become a human who knows they're human.</p>
<hr />
<p>If you're curious to dive deeper into this fascinating world of cognitive biases, I can't recommend two books enough: <a target="_blank" href="https://www.amazon.com/Thinking-Fast-and-Slow-audiobook/dp/B005Z9GAJG/">"Thinking, Fast and Slow" by Daniel Kahneman</a> and <a target="_blank" href="https://www.amazon.com/Black-Swan-Second-Improbable-Robustness/dp/B07KRM6L52/">"The Black Swan" by Nassim Nicholas Taleb</a>. Both are incredible sources for understanding how our minds work — and how they sometimes work against us.</p>
]]></content:encoded></item><item><title><![CDATA["How Many Tennis Balls Fit in a Bus?" – Why Weird Interview Questions Sometimes Make Sense]]></title><description><![CDATA[Why Weird Interview Questions Sometimes Make Sense]]></description><link>https://jorzel.hashnode.dev/how-many-tennis-balls-fit-in-a-bus-why-weird-interview-questions-sometimes-make-sense</link><guid isPermaLink="true">https://jorzel.hashnode.dev/how-many-tennis-balls-fit-in-a-bus-why-weird-interview-questions-sometimes-make-sense</guid><category><![CDATA[interview]]></category><category><![CDATA[interview questions]]></category><category><![CDATA[interview preparations]]></category><category><![CDATA[Thinking]]></category><dc:creator><![CDATA[jorzel]]></dc:creator><pubDate>Tue, 22 Jul 2025 20:32:04 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/eF7HN40WbAQ/upload/7ce410ecb8da7bb2c51f5bc4198e1fde.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I have just seen <a target="_blank" href="https://www.linkedin.com/posts/renata-burska_rekrutacja-rozmowarekrutacyjna-hrpolska-activity-7351947865134379008-xMmF?utm_source=share&amp;utm_medium=member_desktop&amp;rcm=ACoAABJGjxIBHr57JHFtJrrlT4dEg19OhMfp8As">someone on LinkedIn astonished</a> about being asked: "How many tennis balls can fit in a bus?" during a job interview. Many people think these questions don't make sense, but here's why they're actually valuable.</p>
<p>The goal isn't to get the exact right answer – it's to show your thinking process.</p>
<p>For the bus example, you might approach it like this:</p>
<ul>
<li><p>Assume a bus is 6m long, 2.5m high, and 2m wide = 30m³ of volume</p>
</li>
<li><p>A tennis ball has roughly 4cm in diameter</p>
</li>
<li><p>For a quick approximation, treat it as a cube: 0.04m × 0.04m × 0.04m = 0.000064m³</p>
</li>
<li><p>Divide: 30 ÷ 0.000064 ≈ 500,000 balls</p>
</li>
</ul>
<p>This method is known as a <a target="_blank" href="https://en.wikipedia.org/wiki/Fermi_problem">Fermi problem</a> – named after physicist Enrico Fermi, who was renowned for making remarkably accurate estimates with minimal data. The key is breaking complex questions into smaller, manageable parts and making reasonable estimates.</p>
<p>Fermi problems teach you to:</p>
<ul>
<li><p>Work with incomplete information</p>
</li>
<li><p>Make logical assumptions</p>
</li>
<li><p>Think systematically under pressure</p>
</li>
<li><p>Accept that "roughly right" is often better than "precisely wrong".</p>
</li>
</ul>
<p>If your initial assumptions are close (bus volume, ball size), your final answer can be surprisingly accurate – often within an order of magnitude of the real answer.</p>
<p>Try it yourself:</p>
<ul>
<li><p>How many pianos are sold per year in the USA?</p>
</li>
<li><p>How many dentist appointments do people have per month in Spain? How many gas stations are there in your city?</p>
</li>
</ul>
<p>These questions reveal how you think, not what you know – plus how you behave in surprising situations. Whether you're able to ask proper clarifying questions (is the bus empty or full of people? etc.) shows critical thinking skills.</p>
]]></content:encoded></item></channel></rss>