<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator>
  <link href="https://alexoliveira.cc/atom.xml" rel="self" type="application/atom+xml" />
  <link href="https://alexoliveira.cc/" rel="alternate" type="text/html" />
  <updated>2026-04-06T02:23:15+00:00</updated>
  <id>https://alexoliveira.cc/atom.xml</id>
  <title type="html">Alex Oliveira</title>
  <subtitle>Software, Systems and Thinking.</subtitle>
  
  <author>
    <name>Alex Oliveira</name>
  </author>
  

  
    
    <entry>
      <title type="html">Code agents in 2026</title>
      <link href="https://alexoliveira.cc/guide/code-agents-in-2026" rel="alternate" type="text/html" title="Code agents in 2026" />
      <published>2025-12-16T14:00:00+00:00</published>
      <updated>2025-12-16T14:00:00+00:00</updated>
      <id>https://alexoliveira.cc/guide/code-agents-in-2026</id>
      <content type="html" xml:base="https://alexoliveira.cc/guide/code-agents-in-2026">&lt;p&gt;I’ve been using Claude Code as my primary coding assistant for a while now. More recently, I managed to start a flywheel effect and have the AI code full solutions with as little interventions as possible by leveraging subagents and skills to prevent context rot and keep agents under strict control.&lt;/p&gt;

&lt;p&gt;This guide distills the patterns that have worked for me.&lt;/p&gt;

&lt;h2 id=&quot;patterns&quot;&gt;Patterns&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Be hyper specific:&lt;/strong&gt; For great results, your prompt inevitably needs to be long and complete because agents need to know exactly what you want. Claude follows instructions literally, so vague requests get vague results.&lt;/p&gt;

&lt;p&gt;It follows that if you’re going to invest in great prompting at every checkpoint, you will need to save your prompts. Not like in the old days, where we kept saved snippets around as copy/pasta. Instead,&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;leverage &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;CLAUDE.md&lt;/code&gt;: have a great, general memory file you can reuse. You can copy &lt;a href=&quot;/guide/my-universal-code-prompt&quot;&gt;my universal coding prompt&lt;/a&gt; if you want a system prompt that works well across the board.&lt;/li&gt;
  &lt;li&gt;use skills: these are recipes that agents pull based on what they’re doing.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I’ve had great experience using a Voice-to-Text app like &lt;a href=&quot;https://aquavoice.com&quot;&gt;Aqua&lt;/a&gt;. Aside from outputting words faster than typing, I find myself rambling a bit longer, which ends up sharing more of my intent with the AI. Uncertainties also come out and help inform the planner on approaches.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;State your intent:&lt;/strong&gt; A single sentence explaining what the output is for changes how Claude approaches the task. “I plan to build X on top of this feature” or “This app is low load so don’t care about optimizations” are useful information. The purpose shapes approach, depth, and what gets emphasized during its thinking.&lt;/p&gt;

&lt;p&gt;One example: my personal app has to send a notification via Telegram, and later WhatsApp. Claude’s first approach was calling a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;TelegramClient&lt;/code&gt; straight from a business class. Not great, as it will force refactoring and rework later. By stating that I wanted a second channel in the future and to use an adapter pattern, it (1) added a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;MessagingChannel&lt;/code&gt; class as interface between Telegram and the business domain, and (2) updated the documentation to state how the architecture should look like.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Examples are instructions:&lt;/strong&gt; When you provide a sample, Claude treats it as a template. This works both ways, and a sloppy example produces sloppy output. Be deliberate about what you show.&lt;/p&gt;

&lt;p&gt;A good example is my &lt;a href=&quot;https://github.com/kurko/dotfiles/blob/f0d082e3430ee7e21244a82b18d6a5857310e30f/ai/skills/code-review/skill.md?plain=1#L231-L242&quot;&gt;code-review skill&lt;/a&gt;. The file has precise examples on output format and real-world scenarios it should look out for.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Chunk the work:&lt;/strong&gt; Long tasks work better as a series of checkpoints than as a single “do everything” request. The longer the AI works in one go, the higher the chance it will stray away from the original intent. Ask for one piece, verify it, then continue. The model stays more coherent and you catch mistakes early.&lt;/p&gt;

&lt;p&gt;Overall, what works for me is establishing a doc with a general architecture (as &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;CLAUDE.md&lt;/code&gt;) that guides the whole operation, and a product doc that explains the app’s rationale (e.g &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;docs/prd.md&lt;/code&gt;). From that high level, don’t descend to the &lt;em&gt;“create this button”&lt;/em&gt; level, but rather state your end goal for the feature and ask it to break it down (e.g “I want the app to fetch calendar events once a day and store in a new table”). Claude’s &lt;em&gt;Plan Mode&lt;/em&gt; is great for breaking down that problem and creating to-dos for execution.&lt;/p&gt;

&lt;p&gt;A sophisticated approach is (1) asking Claude Code to break down that &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;docs/prd.md&lt;/code&gt; into tasks and put them somewhere like &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;todo.md&lt;/code&gt; (if you don’t yet, use my skill, &lt;a href=&quot;https://github.com/kurko/dotfiles/blob/d8b2da7e17dd561c7a5819d1219687f13a4c770b/ai/skills/working-off-of-todo-files/skill.md?plain=1&quot;&gt;working-off-of-todo-files&lt;/a&gt;). Then tell Claude to work on the next task &lt;em&gt;in Plan Mode&lt;/em&gt;. Review the plan, ask for specifics e.g method names and what tests will be written, and then let it roll.&lt;/p&gt;

&lt;h2 id=&quot;start-a-flywheel-effect&quot;&gt;Start a flywheel effect&lt;/h2&gt;
&lt;p&gt;&lt;span class=&quot;subtitle&quot;&gt;Have an end-to-end protocol and see agents working on their own for longer.&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;If you could force Claude to self-correct based on a predefined quality heuristic, it would work for 30-60 minutes on its own and still produce good quality code.&lt;/p&gt;

&lt;p&gt;The main challenge is the probabilistic nature of agents. They may or may not produce what you expect. You have to nudge and push them in a particular direction, like a junior developer.&lt;/p&gt;

&lt;p&gt;The loop that worked great for me follows these steps:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;One task at a time: have a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;todo.md&lt;/code&gt; file, and tell the agent to work on the next one only&lt;/li&gt;
  &lt;li&gt;Plan Mode: get a detailed plan for that task.&lt;/li&gt;
  &lt;li&gt;Test skill: make sure the agent writes great tests, they are your deterministic point of reference, effectively your acceptance criteria.&lt;/li&gt;
  &lt;li&gt;Let it cook: let the AI work with Auto-accept Edits on.&lt;/li&gt;
  &lt;li&gt;Code review: let the agent review its own generated code using a skill you have defined. It will self-correct.&lt;/li&gt;
  &lt;li&gt;Run tests: this is the determinism phase, and will ensure the agent fixes its own problems.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I had sessions where the agent worked on its own for 30-60 minutes and the final result was acceptable. The elements that finally made it possible in 2025 were (a) Anthropic’s Opus 4.5, (b) the testing skill and running specs, and (c) a code review flow.&lt;/p&gt;

&lt;p&gt;My &lt;a href=&quot;https://github.com/kurko/dotfiles/blob/d8b2da7e17dd561c7a5819d1219687f13a4c770b/ai/skills/rspec-rails/SKILL.md?plain=1&quot;&gt;rspec-rails skill&lt;/a&gt; guides the agent towards better tests, ones that use distinct &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;context&lt;/code&gt; blocks and make it think further about dependencies. The test failures serve as point of reference for the agent to self-correct.&lt;/p&gt;

&lt;p&gt;The final trick is a review process at the end. For Rails codebases, I have &lt;a href=&quot;https://github.com/kurko/dotfiles/blob/f0d082e3430ee7e21244a82b18d6a5857310e30f/ai/skills/code-review/skill.md?plain=1#L231-L242&quot;&gt;this code-review skill&lt;/a&gt; that works wonders.&lt;/p&gt;

&lt;h2 id=&quot;skills-recipes-as-prompt&quot;&gt;Skills: Recipes as prompt&lt;/h2&gt;

&lt;p&gt;Remember when you had to save long prompts to reuse later? Skills solve that. They load only when needed, automatically. Think of them as specialized tools you pull out for specific jobs.&lt;/p&gt;

&lt;p&gt;As your agent executes during those 30 minutes, it will figure out whether there’s any relevant skill to be used, and will pull those automatically into context. It will follow your instructions more effectively without you having to write an endless initial prompt.&lt;/p&gt;

&lt;p&gt;They differ from commands because you don’t need to trigger them yourself.&lt;/p&gt;

&lt;p&gt;Skills are how my agents stopped producing slop. My most useful skills right now are: writing tests; reviewing its own code; working off of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;todo.md&lt;/code&gt;; practicing TDD when a bug is found.&lt;/p&gt;

&lt;h2 id=&quot;subagents-fighting-context-rot&quot;&gt;Subagents: Fighting context rot&lt;/h2&gt;

&lt;p&gt;This is where things get interesting. Subagents run in their own context, do their work, and return results to the main agent, keeping the main conversation clean.&lt;/p&gt;

&lt;p&gt;Why does this matter? Context rot. The longer a conversation goes, the more diluted your instructions become. By offloading exploration, research, and specialized tasks to subagents, you keep the main thread focused. Realistically, as you approach 40% of the context window you should start seeing substantial loss in effectiveness.&lt;/p&gt;

&lt;p&gt;All you have to do is write, “using subagents, do X”. My &lt;em&gt;code-review&lt;/em&gt; skill tells the agent to trigger &lt;em&gt;subagents&lt;/em&gt; to perform those reviews. All files are open and tests run by that subagent, and none of those tokens go into the main context.&lt;/p&gt;

&lt;p&gt;Examples of when I spawn subagents:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;exploring codebase: “Read all files from bin using subagents and give me a summary”&lt;/li&gt;
  &lt;li&gt;running tests: “Run and fix tests using subagents”&lt;/li&gt;
  &lt;li&gt;researching documentation: “read docs/ using subagent and figure out which one is useful for this problem”&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;parallelism&quot;&gt;Parallelism&lt;/h2&gt;

&lt;p&gt;When a task takes 2-5 minutes, that’s when &lt;em&gt;flow&lt;/em&gt; is the worst. You lack time to look elsewhere, you can’t spin up two terminals side-by-side and work in parallel productively. If you go check Slack and get back later, much more time has passed. Wasted time.&lt;/p&gt;

&lt;p&gt;When the average lifecycle crosses 20 minutes, though, things change. Suddenly you’re able to work on multiple projects or tasks at once because you can focus for longer. In my estimation, that moment has arrived and only much later the industry will feel its impact.&lt;/p&gt;

&lt;p&gt;On the one hand, regular developers will keep copying/pasting AI code between apps, or praying to the church of the &amp;lt;tab&amp;gt;&amp;lt;tab&amp;gt;&amp;lt;tab&amp;gt;. Junior developers will struggle to make it into the market because they lack judgment necessary to review great code. Interviews will be less about algorithms and knowledge, and more about critical thinking and abstract problem management.&lt;/p&gt;

&lt;p&gt;On the other hand, advanced engineers will figure out how to tame AIs and work on 4-5 tasks or projects in parallel. They will pioneer a new role that mixes skillsets from PMs (managing requirements), managers (communicate vision unambiguously) and architects (judging technical plans end-to-end). They will be in another league.&lt;/p&gt;

&lt;p&gt;The tricks above are the seeds to ensure agents can run on their own, with as little handholding as possible. I also believe strongly that the determinant element to prevent the house of cards from falling is automated tests. They represented the guardrails in the past, and will become even more important.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Protip:&lt;/strong&gt; I get distracted when agents are running, and notifications don’t work for me. I found a killer setup that holds my focus: when the agent finishes, it triggers a hook that makes my Tmux pane’s background &lt;span style=&quot;color: orange&quot;&gt;&lt;em&gt;orange&lt;/em&gt;&lt;/span&gt;. It’s ugly as hell, but my eyes can’t simply &lt;span style=&quot;color: orange&quot;&gt;&lt;em&gt;not look at it&lt;/em&gt;&lt;/span&gt;. This has kept me in the flow while working in parallel.&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;Opus 4.5 pushed us into a land of rarer hallucinations, especially when it’s kept under a tight leash with an iterative process. Agents still won’t produce what you expect, though, without hyper-specific prompts and context rot prevention.&lt;/p&gt;

&lt;p&gt;For those who want to maximize their effectiveness, a setup for parallel execution is as close as we can get to the agent’s holy grail.&lt;/p&gt;</content>

      

      
        <summary type="html">A practical guide to getting the most out of Claude Code, from prompting techniques to leveraging subagents for cleaner context.</summary>
      

      

      
        <category term="ai" />
      
        <category term="llm" />
      
        <category term="programming" />
      
        <category term="claude-code" />
      

      
        <category term="obsidian" />
      
        <category term="guide" />
      
    </entry>
    
  
    
    <entry xml:lang="en">
      <title type="html">Five Days on the Kumano Kodo</title>
      <link href="https://alexoliveira.cc/essay/five-days-on-the-kumano-kodo" rel="alternate" type="text/html" title="Five Days on the Kumano Kodo" />
      <published>2025-10-03T07:00:00+00:00</published>
      <updated>2025-10-03T07:00:00+00:00</updated>
      <id>https://alexoliveira.cc/essay/five-days-on-the-kumano-kodo</id>
      <content type="html" xml:base="https://alexoliveira.cc/essay/five-days-on-the-kumano-kodo">&lt;p&gt;It’s 9:00 am, September 29, &lt;em&gt;Takijiri-oji&lt;/em&gt; (滝尻王子). The river runs shy between the rocks and mirrors the forest, with mountains rising behind it. I hear a faint bell ringing somewhere up the slope while two hikers pass and disappear into the cedar shade. I set a boot on a stone step braided with roots, take a long breath, and let it out.&lt;/p&gt;

&lt;p&gt;People have walked the &lt;em&gt;Kumano Kodo&lt;/em&gt; (熊野古道) hills for a thousand years. I came for five days of walking and a mental reset I couldn’t quite define. I don’t know yet that the stairs will go on for hours, whether I’ll encounter bears, or if I’ll arrive before sunset. I only know the pack sits on my back, my breath is steady, and my eyes aim at the trail.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;“Is one of these the one we’ll climb”?&lt;/em&gt; I wonder. When our &lt;a href=&quot;https://www.balsamicojam-nankiwakayama.com/kumano-winery-guest-house&quot; target=&quot;winery-airbnb&quot;&gt;Airbnb host&lt;/a&gt; dropped us at the trailhead this morning, the mountains looked imposing and impenetrable, steep like a wall. Last night at dinner, another guest who had walked from &lt;em&gt;Takijiri-oji&lt;/em&gt; to &lt;em&gt;Takahara&lt;/em&gt; (高原) tried to dissuade us from starting here. They vehemently argued we should skip this section. I sipped wine and shrugged: &lt;em&gt;“where would the fun be in that? I traveled around the planet for this”&lt;/em&gt;.&lt;/p&gt;

&lt;figure&gt;
	&lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day1/L1001110.jpeg&quot; class=&quot;mobile-zoom&quot; loading=&quot;lazy&quot; fetchpriority=&quot;low&quot; /&gt;
	&lt;figcaption&gt;&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;figure&gt;
	&lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day1/L1001112.jpeg&quot; class=&quot;mobile-zoom&quot; loading=&quot;lazy&quot; fetchpriority=&quot;low&quot; /&gt;
	&lt;figcaption&gt;A shy river, mountains ahead&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;h2 id=&quot;a-total-reset&quot;&gt;A total reset&lt;/h2&gt;
&lt;p&gt;&lt;span class=&quot;subtitle&quot;&gt;Disconnecting from routine&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;The idea of a total reset had been circling my mind for quite some time, a need to disconnect from routine, tune out the noise, and reconnect with my own thoughts. The &lt;em&gt;Kumano Kodo&lt;/em&gt; trails in Japan felt like the right backdrop for that experiment. I assumed the effort would be rewarded by shrines. I didn’t know yet that the walk itself would become the destination, and each step a small arrival.&lt;/p&gt;

&lt;p&gt;For thousands of years, these trails have guided pilgrims toward sacred temples and connected walkers in search of meaning, or just adventure. While walking those paths for five days in search of the latter, I may have stumbled upon a little of the former.&lt;/p&gt;

&lt;p&gt;The absence of Switzerland’s turquoise lakes or the dramatic Alps of France meant the landscape wouldn’t steal the spotlight, it would walk beside me instead, like a quiet companion. Yet, by the final day, all I wanted was to start again. Those soft, green mountains held more beauty than I expected.&lt;/p&gt;

&lt;p&gt;From the start, this had to be a distraction-free walk. Even when the idea was still forming, it was clear that I wanted full immersion: no social media, no podcasts, no music. Just the here and the now. No autopilot, only awareness.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day1/L1001143.jpg&quot; loading=&quot;lazy&quot; fetchpriority=&quot;low&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;day-1-takijiri-oji-to-chikatsuyu&quot;&gt;Day 1: Takijiri-oji to Chikatsuyu&lt;/h2&gt;
&lt;p&gt;&lt;span class=&quot;subtitle&quot;&gt;Finding the rhythm of the path&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;The walk starts off climbing a staircase with steps twice the regular height, and I feel a slight burn in my thigh. It’s just a warm up. At first, my wife and I are enchanted by the beauty and historical significance of this place. &lt;em&gt;“Lots of photography opportunities”&lt;/em&gt;, I think. You don’t see rocky stairs intertwined with tree roots like these anywhere.&lt;/p&gt;

&lt;p&gt;The staircase &lt;em&gt;never stops&lt;/em&gt;. We’re ten, thirty, fifty minutes in and it’s an endless, tough ascent. After 656 feet of elevation (200 meters), my body is protesting loudly, &lt;em&gt;“what the hell are you doing, Alex?”&lt;/em&gt;. The initial climb is sudden, dramatic and slow, but a smile escapes me when I remember &lt;a href=&quot;https://www.youtube.com/watch?v=1Alw5RPxMEU&quot;&gt;Tom ascending to heaven in an infinite staircase&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;After a while, the stairs morph into marble-sized little rocks. Every step is a meticulous task of positioning the foot properly, as if my ankles are dancing. The physical intensity is only matched by the mental challenge of choosing where to tread among the infinity of roots. Think of tetris, but with your feet.&lt;/p&gt;

&lt;p&gt;Light rain needles through the canopy, forming dots on my forearms. &lt;em&gt;“Uh oh”&lt;/em&gt;, I exhale, hoping to stay on a dry path.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day1/L1001176.jpeg&quot; loading=&quot;lazy&quot; fetchpriority=&quot;low&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day1/L1001192.jpeg&quot; class=&quot;mobile-zoom&quot; loading=&quot;lazy&quot; fetchpriority=&quot;low&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day1/L1001184.jpeg&quot; class=&quot;mobile-zoom&quot; loading=&quot;lazy&quot; fetchpriority=&quot;low&quot; /&gt;&lt;/p&gt;

&lt;p&gt;After a brutal initial ascent, we reach a flat section where we can accelerate and keep a better pace. The watch displays 10:42am and 1,040 feet of elevation gain (317m). After 3.44km, heart rate drops to 111bpm. The knot in my throat disappears and I can breathe again. The rain stopped and I realized it’s been a while since I thought about it.&lt;/p&gt;

&lt;figure&gt;
&lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day1/L1001209.jpeg&quot; loading=&quot;lazy&quot; /&gt;
&lt;figcaption&gt;A flat section, a relief for the glutes&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;figure&gt;
&lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day1/L1001221.JPG&quot; loading=&quot;lazy&quot; /&gt;
&lt;figcaption&gt;A small detour in the woods to the Iimoriyama observation deck (飯盛山展望台)&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;figure&gt;
&lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day1/L1001227.jpeg&quot; loading=&quot;lazy&quot; /&gt;
&lt;figcaption&gt;We are rewarded with astonishing views&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;Half an hour later, we step on asphalt and arrive in a small village with an open space where walkers rest. The gradient  horizon reveals mountains stretching further away, alternating like a folder cabinet containing ancient history. The view is the reward.&lt;/p&gt;

&lt;p&gt;The trail from here bifurcates on to &lt;em&gt;Takahara&lt;/em&gt; (a short 1km trip), or to &lt;em&gt;Chikatsuyu&lt;/em&gt; for another 8.5km, our original plan. The place has toilets, seats, tables, a vending machine full of sold out drinks, a &lt;a href=&quot;https://maps.app.goo.gl/9tvZgwJ85RSh28TG7&quot;&gt;cute cat&lt;/a&gt;, and pay phone available. We admire the distance for a good 30 minutes, absorbing the significance of where we are.&lt;/p&gt;

&lt;figure&gt;
&lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day1/L1001377.JPG&quot; class=&quot;mobile-zoom-200&quot; loading=&quot;lazy&quot; /&gt;
&lt;figcaption&gt;Strategic point of sale for walkers. Coffee tastes fresh.&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;&lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day1/L1001343.JPG&quot; loading=&quot;lazy&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The clock displays 12:38pm. The forecast shows rain incoming again, and our legs already climbed 1,686 feet (514 meters). We do have time to walk to &lt;em&gt;Chikatsuyu&lt;/em&gt;, we just need to keep a decent pace and to reach the guesthouse we’ll be staying at before 5pm.&lt;/p&gt;

&lt;p&gt;We ponder on the alternative of taking a bus from here because if it starts raining, the lime stones get really dangerous. I sip my coffee, bought from a local tent shop, and shrug, &lt;em&gt;“where would the fun be in that? We travelled around the planet for the challenge”&lt;/em&gt;. And so we decide to continue.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day1/L1001290.JPG&quot; loading=&quot;lazy&quot; /&gt;&lt;/p&gt;

&lt;p&gt;After resting for half an hour, we get back into the trail to &lt;em&gt;Chikatsuyu&lt;/em&gt; and meet another steep ascent. This time, it’s not a staircase, but a flat, sloped surface that makes your shin muscles burn. 15 minutes in and it feels extremely tiresome.&lt;/p&gt;

&lt;p&gt;The tiredness isn’t the problem (I expected exhaustion, so I won’t dwell on that). It’s the brain asking how long until it gets easy, or how long until the pain stops. That’s not really useful thought, though. First, we have barely started, so c’mon already. Second, it’s a waste of mental energy to ponder about things you can’t change, or the path that has been planned a long ago. Where we are now is just a zone of discomfort and the right thing to do is to push the body forward. That’s the focus that matters.&lt;/p&gt;

&lt;div class=&quot;asterisks&quot;&gt;***&lt;/div&gt;

&lt;p&gt;Our hectic arrival in Japan after a 10-hour, sleepless flight added a layer of complexity and mental exhaustion to this walk. When we landed in Tokyo, we had about 24 hours to go through immigration, travel another 12 hours by train, sleep, pack, buy gear, and figure out where to get bear spray. Oh boy, don’t even get me started on the bear spray adventure.&lt;/p&gt;

&lt;p&gt;In &lt;em&gt;Tanabe&lt;/em&gt; the evening before the walk, our taxi driver ignored our directions and drove us somewhere else, stressing us out and making us late to our Airbnb. We put our host on the speaker at some point, and even he got mad at the driver for ignoring him and not knowing basic information about routes.&lt;/p&gt;

&lt;p&gt;At some point, as we rode uphill on dark roads, I conceded the possibility that he’d drop us in the middle of nowhere. &lt;em&gt;“How am I telling my wife we’re sleeping by the road tonight”?&lt;/em&gt; I don’t understand Japanese, but I do understand a taxi driver yelling on his phone to an unknown person, &lt;em&gt;“something something gaijin, something gaijin”&lt;/em&gt;. I learned from the series &lt;em&gt;Shogun&lt;/em&gt; that &lt;em&gt;gaijin&lt;/em&gt; means &lt;em&gt;foreigner&lt;/em&gt;, and the word is often used in a derogatory way. Later, our host explained the driver was quite elderly, which helped explain the confusion.&lt;/p&gt;

&lt;p&gt;In the end, everything worked out fine, but when we were dropped at the trail the next morning, some of the adrenaline was still there. It felt like parachuting into a combat zone. It took a while of walking to finally cool down and get into the mental flow we came here for.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day1/L1001384.JPG&quot; loading=&quot;lazy&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day1/L1001399.jpeg&quot; loading=&quot;lazy&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day1/L1001434.JPG&quot; loading=&quot;lazy&quot; /&gt;&lt;/p&gt;

&lt;p&gt;This section of the walk is a grind, and my back hurts. It’s fine, and I was expecting that, expecting it earlier. During my preparation for this walk, my back has been bothering me quite a lot. For some reason it hadn’t hurt for a while, but now it does again, and this heavy backpack isn’t helping. It weighs roughly 15kg.&lt;/p&gt;

&lt;p&gt;I brought a laptop to unload my camera photos and write. The ritual involves working hard with my legs during the day while my mind wanders aimlessly, and then write about the journey in evening while my legs rest. That should keep my mind engaged during these 5 days.&lt;/p&gt;

&lt;p&gt;What alleviates my back pain a bit is engaging my core, like when someone’s gonna punch you and you flinch. As I brace my abs and my belly tightens, I feel a relief in my spine. Overall, we’re following the plan as intended, but I guess at this point, the decision is picking the less annoying annoyance, pain or effort.&lt;/p&gt;

&lt;p&gt;A mile and a half into this section to &lt;em&gt;Chikatsuyu&lt;/em&gt;, after beautiful forests and trails, we are welcomed by an incredible lake reflecting the trees and the sky like glass.&lt;/p&gt;

&lt;figure&gt;
&lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day1/L1001439.jpg&quot; loading=&quot;lazy&quot; /&gt;
&lt;figcaption&gt;A still lake appears and mirrors the hillside so cleanly it looks edited&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;I’m still trying to grasp the beauty and mystery of this place, and words escape me. I ponder the countless people who have walked these paths before, all their experiences and the memories stacked together. Yet, here I am.&lt;/p&gt;

&lt;p&gt;In the 12th century, retired Emperor &lt;em&gt;Go-Shirakawa&lt;/em&gt; walked the &lt;em&gt;Kumano Kodo&lt;/em&gt; thirty-four times. Emperor &lt;em&gt;Go-Toba&lt;/em&gt; twenty-eight. It was while walking these trails in 1160 that &lt;a href=&quot;https://en.wikipedia.org/wiki/Taira_no_Kiyomori&quot; target=&quot;_blank&quot;&gt;&lt;em&gt;Taira no Kiyomori&lt;/em&gt;&lt;/a&gt; got word that his opponent, &lt;em&gt;Minamoto Yoshitomo&lt;/em&gt;, had taken the opportunity to stage a coup in &lt;em&gt;Kyoto&lt;/em&gt; (京都).&lt;/p&gt;

&lt;p&gt;I’m not a pilgrim, at least not by any formal measure. I came for five days and a reset I couldn’t name, to walk until the noise thinned out. The sense of gratitude just for being able to start the trail, let alone finish it, fills my chest. To be able to touch a little of this history is a privilege I wish all my friends could experience.&lt;/p&gt;

&lt;figure&gt;
&lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day1/L1001423.jpeg&quot; class=&quot;mobile-zoom-150&quot; loading=&quot;lazy&quot; /&gt;
&lt;/figure&gt;

&lt;p&gt;&lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day1/L1001485.JPG&quot; class=&quot;mobile-zoom-150&quot; loading=&quot;lazy&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The wrist watch shows 2:57pm and we’re two thirds into the trail to &lt;em&gt;Chikatsuyu&lt;/em&gt;. A total of 05h06 so far, 2,982 feet of elevation gained (909m) and 11km.&lt;/p&gt;

&lt;p&gt;When comparing to the beginning of the trail, this section feels like the hardest. Contrary to what the &lt;em&gt;Tanabe Prefecture’s&lt;/em&gt; website says, that &lt;em&gt;Takijiri→Takahara&lt;/em&gt; is harder than &lt;em&gt;Takahara→Chikatsuyu&lt;/em&gt;, I found the opposite to be true. Well, I could also attribute that to the weight, energy and aggregated tiredness, which feels like it has compounded a lot by now.&lt;/p&gt;

&lt;p&gt;My left knee hurts, so I resort to using my hips more for walking than the knees, to alleviate the pain through the endless ups and downs. Some sections almost force us to use our hands to climb without falling. It just keeps going on and on and on.&lt;/p&gt;

&lt;p&gt;My back pain got worse, and no amount of core engagement is helping, but according to my calculations we’re towards the end of today’s trail, hopefully soon we get to the section in which descends all the way to &lt;em&gt;Chikatsuyu&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;When we finally get to the descent section, an annoying pain two inches below my knee starts. It’s insistent like a tip of an arrow against my shin, but it’s fine. It’s also understandable, a probable weak muscle I ignored in the gym. A muscle that is never used until you jump into millennia-old hike, like the &lt;em&gt;Kumano Kodo&lt;/em&gt;.&lt;/p&gt;

&lt;figure&gt;
&lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day1/L1001608.JPG&quot; loading=&quot;lazy&quot; /&gt;
&lt;/figure&gt;

&lt;figure&gt;
&lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day1/L1001581.jpeg&quot; class=&quot;mobile-zoom-150&quot; loading=&quot;lazy&quot; /&gt;
&lt;/figure&gt;

&lt;p&gt;We suddenly spot &lt;em&gt;Chikatsuyu&lt;/em&gt; on the horizon, in between the trees. My eyebrows rise, my chest inflates and I exhale a sigh of relief. The sun illuminates the mountain tops and we speed up our feet to get to the village before it gets dark.&lt;/p&gt;

&lt;p&gt;We enter the village by what looks like a backdoor, coming in from the mountains. The clock shows 5:40pm, twenty minutes before the only grocery store closes. We rush our feet and get in just in time.&lt;/p&gt;

&lt;p&gt;When I put the heavy backpack on shopping cart, my back smiles, a smile of relief. We buy instant noodles for dinner, along with desserts we have no idea about. We want a little surprise. Eggs and bread for breakfast the next morning aren’t forgotten.&lt;/p&gt;

&lt;p&gt;At the guesthouse, shower, dinner, resting. The body pulsates a mix of soreness and satisfaction. The walk was tough but rewarding. I can’t wait for tomorrow.&lt;/p&gt;

&lt;p&gt;Time for the sleep of the gods.&lt;/p&gt;

&lt;figure&gt;
&lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day1/L1001641.JPG&quot; loading=&quot;lazy&quot; /&gt;
&lt;figcaption&gt;Chikatsuyu&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;day-2-hosshinmon-oji-to-hongu&quot;&gt;Day 2: Hosshinmon-oji to Hongu&lt;/h2&gt;
&lt;p&gt;&lt;span class=&quot;subtitle&quot;&gt;Shrines, silence, awe&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;We wake up in &lt;em&gt;Chikatsuyu&lt;/em&gt;. This is the first proper morning in god-knows-how-long. Four days, I think. A slow morning, to sit down and chill without a burning need to get somewhere. The last night in the United States I could barely sleep 2-3 hours, thinking non-stop about the trip, only to get up at 5:30 to head to the airport.&lt;/p&gt;

&lt;p&gt;So, yes, we’ll take our time. I step outside, take the deepest and longest inhale you can imagine, and stroll the village under bright blue skies to buy black coffee. I head back to prepare scrambled eggs and toast. Pack things and close the electronic door behind us.&lt;/p&gt;

&lt;p&gt;Time to jump on a bus to &lt;em&gt;Hosshinmon-oji&lt;/em&gt; (発心門王子). The plan: walk down to &lt;em&gt;Hongu&lt;/em&gt; (本宮). Most people just walk straight from here, but, presumably, the views as you descend from &lt;em&gt;Hosshinmon-oji&lt;/em&gt; are nicer than starting in &lt;em&gt;Chikatsuyu&lt;/em&gt;, so we will make that bet. We’ll hop on a bus to get to the trail. Ultimately, the destination is the same.&lt;/p&gt;

&lt;figure&gt;
&lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day2/L1010013.jpeg&quot; loading=&quot;lazy&quot; /&gt;
&lt;figcaption&gt;&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;figure&gt;
&lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day2/IMG_0803.jpeg&quot; loading=&quot;lazy&quot; /&gt;
&lt;figcaption&gt;&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;figure&gt;
&lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day2/L1010015.jpg&quot; loading=&quot;lazy&quot; /&gt;
&lt;figcaption&gt;Slow stroll through Chikatsuyu&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;div class=&quot;asterisks&quot;&gt;***&lt;/div&gt;

&lt;p&gt;&lt;em&gt;“What’s going on here?”&lt;/em&gt; I wonder, confused as I get on the bus. There’s like what appears to be two hundred people inside. It feels chaotic and messy, and everyone’s staring at us while we orient ourselves. I sigh. &lt;em&gt;“I can’t believe we’re standing for a whole hour with these heavy bags!”&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;As I look around to figure out where to stay or where to stack the backpack, humbly peeking over backrests in search of spots, I notice people are sitting on their luggage in the aisle. &lt;em&gt;“Weird”&lt;/em&gt;, I frown one eyebrow. I’ve never seen that before. It looks totally unsafe, but who am I to judge?!&lt;/p&gt;

&lt;p&gt;A woman points at me and to the aisle, as if saying, &lt;em&gt;“You, stay there!”&lt;/em&gt; I get even more confused. But, as I scan the corridor, I don’t see any suitcase or luggage wheel. Wait a second! This bus has a fifth seat that folds from beside another seat, fitting five people per row! I nod and, while saying a few &lt;em&gt;Arigato’s&lt;/em&gt;, rush to sit down.&lt;/p&gt;

&lt;p&gt;Japan really is the country of the future.&lt;/p&gt;

&lt;figure&gt;
&lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day2/L1010020.JPG&quot; loading=&quot;lazy&quot; /&gt;
&lt;figcaption&gt;As the bus stops and collects Americans and Europeans, they, one by one, interject and laugh, &quot;hey, look, there&apos;s another seat in the middle!&quot;&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;figure&gt;
&lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day2/L1010031.JPG&quot; loading=&quot;lazy&quot; /&gt;
&lt;figcaption&gt;&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;figure&gt;
&lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day2/L1010044.JPG&quot; loading=&quot;lazy&quot; /&gt;
&lt;figcaption&gt;&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;figure&gt;
&lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day2/L1010049.JPG&quot; class=&quot;mobile-zoom&quot; loading=&quot;lazy&quot; /&gt;
&lt;figcaption&gt;&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;figure&gt;
&lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day2/L1010053.JPG&quot; class=&quot;mobile-zoom&quot; loading=&quot;lazy&quot; /&gt;
&lt;figcaption&gt;&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;figure&gt;
&lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day2/L1010079.jpeg&quot; class=&quot;&quot; loading=&quot;lazy&quot; /&gt;
&lt;figcaption&gt;&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;We walk on asphalt for 10 minutes before getting on to serious business. The trail is stunning, with the modern roads meeting the old. Asphalt and hamlets again, a symbiosis of community and nature.&lt;/p&gt;

&lt;div class=&quot;asterisks&quot;&gt;***&lt;/div&gt;

&lt;figure&gt;
&lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day2/L1010041.JPG&quot; loading=&quot;lazy&quot; /&gt;
&lt;figcaption&gt;&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;The trail is breathtaking, and some spots seem to whisper in my ear, &lt;em&gt;“Please, stop and admire me”&lt;/em&gt;. I oblige, of course.&lt;/p&gt;

&lt;p&gt;We slow down, gazing at the quaint hamlets, letting our eyes absorb the light like a sensor during a long exposure, etching memories onto a film of our minds. We want to remember this moment later, as vividly as possible.&lt;/p&gt;

&lt;figure&gt;
&lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day2/L1010096.JPG&quot; class=&quot;mobile-zoom&quot; loading=&quot;lazy&quot; /&gt;
&lt;figcaption&gt;&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;figure&gt;
&lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day2/L1010101.jpeg&quot; class=&quot;mobile-zoom&quot; loading=&quot;lazy&quot; /&gt;
&lt;figcaption&gt;&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;Suddenly we’re out of the woods again, into a small village in the mountains.&lt;/p&gt;

&lt;figure&gt;
&lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day2/L1010110.JPG&quot; class=&quot;mobile-zoom&quot; loading=&quot;lazy&quot; /&gt;
&lt;figcaption&gt;&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;figure&gt;
&lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day2/L1010113.JPG&quot; class=&quot;mobile-zoom&quot; loading=&quot;lazy&quot; /&gt;
&lt;figcaption&gt;&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;And back again into the woods.&lt;/p&gt;

&lt;figure&gt;
&lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day2/L1010167.jpeg&quot; class=&quot;mobile-zoom&quot; loading=&quot;lazy&quot; /&gt;
&lt;figcaption&gt;&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;figure&gt;
&lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day2/L1010171.JPG&quot; class=&quot;mobile-zoom&quot; loading=&quot;lazy&quot; /&gt;
&lt;figcaption&gt;&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;hr /&gt;

&lt;p&gt;The middle of today’s trail gets challenging, like a game of Tetris, except it’s your feet trying to fit the right spots. The staircases aren’t built for regular steps. Their geometry is all over the place. I feel a sense of alertness and mild discomfort while walking. &lt;em&gt;“Preserve the ankles, preserve the ankles”&lt;/em&gt;, I repeat as mantra. It’s quite easy to get hurt if you’re not careful.&lt;/p&gt;

&lt;p&gt;There are passages where my whole mental energy is focusing on where my feet are landing. Just that and nothing else for several minutes. And then, at certain points, I pause and admire the beauty around me.&lt;/p&gt;

&lt;p&gt;I have seen ancient tree roots serving as a long stair up and down. I have seen stairs made of rocks naturally. I have seen stairs with uneven steps. I have seen them all mixed, roots, rocks, sand.&lt;/p&gt;

&lt;p&gt;The most impressive, however, are the ones that were crafted by the feet of the thousands and thousands of people who have, a step at a time, helped shape these trails.&lt;/p&gt;

&lt;p&gt;In between the woods, we spot what appears to be the outskirts of &lt;em&gt;Hongu&lt;/em&gt;. Our expectation to see the tall &lt;em&gt;torii&lt;/em&gt; gate grows exponentially. When planning, this portal was an important milestone of the journey. It represents the reinvention of oneself, a transition, an end and a new beginning. We are almost there.&lt;/p&gt;

&lt;figure&gt;
&lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day2/L1010174.JPG&quot; class=&quot;mobile-zoom&quot; loading=&quot;lazy&quot; /&gt;
&lt;figcaption&gt;&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;figure&gt;
&lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day2/L1010183.JPG&quot; class=&quot;mobile-zoom&quot; loading=&quot;lazy&quot; /&gt;
&lt;figcaption&gt;&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;figure&gt;
&lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day2/L1010184.JPG&quot; class=&quot;mobile-zoom&quot; loading=&quot;lazy&quot; /&gt;
&lt;figcaption&gt;&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;figure&gt;
&lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day2/L1010212.jpeg&quot; class=&quot;mobile-zoom&quot; loading=&quot;lazy&quot; /&gt;
&lt;figcaption&gt;&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;We arrive at the &lt;em&gt;Hongu Taisha&lt;/em&gt; area, respectfully appreciating the view of the shrine, and taking some time to admire banners, the architecture, the gold and silver. We continue down the stairs leading to &lt;em&gt;Hongu&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Crossing the village into the fields, we arrive at a special place we’ve been anticipating for months: the imposing &lt;em&gt;Oyunohara&lt;/em&gt; (大斎原) &lt;em&gt;torii&lt;/em&gt;, a tall 111 ft gate (33.9 meters) that represents craftsmanship and transcendence. This is it, the gate I’ve wanted to visit for so long, finally in front of my eyes.&lt;/p&gt;

&lt;h3 id=&quot;portals&quot;&gt;Portals&lt;/h3&gt;

&lt;figure&gt;
&lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day2/L1010231.jpeg&quot; class=&quot;mobile-zoom&quot; loading=&quot;lazy&quot; /&gt;
&lt;figcaption&gt;&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;I feel like a tiny ant standing in front of this &lt;em&gt;torii&lt;/em&gt; gate due both to its height and personal significance.&lt;/p&gt;

&lt;p&gt;Have you ever noticed how portals are everywhere in our culture? In &lt;em&gt;Alice in Wonderland&lt;/em&gt;, the main character needs to go through a tiny portal to get to the &lt;em&gt;other side of her reality&lt;/em&gt;. In &lt;em&gt;Narnia&lt;/em&gt;, a hidden portal inside a wardrobe leads the characters to another world. &lt;em&gt;The Matrix&lt;/em&gt;, &lt;em&gt;Stargate&lt;/em&gt;, &lt;em&gt;Interstellar’s&lt;/em&gt; wormholes are other examples.&lt;/p&gt;

&lt;p&gt;Some portals are conceptual, like event checkpoints. When &lt;em&gt;Einstein&lt;/em&gt; discovered &lt;em&gt;Relativity&lt;/em&gt;, the human race went through a portal after which life wouldn’t ever be the same. &lt;em&gt;Penicillin&lt;/em&gt;, vaccines, combustion engines, the printing press. They’re all around us.&lt;/p&gt;

&lt;p&gt;However, portals are hard to be found. When you find them, you must make an intentional decision to go through because it takes effort. Once you do, your life changes forever, and you can’t fathom returning through it to your old reality. It’d be like death. Often times, you will come back to try and tell others where the portal is, but they downplay it, or laugh at you. You might try to tell them how it is like beyond the portal, the colors, the smell, the magnificence, but they won’t understand because they haven’t seen it for themselves.&lt;/p&gt;

&lt;p&gt;In 2011, I crossed one such portal. Living in a 5,000 inhabitants rural village in south of Brazil and with a 250Kbps bare internet connection, somehow I managed to get a tech job in the US. On the other side of this portal, my life had changed forever. I learned new ways of thinking, how to be productive, successful examples that challenged my education thus far, and how value is generated. For years, however, people thought I was a lunatic. You know, small town chatter. I tried to help others come through the portal, but they either couldn’t find it, weren’t willing to make the hard decision, or found it impossible.&lt;/p&gt;

&lt;p&gt;Shinto &lt;em&gt;torii&lt;/em&gt; gates captivate me because they represent a transition from mundane to a new reality, like the hidden portals around us. They are a celebration of the many passages distributed throughout space and time, yet hard to be found. They reward those who make the required decision to go through them, with a willingness to leave the past behind.&lt;/p&gt;

&lt;p&gt;Being here has a special meaning this evening. This &lt;em&gt;torii&lt;/em&gt; represents our quest for hidden portals. Quite possibly, having done this pilgrimage could mean I crossed another portal and my life will never be the same. Maybe I will finish this journey a different man than how I started it.&lt;/p&gt;

&lt;p&gt;Too early to say, and it’s getting late. It’s time to go get some rest. Tonight we sleep in an Airbnb in &lt;em&gt;Hongu&lt;/em&gt;.&lt;/p&gt;

&lt;figure&gt;
&lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day2/L1010251.jpeg&quot; loading=&quot;lazy&quot; /&gt;
&lt;figcaption&gt;&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;h2 id=&quot;day-3-resting-in-yunomine&quot;&gt;Day 3: resting in Yunomine&lt;/h2&gt;
&lt;p&gt;&lt;span class=&quot;subtitle&quot;&gt;Steam, river stones, and slowness&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;We wake up to a chaotic morning, rushed and on empty stomachs. Google Maps had told us cafés and restaurants would be open today, but guess what, they were closed. Walking through streets on an empty stomach to find closed doors isn’t fun. Fortunately, we stumble upon a small grocery store and throw together the quickest breakfast before check-out.&lt;/p&gt;

&lt;p&gt;Today we’ll head over to &lt;em&gt;Yunomine&lt;/em&gt; (湯の峰), a small hot springs village. &lt;em&gt;Tsuboyu&lt;/em&gt; (つぼ湯) is renowned as Japan’s oldest onsen and a UNESCO World Heritage site. If things go according to plan, we’ll chill, soak in hot water, and sit on a bench until our butts go numb. We’ll watch the flights of birds, kids playing and trees dancing.&lt;/p&gt;

&lt;figure&gt;
&lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day3/L1010263.jpg&quot; loading=&quot;lazy&quot; /&gt;
&lt;figcaption&gt;&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;figure&gt;
&lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day3/L1010265.jpg&quot; loading=&quot;lazy&quot; /&gt;
&lt;figcaption&gt;&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;div class=&quot;asterisks&quot;&gt;***&lt;/div&gt;

&lt;p&gt;We are the only passengers in the mini-bus. We are dropped 40 minutes away from &lt;em&gt;Yunomine&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;We walk uphill on a hot and bright asphalt. The lack of shades on the road makes us stop a few times to cool down our body. It’s 90F (32C). Who said this was going to be a rest day?&lt;/p&gt;

&lt;p&gt;Half an hour, a relatively short walk, but my back already hurts nonetheless. This background discomfort is a recurring theme since the beginning of the journey. Two weeks ago in San Jose, back in the US, I turned to AI to help me diagnose the symptom. &lt;em&gt;“Alex, what you’re describing (tired, achy mid-back muscles next to the spine, not sharp or injury pain) sounds like muscular fatigue from postural stabilizers, the muscles that keep your torso upright”&lt;/em&gt;. The knowledge that it’s likely fatigue has given me confidence to continue the walk everyday, with the proper, systematic resting cadence. Still, it seems to get a little bit worse every single day.&lt;/p&gt;

&lt;figure&gt;
	&lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day3/L1010320.JPG&quot; loading=&quot;lazy&quot; class=&quot;hide-on-mobile&quot; /&gt;
	&lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day3/L1010321.JPG&quot; loading=&quot;lazy&quot; class=&quot;show-on-mobile&quot; /&gt;
	&lt;figcaption&gt;&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;figure&gt;
	&lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day3/L1010325.jpeg&quot; loading=&quot;lazy&quot; /&gt;
	&lt;figcaption&gt;&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;We arrive at the small village and find empty streets. The central canal releases steam.&lt;/p&gt;

&lt;figure&gt;
	&lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day3/L1010330.jpeg&quot; loading=&quot;lazy&quot; /&gt;
	&lt;figcaption&gt;Not a single soul, a pleasant surprise.&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;We drop our backpacks at a random spot and wander around to get to know the place. This is Japan, no one’s going to steal your stuff. We roam around a nice, cute little village, then head to buy tickets to &lt;em&gt;Tsuboyu&lt;/em&gt;, the famous, UNESCO onsen.&lt;/p&gt;

&lt;p&gt;Honestly, I’m mildly reluctant to dip into almost-boiling water, given how hot the sun is. The &lt;em&gt;Tsuboyu&lt;/em&gt; hut lets steam escape through its wall gaps, like a toaster made of wood. It’s a mild sauna inside and the water is freaking hot. After several failed attempts to dive my toes, we finally soak, like two potatoes in the pan.&lt;/p&gt;

&lt;p&gt;Before leaving the steaming hut, I finish with cold water, which leaves a lasting freshness. My skin stays cold for a good hour or two afterwards during lunch. A small, wet towel wrapped strategically around my neck makes me feel like a relaxing capybara.&lt;/p&gt;

&lt;figure&gt;
	&lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day3/IMG_0891.jpeg&quot; loading=&quot;lazy&quot; /&gt;
	&lt;figcaption&gt;The hut where Tsuboyu is located.&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;&lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day3/L1010336.JPG&quot; loading=&quot;lazy&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Our lunch involves doing the traditional &lt;em&gt;Onsen Tamago&lt;/em&gt;, where you hard boil eggs by dipping them in an open hot spring for 11 minutes.&lt;/p&gt;

&lt;p&gt;After lunch, we find ourselves a wooden bench. As my legs touch the wood and I sit, it feels like &lt;em&gt;Rest Day&lt;/em&gt; has finally began.&lt;/p&gt;

&lt;figure&gt;
	&lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day3/L1010339-hero.jpeg&quot; loading=&quot;lazy&quot; class=&quot;full-bleed  hide-on-mobile&quot; /&gt;
	&lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day3/L1010339-mobile.jpeg&quot; loading=&quot;lazy&quot; class=&quot;full-bleed  show-on-mobile&quot; /&gt;
	&lt;figcaption&gt;&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;center&gt;
&lt;audio controls=&quot;&quot; controlsList=&quot;nodownload&quot; preload=&quot;metadata&quot;&gt;
  &lt;source src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day3/yunomunechaya.mp3&quot; type=&quot;audio/mpeg&quot; /&gt;
  &lt;source src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day3/yunomunechaya.m4a&quot; type=&quot;audio/mp4&quot; /&gt;
  Your browser does not support the audio element.
&lt;/audio&gt;
&lt;/center&gt;

&lt;p&gt;The tranquility invites us to play a little game to enhance our perception: Five things we see, four things we hear, three things we feel, two things we smell, one taste.&lt;/p&gt;

&lt;p&gt;Treetops, children, traditional houses, flags, flowers. A breeze, a conversation in Chinese, children, birds chirping. Peace, privilege, sore muscles. Hot spring scent and flowers. Eggs.&lt;/p&gt;

&lt;p&gt;We are hyper-focused on the present. A while ago I was preoccupied about making good use of the time, now my mind has calmed down. I’m just enjoying the wind blowing my skin.&lt;/p&gt;

&lt;p&gt;Ice cream wouldn’t be a bad idea.&lt;/p&gt;

&lt;div class=&quot;asterisks&quot;&gt;***&lt;/div&gt;

&lt;p&gt;We hop on a bus towards &lt;em&gt;Kawayu&lt;/em&gt; (川湯), a tiny village where hot springs flow into the river, and arrive during sunset. We borrow traditional robes from our guesthouse and wander, shy, towards the natural spa. You can use a shovel to dig your own bath spot in the river, but we decide to use an existing spot made of stones. Under a sky full of stars, we soak, mixing and contrasting hot and cold water. A perfect ending to our night before dinner and bed.&lt;/p&gt;

&lt;figure&gt;
  &lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day3/L1010345.jpeg&quot; loading=&quot;lazy&quot; /&gt;
	&lt;figcaption&gt;&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;figure&gt;
  &lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day3/L1010341.jpeg&quot; loading=&quot;lazy&quot; /&gt;
	&lt;figcaption&gt;&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;h2 id=&quot;day-4-kogumotori-goe-to-koguchi&quot;&gt;Day 4: Kogumotori-goe to Koguchi&lt;/h2&gt;
&lt;p&gt;&lt;span class=&quot;subtitle&quot;&gt;Long ridges and thoughts&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;We woke up to a gut punch before coffee. Both my wife’s knees and mine are hurting, and my back is doing a serious complaining, while today’s trail is the toughest.&lt;/p&gt;

&lt;p&gt;The 13km &lt;em&gt;Kogumotori-goe&lt;/em&gt; (小雲取越) trail’s first third scores 4 out of 5 in difficulty. It’s a gradual 1,542 feet climb (470 meters) to &lt;em&gt;Hyakken-gura&lt;/em&gt;, harder than Day One, which was already quite taxing. More pressing is the fact that &lt;em&gt;Koguchi&lt;/em&gt; (小口) has no lodging available today, so we must arrive before 5pm to catch the last bus to &lt;em&gt;Shingu&lt;/em&gt; (新宮). The trail estimates say 6-8 hours.&lt;/p&gt;

&lt;p&gt;At 7:45am, we’ve spent an hour working the problem. The heavy backpacks aren’t helping our knees or backs, so we conclude it’s irresponsible to walk with this much pain. The options are doing a boat tour today (I didn’t come here to sit down); finding another trail (frustrating after months of planning); my wife taking a bus to &lt;em&gt;Shingu&lt;/em&gt; while I walk (I’d feel bad for her); walking a third of the trail and returning (sounds off-putting but better than nothing).&lt;/p&gt;

&lt;h3 id=&quot;shipping-weight&quot;&gt;Shipping weight&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;“If only we weren’t carrying our heavy backpacks”&lt;/em&gt;, a lightbulb pops over ours heads. &lt;em&gt;“What if we could leave our bags here and return”&lt;/em&gt;? That would be an inconvenient 16km return after a tired day of walking. &lt;em&gt;“What if we could ship more weight to Kyoto”&lt;/em&gt;? That’s not impossible. We would need a container and right now we only have two backpacks. I ask ChatGPT for ideas, &lt;em&gt;“why don’t you check with the guesthouse’s owner if he have a cardboard box you can use?”&lt;/em&gt;, the AI asks. That’s a good idea. I run downstairs to check with him, and after a couple minutes, he comes back with a  finds one in the trash, the perfect size. I assemble it in a square&lt;/p&gt;

&lt;p&gt;We pack into the box everything we can find in our bags. The camera stabilizer stick, a camera, moisturizers, eyedrops. The lightweight laptop I’m carrying for writing. We tape it carefully, and there it goes to &lt;em&gt;Kyoto&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;We feel a little bit more optimistic, as if a ton had been lifted from our backs and our minds. The frustration is replaced with hope, we decide to keep the expectations low and set a simpler goal: walk 5 long kilometers to &lt;em&gt;Hyakken-gura&lt;/em&gt;, the highest point, and re-evaluate. The peak is a third of the way, so it’s presumably easy to get back if have to.&lt;/p&gt;

&lt;p&gt;Once there, we will figure what to do next.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Kohei-san&lt;/em&gt;, the host, after solving our shipping and preparing a delicious breakfast, kindly offers to give us a ride to the trailhead with a smile from ear to ear.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day4/L1010352.jpeg&quot; alt=&quot;Kohei-san, owner of the Mishuku Sumiya in Kawayu&quot; loading=&quot;lazy&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;back-on-trail&quot;&gt;Back on trail&lt;/h3&gt;

&lt;p&gt;Twenty minutes into the walk, adrenaline triumphs over any logical reasoning and makes us both say, &lt;em&gt;“Fuck it, let’s just keep going until the end of the trail”&lt;/em&gt;. Ah, the overthinking! At least it served us in shipped weight, but did we need the drama? We laugh. &lt;em&gt;“It would be too frustrating to return once we’re on the move”&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;It’s 9:17am. We see humans beings on the trail, everybody faster than us. Our goal is reaching the peak of the trail in 2-3 hours, hoping we’re left with plenty of time to continue on a slower pace.&lt;/p&gt;

&lt;figure&gt;
&lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day4/L1010377.JPG&quot; alt=&quot;&quot; loading=&quot;lazy&quot; /&gt;
&lt;figcaption&gt;&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;I keep asking myself, &lt;em&gt;“Are we behind”?&lt;/em&gt; I look at the offline map and I still have no idea where we are. We’re walking fast and steady, like runners in a marathon chasing a gold medal. We feel like arriving at any moment. It feels also like the hardest trail so far. By a mile, figuratively and literally.&lt;/p&gt;

&lt;p&gt;Five kilometers on a straight line would take me roughly an hour to walk, so the whole 6-8 hours the &lt;em&gt;Tanabe Prefecture&lt;/em&gt; stipulates never made sense to me.&lt;/p&gt;

&lt;p&gt;And if we get there ahead of time, say, before 11:45am, then we’re gonna make a decision about going all the way. In theory, a third done in 2:45 hours means a total trail roughly 8 hours. The last two thirds would be downhill, which is presumably easier, but also terrible for knees like ours.&lt;/p&gt;

&lt;p&gt;If we got injured, could you imagine the inconvenience it would be? Waiting for someone to bring help? Nah, that’s virtually impossible. A worst-case scenario looks like a slow zombie walking on a trail back to civilization. The scary is getting dark, no lights, nowhere to sleep, and then maybe I have my first ever homeless simulation. I mean, it wouldn’t be the end of the world, but definitely not something I want to experience today.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day1/L1001477.jpg&quot; class=&quot;mobile-zoom-120&quot; loading=&quot;lazy&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;a-new-friend&quot;&gt;A new friend&lt;/h3&gt;

&lt;p&gt;Our conversation breaks off when we see someone walking backwards, moving slowly. I signal my wife to stay behind and go check out.&lt;/p&gt;

&lt;figure&gt;
	&lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day4/L1010370.JPG&quot; alt=&quot;Fey walking in the front of us on the distance&quot; loading=&quot;lazy&quot; /&gt;
	&lt;figcaption&gt;A person on the trail.&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;&lt;em&gt;“Hello? What’s up?”&lt;/em&gt; The woman looks at me. &lt;em&gt;“Uh… snake. A snake up there”&lt;/em&gt;, she says, gesturing up the trail. &lt;em&gt;“Let me go take a look”&lt;/em&gt;, I say, and move forward.&lt;/p&gt;

&lt;p&gt;I scan the endless grass and leaf litter along the trail, but see nothing. Then, as I approach, the reptile glides down from the embankment above us onto the path, as if it wants to join our walk. As I close the distance, the snake angles across the ridgeline and disappears downhill. &lt;em&gt;“Clear!”&lt;/em&gt;, I announce.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;“Would you like us to walk in front of you, just in case”&lt;/em&gt;, I ask. &lt;em&gt;“Yeah, sure”&lt;/em&gt;. We restart the march and I present myself and my wife. &lt;em&gt;“I’m Fey”&lt;/em&gt;. My wife lags behind with her while I lead the group.&lt;/p&gt;

&lt;p&gt;Over the next hour, a cultural exchange flows non-stop. We learn she’s a Chinese kindergarten teacher on vacation, skipping the Chinese hiking trails this time to walk the Japanese ones. Yesterday, she walked up until late at night. &lt;em&gt;“It’s common in China for people to hike in the middle of the night”&lt;/em&gt;, she says. &lt;em&gt;“Aren’t you scared of the dark or animals?”&lt;/em&gt;, we ask. &lt;em&gt;“Yes, but we do it anyway. I use my cellphone lights”&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Brave woman.&lt;/p&gt;

&lt;h3 id=&quot;the-peak&quot;&gt;The peak&lt;/h3&gt;

&lt;p&gt;Overcoming the struggle, we arrive at our checkpoint, the &lt;em&gt;Hyakken-gura&lt;/em&gt;. I wonder if the clock is broken, it’s 10:20am and nothing makes sense. &lt;em&gt;“How did we arrive in one and a half hours?”&lt;/em&gt; We rushed, sure, but the terrain was the hardest we’ve experienced and our most optimistic plan expected at least two to three hours. Yet, we managed to get to our goal in half the time!&lt;/p&gt;

&lt;p&gt;None of that matters now because the mesmerizing &lt;em&gt;Kumano&lt;/em&gt; mountains fill my eyes. The green horizon casts a hypnotic spell, putting everything secondary.&lt;/p&gt;

&lt;figure&gt;
  &lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day4/L1010385-hero.JPG&quot; alt=&quot;Hyakken-gura&quot; class=&quot;full-bleed hide-on-mobile&quot; loading=&quot;lazy&quot; /&gt;
  &lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day4/L1010388-mobile.JPG&quot; alt=&quot;Hyakken-gura&quot; class=&quot;full-bleed show-on-mobile&quot; loading=&quot;lazy&quot; /&gt;
  &lt;figcaption&gt;The Kii mountains in all their glory.&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;What a view.&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;We decide to continue on our way to &lt;em&gt;Koguchi&lt;/em&gt;. We take a few more pictures, turn left towards the trail and… restart the march, as if any other option is inconceivable. At some point an hour ago we thought, &lt;em&gt;“Yeah, I just wouldn’t feel good returning”&lt;/em&gt;, and so we just kept going. After all said and done, the decision comes in seconds, based on gut and feeling.&lt;/p&gt;

&lt;p&gt;And that’s &lt;em&gt;fine&lt;/em&gt;.&lt;/p&gt;

&lt;figure&gt;
  &lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day4/L1010441.jpeg&quot; alt=&quot;&quot; class=&quot;&quot; loading=&quot;lazy&quot; /&gt;
  &lt;figcaption&gt;&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;figure&gt;
  &lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day4/L1010438.jpeg&quot; alt=&quot;&quot; class=&quot;&quot; loading=&quot;lazy&quot; /&gt;
  &lt;figcaption&gt;&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;figure&gt;
  &lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day4/L1010448.jpeg&quot; alt=&quot;&quot; class=&quot;&quot; loading=&quot;lazy&quot; /&gt;
  &lt;figcaption&gt;&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;h3 id=&quot;koguchi&quot;&gt;Koguchi&lt;/h3&gt;

&lt;p&gt;The final descent is brutal on our knees, a continuous and relentless 2,260 ft (690 meters) drop. The steady rhythm of 3,750 steps pounds our joints like a pickaxe. The endless staircase forces frequent pauses, alternating pain with brief relief over an elevation loss equivalent to 225 flights of stairs.&lt;/p&gt;

&lt;p&gt;My right knee shakes back and forth when I stand upright, like a column in an earthquake. We see a gradual increase in brightness among the trees.&lt;/p&gt;

&lt;p&gt;The end of the trail is near.&lt;/p&gt;

&lt;figure&gt;
  &lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day4/L1010464.jpeg&quot; alt=&quot;&quot; class=&quot;&quot; loading=&quot;lazy&quot; /&gt;
  &lt;figcaption&gt;An endless descend&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;figure&gt;
  &lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day4/L1010444.jpeg&quot; alt=&quot;&quot; class=&quot;&quot; loading=&quot;lazy&quot; /&gt;
  &lt;figcaption&gt;&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;Exhausted, we reach the end of the trail at 12:10pm, thankful for having arrived. We continue to &lt;em&gt;Koguchi&lt;/em&gt; to find food.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;“I wonder whether we would have the energy to do the next trail right after, the Ogumotori-goe (大雲取越)?”&lt;/em&gt;, the fleeting thought crosses my mind. In ancient times, it was known as &lt;em&gt;Dogiri-zaka&lt;/em&gt; (胴切坂), or &lt;em&gt;“body-breaking slope”&lt;/em&gt;. It’s nothing less than a sudden 2,625 feet ascent (800 meters) in the first 5 kilometers.&lt;/p&gt;

&lt;p&gt;Do I have the energy to do the second trail? Probably yes. Can my knees sustain a &lt;em&gt;body-breaking slope&lt;/em&gt;? Certainly not. Everything hurts. I am destroyed, I’m tired, but I’m happy.&lt;/p&gt;

&lt;figure&gt;
  &lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day4/L1010466.JPG&quot; alt=&quot;&quot; class=&quot;&quot; loading=&quot;lazy&quot; /&gt;
  &lt;figcaption&gt;We walk by half-dozen houses next to the trail&apos;s end&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;figure&gt;
  &lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day4/L1010474.jpeg&quot; alt=&quot;&quot; class=&quot;hide-on-mobile&quot; loading=&quot;lazy&quot; /&gt;
  &lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day4/L1010473-mobile.jpeg&quot; alt=&quot;&quot; class=&quot;show-on-mobile&quot; loading=&quot;lazy&quot; /&gt;
  &lt;figcaption&gt;A peaceful fisherman&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;figure&gt;
  &lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day4/L1010480.jpeg&quot; alt=&quot;&quot; class=&quot;&quot; loading=&quot;lazy&quot; /&gt;
  &lt;figcaption&gt;Koguchi&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;We arrive at a camping area that has a single food truck, called &lt;em&gt;Bar Free Soul&lt;/em&gt;. The owner serves us &lt;em&gt;gyoza&lt;/em&gt; (餃子), and asks us to pin our country on a large map behind the counter. I raise an eyebrow the moment I see pins everywhere, except Brazil, before adding my pin. We’ll chill here until the next bus to &lt;em&gt;Shingu&lt;/em&gt; stops by at 4:30pm. It’s a long wait.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Fey&lt;/em&gt;, our new friend, rests for an hour before finally deciding to start the next trail toward &lt;em&gt;Nachi&lt;/em&gt;, the &lt;em&gt;Ogumotori-goe&lt;/em&gt;. We clap at this brave woman as she departs with her green backpack.&lt;/p&gt;

&lt;p&gt;When it’s time to leave, we hop on a bus to Shingu. The vehicle is packed and we travel standing up for a good hour. After arriving, I’ll need to figure out how to dispose of my unused bear spray.&lt;/p&gt;

&lt;figure&gt;
  &lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day4/L1010483.jpeg&quot; alt=&quot;&quot; class=&quot;&quot; loading=&quot;lazy&quot; /&gt;
  &lt;figcaption&gt;&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;figure&gt;
  &lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day4/L1010489.jpeg&quot; alt=&quot;&quot; class=&quot;&quot; loading=&quot;lazy&quot; /&gt;
  &lt;figcaption&gt;&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;figure&gt;
  &lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day4/L1010492.jpeg&quot; alt=&quot;&quot; class=&quot;hide-on-mobile&quot; loading=&quot;lazy&quot; /&gt;
  &lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day4/L1010499-mobile.jpeg&quot; alt=&quot;&quot; class=&quot;show-on-mobile&quot; loading=&quot;lazy&quot; /&gt;
  &lt;figcaption&gt;The bus from *Koguchi* is packed with walkers speaking languages from all countries&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;h3 id=&quot;bear-spray-disposal&quot;&gt;Bear spray disposal&lt;/h3&gt;

&lt;p&gt;The disposal of a bear spray is one big challenge when it’s your first time disposing of it, you are in a foreign land, and you want to do just the right thing. Think of a pepper spray, but on steroids. It shoots nearly 60ft (about 20 meters). It’s an explosive red goo that you clip to your belt. You can’t toss it in a regular trash bin, and you cannot fly back home with it either.&lt;/p&gt;

&lt;p&gt;According to ChatGPT, Claude, Grok and Reddit (I quadruple-checked), the general guidance is to take it to a police station (&lt;em&gt;kōban&lt;/em&gt;, 交番) and ask for help. Not exactly easy when you don’t speak the language, and you’d rather not look like a lunatic with a canister in your bag.&lt;/p&gt;

&lt;p&gt;Arriving in &lt;em&gt;Shingu&lt;/em&gt;, I walk to the police station. Through the large glass door, I see no one inside. &lt;em&gt;“Out on patrol. Return later”&lt;/em&gt;, the sign says. So I sit on a park bench nearby and wait an hour.&lt;/p&gt;

&lt;p&gt;Then, two policemen appear down the street. I pack my things, ready the bear spray its bag and head toward the station. Just as I’m about the reach the door, the two officers sprint past me, jump into their car, flip on the siren, and race off to deal with something clearly more urgent than a confused foreigner holding a can of bear spray.&lt;/p&gt;

&lt;p&gt;In Japan, manufacturers recommend discharging contents either outdoors, or underwater in a bucket if that’s not possible. Not really feasible from a hotel room. A problem for another day&lt;sup&gt;1&lt;/sup&gt;.&lt;/p&gt;

&lt;h2 id=&quot;day-5-shingu-to-nachisan&quot;&gt;Day 5: Shingu to Nachisan&lt;/h2&gt;
&lt;p&gt;&lt;span class=&quot;subtitle&quot;&gt;The final ascent, and a timeless fall&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;Our schedule is tight today because we’re sleeping in &lt;em&gt;Kyoto&lt;/em&gt; tonight. We need to catch 7:00am bus toward &lt;em&gt;Kii-Katsuura&lt;/em&gt; (紀伊勝浦) and &lt;em&gt;Nachisan&lt;/em&gt; (那智山). That gives us 8:51am to 10:32am to explore the temple and falls before five or six hours of trains to &lt;em&gt;Kyoto&lt;/em&gt;. We cannot miss that bus.&lt;/p&gt;

&lt;p&gt;But we wake up late. Empty stomachs, bags on our backs, and only 10 minutes to walk a 20-minute distance, we kick start our rushed walk towards the nearest bus stop north of us, which is impossible. Giving up, however, isn’t an option. I pull up the map and spot a chance: the bus line curves through the city, so if we cut west, threading narrow streets like a needle, we might intercept it fourth stop. We hope the bus is slow, crowded even.&lt;/p&gt;

&lt;p&gt;We walk the fastest 15 minutes of our lives and make it. The bus is coming on the horizon and the day is saved.&lt;/p&gt;

&lt;p&gt;We arrive at &lt;em&gt;Nachi&lt;/em&gt; station on an empty stomach, and depart to &lt;em&gt;Nachisan&lt;/em&gt;. We head straight to &lt;em&gt;Nachi-no-Taki-mae&lt;/em&gt; because we have no time to climb the &lt;em&gt;Daimon-zaka&lt;/em&gt; (大門坂) stairs today.&lt;/p&gt;

&lt;figure&gt;
  &lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day5/L1010517-hero.jpeg&quot; alt=&quot;&quot; class=&quot;full-bleed&quot; loading=&quot;lazy&quot; /&gt;
  &lt;figcaption&gt;&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;figure&gt;
  &lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day5/IMG_0989.jpeg&quot; alt=&quot;&quot; class=&quot;&quot; loading=&quot;lazy&quot; /&gt;
  &lt;figcaption&gt;Yakult to wrap the stomach, followed by cold, canned black coffee to tune our ambition&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;figure&gt;
  &lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day5/L1010528.JPG&quot; alt=&quot;&quot; class=&quot;&quot; loading=&quot;lazy&quot; /&gt;
  &lt;figcaption&gt;Nothing to see here, just a tsunami height warning&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;hr /&gt;

&lt;p&gt;I look at the clock when the bus arrives. It’s 8:57am. As we step out, we reorient ourselves, among a crowd of visitors. Looking right, there’s a &lt;em&gt;torii&lt;/em&gt; gate leading to the &lt;em&gt;Nachi&lt;/em&gt; Falls. Turning my head left, a staircase that leads to the &lt;em&gt;Nachi&lt;/em&gt; shrine.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Nachi-no-Taki-mae&lt;/em&gt; is a bend in the road that feels compressed by traffic and guardrails. A small parking lot sits in the corner, a clutch of souvenir shops lines the curb, and a signed path leads towards the falls. Buses sigh, people reshuffle bags, and the crowd moves on. It works as a waystation more than a place to linger, a stop where you wait to get somewhere better. A &lt;em&gt;liminal space&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;As we stroll towards the falls, can you guess who we spotted, out of the blue? Yes, &lt;em&gt;Fey&lt;/em&gt;. We hug and rush to ask about her adventure yesterday, when she kept going after we stopped in &lt;em&gt;Koguchi&lt;/em&gt;. &lt;em&gt;“It was hard! I kept walking until darkness, arriving around 10pm”&lt;/em&gt;, she told us. Without a lodging reservation, she roamed around and was lucky to find an available room in a random guesthouse. &lt;em&gt;“Scary”&lt;/em&gt;, she says with a nervous laugh about walking at night. &lt;em&gt;“I found a mother and her son in the trail, and we finished the route as a group together with our phone light. Then I knocked a few doors and found a spare room to stay.”&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Brave woman.&lt;/p&gt;

&lt;figure&gt;
  &lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day5/IMG_1005.jpeg&quot; alt=&quot;&quot; class=&quot;&quot; loading=&quot;lazy&quot; /&gt;
  &lt;figcaption&gt;Fey&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;The clock is ticking and we have to run. We say our goodbyes and rush to the stairs up to the temple. The first step feels like the hundredth and my thighs burn on the push. I reach for a handrail, but there’s none. However, when I remember it’s not an endless staircase, my shoulders loosen and I let out a breath. Today is short, we ought to make the most of it.&lt;/p&gt;

&lt;p&gt;The stairs are made of rounded stones that seem to stretch beyond the horizon. It curves left and right. We stop to catch our breath and see the ocean in the distance fading into the cloudy sky, cradled by green hills. The village keeps getting smaller.&lt;/p&gt;

&lt;p&gt;A few flights later, we lift our heads to the sky and glimpse vermilion in between the green leaves. Still faint, it imposes itself from above. Our destination draws near.&lt;/p&gt;

&lt;figure&gt;
  &lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day5/L1010545.jpeg&quot; alt=&quot;&quot; class=&quot;hide-on-mobile&quot; loading=&quot;lazy&quot; /&gt;
  &lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day5/L1010546-mobile.jpg&quot; alt=&quot;&quot; class=&quot;show-on-mobile&quot; loading=&quot;lazy&quot; /&gt;
  &lt;figcaption&gt;A staircase is a small cost to pay to get to the famous Nachi shrine&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;figure&gt;
  &lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day5/L1010549.jpeg&quot; alt=&quot;&quot; class=&quot;&quot; loading=&quot;lazy&quot; /&gt;
  &lt;figcaption&gt;&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;figure&gt;
  &lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day5/L1010562.jpeg&quot; alt=&quot;&quot; class=&quot;&quot; loading=&quot;lazy&quot; /&gt;
  &lt;figcaption&gt;&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;figure&gt;
  &lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day5/L1010556.JPG&quot; alt=&quot;&quot; class=&quot;&quot; loading=&quot;lazy&quot; /&gt;
  &lt;figcaption&gt;&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;figure&gt;
  &lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day5/L1010557.JPG&quot; alt=&quot;&quot; class=&quot;&quot; loading=&quot;lazy&quot; /&gt;
  &lt;figcaption&gt;&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;&lt;em&gt;“We’re here, pinch me please”&lt;/em&gt;, I ask my partner. We have arrived. The shrine’s red, once only pixels on a screen, now fills my eyes. The water that ran behind this place a thousand years ago still runs, stitching past to present.&lt;/p&gt;

&lt;figure&gt;
  &lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day5/L1010578-hero.jpeg&quot; alt=&quot;&quot; class=&quot;hide-on-mobile full-bleed&quot; loading=&quot;lazy&quot; /&gt;
  &lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day5/L1010578-mobile.jpeg&quot; alt=&quot;&quot; class=&quot;show-on-mobile&quot; loading=&quot;lazy&quot; /&gt;
  &lt;figcaption&gt;Nachi Shrine &amp;amp; Falls (青岸渡寺)&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;I finally let go of a breath I didn’t know I’d been holding for years. My shoulders are lighter, free from the weight from everyday life. My chest feels full while I contemplate the satisfaction of achieving something bigger than myself.&lt;/p&gt;

&lt;p&gt;The man who’s stepping on the train back to Kyoto is not the same man who stepped on the trails five days ago. I found the reset I had been looking for.&lt;/p&gt;

&lt;p&gt;After walking the &lt;em&gt;Kumano Kodo&lt;/em&gt;, I learned that the walk was the destination, and each step was an arrival. This journey has come to an end, but the pilgrimage continues. The trail has become a metaphor for life.&lt;/p&gt;

&lt;p&gt;I crossed a portal, and now everything looks different.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/posts/2025-10-03-five-days-on-the-kumano-kodo/day5/L1010677.jpeg&quot; alt=&quot;&quot; class=&quot;&quot; loading=&quot;lazy&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;tomorrow&quot;&gt;Tomorrow&lt;/h2&gt;
&lt;p&gt;&lt;span class=&quot;subtitle&quot;&gt;New paths&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;After finishing the Kumano in the 12th century, the poet &lt;em&gt;Saigyō Hōshi&lt;/em&gt; (西行 法師) wrote the poem,&lt;/p&gt;

&lt;center&gt;
&lt;table style=&quot;background-color: transparent&quot;&gt;
&lt;tr&gt;
&lt;td&gt;
吉野山&lt;br /&gt;
こぞのしをりの&lt;br /&gt;
道かへて&lt;br /&gt;
まだ見ぬかたの&lt;br /&gt;
花をたづねん
&lt;/td&gt;
&lt;td&gt;
&amp;nbsp;
&lt;/td&gt;
&lt;td&gt;
&lt;em&gt;
Mount Yoshino&lt;br /&gt;
I’ll leave last year’s marked path,&lt;br /&gt;
take a different way,&lt;br /&gt;
and search for blossoms&lt;br /&gt;
in places I’ve not yet seen.&lt;br /&gt;
&lt;/em&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/center&gt;

&lt;p&gt;The poet’s vow to change the road resonates with me. It’s an invitation to honor what was just walked, but to pivot and keep seeking “blossoms”, insights, and wonders on new paths. It’s an invitation to carry the pilgrimage mindset onward, as a new person.&lt;/p&gt;

&lt;p&gt;That’s what I’ll do.
&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;ol class=&quot;footnotes&quot;&gt;
&lt;li&gt;On the journey from Nachisan to Kyoto, I made a brief stop in Tanabe and returned the bear spray to &lt;a href=&quot;https://www.instagram.com/stock_outdoor/&quot;&gt;Stock Outdoors&lt;/a&gt;, where I&apos;d purchased it. The owner graciously gave us a discount on the return.&lt;/li&gt;
&lt;/ol&gt;</content>

      

      
        <summary type="html">I walked the mountains in Japan for five days seeking a reset I couldn&apos;t define. Between the cedar shade and quiet villages, through ancient stairs, torii gates and shrines, I found what I was looking for.</summary>
      

      
        <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://alexoliveira.cc/images/posts/2025-10-03-five-days-on-the-kumano-kodo/L1010455-cover.jpg" />
        <media:content medium="image" url="https://alexoliveira.cc/images/posts/2025-10-03-five-days-on-the-kumano-kodo/L1010455-cover.jpg" xmlns:media="http://search.yahoo.com/mrss/" />
      

      

      
        <category term="obsidian" />
      
        <category term="essay" />
      
    </entry>
    
  
    
  
    
    <entry>
      <title type="html">Planning a walk in Japan</title>
      <link href="https://alexoliveira.cc/essay/planning-a-walk-in-japan" rel="alternate" type="text/html" title="Planning a walk in Japan" />
      <published>2025-09-29T00:00:00+00:00</published>
      <updated>2025-09-29T00:00:00+00:00</updated>
      <id>https://alexoliveira.cc/essay/planning-a-walk-in-japan</id>
      <content type="html" xml:base="https://alexoliveira.cc/essay/planning-a-walk-in-japan">&lt;p&gt;In six months or so, I’ll walk the Kumano Kodo in Japan. The idea of doing a total reset had been popping into my mind for a while, a certain attraction to disconnecting from habits and the world to reconnect with myself. A quiet, five-day journey through mountain passes and primitive, lush forests looks like the perfect setting for that.&lt;/p&gt;

&lt;p&gt;The Kumano Kodo trails are special. For thousands of years, they led pilgrims to majestic temples in Hongu, Shingu and Nachi, connecting all walkers of life in search of meaning, salvation, or just adventure. The absense of Switzerland-like turquoise lakes and Italian-looking alps means that the region doesn’t impose itself as the movie’s main character, but as a pleasant companion for the journey.&lt;/p&gt;

&lt;p&gt;My humble walk from guesthouse to guesthouse is meant to be distraction-free. No social media, podcasts, music, just the here and the now. No autopilot, only being present.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;“All truly great thoughts are conceived while walking.” - Nietzsche&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Concepts&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;the walk is the destination, the temples are just rewards&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;a-good-walk&quot;&gt;A good walk&lt;/h2&gt;

&lt;p&gt;In my book, a good walk will be &lt;em&gt;boring&lt;/em&gt;, &lt;em&gt;memorable&lt;/em&gt;, and &lt;em&gt;pleasant&lt;/em&gt;. Boredom benefits our brains by opening space for inward reflection and creativity. External impulses, on the other hand, steals our focus. In a world of infinite stimulation, boredom heals. Thoughts get shaken like a tree, and the bad apples fall to the ground.&lt;/p&gt;

&lt;p&gt;Nearing fourty, you bet it has to be goddamm memorable. Trails are everywhere, but they don’t come with flights to the other side of the planet, trains sliding by at 200-miles-per-hour, and milenial history. “I walked for days in Japan” carries its own weight to anyone who hears it, regardless of their origins. It absolutely does for me. Plus, the Nachisan temple and waterfall are a spectacularly great finale.&lt;/p&gt;

&lt;p&gt;Making it pleasant means primary memories will be about reconnection, reflections, mindfulness. The adventure needs challenges to be fun and rewarding. However, a monumental struggle through mood, torrential rain or scorching sun would tip the scale in the opposite direction. I don’t want to remember it being 75% good, the rest being burden and annoying problems. I mean, I don’t expect it will be perfect, but I’ll do what I can to keep it a great experience.&lt;/p&gt;

&lt;p&gt;Five-to-six days feels like the absolute sweet spot. A one-day walk doesn’t carve out enough memories. It doesn’t get boring enough. A 10-day walk, on the other hand, advances the boredom and pain. Two days, three, none look like it’d leave a deep enough mark. Five days, though, that’s the perfect shape for this walk’s objectives.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;../images/posts/2025-10-02-planning-a-walk-in-japan/kumano-map-handdrawn.jpg&quot; alt=&quot;&quot; class=&quot;crop-vertical-1&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;the-shape-of-the-walk&quot;&gt;The shape of the walk&lt;/h2&gt;

&lt;p&gt;To be in the present, no modern distractions are allowed. No mobile phone, no social media, no podcasts or music transporting us elsewhere. Taking pictures is a must (memorable, remember?), but even that could be distracting, so I’ll be intentional and keep the shutter movements limited to certain time windows.&lt;/p&gt;

&lt;p&gt;One rule is that no more than 15 miles (~20 km) will be walked per day. I need to keep in mind that I’m an amateur that will be carrying a 15-20 pounds backpack. Guesthouses will be waiting before dawn everyday. I won’t feel bad if I have to take a bus to respect my limits.&lt;/p&gt;

&lt;p&gt;A rest day will wait for me on Day 3. That day will serve for reflection about the previous day, while my sore legs recover for the final push. A great candidate is Yunomine, the oldest &lt;em&gt;onsen&lt;/em&gt; in the world. That depends on what trail will be chosen.&lt;/p&gt;

&lt;p&gt;Overall, we must reach our destination everyday by 4pm. Guesthouses prepare baths by 3:30-4pm, and dinner is served at 6pm. Arriving later will make leave hosts quite annoyed and unhappy.&lt;/p&gt;

&lt;p&gt;The Kumano Kodo is a UNESCO heritage pilgrimage trail, and you can collect stamps along the way. Honestly? I don’t care as much about that. It’s a nice-to-have, sure, but I won’t care if I don’t get it, especially if it’s for a better trail.&lt;/p&gt;

&lt;h2 id=&quot;what-would-be-the-ideal-trail&quot;&gt;What would be the ideal trail?&lt;/h2&gt;
&lt;p&gt;&lt;span class=&quot;subtitle&quot;&gt; ❈ 117 days to the walk&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;The decision to walk the Kumano Kodo was made a long ago, but the indecision lingers about which route. There are many, all coming from different regions but leading to the same temples.&lt;/p&gt;

&lt;p&gt;The ones that stand out are the &lt;em&gt;Iseji&lt;/em&gt;, a 130 mile (~170km) journey from the city of Ise, threading through mountains and beaches, through fishermen villages by the Pacific coast; the &lt;em&gt;Nakahechi&lt;/em&gt;, a more traditional hike starting from Tanabe through gorgeous forests and mountains passes; the &lt;em&gt;Kohechi&lt;/em&gt;, a tougher version of the &lt;em&gt;Nakahechi&lt;/em&gt;, starting or ending &lt;em&gt;Koyasan&lt;/em&gt; to the north; or the &lt;em&gt;Nakasendo&lt;/em&gt;, a 350 miles (~500 km) traditional road people used to travel between Tokyo and Kyoto (not Kumano Kodo, though).&lt;/p&gt;

&lt;p&gt;I spent &lt;em&gt;a lot&lt;/em&gt; of time reading about these trails, you have no idea. The Nakasendo looks absolutely gorgeous, it still preserves the architecture and style from the Sengoku period, when Samurai’s would traverse those roads towards the capital, but my heart is inclined to Iseji and Nakahechi. The Kohechi looks ok, but I sense it’ll be too painful for an amateur like me.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Iseji&lt;/em&gt; is longer and its beaches add variety to the walk. Walkers mention an awe, as you walk down from the mountains towards the ocean. &lt;em&gt;Nakahechi&lt;/em&gt; is a traditional hiking trail, with more severe elevation gains, deep into the forest. It is beautiful, don’t get me wrong, but it’s not &lt;em&gt;as beautiful&lt;/em&gt;, although its utmost historic importance.&lt;/p&gt;

&lt;p&gt;The more I research, the more crystalline is the fact that the walk is the destination. The temples a gorgeous, but they aren’t as special as the process. The true reward is living in the moment, slowing down, entertaining primitive thoughts as the lush forest opens up with every step.&lt;/p&gt;

&lt;h3 id=&quot;planning-takes-a-hit&quot;&gt;Planning takes a hit&lt;/h3&gt;

&lt;p&gt;Personal and business matters force me to spend a month in the United States immediately before the walk. I’m suddenly forced to pause the Kumano Kodo’s research and plan another juggernaut of a trip. There are simply too many logistic details to figure out.&lt;/p&gt;

&lt;p&gt;Where can I exercise? Where can I practice stair climbing? For each Airbnb option, are there grocery stores at walking distance? Should I purchase hiking gear in the US, and if yes, where?&lt;/p&gt;

&lt;p&gt;Spoiler alert: the trip gets considerably more challenging with US in the equation.&lt;/p&gt;

&lt;h3 id=&quot;a-new-partner&quot;&gt;A new partner&lt;/h3&gt;

&lt;p&gt;This trip was supposed to be solo because my wife had an unavoidable work schedule. I had no choice, I had take vacations this year or I’d lose it.&lt;/p&gt;

&lt;p&gt;Winds changed direction and my wife was able to free up her scheduled, so she’s joining me in the walk. The overall purpose and rules still apply, but a rather gray-ish journey suddenly became colorful.&lt;/p&gt;

&lt;p&gt;The scale tips towards Iseji. My wife has a preference for the coastal walk. The images are incredible.&lt;/p&gt;

&lt;h2 id=&quot;the-ground-shakes&quot;&gt;The ground shakes&lt;/h2&gt;
&lt;p&gt;&lt;span class=&quot;subtitle&quot;&gt; ❈  59 days before the walk.&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;So, &lt;em&gt;Iseji&lt;/em&gt; or &lt;em&gt;Nakahechi&lt;/em&gt;? I’ve spent way more time than I’d like to admit choosing between the two trails. So-much-research. One such aspect is bears. My YouTube feed algorithm suggests now only topics like, “How you’d not survive a bear attack”, and “The ten worst bear attacks in history”. I regret having searched about that at any point.&lt;/p&gt;

&lt;p&gt;A whole article could be written about the Japanese black bears. They are more pervasive in the north of Japan, roaming villages, foraging trash, but nonetheless present along the Kumano Kodo. Encounters are extremely rare, but my instinct compels me to spend weeks reading about the topic, triangulating sightings from local prefecture maps to calculate odds of being the lucky one to hug a bear (or be hugged by one). By my estimations, it’s 4 times more likely to be bitten by a dog than encounter a bear. The bad news is that I’ve already been bitten by one.&lt;/p&gt;

&lt;p&gt;Then, something unexpected happens. A magnitude 8.8 earthquake off Russia’s Kamchatka Peninsula triggers &lt;a href=&quot;https://archive.is/8KcTE&quot;&gt;tsunami warnings across Japan and the US&lt;/a&gt;, and the decision about Iseji sort of self-resolves. It’s a road on the coast!&lt;/p&gt;

&lt;p&gt;I mean, tsunamis are rare and even if they occur, sirens would howl hours before any catastrophy. We’d just walk to high ground. However, would I want to walk while my brain is in constant alert about a potential wave washing us off? I don’t think so, despite how gorgeous &lt;em&gt;Iseji&lt;/em&gt; is. More or less at the same time, I learned that bear sightings are way more common along the &lt;em&gt;Iseji&lt;/em&gt; road too (probably because it’s a longer road, I suspect), in relation to the &lt;em&gt;Nakahechi&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;In any case, it feels way, way less stressful to walk the &lt;em&gt;Nakahechi&lt;/em&gt; and leave the &lt;em&gt;Iseji&lt;/em&gt; for another time.&lt;/p&gt;

&lt;h2 id=&quot;the-nakahechi-trail&quot;&gt;The Nakahechi trail&lt;/h2&gt;

&lt;p&gt;The objective is reaching three checkpoints: Hongu Taisha, a humongously tall torii gate; Shingu taisha temple; and finalizing in Nachisan, a majestic red temple built in the 7th century, with Japan’s tallest waterfall as background.&lt;/p&gt;

&lt;p&gt;To hit those goals, I’ve spent more time researching trails than I’d like to admit. In which order should we arrive at those temples? How do these trails connect? How to limit a day’s total distance walked and still make to destinations? Where to grab food? What are the potential guesthouses? And then checking a guesthouse’s availability you discover it’s alreayd fully booked, forcing you to get back to square one.&lt;/p&gt;

&lt;p&gt;Overall, we know where we want to start and end. Takijiri-oji to Nachisan. We could start in Takahara which is close, but we’d miss the traditional stone stairs. Nachisan is the great finale we are looking for, with one of the most beautiful temples I’ve seen, with the highest waterfall in Japan as background.&lt;/p&gt;

&lt;p&gt;After much deliberation, the overall itinerary in my mind looks a bit like this:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Day 1:&lt;/strong&gt; take a bus to Takijiri-oji, and from there walk to Takahara (~3.7 km, 1.5–2.5 h; difficulty 2.5 / 5), then to Gyuba-dōji-guchi (~8 km, ~3 h; difficulty 3 / 5), and arrive in Chikatsuyu to sleep (~1.3 km, 30 min; score 1).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Day 2, arriving in Hongu:&lt;/strong&gt; we start the day in a bus to Hosshinmon-oji, and walk to Hongu (~7.5 km, 2–3 h), where we will see the tall gate (Taisha).&lt;/p&gt;

&lt;p&gt;&lt;em&gt;“Why take a bus?”&lt;/em&gt;, I can hear you asking. Well, the views as you walk down the Hosshinmon-oji are way more beautiful, and the distance is more or less the same. There’s also a nice spot to take pictures of the Hongu Taisha as you descend the mountains.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Day 3, rest day:&lt;/strong&gt; I’m uncertain where to go, but Yunomine is the best candidate. It’s the oldest onsen in the world. People travel the world to bath in these waters, and it’s only 3-4km from Hongu.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Day 4, hardest walk to Shingu:&lt;/strong&gt; we walk the Kogumotori-goe, the longest and hardest day, arriving in Koguchi. Difficulty score 4 out of 5.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;(A note from the future: I learned later that Koguchi doesn’t have logding anymore, so the plan is to get there before 5pm, which is the last bus to Shingu. Somewhat… dangerous?)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Day 5, Nachisan finale:&lt;/strong&gt; we take a bus from Shingu early morning and climb the famous Daimon-zaka stone stairs to Nachi Taisha and falls. We take a train out back to civilization.&lt;/p&gt;

&lt;h2 id=&quot;t-44-days-to-hike&quot;&gt;T-44 days to hike&lt;/h2&gt;

&lt;p&gt;It feels like an eternity, the wait until we put our foot on the trail. Despite the ample time, some of these villages have only a handful of places to sleep, and they book fast.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;../images/posts/2025-10-02-planning-a-walk-in-japan/chatgpt-google-maps-ios.png&quot; class=&quot;small&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Koguchi seem to have one available place to stay (although if you walk into further trails, there are more options, but after a long day, that’s not going to be great). You’ll see that two days later, I learn that Koguchi doesn’t have any lodging available anymore.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;../images/posts/2025-10-02-planning-a-walk-in-japan/t-44-koguchi.png&quot; alt=&quot;&quot; class=&quot;crop-vertical-1-5 small&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;dinkus&quot;&gt;***&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;Physical conditioning is another issue. I’m far from the ideal shape. Where I live, surfaces are flat everywhere. The only option is gym training and long walks.&lt;/p&gt;

&lt;p&gt;During walking practice, I realize my back isn’t in great shape. I suspect it’s due to posture. ChatGPT tells me its suspicion is weak minor stabilizing muscles. I consciously hold my core stiff as I walk and the pain subsides. One pain points relieves, yet another starts: my left heel is starting to ache, like a tiny knife is pushing up. The back pain returns, now closer to my hips.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;(Comment by a traveler from the future: these specific pain points remained a challenge until the very end of the walk.)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;After 20 minutes, my thoughts get gradually more constrained until they almost disappear. It’s like a kind of meditation session. I’m more focused on whatever is important. My thoughts aren’t all over the place anymore.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;../images/posts/2025-10-02-planning-a-walk-in-japan/t-44-training-shadow.jpeg&quot; alt=&quot;&quot; class=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;After 9 km, my back pain score is 5 out of 10. It’s not terrible, but just enough for me to remember every second that my back exists. I also didn’t have lunch and now it’s 3:14 PM so I had to have a banana. Coincidentally or not I feel like this was the most delicious banana I ever had.&lt;/p&gt;

&lt;p&gt;I finish the training after 10 km. Two hours, an annoying back pain, and a knife in my shoe.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;../images/posts/2025-10-02-planning-a-walk-in-japan/t-44-training-end.jpeg&quot; alt=&quot;&quot; class=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;../images/posts/2025-10-02-planning-a-walk-in-japan/t-44-training-watch.jpeg&quot; alt=&quot;&quot; class=&quot;small&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;logding&quot;&gt;Logding&lt;/h3&gt;

&lt;p&gt;I get a scary message by Craig Mod. I completely underestimated the scarcity of places to stay along the Nakahechi.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;&lt;em&gt;Alex, if you haven’t booked lodging yet, I suspect you may just have to do with whatever’s available. For Nakahechi, a lot of folks book 6-months out at least. Please report back how finding lodging goes.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;img src=&quot;../images/posts/2025-10-02-planning-a-walk-in-japan/t-44-cmod-on-late-logding-booking.png&quot; alt=&quot;&quot; class=&quot;small&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Using the Japanese reservation website feels like time travelling to the 1991. The system is terrible. The &lt;a href=&quot;https://www.tb-kumano.jp/en/2024/03/13/12612/&quot;&gt;Tanabe prefecture website&lt;/a&gt;, which intermediates reservations with the various village inns, &lt;strong&gt;does not work before 9am Japan time&lt;/strong&gt;.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;The KUMANO TRAVEL Community Reservation Site is only open to receive new requests during set operational times: Daily 9:00 to 17:00 (Japan Standard Time).&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Yeah, they took the physical world and replicated online. Well, I’m thankful that at least I wasn’t required to fax them!&lt;/p&gt;

&lt;p&gt;For the next 2 days, I aggressively research and book guesthouses / lodging. What a relief. I feel pretty lucky to have found options: a series of simple&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Day zero at Michelin guide guesthouse:&lt;/strong&gt; a proud discovery we made was this &lt;a href=&quot;https://www.balsamicojam-nankiwakayama.com/kumano-winery-guest-house&quot;&gt;Airbnb in the mountains near Takijiri by an italian chef&lt;/a&gt;. &lt;em&gt;Dal&lt;/em&gt; creates has own goats to make his own cheese, and sources his vegetables from his own garden. It feels like the perfect to sleep before the walk.&lt;/p&gt;

&lt;p&gt;Getting there, however, is a huge challenge, and the whole operation feels like we compressed a thousand tasks into a few hours. Once landing in Tokyo after a sleepless 12h flight, we have 24 hours to travel roughly [todo - numbers] 430 miles (690 km), buy hiking gear, organize our bags, store our luggage somewhere, and figure out how to navigate the transporation system.&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;&lt;strong&gt;T-40 days to walk:&lt;/strong&gt; a message from the Kawayu’s guesthouse (Day 3) arrives detailing what they serve and don’t. On that Wedsnesday we stay there, dinners won’t be served. It’s also a village without grocery stores or restaurants.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;../images/posts/2025-10-02-planning-a-walk-in-japan/t-40-no-dinner.png&quot; alt=&quot;&quot; class=&quot;small&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;elevation-reckoning&quot;&gt;Elevation Reckoning&lt;/h2&gt;
&lt;p&gt;&lt;span class=&quot;subtitle&quot;&gt;
The day I realized a trail has +1,000m / 3,600 ft of climb. I completely underestimated the walk. Just 41 to prepare.
&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;I sip a cup of tea on a Wednesday at home, 9pm. Watching random thoughts run free in my mind, some walk-related, some are work-related, I recall how untrustworthy &lt;em&gt;Google Maps&lt;/em&gt; is for plotting trails, and wonder how &lt;em&gt;Apple Maps&lt;/em&gt; is doing on that front. A recent announcement promised hiking trails with higher precision, so I check it out.&lt;/p&gt;

&lt;figure&gt;
&lt;img src=&quot;../images/posts/2025-10-02-planning-a-walk-in-japan/t-37-0-shock-maps.jpeg&quot; /&gt;
&lt;figcaption&gt;Apple Maps displays 3,608ft elevation&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;“What?”, I gasp. “A kilometer?”, I incredulously stare at my screen for a few seconds while my head spins around. “That can’t be right, &lt;em&gt;riiiight&lt;/em&gt;!? This is Apple’s new software, maybe it’s a bug.&lt;/p&gt;

&lt;p&gt;I suddenly feel the dumbest person for not being aware of that kind of &lt;em&gt;very-critical-detail&lt;/em&gt;. I mean, I’m flying to the other side the planet, watched dozens of videos, checked routes, bus lines and schedules over and over, how one of the most important aspects went unnoticed?&lt;/p&gt;

&lt;p&gt;I’m already at arms-length into this hike, lodging is booked, I can’t give up. I won’t give up. So I turn to Claude to get more details.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Claude: Looking at the Kumano Kodo trail data, from Takijiri to Chikatsuyu involves approximately 3,313 ft of elevation gain over the ~14km distance.&lt;/p&gt;

  &lt;p&gt;You’re looking at about 337 flights worth of elevation gai…&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;“337 flights of stairs?”, I gasp again. That’s… (counting on my fingers) climbing my apartment building 24 FREACKING TIMES. I’m faced by a monster bigger than me, a hill too tall to be conquered by someone who hasn’t ever hiked. I’m also scared anticipating how my partner will hear this disturbing piece of news.&lt;/p&gt;

&lt;p&gt;I can’t give up, but I could definitely change the plans. I pursue that idea for… 2 seconds. I let that concept flash in my mind, only to realize retreating would leave me feeling unhappy and uncapable of doing what many thousands have already done. I mean, I could start off in Takahara, but it’d be flat and easy surface from there, would I feel proud of myself? This is not an Everest hike (that one is risky by definition), it’s the Kumano Kodo; it doesn’t look that big of a deal. So what’s the real problem? Is it really impossible to do this hike? Or am I judging the situation prematurely? Maybe I just need more information before I can make a decision.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Research mode&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;“Ok, so, I need more guidance”, I tell Claude. “I have roughly 30 days, I can walk on a flat surface for 15-20km. I don’t seem to have enough time build up muscle to climb 300+ flights in a single session, but during the hike, I will not need to climb 300 in a single session anyway; it’s distributed over 13km.”&lt;/p&gt;

&lt;p&gt;There’s no size-fits-all and Claude doesn’t know me, so I need a range of numbers to understand where I am. I continue, “What are the no-go, minimum, and ideal number of stairs that I need to be able to climb in a single session to train for this hike, considering that during the hike I will stop a few times for resting, and also for lunch? Let’s be realistic.”&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Claude: Given your 30-day timeline and current fitness (already walking 15-20km / 9-12 miles flat), here are realistic target for single sessions:&lt;/p&gt;
  &lt;ul&gt;
    &lt;li&gt;No-go: Less than 60 flights continuously without major distress&lt;/li&gt;
    &lt;li&gt;Minimum: 100-120 flights total (can break into sets of 20-30 with 2-3 min breaks)&lt;/li&gt;
    &lt;li&gt;Ideal: 150-180+ flights total in a session&lt;/li&gt;
  &lt;/ul&gt;

  &lt;p&gt;You’re right - you won’t need 300+ continuous flights. The elevation is distributed over hours with natural breaks for views, photos, snacks. If you can do 150 flights in sets during training, you’ll manage the hike.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I lack reference points, but 150 is a bit more reassuring than 300+. That looked impossible. This? Ugh, it’s still 150 floors. I don’t remember ever walking nowhere close to half that many. I remember walking up 17 floors to help out a friend during a power outage. I got up there and was sweating, but I remember feeling like I could do more in a life-or-death situation. Probably not 133 more. Not probably, certainly.&lt;/p&gt;

&lt;p&gt;AI’s can be exponentially more helpful when given details about time, place and your state of mind, so I share my schedule for maximum customization. I replace Claude with ChatGPT because it’s better at cranking numbers. “&lt;em&gt;Week 1&lt;/em&gt;, I’m in an apartment building with 14 flights of stairs; on &lt;em&gt;week 2&lt;/em&gt;, I’m at a hotel in San Francisco (it has stairs); &lt;em&gt;weeks 3-4&lt;/em&gt;, Airbnb without stairs in San Jose’s Santana Row area, no idea about gyms; &lt;em&gt;week 5&lt;/em&gt;, I’m attending a company offsite in Vail with access to gym; &lt;em&gt;week 6&lt;/em&gt;, hike starts”.&lt;/p&gt;

&lt;p&gt;I get back a plan. The looks is surprisingly detailed, tailored to my precise needs.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;If you can string 120+ floors once a week (plus flat mileage) by mid-September, you’re realistically ready. Hitting 150+ gives peace of mind.&lt;/p&gt;

  &lt;ul&gt;
    &lt;li&gt;Week 1 — 14-floor bldg: do 168 floors (total 6 loops, up only). 84 floors in 2 sessions. Walk down via elevator to save knees. Add 5 kg day-pack on 2nd session.&lt;/li&gt;
    &lt;li&gt;Week 2 — SF hotel: shoot for 100-120 total in 1 session. Target ≥ 120 floors. Add 1 shorter 60-floor lunch climb.&lt;/li&gt;
    &lt;li&gt;Weeks 3-4 — Santana Row, no stairs: if no gym is available, find a parking-garage (Valley Fair garage has 6-7 floors). Target 120 floors week 3, 150 week 4.&lt;/li&gt;
    &lt;li&gt;Week 5 — Vail, hotel gym + altitude: peak session: 160-180 floors continuous. Altitude makes lungs work, so keep heart rate below 80% max, and hydrate.&lt;/li&gt;
    &lt;li&gt;Week 6 — on trail: You’re tapering—just easy walks. Focus on sleep &amp;amp; nutrition.&lt;/li&gt;
  &lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;I stand up and ask myself, “what am I doing”?&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;dinkus&quot;&gt;***&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;My partner needs to know what’s going on. “Hey”, I greet, “got a minute? I have good and bad news, which one do you wanna hear first?”, I ask rhetorically, proceeding almost immediatelly: “The bad news is that on Day 1, we’ll need to climb 1 kilometer”. I pause, and she frowns with a face of calculation. “That’s equivalent to 330 floors. Our building, times 24”. She gives me a blank stare for a second or two, then begins laughing uncontrollably into a fetal position. “Wait, wait”, I say, “there’s good news: I have a plan”.&lt;/p&gt;

&lt;h1 id=&quot;exercise-shock&quot;&gt;Exercise shock&lt;/h1&gt;
&lt;p&gt;&lt;span class=&quot;subtitle&quot;&gt;T-37 days to hike&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;A superpower I’ve had since childhood is to be able to obsess over things, sometimes to my detriment, but most times for my own benefit. When in that state, fears and distraction are bypassed, and over the years I learned to channel that. Call me a nerd, but if concentrate in certain ways on an end-goal, I can turn on a kind of robotic discipline to get there. I can’t explain why it works for me, but this ability helped me in key moments, from school and studying how to fix my lactose intolerance, to building my own company and getting clients in the US.&lt;/p&gt;

&lt;p&gt;That obsession kicked in this week in full force. Once the reality of my miscalculation settled that Wednesday night, my mind could only see a picture of the mountains around Hongu with their lush forests, the carpets of stone laid out through dense cedar and cypress forests, guiding pilgrim’s walks for thousands of years. I felt that the imagination, despite far into the distance, could someday be a reality in front me.&lt;/p&gt;

&lt;p&gt;My hatred for exercising vanished the next morning. There was no procrastination, and the concept of pain felt secondary. I suspect that’s a tiny bit how people like &lt;a href=&quot;https://en.wikipedia.org/wiki/David_Goggins&quot;&gt;David Goggins&lt;/a&gt; feel when running endless marathons. While I’d have given up sooner when lifting weights, that day I kept pushing to the final count while the Hongu Taisha Otorii flashes blinked in my mind. The exercising process had ceased from being an end in and of itself, and became a conduit, a means to a greater end. I had never felt that towards gym.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;../images/posts/2025-10-02-planning-a-walk-in-japan/t-37-gym-leg-day.jpg&quot; alt=&quot;Gym leg day&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Whenever thinking about the exercising I’d need to do, that thought was overlaid with the trail image I had to walk, all its tree roots and the rocky steps.&lt;/p&gt;

&lt;h4 id=&quot;how-much-trouble-am-i-in&quot;&gt;How much trouble am I in?&lt;/h4&gt;

&lt;p&gt;On August 22, I head to the ground floor after a workday, carrying my 1L sling bag with a water bottle, and start the climb. The first few floors go untroubled. After the 19th floor, I start breathing heavily and I need to be proactive about the rhythm. The soreness from yesterdays’s workout joins me again, as if mocking my ascent. I laugh back.&lt;/p&gt;

&lt;p&gt;My lower glutes punch me at every step. After every loop, I head down via elevator to preserve my knees (my focus is gaining muscle, not damaging my joints). After the 47th floor, small 20-30s pauses for breathing are necessary. The fight is ending, and after 37min, I complete 89 floors.&lt;/p&gt;

&lt;gallery&gt;
&lt;img src=&quot;../images/posts/2025-10-02-planning-a-walk-in-japan/t-37-first-stair-session.jpeg&quot; class=&quot;crop-vertical-2-3 crop-top&quot; /&gt;

&lt;img src=&quot;../images/posts/2025-10-02-planning-a-walk-in-japan/t-37-first-stair-session-ios.png&quot; class=&quot;crop-vertical-2-3&quot; /&gt;
&lt;/gallery&gt;

&lt;p&gt;Eighty-nine-floors. It might look like nothing to you, or a lot, but I had not clue what to expect. I’m both jubilant that my first session finished above the &lt;em&gt;No-Go&lt;/em&gt; threshold, and worried that it’s below the &lt;em&gt;Minimum&lt;/em&gt;. All in all, this is August 22, not September 22, so I’ll keep my judgment in suspension for another month, but it looks much more doable and less scary now.&lt;/p&gt;

&lt;p&gt;I laydown ice bags with trembling legs for my precious glutes.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;../images/posts/2025-10-02-planning-a-walk-in-japan/t-37-gym-ice.jpeg&quot; alt=&quot;Ice for the glutes&quot; /&gt;&lt;/p&gt;

&lt;h1 id=&quot;travel-starts&quot;&gt;Travel starts&lt;/h1&gt;

&lt;p&gt;We travel to the United States for a wedding over the weekend in Minneapolis. The general plan is spending a week in San Francisco and two in San Jose. Training will resume anywhere possible.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;../images/posts/2025-10-02-planning-a-walk-in-japan/t-29-minneapolis.jpg&quot; alt=&quot;Traveling to the US&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;a-lost-week&quot;&gt;A lost week&lt;/h2&gt;
&lt;p&gt;&lt;span class=&quot;subtitle&quot;&gt;I get sick and stay stuck in a hotel room. 25 days to walk.&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;[TODO] Sep 1, Mon: we get in San Francisco (Sun) and it feels like some allergy is brewing. Allergies are part of my life, so I don’t think much about it, I just swallow a pill. The runny nose and watery eyes get worse and worse. The pill goes completely ignored and the situation gets worse by the hour. The “allergy” turns out to be a full blown cold / flu.&lt;/p&gt;

&lt;p&gt;On Tuesday, I’m able to get some work done, but end up in bed until 7pm. Wed, Thu, the entire week goes by without any exercise possible.&lt;/p&gt;

&lt;p&gt;Friday finally gave me some breathing room for a reset, and I walked that day about 3 miles. I was weak and every step felt like a carrying a large boulder in my backpack.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;San Francisco&lt;/li&gt;
  &lt;li&gt;I get sick on Labor Day, a holiday in the US. We stay stuck in the hotel for a whole week. Five days later, 21 days to the walk, I’m able to finally take a stroll outside for a little longer than 4km without feeling like my body is falling apart.&lt;/li&gt;
  &lt;li&gt;I am not productive for the whole week&lt;/li&gt;
&lt;/ul&gt;

&lt;!-- TODO: should this image show up? --&gt;
&lt;!-- img src=&quot;../images/posts/2025-10-02-planning-a-walk-in-japan/t-25-sickness.jpeg&quot; alt=&quot;Drugs, tissues and a trash bucket&quot; --&gt;

&lt;p&gt;Our next destination is San Jose, California, where we will stay for two weeks. The Airbnb is located in a nice and convenient area in Santana Row.&lt;/p&gt;

&lt;h2 id=&quot;san-jose-back-to-square-one&quot;&gt;San Jose: back to square one&lt;/h2&gt;
&lt;p&gt;&lt;span class=&quot;subtitle&quot;&gt;21 days to walk.&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;The bus speeds through San Jose, I see a repetition of blocks and houses that all look the same, like if we were walking in circles. The endless suburb is tidy and organized, no trash on the streets, lush grass, and cars. Lots of cars.&lt;/p&gt;

&lt;p&gt;Cities in America aren’t made for walking. You either hit some area lacking a sidewalk, or you find yourself suddenly walking on a highway, and your ears work non-stop for the tires on the tarmac. Training just isn’t fun.&lt;/p&gt;

&lt;p&gt;I Back hurts [todo] &lt;em&gt;“What you’re describing (tired, achy mid-back muscles next to the spine, not sharp or ‘injury pain’) sounds like muscular fatigue from postural stabilizers — the muscles that keep your torso upright”&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;[todo]&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;../images/posts/2025-10-02-planning-a-walk-in-japan/san-jose/L1000263.jpeg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;the-last-mile&quot;&gt;The last mile&lt;/h2&gt;
&lt;p&gt;&lt;span class=&quot;subtitle&quot;&gt;We land in Colorado for the last week before the walk. Over the weekend we take a short walk through the Garden of the Gods.&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;I’m optimistic we’ll have a good time next week. My back still hurts after long walks with a backpack, but it’s manageable. My legs are doing their job well so far, to the extent I have tested them. However, most of the training has been on flat surfaces or in the gym, so it’s time to go out there and start hiking more complex surfaces.&lt;/p&gt;

&lt;p&gt;In &lt;em&gt;Vail&lt;/em&gt;, on a Tuesday afternoon, we head to the Son of the Middle Trail, a 3-hour walk uphill through a color palette of yellows and greens. It’s raining and muddy, but the spirit of adventure is more intense than the annoyance. I’m not alone, so in any event there is support.&lt;/p&gt;

&lt;p&gt;The initial climb feels… tiresome. I’m shocked at how much of a bad state my breath is, I’m gasping for air. I recall, though, that &lt;em&gt;Vail&lt;/em&gt;’s altitude is 8,150 ft, and I feel less bad about it. I start to wonder, however, whether having embarked on this trail was a good idea at all.&lt;/p&gt;

&lt;p&gt;My legs keep trucking along like soldiers on a march. After 850 ft of elevation gain over 2.5 km, though, I finally start feeling glutes. I’m fighting for air, breathing keeps getting harder and harder.&lt;/p&gt;

&lt;p&gt;At the 50 minutes mark and 980 ft of elevation gain (300 m), I assimilate how that much is similar to Day 1 on the Kumano Kodo, from Tajikiri to Chikatsuyu, except there it’s 3x the elevation gain and 13km. Here, I barely walked 2.8km.&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;There’s a kind of spiritual sensation when you are in a primitive environment like this. You face your primitive sensations, your primitive struggles to keep going when your muscles are crying out for a break, all while you are applying just the necessary mental concentration to make sure you’re step on the right spots, on the right rock, on the right fallen branch, beside the mud.&lt;/p&gt;

&lt;p&gt;It makes you appreciate the modern life, how far we’ve come as a society. All this mental focus through struggles was once how we kept moving through tremendous distances to grab a bucket of water for our families. The physical movement is a mental training as much as it is for the muscles.&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;After an hour or so, 3.2 km and 1120 ft of elevation, a flat section that makes my legs feel like they are resting. Movement that feels like a pause. A mere 30 seconds on level ground is enough for my muscles to smile.&lt;/p&gt;

&lt;p&gt;My left foot starts hurting after about 70 minutes. I become more intentional about what I’m doing with it. The mindfulness means throwing my foot in the air so that the movement serves as micro-massage, leaving my leg more flexible than before. That is enough for a while, and the pain subsides until I need to start climbing again, which requires making my foot stiff to sustain my body on the ground. This dynamic of pain followed by relief, followed by pain continues for another 20-30 minutes. I guess it got more relaxed after a while?&lt;/p&gt;

&lt;p&gt;The hike continues for another hour, no more pain, my glutes are fine, my legs are marching along and I’m just used to the walk. I get into a tunnel vision and just enjoy nature.&lt;/p&gt;

&lt;p&gt;The walk comes to an end. I’m back at the hotel. Maybe tomorrow I’ll do it all over again. Or should I?&lt;/p&gt;

&lt;h1 id=&quot;tokyo-to-kyoto-to-tanabe&quot;&gt;Tokyo to Kyoto to Tanabe&lt;/h1&gt;

&lt;p&gt;We land in Tokyo after a sleepless 12h flight and travel straight 3-4 hours to Kyoto, where we will sleep. We arrive 8pm and go shopping for hiking gear around the station until 9pm, along with our heavy luggages. We move hiking gear to our backpacks and get to bed. Next morning, we ship our need to&lt;/p&gt;

&lt;p&gt;[todo]&lt;/p&gt;

&lt;p&gt;[TODO] 2025-09-28 Estamos bem, chegamos mortos ontem. 21h de viagem depois de ter dormido 4.&lt;/p&gt;

&lt;p&gt;Acordamos 5:50 e estamos arrumando mochilas e tal. Vai chover então alguns planos precisam ser ajustados.&lt;/p&gt;

&lt;p&gt;7:30 agora, pausa pro café. Depois, finalizar malas para despachar para o hotel que chegaremos em 7 dias. Cada dia é crítico e se a gente não conseguir chegar no destino, gera uma reação em cadeia bizarra 🥲&lt;/p&gt;

&lt;p&gt;Hoje vamos pra Tanabe onde o chef aquele vai nos pegar de carro, e vamos dai pras montanhas. Caminhada começa amanhã.&lt;/p&gt;</content>

      

      

      

      

      
        <category term="obsidian" />
      
        <category term="essay" />
      
    </entry>
    
  
    
    <entry>
      <title type="html">Problem-solving template</title>
      <link href="https://alexoliveira.cc/guide/problem-solving-template" rel="alternate" type="text/html" title="Problem-solving template" />
      <published>2025-06-22T14:00:00+00:00</published>
      <updated>2025-06-22T14:00:00+00:00</updated>
      <id>https://alexoliveira.cc/guide/problem-solving-template</id>
      <content type="html" xml:base="https://alexoliveira.cc/guide/problem-solving-template">&lt;p&gt;The following is a template for RFC’s and Tech Briefs I’ve been using since 2013 in startups for change proposals and aligning understanding among engineers and business people.&lt;/p&gt;

&lt;h2 id=&quot;why-would-we-use-such-a-template&quot;&gt;Why would we use such a template?&lt;/h2&gt;

&lt;p&gt;We engineers tend to over-optimize for solutions (to engineer literally means “find solutions”). In that process, we sometimes forget to think deeply about the problem, especially when we’re passionate about the solution. Lots of engineers jump to resolution without fully understanding the problem, and/or without communicating their understanding to those around, generating more problems in the process.&lt;/p&gt;

&lt;p&gt;To interrupt that bias, this template serves as a sort of checklist while also giving structure to the very solution. Forcing the writer to think deeply about the problem before diving into a solution optimizes for rationality and maximizes changes of success.&lt;/p&gt;

&lt;p&gt;↘︎ &lt;a href=&quot;#template&quot;&gt;Skip to template&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Think of it as a starter kit. You can get a lot more sophisticated. For example, under the Problem section, you could include user stories, data, and anything that details it, but you’re free to omit that depending on your situation.&lt;/p&gt;

&lt;p&gt;Some tips:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;The best documents are the shortest. Inexperienced people don’t write docs, but when they first see their value, they write bibles. After a few years and seniority, they realize most of it is noise, and then they start writing short but good documents.&lt;/li&gt;
  &lt;li&gt;Get feedback on your first draft, to make sure you’re going in the right direction. The best professionals do.&lt;/li&gt;
  &lt;li&gt;I’ve used Github for reviews for years, and more recently people have preferred UI’s like Notion, which in you can comment on specific sentences. That’s secondary, but interacting and iterating on the document should be fast.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;the-template&quot;&gt;&lt;a name=&quot;template&quot;&gt;The template&lt;/a&gt;&lt;/h1&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;tl;dr {write this after the doc is ready}

{Small 1-2 sentences introducing this document.}

# Problem

{
Explain the problem. Start from high-level to low-level, creating anchors for the reader.

Take the reader background into consideration. For engineers, focus on technical. For a non-technical audience, start with non-technical language to orient them.

If you can&apos;t explain it, you don&apos;t understand the problem. Don&apos;t jump to solutions before you understand it and the constraints.
}

# Objectives [optional]

{
Describe what you aim to achieve with the solution below. Do we want to hit a specific number? Do we want to decrease a particular threshold?

This section can grow into subsections and include metrics (usage, performance), as well as business objectives, especially for Product briefs. For Tech briefs, they tend to stay focused on systems.

Why [optional]? Because most everyday problems are simple and the Problem section will already make the goals self-evident. Sometimes, however, the problem is large and you want to tackle only a piece of it. In those situations, it makes sense to say, &quot;hey, we will attack this corner over here&quot; to help the reader understand why your propose change is so brief is relation to the problem space.
}

# Proposed change

{
List here every change you are going to make, separated by system. If you are touching two systems, add sub-sections for each.

Most readers are visual, so make use of pictures, charts, diagrams and tables where possible. If you got bullet-point with sub-bullet-points, reconsider if that can become a table.

Architectures and structures that take 2 minutes of reading to understand can be visualize in seconds with a diagram. These days, Github and Notion support Mermaid so creating visual cues is easy, so no excuses.

If you&apos;re dealing with a large problem and you need multiple solutions, create separate documents for each solution. For a large problem, e.g &quot;Observability&quot;, you might want proposals &quot;Metrics&quot;, &quot;Lifecycle map&quot;, &quot;Dashboard&quot; and so on.

Rule: do not include alternatives. Your goal is to synthesize the problem and come up with a single solution. There&apos;s a whole section at the bottom for alternatives.
}

## Release plan [optional]

{
Usually bullet-points.

For more complex changes, you might need to release parts of it behind feature flags to decrease risk. Make sure to list them here, as well as the timeline. You can use tables to help the reader visualize the content.
}

# Drawbacks

{
Bullet-points with tradeoffs. What&apos;s not so great about the proposed solution? What issues aren&apos;t addressed?

This section signals to the reader that you considered the shortcomings and had a more holistic view of the problem-solution. You can also include what would be required to &quot;fix&quot; each drawback (in Pros-Cons-Fixes style).
}

# Alternatives

{
List approaches that aren&apos;t being proposed but were considered. This gives the reader a chance to review your understanding of the problem, and also signals you considered all alternatives.

Make sure to include why each alternative isn&apos;t the main proposal.
}

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;</content>

      

      
        <summary type="html">Template document for synthesizing problems, solutions and proposals.</summary>
      

      

      
        <category term="problem-solving" />
      
        <category term="programming" />
      
        <category term="engineering" />
      
        <category term="product" />
      

      
        <category term="obsidian" />
      
        <category term="guide" />
      
    </entry>
    
  
    
    <entry>
      <title type="html">My universal coding prompt (Claude Code, Cursor and others)</title>
      <link href="https://alexoliveira.cc/guide/my-universal-code-prompt" rel="alternate" type="text/html" title="My universal coding prompt (Claude Code, Cursor and others)" />
      <published>2025-06-22T14:00:00+00:00</published>
      <updated>2025-06-22T14:00:00+00:00</updated>
      <id>https://alexoliveira.cc/guide/my-universal-code-prompt</id>
      <content type="html" xml:base="https://alexoliveira.cc/guide/my-universal-code-prompt">&lt;p&gt;This universal prompt for &lt;a href=&quot;https://www.anthropic.com/claude-code&quot;&gt;Claude Code&lt;/a&gt; and others has greatly improved my AI usage for coding tasks. Before, my totally-non-scientific scoring of Claude Code would sit around 5-10% useful. Now, its usefulness rose to 85%+ and has become a tool I use everyday during development.&lt;/p&gt;

&lt;p&gt;If you’re in a hurry, &lt;strong&gt;tl;dr&lt;/strong&gt; copy the prompt at the end of this post and put in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;~/.claude/CLAUDE.md&lt;/code&gt;, which is location Claude goes to regardless of project you’re in.&lt;/p&gt;

&lt;p&gt;↘︎ &lt;a href=&quot;#prompt&quot;&gt;Skip to prompt&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&quot;whats-behind-this-prompt&quot;&gt;What’s behind this prompt?&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;It compacts information by referencing books.&lt;/strong&gt; The more tokens you add to the context window (aka your prompt), the more dilluted the overall instruction becomes. By referencing books, though, we elicit all those concepts without having to take up all that space. It’s like referencing memory vs copying memory.&lt;/p&gt;

&lt;p&gt;You’re welcome to swap with other books if you dislike any of them, but these are the ones that I found to be some of the most impactful since the 2000’s when it comes to software design. For example, I’m not religious about Single-Responsibility Principle (SRP), but I’d rather the LLM organize files in several drawers with nice and meaningful names than defaulted to using a single file for everything. Or I’d rather it avoided mocking things we don’t have control over.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Architecture and process over language techniques.&lt;/strong&gt; LLMs are pretty good at recalling your favorite language function and bad at following a development process that is sound. It never asks questions to understand the problem and is keen on jumping to conclusions quickly (like some junior developers). That’s understandable, given default prompts must work for the average user.&lt;/p&gt;

&lt;p&gt;The prompt below focuses predominantly on the development process, on problem-solving practices that go beyond software engineering. When we reference Clean Code, we’re trying to elicit those concepts of organization and formality that you won’t get if you were just telling it how to name variables.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Guardrails with orientation for problem-solving.&lt;/strong&gt; In any conversation, understanding can be verified when the listener repeats back to the speaker what they heard so the speaker can confirm it (e.g steelmaning). LLMs are especially prone to skipping that verification part, coming up with understanding that may or may not be our intent.&lt;/p&gt;

&lt;p&gt;To circumvent that, the backbone of this process is, “1. Think Before Coding […] 2. Ask Questions First […] 3. Share Your Plan […] 4. Incremental Development [40-50 lines max]”.  By forcing it to ask questions, we embed a sense of curiosity that isn’t there on average conversations. After all, LLMs being primarily generative means it won’t stop until it finds a stopping point, and we give it one with questioning.&lt;/p&gt;

&lt;p&gt;Not coincidentally, this approach is what we come to expect in engineering interviews over the years. When human candidates jump to coding without questions, except in rare situations, it generally indicates they lack the instinct to fill in intent/communication gaps that might occur between them, PMs and others. It’s a red flag for humans, much more so for an LLM.&lt;/p&gt;

&lt;p&gt;We also expect humans to share their plans. Junior developers need to share it ahead of time so coworkers can make sure they’re going in the right direction, while Senior ones do that because they learned from experience that they’re fallible human beings and need a second pair of eyes. Peer review at the heart of the process.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Braiding concepts throughout the prompt.&lt;/strong&gt; The books we mention in paragraph one are also mentioned again in the last section, and the sense of humbleness mentioned above is called for multiple times.&lt;/p&gt;

&lt;p&gt;We braid  concepts throughout the prompt, getting back to it later. Around the middle of it, “When stuck on tests, if you’re &lt;em&gt;unsure&lt;/em&gt; how to make a test pass or tempted to skip testing […] 1. STOP and ask for guidance”.  I don’t have proof, but I suspect that repeating this pattern throughout the prompt elicits more attention to this particular concept, like . In practice, it has worked wonders, drammatically increasing the output quality.&lt;/p&gt;

&lt;h2 id=&quot;how-does-it-align-with-prompting-best-practices&quot;&gt;How does it align with prompting best practices?&lt;/h2&gt;

&lt;p&gt;Before the final version, I asked ChatGPT’s Deep Research to describe the best practices from the industry, and I fed it various links to articles and papers on the subject.&lt;/p&gt;

&lt;p&gt;Once the research was done, in that same chat I gave o3 several bullet points with specific instructions I wanted it to follow, including books, the problem-solving process, and it embed those within the best practices.&lt;/p&gt;

&lt;h1 id=&quot;the-prompt&quot;&gt;&lt;a name=&quot;prompt&quot;&gt;The prompt&lt;/a&gt;&lt;/h1&gt;

&lt;p&gt;Put it in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;~/.claude/CLAUDE.md&lt;/code&gt;. Copy and use it as you’d like. I’m curious about the improvements you’re going to make.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;You are an expert software engineer with deep knowledge of Rails, JavaScript, and modern software development practices. Your approach mirrors the wisdom found in these essential texts: “Growing Object-Oriented Software, Guided by Tests” by Freeman &amp;amp; Pryce, “Clean Code” by Bob Martin, all books by Sandi Metz, “Data and Reality” by William Kent, “Thinking in Systems” by Donella Meadows, “Making Work Visible” by Dominica DeGrandis, “The Pragmatic Programmer” by Andy Hunt, the Software Delivery in Small Batches podcast, and all content by Gary Bernhardt.

## Core Development Philosophy

### 1. Think Before Coding

Before writing any code, you MUST:

- Break down the problem into its smallest logical components
- Identify unclear requirements and edge cases
- Design the architecture at a high level
- Plan the implementation approach
- Consider potential risks and mitigation strategies

Never jump straight into coding. Always think first, plan second, code third.

### 2. Ask Questions First

When presented with a new feature or problem:

1. DO NOT start coding immediately
    - Except if already answered in the prompt.
2. Instead, ask clarifying questions about:
    - Input/output formats and examples
    - Performance requirements
    - Error handling expectations
    - Integration points with existing code
    - Edge cases and boundary conditions
    - Non-functional requirements (security, scalability, etc.)

Use this format:

    Before I begin, I need to understand a few things:
    1. [Specific question about requirement]
    2. [Question about edge case]
    3. [Question about integration]
    ...

### 3. Share Your Plan

After understanding requirements, ALWAYS present your implementation plan:

    Here’s my proposed approach:

    ARCHITECTURE:
    - [High-level component design]
    - [Data flow]
    - [Key abstractions]

    IMPLEMENTATION STEPS:
    1. [First small increment]
    2. [Second small increment]
    3. [Continue...]

    NAMING PROPOSALS:
    - Classes: [proposed names with rationale]
    - Key methods: [proposed names with rationale]

    RISKS:
    - [Potential issue]: [Mitigation strategy]

    Does this align with your vision? Any adjustments needed?

### 4. Incremental Development

- Implement features in small, focused increments
- Each increment should be 50-60 lines maximum
- After each increment, explain what was done and why
- Ask if you should proceed before continuing
- Never dump large blocks of code
- If you replace some call with a new method, remember to remove the old one

Example workflow:

    Step 1: I’ll create the basic class structure with initialization
    [20 lines of code]
    This establishes our foundation. Should I proceed with adding the validation logic?

    Step 2: Now I’ll add input validation
    [25 lines of code]
    This ensures data integrity. Next would be the core business logic. Continue?

## Testing Requirements

### Test-Driven Development is MANDATORY

- We ALWAYS write tests
- Tests come before implementation when possible
- Every piece of functionality must have corresponding tests
- No code is considered complete without tests

### When Stuck on Tests

If you’re unsure how to make a test pass or tempted to skip testing:

1. STOP and ask for guidance
2. Never comment out or delete failing tests
3. Never ship untested code
4. Ask: “I’m having trouble with [specific test]. Here’s what I’ve tried: [attempts]. What approach would you recommend?”

## Code Quality Standards

### Naming Conventions

- Classes: Use nouns that describe what they represent (e.g., `OrderProcessor`, `UserValidator`)
- Methods: Use verbs that describe what they do (e.g., `calculate_total`, `send_notification`)
- Variables: Use descriptive names that reveal intent
- NEVER use generic names like `run`, `call`, `execute`, `do_work` without specific context

### Method Design

- Keep methods small (5-15 lines preferred, 20 lines maximum)
- Each method should do ONE thing
- Extract complex logic into well-named private methods
- Prefer many small, named methods over few large methods with comments

Example (Ruby):

    # Bad
    def process_order(order)
      # Validate order
      if order.items.empty? || order.total &amp;lt;= 0
        raise InvalidOrderError
      end

      # Calculate tax
      tax = order.total * 0.08

      # Apply discount
      discount = 0
      if order.customer.vip?
        discount = order.total * 0.1
      end

      # ... more logic
    end

    # Good
    def process_order(order)
      validate_order(order)
      tax = calculate_tax(order)
      discount = calculate_discount(order)
      finalize_order(order, tax, discount)
    end

    private

    def validate_order(order)
      raise InvalidOrderError if invalid_order?(order)
    end

    def invalid_order?(order)
      order.items.empty? || order.total &amp;lt;= 0
    end

    def calculate_tax(order)
      order.total * TAX_RATE
    end

    def calculate_discount(order)
      return 0 unless order.customer.vip?
      order.total * VIP_DISCOUNT_RATE
    end

### Instance Methods Over Class Methods

- Default to instance methods for better testability and flexibility
- Use class methods only for true class-level concerns
- Consider if behavior belongs to an instance of the concept

### Code Style

- Use spaces, not tabs
- 2 spaces for Ruby/JavaScript indentation
- Use consistent quotes (prefer single quotes in Ruby/JS unless interpolation needed)
- Follow language-specific conventions (snake_case for Ruby, camelCase for JS)

## Rails-Specific Guidelines

### Separation of Concerns

- Models (app/models): Database persistence and associations ONLY
- Business logic: Lives in service objects (app/services) or domain objects (lib/)
- Controllers: Thin controllers that only handle:
    - Request parameter processing
    - Calling appropriate service objects
    - Rendering responses
    - HTTP-specific concerns

### Service Object Pattern

Example in Ruby:

    # app/services/orders/process_payment_service.rb
    module Orders
      class ProcessPaymentService
        def initialize(order, payment_method)
          @order = order
          @payment_method = payment_method
        end

        def call
          return failure(:invalid_order) unless valid_order?

          charge_result = charge_payment
          return failure(:payment_failed, charge_result.error) unless charge_result.success?

          update_order_status
          send_confirmation_email

          success(@order)
        end

        private

        # Small, focused private methods...
      end
    end

## JavaScript/ES6+ Guidelines

### Modern JavaScript Patterns

- Use `const` by default, `let` when reassignment needed, never `var`
- Prefer arrow functions for callbacks and functional programming
- Use destructuring for cleaner code
- Implement async/await over promise chains
- Leverage ES6+ features appropriately

### Functional Programming Preferences

- Favor immutability (use spread operators, avoid mutations)
- Use pure functions where possible
- Compose small functions into larger operations
- Avoid side effects in core business logic

## Communication Style

When presenting code or solutions:

1. Start with the “why” - explain the reasoning
2. Present code in small, digestible chunks
3. Highlight key design decisions
4. Point out tradeoffs made
5. Suggest alternatives when relevant

## Error Handling

- Always include proper error handling
- Use custom error classes for domain-specific errors
- Provide helpful error messages
- Consider recovery strategies
- Log appropriately for debugging

## Questions to Always Ask Yourself

Before submitting any code:

1. Is this tested?
2. Would I be proud to show this to Sandi Metz, Gary Bernhardt, or Bob Martin?
3. Can this be broken down further?
4. Are the names intention-revealing?
5. Does this follow the Single Responsibility Principle?
6. Is this the simplest solution that could work?

Remember: We’re craftspeople. We write code for humans first, computers second. Every line should be deliberate, tested, and maintainable.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;</content>

      

      
        <summary type="html">This universal prompt for Claude Code has greatly improved my AI usage for coding tasks.</summary>
      

      

      
        <category term="ai" />
      
        <category term="llm" />
      
        <category term="programming" />
      

      
        <category term="obsidian" />
      
        <category term="guide" />
      
    </entry>
    
  
    
    <entry>
      <title type="html">The Space Between Yes and No</title>
      <link href="https://alexoliveira.cc/essay/the-space-between-yes-and-no" rel="alternate" type="text/html" title="The Space Between Yes and No" />
      <published>2023-08-12T19:00:00+00:00</published>
      <updated>2023-08-12T19:00:00+00:00</updated>
      <id>https://alexoliveira.cc/essay/the-space-between-yes-and-no</id>
      <content type="html" xml:base="https://alexoliveira.cc/essay/the-space-between-yes-and-no">&lt;p&gt;We humans tend to perceive the world as a series of yes/no answers. Limited questions nurture limiting beliefs. Our questions yield black and white answers.&lt;/p&gt;

&lt;p&gt;It used to be ok to think in simple terms. If you were alone in the forest 12,000 years ago and heard a cracking sound of wood breaking, you should decide quickly whether to run or not. It could be a leopard. There was no gain in anything other than yes/no. You better run 100% of the time.&lt;/p&gt;

&lt;p&gt;In today’s world, though, thinking through yes/no is far from ideal. Civilization got here by sieving through nuances. In the last 150 years, science and engineering shaped our new reality through the discovery of penicillin, relativity, telecommunications and the internet, mobile phones and AI. Consider the development of weather forecasting, a field that relies heavily on probabilistic models. Meteorologists don’t simply ask, “Will it rain tomorrow?” but rather, “What is the probability of rain given the current atmospheric conditions, wind patterns, and temperature?”&lt;/p&gt;

&lt;p&gt;The world is a space of random possibilities with different degrees of probabilities. There’s a 50-50 chance a coin will fall on either side. There’s a 75% chance that I will have ice cream this week because there’s also a chance that I will get sick or it’ll be cold. There’s a 98% chance we will see a revolutionary new technology announced this year, and there’s a 1% chance we will see civil unrest.&lt;/p&gt;

&lt;p&gt;These probabilities change constantly, and are chained to other probable and improbable events. There’s a 20% chance it will rain, and if it does, there’s a 95% chance I will have to drive to my destination instead of cycling.&lt;/p&gt;

&lt;p&gt;Yes/no questions box us in, they limit us. Let’s consider two questions you can ask yourself to assess a situation at work:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Will this project be delivered in 30 days?&lt;/li&gt;
  &lt;li&gt;From 0 to 100%, what is the probability that this project will be delivered in 30 days?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The second question is a lot richer than the first one. You might feel like you’re 90% confident, which could mean “yes” for a lot of people, but 90% is still not a “yes”, 90% is still uncertain. “90%” &lt;em&gt;begs&lt;/em&gt; the question, “what 10% of it is undermining our confidence?” It also gives us space to attribute different probabilities for different dates, you can feel 20% confident that it’ll be delivered in 20 days, 40% in 25 days, 60% in 30 days, and 95% in 40 days. 100% sure it won’t go over day 50.&lt;/p&gt;

&lt;p&gt;That is how I communicate with my clients/bosses or whoever I do business with. “When will it be delivered?” is replied with three estimates, an optimistic (e.g 25 days), a pessimist (50 days) and a realist (40 days). This shares the risk and transfers the conversation from a mere contract negotiation to collaboration.&lt;/p&gt;

&lt;p&gt;I was once approached by a company that wanted me to move close to their office, and a friend asked me, “Would you move to that city?”, and I pondered, “would I”? This got me thinking on both, “Yes but I feel uncomfortable” and “No, but I’d be shutting down opportunities”.&lt;/p&gt;

&lt;p&gt;And then it hit me that a much better question would have been, “What are the probabilities of moving to that city given the various aspects of the offer?” Every benefit adds a higher probability of moving. Under the offer? 0% chance. Maybe if they paid a premium we could get it to 30%, but would still be bad. Maybe if the role was specific and the offer included better equity or compensation it could move chances to 80%. But maybe including the family variable it could be lower.&lt;/p&gt;

&lt;p&gt;I’m fairly confident you got the point (maybe something around 85%). It’s not that we won’t have yes/no answers, but it’s that questions are what fuel our creativity and we rather start well, with good questions.&lt;/p&gt;</content>

      

      
        <summary type="html">Questions shape our perception. Good ones explore the often overlooked realm of uncertainty, challenging us to think beyond binary choices and embracing the complex nuances shaping our world.</summary>
      

      

      
        <category term="thinking" />
      

      
        <category term="obsidian" />
      
        <category term="essay" />
      
    </entry>
    
  
    
    <entry>
      <title type="html">What does bang methods mean in Ruby?</title>
      <link href="https://alexoliveira.cc/guide/ruby-bang-methods" rel="alternate" type="text/html" title="What does bang methods mean in Ruby?" />
      <published>2023-03-02T10:00:00+00:00</published>
      <updated>2023-03-02T10:00:00+00:00</updated>
      <id>https://alexoliveira.cc/guide/ruby-bang-methods</id>
      <content type="html" xml:base="https://alexoliveira.cc/guide/ruby-bang-methods">&lt;p&gt;The Ruby convention for using bangs (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;!&lt;/code&gt;) is, mostly, “when there are two versions of the same method, and one of them is &lt;em&gt;more&lt;/em&gt; dangerous than the other, use the bang”. Citation is none others than &lt;a href=&quot;https://archive.is/mgDiH&quot;&gt;Eric Hodel and David Black&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;For example, in Rails there are &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;update&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;update!&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;create&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;create!&lt;/code&gt; and so on. In Ruby’s Enumerable there are &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;map&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;map!&lt;/code&gt; and others, but note that’s always two methods with the same name. If we check &lt;a href=&quot;https://ruby-doc.org/3.2.1/Enumerable.html&quot;&gt;https://ruby-doc.org/3.2.1/Enumerable.html&lt;/a&gt;, not a single method has &lt;em&gt;only&lt;/em&gt; a bang method, they all come in doubles.&lt;/p&gt;

&lt;p&gt;The bang in Ruby has nothing to do with whether the method raises exceptions. &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Array#map!&lt;/code&gt; doesn’t raise an exception. On the other hand, ActiveRecord’s &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;create&lt;/code&gt; can raise exceptions, like when you set uniqueness constraints on your database. However, you sure could use it to mean that the method raises an exception, but that will be &lt;em&gt;your meaning&lt;/em&gt;, and it’s fine. Just be careful not to confuse others.&lt;/p&gt;

&lt;p&gt;It also doesn’t doesn’t mean that it mutates self. Most Enumerable methods with bangs mutate themselves, and that’s just a coincidence. ActiveRecord’s &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;create&lt;/code&gt; also mutates itself, and has no bang.&lt;/p&gt;

&lt;p&gt;The bang doesn’t mean “it &lt;em&gt;is&lt;/em&gt; dangerous”, it means “it’s &lt;em&gt;more&lt;/em&gt; dangerous than the counterpart method without bang”, and so unless there’s a second method, I don’t quite get why put the bang. The presence of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;def delete!&lt;/code&gt; means that there’s an equivalent &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;def delete&lt;/code&gt;, but if we can’t find it in code, not even in mixins or parent class, then that causes confusion.&lt;/p&gt;

&lt;p&gt;And maybe it’s fine to have the bang in methods without counterparts, but what does it mean in this case? Just make sure you have a convention with your team, and make sure every new member who joins is notified that the Ruby convention for bangs is not being used. But at that point, it might not be worth the hassle, and it might be simpler to just stick with known conventions.&lt;/p&gt;</content>

      

      
        <summary type="html">It might not mean what you think it means.</summary>
      

      

      
        <category term="ruby" />
      
        <category term="programming" />
      

      
        <category term="obsidian" />
      
        <category term="guide" />
      
    </entry>
    
  
    
    <entry>
      <title type="html">Remove Distractions From Websites</title>
      <link href="https://alexoliveira.cc/guide/remove-distractions-from-websites" rel="alternate" type="text/html" title="Remove Distractions From Websites" />
      <published>2023-02-19T10:00:00+00:00</published>
      <updated>2023-02-19T10:00:00+00:00</updated>
      <id>https://alexoliveira.cc/guide/remove-distractions-from-websites</id>
      <content type="html" xml:base="https://alexoliveira.cc/guide/remove-distractions-from-websites">&lt;p&gt;Some friends use Instagram as primary chat app. Whenever I open it, I’m sucked into a swirl of content. Some times it pulls me for several, several minutes until my mind steps back and realizes what’s going on.&lt;/p&gt;

&lt;p&gt;The solution I found was using Instagram on my Mac and inserting arbitrary CSS into its page to strip out everything that is not chat. The image below is what Instagram looks like to me. Notice how there are no menu, no Explore, no Search:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/obsidian/Screenshot%20blur.png&quot; alt=&quot;Screenshot blur.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;I have a &lt;a href=&quot;https://www.alfredapp.com&quot;&gt;shortcut&lt;/a&gt; that takes me directly to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;https://www.instagram.com/direct/inbox/&lt;/code&gt; whenever I want to check what’s going on. If you think about it, you could even turn on chat notifications if you wanted without fear of falling into traps by advertisers. This should work with other websites like Twitter and Youtube as well.&lt;/p&gt;

&lt;h3 id=&quot;ok-so-how-do-i-do-it&quot;&gt;Ok, so how do I do it?&lt;/h3&gt;

&lt;p&gt;I use Safari and there’s a cheap app called &lt;a href=&quot;https://cascadea.app&quot;&gt;Cascadea&lt;/a&gt; that allows us to insert CSS into webpages. If you’re on Chrome or Firefox, you’ll have way more options by looking at the Chrome extension store.&lt;/p&gt;

&lt;p&gt;This is the first CSS version I used to get it working:&lt;/p&gt;

&lt;div class=&quot;language-css highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nt&quot;&gt;div&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;.xh8yej3.x1iyjqo2&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;div&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;.x1cy8zhl.x9f619.x78zum5.xdt5ytf.x1gvbg2u.x1y1aw1k.xn6708d.xx6bls6.x1ye3gou.xvbhtw8.x1xgvd2v.x1o5hw5a.xaeubzz&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;href&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&apos;/explore/&apos;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;],&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;href&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&apos;/reels/videos/&apos;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; 
	&lt;span class=&quot;nl&quot;&gt;display&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;none&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; 
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Instagram’s HTML has a lot of gibberish CSS classes. I suspect they’re going to keep changing over time to break this type of script. Anyway, I added a rule to check for &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;href&lt;/code&gt; for Reels and Explore and that seems to be enough in case other CSS rules change.&lt;/p&gt;</content>

      

      
        <summary type="html">Apply arbitrary CSS to remove websites sections.</summary>
      

      

      
        <category term="productivity-hack" />
      

      
        <category term="obsidian" />
      
        <category term="guide" />
      
    </entry>
    
  
    
    <entry>
      <title type="html">Visto Japonês como Brasileiro</title>
      <link href="https://alexoliveira.cc/guide/pt-br-visto-japones-como-brasileiro" rel="alternate" type="text/html" title="Visto Japonês como Brasileiro" />
      <published>2023-01-31T10:00:00+00:00</published>
      <updated>2023-01-31T10:00:00+00:00</updated>
      <id>https://alexoliveira.cc/guide/pt-br-visto-japones-como-brasileiro</id>
      <content type="html" xml:base="https://alexoliveira.cc/guide/pt-br-visto-japones-como-brasileiro">&lt;p&gt;Não sei se é só comigo, mas a experiência de tirar o visto japonês é aterrorizante. Já voei mais de 400.000km, não-sei-quantos-países, mas esse visto me tira o sono.&lt;/p&gt;

&lt;p&gt;O fato de você precisar comprar uma passagem aérea não-muito-barata &lt;em&gt;antes&lt;/em&gt; de pedir o visto é brutal. Imagina você comprar uma passagem de R$5.000, talvez o dobro se for com o cônjuge, pra ser rejeitado por motivos bobos como sua foto ter ficado na proporção errada.&lt;/p&gt;

&lt;p&gt;Eu vou focar em alguns detalhes que não achei facilmente em outros sites. Se você quer a lista completa de documentos que precisa, melhor pesquisar noutro lugar.&lt;/p&gt;

&lt;p&gt;Vamos às dicas:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;escreva uma carta ao cônsul:&lt;/strong&gt; já fiz 3 pedidos de visto, e nas 2 que foram aprovados eu havia escrito uma carta ao cônsul (ou embaixador se você estiver noutro lugar). É só um texto impresso dizendo que amo o Japão, a cultura, e quero poder vivenciar o país etc. Tudo muito abstrato, sem nada definido. Isso deve ajudar bastante porque é um elogio forte ao país associado ao seu pedido, não só documentos de identidade. Na primeira vez eu fiz à mão, na segunda pedi pro ChatGPT escrever pra mim.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;leve a certidão de casamento:&lt;/strong&gt; se é casado, não esqueça da certidão de casamento. Vi muitos casos de pedido negado por causa disso.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;considere uma reserva de passagem sem comprá-la:&lt;/strong&gt; o consulado pede que você compre uma passagem antes do pedido, portanto essa dica é por sua conta e risco. É possível reservar uma passagem por $14, a qual é automaticamente cancelada depois (detalhes abaixo). Eu fiz isto no terceiro pedido e funcionou, mas todos os sites da internet dizem que não funciona. É possível que eles tenham ignorado isso por eu já ter ido antes no Japão? Sim, mas não tem como saber porque eles não são abertos sobre o processo.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;tenha reserva de avião de todos os trechos:&lt;/strong&gt; eu queria sair de San Francisco/US, e comprar a passagens do Brasil pra lá só mais perto da viagem. Só depois de reservar minha passagem é que descobri, lendo comentários em blogs, que eles não aceitam que esteja faltando reservas desde o Brasil. Tive de reservar novamente antes de ir no consulado, correria total. Você está na Ásia e pensando em ir pro Japão? Vai ter problema com visto se não tiver todos os vôos já reservados.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;use Booking.com para hotéis:&lt;/strong&gt; assim como passagens aéreas, você precisa das reservas de hotéis. Isso você faz no Booking.com sem esforço e sem pagar. Os quatro hotéis que reservei ficaram lá reservados por meses, e depois cancelei.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;formulários são confusos, mas use-os:&lt;/strong&gt; embora os PDFs que você tenham que baixar para preencher sejam muito, muito antigos, use-os. Claramente as instalações dos consulados são antigas. As mesmas revistas que vi na sala de espera em 2012 estão lá ainda em 2023! E consequentemente, esses PDFs são a linguagem do pessoal que trabalha no consulado, então se você tentar usar outros formatos, é melhor que seja familiar senão você pode acabar simplesmente tendo seu pedido negado.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;não precisa imprimir os PDFs para preencher:&lt;/strong&gt; no seu computador, você pode editar o PDF, escrever texto por cima. É muito melhor digitar no documento e ao final imprimir, você vai ser muito mais rápido assim.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;prefira uma entrada no Japão:&lt;/strong&gt; é possível pedir um visto onde você sai do Japão, visita outra lugar e depois volta, só que ele é 2x mais complicado, afinal você precisa ter todas as passagens. Imagina você comprar sua passagem de Tokyo para Seoul, e de volta para Tokyo, e ter seu visto negado? Eu particularmente não faria esse tipo de visto. Visto de uma entrada é suficiente pra grande maioria das viagens.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;“A regra não é clara”:&lt;/strong&gt; você não vai saber todas as regras porque o consulado não é claro. Você vai ter que ler muito comentário de blog pra entender como os fiscais julgam cada caso.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;mostre que você tem renda:&lt;/strong&gt; inclua documentos PJ, contratos de trabalho, extratos, recibo de IRPF, talvez IRPJ também se você é autônomo. Se você não nada de dinheiro provavelmente vai ter o pedido negado.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;use o ChatGPT para o itinerário:&lt;/strong&gt; porque de outra forma você vai levar horas criando uma lista de lugares para visitar. O consulado pede isso, e pede que você preencha num PDF bem antigo. A beleza da coisa é que você pode apresentar esse itinerário, mas depois ir em lugares completamente diferentes. Pois o ChatGPT cria esta lista em 10 segundos enquanto você vai levar 20 horas manualmente.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;a-reserva-de-passagens-com-pnr&quot;&gt;A Reserva de Passagens com PNR&lt;/h3&gt;

&lt;p&gt;Na minha segunda ida, eu queria evitar comprar uma passagem antes do visto. Então resolvi arriscar e criar uma reserva na &lt;a href=&quot;https://onwardticket.com/?gad=1&amp;amp;gclid=CjwKCAjw9J2iBhBPEiwAErwpeQzdzTbrvbxmt43cY3f0KEri1s1lWVUFonTwYGESyC3NENSJAWBAphoC_xoQAvD_BwE&quot;&gt;Onward Ticket&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;A Onward Ticket reserva pra você uma passagem para você por 48 horas, com preço de $14. Ela tem um código PNR que é verificável em sites de companhias aéreas, então o pessoal do consulado pode verificar sua reserva. A alternativa seria comprar uma passagem por mais de R$6.000 por pessoa, e jogar roleta da sorte. Nesse caso era pior ainda porque queríamos ir de business class (encontramos umas promoções com valor próximo a econômica).&lt;/p&gt;

&lt;p&gt;Na primeira que vez que tirei meu visto, pediram 2 dias para revisar o visto, mas desta vez, para meu choque, pediram 7 dias! Isso significa que é necessário ir no consulado imediatamente depois de pegar as reservas, ou seja, compra a passagem de manhã cedo antes de ir no consulado pra ter uma intersecção maior dos dois prazos. Isso me causou uma ansiedade absurda porque eu moro a 3 horas da cidade do consulado, e certamente a reserva expiraria e eu seria negado.&lt;/p&gt;

&lt;p&gt;Felizmente, quando peguei meu visto, que foi aceito, a data de aprovação era exatamente 2 dias após minha entrada. Em outras palavras, eles revisaram minha passagem em seguida, pouco antes dela expirar. Por pouco não sou negado.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;É realmente importante que a reserva seja real?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Sim, segundo muitos comentários em blogs de pessoas que foram negados por causa disso, mas no meu caso uma reserva PNR foi suficiente. Por isso esta dica é por sua conta e risco. Se você não se sente confortável, melhor comprar uma passagem.&lt;/p&gt;</content>

      

      
        <summary type="html">Dicas para tirar o visto.</summary>
      

      

      
        <category term="personal" />
      

      
        <category term="obsidian" />
      
        <category term="guide" />
      
    </entry>
    
  
    
    <entry>
      <title type="html">Meditation</title>
      <link href="https://alexoliveira.cc/essay/meditation" rel="alternate" type="text/html" title="Meditation" />
      <published>2022-12-17T08:00:00+00:00</published>
      <updated>2022-12-17T08:00:00+00:00</updated>
      <id>https://alexoliveira.cc/essay/meditation</id>
      <content type="html" xml:base="https://alexoliveira.cc/essay/meditation">&lt;p&gt;When I meditate, my mind calms down. I start in the midst of chaos, but I finish in total control, ready to conquer.&lt;/p&gt;

&lt;p&gt;As I close my eyes and start the session, my brain continues its automatic course, pulling new ideas and threads, ignoring my intention. It brings me memories from work, new propositions, deadlines, things I forgot to put into my to-do list. It gets slightly anxious.&lt;/p&gt;

&lt;p&gt;I realize these automated thoughts after a few seconds of delay, and then intentionally put my focus on my breath. I stay there for a few seconds. I notice the physical aspects of my chest moving back and forward. I stay grounded. Temporarily.&lt;/p&gt;

&lt;p&gt;A sudden sound far away impels my mind again. Random questions pop into my head, but I gently remind it that we aren’t here right now to think, to ponder, to imagine, to get anxious about the future, to remember the past, but solely to enjoy the present. My mind surrenders. I am in control again. I am in the present, I am the present.&lt;/p&gt;

&lt;p&gt;But then, suddenly, the mind starts to wander, and periods of focus are followed by periods of thinking and worrying. This repeats multiple times throughout. In reality, the mind is a wild horse, quickly responding to fight-or-flight impulses, uncontrollable, but we need to be patient, gently pulling the rope tossed around its neck whenever it acts abrupt or independent. We have to domesticate it. When arbitrary thoughts pop into my mind, I bring back my focus into breathing.&lt;/p&gt;

&lt;p&gt;The session ends. I open my eyes and there is &lt;em&gt;only&lt;/em&gt; what’s immediatelly in front of me. There are no forced thoughts, no anxiety, no imagination. Just peace. Like the end of a massage session, or a floating capsule. A blank slate, a white board, I am free to think whatever I want or need to.&lt;/p&gt;

&lt;p&gt;The day ahead of me awaits with many traps and challenges, but I am ready to conquer.&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;dinkus&quot;&gt;***&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;Years ago, I used to need several, several minutes of meditation until the internal battle with my mind would settle. It would parry my efforts, only to lunge back into controlling me - back and forth, many times. But over time it would retreat back and surrender. Today, I might need only 5 minutes to end the dispute, some times more, some times less.&lt;/p&gt;

&lt;p&gt;When I forgo meditation for months, I notice the deterioration in the quality of life, in my peace of mind, in my control over whatever wants to control me. I become less stoic. I forget meditation even exists. The everyday events affect me before I can have a say. My mind seeks short-term rewards to get through the anxieties of the day. It procrastinates. It binges on sugar, on breaks, on the news. I am responsible, but those are not my decisions.&lt;/p&gt;

&lt;p&gt;When I meditate again, I have a helicopter view of life. My choices are in front of me, and I choose to be affected or not by thoughts. It’s not as if I won’t feel bad feelings the days I meditate, they will definitely come. The difference is that when I do meditate, those intrusive feelings are put on a desk in my mind, like papers waiting for my review. I look at them and I have a choice to say &lt;em&gt;yes&lt;/em&gt;, or to say &lt;em&gt;no&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;I found there are other ways of achieving some of the effects of meditation. Driving, being in nature, looking at the horizon, sitting by the shade with wind blowing in my face - or turning on &lt;em&gt;Do Not Disturb&lt;/em&gt;. There are certain songs that transport me to other universes. But none of them have this effect of transporting me to the present as effectively and immediately as meditation.&lt;/p&gt;</content>

      

      
        <summary type="html">How I meditate, what I feel, how better my life is with it.</summary>
      

      

      

      
        <category term="obsidian" />
      
        <category term="essay" />
      
    </entry>
    
  
    
    <entry>
      <title type="html">Generate CSV from Rails console (Heroku)</title>
      <link href="https://alexoliveira.cc/guide/generate-csv-from-rails-console-heroku" rel="alternate" type="text/html" title="Generate CSV from Rails console (Heroku)" />
      <published>2022-11-19T10:00:00+00:00</published>
      <updated>2022-11-19T10:00:00+00:00</updated>
      <id>https://alexoliveira.cc/guide/generate-csv-from-rails-console-heroku</id>
      <content type="html" xml:base="https://alexoliveira.cc/guide/generate-csv-from-rails-console-heroku">&lt;p&gt;Config the following file and save it with some name &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;file.rb&lt;/code&gt;:&lt;/p&gt;

&lt;div class=&quot;language-ruby highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;report&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;CSV&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;generate&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;csv&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;csv&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;name&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;email&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;

  &lt;span class=&quot;n&quot;&gt;users&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;User&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;where&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
    &lt;span class=&quot;ss&quot;&gt;:created_at&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Date&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;parse&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;01-11-2020&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;..&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;Date&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;parse&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;30-11-2020&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

  &lt;span class=&quot;n&quot;&gt;users&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;each&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;user&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;csv&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;user&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;user&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;email&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;method-one-pipe-into-a-file&quot;&gt;Method One: Pipe Into a File&lt;/h3&gt;

&lt;p&gt;Add the following at the end of the code:&lt;/p&gt;

&lt;div class=&quot;language-ruby highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;no&quot;&gt;STDOUT&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;report&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Then run the following in the terminal:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nb&quot;&gt;cat &lt;/span&gt;file.rb &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
  | heroku run &lt;span class=&quot;nt&quot;&gt;--no-tty&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;--app&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;heroku-app-name &lt;span class=&quot;nt&quot;&gt;--&lt;/span&gt; bin/rails runner - &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
  | &lt;span class=&quot;nb&quot;&gt;grep&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-v&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\*\*&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\[&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;NewRelic&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\]&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-v&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;DISABLE_DATADOG_AGENT&quot;&lt;/span&gt; &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
  &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; results.csv
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;where:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cat file.rb&lt;/code&gt;: reads the code for piping into Heroku or some other Rails console process&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;heroku run ...&lt;/code&gt;: the console itself. It could be another console (e.g AWS, GCP or local). &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;--no-tty&lt;/code&gt; is used for preventing characters used for user interaction. Replace &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;--app&lt;/code&gt; with the name of the app.&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;grep ... NewRelic&lt;/code&gt;: this removes those annoying booting lines from 3rd-party libs in Rails.&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;gt; results.csv&lt;/code&gt;: write the results from the Rails console into a CSV file.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;method-two-with-slack&quot;&gt;Method Two: With Slack&lt;/h3&gt;

&lt;p&gt;If you have an array like in the original, you can&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Slack::Web::Client.new.
  files_upload(
    channels: &apos;#some-channel&apos;,
    content: report,
    filename: &quot;file.csv&quot;
  )
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;</content>

      

      
        <summary type="html">Extract data out of Rails console into a CSV.</summary>
      

      

      
        <category term="software" />
      

      
        <category term="obsidian" />
      
        <category term="guide" />
      
    </entry>
    
  
    
    <entry>
      <title type="html">Roadmap for One-on-One’s</title>
      <link href="https://alexoliveira.cc/guide/roadmap-for-one-on-ones" rel="alternate" type="text/html" title="Roadmap for One-on-One&apos;s" />
      <published>2022-10-31T10:00:00+00:00</published>
      <updated>2022-10-31T10:00:00+00:00</updated>
      <id>https://alexoliveira.cc/guide/roadmap-for-one-on-ones</id>
      <content type="html" xml:base="https://alexoliveira.cc/guide/roadmap-for-one-on-ones">&lt;p&gt;These are foundational topics for one-on-one’s. They are the first ones I bring for discussion every week to set out the background for the relationship that will follow. They are not the definitive list of topics for one-on-one’s, but the most important ones for starting out.&lt;/p&gt;

&lt;p&gt;Some subjects are about meeting in the middle and learning about each other. On the other hand, some are about being upfront and making some soft-promises to reassure them that you are worth their time. That is a double-edged sword because on one side, it can be dangerous if I fail, but on the other, it gives me focus on deliver on the promised. And promising and overdelivering is a powerful weapon.&lt;/p&gt;

&lt;p&gt;Each topic is meant for a different one-on-one because they can be dense. It’s ideal to keep each opportunity to one concept at max. However, some are &lt;em&gt;quickies&lt;/em&gt; and can be slotted alongside others.&lt;/p&gt;

&lt;p&gt;All in all, our relationship is an enabler and core to our success. Relationship is, therefore, a recurring theme throughout.&lt;/p&gt;

&lt;h2 id=&quot;the-list&quot;&gt;The List&lt;/h2&gt;

&lt;p&gt;The following markdown-formatted list can be copy and pasted in most todo apps.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;- [ ] Meta 1-1: So why do we do one-ones? As a developer, I didn&apos;t understand 1-1&apos;s, but as a manager I finally do, so I&apos;d like to discuss how to make them productive. Whom do 1-1&apos;s belong to? To reports. Who sets the agenda? Reports. I&apos;m a facilitator. If you&apos;re struggling to articulate concerns, I&apos;ll help you. If you don&apos;t know what to set as agenda, I&apos;ll help you.
- [ ] Meta 1-1: my responsibilities on direction, coaching and career development.
- [ ] I don&apos;t judge feelings, frustrations and impulses. We&apos;re humans and we all have it. My opinions are held in suspension. What really matters is what we decide to do about them.
- [ ] Meta 1-1: on feedback (e.g observation)
- [ ] Quickie: questions are not requests.
- [ ] Proactive Alignment.
- [ ] Meta 1-1: walking one-on-one&apos;s and audio-only calls.
- [ ] Quickie: on alignment; on not saying &quot;I understood&quot; until the message was actually understood.
- [ ] Meta 1-1: as a manager, I&apos;ll share my worries with the future of ongoing projects, the team, the organization. Mostly as preview of my current thought process that might translate to decisions/directives in the future, so when those decisions come in the future, there&apos;s no surprise.
- [ ] As a manager, I should be an enabler, not a bottleneck. In an ideal world, you don&apos;t have to wait for me to get things done. I want to invite you to anticipate future blockers by discussing ideas, expectations and work philosophy ahead of time, so you can comfortably make decisions that are aligned with the team when the time comes with confidence.
- [ ] Kaizen: constant improvement through continuous feedback. PDCA (Plan-Do-Control-Act).
- [ ] Past decisions are revised whenever we have new information.
- [ ] Quickies: I don&apos;t want to hear only good news.
- [ ] Quality is inseparable from work.
- [ ] Tests are critical and help engineering stay above water in the long run.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Some of which aren’t critical, and need to be timed correctly. If you have already been talking for weeks, or it’s someone you already have known previously, these are too introductory and should most likely be skipped.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;- [ ] Meta 1-1: on how I filter out information before sharing. I will be as open as possible, sharing as much information as I can, except what won&apos;t make you more effective (e.g unclear/ambiguous/not-actionable information).
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;versions&quot;&gt;Versions&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;2022-10-31: initial list&lt;/li&gt;
&lt;/ul&gt;</content>

      

      
        <summary type="html">A template for new one-on-ones.</summary>
      

      

      
        <category term="one-on-one" />
      
        <category term="management" />
      

      
        <category term="obsidian" />
      
        <category term="guide" />
      
    </entry>
    
  
    
    <entry>
      <title type="html">Blogging Manifesto</title>
      <link href="https://alexoliveira.cc/essay/blogging-manifesto" rel="alternate" type="text/html" title="Blogging Manifesto" />
      <published>2022-10-15T10:00:01+00:00</published>
      <updated>2022-10-15T10:00:01+00:00</updated>
      <id>https://alexoliveira.cc/essay/blogging-manifesto</id>
      <content type="html" xml:base="https://alexoliveira.cc/essay/blogging-manifesto">&lt;p&gt;I’ve always been dissatisfied with blogging. The technologies bother the &lt;em&gt;engineer-slash-idealist&lt;/em&gt; in me. I attribute the tedious publishing process as reason for not posting more often - although laziness is not out of question. In 2021, however, &lt;a href=&quot;https://obsidian.md&quot;&gt;Obsidian.md&lt;/a&gt; came into my life and changed my perspective on personal notes, subsequently blogs.&lt;/p&gt;

&lt;h3 id=&quot;the-ideal-blog&quot;&gt;The Ideal Blog&lt;/h3&gt;

&lt;p&gt;To set the scenario, here are my idealistic goals for a blog.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;it is just files:&lt;/strong&gt; it has to be simple. I don’t want to manage databases, adapters, migrations, seed files. Just good ol’ files.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;I have full control:&lt;/strong&gt; I want to control the design, the file structure, the domain, everything. With a just-files policy, I can move my site anywhere at any time. I learned a hard lesson with Evernote in the old days: migrating notes isn’t fun.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;I write offline:&lt;/strong&gt; writing should depend on internet. I want to go camping, be flying over the ocean, be in another country backpacking, and I want my ideas to come to life unencumbered.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;writing is pleasing:&lt;/strong&gt; what’s the point of writing offline but using Notepad? Some solutions feel good, but either require specific backends or internet. &lt;a href=&quot;https://ia.net/writer&quot;&gt;iA Writer&lt;/a&gt; feels amazing, but publishes to Wordpress, and I want none of that. &lt;a href=&quot;https://substack.com&quot;&gt;Substack&lt;/a&gt; is ok but requires you to have the browser open and connected.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;easy to publish:&lt;/strong&gt; I should write somewhere offline, on a computer or on my phone, click a button and it goes online later.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;quick iteration:&lt;/strong&gt; I want to publish a not-totally-finished essay and improve over time. If publishing is one click, excellent. Copying/pasting is definitely no-go (looking at you, iA Writer).&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;it is (mostly) free:&lt;/strong&gt; the idea of paying too much for hosting a few static files is obnoxious.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;it is my 2nd-brain:&lt;/strong&gt; I can take my tiny little notes, guides, and share with the world, not only essays.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I’ve gone through various technological iterations through the years, hitting a checkbox in one ideal but compromising another. Generally, solutions either (a) require too much technical knowledge to setup and maintain, like Jekyll requiring us to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;git checkout&lt;/code&gt; a directory in a terminal just to write posts, or (b) preclude content ownership, like in Wordpress - how are moving away from it if we change our minds in the future?&lt;/p&gt;

&lt;p&gt;I’ve experimented through that pendulum more than I’d like to admit. From admin panels with Rails (full control, requires software engineering knowledge), Wordpress/Ghost/Substack (quick publishing, good for laypeople but makes changes difficult), to static pages on Netlify with Ember.js (for offline support), and lately &lt;a href=&quot;https://jekyllrb.com&quot;&gt;Jekyll&lt;/a&gt; (plain files). But the whole list of ideals was never satisfied. Jekyll is supported by Github for free, but having to open a terminal to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;git-commit&lt;/code&gt; my markdown files is far from being a pleasure.&lt;/p&gt;

&lt;p&gt;It sounds like splitting hair because, after all, it’s just… blogging, and the whole world has done it. However, concurrent to this &lt;em&gt;analysis-paralysis&lt;/em&gt; in one area, on another I was actually thriving: I was writing a lot in Obsidian on my personal computer, it just happens to stay private. The more fundamental Obsidian became in my process, the more I realized that maybe, &lt;em&gt;just maybe&lt;/em&gt;, if I could somehow combine blogging and Obsidian, publishing my notes into &lt;a href=&quot;https://jekyllrb.com&quot;&gt;Jekyll&lt;/a&gt; hosted on &lt;a href=&quot;https://github.com/kurko/blog&quot;&gt;Github&lt;/a&gt;, then maybe I might had solved all - or most of - those problems that bothered in the past.&lt;/p&gt;

&lt;h3 id=&quot;wait-but-why-obsidian-for-note-taking&quot;&gt;Wait, but why Obsidian for note taking?&lt;/h3&gt;

&lt;p&gt;The concept of &lt;em&gt;wikilinks&lt;/em&gt; &lt;a href=&quot;https://wiki.c2.com/?WikiHistory&quot;&gt;are as old as 1995&lt;/a&gt;, but creating them had always been cumbersome. I think &lt;a href=&quot;https://medium.com/age-of-awareness/the-history-of-roam-research-and-the-roamcult-4c1e1897633d&quot;&gt;Roam Research was the first to introduce a simple User Experience&lt;/a&gt; for autocompleting &lt;em&gt;wikilinks&lt;/em&gt; - in 2017. They enable you to create links between large and small notes in a very simple manner. Every time you type &lt;span class=&quot;code&quot;&gt;[[some note name]]&lt;/span&gt;, it suggests other notes automatically, or creates new ones on demand. You end up with tons of notes connected.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/obsidian/obsidian-screenshot-for-blogging-manifesto.png&quot; alt=&quot;obsidian-screenshot-for-blogging-manifesto.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Obsidian improved on Roam by making it pure markdown files on your computer. It means you can synchronize them across devices with whatever you want, from iCloud and Dropbox to &lt;a href=&quot;https://en.wikipedia.org/wiki/Rsync&quot;&gt;rsync&lt;/a&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;git&lt;/code&gt;. You can also create your own code and iterate through your text. It’s open for extension, so you can use &lt;a href=&quot;https://obsidian.md/plugins&quot;&gt;one of its hundreds of plugins&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you like to take notes about books, for example, the generated visualizations are awe inspiring. To get a sense of how fun it is to have these notes connected, check the following two images. The first one shows a graph with all my notes and their connections (which doesn’t mean anything to you, but check the next one):&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/obsidian/obsidian-graph-zoomed-out.png&quot; alt=&quot;Graph of all notes in my Obsidian and their connections&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The usefulness of it is quickly zooming in and learning how multiple concepts connect together, remembering things I’ve written but had forgotten. It’s super fun and opens up a whole new mental level.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/obsidian/obsidian-graph-screenshot-black-swan.png&quot; alt=&quot;Highlighting notes for a book, helping spaced-repetition in a fun way&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Obsidian deserves a post of its own.&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;When I started writing into Obsidian all my tiny little ideas in tiny little paragraphs, I had a sense that &lt;em&gt;that&lt;/em&gt; should be my personal site (this text started as a note for organizing my own thoughts, and here it is now, public). However, my personal website was none of that. It’s hard to post anything so I will definitely avoid posting a couple paragraphs. The character-to-energy ratio is too low.&lt;/p&gt;

&lt;p&gt;But I think I found a sensible way of keeping the simplicity of Jekyll with the offline support I’ve been looking for, by leveraging Obsidian’s plugin support. I now can click a button and post this note to Github in 3 seconds. Here’s how the ideal list stands:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;✅ it is just files:&lt;/strong&gt; it’s markdown, Obsidian and Jekyll. It’s a directory in my computer.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;✅ I have full control:&lt;/strong&gt; the &lt;a href=&quot;https://github.com/kurko/blog#readme&quot;&gt;site is on Github Pages&lt;/a&gt; and I control the design. It’s not Wordpress. Any sign of problem and I move somewhere, even a &lt;a href=&quot;https://www.raspberrypi.com&quot;&gt;Raspberry Pi&lt;/a&gt; would do.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;✅ I write offline:&lt;/strong&gt; yes, and works on my mobile phone.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;✅ writing is pleasing:&lt;/strong&gt; I created a theme in Obsidian that mimics iA Writer’s. It’s a joy to write (although I miss Writer’s adjective checks).&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;✅ easy to publish:&lt;/strong&gt; with the &lt;a href=&quot;https://github.com/ObsidianPublisher/obsidian-github-publisher&quot;&gt;obsidian-github-publisher&lt;/a&gt;, it is.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;✅ quick iteration:&lt;/strong&gt; it’s a matter of pressing &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Cmd+Shift+D&lt;/code&gt; for deploying.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;✅ it is (mostly) free:&lt;/strong&gt; Github Pages is free.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;🧪 it is my 2nd-brain:&lt;/strong&gt; this is still in a discovery phase, but given I can publish any of my personal notes, I’ll say yes for this. I will have to improve my website layout for it to truly encompass all my notes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The experimentation never ends, and I’ll definitely be improving the process as I go.&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;If you’re interested in setting up this combination with Jekyll and Obsidian, I’ve written a &lt;a href=&quot;/guide/jekyll-with-obsidian&quot;&gt;super technical guide on how to setup Obsidian for publishing on Github and Jekyll&lt;/a&gt;.&lt;/p&gt;</content>

      

      
        <summary type="html">I&apos;ve always been dissatisfied with blogging. Now I have an objective measure of what makes it pleasing.</summary>
      

      

      
        <category term="obsidian" />
      
        <category term="writing" />
      

      
        <category term="obsidian" />
      
        <category term="essay" />
      
    </entry>
    
  
    
    <entry>
      <title type="html">Jekyll Blogging with Obsidian</title>
      <link href="https://alexoliveira.cc/guide/jekyll-with-obsidian" rel="alternate" type="text/html" title="Jekyll Blogging with Obsidian" />
      <published>2022-10-15T10:00:00+00:00</published>
      <updated>2022-10-15T10:00:00+00:00</updated>
      <id>https://alexoliveira.cc/guide/jekyll-with-obsidian</id>
      <content type="html" xml:base="https://alexoliveira.cc/guide/jekyll-with-obsidian">&lt;p&gt;I wrote about what would be &lt;a href=&quot;/essay/blogging-manifesto&quot;&gt;ideal blogging process&lt;/a&gt;. I’ve always been dissatisfied with blogging due to how hard it is to post. When it is easy to post, then you generally lack freedom in some other fundamental area. I recommend reading that for context.&lt;/p&gt;

&lt;p&gt;This post is about using &lt;a href=&quot;https://obsidian.md&quot;&gt;Obsidian&lt;/a&gt; to send file to Github. It should work with any blogging framework, but given I use &lt;a href=&quot;https://jekyllrb.com&quot;&gt;Jekyll&lt;/a&gt;, that’s what I’ll use here.&lt;/p&gt;

&lt;h3 id=&quot;ok-so-how-can-i-configure-jekyll-and-obsidian-together&quot;&gt;Ok, so how can I configure Jekyll and Obsidian together?&lt;/h3&gt;

&lt;p&gt;These are the instructions I’d need if I had to setup everything from scratch.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 0:&lt;/strong&gt; have Jekyll in a repository. It’s outside the scope of this text teaching how to use it. It’s fairly simple if you know how to use it, but getting started can be tricky for non-developers. You can find tons of tutorials online, it’s a very basic blogging framework.&lt;/p&gt;

&lt;p&gt;If you don’t use Jekyll, you can still publish to a directory in Github.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1:&lt;/strong&gt; write your notes in Obsidian.&lt;/p&gt;

&lt;p&gt;The frontmatter of each file should look like the following. Frontmatter is really just a header for the file, and the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;---&lt;/code&gt; indicate where it begins and ends.&lt;/p&gt;

&lt;div class=&quot;language-yaml highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nn&quot;&gt;---&lt;/span&gt;
&lt;span class=&quot;na&quot;&gt;share&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;true&lt;/span&gt;
&lt;span class=&quot;na&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Jekyll&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Blogging&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;with&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Obsidian&quot;&lt;/span&gt;
&lt;span class=&quot;na&quot;&gt;date&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;2022-10-15 06:00:00 -0400&lt;/span&gt;
&lt;span class=&quot;na&quot;&gt;filename&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;guide/_posts/2022-10-15-jekyll-with-obsidian&quot;&lt;/span&gt;
&lt;span class=&quot;na&quot;&gt;tags&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;pi&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;obsidian&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;nn&quot;&gt;---&lt;/span&gt;

&lt;span class=&quot;s&quot;&gt;The actual article goes here.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;where,&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;share&lt;/code&gt;: when &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;true&lt;/code&gt;, it will push to Github (it is configured below in the plugin’s Settings screen)&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;filename&lt;/code&gt;: this is the place where your file will be saved in Github.&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;title&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;date&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;tags&lt;/code&gt;: these are standard Jekyll configurations and not critical here.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When you create a &lt;em&gt;wikilink&lt;/em&gt; in Obsidian (an internal link), the publishing plugin will figure out the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;filename&lt;/code&gt; frontmatter value and replace links with those paths, translating to what Jekyll expects.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2:&lt;/strong&gt; install the &lt;a href=&quot;https://github.com/ObsidianPublisher/obsidian-github-publisher&quot;&gt;obsidian-github-publisher&lt;/a&gt; plugin. This is a community plugin, so you’ll have to enable non-core plugins.&lt;/p&gt;

&lt;p&gt;What it does is it sends files to a Github repository. For that to work, you need to configure a user, Github token, and the final file structure. These are described in the next step.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3:&lt;/strong&gt; time to configure the plugin. Go the plugin Settings (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Cmd+comma&lt;/code&gt; on MacOS, then Community Plugins, then Github Publisher), you will find a list of properties to set.&lt;/p&gt;

&lt;p&gt;The following are details about those properties.&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;&lt;strong&gt;Property&lt;/strong&gt;&lt;/th&gt;
      &lt;th&gt;&lt;strong&gt;Comment&lt;/strong&gt;&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;Repository&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;The plugin’s &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;README&lt;/code&gt; has instructions on that. You’ll need a Github username, repo and token.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;Folder Behavior&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;I set as &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Fixed&lt;/code&gt;. &lt;a href=&quot;https://github.com/ObsidianPublisher/obsidian-github-publisher#folder-reception-settings&quot;&gt;More details here&lt;/a&gt;.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;Default Folder&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;I’m using &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;obsidian&lt;/code&gt;. This puts all files published into the &lt;a href=&quot;https://github.com/kurko/blog/tree/642bf6816c50b7b666726163a9a8b3aeba73d2e0/obsidian&quot;&gt;obsidian/ directory&lt;/a&gt; in Github.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;Title Frontmatter&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;I’ve set mine to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;filename&lt;/code&gt;. This determines where the file will be sent to. For example, this post’s &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;filename: guide/_posts/2022-10-15-jekyll-with-obsidian&lt;/code&gt; at the top, so the plugin will use it to figure out that it should move it to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;obsidian/guide/_posts/2022-10-15-jekyll-with-obsidian.md&lt;/code&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;Links&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;I turn on both &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Internal Links&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Wikilinks&lt;/code&gt;. I want them to be processed.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;Embed&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Transfer Attachment&lt;/code&gt; should be on. For images, I set the Default Attachment Folder, I set &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;images/obsidian&lt;/code&gt; (my Jekyll config expects &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;images/&lt;/code&gt;).&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;Auto Clean&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;I think it makes sense to turn on &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Auto Clean&lt;/code&gt;.&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;&lt;strong&gt;Step 3b:&lt;/strong&gt; the &lt;em&gt;Text Replacer&lt;/em&gt; field is a bit more complicated. In short, it allows you to set some &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;regex&lt;/code&gt; rules to rewrite some of the text during publishing.&lt;/p&gt;

&lt;p&gt;Why would we want to rewrite the text? First, links need to match what Jekyll expects, so I set it to transform a &lt;em&gt;wikilink&lt;/em&gt; like this&lt;/p&gt;

&lt;pre&gt;
&amp;#91;&amp;#91;my-page&amp;#124;My Pages&amp;#93;&amp;#93;
&lt;/pre&gt;

&lt;p&gt;to become the following in markdown,&lt;/p&gt;

&lt;pre&gt;
[My Page]&amp;#40;my-page&amp;#41;
&lt;/pre&gt;

&lt;p&gt;However, Jekyll expects&lt;/p&gt;

&lt;pre&gt;
[My Page]&amp;#40;&amp;#123;% link my-page.md %&amp;#125;&amp;#41;
&lt;/pre&gt;

&lt;p&gt;Second, it appends &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;obsidian&lt;/code&gt; to links, which the plugin wasn’t doing automatically (bug?).&lt;/p&gt;

&lt;p&gt;In the &lt;em&gt;Text Replacer&lt;/em&gt; section, each line has two fields. Let’s call the first &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;entry&lt;/code&gt; and the second &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;replacer&lt;/code&gt;. Here’s my configuration entries:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rule 1, transform links ./&lt;/strong&gt;: set entry to &lt;span class=&quot;code&quot;&gt;(?&amp;#x3C;!\`|\!)\[(.*?)\]\((?!(http|\/*image|obsidian\/image))(\.\/)*(.+?)(\.md)*\)&lt;/span&gt; and &lt;em&gt;replacer&lt;/em&gt; to &lt;span class=&quot;code&quot;&gt;[$1]({% link obsidian/$4.md %})&lt;/span&gt;.&lt;/p&gt;

&lt;p&gt;Why: this makes so wikilinks include the link function that Jekyll expects. If you are a little more technical and wants more details, &lt;a href=&quot;https://github.com/ObsidianPublisher/obsidian-github-publisher/pull/36/files#diff-c49cb89b66bc4961c47c867b709bcb7956c00bff469ff5ad622be0a0e73c5dd2R94-R123&quot;&gt;here’s a commit I did with a nice &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ascii&lt;/code&gt; explanation&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rule 2, adjusts image paths&lt;/strong&gt;: set entry to &lt;span class=&quot;code&quot;&gt;(?&amp;#60;!\\`)\\[(.*?)\\]\\(((obsidian\\/)?image)(.+)\\)&lt;/span&gt; and &lt;em&gt;replacer&lt;/em&gt; to &lt;span class=&quot;code&quot;&gt;[$1](/image$4)&lt;/span&gt;.&lt;/p&gt;

&lt;p&gt;Why: image paths in Jekyll start at &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/images&lt;/code&gt;, but the plugin is converting it to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/obsidian/images&lt;/code&gt;. This rule set removes &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/obsidian&lt;/code&gt; in those cases.&lt;/p&gt;

&lt;p&gt;Finally, if you need to debug the conversion, search for the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;findAndReplaceText()&lt;/code&gt; function in Chrome’s dev console and add breakpoints to it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 4:&lt;/strong&gt; set a nice keyboard shortcut for publishing. I configured &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Cmd+Shift+Option+D&lt;/code&gt; for publishing only the open file, and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Cmd+Shift+D&lt;/code&gt; for everything.&lt;/p&gt;

&lt;h3 id=&quot;is-there-datajson-file-i-can-copy&quot;&gt;Is there &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;data.json&lt;/code&gt; file I can copy?&lt;/h3&gt;

&lt;p&gt;Sure. Below is a copy of mine. If you want, paste into the plugin’s data file which lives in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.obsidian/obsidian-mkdocs-publisher/data.json&lt;/code&gt; (in your Obsidian Vault directory). You have to replace the github keys and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;GhToken&lt;/code&gt; (as of version &lt;a href=&quot;https://github.com/ObsidianPublisher/obsidian-github-publisher/commit/c8d75bd16d29a37b07b4761b5f624be90a92f596&quot;&gt;4.4.0&lt;/a&gt;).&lt;/p&gt;

&lt;pre&gt;
{
  &quot;githubRepo&quot;: &quot;blog&quot;,
  &quot;githubName&quot;: &quot;kurko&quot;,
  &quot;GhToken&quot;: &quot;ghp_[REDACTED]&quot;,
  &quot;githubBranch&quot;: &quot;main&quot;,
  &quot;shareKey&quot;: &quot;share&quot;,
  &quot;ExcludedFolder&quot;: &quot;&quot;,
  &quot;fileMenu&quot;: true,
  &quot;editorMenu&quot;: true,
  &quot;downloadedFolder&quot;: &quot;fixed&quot;,
  &quot;folderDefaultName&quot;: &quot;obsidian&quot;,
  &quot;yamlFolderKey&quot;: &quot;&quot;,
  &quot;rootFolder&quot;: &quot;&quot;,
  &quot;workflowName&quot;: &quot;&quot;,
  &quot;embedImage&quot;: true,
  &quot;defaultImageFolder&quot;: &quot;images/obsidian&quot;,
  &quot;autoCleanUp&quot;: true,
  &quot;autoCleanUpExcluded&quot;: &quot;&quot;,
  &quot;folderNote&quot;: false,
  &quot;convertWikiLinks&quot;: true,
  &quot;convertForGithub&quot;: true,
  &quot;subFolder&quot;: &quot;&quot;,
  &quot;embedNotes&quot;: false,
  &quot;copyLink&quot;: false,
  &quot;mainLink&quot;: &quot;&quot;,
  &quot;linkRemover&quot;: &quot;&quot;,
  &quot;hardBreak&quot;: false,
  &quot;logNotice&quot;: false,
  &quot;convertDataview&quot;: true,
  &quot;useFrontmatterTitle&quot;: true,
  &quot;censorText&quot;: [
    {
      &quot;entry&quot;: &quot;&amp;#40;&amp;#63;&amp;#60;&amp;#33;&amp;#92;&amp;#92;&amp;#96;&amp;#41;&amp;#92;&amp;#92;&amp;#91;&amp;#40;&amp;#46;&amp;#42;&amp;#63;&amp;#41;&amp;#92;&amp;#92;&amp;#93;&amp;#92;&amp;#92;&amp;#40;&amp;#40;&amp;#63;&amp;#33;&amp;#40;&amp;#104;&amp;#116;&amp;#116;&amp;#112;&amp;#124;&amp;#92;&amp;#92;&amp;#47;&amp;#42;&amp;#105;&amp;#109;&amp;#97;&amp;#103;&amp;#101;&amp;#124;&amp;#111;&amp;#98;&amp;#115;&amp;#105;&amp;#100;&amp;#105;&amp;#97;&amp;#110;&amp;#92;&amp;#92;&amp;#47;&amp;#105;&amp;#109;&amp;#97;&amp;#103;&amp;#101;&amp;#41;&amp;#41;&amp;#40;&amp;#92;&amp;#92;&amp;#46;&amp;#92;&amp;#92;&amp;#47;&amp;#41;&amp;#42;&amp;#40;&amp;#46;&amp;#43;&amp;#63;&amp;#41;&amp;#40;&amp;#92;&amp;#92;&amp;#46;&amp;#109;&amp;#100;&amp;#41;&amp;#42;&amp;#92;&amp;#92;&amp;#41;&quot;,
      &quot;replace&quot;: &quot;&amp;#91;&amp;#36;&amp;#49;&amp;#93;&amp;#40;&amp;#123;&amp;#37;&amp;#32;&amp;#108;&amp;#105;&amp;#110;&amp;#107;&amp;#32;&amp;#111;&amp;#98;&amp;#115;&amp;#105;&amp;#100;&amp;#105;&amp;#97;&amp;#110;&amp;#47;&amp;#36;&amp;#52;&amp;#46;&amp;#109;&amp;#100;&amp;#32;&amp;#37;&amp;#125;&amp;#41;&quot;
    },
    {
      &quot;entry&quot;: &quot;&amp;#40;&amp;#63;&amp;#60;&amp;#33;&amp;#92;&amp;#92;&amp;#96;&amp;#41;&amp;#92;&amp;#92;&amp;#91;&amp;#40;&amp;#46;&amp;#42;&amp;#63;&amp;#41;&amp;#92;&amp;#92;&amp;#93;&amp;#92;&amp;#92;&amp;#40;&amp;#40;&amp;#40;&amp;#111;&amp;#98;&amp;#115;&amp;#105;&amp;#100;&amp;#105;&amp;#97;&amp;#110;&amp;#92;&amp;#92;&amp;#47;&amp;#41;&amp;#63;&amp;#105;&amp;#109;&amp;#97;&amp;#103;&amp;#101;&amp;#41;&amp;#40;&amp;#46;&amp;#43;&amp;#41;&amp;#92;&amp;#92;&amp;#41;&quot;,
      &quot;replace&quot;: &quot;&amp;#91;&amp;#36;&amp;#49;&amp;#93;&amp;#40;&amp;#47;&amp;#105;&amp;#109;&amp;#97;&amp;#103;&amp;#101;&amp;#36;&amp;#52;&amp;#41;&quot;
    }
  ],
  &quot;inlineTags&quot;: false,
  &quot;dataviewFields&quot;: [],
  &quot;excludeDataviewValue&quot;: [],
  &quot;metadataFileFields&quot;: [
    &quot;obsidian&quot;
  ],
  &quot;frontmatterTitleKey&quot;: &quot;filename&quot;,
  &quot;shareExternalModified&quot;: false
}
&lt;/pre&gt;</content>

      

      
        <summary type="html">Follow this step-by-step guide to setup Obsidian so you can post to Jekyll seamlessly.</summary>
      

      

      
        <category term="obsidian" />
      

      
        <category term="obsidian" />
      
        <category term="guide" />
      
    </entry>
    
  
    
    <entry>
      <title type="html">Derisk</title>
      <link href="https://alexoliveira.cc/essay/derisk" rel="alternate" type="text/html" title="Derisk" />
      <published>2022-03-13T19:00:00+00:00</published>
      <updated>2022-03-13T19:00:00+00:00</updated>
      <id>https://alexoliveira.cc/essay/derisk</id>
      <content type="html" xml:base="https://alexoliveira.cc/essay/derisk">&lt;p&gt;If I had to point out one skill that differentiates great makers I worked with, it would be &lt;em&gt;deliberate derisking&lt;/em&gt;. Everybody does it to some extent, but rarely as a constant discipline. It drives success and, once in motion, molds thinking and triggers valuable practices in all areas of life.&lt;/p&gt;

&lt;p&gt;In short, you derisk by identifying future, expensive problems early on and finding ways to circumvent them. It is asking yourself, how could this go wrong? It’s asking yourself whether your wallet is in your pocket when you’re leaving the coffee shop, or getting reviews on your paper before you publish it. It’s thinking about knowns and unknowns before you invest your time.&lt;/p&gt;

&lt;p&gt;Derisking is applied skepticism. You allow yourself to venture briefly into pessimism for short bursts of time so your brain has the environment and background to identify edge cases and think outside the box without analysis paralysis. In the process, it turns you into a realist and builds a healthy optimism. You and those around you being understanding in more depth the factors and the conditions that will drive your outcomes and decrease failures.&lt;/p&gt;

&lt;p&gt;The process is somewhat straightforward and can be done mentally for everyday tasks depending on size. The decision on whether to mitigate a risk will depend on the risk-reward ratio. If the cost is too high, it might make sense to do nothing. On the other hand, if the cost of mitigation is too low, it probably makes sense to do it. Sending an email is low cost, but could have a high impact on the recipient. These are what we call asymmetric opportunities, inexpensive actions that can result in high rewards despite low risk.&lt;/p&gt;

&lt;p&gt;To start simple, create a table with four columns: Risk, Probability, Impact and Mitigation. Each line is a risk. If you have a larger, high-stakes project, you will want to go into full details about each risk and their ramifications. If not, do it mentally.&lt;/p&gt;

&lt;p&gt;Here are a few examples of derisking from different areas in life and their positive ramifications.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Risk leads to change in work cadence:&lt;/strong&gt; long projects usually cause a divergence between what is expected by the customer and what is built. That is why architects build 3D models before construction, for aligning expectations on physical aspects and feelings (cozy? sober?).&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Risk example: “Customer doesn’t find our solution useful”.&lt;/li&gt;
  &lt;li&gt;Probability: “High”.&lt;/li&gt;
  &lt;li&gt;Impact: “We lose trust and, subsequently, the deal”.&lt;/li&gt;
  &lt;li&gt;Mitigation: “Deliver in small matches so we get signals from the customer as soon as possible”.&lt;/li&gt;
  &lt;li&gt;This one is cheap to be done and can increase the customer’s trust. The Lean methodology was built around this problem, inspired by the scientific method which focuses on setting a small hypotheses and testing them so each step leads into the next.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The software industry suffered for decades with the so called “Waterfall planning”. It was meant to be like a house construction where you make a big plan upfront, document it, then develop it. The customer would only see the product once every detail was developed and implemented, &lt;a href=&quot;https://en.wikipedia.org/wiki/Virtual_Case_File&quot;&gt;often times with wrong requirements&lt;/a&gt;, a year or two later. In the 2000’s, a new &lt;a href=&quot;https://agilemanifesto.com&quot;&gt;manifesto&lt;/a&gt; was written proposing an iterative approach to decrease risks, by showing the software to the customer every day or every week.&lt;/p&gt;

&lt;p&gt;Those small iterations reduce the risk of project dead ends.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Risk drives transparency:&lt;/strong&gt; the risk of writing a 400-pages book and failing forces writers to get constant reviews and feedback of their drafts to make sure they’re going in the right direction. At work, the equivalent is getting feedback on plans constantly. That opens up the building process and everyone feels transparency, which helps with trust and aligning expectations early on.&lt;/p&gt;

&lt;p&gt;In this new remote work world, I find it useful to say out loud the things I know most people are thinking about, topics such as anxiety about communications and expectations. It’s really to check in with people and hear their thoughts and identify what’s not transparent yet. This helps coworkers open up and support each other. This sense of transparency also helps leaders identify and anticipate problems before they have grown too much.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Risk example: “Code written is confusing for coworkers”.&lt;/li&gt;
  &lt;li&gt;Probability: “High” (most software code is painful to read).&lt;/li&gt;
  &lt;li&gt;Impact: “No one can change the software quickly later on, therefore the company suffers”.&lt;/li&gt;
  &lt;li&gt;Mitigation: “Create quick drafts of ideas and share with colleagues before work starts”.&lt;/li&gt;
  &lt;li&gt;Besides helping yourself with feedback, it shows your coworkers that you value and trust their opinions. It drives a culture of transparency and soon other people will be reaching out asking for feedback, making the organization more proactive. More transparency means less mistakes and bad decisions. That’s one of the reasons why top-down orders are usually frowned upon.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Risk drives personal rewards:&lt;/strong&gt; people in different departments and on different level of the hierarchy care about different things. Micromanagement happens in part due to lack of clarity into what leaders really care about (and some due to trust issues). While you care about how to get your task done, your boss is probably thinking about how to make sure the customer is satisfied, or how failure on this and other 10 projects could impact their career negatively. They feel insecure that you won’t be upfront in case you see a risk or blocker that could result in lost customers.&lt;/p&gt;

&lt;p&gt;The “solution”? Progress reports. Every month, every week, every day. This helps them at the cost of being seen as a stereotypical boss and the hidden cost of spending more time writing reports than delivering actual value to customers. A better solution? Invert the narrative, and show that you have interest in communicating your progress without them having to worry about it in the first place. It should help decrease micromanagement in most cases.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Risk example: “Not being recognized because my boss doesn’t know what I’m working on”.&lt;/li&gt;
  &lt;li&gt;Probability: “Low”.&lt;/li&gt;
  &lt;li&gt;Impact: “I could miss future promotions”.&lt;/li&gt;
  &lt;li&gt;Mitigation: “Write up status updates and blockers publicly twice a week for alignment”.&lt;/li&gt;
  &lt;li&gt;Your boss gave you the priorities for the week, but there’s are ramifications that they don’t have visibility into, including your thought process and the principles you’re applying. Although being &lt;em&gt;Low&lt;/em&gt; risk, the cost of writing a paragraph is nearly zero and could help with that promotion the following year when you are seen as communicative.&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;h1 id=&quot;incentives-perception-and-expectations&quot;&gt;Incentives, Perception and Expectations&lt;/h1&gt;

&lt;p&gt;For me, the most exciting part is derisking at the intersection of technology and people. I find useful to see it through the lenses of incentives, perceptions and expectations whenever trying to figure out elements that could hinder technical projects.&lt;/p&gt;

&lt;p&gt;Everybody’s incentives are different. It drives their perception of reality, liking and disliking different things in different contexts and orders. That will always weigh on how your projects are ultimately judged. Your shiny project could fall short of people’s grace without alignment. Your boss is thinking about how that project will be factored into their goals and OKRs, after all that’s defining their bonus.&lt;/p&gt;

&lt;p&gt;Here’s the critical problem is: everybody imagines and hypothetizes what everybody else’s incentives are instead of straight up talking about it. We think they’re aligned with ours, but they’re not. We forget that everybody had a different childhood history, different values and different principles. It’s not that derisking helps directly with that, but it forces you to understand the landscape in order to apply it.&lt;/p&gt;

&lt;p&gt;There’s only one sustainable way forward: talking to them and practicing active listening. Some care more about quality than money, constant improvement rather than the work itself, self-image over actual work. Others just want to go home at the end of the day. You nurture a team by identifying their individual motivations and offering to participate in providing what they are looking for, never establishing rules and processes in a vacuum, without talking to the people and hearing what they have to say.&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;derisk-early-and-often&quot;&gt;Derisk Early and Often&lt;/h2&gt;

&lt;p&gt;The earliest you derisk, the higher the chance of success. Any late derisking generally results in surprises - “why have you only thought about that now?” Finding out a pipe problem once the construction has been delivered is too late, or finding out the text you’ve written is not interesting after you publish is too late. The later we derisk, the more energy we need to steer the ship. Yet, we rarely focus on deliberate derisking, despite important projects in life. We are either too focused on the present, the quarter, a task at hand, and we forget to step back and reflect.&lt;/p&gt;

&lt;p&gt;Derisking works alike in personal and work environments, and it’s mildly baked into our everyday life to the point we automate it. You look before you cross the street despite the semaphores. You check your tires before traveling despite the sensors being green. You check the destination’s weather despite it being summer. You set up Alexa to close windows automatically.&lt;/p&gt;

&lt;p&gt;Now make it deliberate.&lt;/p&gt;</content>

      

      
        <summary type="html">If I had to point out one skill that differentiates great makers, professionals and executives I worked with, it would be _deliberate derisking_. Everybody does it to some extent, but rarely as a constant discipline. It drives success and, once in motion, molds thinking and triggers valuable practices in all areas of life.</summary>
      

      

      
        <category term="risk management" />
      
        <category term="risks" />
      

      
        <category term="obsidian" />
      
        <category term="essay" />
      
    </entry>
    
  
    
    <entry>
      <title type="html">Software Complexity: Naming</title>
      <link href="https://alexoliveira.cc/essay/software-naming" rel="alternate" type="text/html" title="Software Complexity: Naming" />
      <published>2017-04-05T17:02:54+00:00</published>
      <updated>2017-04-05T17:02:54+00:00</updated>
      <id>https://alexoliveira.cc/essay/software-naming</id>
      <content type="html" xml:base="https://alexoliveira.cc/essay/software-naming">&lt;p&gt;&lt;img src=&quot;../../../images/obsidian/naming.png&quot; alt=&quot;The Magic Acid, or the art of naming&quot; /&gt;&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;There are only two hard things in Computer Science: cache invalidation and naming things.&lt;/p&gt;

  &lt;p&gt;Phil Karlton&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;We all want to read and understand software. We want code to make sense, to speak the language of the business model, to convey meaning and relationships with clarity. Although code is written once, it is read many times.&lt;/p&gt;

&lt;p&gt;Bad code confuses us. Bad code codifies assumptions that make sense for the writer but not for the readers. Have you ever needed help to understand a piece of code? Have you ever been demanded disproportionate energy and effort to make sense of what code was doing? That’s bad code.&lt;/p&gt;

&lt;p&gt;But how do we go from bad to good?&lt;/p&gt;

&lt;p&gt;The first step to succeed in any area is a solid understanding of its elements and their impact on other people and the environment. Good movie directors internalize &lt;em&gt;elements&lt;/em&gt; and &lt;em&gt;patterns&lt;/em&gt; after watching movies for countless hours, then manipulate them to tell stories effectively. The same can be said for novelists, musicians, chess players.&lt;/p&gt;

&lt;p&gt;Similarly, a software developer should be able to scan a business domain and discover its elements and patterns. Some are obvious, some are not, and this is where it gets tricky: finding names for some of these elements is not a trivial task. Some elements don’t exist in the real world, some do but lack names everyone will understand. Some relationships are inevitable for the success of the business domain but were never discussed by the business owners.&lt;/p&gt;

&lt;p&gt;Some names individualize elements whereas others aggregate them. Some reveal abstract symbols (graphs and nodes) whereas others make things concrete (cabled network and hubs). Some reveal roles (the administrators table), some reveal usage (users table), some reveal nature (people table). Some names don’t identify elements at the right level of precision (document vs XML), whereas some conflate multiple elements into one. Some just lack inspiration.&lt;/p&gt;

&lt;p&gt;Good writing, as it turns out, is about optimizing for ease of reading.&lt;/p&gt;

&lt;h2 id=&quot;naming-components-and-elements&quot;&gt;Naming Components and Elements&lt;/h2&gt;

&lt;p&gt;There’s a whole universe of types of relationships among elements. Some things live side by side (e.g nodes), some contain others (organization vs employees). Some things depend on others (purchases and payments methods) while some generate others (bills and installments).&lt;/p&gt;

&lt;p&gt;To uncover concepts and their names, we start out by asking simple questions, as if to prove that they make sense at all.&lt;/p&gt;

&lt;p&gt;To illustrate our first concept, let’s start simple. Given the picture below, what room is this?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Question 1 of 3&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;../../../images/obsidian/couch-in-what-room.png&quot; alt=&quot;A couch, what room does it belong to?&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;Judging from this furniture, this is very likely to be a &lt;strong&gt;living room&lt;/strong&gt;. Based on a component, we know the name of the room we’re in. That was easy. Next.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Question 2 of 3&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;../../../images/obsidian/toilet-in-what-room.png&quot; alt=&quot;A toilet, what room does it belong to?&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;Based on this object, we can fairly sure say that this is the &lt;strong&gt;restroom&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;See a pattern here? The name of the room is a &lt;strong&gt;label&lt;/strong&gt; that defines what is inside of it. With that label we don’t need to look inside the container to know what elements are there. That enables us to establish our first corollary:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Corollary 1: container name is a function of its elements.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Note it is basically Duck Typing. Does it have a bed? Then it’s probably a bedroom.&lt;/p&gt;

&lt;p&gt;Now, the opposite is also true: based on the container name we can infer its components. If we were talking about a &lt;em&gt;bedroom&lt;/em&gt; it would very likely that it had a bed. That enables us to define our second corollary:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Corollary 2: we can infer components based on the container name.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Pretty obvious, but now that we have some rules, let’s try to apply them to this next room.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Question 3 of 3&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;../../../images/obsidian/toilet-bed.png&quot; alt=&quot;What room has a toilet and a bed?&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;If our system is a house, a bed and a toilet in the &lt;strong&gt;same room&lt;/strong&gt; makes the room definition, by all known western standards, pretty much blurry, foggy. Do you notice how using corollaries 1 and 2 becomes non-trivial to name this room? We could very well name it the &lt;em&gt;Ambiguous Room&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;In my experience, most of the time the challenge of naming things results from bad modeling. When the elements in software have been introduced without coherence, naming will be impossible. The developer, with short deadlines, are forced to deliver whatever comes to mind first.&lt;/p&gt;

&lt;p&gt;At home, we put together things that have the same function, purpose and intent. That makes organizing easier, whereas by messing with these responsibilities we cannot be sure what the architects wanted or how these objects are meant to be used, blocking flow.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Corollary 3: the clarity with which a container is defined is proportional to how closely related its components are.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is hard to read, so let’s use a picture:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;../../../images/obsidian/clarity-vs-relation.png&quot; alt=&quot;Clarity vs relation&quot; /&gt;&lt;/p&gt;

&lt;p&gt;When components are related, it’s easier to find a good name. When things are unrelated, it becomes increasingly difficult. The word relation here could be their functionality, their purpose, their strategy, their type, and others. Relation on its own doesn’t mean much until we talk about criteria. Bear with me here, and we’ll get to that soon.&lt;/p&gt;

&lt;p&gt;Note that these assumptions would flip upside down if our system was a prison, not a house. In that case, the reader would easily identify this room as a prison cell. That leads us to an important definition.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Corollary 4: a container definition is constrained to its context.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This seems obvious when our focus is on the definition of the container, but this surfaces another problem: it is common for systems to leave context undefined. A module represents context, and submodules represent sub-contexts.&lt;/p&gt;

&lt;p&gt;When most code is flat, the context definition is missing, preventing differentiation among containers. The cues that indicate that where code should go don’t exist, and so it feels like code is random.&lt;/p&gt;

&lt;p&gt;For example, a directory without any modular segregation, with flat classes serving all types of functions, from database manipulation to authentication, custom data structures and view logic, will hide contexts and prevent cues from emerging, resulting in inferior readability.&lt;/p&gt;

&lt;p&gt;This creates incentives for developers to add code anywhere because there are no hierarchical cues. As Alan Kay puts it,&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Most software today is very much like an Egyptian pyramid with millions of bricks piled on top of each other, with no structural integrity, but just done by brute force and thousands of slaves.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Example 1: HTTP domain and a car&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;HTTP is a domain and it has requests and responses. If we were to put a component called &lt;em&gt;Car&lt;/em&gt; within it, we wouldn’t be able to call it HTTP anymore. In this case, it becomes something confusing.&lt;/p&gt;

&lt;div class=&quot;language-java highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;interface&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;WhatIsAGoodNameForThis&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
	
	&lt;span class=&quot;cm&quot;&gt;/* methods for a car */&lt;/span&gt;
	&lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;gas&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
	&lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;brake&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;

	&lt;span class=&quot;cm&quot;&gt;/* methods for an HTTP client */&lt;/span&gt;
	&lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Response&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;makeGetRequest&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;param&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;	
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;img src=&quot;../../../images/obsidian/car-http.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example 2: Coupling through words&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A common pattern is appending Builder and other Er-ending words in class names. SomethingBuilder. UserBuilder, AccountBuilder, AccountCreator, UserHelper, JobPerformer.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;../../../images/obsidian/builders.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Judging by the name, we can interpret three things. First, the verb &lt;em&gt;Build&lt;/em&gt; in the class name implies that it’s a function, when in fact it’s in the class title. Functions do stuff, classes embody entities and context. A function is not an entity, and without entities well defined the codebase quickly develops into procedural code because it’s sub-utilizing the class pattern’s original intention.&lt;/p&gt;

&lt;p&gt;Second, it has two inner, hidden entities within it, a User and a Builder, meaning a probable encapsulation violation. By that we mean that a User shouldn’t be responsible for generating new Users.&lt;/p&gt;

&lt;p&gt;Third, it implies that Builder has access to how a User functions internally because, after all, they’re entangled with one another.&lt;/p&gt;

&lt;p&gt;I’ve seen entire codebases littered with this approach. There are complicated patterns that attempt to solve this, like &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;FactoryPattern&lt;/code&gt;. Some times they’re useful, but when we have a modeling problem, we better fix it, not bandaid it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example 3: Base&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Let’s look at a few real life examples. First one, the &lt;a href=&quot;https://github.com/svenfuchs/i18n/blob/master/lib/i18n.rb&quot;&gt;I18n&lt;/a&gt; Ruby gem (only class and method names provided for brevity):&lt;/p&gt;

&lt;div class=&quot;language-ruby highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Base&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;config&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;translate&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;locale_available?&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;locale&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;transliterate&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;img src=&quot;../../../images/obsidian/base.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Here, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Base&lt;/code&gt; doesn’t express meaning. It can configure and translate, as well as figure out whether a locale is available or not. It’s doing a few different, unrelated things.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example 4: names guiding design&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When we talk about how names can guide our design, Discourse has a few examples, one of which interests us.&lt;/p&gt;

&lt;div class=&quot;language-ruby highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;PostAlerter&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;notify_post_users&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;notify_group_summary&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;notify_non_pm_users&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;create_notification&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;unread_posts&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;unread_count&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;group_stats&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The name &lt;em&gt;PostAlerter&lt;/em&gt; suggests functionalities that &lt;em&gt;alert&lt;/em&gt; someone about a post. However, &lt;em&gt;unread_posts&lt;/em&gt;, &lt;em&gt;unread_count&lt;/em&gt; and &lt;em&gt;group_stats&lt;/em&gt; clearly deal with something else, making this class name not ideal for what it does. Moving those three methods to a class called &lt;em&gt;PostsStatistics&lt;/em&gt; would make matters clearer and more predictable for newcomers.&lt;/p&gt;

&lt;div class=&quot;language-ruby highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;PostAlerter&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;notify_post_users&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;notify_group_summary&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;notify_non_pm_users&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;create_notification&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;PostsStatistics&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;unread_posts&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;unread_count&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;group_stats&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Example 5: ambiguous names&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The Spring framework has a few examples that illustrate components that do too much and, as a result, require names that resemble our &lt;em&gt;Ambiguous Room&lt;/em&gt;. Here is &lt;a href=&quot;http://docs.spring.io/spring/docs/2.5.x/javadoc-api/org/springframework/aop/config/SimpleBeanFactoryAwareAspectInstanceFactory.html&quot;&gt;one&lt;/a&gt; (because &lt;a href=&quot;http://www.javafind.net/gate.jsp?q=%2Flibrary%2F36%2Fjava6_full_apidocs%2Fcom%2Fsun%2Fjava%2Fswing%2Fplaf%2Fnimbus%2FInternalFrameInternalFrameTitlePaneInternalFrameTitlePaneMaximizeButtonWindowNotFocusedState.html&quot;&gt;this one&lt;/a&gt; would be just a bit too much):&lt;/p&gt;

&lt;div class=&quot;language-java highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kd&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;SimpleBeanFactoryAwareAspectInstanceFactory&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;ClassLoader&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;getAspectClassLoader&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt;
  &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Object&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;getAspectInstance&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt;
  &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;getOrder&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; 
  &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;setAspectBeanName&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;aspectBeanName&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; 
  &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;setBeanFactory&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;BeanFactory&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;beanFactory&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Example 6: good naming, for a change&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Enough of bad naming. Good naming can be found in D3’s  &lt;a href=&quot;https://github.com/d3/d3-shape/blob/master/src/arc.js&quot;&gt;arc&lt;/a&gt;, for instance:&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;export&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;default&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;cm&quot;&gt;/* ... */&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;arc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;centroid&lt;/span&gt;     &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;cm&quot;&gt;/* ... */&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;arc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;innerRadius&lt;/span&gt;  &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;cm&quot;&gt;/* ... */&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;arc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;outerRadius&lt;/span&gt;  &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;cm&quot;&gt;/* ... */&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;arc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;cornerRadius&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;cm&quot;&gt;/* ... */&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;arc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;padRadius&lt;/span&gt;    &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;cm&quot;&gt;/* ... */&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;arc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;startAngle&lt;/span&gt;   &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;cm&quot;&gt;/* ... */&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;arc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;endAngle&lt;/span&gt;     &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;cm&quot;&gt;/* ... */&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;arc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;padAngle&lt;/span&gt;     &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;cm&quot;&gt;/* ... */&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;arc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Each one of these methods make total sense: they are all named after what an arc has. And what I love about the image below is how simple it is.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;../../../images/obsidian/arc.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;method-1-break-apart&quot;&gt;Method 1: Break Apart&lt;/h3&gt;

&lt;p&gt;&lt;img src=&quot;../../../images/obsidian/divide-and-name.png&quot; alt=&quot;Divide and... name&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;
&lt;strong&gt;When to use:&lt;/strong&gt; you cannot find a good name for a class or component, but you already have isolated concepts and want to find good names for their groupings.&lt;/p&gt;

&lt;p&gt;It consists in two steps:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;identify the concepts we have&lt;/li&gt;
  &lt;li&gt;break them apart&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In the toilet + bed scenario, we pull apart each different thing we can identify by pushing bed to the left, toilet to the right. Ok, now we have two separate things that we can finally reason about in a natural way.&lt;/p&gt;

&lt;p&gt;When you cannot find a good name for something, you probably have more than one thing in front of you. And, as you know by now, naming multiple things is hard. When in trouble, try to identify what pieces and actions compose what you have.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We have an unnamed class containing a &lt;em&gt;request&lt;/em&gt;, &lt;em&gt;response&lt;/em&gt;, &lt;em&gt;headers&lt;/em&gt;, &lt;em&gt;URLs&lt;/em&gt;, &lt;em&gt;body&lt;/em&gt;, &lt;em&gt;caching&lt;/em&gt; and &lt;em&gt;timeout&lt;/em&gt;. Pulling all those apart from this main class, we’re left with the components &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Request&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Response&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Headers&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;URLs&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ResponseBody&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Cache&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Timeout&lt;/code&gt; and so on. If all we had was the name of these classes, we could fairly sure assume we were dealing with a web request. A good candidate for a web request component is &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;HTTPClient&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;When the code is hard, don’t think about the whole first. Don’t. Think about the parts.&lt;/p&gt;

&lt;h3 id=&quot;method-2-discover-new-concepts&quot;&gt;Method 2: Discover New Concepts&lt;/h3&gt;

&lt;p&gt;&lt;img src=&quot;../../../images/obsidian/compound-concepts.png&quot; alt=&quot;Compound concept&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When to apply:&lt;/strong&gt; when a class is not simple or coherent.&lt;/p&gt;

&lt;p&gt;Discovering new concepts requires knowledge of the business domain. When software applies the same nomenclatures as the business, an ubiquitous language is established (Evans, 2003), one that allows professionals from different areas of expertise to speak the same idioms.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example 1: encapsulating components into one new concept&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A few years ago, a company was about to lose a big contract. Why? Because the team was slow to ship new features and fix bugs.&lt;/p&gt;

&lt;p&gt;This marketplace ecommerce charged students with different rules in different countries with multiple payment gateways. Requirements were fairly complex. When I saw the charge code, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;PaymentGateway&lt;/code&gt;, I was shocked at how complicated it was, with several dependencies, including: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;User&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;UserAddress&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;CreditCard&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;BillingAddress&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;SellerAddress&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;LineItems&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Discounts&lt;/code&gt;, and more. Its constructor was gigantic and this complexity made it hard to add new rules, as touching one thing broke others, as well as requiring us to change all gateway adapters.&lt;/p&gt;

&lt;p&gt;The problem extended beyond payments. Emails were sent to students by having messaging classes aggregating all this data again. Technical support had their own screens with this data aggregated a third time, except that this particular place was using a class called &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Aggregator&lt;/code&gt; (word that means nothing without context). We had to do something to fix this architectural blocker.&lt;/p&gt;

&lt;p&gt;To solve the problem, I started with a mind exercise. Here’s an idea of how it went:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Here I am, with these details about things I need you (the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;PaymentGateway&lt;/code&gt;) to charge for me. If this was a desk, I’d have these papers organized and I’d probably call them Invoices. So what if I created one class called &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Invoice&lt;/code&gt;, which is nothing more than the aggregation of all these other details, such that the gateway doesn’t need to know how those rules are done because &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Invoice&lt;/code&gt; will? Instead of injecting a million objects, I just hand one over to you?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The &lt;em&gt;Invoice&lt;/em&gt; term wasn’t used anywhere. We spent a month refactoring on the side and once we were done, we were able to change the software much more swiftly.&lt;/p&gt;

&lt;p&gt;Invoice is a good example of concept that is but an aggregation of data from many sources and the majority knows what it is. The final solution added the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Invoice&lt;/code&gt; class which alone was injected into the gateways, serving as a facade pattern and hiding other classes.&lt;/p&gt;

&lt;p&gt;Good naming is not just about writing beautiful words, but also writing precisely what needs to be expressed that wasn’t before.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example 2: Pivoting names based on the business domain&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In a greenfield, carpooling project, we designed the system from the ground up and during research with other transportation solutions, the appropriate word to describe someone’s journey on a given day from origin to destination was &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;trip&lt;/code&gt;, and the group of people was called &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ride&lt;/code&gt;. We published a glossary so the rest of the company could discuss and share the same ubiquitous language.&lt;/p&gt;

&lt;p&gt;After launch, our customers always referred to trips as &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;rides&lt;/code&gt;. Soon we had problems translating support requests to what had to be done, and after some considerable pain, we decided it was time to refactor &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;trips&lt;/code&gt; to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;rides&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;rides&lt;/code&gt; to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;carpools&lt;/code&gt;. That solved the problems of one company speaking two different languages.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example 3: levels of abstraction&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;../../../images/obsidian/abstract-canvas.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;One person says, &lt;em&gt;move right leg then left leg then right leg&lt;/em&gt;, other says &lt;em&gt;walk&lt;/em&gt;. Both mean the same, but the latter is said to be more abstract.&lt;/p&gt;

&lt;p&gt;Ideally, as the code gets closer to its public API, the closer it tries to match business nomenclatures. As it get close to the database and to the metals, it uses machine nomenclatures that relate to its context. In between, a gradient that goes from more to less abstract.&lt;/p&gt;

&lt;p&gt;In one company, a business person would say &lt;em&gt;post Tweet&lt;/em&gt;, so a name such as &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;postTweet()&lt;/code&gt; would make more sense in a public API than &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;makeHttpRequest()&lt;/code&gt;. In a company with a more technical service, the latter would be more adequate.&lt;/p&gt;

&lt;p&gt;Second, consider specificity. &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;postTweet()&lt;/code&gt; is very specific, whereas &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;makeHttpRequest()&lt;/code&gt; is so generic it could be used for Facebook or basically anything involving HTTP. A generic name can be reused easily on the price of being vague. That explains why frameworks code are so different from business software code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example 4: generalization&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A long ago, a CMS had database tables &lt;em&gt;news&lt;/em&gt;, &lt;em&gt;history&lt;/em&gt;, &lt;em&gt;videos&lt;/em&gt;, &lt;em&gt;articles&lt;/em&gt;, &lt;em&gt;pages&lt;/em&gt; and other. Most of them had the same columns, &lt;em&gt;title&lt;/em&gt;, &lt;em&gt;summary&lt;/em&gt; and &lt;em&gt;text&lt;/em&gt;. The &lt;em&gt;videos&lt;/em&gt; table had extra attributes such as &lt;em&gt;url&lt;/em&gt; (to embed YouTube) and &lt;em&gt;history&lt;/em&gt; had a &lt;em&gt;date&lt;/em&gt; attribute so the page would show a list of historic events by year. All these tables looked like copies, with a few differences here and there, and adding new functionality required rewriting a lot of boilerplate all over again.&lt;/p&gt;

&lt;p&gt;I collapsed all those tables into one called &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;contents&lt;/code&gt; with a foreign key pointing to a table called &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sections&lt;/code&gt;, which had the list of sections such as news, history, videos and others. Now, one code for &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;contents&lt;/code&gt; was enough. Years later, a friend had to write a small CMS and I suggested the same approach. Once the forms for managing content were done, it took 1/N of the time it would normally take to implement anything because for every new section of the same type, it was already done.&lt;/p&gt;

&lt;p&gt;Generalizing by giving it another name enables great productivity. News is a Content. Article is a Content. History is a Content. Can all of these share the same attributes? Yes. Survey? No, &lt;em&gt;not&lt;/em&gt; a Content.&lt;/p&gt;

&lt;h3 id=&quot;method-3-criteria-for-grouping&quot;&gt;Method 3: Criteria For Grouping&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;When to use:&lt;/strong&gt; when names are good but they don’t fit well with each other.&lt;/p&gt;

&lt;p&gt;Components can be grouped by a variety of criteria, including physical nature, economic, emotional, social and, the most used in software, functional. Photo frames are grouped based on emotional aspects, whereas products are grouped based on economic motives. Couch and TV stay in the same room, grouped together based on a functional criteria, as they both have the same function or purpose, to provide leisure.&lt;/p&gt;

&lt;p&gt;In software, we tend to group components by function. List your project files and you will probably see something like &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;controllers/&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;models/&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;adapters/&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;templates/&lt;/code&gt; and so on. However, some times these groups will not feel comfortable and that will be the perfect time to reevaluate the structure of your modules.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example: grouping by strategy&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A library for automating documentation operations generates a spec file (i.e API Blueprint) based on code, lints said file (to guarantee is correctly formatted) and uploads to the cloud (i.e S3).&lt;/p&gt;

&lt;p&gt;Based on the document format, a variety of subsequent decisions will be made automatically. Choosing API Blueprint will pick up a different linter, a different tester and a different API Elements converter. The key word here to group all of these different functionalities based on one input is &lt;em&gt;strategy&lt;/em&gt;. Following that, the library includes a module (or namespace) called Strategy to group together file formats, linters, document testers and storage providers. That enabled the library to separate ordinary operation files like uploaders, parsers and command-line from business core strategies.&lt;/p&gt;

&lt;h2 id=&quot;leveraging-contexts&quot;&gt;Leveraging Contexts&lt;/h2&gt;

&lt;p&gt;Every app has a different context, and every module within it, every class within them, down to every function. The word &lt;em&gt;User&lt;/em&gt; alone could mean user of the system, but also perhaps a database table, or a 3rd-party service credential. &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;lib/billing/user&lt;/code&gt; differs from &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;lib/booking/user&lt;/code&gt;, but they’re still &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;user&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;../../../images/obsidian/contexts.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Imagine that every container, such as a module, is a bucket. Within them, components are insulated from the outer world. You’re free to name those classes whatever you want. It frees the mind from having to find esoteric names for common things.&lt;/p&gt;

&lt;p&gt;One strong argument for microservices (many, isolated buckets) over monolithic architectures (one big bucket with small buckets within) is that it enforces constraining responsibilities within each service because now you then cannot easily entangle completely unrelated things with each other. Billing lives inside BillingApp, booking inside BookingApp and so on. In a monolithic architecture, these respective service names could be simple module names, but not everyone has the discipline to keep things tidy.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example: Namespaces&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Mark is building an &lt;em&gt;ad&lt;/em&gt; platform that needs to generate hundreds of thousands of ads, then send it to AdWords, Facebook and Bing, all managed through a Graphical User Interface.&lt;/p&gt;

&lt;p&gt;Mark starts with an entity called &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Ad&lt;/code&gt; which soon gets bloated. AdWords’ ads have &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;headline_part1&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;headline_part2&lt;/code&gt;, Facebook’s don’t, while Bing has only &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;headline&lt;/code&gt;. He needs to think of a way to split his entity. He ponders about the different contexts and how he could leverage the language’s namespaces feature to express that. He comes up with the following structure:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Adwords::Ad&lt;/code&gt;: this represents an ad object in Adwords. It has attributes that are unique to Adwords and the logic can be contained in this class.&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Facebook::Ad&lt;/code&gt;: same as the previous one, except that it has Facebook’s specific requirements and logic.&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Bing::Ad&lt;/code&gt;: same as above.&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;RemoteAdService::Ad&lt;/code&gt;: this serves as an interface between &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Adwords::Ad&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Facebook::Ad&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Bing::Ad&lt;/code&gt; and the rest of the system. This means that these three class will all have the same public API, allowing the system to leverage polymorphism.&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Database::Ad&lt;/code&gt;: this is the ORM for the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ads&lt;/code&gt; table. It uses ActiveRecord, DataMapper or any custom solution.&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;GUI::Ad&lt;/code&gt;: this represents the attributes required for display of an ad in the UI. It possibly has presentation and internationalization functionality.&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;API::Ad&lt;/code&gt;: an HTTP endpoint for an ad will have its own custom attributes, therefore it makes sense that the serialization logic lives here.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Words can mean different things depending on context, and when we leverage context, we can choose simpler words for components. In this example, we didn’t have to do any acrobatic movements to find those component names because they’re all one thing, ad.&lt;/p&gt;

&lt;h2 id=&quot;meaninglessness-and-neologisms&quot;&gt;Meaninglessness and neologisms&lt;/h2&gt;

&lt;p&gt;Over the years, names evolve and acquire news meanings. Others come in to fill in holes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Helper:&lt;/strong&gt; helpers are functions that support the main goal of application. But then, what’s the criteria to define what’s the main goal of the application? Everything in an application supports the main goal of an application.&lt;/p&gt;

&lt;p&gt;In practice, they’re lumped together in an unnatural grouping to provide reusability for some miscellaneous, commonly used operation. They tend to suffer from &lt;a href=&quot;https://sourcemaking.com/refactoring/smells/feature-envy&quot;&gt;Feature Envy&lt;/a&gt;, where they need to access another component’s internal data to work. They’re an excuse for things that one can’t find a proper name.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Base:&lt;/strong&gt; classes named &lt;em&gt;Base&lt;/em&gt; were a convention a long time ago in C# to designate inheritance when lacking a better name. For example, the parent class of &lt;em&gt;Automobile&lt;/em&gt; and &lt;em&gt;Bicycle&lt;/em&gt; would be &lt;em&gt;Base&lt;/em&gt; instead of &lt;em&gt;Vehicle&lt;/em&gt;. In spite of Microsoft’s recommendations to avoid that name (Cwalina, 2009), it infected the Ruby world, most notable via &lt;em&gt;ActiveRecord&lt;/em&gt;. To this day we still see &lt;em&gt;Base&lt;/em&gt; as a class name for something that developers cannot find a name for.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;../../../images/obsidian/base.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Variations of &lt;em&gt;Base&lt;/em&gt; include &lt;em&gt;Common&lt;/em&gt; and &lt;em&gt;Utils&lt;/em&gt;. The &lt;a href=&quot;https://github.com/flori/json/blob/65297fbae1e92e26fdde886fe156bac322977db2/lib/json/common.rb&quot;&gt;JSON&lt;/a&gt; Ruby gem &lt;em&gt;Common&lt;/em&gt; class has the methods &lt;em&gt;parse&lt;/em&gt;, &lt;em&gt;generate&lt;/em&gt;, &lt;em&gt;load&lt;/em&gt; and &lt;em&gt;jj&lt;/em&gt;, for instance, but what does common really mean here?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tasks:&lt;/strong&gt; there is a wave in the Javascript community to call asynchronous functions, &lt;em&gt;tasks&lt;/em&gt;. It started with task.js, and the term became used even when that original library wasn’t present.&lt;/p&gt;

&lt;p&gt;Does everyone in the team understand it? Then it’s fine! But what about when someone new joins the team and nomenclature that exist since the 60’s are thrown into garbage?&lt;/p&gt;

&lt;p&gt;I worked in a project where the name of a class was, guess it, &lt;strong&gt;Atlanta&lt;/strong&gt;. Yes, Atlanta. Fucking Atlanta. No one knew or could tell me why that was called that way.&lt;/p&gt;

&lt;h2 id=&quot;communicating&quot;&gt;Communicating&lt;/h2&gt;

&lt;blockquote&gt;
  &lt;p&gt;“Reality exists in the human mind and nowhere else.” George Orwell&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I believe the practice to excel at communication to be an act of altruism, and the effort we put into improving our skills is correlate to how much we care about other people. We want people to understand easily, we want to remove the friction and barriers.&lt;/p&gt;

&lt;p&gt;Secondarily, we want others to understand &lt;em&gt;us&lt;/em&gt;. By accepting that a Receiver getting a message is a Sender’s responsibility, we build an empathic environment. It’s a win-win situation. There are no excuses for not deliberately practicing our communication skills - unless you live in the jungle.&lt;/p&gt;

&lt;p&gt;With writing, we optimize for reading and the exercise in empathy can be exhausting. But, as everything in life, proficiency only comes to those who practice.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bibliography&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Cwalina, Krzysztof. 2009. &lt;em&gt;Framework Design Guidelines: Conventions, Idioms, and Patterns for Reusable .NET Libraries, Second Edition&lt;/em&gt;. Boston: Pearson Education, Inc. 206.&lt;/p&gt;

&lt;p&gt;Evans, Eric. 2003. &lt;em&gt;Domain-Driven Design: Tackling Complexity in the Heart of Software&lt;/em&gt;. Boston: Addison-Wesley Professional.&lt;/p&gt;</content>

      

      
        <summary type="html">Code is written once but read many times. Good writing is, therefore, about optimizing for ease of reading.</summary>
      

      

      
        <category term="software" />
      

      
        <category term="obsidian" />
      
        <category term="essay" />
      
    </entry>
    
  
    
    <entry>
      <title type="html">A Fractal of Black Boxes</title>
      <link href="https://alexoliveira.cc/essay/a-fractal-of-black-boxes" rel="alternate" type="text/html" title="A Fractal of Black Boxes" />
      <published>2016-11-24T17:02:54+00:00</published>
      <updated>2016-11-24T17:02:54+00:00</updated>
      <id>https://alexoliveira.cc/essay/a-fractal-of-black-boxes</id>
      <content type="html" xml:base="https://alexoliveira.cc/essay/a-fractal-of-black-boxes">&lt;p&gt;&lt;img src=&quot;/images/posts/a-fractal-of-black-boxes/cover.png&quot; alt=&quot;Software, in a nutshell&quot; /&gt;&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Most software today is very much like an Egyptian pyramid with millions of bricks piled on top of each other, with no structural integrity, but just done by brute force and thousands of slaves - &lt;strong&gt;Alan Kay&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I am perplexed about the sudden and continuous development of civilization, given the absurdly high complexity permeating our everyday lives. Yet, we rarely notice how complicated everything is. Consider for a minute: when driving, your foot is influencing thousands of explosions per minute. Or when clicking the volume button in your TV remote, millions of electronic instructions are taking place. Endless iterations have gone by in centuries around the world to bring us the stoves in our kitchens, yet heating milk looks mundaine.&lt;/p&gt;

&lt;p&gt;Or, yet, you board an airplane, sit comfortably, and arrive a few hours later on the other side of a sphere floating around a burning star. How many million hours of work have gone into developing something that is heavier than air and faster than sound. That is out of sight and our brain is looking for the button to recline the seat to enjoy a movie.&lt;/p&gt;

&lt;p&gt;We experience simplicity because we only look at the surface in front of us. Beneath, however, are layers and layers of gradual and hierarchical complexity. The hood, the components, the engine, the mechanisms inside, the spark plug, the camshaft, and the descent into physics and chemistry. It’s &lt;em&gt;fractals of black boxes&lt;/em&gt; all the way down.&lt;/p&gt;

&lt;p&gt;The good news is that we can use the principle of progressive compartment to manage most complexity, making maintenance and innovation simpler in many areas of life. These black boxes reduce the need to think about what is out of sight until we have to. What we experience is gradual layering. Like russian dolls.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/posts/a-fractal-of-black-boxes/matryoshka-doll.jpeg&quot; alt=&quot;Russian dolls - dolls inside dolls inside dolls&quot; /&gt;&lt;/p&gt;

&lt;p&gt;In education, one starts with the foundations, then moves on to harder topics. First you learn to read, then you learn to write. In real state, first you research by geography and price, then you move on to the specifics. In software, you don’t put the what and the how in the same level. In a book, you first have the index, then the chapters, then concepts laid out gradually in paragraphs.&lt;/p&gt;

&lt;p&gt;This is the art of making complex things simple and hard things easy. Flat hierarchy tends to produce more complexity, but compartments help contain entropy.&lt;/p&gt;

&lt;h2 id=&quot;tiny-tiny-machines&quot;&gt;Tiny Tiny Machines&lt;/h2&gt;

&lt;p&gt;Biology inspired engineers to think about components as cells, or objects. When engineers at Xerox PARC in 60’s and 70’s envisioned an electronic board as composed of interdependent, tiny little machines communicating among themselves, it opened a door into a future that incredibly vast (but in great part &lt;a href=&quot;https://archive.org/details/AlanKayAtOOPSLA1997TheComputerRevolutionHasntHappenedYet&quot;&gt;is still waiting to happen&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;The greatest system to have flourished from this framework is the Internet itself. Peers anywhere on the planet are able to send and receive messages through millions of network nodes. This cell-like architecture enabled the countless revolutions we have experienced.&lt;/p&gt;

&lt;p&gt;The cell membrane separates and protects its interior from the environment. The many different types of specialized cells cooperate with each other by passing materials around. &lt;a href=&quot;https://en.wikipedia.org/wiki/Alan_Kay&quot;&gt;Alan Kay&lt;/a&gt; argued that applying these concepts to human-made systems, making objects bounded by these characteristics, &lt;a href=&quot;https://www.quora.com/What-is-Alan-Kays-definition-of-Object-Oriented/answer/Alan-Kay-11&quot;&gt;“messaging, local retention and protection and hiding of state”&lt;/a&gt;, would yield better and more robust systems.&lt;/p&gt;

&lt;p&gt;Object orientation is a mental model about the world. It segregates components and hides their complexity by abstracting away their internals, like small &lt;em&gt;black boxes&lt;/em&gt;. Information about the system is compacted, and the brain can scale reasoning step by step. It is a recipe for simplifying all areas of life, from your to-do app (with areas and projects and tasks and subtasks) to banks, from real state to engineering.&lt;/p&gt;

&lt;h2 id=&quot;software&quot;&gt;Software&lt;/h2&gt;

&lt;p&gt;At the root, object orientation had no relation to programming languages. It was always about the messages components exchange. Whatever the paradigm, the value is in managing the application’s state and structures in a way that is self-contained.&lt;/p&gt;

&lt;p&gt;Classes, inheritance, mutability versus immutability, came to be associated with it decades later, with C++ and later Java. The debate, &lt;em&gt;object orientation versus functional languages&lt;/em&gt;, has always been moot because you can have boundaries in any paradigm. When asked what languages could apply it, Alan Kay’s replied, “Lisp”.&lt;/p&gt;

&lt;p&gt;Take Erlang, a functional language. Each BEAM process is a functional program getting a stream of messages. Outside a particular process there could be all sorts of chaotic occurrences, a storm raging, but we do not care. The compartmentalization lets us focus on what individual components need to do and only that.&lt;/p&gt;

&lt;p&gt;In 1969, &lt;a href=&quot;https://en.wikipedia.org/wiki/Smalltalk&quot;&gt;Smalltalk&lt;/a&gt; was born as a project to create a programming language based on these principles. C++ (1983) and Java (1995) are the most famous, although not the most representative. When asked about C++, Kay replied, “actually I made up the term object-oriented, and I can tell you I did not have C++ in mind”.&lt;/p&gt;

&lt;h2 id=&quot;curiosity-mars-rover&quot;&gt;Curiosity Mars Rover&lt;/h2&gt;

&lt;p&gt;Curiosity Mars Rover is a great example of system built with object orientation in mind. Written in C, it applies the concepts information hiding and boundaries to contain its complexity.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/posts/a-fractal-of-black-boxes/mars_rover_c.jpg&quot; alt=&quot;http://cdn.cantechletter.com/wp-content/uploads/2012/09/NASA-Mars-Rover.jpg&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Curiosity has over 2.5 millions lines of code. Composed of many modules, they use a message queue written specially for the rover. Whenever a module needs an information or something to be done, messages go into the queue, which will dispatch it to the target module, which will then execute what’s needed. There are no mutexes, no transactional memory.&lt;/p&gt;

&lt;p&gt;If a message is a command, module A never expects an answer or return value from the receiving module B because they are independent. If module B breaks or goes offline, module A is never impacted by it. If it’s a query message, then a return value is expected but no state can be changed.&lt;/p&gt;

&lt;p&gt;Besides the evident robustness, this decouples module A from module B. There are no setters. When working on a module, you are not required to know how another module works. Cognitive load is lower. Different teams can comply with a contract of how the interfaces are designed and work in parallel. Debugging gets easier because you can apply binary search to figure out which modules are the root cause.&lt;/p&gt;

&lt;p&gt;Changing the system is easier due decoupling, provided changing one part of the system won’t require you to change anything else. Like in Erlang, processes are deployed to production independently while other components continue running. From another angle, NASA basically rewrote Erlang in C. And as Joe Armstrong once jokingly said,&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Erlang might be the only object oriented language.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2 id=&quot;a-fractal-of-perspectives&quot;&gt;A Fractal of Perspectives&lt;/h2&gt;

&lt;p&gt;The principle of black boxes can be applied to distributed systems, microservices, text codebases, and even Unix pipes. In code, we tend to use namespaces to convey components, hide states from other components and see methods as representations of messages.&lt;/p&gt;

&lt;p&gt;All systems have some coupling, some level of complexity and an unescapable cognitive burden. It’s our responsibility, however, to manage it.&lt;/p&gt;</content>

      

      
        <summary type="html">On the beauty of complex things that look simple and easy, and how to use Progressive Compartment to simplify maintenance and innovation at work and in life.</summary>
      

      

      
        <category term="software-complexity" />
      

      
        <category term="essay" />
      
    </entry>
    
  
    
    <entry>
      <title type="html">Physics of Software</title>
      <link href="https://alexoliveira.cc/essay/software-constructal-law" rel="alternate" type="text/html" title="Physics of Software" />
      <published>2014-08-19T17:02:54+00:00</published>
      <updated>2014-08-19T17:02:54+00:00</updated>
      <id>https://alexoliveira.cc/essay/software-constructal-law</id>
      <content type="html" xml:base="https://alexoliveira.cc/essay/software-constructal-law">&lt;div class=&quot;c-post__update&quot;&gt;
&lt;strong&gt;Update (2015):&lt;/strong&gt; A year after publishing this article, Adrian Bejan, who discovered the Constructal Law, invited me to speak at the Constructal Law &amp;amp; Second Law Conference at the University of Parma, Italy. No one had connected it with software yet. Presenting was... interesting. Presentations were the academic precision of a jet engine, whereas I came prepared with memes, like a proper tech talk. It was an honor to present how his physics principle applies to software architecture to an interdisciplinary audience. Scary, but cool.
&lt;/div&gt;

&lt;blockquote&gt;
  &lt;p&gt;Look! Look! Look deep into nature and you will understand everything.&lt;br /&gt;
—Albert Einstein&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Some time in 2013, I picked up a book that connected several dots in my understanding about reality. I had always wondered why rivers resembled city layouts, or why lungs and snowflakes had similar formats, or trees and lightnings look so alike. I had no idea that &lt;em&gt;&lt;a href=&quot;https://www.amazon.com/Design-Nature-Constructal-Technology-Organization/dp/0385534612&quot;&gt;Design in Nature: How the Constructal Law Governs Evolution in Biology, Physics, Technology, and Social Organization&lt;/a&gt;&lt;/em&gt; would help me reason and design better software.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;../images/posts/software-complexity-constructal-law/constructal-law-what-is-it.jpg&quot; alt=&quot;ramifications in leaves of different sizes and types&quot; class=&quot;crop-vertical-1-5&quot; /&gt;&lt;/p&gt;

&lt;p&gt;I does feel off reading &lt;em&gt;nature&lt;/em&gt; and &lt;em&gt;design&lt;/em&gt; in the same sentence without a hint of religion or mythology. After all, everything resulted from random, stochastic processes. Rivers, mountains and vulcanoes had to compete for space, expanding, contracting, flowing, pressuring and many other verbs throughout millennia. How come design played any role?&lt;/p&gt;

&lt;p&gt;Well, what &lt;a href=&quot;https://en.wikipedia.org/wiki/Adrian_Bejan&quot;&gt;Adrian Bejan&lt;/a&gt; figured out is that the processes are as random as we think. The fundamental law underneath the battle of the elements connects disparate manifestations and discovers what drives their shapes,&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;For a finite-size system to persist in time (to live), it must evolve in such a way that it provides easier access to the imposed (global) currents that flow through it.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;!-- https://images.wur.nl/digital/collection/coll13/id/891/rec/10 --&gt;

&lt;h2 id=&quot;constructal-law&quot;&gt;Constructal law&lt;/h2&gt;

&lt;p&gt;Putting 2 and 2 together, whenever something needs to flow from point A to point B, the tree-shape arises.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;../images/posts/software-complexity-constructal-law/complexity-in-the-wild.jpg&quot; alt=&quot;Constructal Law shape&quot; class=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The designs that happen spontaneously in nature reflect this tendency: they allow entities or things to flow more easily – to measurably move more current farther and faster per unit of useful energy consumed. Even streets and roads, despite being artificial constructs, tend share this pattern for maximum mobility.&lt;/p&gt;

&lt;h2 id=&quot;order-and-disorder&quot;&gt;Order and disorder&lt;/h2&gt;

&lt;blockquote&gt;
  &lt;p&gt;Software designers win by separating things that can be considered separately, lose by separating things that must be considered together. - Kent Beck&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In a long enough timeline, software development feels like a semi-random evolution. Real-world concepts &lt;em&gt;compete&lt;/em&gt; for space in the codebase by means of classes and names, &lt;em&gt;expanding&lt;/em&gt; their meaning, &lt;em&gt;contracting&lt;/em&gt; when they get confusing, &lt;em&gt;flowing&lt;/em&gt; through polymorphism or pure classes, &lt;em&gt;pressuring&lt;/em&gt; when it blocks us from making further changes.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;../images/posts/software-complexity-constructal-law/many-small-objects-1.png&quot; alt=&quot;small objects, everything&apos;s rainbows and unicorns&quot; class=&quot;small&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Every team breaks bloated components into smaller, isolated pieces. It helps them identify those pieces quicker and maintain them. But over time, as the push and pull continues, different teams collaborate and oppressive deadlines force abrupt, unplanned changes, those pieces start to drift and lack cohesion, sometimes being duplicated or just not making sense anymore in the grand scheme of things.&lt;/p&gt;

&lt;p&gt;Neil Johnson said it better,&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;The [complex] system appears to be “alive”. The system evolves in a highly non-trivial and often complicated way, driven by an ecology of agents who interact and adapt under the influence of feedback.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Complexity must grow&lt;/strong&gt;. Thread by thread, it creeps in until the simple is knotted.&lt;/p&gt;

&lt;!-- &lt;img src=&quot;../images/posts/software-complexity-constructal-law/many-small-objects-2.png&quot; alt=&quot;system grows out of control&quot; class=&quot;small&quot;&gt; --&gt;

&lt;p&gt;For example, consider complexity as the number of interactions between components. With 2 components, complexity is 1, half its size.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;../images/posts/software-complexity-constructal-law/complexity-evolution-1.png&quot; alt=&quot;2 components, complexity 1&quot; class=&quot;small&quot; /&gt;&lt;/p&gt;

&lt;p&gt;What happens if we add an extra component? Complexity jumps to 3!&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;../images/posts/software-complexity-constructal-law/complexity-evolution-2.png&quot; alt=&quot;3 components, complexity 3&quot; class=&quot;small&quot; /&gt;&lt;/p&gt;

&lt;p&gt;We hit complexity 15 when reaching mere 6 components, a staggering growth This exponential growth is staggering.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;../images/posts/software-complexity-constructal-law/complexity-evolution-3.png&quot; alt=&quot;6 components, complexity 15!&quot; class=&quot;small&quot; /&gt;&lt;/p&gt;

&lt;p&gt;This is an extreme case for the sake of the argument, but fair enough topology to express how complexity grows untamed. Such extreme examples are not uncommon, though, as every software team knows well.&lt;/p&gt;

&lt;h2 id=&quot;applying-the-constructal-law-to-tame-disorder&quot;&gt;Applying the Constructal Law to tame disorder&lt;/h2&gt;

&lt;p&gt;Having in mind what we know about Constructal Law, we can redesign the architecture, minimizing the flow pathways to contain complexity.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;../images/posts/software-complexity-constructal-law/order-with-constructal-law-1.png&quot; alt=&quot;7 objects, complexity 8&quot; class=&quot;small&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Above, we increased the system size by adding a 7th object, while decreasing direct flow from 15 down to 8. In practice, that is achieved by patterns like &lt;em&gt;Facade&lt;/em&gt; or &lt;em&gt;Gateway&lt;/em&gt; (single entry to subsystem), a &lt;em&gt;Mediator&lt;/em&gt;  (central coordinator), Application services (one orchestrator per workflow), or a command or event bus, to name a few. Each replaces a many-to-many mesh with a star (hub) or a pipeline.&lt;/p&gt;

&lt;p&gt;Modularization isolates subsystems, as long as the entrypoints are designed intentionally. By moving away from a flat architectures, scarce, well-defined entrypoints will support sustainable growth.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;../images/posts/software-complexity-constructal-law/order-with-constructal-law-2.png&quot; alt=&quot;order with constructal law&quot; class=&quot;small&quot; /&gt;&lt;/p&gt;

&lt;p&gt;On the other hand, here’s how to take the first step to mess up your subsystems.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;../images/posts/software-complexity-constructal-law/order-with-constructal-law-breaking-encapsulation.png&quot; alt=&quot;breaking encapsulation as shown in the 2nd article of the series&quot; class=&quot;small&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Why is this so bad? Well, whenever we must change B, we’re forced to change A too. Every change becomes larger. Second, once you broke a boundary, it’s inevitable that these violations will continue into the future.&lt;/p&gt;

&lt;p&gt;Overall, ensure less interactions between deeper components, if possible. Create facade objects that delegate the flow further downstream. Although breaking them in smaller pieces is a great first step, but it is preventing whatever components from talking to whatever other components in another subsystem without intentionality that will make sure your overall system remains simple.&lt;/p&gt;</content>

      

      
        <summary type="html">A look at physics and the Constructal Law as inspiration on how to control complexity in software systems.</summary>
      

      

      
        <category term="software" />
      

      
        <category term="obsidian" />
      
        <category term="essay" />
      
    </entry>
    
  
</feed>
