<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Learning | AkitaOnRails.com</title><link>https://akitaonrails.github.io/en/tags/learning/</link><description>Fabio Akita's blog — tech, career, and assorted geek topics. English edition.</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Mon, 19 Oct 2026 23:20:51 +0000</lastBuildDate><atom:link href="https://akitaonrails.github.io/en/tags/learning/index.xml" rel="self" type="application/rss+xml"/><item><title>How DriveClub and shadPS4 Almost Defeated AI and Me: How to Learn</title><link>https://akitaonrails.github.io/en/2026/04/23/driveclub-shadps4-e-ia-como-aprender/</link><guid isPermaLink="true">https://akitaonrails.github.io/en/2026/04/23/driveclub-shadps4-e-ia-como-aprender/</guid><pubDate>Thu, 23 Apr 2026 12:00:00 -0300</pubDate><description>&lt;h2&gt;Where we were&lt;span class="hx:absolute hx:-mt-20" id="where-we-were"&gt;&lt;/span&gt;
&lt;a href="#where-we-were" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Last week I &lt;a href="https://akitaonrails.github.io/en/2026/04/19/retrogames-de-corrida-favoritos-no-distrobox/"&gt;posted about my distrobox-gaming setup&lt;/a&gt;, with more than ten retro racing games running on Linux, from Gran Turismo 1 on DuckStation to Forza Motorsport 4 on Xenia. At the end of that piece, I described Driveclub on shadPS4 as the &amp;ldquo;final boss&amp;rdquo;: the game boots, the menu loads, the race starts, the controller responds.&lt;/p&gt;
&lt;p&gt;Except I mentioned two problems in passing and treated them as &amp;ldquo;accepted limitations&amp;rdquo;:&lt;/p&gt;</description><content:encoded><![CDATA[<h2>Where we were<span class="hx:absolute hx:-mt-20" id="where-we-were"></span>
    <a href="#where-we-were" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>Last week I <a href="/en/2026/04/19/retrogames-de-corrida-favoritos-no-distrobox/">posted about my distrobox-gaming setup</a>, with more than ten retro racing games running on Linux, from Gran Turismo 1 on DuckStation to Forza Motorsport 4 on Xenia. At the end of that piece, I described Driveclub on shadPS4 as the &ldquo;final boss&rdquo;: the game boots, the menu loads, the race starts, the controller responds.</p>
<p>Except I mentioned two problems in passing and treated them as &ldquo;accepted limitations&rdquo;:</p>
<ol>
<li><strong>During daytime, the image is a bit darker than on a reference PS4.</strong> Not alarming, but noticeable.</li>
<li><strong>At night, the race start in Canada or Munnar went pitch black for 10 to 30 seconds</strong> before the game &ldquo;recovered on its own&rdquo; around the 1:30 mark. During those seconds, only the HUD was visible. Track, car, headlights — all absolute black.</li>
</ol>
<p>In the previous article I pushed the explanation to &ldquo;it&rsquo;s just not fixed in the emulator yet, I&rsquo;ll live with it&rdquo;. But inside I couldn&rsquo;t make myself play the game in a visually unplayable state. I wanted to play DriveClub at its best, and I didn&rsquo;t want to sit around waiting for the project to fix it for me. I decided to take matters into my own hands. Thirty seconds of absolute black isn&rsquo;t &ldquo;a bit darker&rdquo;. It&rsquo;s a serious bug, the kind that makes a game unplayable in practice.</p>
<p>This article is what happened between Sunday night and Thursday morning.</p>
<h2>The blackout, live<span class="hx:absolute hx:-mt-20" id="the-blackout-live"></span>
    <a href="#the-blackout-live" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><video
  controls
  preload="metadata"
  playsinline
  class="html5-video"
  style="width:100%; max-width:960px; display:block; margin:1.25em auto; border-radius:8px; background:#000;"
  >
  <source src="https://new-uploads-akitaonrails.s3.us-east-2.amazonaws.com/2026/04/videos/original-blackout.mp4" type="video/mp4">
  Your browser does not support HTML5 video.
</video>

<p>This video is the behavior I wanted to fix. Race start in India (Munnar), night race. You see the track, headlights turn on, the first few seconds run. Then it darkens progressively. Within about 15 seconds everything is black. Stays that way for another 60-90 seconds. Then the game &ldquo;recalibrates&rdquo; on its own and the track reappears.</p>
<p>If you&rsquo;re a player, you don&rsquo;t care why. You just want to drive.</p>
<h2>Why shadPS4 is hard to debug<span class="hx:absolute hx:-mt-20" id="why-shadps4-is-hard-to-debug"></span>
    <a href="#why-shadps4-is-hard-to-debug" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p><a href="https://shadps4.net/"target="_blank" rel="noopener">shadPS4</a> <strong>still has no stable release</strong>. The project is under active development. The main branch changes several times a week, configs migrate from TOML to JSON without notice, settings hide behind &ldquo;Advanced&rdquo; so users with incompatible hardware don&rsquo;t file issues, open PRs compete over different approaches to the same problem.</p>
<p>Anyone trying to configure DriveClub today will find:</p>
<ul>
<li>September/2025 Reddit guides using <code>readbacks = true</code> (it was a boolean back then) saying &ldquo;for DriveClub always enable readbacks&rdquo;.</li>
<li>November/2025 guides saying &ldquo;disable readbacks, it kills performance&rdquo; (because in 2025-07 readbacks became an enum <code>Disabled | Relaxed | Precise</code> with different performance profiles, and Bloodborne started hanging with it on).</li>
<li>January/2026 YouTube videos using some custom fork nobody documented.</li>
<li>A thread on shadps4.net with three different, mutually exclusive explanations for the blackout.</li>
<li>My own notes from last week in <a href="https://github.com/akitaonrails/distrobox-gaming/blob/master/docs/driveclub-shadps4.md"target="_blank" rel="noopener"><code>distrobox-gaming/docs/driveclub-shadps4.md</code></a> saying <code>readbacks_mode: 0</code>. The exact opposite of what I found this week.</li>
</ul>
<p>So the information exists, but it&rsquo;s scattered, dated, contradictory, and most of it depends on version details that changed between the original post and today. Reproducing a setup from a YouTube video is like trying to solve a Rubik&rsquo;s cube blindfolded.</p>
<h2>Spoiler: the solution is one integer<span class="hx:absolute hx:-mt-20" id="spoiler-the-solution-is-one-integer"></span>
    <a href="#spoiler-the-solution-is-one-integer" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>After 31 phases of investigation, 44 commits on my shadPS4 fork, 15,668 lines of instrumental code added, and three days of nearly uninterrupted debugging, the answer is <strong>one line in the per-game config</strong>:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-json" data-lang="json"><span class="line"><span class="cl"><span class="p">{</span>
</span></span><span class="line"><span class="cl">  <span class="nt">&#34;GPU&#34;</span><span class="p">:</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">    <span class="nt">&#34;readbacks_mode&#34;</span><span class="p">:</span> <span class="mi">2</span>
</span></span><span class="line"><span class="cl">  <span class="p">}</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p><code>readbacks_mode: 2</code> is the <code>Precise</code> mode. Explaining what it does requires understanding how DriveClub implements auto-exposure, and that&rsquo;s where the journey starts. To know WHY this toggle fixes things, you have to understand the whole chain.</p>
<p>The short version: <strong>DriveClub implements auto-exposure as a GPU→CPU feedback loop</strong>.</p>
<ol>
<li>The scene renders to an HDR target.</li>
<li>A compute shader calculates a luminance histogram into an SSBO.</li>
<li>The CPU <strong>reads</strong> that SSBO on the next frame and derives a target exposure.</li>
<li>The CPU writes that exposure back into a 1936-byte lighting UBO (at slots <code>[38] [48] [50]</code>).</li>
<li>Fragment shaders read that UBO and multiply scene luminance by it.</li>
</ol>
<p>Without <code>readbacks_mode: Precise</code>, step 3 reads stale zeros. The memory page where the GPU wrote the histogram is never synchronized to the CPU side. The CPU exposure integrator concludes &ldquo;scene is dark, open the aperture all the way&rdquo; and ramps its output value monotonically: <code>2.59 → 7.84 → 24 → 90 → 179 → 255</code>. Within 60-90 seconds the scale saturates so high that everything clips to zero. That&rsquo;s the pitch black.</p>
<p>With <code>readbacks_mode: Precise</code> on, the emulator marks the pages the GPU just wrote as kernel-protected (via <code>mprotect</code> on Linux). When the CPU tries to read one of those pages for the first time, a page fault fires. The emulator intercepts it, issues a <code>vkCmdCopyBuffer</code> download from the GPU buffer to the host staging area, waits on the scheduler, and the CPU finally sees fresh data. The real histogram enters the integrator, exposure converges normally, and the race start opens bright as it should.</p>
<p>Why isn&rsquo;t it the default? Three documented reasons. First, per-page <code>mprotect</code> + per-fault GPU stall + compute dispatch + scheduler wait has a real cost: on NVIDIA&rsquo;s warm path it&rsquo;s tolerable, on AMD it tanks below 12 FPS, with an <a href="https://github.com/shadps4-emu/shadPS4/issues/3322"target="_blank" rel="noopener">open issue</a> about it. Second, <a href="https://github.com/shadps4-emu/shadPS4/issues/3826"target="_blank" rel="noopener">Bloodborne hangs</a> on loading screens with Precise enabled. Third, the maintainer tucked the option behind &ldquo;Advanced&rdquo; in the UI precisely to keep users with sensitive hardware from enabling it by mistake. The mode has existed since <code>v0.15.0</code> (September/2025), but <strong>nobody had publicly connected <code>Precise</code> + DriveClub + auto-exposure feedback loop</strong>. The <a href="https://github.com/shadps4-emu/shadPS4/issues/3346"target="_blank" rel="noopener">compat tracker already admits</a> that DriveClub &ldquo;requires readbacks enabled to function properly&rdquo;, but doesn&rsquo;t specify the mode.</p>
<p>In my setup the performance cost is irrelevant. I have an RTX 5090 on my desktop, plenty of hardware to swallow the mprotect, the page fault, the copy and the stall per frame. The call is trivial: I flip Precise on, pay the price, the game runs. On more modest hardware or on AMD the conversation is different, which is exactly why this setting isn&rsquo;t default and hides behind &ldquo;Advanced&rdquo;.</p>
<p>One thing I want to make clear: this whole explanation above (<code>Precise</code> vs <code>Relaxed</code> vs <code>Disabled</code>, GPU→CPU feedback loop, per-page mprotect syscall) is not knowledge I had on Sunday night. I didn&rsquo;t know what a buffer readback was, didn&rsquo;t know DriveClub implemented auto-exposure as a GPU→CPU feedback loop, didn&rsquo;t know <code>readbacks_mode</code> had become an enum in 2025 with three values. To arrive at the right answer, I had to learn every piece from scratch. I couldn&rsquo;t guess. Had I tried to &ldquo;enable readbacks&rdquo; last week without understanding the chain, I&rsquo;d have picked the wrong value (Relaxed isn&rsquo;t enough for this feedback loop, as I&rsquo;ll explain below) and given up thinking &ldquo;it doesn&rsquo;t work&rdquo;.</p>
<p>Two more things need to be in place for this to work, both covered in the <a href="/en/2026/04/19/retrogames-de-corrida-favoritos-no-distrobox/#driveclub-the-impossible-finally-possible">previous article</a>:</p>
<ul>
<li><strong>v1.28 patch applied</strong> on top of the v1.00 base install (without it, content stays locked with &ldquo;not yet released&rdquo;).</li>
<li><strong>60fps XML patch disabled</strong> (it raises the render rate but the logic tickrate is fixed; with it on, the game runs in slow motion).</li>
</ul>
<h2>The result<span class="hx:absolute hx:-mt-20" id="the-result"></span>
    <a href="#the-result" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><video
  controls
  preload="metadata"
  playsinline
  class="html5-video"
  style="width:100%; max-width:960px; display:block; margin:1.25em auto; border-radius:8px; background:#000;"
  >
  <source src="https://new-uploads-akitaonrails.s3.us-east-2.amazonaws.com/2026/04/videos/canada-fixed.mp4" type="video/mp4">
  Your browser does not support HTML5 video.
</video>

<p>Same race in Canada, night, with <code>readbacks_mode: 2</code> on. Race start opens bright, auto-exposure converges immediately, the night transition unfolds naturally as the game&rsquo;s TOD (time of day) advances. No blackout, no &ldquo;recalibration&rdquo; at 1:30, no 30-second window of absolute black. This is DriveClub running like it does on PS4.</p>
<p>Now the interesting question is not &ldquo;which setting&rdquo;. It&rsquo;s: <strong>how did we get here?</strong></p>
<h2>How does a junior learn today?<span class="hx:absolute hx:-mt-20" id="how-does-a-junior-learn-today"></span>
    <a href="#how-does-a-junior-learn-today" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>There&rsquo;s a question I hear often: &ldquo;with AI doing everything, how does a junior learn?&rdquo;</p>
<p>The premise is wrong. <strong>AI doesn&rsquo;t do everything.</strong> AI does what you ask it to. It doesn&rsquo;t discover on its own. It has no domain initiative. It&rsquo;s not capable of telling you &ldquo;hey, this looks like a broken GPU→CPU readback feedback loop&rdquo; unless you already know there&rsquo;s a thing called a readback and that broken feedback loops are a class of bug.</p>
<p>Worse: if you go to an AI agent today and ask &ldquo;fix this black screen in DriveClub on shadPS4&rdquo;, it will give you a list of possible answers based on old forum posts, with a high probability of steering you wrong. It will suggest the 60fps XML patch (wrong — causes slow motion). It will suggest a tonemap override (wrong — the game already writes correct SDR). It will suggest a vblank_frequency tweak (useless for the real problem). It will suggest manual gamma (treats the symptom, not the cause).</p>
<p>The way to discover is to <strong>dive into the chain</strong>, phase by phase, ruling out wrong hypotheses until the terrain is familiar enough that you recognize the right answer when it appears.</p>
<p>That&rsquo;s where a lot of people misread me. &ldquo;Akita is already a senior, he has 25+ years of experience, of course he knows.&rdquo; <strong>False.</strong> A senior is someone who has been a junior in every topic they master. And they keep becoming a junior every time they pick up a new domain. I have 25 years of web programming, distributed systems, Ruby, Erlang, Go. But <strong>I&rsquo;ve never programmed for PS4</strong>. I&rsquo;d never looked at the shadPS4 codebase. I didn&rsquo;t know PS4&rsquo;s graphics architecture. On Sunday I was an absolute junior in this domain.</p>
<p>But junior doesn&rsquo;t mean totally green. A while back I had explored on my YouTube channel the low-level architecture of older consoles (from the NES&rsquo;s 6502 onward) and how emulators work internally in general. The two videos below helped build the basic vocabulary for how a game console works under the hood, and made sure I wouldn&rsquo;t trip on concepts like fetch-decode-execute, opcode, interrupt, or HLE vs LLE.</p>


<div class="embed-container">
  <iframe
    src="https://www.youtube.com/embed/hYJ3dvHjeOE"
    title="YouTube video player"
    frameborder="0"
    allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
    referrerpolicy="strict-origin-when-cross-origin"
    allowfullscreen>
  </iframe>
</div>



<div class="embed-container">
  <iframe
    src="https://www.youtube.com/embed/vUqLLpUJ47s"
    title="YouTube video player"
    frameborder="0"
    allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
    referrerpolicy="strict-origin-when-cross-origin"
    allowfullscreen>
  </iframe>
</div>

<p>I had also made an older video on the evolution of CPUs, GPUs, DirectX, and Vulkan, so at least the vocabulary of &ldquo;modern graphics pipeline&rdquo; and &ldquo;shading language&rdquo; wasn&rsquo;t alien.</p>


<div class="embed-container">
  <iframe
    src="https://www.youtube.com/embed/JEp7ozWqIps"
    title="YouTube video player"
    frameborder="0"
    allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
    referrerpolicy="strict-origin-when-cross-origin"
    allowfullscreen>
  </iframe>
</div>

<p>Knowing that <code>VkCommandBuffer</code> exists is very different from knowing where in shadPS4 a readback <code>vkCmdCopyBuffer</code> fires. But it gives you a base. That kind of old curiosity paid interest now.</p>
<h2>The rotation: Claude Code and Codex<span class="hx:absolute hx:-mt-20" id="the-rotation-claude-code-and-codex"></span>
    <a href="#the-rotation-claude-code-and-codex" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>AI (in my case <a href="https://claude.com/claude-code"target="_blank" rel="noopener">Claude Code</a>) didn&rsquo;t &ldquo;know&rdquo; more than I did. It has the same dated forum text you&rsquo;d find on Reddit. What it did well was <strong>aggregate</strong>: read shadPS4 source code in parallel with me, index comments, cross-reference between phase docs, compile, run probes, parse 61 MB logs, compare decompiled binary against UBO diffs, shine light on corners of the system faster than I could alone.</p>
<p>But the decision to &ldquo;keep investigating&rdquo; was mine. The perseverance of &ldquo;don&rsquo;t accept a mitigation, want the root cause&rdquo; was mine. And when the AI suggested &ldquo;honestly, we should just accept the current result and document it&rdquo; (and it suggested this <strong>several times</strong> over the four days), I was the one who had to say &ldquo;no, we keep going&rdquo;.</p>
<p>The central point about the rotation: <strong>no single LLM managed to close this problem alone.</strong></p>
<p>Over the four days, Claude Code repeatedly got stuck looping on the same hypotheses with no new direction. When that happened, I&rsquo;d switch to Codex for a few hours to bring in outside ideas, different probes, a re-read of the codebase from a fresh angle. Then back to Claude Code to integrate what Codex had surfaced. And so on, alternating.</p>
<p>The final resolution happened on Claude Code, but the journey switched models several times. Each LLM had its biases and blind spots. Left alone, each one would have given up sooner.</p>
<p>What broke the impasse was me continuing to bring in new ideas to try, forcing the model to reassess, switching models whenever one started to repeat itself.</p>
<p>At two points things went past &ldquo;just repeating hypotheses&rdquo;. Codex literally had an agentic-loop glitch: it started repeating the exact same &ldquo;solution&rdquo; it had just tried, over and over, in sequence, without noticing what it was doing. It was the first time I&rsquo;d ever seen that happen in any AI agent. I had to kill the session and start a fresh one from zero to break the cycle.</p>
<p>That says something about context size and session duration. The complexity and pace of this investigation were enough to bring both LLMs to their knees, each in their own way.</p>
<p>The whole journey below is documented in 33 phase docs on the <a href="https://github.com/akitaonrails/shadPS4/tree/gamma-debug/docs/driveclub-investigation"target="_blank" rel="noopener"><code>gamma-debug</code> branch of my shadPS4 fork</a>. Each section here links to the original doc for anyone who wants the complete detail. Here I summarize the essentials: the hypothesis we had, what we tried, what new concept we had to learn, and why the phase didn&rsquo;t close the case.</p>
<h2>Session zero: baseline and reproducibility<span class="hx:absolute hx:-mt-20" id="session-zero-baseline-and-reproducibility"></span>
    <a href="#session-zero-baseline-and-reproducibility" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>Every serious investigation starts before Phase 1. The first thing, for any project, is to make sure the <strong>baseline works as expected</strong> and that the situation you want to research is <strong>reproducible every time</strong>. If you can&rsquo;t reproduce the bug on demand, you&rsquo;re chasing ghosts. Every probe after that will be inconclusive because the bug &ldquo;appeared and vanished&rdquo; without control. And if the baseline is broken in some way you haven&rsquo;t noticed, every experiment measures the wrong problem. Without those two guarantees, you can&rsquo;t make progress.</p>
<p>In my case, on Sunday night I confirmed:</p>
<ul>
<li>The game boots all the way to the race screen without crashing, using the <a href="https://github.com/akitaonrails/distrobox-gaming/blob/master/docs/driveclub-shadps4.md"target="_blank" rel="noopener"><code>distrobox-gaming</code></a> config.</li>
<li><a href="https://github.com/Nenkai/DriveClubFS"target="_blank" rel="noopener">DriveClubFS</a> extracts v1.28 cleanly, 8018 files, ~47 GB.</li>
<li>MSAA depth resolve applied on the fork; night tracks render shapes instead of uniform absolute black (covered in the <a href="/en/2026/04/19/retrogames-de-corrida-favoritos-no-distrobox/">previous article</a>).</li>
<li>8BitDo controller detected.</li>
<li>Night race in India 19:30 <strong>reproduces the blackout on 100% of attempts</strong>, with the same temporal pattern: progressive fade in the first ~15s, pitch black between ~20s and ~90s, &ldquo;recalibration&rdquo; at 1:30.</li>
</ul>
<p>That baseline is the only solid ground that lets me compare each experiment reliably. Without it, a probe that &ldquo;worked&rdquo; might just be a different cache state, not the real fix. With it, every change has a before and an after that are measurable.</p>
<p>Beyond that, zero specific knowledge of:</p>
<ul>
<li>PS4 PKG format (PFS, param.sfo, disc_info, keystone).</li>
<li>shadPS4 codebase (src/core, src/video_core, shader_recompiler, buffer_cache).</li>
<li>PS4 graphics pipeline (GCN ISA, forward+ lighting, MSAA depth resolve).</li>
<li>Vulkan beyond the surface (descriptor sets, UBO binding, push constants, pipeline cache).</li>
<li>SPIR-V disassembly and patching.</li>
<li>PS4 OELF loader, Itanium RTTI, SCE dynamic relocations.</li>
<li>mprotect-based page-fault tracking for CPU-GPU synchronization.</li>
</ul>
<h2>The journey, phase by phase<span class="hx:absolute hx:-mt-20" id="the-journey-phase-by-phase"></span>
    <a href="#the-journey-phase-by-phase" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>I&rsquo;ll group the 30+ phases into buckets that make sense as a narrative. Each phase links to the full doc for anyone who wants technical detail.</p>
<blockquote>
  <p><strong>Note for anyone who doesn&rsquo;t want to read all 30+ phases:</strong> after the phase sequence there are reflection and methodology sections you can read on their own. <a href="#the-shotgun-technique">The shotgun technique</a> explains the debugging methodology I used throughout the investigation. <a href="#what-i-knew-on-sunday-vs-thursday">What I knew on Sunday vs Thursday</a> sums up what I actually learned. <a href="#the-ai-suggested-accepting-the-perseverance-was-mine">The AI suggested accepting. The perseverance was mine</a> discusses AI&rsquo;s real role in this process. <a href="#the-real-cost-of-this-journey">The real cost of this journey</a> catalogs what got produced. If you want to jump straight to the argument, those are the shortcuts.</p>

</blockquote>
<h3>Phase 01: pipeline cache, the warm-up<span class="hx:absolute hx:-mt-20" id="phase-01-pipeline-cache-the-warm-up"></span>
    <a href="#phase-01-pipeline-cache-the-warm-up" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><blockquote>
  <p><a href="https://github.com/akitaonrails/shadPS4/blob/gamma-debug/docs/driveclub-investigation/phase-01-shader-compile-stalls.md"target="_blank" rel="noopener"><code>phase-01-shader-compile-stalls.md</code></a></p>

</blockquote>
<ul>
<li><strong>Hypothesis:</strong> menus run at 2-3 fps on first launch. Must be Vulkan pipeline compilation happening in real time.</li>
<li><strong>Action:</strong> enable <code>pipeline_cache_enabled: true</code> in the global config.</li>
<li><strong>New concept:</strong> Vulkan pipeline caching. When the emulator translates a PS4 GCN shader into SPIR-V and then into driver-specific Vulkan binary, it can cache that binary. Without the cache, it recompiles every cold launch (~864 shaders + ~590 pipelines).</li>
<li><strong>Outcome:</strong> solved. First session pays the cost; subsequent sessions read from disk and launch immediately. Easy. Also my first lesson about the shadPS4 codebase.</li>
</ul>
<h3>Phase 02: gamma dim, starting in the wrong direction<span class="hx:absolute hx:-mt-20" id="phase-02-gamma-dim-starting-in-the-wrong-direction"></span>
    <a href="#phase-02-gamma-dim-starting-in-the-wrong-direction" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><blockquote>
  <p><a href="https://github.com/akitaonrails/shadPS4/blob/gamma-debug/docs/driveclub-investigation/phase-02-gamma-dim-image.md"target="_blank" rel="noopener"><code>phase-02-gamma-dim-image.md</code></a></p>

</blockquote>
<ul>
<li><strong>Hypothesis:</strong> DriveClub&rsquo;s image is dim compared to reference. Must be wrong sRGB encoding or an HDR tonemap applied badly by the emulator.</li>
<li><strong>Action:</strong> instrumented the swapchain to log format, added <code>SHADPS4_PP_*</code> env vars to experiment, built a post-processing pipeline with three knobs (exposure, ACES tonemap, gamma curve).</li>
<li><strong>New concept:</strong> sRGB OETF, HDR tonemap (ACES vs Reinhard), Bayer dither as anti-banding.</li>
<li><strong>Outcome:</strong> via bypass path (<code>SHADPS4_PP_BYPASS=1</code>, writes raw game output with no post-processing) I discovered the <strong>game writes correct SDR already</strong> into the framebuffer. The emulator&rsquo;s post-processing pipeline was mangling the signal. Final shader became simply sRGB encode + Bayer dither. Dim persists, but it&rsquo;s not a gamma problem.</li>
</ul>
<p><img src="https://new-uploads-akitaonrails.s3.us-east-2.amazonaws.com/2026/04/23/driveclub-learning/wrong-gamma.png" alt="Gamma adjustments going wrong everywhere"  loading="lazy" /></p>
<p><img src="https://new-uploads-akitaonrails.s3.us-east-2.amazonaws.com/2026/04/23/driveclub-learning/wrong-gamma-blown.png" alt="Blown out: gamma too high"  loading="lazy" /></p>
<p><img src="https://new-uploads-akitaonrails.s3.us-east-2.amazonaws.com/2026/04/23/driveclub-learning/wrong-gamma-sky-dark.png" alt="Dark sky: gamma too low"  loading="lazy" /></p>
<p>Three hours on this phase. The most important lesson: <strong>when &ldquo;the image looks wrong&rdquo;, the first diagnostic should be a bypass path that shows raw game output</strong>. If bypass looks right, the emulator is the one mangling the signal. Stop touching the tonemap.</p>
<h3>Phase 03: v1.28 content access<span class="hx:absolute hx:-mt-20" id="phase-03-v128-content-access"></span>
    <a href="#phase-03-v128-content-access" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><blockquote>
  <p><a href="https://github.com/akitaonrails/shadPS4/blob/gamma-debug/docs/driveclub-investigation/phase-03-v128-content-access.md"target="_blank" rel="noopener"><code>phase-03-v128-content-access.md</code></a></p>

</blockquote>
<ul>
<li><strong>Hypothesis:</strong> v1.28 extracts, but the game says &ldquo;content not released yet, download required&rdquo;.</li>
<li><strong>Action:</strong> merge v1.28 on top of v1.00, restore <code>param.sfo</code>, <code>disc_info.dat</code>, <code>keystone</code>.</li>
<li><strong>New concept:</strong> PS4 cumulative patches, package metadata.</li>
<li><strong>Outcome:</strong> solved. Detailed in the <a href="/en/2026/04/19/retrogames-de-corrida-favoritos-no-distrobox/">previous article</a>.</li>
</ul>
<h3>Phase 04: MSAA depth + slow motion<span class="hx:absolute hx:-mt-20" id="phase-04-msaa-depth--slow-motion"></span>
    <a href="#phase-04-msaa-depth--slow-motion" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><blockquote>
  <p><a href="https://github.com/akitaonrails/shadPS4/blob/gamma-debug/docs/driveclub-investigation/phase-04-slowness.md"target="_blank" rel="noopener"><code>phase-04-slowness.md</code></a></p>

</blockquote>
<ul>
<li><strong>Hypothesis:</strong> night tracks are pitch black and the game &ldquo;feels slow&rdquo;.</li>
<li><strong>Action:</strong> two separate things. Disable the 60fps XML patch (which was decoupling render rate from logic tickrate). Implement <code>ReinterpretMsDepthAsColor</code> on my fork (to let the emulator resolve 4x MSAA depth to 1-sample color, which DriveClub needs for forward+ lighting on night tracks).</li>
<li><strong>New concept:</strong> forward+ lighting (a renderer that writes the scene to an MSAA depth target and then reads it as color for SSAO and volumetrics), MSAA depth resolve.</li>
<li><strong>Outcome:</strong> both fixed. Detailed in the <a href="/en/2026/04/19/retrogames-de-corrida-favoritos-no-distrobox/">previous article</a>.</li>
</ul>
<h3>Phase 05: second pass on brightness<span class="hx:absolute hx:-mt-20" id="phase-05-second-pass-on-brightness"></span>
    <a href="#phase-05-second-pass-on-brightness" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><blockquote>
  <p><a href="https://github.com/akitaonrails/shadPS4/blob/gamma-debug/docs/driveclub-investigation/phase-05-brightness-followup.md"target="_blank" rel="noopener"><code>phase-05-brightness-followup.md</code></a></p>

</blockquote>
<ul>
<li><strong>Hypothesis:</strong> since the game writes correct SDR, maybe a static boost in post-processing helps without touching the UBO feedback loop.</li>
<li><strong>Action:</strong> tried linear boost (1.5x, 2.0x), gamma pre-encode (pow curve), scene-aware auto-exposure with peak+mean sampling.</li>
<li><strong>Outcome:</strong> all rolled back. Linear boost clips highlights. Gamma introduces banding. My auto-exposure layer cancels the user&rsquo;s manual brightness slider. There&rsquo;s no free lunch in post-processing. Dim stays dim without real HDR or shader patches.</li>
</ul>
<p><img src="https://new-uploads-akitaonrails.s3.us-east-2.amazonaws.com/2026/04/23/driveclub-learning/wrong-gamma-sky-dark.png" alt="Sky too dark"  loading="lazy" /></p>
<h3>Narrowing the blackout: the shared gate<span class="hx:absolute hx:-mt-20" id="narrowing-the-blackout-the-shared-gate"></span>
    <a href="#narrowing-the-blackout-the-shared-gate" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><blockquote>
  <p><a href="https://github.com/akitaonrails/shadPS4/blob/gamma-debug/docs/driveclub-investigation/race-start-blackout-040420.md"target="_blank" rel="noopener"><code>race-start-blackout-040420.md</code></a></p>

</blockquote>
<ul>
<li><strong>Hypothesis:</strong> the blackout has a curious signature. Main view goes dim/black, rearview mirror goes absolute black, HUD stays bright. Three layers with different behaviors suggest a shared &ldquo;gate&rdquo;, not a common fade.</li>
<li><strong>Action:</strong> instrumented texture-cache aliasing, probed with live fragment shader substitution on suspected inputs.</li>
<li><strong>New concept:</strong> texture-cache aliasing (multiple images sharing a memory address, which the emulator cache reuses), render-target lifetime.</li>
<li><strong>Outcome:</strong> points to a shared &ldquo;presentation permission&rdquo; between the main scene and the mirror, not a scripted fade.</li>
</ul>
<p><img src="https://new-uploads-akitaonrails.s3.us-east-2.amazonaws.com/2026/04/23/driveclub-learning/screenshot-2026-04-20_21-22-45.png" alt="Blackout baseline"  loading="lazy" /></p>
<h3>Phases 07-09: texture torture, UI surgery, binary patch plan<span class="hx:absolute hx:-mt-20" id="phases-07-09-texture-torture-ui-surgery-binary-patch-plan"></span>
    <a href="#phases-07-09-texture-torture-ui-surgery-binary-patch-plan" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><blockquote>
  <p><a href="https://github.com/akitaonrails/shadPS4/blob/gamma-debug/docs/driveclub-investigation/phase-07-aggressive-torture-probe.md"target="_blank" rel="noopener"><code>phase-07-aggressive-torture-probe.md</code></a> · <a href="https://github.com/akitaonrails/shadPS4/blob/gamma-debug/docs/driveclub-investigation/phase-08-ui-asset-surgery.md"target="_blank" rel="noopener"><code>phase-08-ui-asset-surgery.md</code></a> · <a href="https://github.com/akitaonrails/shadPS4/blob/gamma-debug/docs/driveclub-investigation/phase-09-eboot-binary-patch-plan.md"target="_blank" rel="noopener"><code>phase-09-eboot-binary-patch-plan.md</code></a></p>

</blockquote>
<ul>
<li><strong>Hypothesis:</strong> the race-start dim overlay is an asset. Small texture, UI panel, or a method of the <code>FreeplayGetInCar</code> controller in the eboot.</li>
<li><strong>Action:</strong> null-substituted BC-compressed materials, small texture candidates, four-vector weight masks during critical draws. Disabled UI panels (<code>loading_freeplay.txt</code>, <code>get_in_car_animation.txt</code>, <code>vehicle_select_background</code>). Extracted the OELF, located <code>FreeplayGetInCar</code> ASCII strings, identified the constructor at VA 0xf89b00 and the vtable at 0x15dc3e0.</li>
<li><strong>New concept:</strong> PS4 OELF loader (Sony&rsquo;s variant of ELF), Itanium C++ RTTI (how C++ encodes type info in vtables), SCE dynamic relocations (placeholders that only the dynamic loader resolves at runtime).</li>
<li><strong>Outcome:</strong> nulls work but the fade persists. The overlay renders directly into HDR scene targets, not through the panel system. Binary patching has relocation placeholders that aren&rsquo;t statically resolvable without a Ghidra + PS4 plugin. <strong>Asset-side surface exhausted.</strong> Six hours of debugging, final conclusion: the bug lives in state, not in an asset.</li>
</ul>
<h3>Phase 10: rethink + animlib<span class="hx:absolute hx:-mt-20" id="phase-10-rethink--animlib"></span>
    <a href="#phase-10-rethink--animlib" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><blockquote>
  <p><a href="https://github.com/akitaonrails/shadPS4/blob/gamma-debug/docs/driveclub-investigation/phase-10a-rethink-040422.md"target="_blank" rel="noopener"><code>phase-10a-rethink-040422.md</code></a> · <a href="https://github.com/akitaonrails/shadPS4/blob/gamma-debug/docs/driveclub-investigation/phase-10b-video-diagnostic-animlib.md"target="_blank" rel="noopener"><code>phase-10b-video-diagnostic-animlib.md</code></a></p>

</blockquote>
<p>Tuesday morning. Sat down, rebooted mentally. New model: the blackout is a <strong>state-machine gate</strong>. It&rsquo;s not &ldquo;scene not ready&rdquo;, it&rsquo;s &ldquo;permission transition&rdquo;. The gate closes after the starting grid appears. Next probe: runtime dispatch trace, enough of the blind asset surgery.</p>
<p>In parallel: frame extraction from the recording at 10 Hz, cross-referenced against keyframes of the animation library (<code>animlib</code>) in <code>india_posteffects.lvl</code>. Found a smoking gun. The <code>MasterBrightness</code> track has keyframes 0.003 and 0.0007 (0.63% brightness) where the default would be 1.0. Animlib beats inline defaults every frame.</p>
<ul>
<li><strong>New concept:</strong> animation library, keyframe encoding, binary float-scanning.</li>
</ul>
<video
  controls
  preload="metadata"
  playsinline
  class="html5-video"
  style="width:100%; max-width:960px; display:block; margin:1.25em auto; border-radius:8px; background:#000;"
  >
  <source src="https://new-uploads-akitaonrails.s3.us-east-2.amazonaws.com/2026/04/videos/debugging-blackout-fade.mp4" type="video/mp4">
  Your browser does not support HTML5 video.
</video>

<p>Video above: the process of probing the fade in real time.</p>
<h3>Phase 11: multi-scalar patch<span class="hx:absolute hx:-mt-20" id="phase-11-multi-scalar-patch"></span>
    <a href="#phase-11-multi-scalar-patch" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><blockquote>
  <p><a href="https://github.com/akitaonrails/shadPS4/blob/gamma-debug/docs/driveclub-investigation/phase-11-multi-scalar-patch.md"target="_blank" rel="noopener"><code>phase-11-multi-scalar-patch.md</code></a></p>

</blockquote>
<ul>
<li><strong>Hypothesis:</strong> patching <code>MasterBrightness</code> + <code>AutoTargetLuminance</code> + <code>ManualAutoMix</code> simultaneously will lift the blackout.</li>
<li><strong>Action:</strong> extended <code>PatchAnimlibFloatValues</code> to rewrite three scalars. Instrumented with <code>SHADPS4_DC_DRAWLOG</code> + <code>SHADPS4_DC_UBOLOG</code>.</li>
<li><strong>Outcome:</strong> the patch produces a real <strong>numeric</strong> lift (1.2 → 6.5 in 255, a 5×), but still sub-perceptual black. And the crucial finding: the mirror works normally after the patch. It&rsquo;s not gated, just reflecting a dark scene. <strong>At least 285× of additional attenuation lives downstream of the scalars we can patch.</strong></li>
</ul>
<h3>Phase 12: bisect closes the asset side<span class="hx:absolute hx:-mt-20" id="phase-12-bisect-closes-the-asset-side"></span>
    <a href="#phase-12-bisect-closes-the-asset-side" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><blockquote>
  <p><a href="https://github.com/akitaonrails/shadPS4/blob/gamma-debug/docs/driveclub-investigation/phase-12-bisect-closes-asset-side.md"target="_blank" rel="noopener"><code>phase-12-bisect-closes-asset-side.md</code></a></p>

</blockquote>
<ul>
<li><strong>Hypothesis:</strong> one of the 60 accumulated patches broke the mirror independently from the blackout. Bisect.</li>
<li><strong>Action:</strong> binary bisect across 60 overlay files over 5 rounds.</li>
<li><strong>Outcome:</strong> <code>x_live_lobby_pre_race.txt</code> (rerouting loading-spinner transition from <code>ZoomInAndFade</code> to <code>NoFade</code>) was the mirror killer. Rolled back. <strong>Asset side completely closed.</strong> The driver lives in compiled code or post-process state, not in a game asset.</li>
</ul>
<h3>Asset sweeps 01-09 (consolidated)<span class="hx:absolute hx:-mt-20" id="asset-sweeps-01-09-consolidated"></span>
    <a href="#asset-sweeps-01-09-consolidated" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><blockquote>
  <p><a href="https://github.com/akitaonrails/shadPS4/blob/gamma-debug/docs/driveclub-investigation/asset-sweep-09-conclusions.md"target="_blank" rel="noopener"><code>asset-sweep-09-conclusions.md</code></a></p>

</blockquote>
<p>In parallel with the phases above, I swept 12 RPK substitutions: <code>FreeplayGetInCar</code> page swaps, postfx edits in <code>india_landscape_gui.rpk</code>, <code>globaldata</code> RTT-only edits, prerace state-string rewrites. <strong>All clean misses.</strong> No asset family touches the blackout. Lesson: <strong>stop chasing by names; chase by state transitions.</strong></p>
<h3>Phase 13: UBO dump breakthrough<span class="hx:absolute hx:-mt-20" id="phase-13-ubo-dump-breakthrough"></span>
    <a href="#phase-13-ubo-dump-breakthrough" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><blockquote>
  <p><a href="https://github.com/akitaonrails/shadPS4/blob/gamma-debug/docs/driveclub-investigation/phase-13-ubo-dump-breakthrough.md"target="_blank" rel="noopener"><code>phase-13-ubo-dump-breakthrough.md</code></a></p>

</blockquote>
<ul>
<li><strong>Hypothesis:</strong> eye-adaptation feedback loop with stale input is the culprit. A luminance scalar growing without converging.</li>
<li><strong>Action:</strong> dump 128 bytes of UBO in hex during the race window across six hand-picked pipelines. Look for monotonically changing values.</li>
<li><strong>New concept:</strong> <strong>UBO (Uniform Buffer Object)</strong>, a shared memory region the CPU writes and shaders read. <strong>Auto-exposure integrator</strong>, a classic eye-adaptation component that takes time to converge toward a target.</li>
<li><strong>Outcome:</strong> found it. <strong>UBO offset 3 climbs monotonically from 2.59 → 7.84 → 24 → 90 → 179 → 255</strong> over 2 seconds. Textbook feedback loop with broken input. First real hit in 12 phases.</li>
</ul>
<h3>Phase 14: scene-pipeline UBOs are the read side<span class="hx:absolute hx:-mt-20" id="phase-14-scene-pipeline-ubos-are-the-read-side"></span>
    <a href="#phase-14-scene-pipeline-ubos-are-the-read-side" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><blockquote>
  <p><a href="https://github.com/akitaonrails/shadPS4/blob/gamma-debug/docs/driveclub-investigation/phase-14-scene-pipeline-ubos-wrong.md"target="_blank" rel="noopener"><code>phase-14-scene-pipeline-ubos-wrong.md</code></a></p>

</blockquote>
<ul>
<li><strong>Hypothesis:</strong> clamping the climbing scalar will stop the blackout.</li>
<li><strong>Action:</strong> <code>SHADPS4_DC_LUM_CLAMP=2.0</code> forces offset 3 to a fixed value during the race window.</li>
<li><strong>Outcome:</strong> the clamp fires 1093 times, blackout unchanged. Scene-pipeline UBOs <strong>consume</strong> the dim, they don&rsquo;t produce it. The dim is upstream, in a fullscreen tonemap or post-fx compute.</li>
</ul>
<h3>Phases 15-16: runtime texture dump + mutation<span class="hx:absolute hx:-mt-20" id="phases-15-16-runtime-texture-dump--mutation"></span>
    <a href="#phases-15-16-runtime-texture-dump--mutation" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><blockquote>
  <p><a href="https://github.com/akitaonrails/shadPS4/blob/gamma-debug/docs/driveclub-investigation/phase-15-runtime-texture-dump.md"target="_blank" rel="noopener"><code>phase-15-runtime-texture-dump.md</code></a> · <a href="https://github.com/akitaonrails/shadPS4/blob/gamma-debug/docs/driveclub-investigation/phase-16-runtime-texture-mutation.md"target="_blank" rel="noopener"><code>phase-16-runtime-texture-mutation.md</code></a></p>

</blockquote>
<ul>
<li><strong>Hypothesis:</strong> the blackout is a fullscreen texture composited over the scene.</li>
<li><strong>Action:</strong> <code>SHADPS4_DC_TEX_DUMP=1</code> dumps every bound texture during the race window (1079 textures captured). Convert tiled format to PNG for visual triage. Then, deterministically mutate each texture via hash-based tint + <code>InvalidateMemory</code> to force re-upload.</li>
<li><strong>New concept:</strong> <strong>GCN tile format</strong> (Sony interleaves bytes a specific way for cache locality), texture de-swizzle, buffer cache invalidation.</li>
<li><strong>Outcome:</strong> 14 rounds of mutation (BC textures, float data, render targets, UI atlases, post-fx buffers, LUTs). Blackout <strong>unchanged across all of them</strong>. Texture content 100% ruled out as the source.</li>
</ul>
<p><img src="https://new-uploads-akitaonrails.s3.us-east-2.amazonaws.com/2026/04/23/driveclub-learning/blue-ish-overlay.png" alt="Blue overlay during mutation"  loading="lazy" /></p>
<p><img src="https://new-uploads-akitaonrails.s3.us-east-2.amazonaws.com/2026/04/23/driveclub-learning/green-ish-overlay.png" alt="Green overlay during mutation"  loading="lazy" /></p>
<p><img src="https://new-uploads-akitaonrails.s3.us-east-2.amazonaws.com/2026/04/23/driveclub-learning/reflections-glitching-blown.png" alt="Reflections glitched"  loading="lazy" /></p>
<p><img src="https://new-uploads-akitaonrails.s3.us-east-2.amazonaws.com/2026/04/23/driveclub-learning/reflections-glitched-blown-white.png" alt="Reflections blown white"  loading="lazy" /></p>
<h3>Phases 17-19: UBO smashing, push-constant smashing, compute dispatch probe<span class="hx:absolute hx:-mt-20" id="phases-17-19-ubo-smashing-push-constant-smashing-compute-dispatch-probe"></span>
    <a href="#phases-17-19-ubo-smashing-push-constant-smashing-compute-dispatch-probe" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><blockquote>
  <p><a href="https://github.com/akitaonrails/shadPS4/blob/gamma-debug/docs/driveclub-investigation/phase-17-ubo-batch-smashing.md"target="_blank" rel="noopener"><code>phase-17-ubo-batch-smashing.md</code></a> · <a href="https://github.com/akitaonrails/shadPS4/blob/gamma-debug/docs/driveclub-investigation/phase-18-push-constant-smashing.md"target="_blank" rel="noopener"><code>phase-18-push-constant-smashing.md</code></a> · <a href="https://github.com/akitaonrails/shadPS4/blob/gamma-debug/docs/driveclub-investigation/phase-19-compute-dispatch-probe.md"target="_blank" rel="noopener"><code>phase-19-compute-dispatch-probe.md</code></a></p>

</blockquote>
<ul>
<li><strong>Hypothesis:</strong> random-fill on UBOs, push constants, and compute input buffers can bracket and isolate the dim field without crashing.</li>
<li><strong>Action:</strong> <code>SHADPS4_DC_UBO_SMASH=1</code>, <code>SHADPS4_DC_PC_SMASH=1</code>, <code>SHADPS4_DC_DISPATCH_SMASH=1</code> with cb-index and size filters.</li>
<li><strong>New concept:</strong> <strong>push constants</strong> (128 bytes of fast params the driver pushes straight into the pipeline, no descriptor), <strong>compute dispatches</strong> (fires compute shaders with a grid of threads), <strong>ud_regs</strong> (GCN user data registers — how shadPS4 maps user data to push constants).</li>
<li><strong>Outcome:</strong> safe brackets produce overlay bokeh + blinks, but the dim stays put. Wide brackets that reach the dim also hit matrices/transforms and crash. <strong>Random-fill is the wrong instrument.</strong> Needs diff methodology.</li>
</ul>
<p><img src="https://new-uploads-akitaonrails.s3.us-east-2.amazonaws.com/2026/04/23/driveclub-learning/all-bege.png" alt="Everything beige after smash"  loading="lazy" /></p>
<p><img src="https://new-uploads-akitaonrails.s3.us-east-2.amazonaws.com/2026/04/23/driveclub-learning/all-green.png" alt="Everything green"  loading="lazy" /></p>
<p><img src="https://new-uploads-akitaonrails.s3.us-east-2.amazonaws.com/2026/04/23/driveclub-learning/all-cyan.png" alt="Everything cyan"  loading="lazy" /></p>
<h3>Phase 19b-c: dim-vs-lift dispatch diff<span class="hx:absolute hx:-mt-20" id="phase-19b-c-dim-vs-lift-dispatch-diff"></span>
    <a href="#phase-19b-c-dim-vs-lift-dispatch-diff" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><blockquote>
  <p><a href="https://github.com/akitaonrails/shadPS4/blob/gamma-debug/docs/driveclub-investigation/phase-19b-dim-vs-lift-diff.md"target="_blank" rel="noopener"><code>phase-19b-dim-vs-lift-diff.md</code></a> · <a href="https://github.com/akitaonrails/shadPS4/blob/gamma-debug/docs/driveclub-investigation/phase-19c-dispatch-draw-skip-null.md"target="_blank" rel="noopener"><code>phase-19c-dispatch-draw-skip-null.md</code></a></p>

</blockquote>
<ul>
<li><strong>Hypothesis:</strong> compute dispatches that only fire during dim (and stop once it lifts) are part of the chain.</li>
<li><strong>Action:</strong> split the clean log into pre / dim / bright windows (via user wall-clock), count dispatch frequency per pipeline.</li>
<li><strong>Outcome:</strong> identified <strong>8 compute pipelines</strong> (histogram 256→downsamples, tile-grid reductions, auto-exposure 1x1 scalars) that stop exactly when dim lifts. Shapes strongly suggest the eye-adaptation chain. <strong>First genuine diagnostic hit.</strong> Skip test on those 8 + 101 correlated draws: blackout <strong>unchanged</strong>. They&rsquo;re <strong>downstream effects</strong>, not drivers.</li>
</ul>
<h3>Phase 20-21: tonemap inline, fragment → flip buffer<span class="hx:absolute hx:-mt-20" id="phase-20-21-tonemap-inline-fragment--flip-buffer"></span>
    <a href="#phase-20-21-tonemap-inline-fragment--flip-buffer" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><blockquote>
  <p><a href="https://github.com/akitaonrails/shadPS4/blob/gamma-debug/docs/driveclub-investigation/phase-20-shader-dump-tonemap-inline.md"target="_blank" rel="noopener"><code>phase-20-shader-dump-tonemap-inline.md</code></a> · <a href="https://github.com/akitaonrails/shadPS4/blob/gamma-debug/docs/driveclub-investigation/phase-21-fragment-to-flip-buffer.md"target="_blank" rel="noopener"><code>phase-21-fragment-to-flip-buffer.md</code></a></p>

</blockquote>
<ul>
<li><strong>Hypothesis:</strong> the auto-exposure compute shader is broken, or the tonemap compute has the wrong math.</li>
<li><strong>Action:</strong> recompile all shaders, dump SPIR-V, disassemble the histogram auto-exposure. Patch its output to constant 1.0 and test.</li>
<li><strong>New concept:</strong> <strong>SPIR-V disassembly</strong> (Khronos intermediate format with readable assembly). <strong>Compute shader verification.</strong> Later, <strong>pipeline-to-shader mapping</strong>.</li>
<li><strong>Outcome:</strong> patch <strong>has no effect</strong>. Discovery: <strong>DriveClub has no separate tonemap pass</strong>. Scene geometry writes directly to the flip buffer, with exposure inline in material shaders. Each material shader bakes the dim scalar from a shared UBO. Pipeline cache wipe + <code>SHADPS4_DC_PIPEMAP=1</code> dumps every pipeline→shader mapping. Filtering drawlog for pipelines writing to <code>0x5000900000</code> / <code>0x5000108000</code> (the actual swapchain buffers) yields <strong>14 unique pipelines</strong>. None with Exp2/Log2 tonemap ops. Exposure is applied upstream.</li>
</ul>
<h3>Phase 22: tonemap compute identified<span class="hx:absolute hx:-mt-20" id="phase-22-tonemap-compute-identified"></span>
    <a href="#phase-22-tonemap-compute-identified" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><blockquote>
  <p><a href="https://github.com/akitaonrails/shadPS4/blob/gamma-debug/docs/driveclub-investigation/phase-22-tonemap-compute-identified.md"target="_blank" rel="noopener"><code>phase-22-tonemap-compute-identified.md</code></a></p>

</blockquote>
<ul>
<li><strong>Hypothesis:</strong> among the game&rsquo;s 510 compute shaders, one has a tonemap signature (many Exp2/Log2).</li>
<li><strong>Action:</strong> automated scan, cross-reference with dispatchlog.</li>
<li><strong>Outcome:</strong> <strong><code>cs_0x2c918c06</code></strong> is the strong candidate, with 8 Exp2 + 8 Log2, 5 SSBOs (scene params, TAA, bloom, camera, exposure), 11 images. Skip test on that specific pipeline: <strong>stops the blackout cycle</strong>, removes color grading, introduces temporal ghosting. <strong>That&rsquo;s the final scene→swapchain tonemap path.</strong></li>
</ul>
<p><img src="https://new-uploads-akitaonrails.s3.us-east-2.amazonaws.com/2026/04/23/driveclub-learning/temporal-glitching.png" alt="Temporal ghosting after skip"  loading="lazy" /></p>
<h3>Phase 22+: tonemap patches → playable<span class="hx:absolute hx:-mt-20" id="phase-22-tonemap-patches--playable"></span>
    <a href="#phase-22-tonemap-patches--playable" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><blockquote>
  <p><a href="https://github.com/akitaonrails/shadPS4/blob/gamma-debug/docs/driveclub-investigation/phase-22plus-tonemap-compute-patches.md"target="_blank" rel="noopener"><code>phase-22plus-tonemap-compute-patches.md</code></a></p>

</blockquote>
<ul>
<li><strong>Hypothesis:</strong> two surgical SPIR-V edits (histogram no-op + tonemap exposure clamp/boost) make the game playable.</li>
<li><strong>Action:</strong> histogram patch to never update; tonemap patch to clamp exposure floor at 0.5 and boost blend by ×10. Both via SPIR-V patching + <code>shader/patch/</code> drop-in.</li>
<li><strong>Outcome:</strong> <strong>playable!</strong> Dim shrinks from pitch black to mild. A <strong>real mitigation, not a root-cause fix.</strong> The fade curve still drags exposure, and each track needs per-threshold tuning.</li>
</ul>
<p><img src="https://new-uploads-akitaonrails.s3.us-east-2.amazonaws.com/2026/04/23/driveclub-learning/blown-just-track-lights.png" alt="Track lights blowing out after ×10 boost"  loading="lazy" /></p>
<video
  controls
  preload="metadata"
  playsinline
  class="html5-video"
  style="width:100%; max-width:960px; display:block; margin:1.25em auto; border-radius:8px; background:#000;"
  >
  <source src="https://new-uploads-akitaonrails.s3.us-east-2.amazonaws.com/2026/04/videos/india-gamma-correction-attempt.mp4" type="video/mp4">
  Your browser does not support HTML5 video.
</video>

<p>Here the AI suggested stopping for the first time. <strong>&ldquo;The game is playable, this is a decent mitigation, we should document and accept.&rdquo;</strong> I pushed back: &ldquo;it&rsquo;s playable but it&rsquo;s wrong. Don&rsquo;t accept. We keep going.&rdquo;</p>
<h3>Phase 23: CPU-side exposure intercept<span class="hx:absolute hx:-mt-20" id="phase-23-cpu-side-exposure-intercept"></span>
    <a href="#phase-23-cpu-side-exposure-intercept" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><blockquote>
  <p><a href="https://github.com/akitaonrails/shadPS4/blob/gamma-debug/docs/driveclub-investigation/phase-23-cpu-exposure-intercept.md"target="_blank" rel="noopener"><code>phase-23-cpu-exposure-intercept.md</code></a></p>

</blockquote>
<ul>
<li><strong>Hypothesis:</strong> clamping the exposure scalar at the tonemap compute&rsquo;s <code>BindBuffers</code> point prevents over-dimming.</li>
<li><strong>Action:</strong> <code>SHADPS4_DC_EXPOSURE_PIN=1</code> intercepts <code>BindBuffers</code>, overwrites exposure offsets with a clamp-min threshold, invalidates buffer_cache.</li>
<li><strong>New concept:</strong> <strong>CPU-GPU buffer binding</strong> (the moment when the CPU hands a descriptor to the GPU). <strong>Buffer cache invalidation</strong> (how the emulator keeps consistency between a buffer&rsquo;s CPU-side and GPU-side state).</li>
<li><strong>Outcome:</strong> the scalar oscillates at race start, then climbs monotonically. Per-track tuning is needed. India wants 3.0, Canada blows out at the same threshold. <strong>A single-scalar solution doesn&rsquo;t converge cross-track.</strong></li>
</ul>
<video
  controls
  preload="metadata"
  playsinline
  class="html5-video"
  style="width:100%; max-width:960px; display:block; margin:1.25em auto; border-radius:8px; background:#000;"
  >
  <source src="https://new-uploads-akitaonrails.s3.us-east-2.amazonaws.com/2026/04/videos/debugging-cli-gamma-correction.mp4" type="video/mp4">
  Your browser does not support HTML5 video.
</video>

<h3>Phase 24: dim upstream of tonemap<span class="hx:absolute hx:-mt-20" id="phase-24-dim-upstream-of-tonemap"></span>
    <a href="#phase-24-dim-upstream-of-tonemap" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><blockquote>
  <p><a href="https://github.com/akitaonrails/shadPS4/blob/gamma-debug/docs/driveclub-investigation/phase-24-dim-upstream-of-tonemap.md"target="_blank" rel="noopener"><code>phase-24-dim-upstream-of-tonemap.md</code></a></p>

</blockquote>
<ul>
<li><strong>Conclusion:</strong> after the whole probe chain (identity tonemap, exposure pin, compute skip), the dim <strong>is in the HDR target before</strong> the tonemap reads it. Three upstream suspects: (1) atmospheric scattering / volumetric fog, (2) reflection-probe / envmap update, (3) pre-tonemap exposure apply.</li>
<li><strong>New concept:</strong> <strong>atmospheric scattering</strong> (simulating how light travels through atmosphere, Rayleigh/Mie-style), <strong>volumetric fog</strong> (fog rendered as a froxel volume).</li>
<li><strong>Outcome:</strong> plan set. Frame-order dump, walk backwards from tonemap through the whole chain.</li>
</ul>
<h3>Phase 25: frame-order trace<span class="hx:absolute hx:-mt-20" id="phase-25-frame-order-trace"></span>
    <a href="#phase-25-frame-order-trace" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><blockquote>
  <p><a href="https://github.com/akitaonrails/shadPS4/blob/gamma-debug/docs/driveclub-investigation/phase-25-frameorder-trace.md"target="_blank" rel="noopener"><code>phase-25-frameorder-trace.md</code></a></p>

</blockquote>
<ul>
<li><strong>Action:</strong> <code>SHADPS4_DC_FRAMEORDER=&lt;N&gt;</code> logs strict per-submit pipeline/shader chain over N submits during race window.</li>
<li><strong>New concept:</strong> <strong>frame-order reconstruction</strong> (listing every GPU submission in exact order), <strong>froxel volumetrics</strong> (frustum volume voxels — a 3D grid aligned to the camera&rsquo;s frustum that stores light info).</li>
<li><strong>Outcome:</strong> three suspects: (A) half-res compute <code>(60,34,1)</code>, probably SSAO; (B) progressive dispatches <code>(256,1,1)→(2560,1,1)→(10240,1,1)</code>, froxel volumetric; (C) fullscreen apply-fog-to-HDR draw. <strong>Suspect B</strong> is the strongest fit (sunset best-fit, per-pixel non-uniform dim).</li>
</ul>
<h3>Phase 26: The UBO fade pin, the &ldquo;aha moment&rdquo;<span class="hx:absolute hx:-mt-20" id="phase-26-the-ubo-fade-pin-the-aha-moment"></span>
    <a href="#phase-26-the-ubo-fade-pin-the-aha-moment" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><blockquote>
  <p><a href="https://github.com/akitaonrails/shadPS4/blob/gamma-debug/docs/driveclub-investigation/phase-26-ubo-fade-pin.md"target="_blank" rel="noopener"><code>phase-26-ubo-fade-pin.md</code></a></p>

</blockquote>
<p>This is where everything changed.</p>
<ul>
<li><strong>Hypothesis:</strong> a direct memory diff (bright vs dim vs recovered) identifies the exact bytes the game writes to control the blackout.</li>
<li><strong>Action:</strong> capture periodic UBO snapshots across visual state transitions. Diff three snapshots byte by byte. Look for fade signatures.</li>
<li><strong>New concept:</strong> <strong>state diff methodology</strong>. Instead of &ldquo;which pass looks suspicious?&rdquo;, ask &ldquo;which bytes actually change with the visual state?&rdquo;</li>
<li><strong>Outcome:</strong> <strong>breakthrough.</strong> Two UBOs control the fade: a 1936-byte one with slots <code>[38/48/50]</code> (light intensity) being multiplied by 0.094 (fade factor), and a 224-byte sun UBO with slot <code>[50]</code> dropping 97%. Pinning both: race start opens bright. TOD animation intact. Content-aware three-state lifecycle (idle → engaged → expired).</li>
</ul>
<p><img src="https://new-uploads-akitaonrails.s3.us-east-2.amazonaws.com/2026/04/23/driveclub-learning/touching-sun-light.png" alt="First touch on the sun-light UBO"  loading="lazy" /></p>
<p>Wednesday night. Claude suggests stopping again. <strong>&ldquo;We have the pin working, three-state lifecycle is robust, Canada + Munnar are running. This is upstream quality, we should PR and close it.&rdquo;</strong> I insist: &ldquo;there&rsquo;s still residual dim on other tracks, it&rsquo;s not closed. We keep going.&rdquo;</p>
<h3>Phase 28: pivot to emulator code<span class="hx:absolute hx:-mt-20" id="phase-28-pivot-to-emulator-code"></span>
    <a href="#phase-28-pivot-to-emulator-code" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><blockquote>
  <p><a href="https://github.com/akitaonrails/shadPS4/blob/gamma-debug/docs/driveclub-investigation/phase-28-pivot-to-emulator-code.md"target="_blank" rel="noopener"><code>phase-28-pivot-to-emulator-code.md</code></a></p>

</blockquote>
<ul>
<li><strong>Realization:</strong> the residual dim in Canada dusk/night isn&rsquo;t a wrong UBO value. It&rsquo;s an <strong>emulator translation gap</strong>. The game runs correctly on a real PS4, so shadPS4 has some path that translates or synchronizes incorrectly.</li>
<li><strong>Action:</strong> ranked 5 candidate emulator bugs: HLE shader misidentification, image storage classification, layout transitions, IMAGE_STORE_MIP fallback, OpImageFetch LOD restriction.</li>
<li><strong>New concept:</strong> <strong>HLE (High-Level Emulation)</strong>. Replacing complex PS4 OS functions with host-side implementations. Different from LLE (low-level) which emulates bit by bit. HLE is faster but can diverge from real behavior whenever the host implementation doesn&rsquo;t cover every case.</li>
</ul>
<p><img src="https://new-uploads-akitaonrails.s3.us-east-2.amazonaws.com/2026/04/23/driveclub-learning/canada-dim.png" alt="Canada dusk/night still dim"  loading="lazy" /></p>
<h3>Phase 29: calibrated state + recording harness<span class="hx:absolute hx:-mt-20" id="phase-29-calibrated-state--recording-harness"></span>
    <a href="#phase-29-calibrated-state--recording-harness" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><blockquote>
  <p><a href="https://github.com/akitaonrails/shadPS4/blob/gamma-debug/docs/driveclub-investigation/phase-29-calibrated-state.md"target="_blank" rel="noopener"><code>phase-29-calibrated-state.md</code></a></p>

</blockquote>
<ul>
<li><strong>Action:</strong> <code>SHADPS4_DC_RECORD=1</code>. Recording harness that dumps lighting UBOs periodically + cross-correlates with wall-clock screenshots.</li>
<li><strong>Outcome:</strong> important discovery. <strong>Slots <code>[144..295]</code> of the 1936-byte UBO</strong> (30+ fields) stay <strong>denormal/uninitialized</strong> for the first ~90 seconds of a race. At the 1:30 &ldquo;auto-recalibration&rdquo;, the game writes the real values. <strong>It&rsquo;s not magic recovery, it&rsquo;s the CPU finally writing values that should have been there since frame 1.</strong> On PS4 they&rsquo;re ready before the first frame; on shadPS4 they&rsquo;re delayed by 90s. <strong>Root cause lives in an emulator init gap.</strong></li>
</ul>
<h3>Phase 30: UBO writer audit<span class="hx:absolute hx:-mt-20" id="phase-30-ubo-writer-audit"></span>
    <a href="#phase-30-ubo-writer-audit" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><blockquote>
  <p><a href="https://github.com/akitaonrails/shadPS4/blob/gamma-debug/docs/driveclub-investigation/phase-30-ubo-writer-audit.md"target="_blank" rel="noopener"><code>phase-30-ubo-writer-audit.md</code></a></p>

</blockquote>
<ul>
<li><strong>Action:</strong> exhaustive audit of every path that writes into slot <code>[38]</code> of the 1936-byte UBO. 7 suspects ranked: (1) ObtainBuffer stream-copy race, (2) lazy RegionManager in memory_tracker, (3) histogram compute skip, (4) page-fault delayed invalidation, (5) readback gating, (6) buffer-coherency race, (7) push-constant.</li>
<li><strong>Status:</strong> audit incomplete. Before I could verify each suspect, Phase 31 short-circuited the whole thing.</li>
</ul>
<h3>Phase 31: readbacks_mode = Precise, the turning point<span class="hx:absolute hx:-mt-20" id="phase-31-readbacks_mode--precise-the-turning-point"></span>
    <a href="#phase-31-readbacks_mode--precise-the-turning-point" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><blockquote>
  <p><a href="https://github.com/akitaonrails/shadPS4/blob/gamma-debug/docs/driveclub-investigation/phase-31-readbacks-mode-fix.md"target="_blank" rel="noopener"><code>phase-31-readbacks-mode-fix.md</code></a></p>

</blockquote>
<p>Thursday morning. Tired, thinking about suspect <strong>#5, readback gating</strong>. That one itched at me because it was the only one of the 7 writers that touched the <em>timing</em> of the read rather than the <em>correctness</em> of the write.</p>
<ul>
<li><strong>Hypothesis:</strong> flipping <code>readbacks_mode: 2 (Precise)</code> in per-game config makes the feedback loop work by synchronizing the CPU&rsquo;s read to fresh GPU output.</li>
<li><strong>Action:</strong> one edit in <code>custom_configs/CUSA00003.json</code>. Boot. Canada night.</li>
<li><strong>Outcome:</strong> <strong>race start opens bright. Auto-exposure converges normally. Zero blackout. Zero 1:30 recalibration. Night TOD natural.</strong></li>
</ul>
<p><img src="https://new-uploads-akitaonrails.s3.us-east-2.amazonaws.com/2026/04/23/driveclub-learning/almost-fixed.png" alt="Almost there, the test before the final one"  loading="lazy" /></p>
<p>Tested on Munnar. Same result. One integer. <strong>31 phases. 44 commits. 15,668 lines. Answer: one integer in the config.</strong></p>
<p>Why did this slip past 30 phases? The Phase 31 doc has the honest analysis:</p>
<ol>
<li><strong>Symptom disguise.</strong> Progressive darkening looks exactly like a broken tonemap, bad shader, or miscompiled exposure scalar. Every dump-driven probe found <strong>wrong values in the UBO</strong>, which is true but describes the downstream read, not the upstream gap.</li>
<li><strong><code>readback_linear_images</code> red herring.</strong> I tested that flag in Phase 29, saw no effect, and concluded &ldquo;the readback surface is audited&rdquo;. I forgot that flag is for <em>image</em> readbacks (linear images via <code>TextureCache::DownloadImageMemory</code>). The histogram SSBO is a <strong>buffer</strong>, a separate path.</li>
<li><strong>Pinning making it worse, not better.</strong> Overwriting slots [38/48/50] looked promising but never converged. The game rewrote on top of the pin every frame. I interpreted that as &ldquo;the pin mechanism lands too late in the pipeline&rdquo;. I spent phases 27-29 moving the pin earlier. The real fix was to <strong>stop clobbering the GPU-side input the integrator reads</strong>.</li>
<li><strong>Never audited the buffer readback path.</strong> The Phase 30 audit listed 7 writer candidates, but all of them were about the correctness of the <em>write</em>. None asked &ldquo;what is the CPU reading, expecting the GPU to have filled?&rdquo;</li>
</ol>
<h2>The shotgun technique<span class="hx:absolute hx:-mt-20" id="the-shotgun-technique"></span>
    <a href="#the-shotgun-technique" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>One thing I want to put on record: <strong>torture probes aren&rsquo;t waste, they&rsquo;re learning infrastructure.</strong> And the methodology behind them has a name: shotgun.</p>


<div class="embed-container">
  <iframe
    src="https://www.youtube.com/embed/HkxVhFg81fs?start=40"
    title="YouTube video player"
    frameborder="0"
    allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
    referrerpolicy="strict-origin-when-cross-origin"
    allowfullscreen>
  </iframe>
</div>

<p>If you have a suspicion (say, &ldquo;the dim comes from some texture&rdquo;), the worst thing you can do is start investigating one texture at a time, in depth. DriveClub has 1079 bound textures during the race window. If a detailed triage on one texture takes 20 minutes, you spend three days on a single branch of that tree and still don&rsquo;t know if the dim even comes from a texture. It might not be in the whole tree.</p>
<p>Shotgun fixes that. Instead of investigating one at a time, you fire at all of them simultaneously. Mutate every bound texture with a hash-based tint, force re-upload, run the game. In 30 seconds you know whether any of them affects the dim. If it does, the dim is texture-side and only then is it worth starting to narrow down. If nothing changes, congratulations: you just ruled out the entire &ldquo;texture&rdquo; category in 30 seconds. Switch categories, shotgun UBOs. No hit? Shotgun push constants. No hit? Shotgun compute dispatches. Keep going until something reacts.</p>
<p><strong>Don&rsquo;t start by narrowing down a tree that might be huge.</strong> You&rsquo;ll spend weeks in irrelevant leaves. Shotgun the trunk first. See which branch reacts. Then go deep inside that branch.</p>
<p>That&rsquo;s what I did, without knowing I was doing it, for the first 30 phases. 32 probe env vars (<code>SHADPS4_DC_UBO_SMASH</code>, <code>SHADPS4_DC_PC_SMASH</code>, <code>SHADPS4_DC_DISPATCH_SMASH</code>, <code>SHADPS4_DC_TEX_NUKE_*</code>, <code>SHADPS4_DC_UBO_NUKE</code>, and more). Random batches, hash-based tints, null substitutions. Most of them never pointed at the real fix. But every shotgun round ruled out an entire category of mental model. &ldquo;Not texture.&rdquo; &ldquo;Not push-constant.&rdquo; &ldquo;Not those 8 compute pipelines.&rdquo; &ldquo;Not the UBO write side anywhere in that region.&rdquo; Every ruling-out narrows the problem.</p>
<p><strong>And while I was doing it, I was learning the system.</strong> Every smash that crashed told me &ldquo;there&rsquo;s a critical descriptor pointer here&rdquo;. Every color tint that appeared told me &ldquo;this UBO feeds that composition pass&rdquo;. Every dispatch that fired differently between dim/bright showed me where the interesting boundary lives.</p>
<p><strong>When you don&rsquo;t know the system, shotgun probes are a map.</strong> You don&rsquo;t use them to find the answer. You use them to learn the terrain.</p>
<h2>What I knew on Sunday vs Thursday<span class="hx:absolute hx:-mt-20" id="what-i-knew-on-sunday-vs-thursday"></span>
    <a href="#what-i-knew-on-sunday-vs-thursday" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p><strong>Sunday:</strong> zero everything. All the areas below were black boxes to me.</p>
<p><strong>Thursday:</strong></p>
<ul>
<li>PS4 package format end-to-end (PKG → PFS → param.sfo → disc_info → keystone → npbind). How v1.28 cumulative patches layer on top of a v1.00 base install.</li>
<li>shadPS4 architecture in outline: <code>src/common</code>, <code>src/core</code> (OS emulation, HLE libraries), <code>src/shader_recompiler</code> (GCN→SPIR-V), <code>src/video_core</code> (Vulkan renderer, buffer cache, texture cache, page manager).</li>
<li>Full graphics pipeline: G-buffer → forward+ lighting (writes MSAA depth) → read depth as color for SSAO / volumetric froxel → post-fx compute → tonemap → composite → swapchain.</li>
<li>UBO vs push constant vs descriptor set. When to use each.</li>
<li>SPIR-V disassembly and re-assembly for surgical patching. How to identify a tonemap compute by its Exp2/Log2 signature.</li>
<li>Forward+ lighting + MSAA depth resolve + how to implement ReinterpretMsDepthAsColor.</li>
<li>shadPS4 buffer cache: <code>MemoryTracker</code>, <code>RegionManager</code>, <code>FaultManager</code>. How page faults turn into GPU→CPU sync.</li>
<li><code>readbacks_mode</code>: Disabled / Relaxed / Precise. What each tradeoff looks like. Why Relaxed isn&rsquo;t enough for feedback loops (it only write-protects, not read-protects).</li>
<li>PS4 OELF → Itanium RTTI → SCE relocation → dynamic linker reasoning, even without actually doing the binary patch (the plan is documented).</li>
</ul>
<p>I didn&rsquo;t become an expert in any of it. But I went from <strong>total outsider</strong> to <strong>reasonably oriented operator</strong>. And that jump, as I&rsquo;ll argue below, was the single most valuable thing of the four days.</p>
<h2>The AI suggested accepting. The perseverance was mine<span class="hx:absolute hx:-mt-20" id="the-ai-suggested-accepting-the-perseverance-was-mine"></span>
    <a href="#the-ai-suggested-accepting-the-perseverance-was-mine" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>I&rsquo;ve said a few times in this article that &ldquo;Claude suggested stopping&rdquo;. I want to be fair and specific: it wasn&rsquo;t an AI failure. It was exactly the correct behavior of an intelligent tool: <strong>when you have something that works reasonably well, stopping and documenting is frequently the right call.</strong> The Phase 22+ tonemap patch made the game playable. The Phase 26 UBO pin made the image pretty. The Phase 29 recording harness covered the critical window. All were legitimate stopping points.</p>
<p>If you read <a href="https://github.com/akitaonrails/shadPS4/blob/gamma-debug/docs/codex-conclusion.md"target="_blank" rel="noopener"><code>codex-conclusion.md</code></a>, the document the AI produced after Phase 26 (still not knowing about Phase 31 yet), it describes the then-current solution as &ldquo;<strong>a mitigation, not a root-cause fix</strong>&rdquo;. It honestly admits what we knew: the UBO pin was a countermeasure, not an explanation. That&rsquo;s good behavior.</p>
<p>The difference is that <strong>I had a stubborn hunch that something was still wrong</strong>. It worked in the playable sense. But the cost (DriveClub-specific pin + tonemap SPIR-V patch + per-track threshold tuning + doesn&rsquo;t generalize) was too high for a supposedly engineering-quality fix. A senior professional recognizes when the asymmetry between cost and understanding points to something deeper. You don&rsquo;t always get it right. But that hunch deserves to be heard.</p>
<p>Four days without interruption, 8 a.m. to midnight, Sunday, Monday, Tuesday, Wednesday, resolved Thursday morning. How many times did the AI suggest &ldquo;honestly, we should just accept the current result and document&rdquo;? Four or five. Each technically defensible. <strong>Human perseverance is the difference between &ldquo;the game works well enough&rdquo; and &ldquo;the game works, and I know why&rdquo;.</strong></p>
<h2>The real cost of this journey<span class="hx:absolute hx:-mt-20" id="the-real-cost-of-this-journey"></span>
    <a href="#the-real-cost-of-this-journey" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p><a href="https://github.com/akitaonrails/shadPS4/blob/gamma-debug/docs/driveclub-investigation/investigation-effort-accounting.md"target="_blank" rel="noopener"><code>investigation-effort-accounting.md</code></a> catalogs everything before cleanup. Some highlights:</p>
<ul>
<li><strong>3 days</strong> of active work (Apr 21-23, 2026).</li>
<li><strong>33 numbered phases</strong> + sweeps + side threads = 54 docs, 412 KB, <strong>6,867 lines of prose</strong>.</li>
<li><strong>44 commits</strong> on the gamma-debug fork. <strong>15,668 lines added</strong>, 1,204 removed.</li>
<li><code>src/video_core/renderer_vulkan/vk_rasterizer.cpp</code> grew from 1,364 to <strong>4,680 lines</strong> (3.4×) with instrumentation, pin lifecycles, recording harness.</li>
<li><strong>32 probe env vars</strong> defined. <strong>1 effectively used to find the bug</strong> (<code>SHADPS4_DC_LOG_STREAMCOPY</code>, in Phase 30).</li>
<li><strong>61 MB</strong> of shadPS4 log accumulated. <strong>57 MB</strong> of shader dumps (5,803 files). ~<strong>470 MB</strong> of total reclaimable artifacts once closed.</li>
</ul>
<p>Resolution: <strong>1 integer in the config.</strong></p>
<p>The ratio of <strong>6,867 lines of prose : 1 integer</strong> amuses me. But it isn&rsquo;t a joke about inefficiency. It&rsquo;s the real cost of learning a system you didn&rsquo;t know. Every line of prose ruled out a hypothesis. Every commit taught a layer of the stack. The integer was the end; the path was the product.</p>
<p>An honest note: despite the 15,668 lines added on the <code>gamma-debug</code> fork, <strong>almost none of it is useful to contribute upstream to shadPS4</strong>. What&rsquo;s there is instrumentation: torture probes, recording harness, pin lifecycles, calibrate-at-arm, UBO snapshots, dozens of debug env vars. Diagnostic code, not production code. Diagnostics that only make sense for DriveClub under those specific conditions.</p>
<p>The fork is going to stay public, but <strong>not as a contribution branch to the shadPS4 project</strong>. Unfortunately. It stays as a study document: 54 md files covering the full process, 44 commits showing the sequence of hypotheses, rule-outs and failures. It&rsquo;s material for anyone who wants to understand how the debugging process unfolded, or to reuse some of the techniques in similar investigations. No upstream-ready PR is coming out of that tree.</p>
<h2>Closing<span class="hx:absolute hx:-mt-20" id="closing"></span>
    <a href="#closing" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>Yes, the final solution was a config toggle that already existed. It&rsquo;s been in shadPS4&rsquo;s code for seven months. But on Sunday night, with zero PS4 knowledge, zero emulator knowledge, zero notion that auto-exposure was a GPU→CPU feedback loop, <strong>I had no technical authority to say &ldquo;flip readbacks Precise, done&rdquo;</strong>.</p>
<p>I had to see the whole chain to understand <em>why</em> it works. Why Relaxed isn&rsquo;t enough (it only write-protects, and DriveClub reads, it doesn&rsquo;t write into the histogram SSBO). Why Precise is expensive (per-page mprotect + per-fault GPU stall). Why the maintainer hid it behind &ldquo;Advanced&rdquo; (Bloodborne hangs, AMD tanks to 12 FPS). Why nobody in the community had connected Precise to DriveClub before: the compat tracker admits &ldquo;readbacks enabled&rdquo; but doesn&rsquo;t cite the mode, and nobody had seen the monotonic-drift signature through the GPU→CPU lens.</p>
<p>That&rsquo;s the difference between <strong>knowing the answer</strong> and <strong>knowing the terrain well enough to recognize the answer</strong>. To the junior asking me &ldquo;how do I learn today, in the AI era&rdquo;: that&rsquo;s my answer. Don&rsquo;t ask. Dive in. Use AI to speed up the search, to read code in parallel, to index old forums, to compile, to parse logs. But <strong>insist on understanding the why</strong>. When the AI suggests &ldquo;let&rsquo;s accept and document&rdquo; (and it will, because that&rsquo;s often the right behavior), ask yourself whether you actually understood the chain. If the itch &ldquo;this is wrong but I don&rsquo;t know why&rdquo; is still there, keep going.</p>
<p>You&rsquo;re probably going to spend four days on something that has a one-integer solution. You&rsquo;re probably going to discover five wrong paths before the right one. Probably half your probes will be torture shotguns that never pointed at the fix.</p>
<p>And you&rsquo;ll probably, when you finish, know a domain you didn&rsquo;t know before.</p>
<ul>
<li><strong>Fork gamma-debug:</strong> <a href="https://github.com/akitaonrails/shadPS4/tree/gamma-debug"target="_blank" rel="noopener">github.com/akitaonrails/shadPS4/tree/gamma-debug</a></li>
<li><strong>54 investigation docs:</strong> <a href="https://github.com/akitaonrails/shadPS4/tree/gamma-debug/docs/driveclub-investigation"target="_blank" rel="noopener">docs/driveclub-investigation/</a></li>
<li><strong>Operational runbook (recipe):</strong> <a href="https://github.com/akitaonrails/distrobox-gaming/blob/master/docs/driveclub-shadps4.md"target="_blank" rel="noopener">distrobox-gaming/docs/driveclub-shadps4.md</a></li>
<li><strong>Phase 31 resolution:</strong> <a href="https://github.com/akitaonrails/shadPS4/blob/gamma-debug/docs/driveclub-investigation/phase-31-readbacks-mode-fix.md"target="_blank" rel="noopener"><code>readbacks_mode: 2</code></a></li>
</ul>
<p>Now I&rsquo;m going to go play DriveClub. Night race in Canada, natural brightness, no blackout. Good Thursday.</p>
]]></content:encoded><category>emulation</category><category>gaming</category><category>learning</category></item><item><title>Starting with Blender</title><link>https://akitaonrails.github.io/en/2017/06/21/starting-with-blender/</link><guid isPermaLink="true">https://akitaonrails.github.io/en/2017/06/21/starting-with-blender/</guid><pubDate>Wed, 21 Jun 2017 17:32:00 -0300</pubDate><description>&lt;p&gt;Blender is a beast. A true marvel of what open source technology can achieve, and you should applaud everyone involved in making this thing work as well as it does. It rivals the most expensive commercial options out there, from Maya to the venerable Pixar&amp;rsquo;s Renderman.&lt;/p&gt;
&lt;p&gt;The Blender community is so passionate and committed that they frequently produce high quality, almost Hollywood grade &lt;a href="https://web.archive.org/web/20151127160645/http://archive.blender.org/features-gallery/movies/"target="_blank" rel="noopener"&gt;short movies&lt;/a&gt; inside Blender. The point is to stress test the tool and flush out bottlenecks and usability issues in a real world workflow.&lt;/p&gt;</description><content:encoded><![CDATA[<p>Blender is a beast. A true marvel of what open source technology can achieve, and you should applaud everyone involved in making this thing work as well as it does. It rivals the most expensive commercial options out there, from Maya to the venerable Pixar&rsquo;s Renderman.</p>
<p>The Blender community is so passionate and committed that they frequently produce high quality, almost Hollywood grade <a href="https://web.archive.org/web/20151127160645/http://archive.blender.org/features-gallery/movies/"target="_blank" rel="noopener">short movies</a> inside Blender. The point is to stress test the tool and flush out bottlenecks and usability issues in a real world workflow.</p>
<p>This is primarily a post for &ldquo;future me&rdquo; to jump back into a single resource list. Being a 3D modeler is not my full time job, so I&rsquo;ll have large gaps between Blender sessions. And I know I&rsquo;ll regret it if I don&rsquo;t dump my brain into a post while it&rsquo;s still fresh :-)</p>
<h3>Beginner First Steps<span class="hx:absolute hx:-mt-20" id="beginner-first-steps"></span>
    <a href="#beginner-first-steps" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p>First things first. If you&rsquo;re in this blog, you&rsquo;re probably a programmer. And let me tell you that the Graphics folks see &ldquo;usability&rdquo; very differently from what we, programmers, usually think of. The sheer amount of customization, options, shortcuts and combinations will rival even Vim and Emacs users out there.</p>
<p>Oh, by the way, you&rsquo;re going to need a real 3-button mouse. Touchpads are useless with Blender, and the Mac mouse is terrible. <a href="http://www.dell.com/br/mouse"target="_blank" rel="noopener">Any cheap PC mouse will do.</a></p>
<p>Out of the box, the main button is the right one, not the left one we&rsquo;re used to. Change that in the <a href="https://web.archive.org/web/20181118204135/https://docs.blender.org/manual/en/dev/preferences/input.html"target="_blank" rel="noopener">user preferences</a> to select with Left, and things start to make sense. While you&rsquo;re there, enable Numpad emulation too.</p>
<p>By the way, it&rsquo;s well worth having a keyboard with a numpad, or even a separate numpad. You can use the number row on top of your normal keyboard, but Blender was built assuming both an inverted 3-button mouse and a numpad.</p>
<p><a href="https://web.archive.org/web/20181118204135/https://docs.blender.org/manual/en/dev/preferences/input.html"target="_blank" rel="noopener"><img src="https://web.archive.org/web/20181119110123/https://docs.blender.org/manual/en/dev/_images/preferences_input_tab.png" alt="Input User Preferences"  loading="lazy" /></a></p>
<p>If you have never studied Blender before, you will not figure things out just by randomly exploring the UI. The UI is useless until someone teaches you the ins and outs. There are hundreds of terms you just have no idea what they mean, such as Meshes, Edges, Seams, Nodes, Viewport, Subsurface, Modifiers, etc.</p>
<p>The main thing you MUST do before proceeding is watching this entire 9 part series from Blender Guru, called <a href="https://www.youtube.com/watch?v=VT5oZndzj68&amp;list=PLjEaoINr3zgHs8uzT3yqe4iHGfkCmMJ0P"target="_blank" rel="noopener">Blender Beginner Tutorial Series</a>. Optionally you can slowly do the <a href="https://www.youtube.com/watch?v=Mwzz-Y6t-v8&amp;list=PLjEaoINr3zgEgoyYWE0Yit-cVoZ60WGtt"target="_blank" rel="noopener">Intermediate Blender Tutorials</a> later.</p>
<p>The Beginner Series will teach you enough that you&rsquo;ll finally start feeling confident with the UI and tools. And don&rsquo;t forget to print and hang this handy <a href="https://web.archive.org/web/20170708042817/https://www.blenderguru.com/articles/free-blender-keyboard-shortcut-pdf"target="_blank" rel="noopener">&ldquo;cheat sheet&rdquo;</a>. You won&rsquo;t believe how much easier your life becomes once you get used to the most important keyboard shortcuts.</p>
<h3>Better Defaults<span class="hx:absolute hx:-mt-20" id="better-defaults"></span>
    <a href="#better-defaults" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p>For historical reasons, some things are not how they should be. Knowledge in the 3D rendering field is evolving very fast.</p>
<p>The very first thing to do: <a href="https://web.archive.org/web/20160308012834/http://wiki.blender.org/index.php/Doc:2.6/Tutorials/Rendering/Cycles"target="_blank" rel="noopener">change</a> the default render engine from Blender Render to the Cycles Raytracing Engine.</p>
<p>Then, color grading. The default sRGB EOTF is basically wrong. You must download Sobotka&rsquo;s <a href="https://sobotka.github.io/filmic-blender/"target="_blank" rel="noopener">filmic-blender</a> configuration. If you&rsquo;re on Arch Linux you can basically do:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><pre><code>pacaur -S filmic-blender-git</code></pre></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>I created a script at <code>~/bin/filmic-blender</code> with this:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><pre><code>env OCIO=/usr/share/blender/2.78/datafiles/filmic-blender/config.ocio blender</code></pre></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>And I always start Blender from the terminal like this:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><pre><code>optirun ~/bin/filmic-blender</code></pre></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>This does 2 things: first, it pre-configures OpenColorIO to use the Filmic replacement. Second, it enables the external GPU of my notebook to be available to Blender. Read my post on <a href="http://www.akitaonrails.com/en/2017/03/14/enabling-optimus-nvidia-gpu-on-the-dell-xps-15-with-linux-even-on-battery"target="_blank" rel="noopener">&ldquo;Enabling Optimus NVIDIA GPU on the Dell XPS 15 with Linux, even on Battery&rdquo;</a> for more details. On Windows or Mac this is not necessary, but you&rsquo;ll still need to load the filmic configuration.</p>
<p>Then, on the Scene tab you must reconfigure &ldquo;Color Management&rdquo; to be like this:</p>
<p><img src="https://akitaonrails.s3.amazonaws.com/assets/image_asset/image/636/Screenshot_from_2017-06-21_16-31-05.png" alt="Color Management"  loading="lazy" /></p>
<p>Then you need to configure Cycles. If you&rsquo;re on Linux and Optimus is correctly installed as I explained before, you should have the CUDA option enabled in the User Preferences:</p>
<p><a href="https://web.archive.org/web/20181118204134/https://docs.blender.org/manual/en/dev/preferences/system.html"target="_blank" rel="noopener"><img src="https://akitaonrails.s3.amazonaws.com/assets/image_asset/image/637/Screenshot_from_2017-06-21_16-43-29.png" alt="System preferences"  loading="lazy" /></a></p>
<p>In the Render tab, you should have something like this:</p>
<p><img src="https://akitaonrails.s3.amazonaws.com/assets/image_asset/image/638/Screenshot_from_2017-06-21_16-45-32.png" alt="Render configuration"  loading="lazy" /></p>
<p>In the Dimensions section, you&rsquo;ll notice it has the Full HD (1920x1080 px) size but only 50% (so it will only render half the size). Increase it to 100%. If you want a 4K shot, increase the dimensions to 3840x2160 px. 4K makes it 4 times slower to render than 1080p, obviously.</p>
<p>In the Performance section you&rsquo;ll see 2 input fields for &ldquo;Tile size&rdquo;. Blender will slice your full image into tiles, and each tile renders in parallel on an available CPU or GPU core. My notebook has 8 CPU cores, so 64 is a good size, because it will render 8 tiles of 64 pixels each in parallel.</p>
<p>The fewer cores you have, the larger you should make the tile sizes. For my NVIDIA GPU, I only have 2 available cores (and not a lot of video memory either!), so it&rsquo;s worth bumping both fields to 512. On the GPU it only renders 2 tiles at once, and larger tiles optimize the render.</p>
<p>As you probably guessed, Blender Guru has a very useful <a href="https://www.youtube.com/watch?v=8gSyEpt4-60&amp;t=204s"target="_blank" rel="noopener">&ldquo;18 ways to speed up Cycles Rendering&rdquo;</a> tutorial.</p>
<p>These should cover the basic defaults.</p>
<h3>You must think as a Photographer!<span class="hx:absolute hx:-mt-20" id="you-must-think-as-a-photographer"></span>
    <a href="#you-must-think-as-a-photographer" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p>You will want to watch A LOT of online tutorials, because it&rsquo;s really not obvious how to best use the tools. Another channel I really like is <a href="https://www.youtube.com/watch?v=lY6KPrc4uMw&amp;list=PLda3VoSoc_TR7X7wfblBGiRz-bvhKpGkS"target="_blank" rel="noopener">BornCG</a> and <a href="https://www.youtube.com/channel/UCCxay0KiyLlawfgoZ2mVnNQ"target="_blank" rel="noopener">CG Masters</a>. Pick a few of their videos to get a more in-depth view on specific tools, modeling techniques and so on.</p>
<p>And really, you must practice as much as possible while studying a lot along the way. One important area is Photography. This is what you see when you select the Camera tab:</p>
<p><img src="https://akitaonrails.s3.amazonaws.com/assets/image_asset/image/639/Screenshot_from_2017-06-21_16-55-09.png" alt="Camera settings"  loading="lazy" /></p>
<p>There&rsquo;s a lot of customization you can do here. For example: Focal length: 35.00, which is what photographers know as a 35mm lens, a good default choice. You can also use a really wide angle such as 200mm or 300mm, and indoor shots, in small rooms, could use a 24mm or even 18mm lens. This article <a href="http://www.cambridgeincolour.com/tutorials/camera-lenses.htm"target="_blank" rel="noopener">&ldquo;Understanding Color Lenses&rdquo;</a> should give you the basics.</p>
<p>Then, you must understand &ldquo;Depth of Field&rdquo;. This can be done at this configuration before rendering, or you can simulate it after rendering (if you chose to separate the render in layers), in the <a href="https://web.archive.org/web/20160308021547/http://wiki.blender.org/index.php/Doc:2.6/Tutorials/Composite_Nodes/Setups/Depth_Of_Field"target="_blank" rel="noopener">Compositor</a>.</p>
<p>Speaking of which, another way to control Depth of Field is reconfiguring &ldquo;f-stop&rdquo;, which is the measurement of exposure, or aperture. The default is &ldquo;128.0&rdquo;, which is &ldquo;f/128&rdquo;. As a reference, your iPhone 7s camera has an f/2.2 aperture. Again, let&rsquo;s study more about this starting with the article <a href="https://www.bhphotovideo.com/explora/photography/tips-and-solutions/what%E2%80%99s-best-f-stop"target="_blank" rel="noopener">&ldquo;What&rsquo;s the Best F-Stop?&rdquo;</a></p>
<p>Taking a photo (or rendering a still, in our case) is a whole lot more than just point-and-click. You also have to worry about proper composition techniques such as the <a href="http://www.photographymad.com/pages/view/rule-of-thirds"target="_blank" rel="noopener">Rule of Thirds</a>, the <a href="http://www.makeuseof.com/tag/golden-ratio-photography/"target="_blank" rel="noopener">golden ratio</a>, and so on. You can change that in the &ldquo;Composition Guides&rdquo; combo box as shown above.</p>
<p><img src="https://akitaonrails.s3.amazonaws.com/assets/image_asset/image/641/3911f4657078a19b4f3677a304e7451d.jpg" alt="Golden Ratio Composition"  loading="lazy" /></p>
<p>You really should dive deep into the field of Photography to improve the final result of the renders. I&rsquo;m an amateur and it&rsquo;s really exciting to be able to apply real world techniques to 3D rendering.</p>
<h3>Material Design and Physically-Based Render (PBR)<span class="hx:absolute hx:-mt-20" id="material-design-and-physically-based-render-pbr"></span>
    <a href="#material-design-and-physically-based-render-pbr" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p>The golden standard in 3D modeling and rendering is certainly <a href="https://renderman.pixar.com/view/renderman"target="_blank" rel="noopener">Disney/Pixar RenderMan</a>. Every award winning Pixar movie was made with it.</p>
<p>But Blender learns fast. Every Pixar paper eventually becomes part of Blender itself. Material design, for example, has always been quite cumbersome in the tool. I did some of the tutorials myself, and creating materials with the proper real world characteristics, like proper Fresnel and the right dielectric versus metallic distinction, was a challenge.</p>
<p>If you subscribed to Blender Guru&rsquo;s channel you should really watch the tutorials <a href="https://www.youtube.com/watch?v=V3wghbZ-Vh4&amp;t=2668s"target="_blank" rel="noopener">&ldquo;How to Make Photorealistic PBR Materials - Part 1&rdquo;</a> and <a href="https://www.youtube.com/watch?v=m1PkSViBi-M"target="_blank" rel="noopener">&ldquo;Part 2&rdquo;</a>. And you will end up with this complicated Nodes configuration for PBR materials:</p>
<p><img src="https://akitaonrails.s3.amazonaws.com/assets/image_asset/image/640/Screenshot_from_2017-06-21_17-25-46.png" alt="PBR Materials - Node Editor"  loading="lazy" /></p>
<p>And Blender Guru just posted a new video introducing a feature for the upcoming Blender 2.79 (currently at 2.78): the implementation of the <a href="https://disney-animation.s3.amazonaws.com/library/s2012_pbs_disney_brdf_notes_v2.pdf"target="_blank" rel="noopener">&ldquo;Physically-Based Shader at Disney&rdquo;</a> paper as a proper and optimized new Blender Shader named &ldquo;Principled Shader&rdquo;. It&rsquo;s quite literally the <a href="https://www.youtube.com/watch?v=4H5W6C_Mbck"target="_blank" rel="noopener">Ultimate Shader</a>, because it makes creating and customizing realistic materials <strong>very</strong> easy, and compatible with Renderman and Substance.</p>
<h3>Conclusion<span class="hx:absolute hx:-mt-20" id="conclusion"></span>
    <a href="#conclusion" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p>I am still a beginner at Blender, there is a very long road to walk here. But it&rsquo;s a very exciting environment and I am learning tons of new and useful stuff all the time. Anyone should try it!</p>
<p>Over time I hope I find the time to integrate the Blender workflow with other tools such as Unreal Engine or Unity3D to create interactive stuff as well.</p>
<p>This is by no means a complete tutorial or reference. The idea was to highlight a few things that are not immediately obvious when you start with Blender and that can give you a broader sense of what Blender can do.</p>
<p>If you want to go really in-depth in the customization, watch this CG Master setup video:</p>


<div class="embed-container">
  <iframe
    src="https://www.youtube.com/embed/-_BZasG_UDA"
    title="YouTube video player"
    frameborder="0"
    allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
    referrerpolicy="strict-origin-when-cross-origin"
    allowfullscreen>
  </iframe>
</div>

]]></content:encoded><category>tutorials</category><category>learning</category><category>audio-and-video</category><category>off-topic</category></item><item><title>[Off-Topic] Talent Is Highly Overrated: Humanizing Einstein and Killing Gods</title><link>https://akitaonrails.github.io/en/2017/06/08/off-topic-talento-e-altamente-supervalorizado-humanizando-einstein-e-matando-deuses/</link><guid isPermaLink="true">https://akitaonrails.github.io/en/2017/06/08/off-topic-talento-e-altamente-supervalorizado-humanizando-einstein-e-matando-deuses/</guid><pubDate>Thu, 08 Jun 2017 21:23:00 -0300</pubDate><description>&lt;p&gt;One thing I keep repeating is: don&amp;rsquo;t have idols, don&amp;rsquo;t blindly believe in gurus, and most of all, don&amp;rsquo;t follow false-Gods.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m a &lt;a href="https://akitaonrails.github.io/en/2007/08/23/off-topic-inimigos-da-razo"&gt;longtime proponent&lt;/a&gt; of killing gods; it&amp;rsquo;s practically a hobby. They make excellent fiction characters in bedtime stories, but obviously they don&amp;rsquo;t exist. Like the boogeyman, Santa Claus, or the Easter bunny. And no, this isn&amp;rsquo;t another anti-religion article, relax.&lt;/p&gt;
&lt;p&gt;For the same reasons, I want to dismantle the myth of &amp;ldquo;Talent&amp;rdquo; and bring the demigods back to humanity.&lt;/p&gt;</description><content:encoded><![CDATA[<p>One thing I keep repeating is: don&rsquo;t have idols, don&rsquo;t blindly believe in gurus, and most of all, don&rsquo;t follow false-Gods.</p>
<p>I&rsquo;m a <a href="/en/2007/08/23/off-topic-inimigos-da-razo">longtime proponent</a> of killing gods; it&rsquo;s practically a hobby. They make excellent fiction characters in bedtime stories, but obviously they don&rsquo;t exist. Like the boogeyman, Santa Claus, or the Easter bunny. And no, this isn&rsquo;t another anti-religion article, relax.</p>
<p>For the same reasons, I want to dismantle the myth of &ldquo;Talent&rdquo; and bring the demigods back to humanity.</p>
<h3>Talent Is Highly Overrated<span class="hx:absolute hx:-mt-20" id="talent-is-highly-overrated"></span>
    <a href="#talent-is-highly-overrated" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p>I really hate the use of the word &ldquo;Talent.&rdquo; It should be used as a compliment, a quality, but it&rsquo;s very often used as an excuse. The Latin root of the word simply means a large amount of money. Today&rsquo;s mistaken and common use devalues the real efforts of truly &ldquo;talented&rdquo; people.</p>
<p>Every time it&rsquo;s used to denote something like <em>&ldquo;I&rsquo;ll never be an Einstein, so I won&rsquo;t even bother trying.&rdquo;</em> It&rsquo;s the favorite excuse of lazy people.</p>
<p>Although environmental and circumstantial factors play a crucial role, there is ABSOLUTELY NOTHING in our biological material, like a gene, that would stop someone from reaching similar levels of success given the same circumstances.</p>
<p>Yes, some people end up, randomly, in the right place at the right time. It&rsquo;s like winning the lottery. And unfortunately, it&rsquo;s impossible to recreate the same network of circumstances for everyone and replicate levels of success (more on this at the end of the article).</p>
<p>At the same time, it doesn&rsquo;t help at all to believe in the mysticism that &ldquo;talent&rdquo; can be defined physically, &ldquo;genetically.&rdquo; That&rsquo;s the thinking that creates Josef Mengeles and much of racism and other forms of segregation. There is no predestination.</p>
<p>These days you&rsquo;ve probably heard of the concept of 10,000 hours of deliberate training to become a master at something, first presented in the book <a href="https://www.amazon.com.br/dp/8575424483/ref=asc_df_85754244835020603?smid=A1ZZFT5FULY4LN&amp;tag=goog0ef-20&amp;linkCode=asn&amp;creative=380341&amp;creativeASIN=8575424483"target="_blank" rel="noopener">&ldquo;Outliers&rdquo;</a> by the prolix Malcolm Gladwell.</p>
<p><a href="https://www.amazon.com.br/dp/8575424483/ref=asc_df_85754244835020603?smid=A1ZZFT5FULY4LN&amp;tag=goog0ef-20&amp;linkCode=asn&amp;creative=380341&amp;creativeASIN=8575424483"target="_blank" rel="noopener"><img src="https://akitaonrails.s3.amazonaws.com/assets/image_asset/image/622/big_outliers.jpeg" alt="Outliers"  loading="lazy" /></a></p>
<p>From Bill Gates to Oppenheimer to the Beatles, the book tries to describe how these people&rsquo;s continuous, focused effort, the famous 10,000 hours (roughly 5 years full-time), helps explain their levels of success.</p>
<p>Geoff Colvin, in his book <a href="https://www.amazon.com.br/Talent-Overrated-Separates-World-Class-Performers/dp/1591842948"target="_blank" rel="noopener">&ldquo;Talent Is Overrated: What Really Separates World-Class Performers from Everybody Else&rdquo;</a> tries to go further than Gladwell and explains that, obviously, 10,000 hours of training alone isn&rsquo;t enough if it isn&rsquo;t &ldquo;deliberate practice&rdquo;: obsessive training focused on continuous improvement, above the mere repetition of the same routine.</p>
<p>In summary: do you want the chance to become a master at something? Have the obsession to train focused on improving by millimeters and milliseconds over 10,000 hours. Repeating the same routine, without focusing on improving results, doesn&rsquo;t take anyone anywhere. It&rsquo;s just a pastime.</p>
<p>This kind of deliberate training that Gladwell and Colvin detail in their books is one possible factor of success.</p>
<p><img src="https://akitaonrails.s3.amazonaws.com/assets/image_asset/image/623/10000-hours-to-mastery.png" alt="10,000 hours"  loading="lazy" /></p>
<h3>10% of the Brain: the Myth<span class="hx:absolute hx:-mt-20" id="10-of-the-brain-the-myth"></span>
    <a href="#10-of-the-brain-the-myth" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p>This one is easy to debunk, so I&rsquo;ll start here.</p>
<p>One of the &ldquo;mystical&rdquo; aspects of talent is linked to the belief in people who can activate more than 10% of the brain. The myth that we don&rsquo;t use all of our &ldquo;potential.&rdquo;</p>
<p>Recent fiction films like <a href="http://gizmodo.com/where-the-10-percent-of-our-brains-myth-comes-from-a-1598507369"target="_blank" rel="noopener">&ldquo;Lucy&rdquo; by Luc Besson</a> don&rsquo;t help at all because they perpetuate this popular belief. Let&rsquo;s describe it this way:</p>
<blockquote>
  <p>&ldquo;The human brain constitutes 1/40 of the total mass of the human body, on average, but consumes 1/5 of all the calories we absorb. From an evolutionary point of view, where every organ in our body was created and naturally selected over ages for efficiency, having a brain that sucks up 20% of all our daily energy reserve for a mere 10% of efficiency simply makes no sense.&rdquo;</p>

</blockquote>
<blockquote>
  <p>Think about yourself right now. Are you using your muscles to sit there now? Using your hands to scroll your computer mouse (or finger on your phone screen)? Maybe eating or drinking something? Listening to some music? Breathing? Rest assured, you&rsquo;re using more than 10% of your brain right now - <a href="https://www.nature.com/scitable/blog/mind-read/lucy_is_wrong_we_use"target="_blank" rel="noopener">Nature</a></p>

</blockquote>
<p><a href="https://www.youtube.com/watch?v=YxIS3XxfFS0"target="_blank" rel="noopener"><img src="https://akitaonrails.s3.amazonaws.com/assets/image_asset/image/624/big_10percent_brain.jpg" alt="10% of the brain"  loading="lazy" /></a></p>
<p>With that factor out of the way, let&rsquo;s continue.</p>
<h3>Humanizing Einstein<span class="hx:absolute hx:-mt-20" id="humanizing-einstein"></span>
    <a href="#humanizing-einstein" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p>In general, I don&rsquo;t respect biographies. I rarely waste my time reading any. I&rsquo;m not against them, but to me a biography is a story told by a writer, who took into account every technique to keep me hooked on the story he wants to tell. Every biography is limited to the writer&rsquo;s interests, not the character whose name is on the book&rsquo;s cover.</p>
<p>In fact, I consider biographies as any other kind of entertainment story. In exactly the same category as watching Captain America or Superman. Because that&rsquo;s exactly how writers and directors produce &ldquo;based on true facts&rdquo; films.</p>
<p>By the way, hats off to the Coen brothers for the film <a href="http://www.sbs.com.au/guide/article/2017/05/23/how-much-fargo-actually-based-true-story"target="_blank" rel="noopener">&ldquo;Fargo&rdquo;</a> which opens with the line &ldquo;this is a true story.&rdquo; And many people, even today, believe it&rsquo;s real. A trolling of every film that begins with the infamous &ldquo;based on a true story&rdquo; while everyone thinks they&rsquo;re watching facts, not entertainment.</p>
<p><img src="https://akitaonrails.s3.amazonaws.com/assets/image_asset/image/625/fargo.jpg" alt="Fargo"  loading="lazy" /></p>
<p>Put in a name that existed, a situation that existed, and everyone associates the entire fiction as if it were real. I hope nobody thinks Lincoln was a vampire hunter because of the film <a href="http://www.imdb.com/title/tt1611224/"target="_blank" rel="noopener">&ldquo;Abraham Lincoln: Vampire Hunter&rdquo;</a>.</p>
<p>But if I were to ask anyone in the world who the greatest super-genius scientist of all time was, with the theories that most revolutionized humanity, no one would hesitate to say: Albert Einstein!</p>
<p><a href="https://www.sott.net/article/251049-New-Book-Says-Einstein-Highly-Overrated-and-Ruined-Physics"target="_blank" rel="noopener"><img src="https://akitaonrails.s3.amazonaws.com/assets/image_asset/image/626/einstein_debunked.jpg" alt="Einstein, debunked"  loading="lazy" /></a></p>
<p>But why?</p>
<p>Physicist Roger Schlafly, in his book <a href="http://www.darkbuzz.com/herp/"target="_blank" rel="noopener">&ldquo;How Einstein Ruined Physics: Motion, Symmetry, and Revolution in Science&rdquo;</a> brings a ton of evidence to the contrary.</p>
<p>In summary, yes, Einstein really did publish many very interesting things, but the super-inflated myth created around his figure is much more harmful than beneficial for the future of physics and his successors. And it keeps fueling the myth-making market.</p>
<blockquote>
  <p>Einstein was a person full of flaws, like all of us. A long way from a demigod.</p>

</blockquote>
<p>Mark Green, in his article <a href="https://www.sott.net/article/251049-New-Book-Says-Einstein-Highly-Overrated-and-Ruined-Physics"target="_blank" rel="noopener">&ldquo;New Book Says Einstein Highly-Overrated and Ruined Physics&rdquo;</a> describes:</p>
<blockquote>
  <p>&ldquo;What made Einstein so great? The official story goes this way: Albert Einstein, a young clerk in a Swiss patent office, single-handedly transformed physics from a static, three-dimensional science to a four-dimensional, mind-blowing, time-space universe via brilliant and solitary &rsquo;thought experiments&rsquo; involving gravity, motion, space and time. Einstein also made unprecedented inroads into understanding the nature of light and energy and was the first to comprehend the equivalence between energy and mass. Einstein&rsquo;s discoveries not only transformed modern physics but the way we view the universe.&rdquo;</p>

</blockquote>
<p>It&rsquo;s what we all know. And I strongly recommend you read Mark Green&rsquo;s full article, but let&rsquo;s get to the points that matter.</p>
<blockquote>
  <p>E=MC²: was not invented by Einstein!</p>

</blockquote>
<p><img src="https://media.giphy.com/media/DqSw5gyRQ5yPC/giphy.gif" alt="mind blow"  loading="lazy" /></p>
<p>The equation was published 2 years earlier by Olinto de Pretto. As Schlafly says in his book, &ldquo;Einstein&rsquo;s understanding of special relativity &hellip; was inferior to (Henri) Poincaré&rsquo;s.&rdquo; By the way, if you&rsquo;ve never heard of the French physicist Poincaré, I recommend reading the book <a href="https://www.amazon.com/Chaos-Making-Science-James-Gleick/dp/0143113453/ref=lp_13567_1_3?s=books&amp;ie=UTF8&amp;qid=1496941237&amp;sr=1-3"target="_blank" rel="noopener">&ldquo;Chaos: Making a New Science&rdquo;</a> by James Gleick.</p>
<blockquote>
  <p>The notion of motion and time as a 4th dimension separate from three-dimensional space.</p>

</blockquote>
<p>H.G. Wells speculated about the concept in the famous fiction piece &ldquo;The Time Machine&rdquo; in 1894. That same year Lorentz wrote the scientific paper where he &ldquo;proposes the concept of local time in a moving object.&rdquo; Poincaré wrote one in 1898 and another in 1900 exploring the relationship between motion and time.</p>
<blockquote>
  <p>And the relationship of E=MC² to the atomic bomb?</p>

</blockquote>
<p>As Schlafly describes, E=MC² isn&rsquo;t even necessary for the atomic bomb. The equation gives no clue about how to split the atom, or how to create a nuclear chain reaction, or any of the other steps necessary in making the atomic bomb. Relativity isn&rsquo;t even necessary to understand the energy release of a uranium or plutonium bomb, since the release can be explained by electromagnetism considerations &hellip; predictions about relativistic mass were being tested (by German physicist Walter Kaufmann) in 1901, before Einstein wrote anything about it.</p>
<p>And, to top it off, it was also H.G. Wells who first published about the concept of <a href="http://www.bbc.com/news/magazine-33365776"target="_blank" rel="noopener">&ldquo;atomic bombs&rdquo;</a>.</p>
<p><a href="http://www.bbc.com/news/magazine-33365776"target="_blank" rel="noopener"><img src="https://akitaonrails.s3.amazonaws.com/assets/image_asset/image/627/wells.jpg" alt="H.G. Wells"  loading="lazy" /></a></p>
<p>There were many exceptional scientists, who worked hard, before and during Einstein&rsquo;s era. The French mathematician and physicist Henri Poincaré, whom British philosopher Bertrand Russell (remember <a href="http://rationalwiki.org/wiki/Russell%27s_Teapot"target="_blank" rel="noopener">Russell&rsquo;s teapot</a>?) called the greatest man France ever produced. The Dutch physicist and Nobel laureate Hendrik Lorentz. And the Scottish physicist and mathematician James Clerk Maxwell.</p>
<p>According to Schlafly, Maxwell was the first to coin the term &ldquo;relativity&rdquo; and created the first true theory of relativity of mass and energy. Electromagnetism generated the most important equations in the history of science.</p>
<p>Poincaré&rsquo;s subsequent work on relativity provided the theorems that were &ldquo;mathematically identical to Einstein&rsquo;s,&rdquo; and most of his work came before Einstein. Lorentz and Poincaré had all the main aspects of the theory of relativity, and published before Einstein.</p>
<p><a href="https://en.wikipedia.org/wiki/Relativity_priority_dispute"target="_blank" rel="noopener"><img src="https://akitaonrails.s3.amazonaws.com/assets/image_asset/image/628/poincare.jpg" alt="Poincaré"  loading="lazy" /></a></p>
<p>Remember another detail of the &ldquo;official story.&rdquo; Einstein worked at a <strong>patent office</strong>. He understood the importance of &ldquo;intellectual property&rdquo; and had access to a lot of work before it had been patented!</p>
<p>And so a talent is born, irreplaceable and of inestimable value &hellip; for the mass entertainment market.</p>
<p>Hold onto another detail: what if Einstein hadn&rsquo;t existed? Would we have been deprived of the Theory of Relativity? No, that work was practically complete before him. Others would have served the role and the media and folklore would just have a different name to call God.</p>
<blockquote>
  <p>Talent, is relative &hellip;</p>

</blockquote>
<h3>Every Genius Is Actually a Group!<span class="hx:absolute hx:-mt-20" id="every-genius-is-actually-a-group"></span>
    <a href="#every-genius-is-actually-a-group" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p>An important fact is that the Theory of Relativity wasn&rsquo;t the invention of one person. A lone wolf who had a &ldquo;Eureka&rdquo; moment. Eureka moments are very different from what you imagine.</p>
<p>Understand that today, the Theory of Relativity is basic material for any physics student. Nothing remarkable.</p>
<p>Everything we have today is the result of hundreds of individuals and groups, who throughout history have used what was known before, thrown away what no longer works, refined what works, and added new pieces for the following generations.</p>
<p>Nothing we do today is truly done &ldquo;from scratch.&rdquo; Everything we have at our disposal today makes us orders of magnitude superior, more efficient, faster, than the generation that lived 200 years ago, millennia ago.</p>
<p>We don&rsquo;t create anything based on absolute truths written in stone millennia ago. Evolution exists because everything is volatile. Everything that has been proving itself correct given years, centuries of scrutiny, becomes the strongest tools to create new things. Engineering, Medicine, etc.</p>
<p>Thanks to that we went from the era of subsistence to agriculture. To the Industrial Revolution. To the Information Age. And to where we&rsquo;re heading toward the Age of Artificial Intelligence, and so on.</p>
<p>&ldquo;Talent&rdquo; is a way of pointing out moments in this continuous and uninterrupted history where society as a whole has been climbing on the shoulders of giants to take longer strides into the future. But no &ldquo;one&rdquo; individual was necessarily pivotal. The achievements would be made by someone, but from time to time, we elect a few individuals.</p>
<p>It&rsquo;s easier to tell the story that way. That&rsquo;s all. Innovation is always a group effort.</p>


<div class="embed-container">
  <iframe
    src="https://www.youtube.com/embed/LHYt2QeS8FM"
    title="YouTube video player"
    frameborder="0"
    allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
    referrerpolicy="strict-origin-when-cross-origin"
    allowfullscreen>
  </iframe>
</div>

<h3>Serendipity, Randomness, and Complex Systems<span class="hx:absolute hx:-mt-20" id="serendipity-randomness-and-complex-systems"></span>
    <a href="#serendipity-randomness-and-complex-systems" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p>Unfortunately we, human beings, are terrible at understanding randomness. The world is highly random.</p>
<p>More than Einstein, the scientist who published the most significant work for humanity was Charles Darwin and his magnum opus <a href="https://www.theguardian.com/books/2015/nov/10/on-the-origin-of-species-voted-most-influential-academic-book-charles-darwin"target="_blank" rel="noopener">&ldquo;On the Origin of Species&rdquo;</a> where he explains how complexity emerges in a world of random events through natural selection.</p>
<p><a href="https://www.theguardian.com/books/2015/nov/10/on-the-origin-of-species-voted-most-influential-academic-book-charles-darwin"target="_blank" rel="noopener"><img src="https://akitaonrails.s3.amazonaws.com/assets/image_asset/image/635/big_darwin.jpg" alt="Darwin"  loading="lazy" /></a></p>
<p>I wrote in part about this in the post <a href="/en/2013/06/21/processos-metodologias-e-o-cerebro-humano">&ldquo;Processes, Methodologies, and the Human Brain&rdquo;</a> from 2013 and in the post <a href="/en/2008/03/01/off-topic-somos-matematicamente-ignorantes">&ldquo;We Are Mathematically Ignorant&rdquo;</a> from 2008. I&rsquo;ll try not to repeat myself too much.</p>
<p>The very story of how we survived and evolved in this world, until reaching the humanoid form we have today, is the result of what we had to face in the natural environment, or we wouldn&rsquo;t be here.</p>
<p>And a crucial factor in our primitive brain is finding <strong>patterns</strong>, things that repeat, and doing it fast. If, in the dead of night, in the middle of a forest, we see a small pair of shining circles moving around us and don&rsquo;t immediately connect them to the eyes of a lurking wolf so we can run as soon as possible, we wouldn&rsquo;t be here.</p>
<p><img src="https://akitaonrails.s3.amazonaws.com/assets/image_asset/image/634/tiger_eyes.jpg" alt="Tiger Eyes"  loading="lazy" /></p>
<p>That same mechanism is what makes us see &ldquo;faces in the clouds,&rdquo; &ldquo;images in coffee grounds,&rdquo; &ldquo;the face of Christ on a dirty cloth,&rdquo; and so on. Identifying patterns amid randomness guaranteed our <strong>survival</strong>, but in the modern world this capability of our brain leads us to totally wrong conclusions of cause and effect.</p>
<p>That&rsquo;s why I&rsquo;ve written so much about &ldquo;correlation isn&rsquo;t the same as causation.&rdquo;</p>
<blockquote>
  <p><a href="https://en.wikipedia.org/wiki/Correlation_does_not_imply_causation"target="_blank" rel="noopener">&ldquo;cum hoc ergo propter hoc&rdquo;</a></p>

</blockquote>
<p>The real world is &ldquo;complex,&rdquo; in the mathematical sense, which describes the exponentiality of results given a network of factors. There is no linear, step-by-step path in anyone&rsquo;s biography. Not even in twins who were born and lived together, under the same set of factors, at least in theory.</p>
<p><a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2465602/"target="_blank" rel="noopener"><img src="https://akitaonrails.s3.amazonaws.com/assets/image_asset/image/629/lorenz.jpg" alt="Lorenz Attractor"  loading="lazy" /></a></p>
<p>&ldquo;Complexity&rdquo; isn&rsquo;t what we&rsquo;re used to imagining it is, and it&rsquo;s what prevents us from predicting the weather more than the short term. It&rsquo;s what leads to Lorenz&rsquo;s famous butterfly, Mandelbrot&rsquo;s fractals, and Chaos Theory. And more recently to Modern Network Theory (including Social Networks) published by authors like <a href="https://www.amazon.com/Albert-L%C3%A1szl%C3%B3-Barab%C3%A1si/e/B001IGQIYW"target="_blank" rel="noopener">Barabási</a>, <a href="https://www.amazon.com/Steven-H.-Strogatz/e/B001KHB290"target="_blank" rel="noopener">Strogatz</a>, or <a href="https://www.amazon.com/Duncan-J.-Watts/e/B001ILHHR4"target="_blank" rel="noopener">Duncan</a>.</p>
<p>Anyone who knows me knows I&rsquo;ve been fascinated by this subject for a decade and have already recommended all these authors&rsquo; books. It was even the topic of my first public talk in 2008, <a href="http://web.archive.org/web/20170623100119/http://www.akitaonrails.com/2008/09/13/off-topic-matando-a-m-dia"target="_blank" rel="noopener">&ldquo;Killing the Average&rdquo;</a>.</p>
<p>Beyond those 10,000 hours of obsessive deliberate training toward continuous improvement, you also need to be exposed to as many situations and people as possible to increase your chances of <strong>&ldquo;serendipity&rdquo;</strong> which is the combination of <em>&ldquo;being in the right place, at the right time, and with the capability to seize the opportunity.&rdquo;</em></p>
<p><img src="https://akitaonrails.s3.amazonaws.com/assets/image_asset/image/630/serendipity.jpg" alt="Serendipity"  loading="lazy" /></p>
<p>This is what can lead to such &ldquo;success.&rdquo; There&rsquo;s no simple recipe, only hard work and a good dose of randomness. When all these factors align, the results can really <em>seem</em> &ldquo;miraculous&rdquo; or &ldquo;superhuman.&rdquo; And given enough time and the human habit of inflating stories each time they&rsquo;re retold, in a few years we create new Demigods.</p>
<h3>Killing Gods<span class="hx:absolute hx:-mt-20" id="killing-gods"></span>
    <a href="#killing-gods" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p>In every mythology there are many gods. Both popular manifestations of beliefs around the &ldquo;inexplicable&rdquo; facts of nature (at the time) like storms, volcanoes, the seasons, the weather.</p>
<p>And there are also the demigods, human beings who demonstrated some kind of superiority or so-called &ldquo;miraculous&rdquo; feats (at the time) that no other human could ever achieve, with a good dose of creativity in telling the story.</p>
<p>Both cases are explainable. Unfortunately the logical explanation is much less dramatic and doesn&rsquo;t make as good a story, most of the time. Curing diseases and advancing humanity isn&rsquo;t as &ldquo;sexy&rdquo; as a so-called &ldquo;miraculous&rdquo; feat.</p>
<p>But our society&rsquo;s style of mass communication (newspapers, magazines, television, films, social media) loves &ldquo;sexy stories.&rdquo; Negative news sells. Sexy sells. Logical facts don&rsquo;t generate audiences. And, worse, they elevate false myths to the status of &ldquo;truth.&rdquo;</p>
<p><a href="http://fortune.com/2015/07/23/humans-are-underrated/"target="_blank" rel="noopener"><img src="https://akitaonrails.s3.amazonaws.com/assets/image_asset/image/632/big_Colvin-Quotes-to-Insert5..jpeg" alt="Geoff Colvin"  loading="lazy" /></a></p>
<blockquote>
  <p>&ldquo;Tell a lie enough times and it becomes truth.&rdquo; - Joseph Goebbels</p>

</blockquote>
<p>Just because you yourself don&rsquo;t know the explanation for something, the argument that <em>&ldquo;therefore there is the possibility of something mystical&rdquo;</em> doesn&rsquo;t hold. If I can&rsquo;t explain that your God doesn&rsquo;t exist, neither can you prove that he does. It&rsquo;s a fallacious argument and has no place in a serious discussion.</p>
<p>And that&rsquo;s being nice, because whoever tells the story is the one who carries the <strong>burden of proof</strong>. Not me, the one listening, who&rsquo;s required to disprove you.</p>
<p>The last 200 years have been fantastic, because we&rsquo;ve been killing gods at rates never before recorded in the history of humanity. It&rsquo;s the reflection of how much we&rsquo;ve advanced in our knowledge about nature and how it works. There aren&rsquo;t many left, and we don&rsquo;t need to keep creating more.</p>
<p><img src="https://akitaonrails.s3.amazonaws.com/assets/image_asset/image/631/big_american_gods.jpg" alt="American Gods"  loading="lazy" /></p>
<h3>Conclusion<span class="hx:absolute hx:-mt-20" id="conclusion"></span>
    <a href="#conclusion" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p>The circumstances of why certain individuals are elevated to the status of demigods isn&rsquo;t an easy answer. Much less a linear sequence of events. Much less an entertainment film, with high doses of fiction and drama, that claims to be &ldquo;based on real facts.&rdquo;</p>
<p>We all live in a complex world, where everything is intertwined in an infinite network of possibilities. Each individual has very different circumstances.</p>
<p><img src="https://akitaonrails.s3.amazonaws.com/assets/image_asset/image/633/protein_network.gif" alt="Complex System"  loading="lazy" /></p>
<p>Many have no conditions at all and even so they exceed expectations, with superior determination, with superior dedication, with superior patience, and some really reach success.</p>
<blockquote>
  <p>&ldquo;Natural&rdquo; talent?</p>

</blockquote>
<p>Many have the conditions, but don&rsquo;t have dedication, don&rsquo;t have patience, don&rsquo;t have determination. And they fail. How many stories of heirs of great fortunes destroying the legacy of their ancestors?</p>
<blockquote>
  <p>Lack of Talent?</p>

</blockquote>
<p>Everyone has chances. But there&rsquo;s no point in waiting. The best thing to do is to build the capabilities as soon as possible so that, if randomness arrives and you&rsquo;re in the right place at the right time, you have the conditions to seize the opportunity and surf on it.</p>
<p>But there are no simple answers, no recipes, no miracles, and no talents naturally born with genius ready and, therefore, unreachable ideals.</p>
<p>Now, if you have the conditions and don&rsquo;t get success handed to you on a plate, it isn&rsquo;t the &ldquo;bad luck&rdquo; of having been born without the talent gene. It&rsquo;s pure <strong>laziness</strong>. Simple as that.</p>
<blockquote>
  <p>Don&rsquo;t have idols. Have references.</p>

</blockquote>
]]></content:encoded><category>psychology</category><category>learning</category><category>off-topic</category></item><item><title>[Off-Topic] Learning Statistics</title><link>https://akitaonrails.github.io/en/2016/11/01/off-topic-learning-statistics/</link><guid isPermaLink="true">https://akitaonrails.github.io/en/2016/11/01/off-topic-learning-statistics/</guid><pubDate>Tue, 01 Nov 2016 17:03:00 -0200</pubDate><description>&lt;p&gt;I&amp;rsquo;m forever talking bits and pieces about statistics. As a committed &lt;a href="https://web.archive.org/web/20161005211959/http://www.akitaonrails.com/science"target="_blank" rel="noopener"&gt;skeptic myself&lt;/a&gt;, I believe I can think beyond the &amp;ldquo;common sense&amp;rdquo; that most people rely on. I&amp;rsquo;m very familiar with biases, skewed data, and wrong questions leading to wrong answers.&lt;/p&gt;
&lt;p&gt;I can probably pinpoint why a certain argument is wrong. But I am very incompetent the other way around: given a proper data collection, how to do proper exploratory data analysis? What are the correct methodologies for any given scenario? And of course, all the math involved.&lt;/p&gt;</description><content:encoded><![CDATA[<p>I&rsquo;m forever talking bits and pieces about statistics. As a committed <a href="https://web.archive.org/web/20161005211959/http://www.akitaonrails.com/science"target="_blank" rel="noopener">skeptic myself</a>, I believe I can think beyond the &ldquo;common sense&rdquo; that most people rely on. I&rsquo;m very familiar with biases, skewed data, and wrong questions leading to wrong answers.</p>
<p>I can probably pinpoint why a certain argument is wrong. But I am very incompetent the other way around: given a proper data collection, how to do proper exploratory data analysis? What are the correct methodologies for any given scenario? And of course, all the math involved.</p>
<p>I just posted 2 articles to shed some light on exactly that. Most developers&rsquo; &ldquo;common sense&rdquo; on dealing with data is primitive aggregations such as sums and averages. Start talking about &ldquo;standard deviation&rdquo; and you lost half of the developer population. Start talking about binomial or Poisson distributions and you lost the remaining half. Now get into linear regression and bayesian statistics, and almost everybody left the room already.</p>
<p>We live in the 21st century. <a href="https://web.archive.org/web/20161109180927/http://www.smartinsights.com/internet-marketing-statistics/happens-online-60-seconds/"target="_blank" rel="noopener">Every 60 seconds</a>, Facebook receives an extra 3.3 million new posts, YouTube receives 400 hours of videos, Instagram receives 55,555 uploaded photos, and WhatsApp exchanges 44.4 million messages. Even e-mail: more than 206 million of them are fired off. By the time you finish reading this post, you can multiply that amount by 5 to 10.</p>
<blockquote>
  <p>&ldquo;We are drowning in information,</p>

</blockquote>
<blockquote>
  <p>but we are starved for knowledge&rdquo;</p>

</blockquote>
<blockquote>
  <p>– Various authors, original probably John Naisbitt</p>

</blockquote>
<p>I will spend a few weeks diving into <a href="https://www.r-project.org/"target="_blank" rel="noopener">R</a>. Yes, many people will talk about Julia, but we can&rsquo;t deny the amazing body of knowledge, the experience, and the robust and extensive set of packages available for R, including learning material. There&rsquo;s a great tool called <a href="https://posit.co/blog/announcing-rstudio-v1-0"target="_blank" rel="noopener">RStudio</a>, which just saw its 1.0 release.</p>
<p>And within the many materials I gathered, one stood out just for its introduction, and I still have to review the book as a whole. It&rsquo;s called <a href="https://web.archive.org/web/20161108174205/http://health.adelaide.edu.au/psychology/ccs/teaching/lsr/"target="_blank" rel="noopener">&ldquo;Learning Statistics with R&rdquo;</a>, by Daniel Navarro from the University of Adelaide, Australia. I find it interesting because it&rsquo;s a psychology professor teaching proper statistics through the basics of R, which is exactly what I wanted. You can purchase a hardcopy or download the free PDF.</p>
<p>I like the introduction so much that I wanted to share a few paragraphs to motivate you to join me in learning better statistics. So let&rsquo;s dive right into it:</p>
<h3>The cautionary tale of Simpson&rsquo;s paradox<span class="hx:absolute hx:-mt-20" id="the-cautionary-tale-of-simpsons-paradox"></span>
    <a href="#the-cautionary-tale-of-simpsons-paradox" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p>The following is a true story. In 1973, the University of California, Berkeley got into some trouble over its admissions of students into postgraduate courses. Specifically, the thing that caused the problem was that the gender breakdown of their admissions looked like this &hellip;</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><pre><code>         Number of applicants     Percent admitted
Males           8442                    44%
Females         4321                    35%</code></pre></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>&hellip; and they <strong>got sued</strong>. Given that there were nearly 13,000 applicants, a difference of 9% in admission rates between males and females is just way too big to be a coincidence. Pretty compelling data, right? And if I were to say to you that these data actually reflect a weak bias in favor of females, you&rsquo;d probably think that I was either crazy or sexist.</p>
<p>Oddly, it&rsquo;s actually sort of true &hellip; after Berkeley got sued, people started looking very carefully at the admissions data (Bickel, Hammel, &amp; O&rsquo;Connell, 1975). And remarkably, when they looked at it on a department by department basis, it turned out that most of the departments actually had a slightly higher success rate for female applicants than for male applicants. The table below shows the admission figures for the six largest departments (with the names of the departments removed for privacy reasons):</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><pre><code>                      Males                          Females
Department   Applicants   Percent admitted   Applicants   Percent admitted
A                825             62%            108              82%
B                560             63%             25              68%
C                325             37%            593              34%
D                417             33%            375              35%
E                191             28%            393              24%
F                272              6%            341               7%</code></pre></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>Remarkably, most departments had a <em>higher</em> rate of admissions for females than for males! Yet the overall rate of admission across the university for females was <em>lower</em> than for males. How can this be? How can both of these statements be true at the same time?</p>
<p>Here&rsquo;s what&rsquo;s going on. Firstly, notice that the departments are not equal to one another in terms of their admission percentages: some departments (e.g., engineering, chemistry) tended to admit a high percentage of the qualified applicants, whereas others (e.g., English) tended to reject most of the candidates, even if they were high quality.</p>
<p>So, among the six departments shown above, notice that department A is the most generous, followed by B, C, D, E and F in that order. Next, notice that males and females tended to apply to different departments. If we rank the departments in terms of the total number of male applicants, we get <strong>A</strong> &gt; <strong>B</strong> &gt; D &gt; C &gt; F &gt; E (the &ldquo;easy&rdquo; departments are in bold).</p>
<p>On the whole, males tended to apply to the departments that had high admission rates. Now compare this to how the female applicants distributed themselves. Ranking the departments in terms of the total number of female applicants produces a quite different ordering C &gt; E &gt; D &gt; F &gt; <strong>A</strong> &gt; <strong>B</strong>.</p>
<p>In other words, what these data seem to be suggesting is that the female applicants tended to apply to &ldquo;harder&rdquo; departments.</p>
<p><img src="https://akitaonrails.s3.amazonaws.com/assets/image_asset/image/571/Screen_Shot_2016-11-01_at_16.58.47.png" alt="Figure 1"  loading="lazy" /></p>
<p>And in fact, if we look at all Figure 1.1 we see that this trend is systematic, and quite striking. This effect is known as <strong>Simpson&rsquo;s paradox</strong>. It&rsquo;s not common, but it does happen in real life, and most people are very surprised by it when they first encounter it, and many people refuse to even believe that it&rsquo;s real. It is very real. And while there are lots of very subtle statistical lessons buried in there, I want to use it to make a much more important point . . . doing research is hard, and there are lots of subtle, counterintuitive traps lying in wait for the unwary. That&rsquo;s reason #2 why scientists love statistics, and why we teach research methods. Because science is hard, and the truth is sometimes cunningly hidden in the nooks and crannies of complicated data.</p>
<p>Before leaving this topic entirely, I want to point out something else really critical that is often overlooked in a research methods class. Statistics only solves part of the problem. Remember that we started all this with the concern that Berkeley&rsquo;s admissions processes might be unfairly biased against female applicants. When we looked at the &ldquo;aggregated&rdquo; data, it did seem like the university was discriminating against women, but when we &ldquo;disaggregate&rdquo; and looked at the individual behavior of all the departments, it turned out that the actual departments were, if anything, slightly biased in favor of women.</p>
<p>The gender bias in total admissions was caused by the fact that women tended to self-select for harder departments. From a purely legal perspective, that puts the university in the clear. Postgraduate admissions are determined at the level of the individual department (and there are very good reasons to do that), and at the level of individual departments, the decisions are more or less unbiased (the weak bias in favor of females at that level is small, and not consistent across departments). Since the university can&rsquo;t dictate which departments people choose to apply to, and the decision making takes place at the level of the department it can hardly be held accountable for any biases that those choices produce.</p>
<p>That was the basis for my somewhat glib remarks earlier, but that&rsquo;s not exactly the whole story, is it? After all, if we&rsquo;re interested in this from a more sociological and psychological perspective, we might want to ask why there are such strong gender differences in applications. Why do males tend to apply to engineering more often than females, and why is this reversed for the English department? And why is it the case that the departments that tend to have a female-application bias tend to have lower overall admission rates than those departments that have a male-application bias? Might this not still reflect a gender bias, even though every single department is itself unbiased? It might.</p>
<p>Suppose, hypothetically, that males preferred to apply to &ldquo;hard sciences&rdquo; and females prefer &ldquo;humanities&rdquo;. And suppose further that the reason why the humanities departments have low admission rates is because the government doesn&rsquo;t want to fund the humanities (Ph.D. places, for instance, are often tied to government funded research projects). Does that constitute a gender bias? Or just an unenlightened view of the value of the humanities? What if someone at a high level in the government cut the humanities funds because they felt that the humanities are &ldquo;useless chick stuff&rdquo;. That seems pretty blatantly gender biased. None of this falls within the purview of statistics, but it matters to the research project.</p>
<p>If you&rsquo;re interested in the overall structural effects of subtle gender biases, then you probably want to look at both the aggregated and disaggregated data. If you&rsquo;re interested in the decision making process at Berkeley itself then you&rsquo;re probably only interested in the disaggregated data.</p>
<p>In short there are a lot of critical questions that you can&rsquo;t answer with statistics, but the answers to those questions will have a huge impact on how you analyze and interpret data. And this is the reason why you should always think of statistics as a tool to help you learn about your data, no more and no less. It&rsquo;s a powerful tool to that end, but there&rsquo;s no substitute for careful thought.</p>
<h3>Download the Book<span class="hx:absolute hx:-mt-20" id="download-the-book"></span>
    <a href="#download-the-book" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p>Did you get intrigued? So <a href="https://web.archive.org/web/20161108174205/http://health.adelaide.edu.au/psychology/ccs/teaching/lsr/"target="_blank" rel="noopener">download the book</a> and let&rsquo;s study some statistics beyond the mere basics. I am not saying this is the best book, just one that seems interesting, and if you happen to know a good book teaching statistics for novices through the use of R without any prior knowledge, let me know in the comments section below.</p>
]]></content:encoded><category>science</category><category>learning</category><category>off-topic</category></item><item><title>Erlang's Ping Pong (tut15) in Clojure and Elixir</title><link>https://akitaonrails.github.io/en/2015/12/09/erlang-s-ping-pong-tut15-in-clojure-and-elixir/</link><guid isPermaLink="true">https://akitaonrails.github.io/en/2015/12/09/erlang-s-ping-pong-tut15-in-clojure-and-elixir/</guid><pubDate>Wed, 09 Dec 2015 14:42:00 -0200</pubDate><description>&lt;p&gt;This is a very short post just because I thought it was fun. I was reading &lt;a href="http://blog.paralleluniverse.co/2013/05/02/quasar-pulsar/"target="_blank" rel="noopener"&gt;this very enlightening article&lt;/a&gt; on Clojure&amp;rsquo;s Quasar/Pulsar compared to Erlang and how they are trying to plug the holes on the JVM shortcomings.&lt;/p&gt;
&lt;p&gt;When you&amp;rsquo;re learning Erlang through its official documentation, the first thing you build in the &lt;a href="http://www.erlang.org/doc/getting_started/conc_prog.html#id67347"target="_blank" rel="noopener"&gt;chapters on Processes&lt;/a&gt; is a very simple Ping Pong code that looks like this:&lt;/p&gt;
&lt;div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code"&gt;
&lt;div&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-erlang" data-lang="erlang"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;-&lt;/span&gt;&lt;span class="ni"&gt;module&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;tut15&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;-&lt;/span&gt;&lt;span class="ni"&gt;export&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="n"&gt;start&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ping&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;pong&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]).&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nf"&gt;ping&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;Pong_PID&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nv"&gt;Pong_PID&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt; &lt;span class="n"&gt;finished&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nn"&gt;io&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nf"&gt;format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;ping finished&lt;/span&gt;&lt;span class="si"&gt;~n&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[]);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nf"&gt;ping&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;N&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;Pong_PID&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nv"&gt;Pong_PID&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;ping&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;()},&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;receive&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;pong&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nn"&gt;io&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nf"&gt;format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;Ping received pong&lt;/span&gt;&lt;span class="si"&gt;~n&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[])&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;end&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;ping&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;N&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;Pong_PID&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nf"&gt;pong&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;receive&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;finished&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nn"&gt;io&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nf"&gt;format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;Pong finished&lt;/span&gt;&lt;span class="si"&gt;~n&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[]);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;ping&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;Ping_PID&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nn"&gt;io&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nf"&gt;format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;Pong received ping&lt;/span&gt;&lt;span class="si"&gt;~n&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[]),&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nv"&gt;Ping_PID&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt; &lt;span class="n"&gt;pong&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;pong&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;end&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nf"&gt;start&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nv"&gt;Pong_PID&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;spawn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;tut15&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;pong&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[]),&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nb"&gt;spawn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;tut15&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ping&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;Pong_PID&lt;/span&gt;&lt;span class="p"&gt;]).&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0"&gt;
&lt;button
class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
title="Copy code"
&gt;
&lt;div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"&gt;&lt;/div&gt;
&lt;/button&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;It&amp;rsquo;s not pretty, it&amp;rsquo;s Prolog-ish. The Clojure article claims how close they got with lightweight threads (true green threads) and this is the same exercise done in Clojure:&lt;/p&gt;</description><content:encoded><![CDATA[<p>This is a very short post just because I thought it was fun. I was reading <a href="http://blog.paralleluniverse.co/2013/05/02/quasar-pulsar/"target="_blank" rel="noopener">this very enlightening article</a> on Clojure&rsquo;s Quasar/Pulsar compared to Erlang and how they are trying to plug the holes on the JVM shortcomings.</p>
<p>When you&rsquo;re learning Erlang through its official documentation, the first thing you build in the <a href="http://www.erlang.org/doc/getting_started/conc_prog.html#id67347"target="_blank" rel="noopener">chapters on Processes</a> is a very simple Ping Pong code that looks like this:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-erlang" data-lang="erlang"><span class="line"><span class="cl"><span class="p">-</span><span class="ni">module</span><span class="p">(</span><span class="n">tut15</span><span class="p">).</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="p">-</span><span class="ni">export</span><span class="p">([</span><span class="n">start</span><span class="o">/</span><span class="mi">0</span><span class="p">,</span> <span class="n">ping</span><span class="o">/</span><span class="mi">2</span><span class="p">,</span> <span class="n">pong</span><span class="o">/</span><span class="mi">0</span><span class="p">]).</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nf">ping</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="nv">Pong_PID</span><span class="p">)</span> <span class="o">-&gt;</span>
</span></span><span class="line"><span class="cl">    <span class="nv">Pong_PID</span> <span class="o">!</span> <span class="n">finished</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">    <span class="nn">io</span><span class="p">:</span><span class="nf">format</span><span class="p">(</span><span class="s">&#34;ping finished</span><span class="si">~n</span><span class="s">&#34;</span><span class="p">,</span> <span class="p">[]);</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nf">ping</span><span class="p">(</span><span class="nv">N</span><span class="p">,</span> <span class="nv">Pong_PID</span><span class="p">)</span> <span class="o">-&gt;</span>
</span></span><span class="line"><span class="cl">    <span class="nv">Pong_PID</span> <span class="o">!</span> <span class="p">{</span><span class="n">ping</span><span class="p">,</span> <span class="n">self</span><span class="p">()},</span>
</span></span><span class="line"><span class="cl">    <span class="k">receive</span>
</span></span><span class="line"><span class="cl">        <span class="n">pong</span> <span class="o">-&gt;</span>
</span></span><span class="line"><span class="cl">            <span class="nn">io</span><span class="p">:</span><span class="nf">format</span><span class="p">(</span><span class="s">&#34;Ping received pong</span><span class="si">~n</span><span class="s">&#34;</span><span class="p">,</span> <span class="p">[])</span>
</span></span><span class="line"><span class="cl">    <span class="k">end</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">    <span class="n">ping</span><span class="p">(</span><span class="nv">N</span> <span class="o">-</span> <span class="mi">1</span><span class="p">,</span> <span class="nv">Pong_PID</span><span class="p">).</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nf">pong</span><span class="p">()</span> <span class="o">-&gt;</span>
</span></span><span class="line"><span class="cl">    <span class="k">receive</span>
</span></span><span class="line"><span class="cl">        <span class="n">finished</span> <span class="o">-&gt;</span>
</span></span><span class="line"><span class="cl">            <span class="nn">io</span><span class="p">:</span><span class="nf">format</span><span class="p">(</span><span class="s">&#34;Pong finished</span><span class="si">~n</span><span class="s">&#34;</span><span class="p">,</span> <span class="p">[]);</span>
</span></span><span class="line"><span class="cl">        <span class="p">{</span><span class="n">ping</span><span class="p">,</span> <span class="nv">Ping_PID</span><span class="p">}</span> <span class="o">-&gt;</span>
</span></span><span class="line"><span class="cl">            <span class="nn">io</span><span class="p">:</span><span class="nf">format</span><span class="p">(</span><span class="s">&#34;Pong received ping</span><span class="si">~n</span><span class="s">&#34;</span><span class="p">,</span> <span class="p">[]),</span>
</span></span><span class="line"><span class="cl">            <span class="nv">Ping_PID</span> <span class="o">!</span> <span class="n">pong</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">            <span class="n">pong</span><span class="p">()</span>
</span></span><span class="line"><span class="cl">    <span class="k">end</span><span class="p">.</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nf">start</span><span class="p">()</span> <span class="o">-&gt;</span>
</span></span><span class="line"><span class="cl">    <span class="nv">Pong_PID</span> <span class="o">=</span> <span class="nb">spawn</span><span class="p">(</span><span class="n">tut15</span><span class="p">,</span> <span class="n">pong</span><span class="p">,</span> <span class="p">[]),</span>
</span></span><span class="line"><span class="cl">    <span class="nb">spawn</span><span class="p">(</span><span class="n">tut15</span><span class="p">,</span> <span class="n">ping</span><span class="p">,</span> <span class="p">[</span><span class="mi">3</span><span class="p">,</span> <span class="nv">Pong_PID</span><span class="p">]).</span></span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>It&rsquo;s not pretty, it&rsquo;s Prolog-ish. The Clojure article claims how close they got with lightweight threads (true green threads) and this is the same exercise done in Clojure:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-lisp" data-lang="lisp"><span class="line"><span class="cl"><span class="p">(</span><span class="nv">defsfn</span> <span class="nv">pong</span> <span class="nv">[]</span>
</span></span><span class="line"><span class="cl"> <span class="p">(</span><span class="k">if</span> <span class="p">(</span><span class="nv">==</span> <span class="nv">n</span> <span class="mi">0</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="p">(</span><span class="nb">do</span>
</span></span><span class="line"><span class="cl">      <span class="p">(</span><span class="nv">!</span> <span class="ss">:pong</span> <span class="ss">:finished</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">      <span class="p">(</span><span class="nv">println</span> <span class="s">&#34;ping finished&#34;</span><span class="p">))</span>
</span></span><span class="line"><span class="cl">    <span class="p">(</span><span class="nb">do</span>
</span></span><span class="line"><span class="cl">      <span class="p">(</span><span class="nv">!</span> <span class="ss">:pong</span> <span class="nv">[:ping</span> <span class="nv">@self]</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">      <span class="p">(</span><span class="nv">receive</span>
</span></span><span class="line"><span class="cl">       <span class="ss">:pong</span> <span class="p">(</span><span class="nv">println</span> <span class="s">&#34;Ping received pong&#34;</span><span class="p">))</span>
</span></span><span class="line"><span class="cl">      <span class="p">(</span><span class="nv">recur</span> <span class="p">(</span><span class="nv">dec</span> <span class="nv">n</span><span class="p">)))))</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="p">(</span><span class="nv">defsfn</span> <span class="nv">pong</span> <span class="nv">[]</span>
</span></span><span class="line"><span class="cl">  <span class="p">(</span><span class="nv">receive</span>
</span></span><span class="line"><span class="cl">   <span class="ss">:finished</span> <span class="p">(</span><span class="nv">println</span> <span class="s">&#34;Pong finished&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">   <span class="nv">[:ping</span> <span class="nv">ping]</span> <span class="p">(</span><span class="nb">do</span>
</span></span><span class="line"><span class="cl">                  <span class="p">(</span><span class="nv">println</span> <span class="s">&#34;Pong received ping&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">                  <span class="p">(</span><span class="nv">!</span> <span class="nv">ping</span> <span class="ss">:pong</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">                  <span class="p">(</span><span class="nv">recur</span><span class="p">))))</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="p">(</span><span class="nv">defn</span> <span class="nv">-main</span> <span class="nv">[]</span>
</span></span><span class="line"><span class="cl">  <span class="p">(</span><span class="nv">register</span> <span class="ss">:pong</span> <span class="p">(</span><span class="nv">spawn</span> <span class="nv">pong</span><span class="p">))</span>
</span></span><span class="line"><span class="cl">  <span class="p">(</span><span class="nv">spawn</span> <span class="nv">ping</span> <span class="mi">3</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">  <span class="ss">:ok</span><span class="p">)</span></span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>People that like the Lisp-y aesthetics of programming directly in the AST representation through the structure of parenthesis based blocks will find this very pretty.</p>
<p>I personally spent years looking into code like this (Common Lisp, Elisp, Scheme, etc) and I still can&rsquo;t get used to it. Once you have a competent editor such as Emacs, that can deal with the proper parenthesis handling, it&rsquo;s easier, yes, but I still can&rsquo;t find the joy in doing this kind of hackish syntax.</p>
<p>Elixir is much more than a new syntax on top of Erlang, as the great book <a href="https://pragprog.com/book/cmelixir/metaprogramming-elixir"target="_blank" rel="noopener">Metaprogramming Elixir</a> will teach you. It opens up the entire Erlang BEAM AST through the usage of the <a href="http://elixir-lang.org/getting-started/meta/quote-and-unquote.html"target="_blank" rel="noopener">quote/unquote</a> mechanics, making programming directly into the AST through <a href="http://elixir-lang.org/getting-started/meta/macros.html"target="_blank" rel="noopener">&ldquo;Hygienic Macros&rdquo;</a> a breeze. It&rsquo;s really the best of both worlds of having a modern, good looking, joyful syntax and the same power a Lisp-y language gives you in terms of well behaved macros.</p>
<p>Now, this is the same example as above, in Elixir:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-ruby" data-lang="ruby"><span class="line"><span class="cl"><span class="n">defmodule</span> <span class="no">ExPingPongTut15</span> <span class="k">do</span>
</span></span><span class="line"><span class="cl">  <span class="k">def</span> <span class="nf">ping</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="n">pong_pid</span><span class="p">)</span> <span class="k">do</span>
</span></span><span class="line"><span class="cl">    <span class="nb">send</span> <span class="n">pong_pid</span><span class="p">,</span> <span class="ss">:finished</span>
</span></span><span class="line"><span class="cl">    <span class="no">IO</span><span class="o">.</span><span class="n">puts</span><span class="p">(</span><span class="s2">&#34;ping finished&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">  <span class="k">end</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">  <span class="k">def</span> <span class="nf">ping</span><span class="p">(</span><span class="n">n</span><span class="p">,</span> <span class="n">pong_pid</span><span class="p">)</span> <span class="k">do</span>
</span></span><span class="line"><span class="cl">    <span class="nb">send</span> <span class="n">pong_pid</span><span class="p">,</span> <span class="p">{</span><span class="ss">:ping</span><span class="p">,</span> <span class="nb">self</span><span class="p">}</span>
</span></span><span class="line"><span class="cl">    <span class="n">receive</span> <span class="k">do</span>
</span></span><span class="line"><span class="cl">      <span class="ss">:pong</span> <span class="o">-&gt;</span> <span class="no">IO</span><span class="o">.</span><span class="n">puts</span><span class="p">(</span><span class="s2">&#34;Ping received pong&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="k">end</span>
</span></span><span class="line"><span class="cl">    <span class="n">ping</span><span class="p">(</span><span class="n">n</span> <span class="o">-</span> <span class="mi">1</span><span class="p">,</span> <span class="n">pong_pid</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">  <span class="k">end</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">  <span class="k">def</span> <span class="nf">pong</span> <span class="k">do</span>
</span></span><span class="line"><span class="cl">    <span class="n">receive</span> <span class="k">do</span>
</span></span><span class="line"><span class="cl">      <span class="ss">:finished</span> <span class="o">-&gt;</span> <span class="no">IO</span><span class="o">.</span><span class="n">puts</span><span class="p">(</span><span class="s2">&#34;Pong finished&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">      <span class="p">{</span><span class="ss">:ping</span><span class="p">,</span> <span class="n">ping_pid</span><span class="p">}</span> <span class="o">-&gt;</span>
</span></span><span class="line"><span class="cl">        <span class="no">IO</span><span class="o">.</span><span class="n">puts</span><span class="p">(</span><span class="s2">&#34;Pong received ping&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">        <span class="nb">send</span> <span class="n">ping_pid</span><span class="p">,</span> <span class="ss">:pong</span>
</span></span><span class="line"><span class="cl">        <span class="n">pong</span><span class="p">()</span>
</span></span><span class="line"><span class="cl">    <span class="k">end</span>
</span></span><span class="line"><span class="cl">  <span class="k">end</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">  <span class="k">def</span> <span class="nf">start</span> <span class="k">do</span>
</span></span><span class="line"><span class="cl">    <span class="n">pong_pid</span> <span class="o">=</span> <span class="n">spawn</span><span class="p">(</span><span class="n">fn</span> <span class="o">-&gt;</span> <span class="n">pong</span> <span class="k">end</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="n">spawn</span><span class="p">(</span><span class="n">fn</span> <span class="o">-&gt;</span> <span class="n">ping</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="n">pong_pid</span><span class="p">)</span> <span class="k">end</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">  <span class="k">end</span>
</span></span><span class="line"><span class="cl"><span class="k">end</span></span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>Because of the power of pattern matching in the function argument signatures, you can define 2 separated functions, avoiding the &ldquo;if&rdquo; as in the Clojure example. Of course, because it&rsquo;s Clojure and it has a complete macro system, and because its <a href="https://github.com/clojure/core.match"target="_blank" rel="noopener">core.match</a> has the proper pattern matching mechanisms, you can emulate the same thing through external libraries such as <a href="https://github.com/killme2008/defun"target="_blank" rel="noopener">defun</a> though.</p>
<p>This was just a simple exercise, I hope it shed some light on the basic similarities between these 3 languages. And as &ldquo;ugly&rdquo; as Erlang may feel, I still feel more comfortable with its quirks than nested parenthesis.</p>
]]></content:encoded><category>programming-languages</category><category>elixir-and-erlang</category><category>learning</category></item><item><title>My first week learning Elixir</title><link>https://akitaonrails.github.io/en/2015/11/03/my-first-week-learning-elixir/</link><guid isPermaLink="true">https://akitaonrails.github.io/en/2015/11/03/my-first-week-learning-elixir/</guid><pubDate>Tue, 03 Nov 2015 11:07:00 -0200</pubDate><description>&lt;p&gt;I set myself to try to learn enough Elixir to be comfortable tackling some small projects. After 1 entire week of studying close to 6 hours a day (around 42 hours) I&amp;rsquo;m still not entirely comfortable, but I think the main concepts have been able to sink in and I can fully appreciate what Elixir has to offer.&lt;/p&gt;
&lt;p&gt;This is not my first time touching Erlang though. I was fortunate enough to be able to participate in a small workshop at QCon San Francisco 2009 with no other than &lt;a href="http://www.oreilly.com/pub/au/3373"target="_blank" rel="noopener"&gt;Francesco Cesarini&lt;/a&gt;. Thanks to him I was able to understand some of Erlang&amp;rsquo;s exquisite syntax, the correct concept of Erlang processes, how immutability and pattern matching govern their programming flow. It was very enlightening. Unfortunately I couldn&amp;rsquo;t see myself doing Erlang full time. I just hoped those mechanisms were available in a language such as Ruby &amp;hellip;&lt;/p&gt;</description><content:encoded><![CDATA[<p>I set myself to try to learn enough Elixir to be comfortable tackling some small projects. After 1 entire week of studying close to 6 hours a day (around 42 hours) I&rsquo;m still not entirely comfortable, but I think the main concepts have been able to sink in and I can fully appreciate what Elixir has to offer.</p>
<p>This is not my first time touching Erlang though. I was fortunate enough to be able to participate in a small workshop at QCon San Francisco 2009 with no other than <a href="http://www.oreilly.com/pub/au/3373"target="_blank" rel="noopener">Francesco Cesarini</a>. Thanks to him I was able to understand some of Erlang&rsquo;s exquisite syntax, the correct concept of Erlang processes, how immutability and pattern matching govern their programming flow. It was very enlightening. Unfortunately I couldn&rsquo;t see myself doing Erlang full time. I just hoped those mechanisms were available in a language such as Ruby &hellip;</p>
<p>Between 2007 and 2009 Erlang had a renaissance among language aficionados because of the <a href="https://pragprog.com/book/jaerlang/programming-erlang"target="_blank" rel="noopener">&ldquo;Programming Erlang&rdquo;</a> book released by The Pragmatic Programmers, written by no other than Joe Armstrong himself, Erlang&rsquo;s creator. Dave Thomas <a href="http://pragdave.me/blog/2007/04/15/a-first-erlang-program/"target="_blank" rel="noopener">tried to push Erlang</a> a lot in 2007, but even he wasn&rsquo;t able to sell Erlang&rsquo;s powerful engine because of the strange presentation of the syntax.</p>
<p>After 2009, José Valim had a long run to release the controversial Rails 3.0 big rewrite (which was fortunately a success) and he decided to step aside and try something else. His own research led him to Erlang for the reasons I mentioned above, but he decided that he could solve the &ldquo;quirky syntax&rdquo; problem. You can see some of his very first talks about Elixir in the Rubyconf Brasil <a href="https://www.eventials.com/locaweb/jose-valim-vamos-falar-sobre-concorrencia/"target="_blank" rel="noopener">2012</a> and <a href="https://www.eventials.com/locaweb/elixir-uma-aproximacao-pragmatica-e-concorrente-a-programacao/"target="_blank" rel="noopener">2013</a> recordings. The very early beta was released in 2012 and he finally released the stable 1.0 in 2015. Chris McCord was able to release Phoenix stable soon after.</p>
<p>When I first heard about this, Elixir found its place under my radar. I didn&rsquo;t jump right in though, between 2009 and 2015 we had a surge in &ldquo;functional programming&rdquo; interest because of the JavaScript renaissance, the release of Scala, Go Lang, Clojure, the promise of Rust, and so on. So I waited, carefully following every one of them.</p>
<p>Then 2014 came and suddenly everybody else found out about Erlang, with its spartan infrastructure that enabled WhatsApp to serve half a billion users with absurdly low costs and made Facebook buy them for a hefty USD 19 billion! We all knew about the WhatsApp case since at least 2011, but it was not until 2014 that everybody noticed. But not even this was able to steer Erlang to the forefront just yet.</p>
<p>When Elixir stable was released this year, followed by Phoenix stable, I knew it was time for me to start investing some quality time with it. Erlang&rsquo;s core sells itself: everybody else is doing concurrency by means of immutability and lightweight threads (or green threads, NxM strategy between green threads and real threads). It is actually quite trivial to max out the machine just by spawning millions of light processes nowadays. What makes it difficult is to create a system that has the potential to actually achieve <a href="http://stackoverflow.com/questions/8426897/erlangs-99-9999999-nine-nines-reliability"target="_blank" rel="noopener">99.9999999% reliability</a>. Spawning processes is easy, how do you coordinate them in the same machine? How do you coordinate them between different machines? How do you update a living system without bringing it down? How do you handle failures? How do you supervise everything?</p>
<p>These are the questions that Erlang solved decades ago (<a href="http://www.erlang.org/download/armstrong_thesis_2003.pdf"target="_blank" rel="noopener">20 years ago</a>) with the now famous OTP, Ericsson&rsquo;s Open Telecom Platform. Something that was created to meet the performance and reliability needs of telecommunications at large scale. When we say it like this it feels like it will be a royal pain to learn, something akin to the JEE (Java Enterprise Edition), but worse.</p>
<p>And I can tell you that learning enough OTP to be productive is actually <strong>very</strong> easy (you won&rsquo;t achieve the legendary 99.9999999% reliability out of the blue, but you&rsquo;ll be able to build something reliable enough). Think of it as a collection of half a dozen modules, with a couple of function interfaces to implement, a few words of configuration and you&rsquo;re basically done. It&rsquo;s so easy and lightweight that in fact many small libraries are written with OTP in mind and it&rsquo;s easy to just &ldquo;plug and play&rdquo;. It&rsquo;s not a heavyweight server-side only thing.</p>
<p>To harness that power you will need to learn Elixir, unofficially, a language that has an uncanny resemblance to Ruby, built to spill out Erlang bytecode for its BEAM virtual machine. You can&rsquo;t find a better combination.</p>
<h3>One Week<span class="hx:absolute hx:-mt-20" id="one-week"></span>
    <a href="#one-week" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p>Having said all that, let&rsquo;s cut to the chase. You definitely want to get acquainted with the Functional Programming concepts such as immutability, higher order functions, pattern matching. I made a list of links for those concepts in <a href="http://www.akitaonrails.com/2015/10/28/personal-thoughts-on-the-current-functional-programming-bandwagon"target="_blank" rel="noopener">my previous post</a>, I recommend you read it.</p>
<p>Assuming you&rsquo;re already a programmer in a dynamic language (Ruby, Python, JavaScript, etc.) and you want the fast crash course, start by buying <a href="https://pragprog.com/book/elixir/programming-elixir"target="_blank" rel="noopener">&ldquo;Programming Elixir&rdquo;</a> by Dave Thomas and actually do each piece of code and the exercises in order. It&rsquo;s a book so easy to read that you will be able to finish it in less than a week. I did it in 3 days. The Elixir-Lang official website has <a href="http://elixir-lang.org/getting-started/introduction.html"target="_blank" rel="noopener">very good documentation</a> as well and they link many <a href="http://elixir-lang.org/learning.html"target="_blank" rel="noopener">good books</a> you want to read later.</p>
<p>Then subscribe to Josh Adams&rsquo; <a href="http://elixirsips.com"target="_blank" rel="noopener">Elixir Sips</a>. If you&rsquo;re a Rubyist, it&rsquo;s like watching Ryan Bates&rsquo; Railscasts from the beginning all over again. Although it&rsquo;s more akin to Avdi Grimm&rsquo;s RubyTapas show, with very short episodes just for you to have your weekly fix on Elixir.</p>
<p>You can watch some of the episodes for free in low resolution, but I highly recommend you subscribe and watch the HD versions. It&rsquo;s well worth it. There are more than 200 episodes. I&rsquo;ve watched more than 130 in 12 hours :-) So I figure I&rsquo;d take another 2 days to watch everything.</p>
<p>You should definitely watch everything if you can, but if you can&rsquo;t, let me list the ones I think are the essentials. First of all, keep in mind that Josh has been doing this for quite a while, when he started Elixir was version 0.13 or below and Erlang was version 17 or below.</p>
<p>For example, episode <a href="https://elixirsips.dpdcart.com/subscriber/post?id=815"target="_blank" rel="noopener">171 - Erlang 18 and time</a> highlights the new Time API. You must know about this. Episode <a href="https://elixirsips.dpdcart.com/subscriber/post?id=460"target="_blank" rel="noopener">056 - Migrating Records to Maps</a> shows a new feature in Erlang 17 and Elixir where it makes Maps more preferable than the previous Records. Maps are explained in episodes <a href="https://elixirsips.dpdcart.com/subscriber/post?id=453"target="_blank" rel="noopener">054</a> and <a href="https://elixirsips.dpdcart.com/subscriber/post?id=454"target="_blank" rel="noopener">055</a>. If you learn the Phoenix web framework, it uses the ORM Ecto underneath and Ecto models are Maps, so you must know this.</p>
<p>It means that the first 180 episodes, at least, are using previous versions of Erlang, Elixir, Phoenix, etc and you must keep in mind that new versions will have different APIs. This was one of the reasons I waited for the stable releases, because it was only natural that projects evolve and take time to reach stable APIs, and chasing several moving targets is really difficult for the uninitiated.</p>
<p>Having said that, watch this list first:</p>
<ul>
<li>001 - Introduction and Installing Elixir.mp4</li>
<li>002 - Basic Elixir.mp4</li>
<li>003 - Pattern Matching.mp4</li>
<li>004 - Functions.mp4</li>
<li>005 - Mix and Modules.mp4</li>
<li>006 - Unit Testing.mp4</li>
<li>010 - List Comprehensions.mp4</li>
<li>011 - Records.mp4</li>
<li>012 - Processes.mp4</li>
<li>013 - Processes, Part 2.mp4</li>
<li>014 - OTP Part 1_ Servers.mp4</li>
<li>015 - OTP Part 2_ Finite State Machines.mp4</li>
<li>016 - Pipe Operator.mp4</li>
<li>017 - Enum, Part 1.mp4</li>
<li>018 - Enum, Part 2.mp4</li>
<li>019 - Enum, Part 3.mp4</li>
<li>020 - OTP, Part 3 - GenEvent.mp4</li>
<li>022 - OTP, Part 4_ Supervisors.mp4</li>
<li>023 - OTP, Part 5_ Supervisors and Persistent State.mp4</li>
<li>024 - Ecto, Part 1.mp4</li>
<li>025 - Ecto, Part 2_ Dwitter.mp4</li>
<li>026 - Dict, Part 1.mp4</li>
<li>027 - Dict, Part 2.mp4</li>
<li>028 - Parsing XML.mp4</li>
<li>031 - TCP Servers.mp4</li>
<li>032 - Command Line Scripts.mp4</li>
<li>033 - Pry.mp4</li>
<li>041 - File, Part 1.mp4</li>
<li>042 - File, Part 2.mp4</li>
<li>044 - Distribution</li>
<li>045 - Distribution, Part 2</li>
<li>054 - Maps, Part 1.mp4</li>
<li>055 - Maps, Part 2_ Structs.mp4</li>
<li>056 - Migrating Records To Maps.mp4</li>
<li>059 - Custom Mix Tasks.mp4</li>
<li>060 - New Style Comprehensions.mp4</li>
<li>061 - Plug.mp4</li>
<li>063 - Tracing.mp4</li>
<li>065 - SSH.mp4</li>
<li>066 - Plug.Static.mp4</li>
<li>067 - Deploying to Heroku.mp4</li>
<li>068 - Port.mp4</li>
<li>069 - Observer.mp4</li>
<li>070 - Hex.mp4</li>
<li>073 - Process Dictionaries.mp4</li>
<li>074 - ETS.mp4</li>
<li>075 - DETS.mp4</li>
<li>076 - Streams.mp4</li>
<li>077 - Exceptions and Errors.mp4</li>
<li>078 - Agents.mp4</li>
<li>079 - Tasks.mp4</li>
<li>081 - EEx.mp4</li>
<li>082 - Protocols.mp4</li>
<li>083 - pg2.mp4</li>
<li>086 - put_in and get_in.mp4</li>
<li>090 - Websockets Terminal.mp4</li>
<li>091 - Test Coverage.mp4</li>
<li>106 - Text Parsing.mp4</li>
<li>109 - Socket.mp4</li>
<li>112 - Benchfella.mp4</li>
<li>113 - Monitoring Network Traffic.mp4</li>
<li>124 - Typespecs.mp4</li>
<li>125 - Dialyzer.mp4</li>
<li>126 - Piping Into Elixir.mp4</li>
<li>127 - SSH Client Commands.mp4</li>
<li>131 - ExProf.mp4</li>
<li>132 - Randomness in the Erlang VM.mp4</li>
<li>135 - Benchwarmer.mp4</li>
<li>138 - Monitors and Links.mp4</li>
<li>139 - hexdocs.mp4</li>
<li>141 - Set.mp4</li>
<li>142 - escript.mp4</li>
<li>144 - Erlang&rsquo;s <code>calendar</code> module.mp4</li>
<li>145 - good_times.mp4</li>
<li>153 - Phoenix APIs and CORS.mp4</li>
<li>155 - OAuth2_ Code Spelunking.mp4</li>
<li>156 - Interacting with Amazon&rsquo;s APIs with erlcloud.mp4</li>
<li>157 - Playing with the Code Module Part 1 - eval_string.mp4</li>
<li>159 - Simple One for One Supervisors.mp4</li>
<li>160 - MultiDef.mp4</li>
<li>171 - Erlang 18 and Time.mp4</li>
<li>172 - Arc File Uploads.mp4</li>
<li>174 - ElixirFriends_ Saving Tweets with Streams and Filters.mp4</li>
<li>175 - Pagination with Ecto and Phoenix using Scrivener.mp4</li>
<li>176 - Prettying Up ElixirFriends.mp4</li>
<li>178 - Memory Leaks.mp4</li>
<li>179 - Rules Engine.mp4</li>
<li>180 - Collectable.mp4</li>
<li>182 - Phoenix API.mp4</li>
<li>183 - React with Phoenix.mp4</li>
<li>184 - React with Phoenix Channels.mp4</li>
<li>185 - Mix Archives.mp4</li>
<li>186 - Automatically Connecting Nodes.mp4</li>
<li>187 - Compiling a Custom AST Into Elixir Functions.mp4</li>
<li>190 - Testing Phoenix Channels.mp4</li>
<li>193 - Linting with Dogma.mp4</li>
<li>194 - Interoperability_ Ports.mp4</li>
<li>196 - Crashing the BEAM.mp4</li>
<li>200 - Custom Types in Ecto.mp4</li>
<li>201 - Tracing and Debugging with erlyberly.mp4</li>
<li>202 - Exception Monitoring with Honeybadger.io.mp4</li>
<li>203 - plug_auth.mp4</li>
<li>204 - Behaviours.mp4</li>
</ul>
<p>This is roughly half of what&rsquo;s available in Elixir Sips. All the other episodes are also interesting, but if you&rsquo;re just getting started, this list should be enough to get your feet wet in the language.</p>
<p>Railers will enjoy Phoenix and the ecosystem that is growing around it. You can already authenticate through <a href="https://github.com/scrogson/oauth2"target="_blank" rel="noopener">OAuth2</a>, do will_paginate-style pagination with <a href="https://github.com/drewolson/scrivener"target="_blank" rel="noopener">Scrivener</a>, do CarrierWave-style file uploads with <a href="https://github.com/stavro/arc"target="_blank" rel="noopener">Arc</a>, deploy to <a href="http://wsmoak.net/2015/07/05/phoenix-on-heroku.html"target="_blank" rel="noopener">Heroku</a>.</p>
<p>For more exercises, you can easily connect to HTTP endpoints using <a href="https://github.com/edgurgel/httpoison"target="_blank" rel="noopener">HTTPoison</a>, parse HTML with <a href="https://github.com/philss/floki"target="_blank" rel="noopener">Floki</a>, parse JSON with <a href="https://github.com/devinus/poison"target="_blank" rel="noopener">Poison</a>. For more libraries, you can follow this Github page called <a href="https://github.com/h4cc/awesome-elixir"target="_blank" rel="noopener">Awesome Elixir</a> which lists many new Elixir packages that you can use. But make sure you walk yourself through the basic concepts first. Elixir has a Rake-like task management system with built-in Mix, you can add dependencies in a Gemfile-like file called Mix.exs, which every project has. You can add dependencies through Github urls or from <a href="https://hex.pm"target="_blank" rel="noopener">Hex.pm</a> which is like Rubygems.org.</p>
<p>In this learning process, the concepts that I find more important to learn first are:</p>
<ul>
<li>Elixir basic syntax and concepts (pattern matching, loops through recursion, immutable state, primitive types including Maps, the pipe operator)</li>
<li>The concept of processes, nodes, and intercommunication between processes and nodes, including Monitors and Links.</li>
<li>OTP Basics, learn what GenServer, GenEvent, GenFSM are.</li>
</ul>
<p>After you learn that, you can figure out how to build OTP applications and do something practical for the Web using Phoenix. In particular, you will want to learn everything about Phoenix&rsquo;s Channels, the infrastructure for robust, fast and <a href="http://www.akitaonrails.com/2015/10/29/phoenix-experiment-holding-2-million-websocket-clients"target="_blank" rel="noopener">highly concurrent</a> WebSockets.</p>
<p>That&rsquo;s it. This is my first week learning Elixir, and my next step is to train myself by doing more exercises and also learning more about Phoenix. Even though Phoenix is inspired by Rails, it is not a clone, it has its own set of unique concepts to learn and this is definitely going to be a very interesting ride.</p>
<p>If you have more tips and tricks for beginners, feel free to comment below.</p>
]]></content:encoded><category>learning</category><category>elixir-and-erlang</category><category>programming</category></item><item><title>[Off-Topic] Talking with a University Professor</title><link>https://akitaonrails.github.io/en/2014/12/08/off-topic-conversando-com-um-professor-universitario/</link><guid isPermaLink="true">https://akitaonrails.github.io/en/2014/12/08/off-topic-conversando-com-um-professor-universitario/</guid><pubDate>Mon, 08 Dec 2014 19:56:00 -0200</pubDate><description>&lt;p&gt;A few days ago, professor Rosenclever Gazono, from the University Center of Volta Redonda, sent me an email asking for some opinions that I thought were worth sharing. I&amp;rsquo;ve already met many professors during my visits to several universities around the country, and many have the same questions, so I hope this helps a little.&lt;/p&gt;
&lt;p&gt;Below, I&amp;rsquo;ll transcribe the professor&amp;rsquo;s questions and my answers.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Professor:&lt;/strong&gt; My name is Rosenclever, I&amp;rsquo;m a university professor currently teaching Object-Oriented Analysis and Design (basically UML, Design Patterns, and Agile methodologies) and Object-Oriented Programming 2 (Java for Web with JPA and JSF)&lt;/p&gt;</description><content:encoded><![CDATA[<p>A few days ago, professor Rosenclever Gazono, from the University Center of Volta Redonda, sent me an email asking for some opinions that I thought were worth sharing. I&rsquo;ve already met many professors during my visits to several universities around the country, and many have the same questions, so I hope this helps a little.</p>
<p>Below, I&rsquo;ll transcribe the professor&rsquo;s questions and my answers.</p>
<p><strong>Professor:</strong> My name is Rosenclever, I&rsquo;m a university professor currently teaching Object-Oriented Analysis and Design (basically UML, Design Patterns, and Agile methodologies) and Object-Oriented Programming 2 (Java for Web with JPA and JSF)</p>
<p>Well, since you&rsquo;re a developer who today also plays the role of an entrepreneur, and I, on the other hand, am in academia trying to prepare professionals to work in the market, I always try to update my content with market demand, and it&rsquo;s very common to hear from IT managers, through the media, that there&rsquo;s a very big gap between what&rsquo;s taught in academia and what the market needs&hellip;</p>
<p>So I&rsquo;d like to ask for your contribution so that I can help my students leave better prepared for the market. I&rsquo;d like to know your opinion on the syllabuses of the courses I mentioned at the beginning of this email&hellip;</p>
<p><strong>Professor:</strong> 1) Does it make sense today to master UML diagrams?</p>
<p><strong>AkitaOnRails:</strong> &ldquo;Master&rdquo; perhaps not (in the sense of knowing every little detail of every diagram). But knowing they exist, having a general notion of each, and knowing the most useful ones like Use Cases, Sequence Diagram, State Diagram, Class Diagram, I think is appropriate and useful. And never as a way to design ALL the software, but a few parts that maybe become clearer if you diagram first.</p>
<p>Adding here in the post: plenty of people who never programmed professionally think that &ldquo;any and every&rdquo; type of diagramming and planning is unnecessary. They still imagine (without knowing it) that the so-called &ldquo;corporate&rdquo; world runs on mountains of diagrams and plans. That&rsquo;s almost never true.</p>
<p>Of course there are exceptions, but in the common case a programmer needs to communicate an idea through something beyond code. That matters most when explaining a complex architecture to the team before starting to code.</p>
<p>It doesn&rsquo;t mean diagramming 100% of the classes, 100% of the states, 100% of the sequences. It means diagramming what&rsquo;s most critical and hardest to understand, and letting the rest emerge naturally during programming.</p>
<p><strong>Professor:</strong> 2) Which Design Patterns and Agile concepts do you consider fundamental to be taught in academia? Or is that also not considered important?</p>
<p><strong>AkitaOnRails:</strong> Design Patterns are important, but as a reference. They&rsquo;re possible solutions, and they need to be evaluated case by case. In Agile, only worry about Extreme Programming, because all XP techniques matter. Scrum and Kanban can be introduced, but they&rsquo;re dispensable. About patterns:</p>
<ul>
<li><a href="/en/2013/05/10/a-lingua-portuguesa-brasileira-e-pessima-standard-vs-pattern">Brazilian Portuguese Can Confuse Us: Standard vs Pattern</a></li>
<li><a href="http://www.akitaonrails.com/2007/07/30/gof-design-patterns-sobreviveu-ao-teste-do-tempo"target="_blank" rel="noopener">GoF Design Patterns - Did it survive the test of time?</a></li>
<li><a href="http://www.akitaonrails.com/2006/10/30/design-patterns-representam-defeitos-nas-linguagens"target="_blank" rel="noopener">Design Patterns represent defects in Languages</a></li>
</ul>
<p>Adding here in the post: the important thing is to teach that nobody needs to invent everything from scratch all the time. That would be a redundant effort, since someone has probably already solved the problem before.</p>
<p>At the same time, it&rsquo;s worth explaining that what we know today is just what seems to work best, and none of it is final. If someone has a result that beats what we know, great, show it to everyone.</p>
<p>It became fashionable to talk about &ldquo;Inversion of Control,&rdquo; and few people know what it really means. They only know it seems to improve &ldquo;modularization,&rdquo; also without understanding why modularizing is a benefit in some cases and not so much in others.</p>
<p>And speaking of Agile, I recommend reading these posts of mine:</p>
<ul>
<li><a href="/en/2014/03/27/off-topic-lean-esta-morto-longa-vida-a-eficiencia">Lean is Dead, Long Live Efficiency</a></li>
<li><a href="/en/2014/09/28/off-topic-agile-a-verdade-por-tras-do-metodo">Agile: the Truth Behind the Method</a></li>
</ul>
<p><strong>Professor:</strong> 3) Does the OO Analysis and Design discipline still make sense today? What would be interesting to be addressed in it?</p>
<p><strong>AkitaOnRails:</strong> Of course, but today you have to emphasize that OO (object orientation) is one approach among several, and not always the &ldquo;best.&rdquo;</p>
<p>By the way, OO only gets interesting in academia through the eyes of languages that really explore OO, like Smalltalk and Ruby. It&rsquo;s worth showing the whole landscape: class-oriented programming in Java and C#, functional in Lisp and Scheme, prototype-oriented in JavaScript and Io, and programming with concurrency and actors in Go, Scala, and Elixir/Erlang.</p>
<p>Adding to the post: this is the kind of subject with no &ldquo;right&rdquo; answer. Any attempt to measure the strength of one side or the other always turns into a flamewar or a mediocre bikeshedding.</p>
<p>The reality is that software factories will keep using languages with good commercial tooling support, like IBM Websphere and Microsoft Visual Studio.NET. Tech startups and smaller, more &ldquo;best of breed&rdquo; technology-oriented companies will prefer open source solutions that sometimes look like a &ldquo;patchwork quilt.&rdquo;</p>
<p>Agencies and small producers will keep using whatever delivers in the shortest possible time, even if it&rsquo;s dirty. Advertising campaigns last very little, so you&rsquo;re left with the &ldquo;quick and dirty,&rdquo; the WordPress derivatives, and so on.</p>
<p><strong>Professor:</strong> 4) Is it definitely still worth teaching Java in academia? Do you think Ruby and Rails or even Python and Django are more appropriate?</p>
<p><strong>AkitaOnRails:</strong> Yes, it&rsquo;s worth it, as long as Java comes in as what it really is: the commercially most viable language. It isn&rsquo;t the only solution to everything nor the best example of an OO language.</p>
<p>Ruby and Python can be explored as dynamically typed languages, taking the chance to explain the difference between static and dynamic typing. But in academia, especially in Computer Science, I&rsquo;ve always been in favor of teaching dead languages like Smalltalk, Lisp, and Eiffel. That keeps the student from falling into the temptation of staying only with the language they learned in college. A bachelor&rsquo;s degree should prioritize foundation, and commercial use is the job of technical and technologist schools.</p>
<p>Adding to the post: Academia, especially in Computer Science chairs, must emphasize science. Going 100% toward the market creates a generation that becomes obsolete very quickly and, worse, that never learns to update itself on its own.</p>
<p>In a hypothetical scenario, if 100% of universities turned 100% toward what the &ldquo;market&rdquo; wants, in ten years we&rsquo;d have our entire computing field junked. Universities need to elevate the &ldquo;Science&rdquo; of Computer Science.</p>
<p>Let me leave posts I wrote about university and career topics:</p>
<ul>
<li><a href="/en/2009/04/17/off-topic-devo-fazer-faculdade">Should I go to college?</a></li>
<li><a href="/en/2014/05/02/off-topic-carreira-em-programacao-codificar-nao-e-programar">Career in Programming - Coding isn&rsquo;t Programming</a></li>
<li><a href="/en/2013/10/31/traducao-carta-para-um-jovem-programador-considerando-uma-startup">Letter to a Young Programmer Considering a Startup</a></li>
</ul>
<p><strong>Professor:</strong> Sorry for the long email, but unfortunately there was no opportunity for us to talk at the event&hellip;</p>
<p><strong>AkitaOnRails:</strong> Not at all, if the subject is relevant, it&rsquo;s worth discussing it. And I encourage everyone who attends events I&rsquo;m at to call me if they want to discuss ways we can help improve education. This subject will never be irrelevant.</p>
]]></content:encoded><category>learning</category><category>programming-languages</category><category>career</category><category>off-topic</category></item><item><title>[Off-Topic] Career in Programming — Coding Isn't Programming</title><link>https://akitaonrails.github.io/en/2014/05/02/off-topic-carreira-em-programacao-codificar-nao-e-programar/</link><guid isPermaLink="true">https://akitaonrails.github.io/en/2014/05/02/off-topic-carreira-em-programacao-codificar-nao-e-programar/</guid><pubDate>Fri, 02 May 2014 15:57:00 -0300</pubDate><description>&lt;p&gt;A subject I always discuss is the training of programmers. The vast majority of articles you find on the internet today only list &amp;ldquo;techniques&amp;rdquo;: how to be an assembler, how to take existing pieces and snap them together. There&amp;rsquo;s value in that, but it&amp;rsquo;s a tiny fraction of the &amp;ldquo;programming&amp;rdquo; career, not the whole career.&lt;/p&gt;
&lt;p&gt;You can take some initial knowledge, say web and HTML, throw in a few frameworks and libraries (Rails, Django, WordPress), and actually put something functional online. But that&amp;rsquo;s little. Very little.&lt;/p&gt;</description><content:encoded><![CDATA[<p>A subject I always discuss is the training of programmers. The vast majority of articles you find on the internet today only list &ldquo;techniques&rdquo;: how to be an assembler, how to take existing pieces and snap them together. There&rsquo;s value in that, but it&rsquo;s a tiny fraction of the &ldquo;programming&rdquo; career, not the whole career.</p>
<p>You can take some initial knowledge, say web and HTML, throw in a few frameworks and libraries (Rails, Django, WordPress), and actually put something functional online. But that&rsquo;s little. Very little.</p>
<p>The fact that it&rsquo;s so simple, bordering on trivial, to put &ldquo;something functional&rdquo; online hides all the potential in a programming career. Worse, the immediacy of the result creates the illusion that this alone is enough and that any more advanced knowledge is unnecessary.</p>
<p>The result shows up in the growth of technical programming courses and the low demand for Computer Science bachelor&rsquo;s degrees. The fewer people we have working on the fundamentals, at the origin of everything, the more the market decays from here on.</p>
<p>You have a coder job today: Photoshop cutter, HTML assembler, WordPress plugin-sticker. Stop and think about how your career is going to evolve from here. Are you always going to be just an assembler? Are you going to take the easy path and become a half-baked &ldquo;manager&rdquo; of assemblers?</p>
<p>In a single post it&rsquo;s impossible to list and explain every important aspect of Computer Science. But I want to try naming at least some of the subjects most people think are unnecessary, just to provoke you into digging further.</p>
<h2>Learn to at least &ldquo;READ&rdquo; English fluently<span class="hx:absolute hx:-mt-20" id="learn-to-at-least-read-english-fluently"></span>
    <a href="#learn-to-at-least-read-english-fluently" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>I love the Portuguese language, and it will always be my first language. But pseudo-patriotism and laziness don&rsquo;t change one fact: if you don&rsquo;t commit right now to reading English fluently, you&rsquo;ll live behind, at a sorry level.</p>
<p>The first reason is that in the Western world, everything new comes out in English first. (I&rsquo;m leaving out the East because I don&rsquo;t read Chinese, and the market there is enormous too.) Waiting for someone to bother translating it costs work and time.</p>
<p>If you rely on the Portuguese version, you&rsquo;ll be reading stale material. And by the time the subject finally grabs you, it may already be obsolete. At that point the gap stops being one step and turns into hundreds of kilometers.</p>
<p>The second reason is that the internet is globalized. It&rsquo;s common to pick up code written in other countries and carry it forward, and it&rsquo;s common for the code you write to be shared with programmers abroad. Do yourself a favor: don&rsquo;t embarrass yourself.</p>
<h2>Religious Wars<span class="hx:absolute hx:-mt-20" id="religious-wars"></span>
    <a href="#religious-wars" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>Programming is science. It has no horoscope, no guru, no soccer team, no numerology, no astrology. Remember the name: Computer <strong>SCIENCE</strong>. Nobody calls it Computer <strong>Astrology</strong>.</p>
<p>Everyone has subjective tastes. Turning taste into dogma is stupid. The laziness of having to learn something new produces the famous <em>&ldquo;I&rsquo;m good at Clipper, this language will evolve in the future and will always exist, I just have to defend it tooth and nail no matter what comes along later.&rdquo;</em></p>
<p>Swap &ldquo;Clipper&rdquo; for anything else: Cobol, Basic, Pascal, Algol, Eiffel, Smalltalk, all the way to the newest ones like Java, C#, JavaScript, Python. Something existing today guarantees nothing about tomorrow. Think about how ridiculous whoever said that line must feel now.</p>
<p>Don&rsquo;t play that role. In Science we&rsquo;re not loyal to &ldquo;teams&rdquo;: we root for whoever is winning and switch the moment they&rsquo;re proven wrong. That&rsquo;s why Science always evolves.</p>
<p>And surprises happen. In the 80s and 90s nobody gave Objective-C a second look; it seemed doomed to failure. Then, in 2007, the iPhone shows up and, surprise, you needed to know Objective-C. Suddenly it became one of the most successful languages of the end of the first decade of the 21st century. Every ten years the market transforms in some way. It&rsquo;s <a href="http://en.wikipedia.org/wiki/Bell%27s_law_of_computer_classes"target="_blank" rel="noopener">Bell&rsquo;s Law</a>.</p>
<h2>Accept It: Your Solutions Today Are Bad<span class="hx:absolute hx:-mt-20" id="accept-it-your-solutions-today-are-bad"></span>
    <a href="#accept-it-your-solutions-today-are-bad" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>Back to the theme of <strong>&ldquo;Ignore the Religious Wars&rdquo;</strong>: how do you figure out what to do? Stick to the principles. Throw out what the gurus say, don&rsquo;t idolize anyone, don&rsquo;t blindly follow anyone. Go down to the fundamental questions and the more obvious direction shows up.</p>
<p>When you know how things work, strip the varnish, pop the hood, take the engine apart, understand the chemistry of combustion, only then do you master the craft. If you barely remember what the hell changing the oil is for, you&rsquo;ll always be a mediocre driver, at best. What&rsquo;s your goal? If it&rsquo;s to be the car&rsquo;s engineer, listening to gurus talk about the color of the steering wheel won&rsquo;t take you far.</p>
<p>Computer Science usually gets ignored because learning Math looks both boring and useless.</p>
<p>Let&rsquo;s run through a few examples. If I ask a beginner how to search for words inside a text, the most obvious things that should come to mind are:</p>
<ul>
<li>use substring functions and a loop to scan the text (brute-force solution)</li>
<li>use a regular expression, or in a database use a &ldquo;LIKE&rdquo; (generic solution)</li>
<li>install a SOLR or Elasticsearch (correct solution in many cases, but &ldquo;black magic&rdquo; in terms of understanding)</li>
</ul>
<p>Most people wouldn&rsquo;t even think of the third solution. And whoever does doesn&rsquo;t know why. What if I told you that, in an absolutely raw and boiled-down way, the solution is to turn the document and the search terms into vectors and compute the relevance between them by <a href="http://en.wikipedia.org/wiki/Cosine_similarity"target="_blank" rel="noopener">cosine similarity</a>? That&rsquo;s exactly what the <a href="http://en.wikipedia.org/wiki/Vector_space_model"target="_blank" rel="noopener">Vector Space Model</a> (VSM) means, which you&rsquo;ll find in several search engines.</p>
<style>.embed-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 100%; height: auto; } .embed-container iframe, .embed-container object, .embed-container embed { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }</style><div class='embed-container'>

<div class="embed-container">
  <iframe
    src="https://www.youtube.com/embed/o5nflzfX5tw"
    title="YouTube video player"
    frameborder="0"
    allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
    referrerpolicy="strict-origin-when-cross-origin"
    allowfullscreen>
  </iframe>
</div>
</div>
<p>The knowledge behind that is called <a href="http://en.wikipedia.org/wiki/Linear_algebra"target="_blank" rel="noopener"><strong>Linear Algebra</strong></a>. Remember it, from the FIRST year of Computer Science? On this topic I recommend a talk I gave, <a href="https://www.eventials.com/akitaonrails/como-nao-fazer-pesquisas-usando-like/"target="_blank" rel="noopener">&ldquo;How not to do searches using LIKE&rdquo;</a>.</p>
<p>And when you need to build a process to filter inappropriate content? Most people would think like this:</p>
<ul>
<li>create a blacklist of words and keep adding to it as offensive words come to mind. And use the first or second option I listed before to search for those words.</li>
</ul>
<p>As you can already imagine, the most &ldquo;obvious&rdquo; or &ldquo;simple&rdquo; answer (given the lack of knowledge) is usually the wrong one, and here it also isn&rsquo;t the most efficient.</p>
<p>Get to know machine learning and one of its simplest forms, the <a href="http://en.wikipedia.org/wiki/Naive_Bayes_classifier"target="_blank" rel="noopener">Naive Bayes Classifier</a>. Someone might think <em>&ldquo;damn, but this machine learning stuff is way too advanced for the day-to-day.&rdquo;</em> Not at all. In fact, any cheap anti-spam filter you find on a free-downloads site uses a classifier.</p>
<p>The idea is that isolated words aren&rsquo;t enough to tell whether content is inappropriate. The way sentences are built, the &ldquo;tone&rdquo; of the writing, all of that forms a pattern that can be classified and learned. The more inappropriate content gets classified, the more efficient the algorithm becomes.</p>
<p>If you want to try a simple version <a href="http://web.archive.org/web/20140423094927/http://blog.logankoester.com/bayesian-classification-on-rails"target="_blank" rel="noopener">in Ruby, see this blog</a>. If you want to learn about more advanced classifiers, see the <a href="https://mahout.apache.org/"target="_blank" rel="noopener">Apache Mahout</a> project.</p>


<div class="embed-container">
  <iframe
    src="https://www.youtube.com/embed/OhLosjXM-Fg"
    title="YouTube video player"
    frameborder="0"
    allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
    referrerpolicy="strict-origin-when-cross-origin"
    allowfullscreen>
  </iframe>
</div>

<p>And what is that? It&rsquo;s a subject of <a href="https://www.khanacademy.org/math/probability"target="_blank" rel="noopener"><strong>Statistics and Probability</strong></a>. The fundamentals for understanding it are, again, in the FIRST year of Computer Science.</p>
<p><em>&ldquo;Oh, but you&rsquo;re talking about things nobody needs to know. To make websites this is unnecessary.&rdquo;</em></p>
<p>A good web framework needs to map routes to the underlying programming (the controllers) efficiently. Ruby on Rails has a routing component called <a href="https://github.com/rails/journey"target="_blank" rel="noopener">Journey</a>, which we configure through the &ldquo;config/routes.rb&rdquo; file. Below is an excerpt:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-ruby" data-lang="ruby"><span class="line"><span class="cl"><span class="no">ImageUploadDemo</span><span class="o">::</span><span class="no">Application</span><span class="o">.</span><span class="n">routes</span><span class="o">.</span><span class="n">draw</span> <span class="k">do</span>
</span></span><span class="line"><span class="cl">  <span class="n">devise_for</span> <span class="ss">:admin_users</span><span class="p">,</span> <span class="no">ActiveAdmin</span><span class="o">::</span><span class="no">Devise</span><span class="o">.</span><span class="n">config</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">  <span class="n">resources</span> <span class="ss">:photos</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">  <span class="n">authenticated</span> <span class="ss">:user</span> <span class="k">do</span>
</span></span><span class="line"><span class="cl">    <span class="n">root</span> <span class="ss">:to</span> <span class="o">=&gt;</span> <span class="s1">&#39;photos#index&#39;</span>
</span></span><span class="line"><span class="cl">  <span class="k">end</span>
</span></span><span class="line"><span class="cl">  <span class="n">root</span> <span class="ss">:to</span> <span class="o">=&gt;</span> <span class="s2">&#34;photos#index&#34;</span>
</span></span><span class="line"><span class="cl">  <span class="n">devise_for</span> <span class="ss">:users</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">  <span class="nb">require</span> <span class="s1">&#39;sidekiq/web&#39;</span>
</span></span><span class="line"><span class="cl">  <span class="n">mount</span> <span class="no">Sidekiq</span><span class="o">::</span><span class="no">Web</span> <span class="o">=&gt;</span> <span class="s1">&#39;/sidekiq&#39;</span>
</span></span><span class="line"><span class="cl">  <span class="no">ActiveAdmin</span><span class="o">.</span><span class="n">routes</span><span class="p">(</span><span class="nb">self</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="k">end</span></span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>How hard can this be? What might most people imagine?</p>
<ul>
<li>Easy, just make a set of arrays or a hash (dictionary), and when the URL arrives, break the terms with a regular expression and find the controller, passing the parameters to run it.</li>
</ul>
<p>Let me repeat myself: yes, this works, for very small applications. Anything much bigger than the example above already runs into performance problems.</p>
<p>How about a look at a snippet of the Journey code?</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-ruby" data-lang="ruby"><span class="line"><span class="cl"><span class="k">class</span> <span class="nc">Journey</span><span class="o">::</span><span class="no">Parser</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">token</span> <span class="no">SLASH</span> <span class="no">LITERAL</span> <span class="no">SYMBOL</span> <span class="no">LPAREN</span> <span class="no">RPAREN</span> <span class="no">DOT</span> <span class="no">STAR</span> <span class="no">OR</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">rule</span>
</span></span><span class="line"><span class="cl">  <span class="n">expressions</span>
</span></span><span class="line"><span class="cl">    <span class="p">:</span> <span class="n">expressions</span> <span class="n">expression</span>  <span class="p">{</span> <span class="n">result</span> <span class="o">=</span> <span class="no">Cat</span><span class="o">.</span><span class="n">new</span><span class="p">(</span><span class="n">val</span><span class="o">.</span><span class="n">first</span><span class="p">,</span> <span class="n">val</span><span class="o">.</span><span class="n">last</span><span class="p">)</span> <span class="p">}</span>
</span></span><span class="line"><span class="cl">    <span class="o">|</span> <span class="n">expression</span>              <span class="p">{</span> <span class="n">result</span> <span class="o">=</span> <span class="n">val</span><span class="o">.</span><span class="n">first</span> <span class="p">}</span>
</span></span><span class="line"><span class="cl">    <span class="o">|</span> <span class="ow">or</span>
</span></span><span class="line"><span class="cl">    <span class="p">;</span>
</span></span><span class="line"><span class="cl">  <span class="n">expression</span>
</span></span><span class="line"><span class="cl">    <span class="p">:</span> <span class="n">terminal</span>
</span></span><span class="line"><span class="cl">    <span class="o">|</span> <span class="n">group</span>
</span></span><span class="line"><span class="cl">    <span class="o">|</span> <span class="n">star</span>
</span></span><span class="line"><span class="cl">    <span class="p">;</span>
</span></span><span class="line"><span class="cl">  <span class="n">group</span>
</span></span><span class="line"><span class="cl">    <span class="p">:</span> <span class="no">LPAREN</span> <span class="n">expressions</span> <span class="no">RPAREN</span> <span class="p">{</span> <span class="n">result</span> <span class="o">=</span> <span class="no">Group</span><span class="o">.</span><span class="n">new</span><span class="p">(</span><span class="n">val</span><span class="o">[</span><span class="mi">1</span><span class="o">]</span><span class="p">)</span> <span class="p">}</span>
</span></span><span class="line"><span class="cl">    <span class="p">;</span>
</span></span><span class="line"><span class="cl">  <span class="ow">or</span>
</span></span><span class="line"><span class="cl">    <span class="p">:</span> <span class="n">expressions</span> <span class="no">OR</span> <span class="n">expression</span> <span class="p">{</span> <span class="n">result</span> <span class="o">=</span> <span class="no">Or</span><span class="o">.</span><span class="n">new</span><span class="p">(</span><span class="o">[</span><span class="n">val</span><span class="o">.</span><span class="n">first</span><span class="p">,</span> <span class="n">val</span><span class="o">.</span><span class="n">last</span><span class="o">]</span><span class="p">)</span> <span class="p">}</span>
</span></span><span class="line"><span class="cl">    <span class="p">;</span>
</span></span><span class="line"><span class="cl">  <span class="n">star</span>
</span></span><span class="line"><span class="cl">    <span class="p">:</span> <span class="no">STAR</span>       <span class="p">{</span> <span class="n">result</span> <span class="o">=</span> <span class="no">Star</span><span class="o">.</span><span class="n">new</span><span class="p">(</span><span class="no">Symbol</span><span class="o">.</span><span class="n">new</span><span class="p">(</span><span class="n">val</span><span class="o">.</span><span class="n">last</span><span class="p">))</span> <span class="p">}</span>
</span></span><span class="line"><span class="cl">    <span class="p">;</span>
</span></span><span class="line"><span class="cl">  <span class="n">terminal</span>
</span></span><span class="line"><span class="cl">    <span class="p">:</span> <span class="n">symbol</span>
</span></span><span class="line"><span class="cl">    <span class="o">|</span> <span class="n">literal</span>
</span></span><span class="line"><span class="cl">    <span class="o">|</span> <span class="n">slash</span>
</span></span><span class="line"><span class="cl">    <span class="o">|</span> <span class="n">dot</span>
</span></span><span class="line"><span class="cl">    <span class="p">;</span>
</span></span><span class="line"><span class="cl">  <span class="n">slash</span>
</span></span><span class="line"><span class="cl">    <span class="p">:</span> <span class="no">SLASH</span>              <span class="p">{</span> <span class="n">result</span> <span class="o">=</span> <span class="no">Slash</span><span class="o">.</span><span class="n">new</span><span class="p">(</span><span class="s1">&#39;/&#39;</span><span class="p">)</span> <span class="p">}</span>
</span></span><span class="line"><span class="cl">    <span class="p">;</span>
</span></span><span class="line"><span class="cl">  <span class="n">symbol</span>
</span></span><span class="line"><span class="cl">    <span class="p">:</span> <span class="no">SYMBOL</span>             <span class="p">{</span> <span class="n">result</span> <span class="o">=</span> <span class="no">Symbol</span><span class="o">.</span><span class="n">new</span><span class="p">(</span><span class="n">val</span><span class="o">.</span><span class="n">first</span><span class="p">)</span> <span class="p">}</span>
</span></span><span class="line"><span class="cl">    <span class="p">;</span>
</span></span><span class="line"><span class="cl">  <span class="n">literal</span>
</span></span><span class="line"><span class="cl">    <span class="p">:</span> <span class="no">LITERAL</span>            <span class="p">{</span> <span class="n">result</span> <span class="o">=</span> <span class="no">Literal</span><span class="o">.</span><span class="n">new</span><span class="p">(</span><span class="n">val</span><span class="o">.</span><span class="n">first</span><span class="p">)</span> <span class="p">}</span>
</span></span><span class="line"><span class="cl">  <span class="n">dot</span>
</span></span><span class="line"><span class="cl">    <span class="p">:</span> <span class="no">DOT</span>                <span class="p">{</span> <span class="n">result</span> <span class="o">=</span> <span class="no">Dot</span><span class="o">.</span><span class="n">new</span><span class="p">(</span><span class="n">val</span><span class="o">.</span><span class="n">first</span><span class="p">)</span> <span class="p">}</span>
</span></span><span class="line"><span class="cl">    <span class="p">;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="k">end</span></span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>In plain English, now <strong>you&rsquo;re screwed</strong>. Part of Journey uses <a href="https://github.com/tenderlove/racc"target="_blank" rel="noopener">Racc</a>, a parser generator.</p>
<p>If you made it at least through the SECOND year of Computer Science, then you went through <a href="http://en.wikipedia.org/wiki/Algorithms_%2B_Data_Structures_%3D_Programs"target="_blank" rel="noopener"><strong>Algorithms and Data Structures</strong></a> and Assemblers. And if you reached the THIRD year, you learned about <a href="http://en.wikipedia.org/wiki/Compilers:_Principles,_Techniques,_and_Tools"target="_blank" rel="noopener"><strong>Compilers</strong></a> (and saw the famous Dragon book). Racc should have reminded you of Yacc, Flex, Bison.</p>


<div class="embed-container">
  <iframe
    src="https://www.youtube.com/embed/QPCC2sbukeo"
    title="YouTube video player"
    frameborder="0"
    allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
    referrerpolicy="strict-origin-when-cross-origin"
    allowfullscreen>
  </iframe>
</div>

<p>To wrap up, you probably think you know what <a href="http://c2.com/cgi/wiki?NobodyAgreesOnWhatOoIs"target="_blank" rel="noopener"><strong>Object Orientation</strong></a> is, right? I bet you consider your favorite language (whether Java, C#, or JavaScript) object-oriented. If I ask you to define what that means, it&rsquo;s on the tip of your tongue:</p>
<ul>
<li>My language supports Encapsulation, Inheritance, and Polymorphism, therefore it&rsquo;s object-oriented.</li>
</ul>
<p>And what if I told you that procedural, imperative, and functional languages also support encapsulation, inheritance (via delegation or not), and polymorphism? And if that&rsquo;s the case, then <a href="http://c2.com/cgi/wiki?NobodyAgreesOnWhatOoIs"target="_blank" rel="noopener">what defines object orientation?</a></p>
<p>Whoever got into the subject might remember <a href="http://en.wikipedia.org/wiki/Alan_Kay"target="_blank" rel="noopener">Alan Kay</a>, who coined the term &ldquo;object orientation.&rdquo; But how many stopped to research the Simula 67 language? What did Simula introduce in 1967? Objects, classes, inheritance, subclasses, virtual methods, <a href="http://en.wikipedia.org/wiki/Coroutine"target="_blank" rel="noopener">coroutines</a>, discrete event simulation, garbage collection.</p>
<p>And how many have heard of the creators of Simula 67, <a href="http://en.wikipedia.org/wiki/Kristen_Nygaard"target="_blank" rel="noopener">Kristen Nygaard</a> and <a href="http://en.wikipedia.org/wiki/Ole-Johan_Dahl"target="_blank" rel="noopener">Ole-Johan Dahl</a>?</p>
<p>You don&rsquo;t know who they are? I&rsquo;m sure you don&rsquo;t. Well, let me introduce you to the fathers of object orientation.</p>
<h2>On the Shoulders of Giants<span class="hx:absolute hx:-mt-20" id="on-the-shoulders-of-giants"></span>
    <a href="#on-the-shoulders-of-giants" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>What I mentioned in the previous section is a drop of water on the tip of the iceberg. What matters is for you to realize that everything you think you know is close to nothing. I want you to accept that everything you think you know is either wrong or totally incomplete.</p>
<p>That matters because whoever thinks they already know everything, or close to it, will never learn anything. You need to empty the cup to fill it. (by Bruce Lee)</p>
<p><img src="https://akitaonrails.s3.amazonaws.com/assets/image_asset/image/406/big_quote-emptiness-the-starting-point-in-order-to-taste-my-cup-of-water-you-must-first-empty-your-cup-bruce-lee-246247.jpg" alt="Bruce Lee Quote"  loading="lazy" /></p>
<p>Beyond that, I want you to understand you&rsquo;re not alone. Before you came dozens of great minds. And I&rsquo;m not talking about those superficial gurus who merely teach techniques and tools. Forget them, everyone will forget them soon too.</p>
<p>Everyone knows who Linus Torvalds, Bill Gates, Steve Jobs, Zuckerberg are. Forget them for now. Stick to the immortals, the names who really made a difference in the history of Computer Science. A few examples:</p>
<ul>
<li><a href="http://en.wikipedia.org/wiki/Charles_Babbage"target="_blank" rel="noopener">Charles Babbage</a></li>
<li><a href="http://en.wikipedia.org/wiki/Ada_Lovelace"target="_blank" rel="noopener">Ada Lovelace</a></li>
<li><a href="http://en.wikipedia.org/wiki/George_Boole"target="_blank" rel="noopener">George Boole</a></li>
<li><a href="http://en.wikipedia.org/wiki/Alan_Turing"target="_blank" rel="noopener">Alan Turing</a></li>
<li><a href="http://en.wikipedia.org/wiki/Alonzo_Church"target="_blank" rel="noopener">Alonzo Church</a></li>
<li><a href="http://en.wikipedia.org/wiki/John_von_Neumann"target="_blank" rel="noopener">John von Neumann</a></li>
<li><a href="https://en.wikipedia.org/wiki/John_McCarthy_%28computer_scientist%29"target="_blank" rel="noopener">John McCarthy</a></li>
<li><a href="http://en.wikipedia.org/wiki/Niklaus_Wirth"target="_blank" rel="noopener">Niklaus Wirth</a></li>
<li><a href="http://en.wikipedia.org/wiki/Bertrand_Meyer"target="_blank" rel="noopener">Bertrand Meyer</a></li>
<li><a href="http://en.wikipedia.org/wiki/Dan_Ingalls"target="_blank" rel="noopener">Dan Ingalls</a></li>
<li><a href="http://en.wikipedia.org/wiki/Donald_Knuth"target="_blank" rel="noopener">Donald Knuth</a></li>
<li><a href="http://en.wikipedia.org/wiki/Edsger_Dijkstra"target="_blank" rel="noopener">Edsger W. Dijkstra</a></li>
</ul>
<p>And that&rsquo;s just a sample. Science is a broad field, where one scientist&rsquo;s work complements the previous one&rsquo;s. Step by step, always moving forward. It&rsquo;s a cumulative work of tens, hundreds of years. Our advantage? Hundreds of people already walked this path in the past, and we can use what they learned and left us, instead of making the same mistakes ourselves until we learn on our own.</p>


<div class="embed-container">
  <iframe
    src="https://www.youtube.com/embed/6dME3wgaQpM"
    title="YouTube video player"
    frameborder="0"
    allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
    referrerpolicy="strict-origin-when-cross-origin"
    allowfullscreen>
  </iframe>
</div>

<p>Almost everything you see out there called <a href="http://web.archive.org/web/20140506054007/http://startups.ig.com.br/2013/restricoes-sao-libertadoras-menos-e-mais/"target="_blank" rel="noopener">&ldquo;innovation&rdquo;</a> is the rediscovery of things already documented in the past, but that were ahead of their time. It was like that with the mouse: <a href="http://en.wikipedia.org/wiki/Douglas_Engelbart"target="_blank" rel="noopener">Douglas Engelbart</a>, who created it in 1968, had to wait sixteen years, until Steve Jobs launched the Macintosh, to see his invention go mainstream. Stop and think: how many discoveries are sitting in the past, just waiting for someone to dig them up and finally make them real?</p>
<p>Want to know about the immortal books of Computer Science? Here are a few:</p>
<ul>
<li><a href="http://en.wikipedia.org/wiki/Structure_and_Interpretation_of_Computer_Programs"target="_blank" rel="noopener">Structure and Interpretation of Computer Programs (SICP)</a></li>
<li><a href="http://en.wikipedia.org/wiki/The_C_Programming_Language"target="_blank" rel="noopener">The C Programming Language (K&amp;R)</a></li>
<li><a href="http://en.wikipedia.org/wiki/Algorithms_%2B_Data_Structures_%3D_Programs"target="_blank" rel="noopener">Algorithms + Data Structures = Programs</a></li>
<li><a href="http://en.wikipedia.org/wiki/Compilers:_Principles,_Techniques,_and_Tools"target="_blank" rel="noopener">Compilers: Principles, Techniques and Tools</a>, the Dragon book</li>
<li><a href="http://en.wikipedia.org/wiki/Modern_Operating_Systems"target="_blank" rel="noopener">Modern Operating Systems</a></li>
<li><a href="http://en.wikipedia.org/wiki/Computer_network"target="_blank" rel="noopener">Computer Networks</a></li>
<li><a href="http://en.wikipedia.org/wiki/The_Art_of_Computer_Programming"target="_blank" rel="noopener">The Art of Computer Programming</a>, which even I haven&rsquo;t read, and I don&rsquo;t know anyone who has read and understood it, but I&rsquo;ll leave it here because of its importance.</li>
</ul>
<p><a href="http://www.akitaonrails.com/en/2009/04/17/off-topic-devo-fazer-faculdade"target="_blank" rel="noopener">Don&rsquo;t want to go to college?</a> No problem, try to follow the material MIT makes available online on <a href="http://web.archive.org/web/20140430225124/http://ocw.mit.edu/courses/"target="_blank" rel="noopener">Electrical Engineering and Computer Science</a>. If you&rsquo;re still a complete amateur even in the programming world, see this introductory Computer Science course on <a href="http://web.archive.org/web/20140517025706/https://www.coursera.org/course/cs101"target="_blank" rel="noopener">Coursera</a>.</p>
<p>Note that I&rsquo;m not citing in this article any of the names many might expect, like Martin Fowler, Bruce Eckel, Robert Martin, Michael Feathers, Kent Beck, Steve McConnell, Tom DeMarco, Dave Thomas. Forget them for now. Without the earlier ones, these make little difference.</p>
<p>Don&rsquo;t put the cart before the horse. Go one step at a time.</p>
<h2>Career in Programming<span class="hx:absolute hx:-mt-20" id="career-in-programming"></span>
    <a href="#career-in-programming" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>One thing I always repeat is this:</p>
<blockquote>"Programming isn't writing any code, the same way cooking isn't throwing any ingredient into a pan."</blockquote>
<p>Understand: writing code is very simple. Anyone with the minimum motor coordination not to try shoving a square peg through a round hole, or who has at least stacked one Lego brick on top of another, is capable of writing code. There&rsquo;s no merit in it at all.</p>
<p>Downloading a Twitter Bootstrap, using a Yeoman generator, installing MySQL on Ubuntu, copying and pasting a jQuery snippet: anyone can do it.</p>
<p>In career terms, what &ldquo;anyone&rdquo; can do is a mere <a href="http://en.wikipedia.org/wiki/Commodity"target="_blank" rel="noopener">&ldquo;commodity&rdquo;</a>. Being a commodity means the value the market is willing to pay will only drop. Every so often some novelty shows up trying to create a differentiation (<em>&ldquo;look, Angular JS,&rdquo;</em> <em>&ldquo;look, HTML 5&rdquo;</em>), but it quickly dissolves into the downward trend in value.</p>
<p>Value lives in the creativity of the solution: extracting the greatest result for the lowest cost. And creativity only exists when you master all the elements around you. When one hour of work swaps an idiotic word-search algorithm for a vector space model, cuts your fleet from ten machines to two, and answers your user in a fifth of the time, that&rsquo;s applied knowledge. And knowledge like that has value, and it grows.</p>
<p>A full toolbox makes you a &ldquo;jack-of-all-trades with many tools.&rdquo; The engineer or architect capable of building the next World Trade Center or Freedom Tower is a different thing.</p>
<p>But, like everyone who wants to grow, we all start as jacks-of-all-trades. There&rsquo;s nothing wrong with that. Just don&rsquo;t fool yourself into thinking that a box with more tools turns you into anything different from that.</p>
]]></content:encoded><category>career</category><category>learning</category><category>computer-science</category><category>off-topic</category></item><item><title>What Does It Mean to Be a Manager?</title><link>https://akitaonrails.github.io/en/2013/06/07/o-que-significa-ser-um-gerente/</link><guid isPermaLink="true">https://akitaonrails.github.io/en/2013/06/07/o-que-significa-ser-um-gerente/</guid><pubDate>Fri, 07 Jun 2013 19:40:00 -0300</pubDate><description>&lt;p&gt;&lt;strong&gt;Original from 10/10/2010&lt;/strong&gt;: &lt;a href="https://web.archive.org/web/20130414102358/http://info.abril.com.br/noticias/rede/gestao20/gestao/o-que-significa-ser-um-gerente/"target="_blank" rel="noopener"&gt;Gestão 2.0&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;As incredible as it sounds, there is no good, simple, clear, short definition for what it means to be a &amp;ldquo;manager.&amp;rdquo; Manager isn&amp;rsquo;t a profession. You can&amp;rsquo;t &amp;ldquo;learn&amp;rdquo; to be a manager in a school or a course. The only way to learn is by trying, erring, and improving, continuously and indefinitely.&lt;/p&gt;
&lt;p&gt;One of the best definitions I&amp;rsquo;ve found is from no one less than Professor Henry Mintzberg, in his recent book &amp;ldquo;Managing,&amp;rdquo; published in 2009. A mature and light read.&lt;/p&gt;</description><content:encoded><![CDATA[<p><strong>Original from 10/10/2010</strong>: <a href="https://web.archive.org/web/20130414102358/http://info.abril.com.br/noticias/rede/gestao20/gestao/o-que-significa-ser-um-gerente/"target="_blank" rel="noopener">Gestão 2.0</a></p>
<p>As incredible as it sounds, there is no good, simple, clear, short definition for what it means to be a &ldquo;manager.&rdquo; Manager isn&rsquo;t a profession. You can&rsquo;t &ldquo;learn&rdquo; to be a manager in a school or a course. The only way to learn is by trying, erring, and improving, continuously and indefinitely.</p>
<p>One of the best definitions I&rsquo;ve found is from no one less than Professor Henry Mintzberg, in his recent book &ldquo;Managing,&rdquo; published in 2009. A mature and light read.</p>
<div id='playeriQYQtEuITsRw'></div>
<script type='text/javascript'>
    jwplayer('playeriQYQtEuITsRw').setup({
        file: 'https://s3.amazonaws.com/videos-akitaonrails/Akitaonrails-HenryMintzbergSobreMBAs258.flv',
        title: 'Henry Mintzberg',
        width: '100%',
        aspectratio: '4:3',
        fallback: 'false'
    });
</script>
<p>I recommend the read. If you&rsquo;re a beginner manager, or want to be one, maybe the book gives you some sense of what&rsquo;s coming. If you&rsquo;re already a manager, you&rsquo;ll be surprised. So many theory books paint scenarios you&rsquo;ve never seen in practice, and they leave you second-guessing whether you&rsquo;re on the right track. This one does a better job of naming the real problems you deal with day to day.</p>
<p>I want to bring a few excerpts from the first half of the book.</p>
<h2>Management Isn&rsquo;t a Profession<span class="hx:absolute hx:-mt-20" id="management-isnt-a-profession"></span>
    <a href="#management-isnt-a-profession" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><blockquote>
  <p>After years of seeking Holy Grails, it is time to recognize that managing is neither a science nor a profession; it is a practice, learned primarily through experience, and rooted in context.</p>

</blockquote>
<blockquote>
  <p><strong>It is certainly not a Science</strong>. Science has to do with developing systematic knowledge through research. That&rsquo;s nowhere near the purpose of management, which has to do with helping get things done in organizations. Management isn&rsquo;t even an applied science, because that&rsquo;s still science. Management certainly applies science: managers need to use all the knowledge they can. And they certainly use analysis, rooted in the scientific method (which means here more scientific proof than scientific discovery).</p>

</blockquote>
<blockquote>
  <p>But effective management is more dependent on art and is especially rooted in craft. Art produces &ldquo;insight&rdquo; and &ldquo;vision,&rdquo; based on intuition (Peter Drucker wrote in 1954 that &ldquo;the days of the &lsquo;intuitive&rsquo; manager are numbered.&rdquo; Half a century later, we&rsquo;re still counting.) And craft has to do with learning from experience — working things out as the manager moves forward.</p>

</blockquote>
<p>So it&rsquo;s worth repeating what Mintzberg often says: it&rsquo;s impossible to form managers in school. That much is a certainty. In school you learn accounting techniques, marketing, repeatable technical knowledge. None of that makes a manager, much less a leader.</p>
<p>When a school or an MBA course slaps &ldquo;We Form Leaders&rdquo; on the brochure, it&rsquo;s lying. Those schools form technicians. Those technicians go work in technical activities until they grow, take on responsibilities, and maybe, one day, actually manage something.</p>
<h2>Management Is a Practice<span class="hx:absolute hx:-mt-20" id="management-is-a-practice"></span>
    <a href="#management-is-a-practice" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><blockquote>
  <p>Put together a good portion of craft with the right touch of art along with some use of science and you end up with a job that is, above all, a practice. There is no &ldquo;one best way&rdquo; to manage; everything depends on the situation.</p>

</blockquote>
<blockquote>
  <p>It isn&rsquo;t even a Profession. It has been pointed out that engineering also isn&rsquo;t a science or an applied science so much as a practice in its own right. But engineering applies a good portion of science, codified and certified as to its efficiency. And therefore it can be called a profession, meaning it can be taught before practice, out of context. In a way, a bridge is a bridge, or at least iron is iron, even if its use has to be adapted to the situation at hand. The same can be said of medicine. But not of management:</p>

</blockquote>
<blockquote>
  <p>Many medical diagnostic, inference, and treatment skills &hellip; assume that a disease can be decomposed into separate problems that don&rsquo;t differ much between patients and can be treated by reasonably standard remedies &hellip; In contrast, much of management work involves dealing with problems that are highly interdependent with other parts of the organization, are specific to this particular firm, market and industry and not easily reducible to a standard general syndrome that can be treated by specific techniques.</p>

</blockquote>
<p>Managing is a work of negotiation, of trades, of yielding, of conquering. There&rsquo;s no procedure, no methodology, no rigid body of knowledge that defines this role. You can&rsquo;t know &ldquo;what level&rdquo; a manager is at because there&rsquo;s no &ldquo;standard&rdquo; for comparison. There are good managers and bad managers, just that. &ldquo;Bad managers,&rdquo; in reality, couldn&rsquo;t even be called &ldquo;managers&rdquo; because they&rsquo;re actually not managing.</p>
<h2>Real Management<span class="hx:absolute hx:-mt-20" id="real-management"></span>
    <a href="#real-management" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><blockquote>
  <p>It has been said that an expert is someone who knows more and more about less and less until finally he or she knows everything about nothing. The manager&rsquo;s problem is the opposite: to know less and less about more and more until finally he or she knows nothing about everything.</p>

</blockquote>
<p>Many people think that taking a pile of courses, postgrad, MBAs, and the like will necessarily turn them into good managers. That correlation doesn&rsquo;t exist. Yes, there are excellent managers with good training, but what really formed them was practice. Correlation isn&rsquo;t causation. In the general case, this person is just postponing the thing that would actually give them a shot at becoming a good manager: practice.</p>
<blockquote>
  <p>Managers who don&rsquo;t do and deal, and so don&rsquo;t know what is going on, can become incapable of coming up with sensible decisions and robust strategies.</p>

</blockquote>
<p>There&rsquo;s also the idea that managers shouldn&rsquo;t get their hands dirty, since it&rsquo;s either they manage or they execute. That doesn&rsquo;t mean the manager can be ignorant about the area where they work. Quite the opposite: a manager with excellent technical knowledge of their area has a better shot at understanding the <strong>context</strong>.</p>
<blockquote>
  <p>Thinking is heavy — thinking too much can exhaust a manager — while acting is light — acting too much can make the manager unable to stop.</p>

</blockquote>
<blockquote>
  <p>Similarly, too much leadership can result in a job without context — without aim, without focus, without action — while too much relationship can produce a job disconnected from its internal roots — public relations instead of tangible connections. The manager who only communicates never finishes anything, while the manager who only &ldquo;does&rdquo; ends up doing everything alone. And the manager who only controls risks ends up controlling an empty shell of yes-men and yes-women. We don&rsquo;t need people-oriented, information-oriented, or action-oriented managers; we need managers who operate on these three planes. Only together, across all three planes, do these roles provide the balance that is essential to the practice of management.</p>

</blockquote>
<p>Mintzberg points out something obvious: if you want to be a renowned management author, writing books and giving talks, you have to focus on a single aspect and exalt it as the &ldquo;missing piece.&rdquo; But in reality, a manager who focuses on only one aspect of the practice is certainly doing the wrong thing. A good manager balances the different roles as the situation demands, and uses all of them whenever needed.</p>
<p>Anyway, as you can see, the role of the Manager is much broader than it seems. Just studying procedures doesn&rsquo;t make you a manager, just as studying a color table doesn&rsquo;t make you a painter, or knowing how to read a score doesn&rsquo;t make you a composer.</p>
<p>Art, Craft, Technique, and Practice. This is the definition of Management. A manager who doesn&rsquo;t understand that will always be a terrible manager.</p>
<p>As an addendum, one word of caution. Sometimes we see very active professionals, and not only managers, who seem to do a lot because they talk to a lot of people, act a lot, and are always running hot. That&rsquo;s usually the symptom of the &ldquo;hero-professional.&rdquo; In my definition, it&rsquo;s precisely the person who is doing the job the wrong way. They look productive, but in practice they&rsquo;re just being inefficient and, worse, cleaning up the mistakes they generate along the way. It looks like they&rsquo;re solving plenty when, in fact, they&rsquo;re just chasing their own tail.</p>
]]></content:encoded><category>management</category><category>psychology</category><category>learning</category><category>off-topic</category></item><item><title>Processes and Methodologies Won't Help You</title><link>https://akitaonrails.github.io/en/2013/05/24/processos-e-metodologias-nao-vao-te-ajudar/</link><guid isPermaLink="true">https://akitaonrails.github.io/en/2013/05/24/processos-e-metodologias-nao-vao-te-ajudar/</guid><pubDate>Fri, 24 May 2013 19:29:00 -0300</pubDate><description>&lt;p&gt;&lt;strong&gt;Original from 3/4/2011&lt;/strong&gt;: &lt;a href="http://web.archive.org/web/20130414095829/http://info.abril.com.br:80/noticias/rede/gestao20/software/processos-e-metodologias-nao-vao-te-ajudar/"target="_blank" rel="noopener"&gt;Gestão 2.0&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://akitaonrails.s3.amazonaws.com/assets/image_asset/image/352/eloperdido.jpg" alt="Missing Link" loading="lazy" /&gt;&lt;/p&gt;
&lt;p&gt;After so much time talking about methodologies, processes, and procedures, there&amp;rsquo;s one thing that should already be obvious but that most companies ignore: methodologies will never replace good professionals.&lt;/p&gt;
&lt;p&gt;If I say this to anyone, everyone will say: &lt;em&gt;&amp;ldquo;but that&amp;rsquo;s obvious.&amp;rdquo;&lt;/em&gt; And my urge is to retort: &amp;ldquo;then why the hell are you trying to implement this methodology?&amp;rdquo;&lt;/p&gt;
&lt;p&gt;First of all, let&amp;rsquo;s go through some definitions:&lt;/p&gt;</description><content:encoded><![CDATA[<p><strong>Original from 3/4/2011</strong>: <a href="http://web.archive.org/web/20130414095829/http://info.abril.com.br:80/noticias/rede/gestao20/software/processos-e-metodologias-nao-vao-te-ajudar/"target="_blank" rel="noopener">Gestão 2.0</a></p>
<p><img src="https://akitaonrails.s3.amazonaws.com/assets/image_asset/image/352/eloperdido.jpg" alt="Missing Link"  loading="lazy" /></p>
<p>After so much time talking about methodologies, processes, and procedures, there&rsquo;s one thing that should already be obvious but that most companies ignore: methodologies will never replace good professionals.</p>
<p>If I say this to anyone, everyone will say: <em>&ldquo;but that&rsquo;s obvious.&rdquo;</em> And my urge is to retort: &ldquo;then why the hell are you trying to implement this methodology?&rdquo;</p>
<p>First of all, let&rsquo;s go through some definitions:</p>
<ul>
<li>Methodology: a system of methods used in a particular area of study or activity.</li>
<li>Processes: a series of actions or steps taken to reach a particular goal.</li>
<li>Procedure: an established or official way of doing something.</li>
</ul>
<p>Notice that in software development we always talk about processes or methodologies, never procedures. That&rsquo;s because there&rsquo;s no established or official way of making software. The problem is that most people confuse processes and methodologies with procedures and try to apply them as if they were the &ldquo;official&rdquo; way of making software. And they aren&rsquo;t.</p>
<p>That&rsquo;s exactly why disputes like Agile vs PMI make no sense. PMI calls its set of processes PMBOK, where BOK means Body of Knowledge precisely because it isn&rsquo;t a procedure. It&rsquo;s just a body of knowledge that may or may not be useful depending on your sector of activity. Agile is no different: a set of methodologies and techniques that may or may not be useful in your company. None of them, and none of the others, are procedures. Understand this first.</p>
<p>Once you understand that, comes the second mistake. People who don&rsquo;t practice software development notice that the software being produced is of low quality. The indicators are obvious: customer complaints, internal complaints, the sense of excessive delay in completing any software work, and so on.</p>
<p>Seeing this, the first conclusion they reach is: &ldquo;we&rsquo;re missing procedures.&rdquo; And the search for the missing link begins. They find various processes and methodologies and try to institutionalize them. For a short period it seems the result is what they expected, but it doesn&rsquo;t take long to see that things haven&rsquo;t changed all that much. Then they blame the methodologies for &ldquo;not working.&rdquo;</p>
<p>Software development is an activity of <strong>&ldquo;practice.&rdquo;</strong> And watch out: &ldquo;practicing&rdquo; and &ldquo;being practical&rdquo; aren&rsquo;t the same thing. So one more definition:</p>
<p>Practice: 1. the actual application or use of an idea, belief, or method as opposed to theories about its application or use. 2. repeated exercise in or performance of an activity or skill so as to acquire or maintain proficiency in it. (Read a more refined definition on Wikipedia.)</p>
<p>Repeat with me: if you don&rsquo;t practice software, you don&rsquo;t understand software. It&rsquo;s like saying you were good at soccer 10 years ago, but you don&rsquo;t practice anymore and still want to believe you&rsquo;re good. If you haven&rsquo;t practiced for 10 years, you&rsquo;ve been bad for 10 years, and there&rsquo;s nothing to discuss.</p>
<p>In software, not practicing continuously, daily, <strong>deliberately</strong>, for 5 years is the same as a civil engineer saying he hasn&rsquo;t practiced engineering in 50 years. 5 years in software age is an eternity.</p>
<p>And if you don&rsquo;t practice software, you have nothing to say about it, by definition. So here&rsquo;s the tip: processes and methodologies won&rsquo;t help you, precisely because they aren&rsquo;t procedures.</p>
<p>If software had a procedure, it wouldn&rsquo;t be a practice. You&rsquo;d just mechanically follow the series of steps and, at the end, you&rsquo;d have quality software. More than that: if it were a procedure, it would already be possible to have software that generates software on its own, with no human help. But that doesn&rsquo;t exist, and never will.</p>
<p>If a restaurant has bad food, processes won&rsquo;t help it; changing the cook will. If your orchestra plays badly, processes won&rsquo;t help it; changing the musicians will. If your soccer team plays badly, processes won&rsquo;t help it; changing the players will.</p>
<p>Replacing them is perhaps drastic. Before that, I&rsquo;d say &ldquo;practicing&rdquo; and &ldquo;training&rdquo; will certainly help. But here&rsquo;s the thing: if your soccer player believes he only needs to play after he punches in his time card, and can stop when he punches out, he isn&rsquo;t a good player. So forcing them to train won&rsquo;t help and, consequently, processes and methodologies definitely won&rsquo;t help you.</p>
<p>With a good programmer it&rsquo;s the same. You don&rsquo;t need to force him to put his code into a versioned repository: he himself will miss it and do something about it. You don&rsquo;t need to force him to test his code: he himself will miss it and do something about it. You don&rsquo;t need to force him to refactor: he himself will feel that it&rsquo;s bad and do something about it.</p>
<p>A good practitioner doesn&rsquo;t need others to tell them what to do. They know what constitutes good work and will perform accordingly, or they will look for what they&rsquo;re missing and train until they become proficient at it.</p>
<p>A good practitioner lives by the idea that they have to be better today than they were yesterday, and keep that pace every day. A procedure professional knows that today&rsquo;s work is the same as yesterday&rsquo;s.</p>
<p>That&rsquo;s the difference. If your company manufactures screws, it follows procedures. Today there are people assembling those screws, following procedures; tomorrow you&rsquo;ll probably replace them with machines that will do the same job better and faster. That&rsquo;s the destiny of every procedure professional.</p>
<p>If your company is in gastronomy, music, sports, literature, art, or software, you want practitioners. If you don&rsquo;t have them, remember: processes and methodologies aren&rsquo;t procedures. Processes and methodologies can&rsquo;t be installed as procedures. Processes and methodologies will never transform people with a procedure mindset into practitioners. And without practitioners, your result will always be bad.</p>
<p>We&rsquo;ve been developing software for over 70 years. If the solution were that simple, don&rsquo;t you think everyone would have done it that way decades ago, with excellent results sustained for decades? Don&rsquo;t be naïve thinking you&rsquo;ve found the &ldquo;missing link&rdquo;: it doesn&rsquo;t exist.</p>
<p>The only thing we can do, always, is to try to be better tomorrow than today. But that isn&rsquo;t done with meetings, committees, procedures, magic recipes, gurus, or talks. It&rsquo;s done with practice. Want to be better at software? Practice software.</p>
<p>Now, do you have a good team, good professionals who really care about practice? Then yes, refining the processes and applying good techniques and tactics will improve things even more. But the order is this: good professionals first, then good methodologies. Repeating: good methodologies don&rsquo;t create good professionals, but good professionals will certainly know how to take advantage of good methodologies.</p>
<div class="embed-container">


<div class="embed-container">
  <iframe
    src="https://www.youtube.com/embed/cOQnBdQvqOs"
    title="YouTube video player"
    frameborder="0"
    allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
    referrerpolicy="strict-origin-when-cross-origin"
    allowfullscreen>
  </iframe>
</div>

</div>
]]></content:encoded><category>software-engineering</category><category>learning</category><category>management</category><category>off-topic</category></item><item><title>[Off-Topic] Great Artists Steal</title><link>https://akitaonrails.github.io/en/2012/05/13/off-topic-grandes-artistas-roubam/</link><guid isPermaLink="true">https://akitaonrails.github.io/en/2012/05/13/off-topic-grandes-artistas-roubam/</guid><pubDate>Sun, 13 May 2012 11:00:00 -0300</pubDate><description>&lt;p&gt;Most of us geeks have probably heard the phrase:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;ldquo;Good artists copy, great artists steal&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;It reaches us through Steve Jobs, in the context of the graphical interface being copied first by Apple from Xerox and then by Microsoft from Apple.&lt;/p&gt;
&lt;p&gt;The phrase became something of a cult after the famous TV movie &lt;a href="http://www.imdb.com/title/tt0168122/"target="_blank" rel="noopener"&gt;Pirates of Silicon Valley&lt;/a&gt;. And for a lot of people it ended up wrongly tied to &amp;ldquo;plagiarism&amp;rdquo; and &amp;ldquo;piracy.&amp;rdquo; For a long time I never stopped to think about it myself, I just tossed it into that same bucket.&lt;/p&gt;</description><content:encoded><![CDATA[<p>Most of us geeks have probably heard the phrase:</p>
<blockquote>
  <p>&ldquo;Good artists copy, great artists steal&rdquo;</p>

</blockquote>
<p>It reaches us through Steve Jobs, in the context of the graphical interface being copied first by Apple from Xerox and then by Microsoft from Apple.</p>
<p>The phrase became something of a cult after the famous TV movie <a href="http://www.imdb.com/title/tt0168122/"target="_blank" rel="noopener">Pirates of Silicon Valley</a>. And for a lot of people it ended up wrongly tied to &ldquo;plagiarism&rdquo; and &ldquo;piracy.&rdquo; For a long time I never stopped to think about it myself, I just tossed it into that same bucket.</p>
<p>The phrase is usually credited to the great artist <a href="http://pt.wikipedia.org/wiki/Pablo_Picasso"target="_blank" rel="noopener">Pablo Diego José Francisco de Paula Juan Nepomuceno María de los Remedios Cipriano de la Santísima Trinidad Ruiz y Picasso</a>, or simply Pablo Picasso :-). One aside, though: that attribution is shaky. The earliest documented version of the idea comes from T.S. Eliot, in 1920 (&ldquo;Immature poets imitate; mature poets steal&rdquo;), and it was Steve Jobs himself who started pinning Picasso&rsquo;s name on the saying back in the 1980s. Either way, it&rsquo;s the Picasso version that stuck, and that&rsquo;s the one I&rsquo;m starting from here.</p>
<p>Those who&rsquo;ve followed me for a while and attend my talks know I spend a lot of time trying to explain the term &ldquo;artist&rdquo; applied to &ldquo;software developer,&rdquo; to &ldquo;software craftsmanship,&rdquo; and more specifically to the &ldquo;practice of programming.&rdquo;</p>
<p>Programming isn&rsquo;t something where you read a book, do an exercise once, and <em>&ldquo;boom,&rdquo;</em> you already know how to program. Like any art, whether painting, music, or dance, it takes discipline and a lot of practice. And anyone who devotes themselves to an art knows that repetition is a technique, but repeating the same thing gets you nowhere.</p>
<p>The &ldquo;practice&rdquo; process starts with mastering a technique, repeating it many times, figuring out where you&rsquo;re going wrong, and refining it. Once it&rsquo;s mastered, you move quickly to new and harder techniques. It&rsquo;s continuous, with no &ldquo;end.&rdquo; There&rsquo;s no &ldquo;arrival point&rdquo; for anyone who practices an art. Even martial artists know a black belt doesn&rsquo;t mean &ldquo;the end.&rdquo;</p>
<p>If I had to sum all of that up, it would be with Picasso&rsquo;s phrase:</p>
<blockquote>
  <p>&ldquo;Good Artists Copy, Great Artists <del>Steal</del> Take For Themselves&rdquo;</p>

</blockquote>
<p>I swapped &ldquo;steal&rdquo; for the more literal &ldquo;take for themselves.&rdquo; That&rsquo;s the gotcha that changes the meaning for me.</p>
<p>Everything we have today, knowledge, culture, technique, technology, comes from centuries of meticulous accumulation and careful refinement by hundreds of great men and women. Literally, we are small elves standing <a href="http://en.wikipedia.org/wiki/Standing_on_the_shoulders_of_giants"target="_blank" rel="noopener">on the shoulders of giants</a>.</p>
<p>A material property, something physical, when taken from someone, is theft: for you to have it, someone had to go without. Copying that property is plagiarism. With knowledge and ideas, though, &ldquo;copying&rdquo; or &ldquo;stealing&rdquo; takes on several more abstract meanings, and I want to lay out one of them here.</p>
<p>Any artist has to start somewhere. A contemporary painter already starts light-years ahead of colleagues from a few centuries back. Back then, access to paint wasn&rsquo;t obvious.</p>
<p>From what material in nature do you extract yellow? Maybe from egg yolk. And ultramarine blue? Things get complicated. Years of accumulated knowledge today hand us every possible shade without our having to think about it.</p>
<p>The same goes for pointillism, watercolor, oil paint. Today we don&rsquo;t need to &ldquo;discover&rdquo; these techniques, they&rsquo;re already exhaustively documented. In other words:</p>
<blockquote>
  <p>&ldquo;To become &lsquo;good&rsquo; artists, we must &lsquo;copy&rsquo; the hundreds of techniques the giants created before us, until we master them.&rdquo;</p>

</blockquote>
<p>And let&rsquo;s be honest: a painter who copies the techniques well enough to be indistinguishable from the masters who created them is already an excellent artist.</p>
<p>Every practice starts by copying what has already been done. Repeating, learning the nuances, understanding why the techniques ended up the way they are today. Whoever follows this philosophy, copying to master and pushing forward until they cover the whole field, is walking in the footsteps of the giants of the past.</p>
<p>Then comes an extra step. We geeks know the cliché of when <em>&ldquo;the disciple becomes the master.&rdquo;</em> In the movies it looks much easier, but that step is the moment the artist stops merely copying what they mastered:</p>
<blockquote>
  <p>&ldquo;To become &lsquo;great&rsquo; artists, after mastering what we copied, we can adapt it, refine it, and who knows, improve it or innovate on it. That&rsquo;s when we stop just copying and start literally &lsquo;stealing,&rsquo; making that property effectively our own, taking it for ourselves.&rdquo;</p>

</blockquote>
<p>That&rsquo;s when an Einstein succeeds a Newton, or a Plato succeeds a Socrates. Here &ldquo;steal&rdquo; carries the sense of &ldquo;making the property effectively your own,&rdquo; far from the common use of &ldquo;undeservedly taking what belongs to someone else.&rdquo;</p>
<p>Every good painter or visual artist has dozens of giants and centuries of material to &ldquo;copy&rdquo; and &ldquo;practice&rdquo;: Michelangelo, Da Vinci, Picasso.</p>
<h2>Wall Painter vs Painting Painter<span class="hx:absolute hx:-mt-20" id="wall-painter-vs-painting-painter"></span>
    <a href="#wall-painter-vs-painting-painter" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>Another thing I&rsquo;ve been repeating <a href="http://en.wikipedia.org/wiki/Ad_nauseam"target="_blank" rel="noopener">ad nauseam</a> is that there are programmer-coders and programmer-developers. Wall painters and painting painters.</p>
<p>Coders don&rsquo;t understand their role in this story. They learn to copy a few techniques, maybe master some of them, and quickly call themselves &ldquo;masters.&rdquo; It&rsquo;s mediocre thinking, the kind that would embarrass the giants of earlier eras: Babbage, Von Neumann, Bob Noyce. They&rsquo;re mere wall painters.</p>
<p>Developers, as I like to call them, understand their role in history better. They recognize the richness of the material that already exists, practice without limit and without believing in an end, and master technique after technique, always aiming a level above what exists now. But they&rsquo;d never put themselves in the position of painting a Mona Lisa without first perfecting the <em>sfumato</em>. Those are painting painters.</p>
<p>It embarrasses me to see programmers who read little, practiced miserably little, and think themselves in a master&rsquo;s position. The same way it would embarrass a painter to hear someone claim they can paint a fresco without even knowing how to thin a plaster base.</p>
<p>To sum up my personal version:</p>
<blockquote>
  <p>&ldquo;Good Artists Copy, Great Artists Take For Themselves, Terrible Artists Are Full of Themselves.&rdquo;</p>

</blockquote>
]]></content:encoded><category>philosophy</category><category>learning</category><category>off-topic</category></item><item><title>[Off-Topic] Reading with subtitles over Kanjis in Japanese webpages</title><link>https://akitaonrails.github.io/en/2012/05/08/off-topic-reading-with-subtitles-over-kanjis-in-japanese-webpages/</link><guid isPermaLink="true">https://akitaonrails.github.io/en/2012/05/08/off-topic-reading-with-subtitles-over-kanjis-in-japanese-webpages/</guid><pubDate>Tue, 08 May 2012 10:36:00 -0300</pubDate><description>&lt;p&gt;This is something I just stumbled upon and because it&amp;rsquo;s tricky to install the first time I decided to grab the pieces that make it work. It&amp;rsquo;s so useful I had to post about it.&lt;/p&gt;
&lt;p&gt;If you&amp;rsquo;re learning Japanese this will definitely prove to be an invaluable tool. I am Japanese but I didn&amp;rsquo;t pay attention to proper Kanji training when I was a child. It shows now, as I can read Kanji only to what would be considered below high-school level in Japan. Still very useful, but it means I can&amp;rsquo;t read most websites in Japanese fast enough.&lt;/p&gt;</description><content:encoded><![CDATA[<p>This is something I just stumbled upon and because it&rsquo;s tricky to install the first time I decided to grab the pieces that make it work. It&rsquo;s so useful I had to post about it.</p>
<p>If you&rsquo;re learning Japanese this will definitely prove to be an invaluable tool. I am Japanese but I didn&rsquo;t pay attention to proper Kanji training when I was a child. It shows now, as I can read Kanji only to what would be considered below high-school level in Japan. Still very useful, but it means I can&rsquo;t read most websites in Japanese fast enough.</p>
<p>I&rsquo;ve known of a Firefox add-on I&rsquo;m very fond of for a long time now called <a href="http://web.archive.org/web/20120624074033/https://addons.mozilla.org/pt-br/firefox/addon/rikaichan/"target="_blank" rel="noopener">Rikaichan</a>. When enabled, you hover your mouse over the kanji text and it will popup a box with the translation. You install the Firefox add-on in the previous link and a proper dictionary to your native language from <a href="http://web.archive.org/web/20120512063523/http://polarcloud.com/rikaichan"target="_blank" rel="noopener">Rikaichan&rsquo;s webpage</a>. And that&rsquo;s it.</p>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2012/5/8/Screen%20Shot%202012-05-08%20at%2010.30.34%20AM_original.png?1336483998" alt=""  loading="lazy" /></p>
<p>But if you like to read Manga (Japanese Comics), you&rsquo;re probably familiar with Furigana. It&rsquo;s kind of like &ldquo;subtitling&rdquo; over the Kanjis with Hiragana or Katakana, the Japanese syllabaries (the first for Japanese only words, the second for foreign words).</p>
<p>That makes reading the more difficult Kanjis way easier and faster than hovering over each one or looking manually into the dictionary ideogram by ideogram.</p>
<p>A normal snippet of a Japanese webpage looks like this:</p>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2012/5/8/Screen%20Shot%202012-05-08%20at%2010.17.14%20AM_original.png?1336483852" alt=""  loading="lazy" /></p>
<p>But with <a href="http://web.archive.org/web/20131115215917/https://addons.mozilla.org/pt-BR/firefox/addon/furigana-inserter/"target="_blank" rel="noopener">Furigana Inserter</a> the same snippet looks like this:</p>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2012/5/8/Screen%20Shot%202012-05-08%20at%2010.17.25%20AM_original.png?1336483884" alt=""  loading="lazy" /></p>
<p>To install it, first you install the <a href="http://web.archive.org/web/20131115215917/https://addons.mozilla.org/pt-BR/firefox/addon/furigana-inserter/"target="_blank" rel="noopener">add-on</a>. Then you install the <a href="http://web.archive.org/web/20130501123822/https://addons.mozilla.org/en-US/firefox/addon/html-ruby/"target="_blank" rel="noopener">HTML Ruby</a> add-on as well. Finally, you install this <a href="http://web.archive.org/web/20111115202242/http://code.google.com:80/p/itadaki/downloads/detail?name=furiganainserter-dictionary-1.2.7z"target="_blank" rel="noopener">dictionary</a>. It&rsquo;s a 7-zip file you must decompress and manually drag it over Firefox to install.</p>
<p>If you&rsquo;re on a Mac, I&rsquo;m assuming you know what <a href="https://github.com/mxcl/homebrew"target="_blank" rel="noopener">Homebrew</a> is and already have that installed. Because then you can install Mecab like this:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">brew install mecab
</span></span><span class="line"><span class="cl">brew install mecab-ipadic</span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>Finally, it seems like you must manually make Furigana Inserter aware of Mecab by adding a symlink into its extension folder:</p>
<div class="hextra-code-block hx:relative hx:mt-6 hx:first:mt-0 hx:group/code">

<div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">ln -s /usr/local/lib/libmecab.dylib ~/Library/Application<span class="se">\ </span>Support/Firefox/Profiles/454dy2eg.default/extensions/furiganainserter@zorkzero.net/mecab/libmecab.dylib</span></span></code></pre></div></div><div class="hextra-code-copy-btn-container hx:opacity-0 hx:transition hx:group-hover/code:opacity-100 hx:flex hx:gap-1 hx:absolute hx:m-[11px] hx:right-0 hx:top-0">
  <button
    class="hextra-code-copy-btn hx:group/copybtn hx:cursor-pointer hx:transition-all hx:active:opacity-50 hx:bg-primary-700/5 hx:border hx:border-black/5 hx:text-gray-600 hx:hover:text-gray-900 hx:rounded-md hx:p-1.5 hx:dark:bg-primary-300/10 hx:dark:border-white/10 hx:dark:text-gray-400 hx:dark:hover:text-gray-50"
    title="Copy code"
  >
    <div class="hextra-copy-icon hx:group-[.copied]/copybtn:hidden hx:pointer-events-none hx:h-4 hx:w-4"></div>
<div class="hextra-success-icon hx:hidden hx:group-[.copied]/copybtn:block hx:pointer-events-none hx:h-4 hx:w-4"></div>
  </button>
</div>
</div>
<p>Understand that the Firefox Profile folder will have a different name on your computer. The one in the example is in my Mac. Open the terminal and tab to autocomplete each folder as you type and it should work just fine.</p>
<p>Restart Firefox, right-click in Japanese pages and you will have an &ldquo;Enable Furigana&rdquo; option waiting for you. Rikaichan seems to misbehave when hovering over Furigana enabled Kanji, so you may need to disable Furigana to use Rikaichan. But it&rsquo;s a good compromise and may open a whole lot of new content in Japanese for us to consume.</p>
<p>One more reason to use Firefox.</p>
]]></content:encoded><category>learning</category><category>developer-tools</category><category>off-topic</category></item><item><title>Off-Topic: Literature for Agile Managers</title><link>https://akitaonrails.github.io/en/2010/01/06/off-topic-literatura-para-gerentes-ageis/</link><guid isPermaLink="true">https://akitaonrails.github.io/en/2010/01/06/off-topic-literatura-para-gerentes-ageis/</guid><pubDate>Wed, 06 Jan 2010 03:24:00 -0200</pubDate><description>&lt;p&gt;&lt;strong&gt;Update: 01/06:&lt;/strong&gt; When I started writing, the goal was to be really assertive. It still frustrates me to research current material, blogs, and articles, and not see any Agility topic going deeper into the principles.&lt;/p&gt;
&lt;p&gt;On top of that, I&amp;rsquo;m anxious about my own research, which always seems to have pieces missing. Since there&amp;rsquo;s almost no one to talk to about it, the frustration grows. So, at the start of the article, I was already out of patience and began abusing the first and third person, in a near 1-to-1 dialogue. That wasn&amp;rsquo;t helping the main point, so I decided to trim the most aggressive parts. Let&amp;rsquo;s see if it&amp;rsquo;s more &amp;ldquo;digestible&amp;rdquo; now :-)&lt;/p&gt;</description><content:encoded><![CDATA[<p><strong>Update: 01/06:</strong> When I started writing, the goal was to be really assertive. It still frustrates me to research current material, blogs, and articles, and not see any Agility topic going deeper into the principles.</p>
<p>On top of that, I&rsquo;m anxious about my own research, which always seems to have pieces missing. Since there&rsquo;s almost no one to talk to about it, the frustration grows. So, at the start of the article, I was already out of patience and began abusing the first and third person, in a near 1-to-1 dialogue. That wasn&rsquo;t helping the main point, so I decided to trim the most aggressive parts. Let&rsquo;s see if it&rsquo;s more &ldquo;digestible&rdquo; now :-)</p>
<p>Last year I put together a <a href="/en/2009/07/11/off-topic-livros-de-refer-ncia-2008-2009">list of books</a> I read in my search for the essence of <strong>true</strong> management. Instead of going through the more trivial authors, like Peter Drucker, I went after the principles of Agility.</p>
<p>There are a few categories of managers: the &ldquo;agile&rdquo; ones, in the broadest sense of the word, and the &ldquo;traditional&rdquo; ones. The second group, prone to not wanting to change or learn anything, is sad, period. The first is on the right path, but there&rsquo;s still a long way to go. The discussions I see today in agile communities also fall into the inertia of &ldquo;good sense&rdquo; and &ldquo;common sense,&rdquo; and end up shallow.</p>
<p>An agile manager should want to dedicate a lot more. Scrum itself is an example. As I said in the article <a href="/en/2009/12/10/off-topic-voce-nao-entende-nada-de-scrum">You Don&rsquo;t Understand Anything About Scrum</a>: Jeff Sutherland and Ken Schwaber researched the relevant subjects long ago and gave the tips, though few follow them.</p>
<p>If you really want to understand Scrum, this literature helps a lot. To start, there are the <a href="http://web.archive.org/web/20100114175300/http://scrumtraininginstitute.com/home/stream_download/scrumpapers"target="_blank" rel="noopener">Scrum Papers</a>, which give you the introduction.</p>
<p>If you read them, you&rsquo;ve already bumped into terms like &ldquo;Emergence,&rdquo; &ldquo;Edge of Chaos,&rdquo; &ldquo;Complex Adaptive Systems,&rdquo; and &ldquo;Self-Organization.&rdquo; And if you passed through those terms and left it at that, think again: what&rsquo;s the point of reading without understanding?</p>
<p>I don&rsquo;t know everything yet either, but I&rsquo;m committed to understanding this properly. Without the principles, all that&rsquo;s left is to &ldquo;follow a recipe,&rdquo; and that&rsquo;s very little.</p>
<p>Whoever looks for rules or recipes is trying to shed their own responsibility. If the method, the procedure, or the process &ldquo;fails&rdquo; or doesn&rsquo;t deliver, you can always hide behind &ldquo;but I followed it to the letter, it&rsquo;s not my fault.&rdquo; That misses the point. What result are you after: following rules or reaching results?</p>
<p>I say this with &ldquo;aggressiveness,&rdquo; but some reluctance, because I used to think this way myself. Anyway, after some time reading academic articles, right now I&rsquo;m working through these books:</p>
<ul>
<li>
<p><a href="http://www.amazon.com/Systems-Thinking-Second-Complexity-Architecture/dp/0750679735/ref=sr_1_2?ie=UTF8&amp;s=books&amp;qid=1262753653&amp;sr=8-2"target="_blank" rel="noopener">Systems Thinking, Second Edition: Managing Chaos and Complexity: A Platform for Designing Business Architecture</a>. Once you fall into Complexity, you leave classical, reductionist, deterministic thinking behind and start needing the holistic thinking of Systems, which has itself gone through several paradigms. Highly recommended: it opens by describing the different management models and their evolution with precision.</p>
</li>
<li>
<p><a href="http://www.amazon.com/Essence-Chaos-Jessie-John-Lecture/dp/0295975148/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1262753645&amp;sr=8-1"target="_blank" rel="noopener">The Essence of Chaos</a>. Complex Adaptive Systems fall under the broader subject of &ldquo;Complexity,&rdquo; and that leads straight to &ldquo;Chaos.&rdquo; I&rsquo;d rather read something by Ilya Prigogine, but since I&rsquo;m on a Kindle, the only things I found available were titles like this one, by none other than Edward Lorenz, one of the &ldquo;fathers&rdquo; of Chaos.</p>
</li>
<li>
<p><a href="http://www.amazon.com/Surfing-Edge-Chaos-Nature-Business/dp/0609808834/ref=sr_1_3?ie=UTF8&amp;s=books&amp;qid=1262753662&amp;sr=8-3"target="_blank" rel="noopener">Surfing the Edge of Chaos: The Laws of Nature and the New Laws of Business</a>. Systems and Complexity also require understanding the Edge of Chaos.</p>
</li>
<li>
<p><a href="http://www.amazon.com/Greatest-Show-Earth-Evidence-Evolution/dp/1416594787/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1262753713&amp;sr=8-1"target="_blank" rel="noopener">The Greatest Show on Earth: The Evidence for Evolution</a>. One of the clearest examples of Complex Adaptive Systems is the nature around us. You need to understand Darwin&rsquo;s Theory of Evolution. Most people &ldquo;think&rdquo; they understand it, but watch out: much of it is folklore, and plenty of people still doubt it. If you have doubts about Evolution, don&rsquo;t even start.</p>
</li>
</ul>
<p>More than that? From experience, every time someone uses words like &ldquo;chaos&rdquo; or &ldquo;balance,&rdquo; I notice they&rsquo;re working from the casual definition, not the technical one. Many think &ldquo;chaos&rdquo; is just mess, something completely unwanted.</p>
<p>Worse still: they believe the &ldquo;secret&rdquo; is to reach <strong>balance</strong> and stay there, and they confuse the goal with seeking balance. That&rsquo;s not quite it.</p>
<p>Here&rsquo;s what the introduction of Surfing the Edge of Chaos says:</p>
<blockquote>
  <p><em>Equilibrium</em> is a precursor to death. When a living system is in a state of equilibrium, it is less responsive to changes occurring around it. This places it at maximum risk. In the face of threat, or when galvanized by a compelling opportunity, living things move toward the <em>edge of chaos</em>. This condition evokes higher levels of mutation and experimentation, and fresh new solutions are more likely to be found.</p>
<p>When this excitation takes place, the components of living systems <em>self-organize</em> and new forms and repertoires <em>emerge</em> from the turmoil.</p>
<p>Living systems cannot be <em>directed</em> along a linear path. Unforeseen consequences are inevitable. The challenge is to disturb them in a way that approximates the desired outcome.</p>

</blockquote>
<p>This is a definition of the biological evolution of living beings. But if you&rsquo;ve read at least the basics of Scrum and Agile, it&rsquo;s also a way to describe the Agile process. Reread the <a href="http://agilemanifesto.org/principles.html"target="_blank" rel="noopener">Principles of the Agile Manifesto</a> and you&rsquo;ll find similar texts.</p>
<p>As for Complex Adaptive Systems:</p>
<blockquote>
  <p>A complex adaptive system is formally defined as a system of independent agents that can act in parallel, develop &ldquo;models&rdquo; as to how things work in their environment, and, most importantly, refine those models through learning and adaptation. The human immune system is a complex adaptive system. So is a rain forest, an ant colony, and a <em>business</em>.</p>

</blockquote>
<p>There&rsquo;s vast literature. Search Amazon for terms like &ldquo;Complexity,&rdquo; &ldquo;Edge of Chaos,&rdquo; and &ldquo;Systems Thinking,&rdquo; and you&rsquo;ll see that for decades researchers from the most varied fields and industries have been refining this body of knowledge. Techniques like the Toyota Production System/Lean, Six Sigma, Scrum, and Theory of Constraints all derive from this school of thought.</p>
<p>From my previous list, I reinforce the need for readings like:</p>
<ul>
<li>
<p><a href="http://www.amazon.com/Machine-That-Changed-World-Production/dp/0060974176/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1262755165&amp;sr=1-1"target="_blank" rel="noopener">The Machine that Changed the World: The Story of Lean Production</a>. Understand how the Lean process came about at Toyota.</p>
</li>
<li>
<p><a href="http://www.amazon.com/Goal-Process-Ongoing-Improvement/dp/0884271781/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1247296468&amp;sr=8-1"target="_blank" rel="noopener">The Goal</a>. Process engineering and cost control. Without understanding TOC, it&rsquo;s futile.</p>
</li>
<li>
<p><a href="http://www.amazon.com/End-Management-Rise-Organizational-Democracy/dp/078795912X/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1247296899&amp;sr=8-1"target="_blank" rel="noopener">The End of Management, and the Rise of Organizational Democracy</a>. A summary of all these subjects and, maybe, a provocative introduction to the rest.</p>
</li>
</ul>
<p>More concerning: techniques like Lean, TOC, Six Sigma, and derivatives like Kanban are terms plenty of people use the wrong way nowadays. They were all born and refined in Production Engineering, always talking about the &ldquo;production line&rdquo; and the &ldquo;manufacturing&rdquo; of material goods, &ldquo;physical&rdquo; things.</p>
<p>In Agile, we&rsquo;re talking about &ldquo;Software,&rdquo; something abstract and without parallel in the physical world, and therefore without the same references.</p>
<p>It&rsquo;s impossible to migrate any Production Engineering technique verbatim. It doesn&rsquo;t work that simply. A Scrum Sprint is a conscious adaptation by Sutherland and Schwaber, who knew this limitation and attempted an approximation in the abstract world.</p>
<p>But this isn&rsquo;t obvious or trivial to grasp. I haven&rsquo;t fully grasped it myself yet, and I believe most people in the agile world never stopped to study this difference.</p>
<p>Be very careful: &ldquo;Management&rdquo; is <strong>much</strong> more than &ldquo;experience&rdquo; or &ldquo;good sense.&rdquo; Just as a good programmer needs to read and research a lot to sharpen their technique, a manager <strong>needs</strong> to as well. And I&rsquo;m saying this to myself.</p>
]]></content:encoded><category>agile</category><category>management</category><category>learning</category><category>off-topic</category></item><item><title>[Off-Topic] The Argument from Intimidation</title><link>https://akitaonrails.github.io/en/2009/09/12/off-topic-a-argumenta--o-atrav-s-da-intimida--o/</link><guid isPermaLink="true">https://akitaonrails.github.io/en/2009/09/12/off-topic-a-argumenta--o-atrav-s-da-intimida--o/</guid><pubDate>Sat, 12 Sep 2009 09:40:00 -0300</pubDate><description>&lt;p&gt;There is a certain type of argument which, in fact, is not an argument, but a means of forestalling debate and extorting an opponent&amp;rsquo;s agreement with one&amp;rsquo;s undiscussed notions. It is a method of bypassing logic by means of psychological pressure. Since it is particularly prevalent in today&amp;rsquo;s culture and is going to grow more so in the next few months, one would do well to learn to identify it and be on guard against it.&lt;/p&gt;</description><content:encoded><![CDATA[<p>There is a certain type of argument which, in fact, is not an argument, but a means of forestalling debate and extorting an opponent&rsquo;s agreement with one&rsquo;s undiscussed notions. It is a method of bypassing logic by means of psychological pressure. Since it is particularly prevalent in today&rsquo;s culture and is going to grow more so in the next few months, one would do well to learn to identify it and be on guard against it.</p>
<p>This method bears a certain resemblance to the fallacy <a href="http://pt.wikipedia.org/wiki/Argumentum_ad_hominem"target="_blank" rel="noopener">ad hominem</a>, and comes from the same psychological root, but is different in essential meaning. The ad hominem fallacy consists of attempting to refute an argument by impeaching the character of its proponent. Example: &ldquo;Candidate X is immoral, therefore his argument is false.&rdquo;</p>
<p>But the psychological pressure method consists of threatening to impeach an opponent&rsquo;s character by means of his argument, thus impeaching the argument without debate. Example: &ldquo;Only the immoral can fail to see that Candidate X&rsquo;s argument is false.&rdquo;</p>
<p>In the first case, Candidate X&rsquo;s immorality (real or invented) is offered as proof of the falsehood of his argument. In the second case, the falsehood of his argument is asserted arbitrarily and offered as proof of his immorality.</p>
<p>In today&rsquo;s epistemological jungle, that second method is used more frequently than any other type of irrational argument. It should be classified as a logical fallacy and may be designated as &ldquo;the Argument from Intimidation.&rdquo;</p>
<p>The essential characteristic of the Argument from Intimidation is its appeal to moral self-doubt and its reliance on the fear, guilt or ignorance of the victim. It is used in the form of an ultimatum demanding that the victim renounce a given idea without discussion, under threat of being considered morally unworthy. The pattern is always: &ldquo;Only those who are evil (dishonest, heartless, insensitive, ignorant, etc.) can hold such an idea.&rdquo;</p>
<p>The classic example of the Argument from Intimidation is the story <a href="http://tinyurl.com/qlmbw7"target="_blank" rel="noopener">The Emperor&rsquo;s New Clothes</a>.</p>
<p>In that story, some charlatans sell nonexistent garments to the Emperor by asserting that the garments&rsquo; unusual beauty makes them invisible to those who are morally depraved at heart. Observe the psychological factors required to make this work: the charlatans rely on the Emperor&rsquo;s self-doubt; the Emperor does not question their assertion nor their moral authority; he surrenders at once, claiming that he does see the garments—thus denying the evidence of his own eyes and invalidating his own consciousness—rather than face a threat to his precarious self-esteem. His distance from reality may be gauged by the fact that he prefers to walk naked down the street, displaying his nonexistent garments to the people—rather than risk incurring the moral condemnation of two scoundrels. The people, prompted by the same psychological panic, try to surpass one another in loud exclamations on the splendor of his clothes—until a child cries out that the Emperor is naked.</p>
<p>This is the exact pattern of the working of the Argument from Intimidation, as it is being worked all around us today.</p>
<p>We have all heard it and are hearing it constantly:</p>
<ul>
<li>&ldquo;Only those who lack finer instincts can fail to accept the morality of altruism.&rdquo;</li>
<li>&ldquo;Only the ignorant can fail to know that reason has been invalidated.&rdquo;</li>
<li>&ldquo;Only black-hearted reactionaries can advocate capitalism.&rdquo;</li>
<li>&ldquo;Only war-mongers can oppose the United Nations.&rdquo;</li>
<li>&ldquo;Only the lunatic fringe can still believe in freedom.&rdquo;</li>
<li>&ldquo;Only cowards can fail to see that life is a sewer.&rdquo;</li>
<li>&ldquo;Only the superficial can seek beauty, happiness, achievement, values or heroes.&rdquo;</li>
</ul>
<p>As an example of an entire field of activity based on nothing but the Argument from Intimidation, I give you modern art—where, in order to prove that they do possess the special insight possessed only by the mystic &ldquo;elite,&rdquo; the populace are trying to surpass one another in loud exclamations on the splendor of some bare (but smudged) piece of canvas.</p>
<p>The Argument from Intimidation dominates today&rsquo;s discussions in two forms. In public speeches and print, it flourishes in the form of long, involved, elaborate structures of unintelligible verbiage, which convey nothing clearly except a moral threat. (&ldquo;Only the primitive-minded can fail to realize that clarity is oversimplification.&rdquo;) But in private, day-to-day experience, it comes up wordlessly, between the lines, in the form of inarticulate sounds conveying unstated implications. It relies, not on what is said, but on how it is said—not on content, but on tone of voice.</p>
<p>The tone is usually one of scornful or belligerent incredulity. &ldquo;Surely you are not an advocate of capitalism, are you?&rdquo; And if this does not intimidate the prospective victim—who answers, properly: &ldquo;I am&rdquo;—the ensuing dialogue goes something like this:</p>
<ul>
<li>&ldquo;Oh, you couldn&rsquo;t be! Not really!&rdquo;</li>
<li>&ldquo;Really.&rdquo;</li>
<li>&ldquo;But everybody knows that capitalism is outdated!&rdquo;</li>
<li>&ldquo;I don&rsquo;t.&rdquo;</li>
<li>&ldquo;Oh, come now!&rdquo;</li>
<li>&ldquo;Since I don&rsquo;t know it, will you please tell me the reasons for thinking that capitalism is outdated?&rdquo;</li>
<li>&ldquo;Oh, don&rsquo;t be ridiculous!&rdquo;</li>
<li>&ldquo;Will you tell me the reasons?&rdquo;</li>
<li>&ldquo;Well, really, if you don&rsquo;t know, I couldn&rsquo;t possibly tell you!&rdquo;</li>
</ul>
<p>All this is accompanied by raised eyebrows, wide-eyed stares, shrugs, grunts, snickers and the entire arsenal of nonverbal signals communicating ominous innuendoes and emotional vibrations of a single kind: disapproval.</p>
<p>If those vibrations fail, if such debaters are challenged, one finds that they have no arguments, no evidence, no proof, no reason, no ground to stand on—that their noisy aggressiveness serves to hide a vacuum—that the Argument from Intimidation is a confession of intellectual impotence.</p>
<p>The primordial archetype of that Argument is obvious (and so are the reasons of its appeal to the neo-mysticism of our age): &ldquo;To those who understand, no explanation is necessary; to those who don&rsquo;t, none is possible.&rdquo;</p>
<p>The psychological source of that Argument is social metaphysics.</p>
<p>A social metaphysician is one who regards the consciousness of other men as superior to his own and to the facts of reality. It is to a social metaphysician that the moral appraisal of himself by others is a primary concern which supersedes truth, facts, reason, logic. The disapproval of others is so shatteringly terrifying to him that nothing can withstand its impact within his consciousness; thus he would deny the evidence of his own eyes and invalidate his own consciousness for the sake of any stray charlatan&rsquo;s moral sanction. It is only a social metaphysician who could conceive of such absurdity as hoping to win an intellectual argument by hinting: &ldquo;But people won&rsquo;t like you!&rdquo;</p>
<p>Strictly speaking, a social metaphysician does not conceive of his Argument in conscious terms: he finds it &ldquo;instinctively&rdquo; by introspection—since it represents his psycho-epistemological way of life. We have all met the exasperating type of person who does not listen to what one says, but to the emotional vibrations of one&rsquo;s voice, anxiously translating them into approval or disapproval, then answering accordingly. This is a kind of self-imposed Argument from Intimidation, to which a social metaphysician surrenders in most of his human encounters. And thus when he meets an adversary, when his premises are challenged, he resorts automatically to the weapon that terrifies him most: the withdrawal of a moral sanction.</p>
<p>Since that kind of terror is unknown to psychologically healthy men, they may be taken in by the Argument from Intimidation, precisely because of their innocence. Unable to understand that Argument&rsquo;s motive or to believe that it is merely a senseless bluff, they assume that its user has some sort of knowledge or reasons to back up his seemingly self-confident, belligerent assertions; they give him the benefit of the doubt—and are left in helplessly bewildered confusion. It is thus that the social metaphysicians can victimize the young, the innocent, the conscientious.</p>
<p>This is particularly prevalent in college classrooms. Many professors use the Argument from Intimidation to stifle independent thinking among the students, to evade questions they cannot answer, to discourage any critical analysis of their arbitrary assumptions or any departure from the intellectual status quo.</p>
<p>&ldquo;Aristotle? My dear fellow—&rdquo; (a weary sigh) &ldquo;if you had read Professor Spiffkin&rsquo;s piece in—&rdquo; (reverently) &ldquo;the January 1912 issue of Intellect magazine, which—&rdquo; (contemptuously) &ldquo;you obviously haven&rsquo;t, you would know—&rdquo; (airily) &ldquo;that Aristotle has been refuted.&rdquo;</p>
<p>&ldquo;Professor X?&rdquo; (X standing for the name of a distinguished theorist of free-enterprise economics.) &ldquo;Are you quoting Professor X? Oh no, not really!&quot;—followed by a sarcastic chuckle intended to convey that Professor X had been thoroughly discredited. (By whom? Blank out.)</p>
<p>Such teachers are frequently assisted by the &ldquo;liberal&rdquo; goon squad of the classroom, who burst into laughter at appropriate moments.</p>
<p>In our political life, the Argument from Intimidation is the almost exclusive method of discussion. Predominantly, today&rsquo;s political debates consist of smears and apologies, or intimidation and appeasement. The first is usually (though not exclusively) practiced by the &ldquo;liberals,&rdquo; the second by the &ldquo;conservatives.&rdquo; The champions, in this respect, are the &ldquo;liberal&rdquo; Republicans who practice both: the first, toward their &ldquo;conservative&rdquo; fellow Republicans—the second, toward the Democrats.</p>
<p>All smears are Arguments from Intimidation: they consist of derogatory assertions without any evidence or proof, offered as a substitute for evidence or proof, aimed at the moral cowardice or unthinking credulity of the hearers.</p>
<p>The Argument from Intimidation is not new; it has been used in all ages and cultures, but seldom on so wide a scale as today. It is used more crudely in politics than in other fields of activity, but it is not confined to politics. It permeates our entire culture. It is a symptom of cultural bankruptcy.</p>
<p>How does one resist that Argument? There is only one weapon against it: moral certainty.</p>
<p>When one enters any intellectual battle, big or small, public or private, one cannot seek, desire or expect the enemy&rsquo;s sanction. Truth or falsehood must be one&rsquo;s sole concern and sole criterion of judgment—not anyone&rsquo;s approval or disapproval; and, above all, not the approval of those whose standards are the opposite of one&rsquo;s own. (note: ever notice those arguments that open with &ldquo;I respect you a lot, but&hellip;&rdquo;, clearly fishing for approval?)</p>
<p>Let me emphasize that the Argument from Intimidation does not consist of introducing moral judgment into intellectual issues, but of substituting moral judgment for intellectual argument. Moral evaluations are implicit in most intellectual issues; it is not merely permissible, but mandatory to pass moral judgment when and where appropriate; to suppress such judgment is an act of moral cowardice. But a moral judgment must always follow, not precede (or supersede), the reasons on which it is based.</p>
<p>When one gives reasons for one&rsquo;s verdict, one assumes responsibility for it and lays oneself open to objective judgment: if one&rsquo;s reasons are wrong or false, one suffers the consequences. But to condemn without giving reasons is an act of irresponsibility, a kind of moral &ldquo;hit-and-run&rdquo; driving, which is the essence of the Argument from Intimidation.</p>
<p>Observe that the men who use that Argument are the ones who dread a reasoned moral attack more than any other kind of battle—and when they encounter a morally confident adversary, they are loudest in protesting that &ldquo;moralizing&rdquo; should be kept out of intellectual discussions. But to discuss evil in a manner implying neutrality, is to sanction it.</p>
<p>The Argument from Intimidation illustrates why it is important to be certain of one&rsquo;s premises and of one&rsquo;s moral ground. It illustrates the kind of intellectual pitfall that awaits those who venture forth without a full, clear, consistent set of convictions, wholly integrated all the way down to fundamentals—those who recklessly leap into battle, armed with nothing but a few random notions floating in a fog of the unknown, the unidentified, the undefined, the unproved, and supported by nothing but their feelings, hopes and fears. The Argument from Intimidation is their Nemesis. In moral and intellectual issues, it is not enough to be right: one has to know that one is right.</p>
<p>by <strong>Ayn Rand</strong> – last chapter of &ldquo;The Virtue of Selfishness&rdquo;, 1964
</content>
</invoke></p>
]]></content:encoded><category>philosophy</category><category>learning</category><category>off-topic</category></item><item><title>[Translation] What Makes a Good Programmer?</title><link>https://akitaonrails.github.io/en/2009/07/23/tradu--o-o-que-faz-um-bom-programador/</link><guid isPermaLink="true">https://akitaonrails.github.io/en/2009/07/23/tradu--o-o-que-faz-um-bom-programador/</guid><pubDate>Thu, 23 Jul 2009 10:35:00 -0300</pubDate><description>&lt;p&gt;Many people have asked me how to become a good programmer. They&amp;rsquo;re usually more concerned with which language to learn, which course to take, which technical books to read. But, just like the authors of these two articles I&amp;rsquo;m going to translate, I&amp;rsquo;d say there are more important qualities to consider.&lt;/p&gt;
&lt;p&gt;The first article is &lt;a href="http://web.archive.org/web/20090723103949/http://www.techfounder.net/2009/07/22/what-makes-a-good-programmer/"target="_blank" rel="noopener"&gt;What makes a good programmer?&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;An Analytical Thinker&lt;span class="hx:absolute hx:-mt-20" id="an-analytical-thinker"&gt;&lt;/span&gt;
&lt;a href="#an-analytical-thinker" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Programmers need to be problem solvers. The process of programming requires that we systematically break complicated problems down, plan and implement solutions and find / eliminate small inconsistencies in code (bugs).&lt;/p&gt;</description><content:encoded><![CDATA[<p>Many people have asked me how to become a good programmer. They&rsquo;re usually more concerned with which language to learn, which course to take, which technical books to read. But, just like the authors of these two articles I&rsquo;m going to translate, I&rsquo;d say there are more important qualities to consider.</p>
<p>The first article is <a href="http://web.archive.org/web/20090723103949/http://www.techfounder.net/2009/07/22/what-makes-a-good-programmer/"target="_blank" rel="noopener">What makes a good programmer?</a></p>
<h3>An Analytical Thinker<span class="hx:absolute hx:-mt-20" id="an-analytical-thinker"></span>
    <a href="#an-analytical-thinker" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p>Programmers need to be problem solvers. The process of programming requires that we systematically break complicated problems down, plan and implement solutions and find / eliminate small inconsistencies in code (bugs).</p>
<p>Analytical thinking also manifests in the ability to follow complicated logic through disparate code segments and understand it. It allows us to grasp abstract concepts such as Object Oriented methodology and design patterns and implement it in practice.</p>
<h3>Has Clear Priorities<span class="hx:absolute hx:-mt-20" id="has-clear-priorities"></span>
    <a href="#has-clear-priorities" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p>If I would ask you to rate the following according to priority, how would you order them?</p>
<ul>
<li>Security</li>
<li>Maintainability</li>
<li>Usability</li>
<li>Performance</li>
<li>LOC (lines-of-code) count</li>
</ul>
<p>Take a moment to think about that, and then consider:</p>
<ol>
<li>If you picked <strong>LOC count</strong> first, you failed big time in my book. In fact, LOC optimization can often go directly against the other metrics (such as maintainability). A lower LOC count should never be a goal, only a result of careful application of well factored architecture.</li>
<li>If you picked <strong>performance</strong> first, you are probably the guy who keeps writing articles about how you should use a <em>while</em> loop instead of a <em>for</em> loop since it came out a few milliseconds faster in your benchmarks. You might be inflicted with a case of premature optimization.</li>
</ol>
<blockquote>
  <p>We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil. – <a href="http://en.wikipedia.org/wiki/Optimization_%28computer_science%29#When_to_optimize"target="_blank" rel="noopener">Donald Knuth</a></p>

</blockquote>
<p>Performance should only be good enough to satisfy the requirements of the application. Aside from caveats to well-known pitfalls (such as executing queries in each iteration of a long loop), performance optimizations should be deferred to the very last and even then should be used appropriately (profile &hellip; profile &hellip; profile &hellip; optimize).</p>
<p>The only exception to this is if you are primarily developing performance dependent applications (such as low-level system drivers).</p>
<ol start="3">
<li><strong>Security</strong> is on somewhat of a middle ground. Depending on the application and distribution model it can be completely useless or mission critical. It&rsquo;s mostly somewhere in between, and thus can&rsquo;t be ranked as number one.</li>
<li><strong>Maintainability</strong> is definitely one of the most important attributes of a software application. High maintainability allows you to improve other attributes (such as performance), <em>when it is needed.</em></li>
</ol>
<p>Maintainability is the single most important factor for keeping productivity up and costs down. For a long time I strongly believed this to be <strong>the</strong> most important attribute of software design. However…
5. The most important attribute is <strong>usability</strong>. In the end, the worth of your application is only as much value as it delivers to the end-user.</p>
<p>We should always remember - software is not written to serve its developers or the systems they run on. They are written to solve problems. If those problems are not solved, then the project is a failure.</p>
<p>I wrote usability here as a more general term than just UI/UX effectiveness. Even a command line application or a background service has its usability factor in the sense of how well it answers a specific need.</p>
<h3>Gets Things Done<span class="hx:absolute hx:-mt-20" id="gets-things-done"></span>
    <a href="#gets-things-done" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><blockquote>
  <p>In principle, it&rsquo;s simple. You&rsquo;re looking for people who are</p>
<ol>
<li>Smart, and</li>
<li>Get things done.</li>
</ol>
<p><a href="http://web.archive.org/web/20090727035257/http://www.joelonsoftware.com/articles/GuerrillaInterviewing3.html"target="_blank" rel="noopener">Joel Spolsky</a></p>

</blockquote>
<p>Quite possibly the single most important trait in a developer. You can excel at all the previous attributes and still be a mediocre programmer if you just <strong>can&rsquo;t get things done.</strong> One average but productive developer could easily replace several highly talented but slowly moving developers, depending on his responsibilities.</p>
<p>At the end of the day you definitely want more highly-productive developers than those who are high on theory but not actual work.</p>
<h3>Does More Than &ldquo;Just Enough&rdquo;<span class="hx:absolute hx:-mt-20" id="does-more-than-just-enough"></span>
    <a href="#does-more-than-just-enough" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p>Getting things done is important. Getting things done &ldquo;the right way&rdquo; is even more important.</p>
<p>Constantly paying off your technical debt is crucial - if you keep accruing debt by &ldquo;hacking&rdquo; quick fixes that work now but are not maintainable, you only create the appearance of progress. In reality, the cost of getting rid of a large technical debt could become prohibitive before you know it.</p>
<p>Taking the time to constantly refactor code into a more maintainable state is the best way to prevent the spiral into project oblivion.</p>
<h3>Accountable<span class="hx:absolute hx:-mt-20" id="accountable"></span>
    <a href="#accountable" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p>A person could be a very capable programmer on technical ability alone, however if he does not own up to his mistakes and does not respect deadlines he could become a liability very quickly.</p>
<p>Responsibility also means to know where to let go of your ego for the good of the project. We developers often have large egos as we consider ourselves experts on many things. Putting the project first is a sign of a good developer.</p>
<h3>Good Human Relations<span class="hx:absolute hx:-mt-20" id="good-human-relations"></span>
    <a href="#good-human-relations" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p>Another all-around useful trait, this one applies to programmers as well. There is some stereotype that programmers are reclusive, unsociable creatures - programmers are still <em>people</em>.</p>
<p>In order to be a part of a team or handle clients, a programmer must have above basic social skills. Rudeness, arrogance, short-temper - do not have a place in a professional work environment. All it takes is one bad apple to ruin the mood for everybody.</p>
<h3>That&rsquo;s It<span class="hx:absolute hx:-mt-20" id="thats-it"></span>
    <a href="#thats-it" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p>If you answer to all of the above, you are probably a pretty good programmer.</p>
<p>You might notice I didn&rsquo;t mention passion or technological diversity as qualifying traits. Simply put, I don&rsquo;t think they&rsquo;re very relevant to the quality of a programmer.</p>
<p>Passion is nice to have, however I&rsquo;ve known many very professional and high-quality developers who were just content to go about their work professionally from 9 to 5 and then go home and have a meaningful and fulfilling family life. A programmer can definitely be completely professional without being passionate about programming.</p>
<p>Technological diversity is another nice to have but not a prerequisite - as long as you are in command of the technologies you work with, a lack of diversity shouldn&rsquo;t affect you too much. Decision makers need to be well aware of all the options before starting a project, however nowadays the choice of technology simply is not that important.</p>
<p>You can achieve good results regardless of the programming language and database engine among other consideration. The biggest consideration should be the type of skills available to your personnel.</p>
<h2>[Translation] Why Good Programmers Are Lazy and Dumb<span class="hx:absolute hx:-mt-20" id="translation-why-good-programmers-are-lazy-and-dumb"></span>
    <a href="#translation-why-good-programmers-are-lazy-and-dumb" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p><strong>Source:</strong> <a href="http://blogoscoped.com/archive/2005-08-24-n14.html"target="_blank" rel="noopener">blogoscoped</a></p>
<p>I realized that, paradoxically enough, good programmers need to be both <em>lazy</em> and <em>dumb</em>.</p>
<p><strong>Lazy</strong>, because only lazy programmers will want to write the kind of tools that might replace them in the end. Lazy, because only a lazy programmer will avoid writing monotonous, repetitive code – thus avoiding redundancy, the enemy of software maintenance and flexible refactoring. Mostly, the tools and processes that come out of this endeavor fired by laziness will speed up the production.</p>
<p>Of course, this is only half the truth; for a lazy programmer to be a good programmer, he (or she) also must be incredibly unlazy when it comes to learning how to stay lazy – that is, which software tools make his work easier, which approaches avoid redundancy, and how he can make his work be maintained and refactored easily.</p>
<p>Second (and I will elaborate a bit more on this because I find the concept to be less known than the first) a good programmer must be <strong>dumb</strong>. Why? Because if he&rsquo;s smart, and he knows he is smart, he will:</p>
<p>a) stop learning
b) stop being critical towards his own work</p>
<p>Point a) will make it hard for him to try to find new techniques to allow him to work faster. Point b) will give him a hard time debugging his own work, and refactoring it. In the endless battle between a programmer and the compiler, it&rsquo;s best for the programmer to give up early and admit that it&rsquo;s always him and never the compiler who&rsquo;s at fault (unless it&rsquo;s about character encoding issues, which is the part even the compiler gets wrong).</p>
<p>But there&rsquo;s a more crucial point why a good programmer must be dumb. That&rsquo;s because for him to find the best solutions to problems, he must keep a fresh mindset and manage to think out of the box (or rather, know its <em>actual</em> shape). In a way, this leads to the mindset of a child; incredibly creative because he never heard &ldquo;no&rdquo; for an answer.</p>
<p>The direct opposite approach would not be very constructive; to be knowledgeable about the parameters at hand, and accept them. Because who knows how many limits you think are there for real? The less you know, the more radical will your approaches be; the better the tools you develop, and the better the product you develop <em>with</em> them.</p>
<p>I know from my work that a good programmer, when confronted with a problem from management, will adopt this mindset of being <em>dumb</em>; he will start asking the most simple, child-like questions. Because he doesn&rsquo;t accept the parameters suggested to him that someone <em>thinks</em> make up the problem. Here&rsquo;s a typical conversation from the lost land of web development:</p>
<ul>
<li>&ldquo;Since yesterday, our client can&rsquo;t see the logo on the web site.&rdquo;</li>
<li>&ldquo;Did he restart his browser?&rdquo;</li>
<li>&ldquo;Yes.&rdquo;</li>
<li>&ldquo;Did he restart his computer?&rdquo;</li>
<li>&ldquo;Yes.&rdquo;</li>
<li>&ldquo;Did he empty his cache?&rdquo;</li>
<li>&ldquo;Yes.&rdquo;</li>
<li>&ldquo;Does he run Internet Explorer 6?&rdquo;</li>
<li>&ldquo;Yes.&rdquo;</li>
<li>&ldquo;Is he sure he can&rsquo;t see it?&rdquo;</li>
<li>&ldquo;Yes.&rdquo;</li>
<li>&ldquo;Did he look at the web site on the screen?&rdquo;</li>
<li>&ldquo;What?&rdquo;</li>
<li>&ldquo;Well, he might have printed it out.&rdquo;</li>
<li>&ldquo;No, he was looking on it on the screen.&rdquo;</li>
<li>&ldquo;Did he also not see other images besides the logo?&rdquo;</li>
<li>&ldquo;What? Well, I will ask him.&rdquo;</li>
</ul>
<p>For the sake of argument (and this was entirely hypothetical) let&rsquo;s say the client indeed turned off images in his browser. Or his son did. Whatever the case, this answer could not have been found if you would work in &ldquo;smart&rdquo; mode<sup class="footnote" id="fnr1"><a href="#fn1">1</a></sup>. None of the questions asked by the programmer required any programming skills. No; simply because the problem is so stupid, only stupidity can tackle it.</p>
<blockquote>
  <p><sup class="footnote" id="fnr1"><a href="#fn1">1</a></sup> Some years ago, I had a long telephone discussion about the whole web site being messed up since my last update&hellip; it turned out the guy disabled stylesheets in his browser. Back then, I would have suspected everything but such a simple solution and was listening to half an hour of complaints about quality standards etc. In the end, the assumption that my update was at fault was just that&hellip; an assumption. You better listen to facts only if you start debugging, and never to what people think might be the reason.</p>

</blockquote>
<p>In similar fashion, when one of my co-programmers asks me: &ldquo;Why isn&rsquo;t this working?&rdquo; most of the time it&rsquo;s because they&rsquo;re working on the wrong file (e.g., they linked to library 1 but they&rsquo;ve altered library 2, and their revision isn&rsquo;t showing, or they simply didn&rsquo;t link the library at all). When you ask a colleague for help, particularly in programming, you want him to know less about your project&hellip; so he will ask the stupid questions you sub-consciously avoided asking yourself because you thought you knew the answer, when in fact you didn&rsquo;t.</p>
<p>There&rsquo;s another side to it. The too-stupid person will just run off and, without a second thought, do something wrong. The too-smart person will sit down and plan something right, without taking any action. A pragmatic programmer is sort of in-between; he knows making the wrong decision 1 out of 10 times doesn&rsquo;t hurt the goal as bad as making only right decisions 5 out of 10 times, and making no decision at all the other 5 times.</p>
<p>It&rsquo;s like the story of the centipede. The centipede was very good at walking with its hundred legs. It never spent a thought on just how it could walk. Until one day, when a big black bug asked the centipede &ldquo;How can you manage to walk with all those feet? Don&rsquo;t you find it hard to coordinate their rhythm?&rdquo; The black bug already left, when the centipede was still sitting down, pondering how it could walk, wondering, and (for the first time in his life) even worrying a little bit. From that day on, the centipede couldn&rsquo;t walk anymore.</p>
<p>So you better not think too much if you want to achieve something. And of course this is only half the truth, too&hellip;</p>
]]></content:encoded><category>software-engineering</category><category>career</category><category>learning</category><category>off-topic</category></item><item><title>[Off-Topic] Bought My First Mac — Now What?</title><link>https://akitaonrails.github.io/en/2009/07/19/off-topic-comprei-meu-primeiro-mac-e-agora/</link><guid isPermaLink="true">https://akitaonrails.github.io/en/2009/07/19/off-topic-comprei-meu-primeiro-mac-e-agora/</guid><pubDate>Sun, 19 Jul 2009 22:01:00 -0300</pubDate><description>&lt;p&gt;&lt;strong&gt;Update 04/20/2012:&lt;/strong&gt; This is one of the most-read articles on my blog, first published in 09/2009. Most of the article still holds up well today, so I decided to adjust a few things and add more current information. If you&amp;rsquo;ve already read this article and want to see only what I added, check &lt;a href="http://akitaonrails.com/2012/04/20/off-topic-comprei-meu-primeiro-mac-e-agora-edicao-2012"target="_blank" rel="noopener"&gt;this post&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You&amp;rsquo;re a &amp;ldquo;switcher&amp;rdquo;: you&amp;rsquo;ve decided to take the big leap, step away from the Windows world a bit, and buy your first Mac. The timing is good and prices are accessible, especially if you can buy from someone abroad. Keep one thing in mind from the start: this is a paradigm shift.&lt;/p&gt;</description><content:encoded><![CDATA[<p><strong>Update 04/20/2012:</strong> This is one of the most-read articles on my blog, first published in 09/2009. Most of the article still holds up well today, so I decided to adjust a few things and add more current information. If you&rsquo;ve already read this article and want to see only what I added, check <a href="http://akitaonrails.com/2012/04/20/off-topic-comprei-meu-primeiro-mac-e-agora-edicao-2012"target="_blank" rel="noopener">this post</a>.</p>
<p>You&rsquo;re a &ldquo;switcher&rdquo;: you&rsquo;ve decided to take the big leap, step away from the Windows world a bit, and buy your first Mac. The timing is good and prices are accessible, especially if you can buy from someone abroad. Keep one thing in mind from the start: this is a paradigm shift.</p>
<p>The first week or two are the worst. You&rsquo;ll always have that nagging thought, <em>&ldquo;On Windows I did this more easily…&rdquo;</em> or <em>&ldquo;On my Linux I did this more easily…&rdquo;</em>. The temptation to go back is strong the first time you leave your comfort zone, same as with any change. Push yourself to learn the new tricks instead of falling back on the old ones.</p>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2009/7/20/overview-gallery1-20090608_original.png" alt=""  loading="lazy" /></p>
<p>As soon as you log in to the Mac for the first time, it arrives in a state where you need to configure very little. A few important things to get you started:</p>
<ul>
<li>The first difference is that application menus are all centralized. The bar at the top is the only menu, and it changes according to the application that currently has focus. The first option is the  icon, which gives access to global system options like &ldquo;About,&rdquo; where you can view details of your hardware; &ldquo;Software Update,&rdquo; the equivalent of Windows Update; and options like Shutdown. By the way, the very first thing to do when starting your Mac is to run Software Update and install the latest updates. Unlike Windows, you tend to get large packages rather than dozens of small updates.</li>
</ul>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2009/7/21/Picture_16_original.png" alt=""  loading="lazy" /></p>
<ul>
<li>
<p>The second option is always the name of the focused application. Initially it will always be &ldquo;Finder,&rdquo; the equivalent of Windows Explorer. This menu always gives access to things like &ldquo;Preferences,&rdquo; which on Windows usually lives under the &ldquo;Edit&rdquo; or &ldquo;Tools&rdquo; menus.</p>
</li>
<li>
<p>Some shortcuts are global and constant. To start, understand that there is the Ctrl (control, as on a PC) key and a special one called Command ⌘. They are different, and although it isn&rsquo;t a strict rule, things done on a PC with Ctrl are done on a Mac with ⌘. For example, copying text to the clipboard is ⌘+C, not Ctrl+C. Pasting is ⌘+V. Every application closes with ⌘+Q. The &ldquo;Preferences&rdquo; option is always ⌘+, (comma). The &ldquo;Help&rdquo; menu is always ⌘+Shift+?. A tip on that last Help option: use it to discover menu items whose shortcut you don&rsquo;t remember or whose submenu you can&rsquo;t find. Just type a few letters and Mac OS will open the menu and highlight the right item for you.</p>
</li>
<li>
<p>Unlike Windows, the Mac paradigm is based on one window per document rather than a single application window with embedded document windows. ⌘+W closes the application&rsquo;s current window. ⌘+N or ⌘+Shift+N usually opens a new window. We don&rsquo;t normally close applications very often; they tend to stay open. That&rsquo;s indicated in the Dock, at the bottom of the screen, by a glowing circle below the icon of an open application.</p>
</li>
<li>
<p>Also unlike Windows windows, the red circle at the top of each window closes only that window, not the entire application. It&rsquo;s the equivalent of ⌘+W. Another thing: you can move a window from the title bar or the footer bar, when there is one. So even if a window is partly off the physical desktop, you can still move it. On the other hand, the only way to resize a window is from the lower-right corner, not from any edge.</p>
</li>
</ul>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2009/7/20/Picture_3_original.png" alt=""  loading="lazy" /></p>
<ul>
<li>
<p>In the title bar of applications that manipulate files, like Finder, Pages, and most apps that show the filename with an icon next to it, the icon is &ldquo;normally&rdquo; draggable. You can drag it to a folder and the file being edited moves there. You can also click while holding ⌘ (Command) and it will show the parent folders, letting you navigate them.</p>
</li>
<li>
<p>Another thing that doesn&rsquo;t exist on Windows: &ldquo;Hide Windows.&rdquo; Get used to ⌘-H to hide all windows of an application. It isn&rsquo;t the same as minimizing, since hidden windows don&rsquo;t appear in the Dock. A hidden application keeps a transparent icon in the Dock. Even better: if you have dozens of applications open in a mess of windows behind windows, use ⌘-⌥-H (Command-Option-H) to hide every window except the one currently in focus. It&rsquo;s a very satisfying way to clean up your workspace and focus on what you&rsquo;re doing.</p>
</li>
<li>
<p>To switch between applications, on Windows we&rsquo;re used to Alt-Tab. On the Mac the near equivalent is ⌘-Tab. But it switches between Applications, not between Windows like on Windows. It&rsquo;s a subtle difference. If you have Photoshop with 4 windows and Word with 3 windows open, ⌘-Tab shows only 2 icons, one per application. To switch between windows of the same application, use ⌘-` (Command-Backtick). Or, more commonly, use Exposé to pick between windows.</p>
</li>
</ul>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2009/7/21/Picture_17_original.png" alt=""  loading="lazy" /></p>
<ul>
<li>
<p>Note the icons on the F1 through F12 keys; they clearly show the functions you get when you press them. F1 and F2 are screen brightness. F3 is Exposé. F4 is the Dashboard, where you install Widgets. F11 and F12 are volume. Those are the main ones. Don&rsquo;t forget that on newer MacBooks with a Multitouch Trackpad you have options like swiping 4 fingers down to activate Exposé or up to show the Desktop.</p>
</li>
<li>
<p>Spotlight is very useful. ⌘+Space activates the search field. If you use external hard drives or USB drives and don&rsquo;t want to waste time indexing their files, open &ldquo;System Preferences,&rdquo; option &ldquo;Spotlight,&rdquo; and drag the volumes that should be excluded.</p>
</li>
</ul>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2009/7/20/Picture_5_original.png" alt=""  loading="lazy" /></p>
<ul>
<li>
<p>If you&rsquo;re used to Explorer, you&rsquo;ll miss a lot of things in Finder. You can copy and paste folders and files, but there&rsquo;s no cut. You move items to different volumes by dragging and dropping while holding ⌘. To force a copy, use the Option/Alt (⌥) key. You&rsquo;ll end up using drag-and-drop far more than on Windows. You also get different ways to organize your files, especially since ⌘+I opens the Info window, where you can add metadata like keywords for searching and colors (yes, you can even search for files and folders by color in Spotlight).</p>
</li>
<li>
<p>Another difference between Finder and Explorer is how you rename files and run programs. In Explorer you press &ldquo;Enter&rdquo; to run a file and a single mouse click to rename. On the Mac you press &ldquo;Enter&rdquo; to edit the name of a file or folder and ⌘+O to run a program. That avoids the situation where you select dozens of files, accidentally hit Enter, and set off a cascade of programs opening. On the Mac that accident basically never happens.</p>
</li>
<li>
<p>The Dock gives you quick access to your favorite applications. You can drag an icon out to remove it, or drag anything onto it to add it. If you open an application that wasn&rsquo;t there, its icon appears anyway, because the Dock also shows every running application, with a glowing indicator below it. To keep an application in the Dock, drag it there or, while it&rsquo;s open, use the context menu (right-click) on its icon and choose &ldquo;Keep in Dock.&rdquo; If you want that application to launch every time you log in, use &ldquo;Open at Login.&rdquo;</p>
</li>
<li>
<p>Mac OS Leopard (10.5) doesn&rsquo;t ship with the US International keyboard layout that&rsquo;s common on Windows for non-ABNT-2 keyboards (which lack the cedilla). The Mac default is to use shortcuts like ⌥+c for cedilla, ⌥+e for acute accent, ⌥+` for grave accent, ⌥+n for tilde. But if you want the traditional way, download the US International layout for Mac from Brazilian developer <a href="http://web.archive.org/web/20090802092433/http://www.brockerhoff.net/usi/"target="_blank" rel="noopener">Rainer Brokerhoff&rsquo;s</a> site and follow his instructions. From Snow Leopard (10.6) onward, this is no longer necessary.</p>
</li>
<li>
<p>As on Windows and other systems, the Mac&rsquo;s default key repeat rate is somewhat slow. Open any text editor and use the arrow keys to move the cursor and you&rsquo;ll notice the lag. I prefer maximum speed. Go to &ldquo;System Preferences, Keyboard&rdquo; and set &ldquo;Key Repeat&rdquo; to &ldquo;Fast&rdquo; and &ldquo;Delay Until Repeat&rdquo; to &ldquo;Short.&rdquo; You&rsquo;ll thank me:</p>
</li>
</ul>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2012/4/20/Screen%20Shot%202012-04-20%20at%206.02.32%20PM_original.png?1334956028" alt=""  loading="lazy" /></p>
<ul>
<li>Say you have hundreds of files, like photos from your digital camera, sitting in JPG, and you want to rename them all to another convention and convert them from JPG to PNG. You can do this and much more with a feature called &ldquo;Automator.&rdquo; In Finder, select the files, right-click (on the Trackpad, place two fingers in the middle and use your thumb to click once at the bottom), then choose &ldquo;More,&rdquo; &ldquo;Automator,&rdquo; &ldquo;Create Workflow.&rdquo; That opens the selected items in Automator, a linear flow of &ldquo;filters&rdquo; where you chain the output of one filter as input to the next, like &ldquo;Change Type of Images,&rdquo; then &ldquo;Rename Finder Items,&rdquo; and even &ldquo;Add attachments to Front Messages,&rdquo; and so on. It&rsquo;s an extremely powerful way to chain actions, a lot like Unix/Linux command-line pipes, but far more intuitive.</li>
</ul>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2009/7/20/Picture_6_original.png" alt=""  loading="lazy" /></p>
<ul>
<li>
<p>Few people figure out how to take screenshots at first, since there&rsquo;s no &ldquo;Print Screen&rdquo; key on a Mac. But there&rsquo;s something far better: ⌘+Shift+3 takes a full-screen shot and saves it as a PNG on your Desktop. If you don&rsquo;t want the file, ⌘+Ctrl+Shift+3 sends the shot to the clipboard so you can paste it into another application. Even more useful, ⌘+Shift+4 turns your cursor into a crosshair for capturing just the small area you select. Position the crosshair over any window and press &ldquo;Space&rdquo; and it captures that whole window. For clipboard-only, use ⌘+Ctrl+Shift+4.</p>
</li>
<li>
<p>Another important thing: every print dialog opens with ⌘+P, and it always has the option to generate a PDF instead of sending to a printer. That&rsquo;s extremely useful if you don&rsquo;t have a printer or want to save a receipt from the web or something like that. Beyond that, the &ldquo;Preview&rdquo; application that opens images and PDFs can also do simple editing: resizing images, cropping, copying pages between PDF files, reordering pages, deleting pages. In other words, PDFs are quite editable on a Mac without a commercial Adobe product.</p>
</li>
</ul>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2009/7/20/Picture_7_original.png?1248063204" alt=""  loading="lazy" /></p>
<ul>
<li>
<p>Speaking of &ldquo;Preview,&rdquo; learn to use &ldquo;Quick Look.&rdquo; To view images, videos, audio, PDFs, Office files, iWork files, and so on, just select the file (or a set of files) and press &ldquo;Space.&rdquo; A floating window opens where you can quickly view the file. &ldquo;Space&rdquo; again closes it. You can preview most major file formats without opening their respective programs.</p>
</li>
<li>
<p>On PCs we tend to create custom folders for videos, photos, and the like. On the Mac, try to use the default folders it already gives you. More than that, get in the habit of using iTunes to organize your music and videos, iPhoto for your photos, and iMovie to edit your videos. That keeps your Mac tidy, makes backups easier, simplifies searches, and keeps everything more accessible. Many Apple applications integrate with the iLife suite (iTunes, iPhoto, GarageBand, iMovie, iWeb), so it&rsquo;s simpler to let these apps manage your files. Watch the screencasts on Apple&rsquo;s website if you don&rsquo;t know how they work yet; they&rsquo;re simple, intuitive, and powerful.</p>
</li>
</ul>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2009/7/20/Picture_8_original.png" alt=""  loading="lazy" /></p>
<ul>
<li>Installing applications on a Mac usually trips people up at first. You normally download one of two formats: DMG or MPKG. The first stands for (D)isk i(M)a(G)e and is similar to an ISO. When you double-click it, the DMG &ldquo;mounts&rdquo; inside /Volumes. The application is usually already there, and you just drag it to the &ldquo;Applications&rdquo; folder on your Mac. Then you &ldquo;eject&rdquo; the DMG with the ⏏ icon or with ⌘+E. The second format, (M)ac (P)ac(K)a(G)e, is the equivalent of Windows&rsquo; MSI: you double-click it and it runs like a standard installer. Usually only programs that need to install a lot of system components use MPKG, like Microsoft Office and Adobe CS4. Sometimes you download a ZIP that contains a DMG or an MPKG. The important part: if it&rsquo;s a DMG with no MPKG inside, always drag the application to Applications before running it. Safari does an extra step: it downloads the DMG, mounts it, extracts the application, and deletes the DMG, so you drag it from the Downloads folder. A technical detail: MPKGs come with a BOM (Bill of Materials) that works as a recipe of the original system file permissions for scripts that adjust permissions. The same BOM helps uninstall, since it records everything that was installed.</li>
</ul>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2009/7/20/Picture_1_original.png" alt=""  loading="lazy" /></p>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2009/7/20/Picture_15_original.png" alt=""  loading="lazy" /></p>
<ul>
<li>
<p>All application preferences are stored in your directory (/Users/your_login), then Library/Preferences. They&rsquo;re files in plist format, which is XML stored in binary. Regardless of where the application is copied, it saves preferences in that location. Don&rsquo;t confuse the &ldquo;Library&rdquo; local to your home folder with the global &ldquo;Library&rdquo; at the root of the system, since you&rsquo;ll rarely need to touch the latter. On the Mac there&rsquo;s no Registry, and so no nightmare of maintaining one. When an application starts behaving strangely, the first thing to try is deleting its .plist file.</p>
</li>
<li>
<p>On the Mac, Finder doesn&rsquo;t show every directory. Most are hidden, like /usr, /bin, /tmp, /dev, /var, /etc, and others that Unix or Linux users will recognize. Some important ones like System and Library at the root of your Mac are rarely accessed. User accounts live in the Users folder and applications in the Applications folder. Inside your &ldquo;Home&rdquo; folder are folders like Desktop, Documents, Downloads, Music, Movies, Pictures, Sites, Public, and Library. In that Library are things like &ldquo;Application Support,&rdquo; where plugins and other application dependencies live, and &ldquo;Preferences,&rdquo; which I explained earlier. Poke around these folders; the naming is fairly obvious.</p>
</li>
<li>
<p>Inside the &ldquo;Applications&rdquo; folder there&rsquo;s another called &ldquo;Utilities&rdquo; (also accessible via ⌘+Shift+U) with things like &ldquo;Activity Monitor,&rdquo; similar to the Windows Task Manager. There&rsquo;s also &ldquo;Console,&rdquo; an easy way to review system log files. Another important one is &ldquo;Disk Utility,&rdquo; which does advanced things like repartitioning your disk non-destructively, creating DMG files including encrypted volumes, burning DMGs to DVDs, and more.</p>
</li>
</ul>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2009/7/20/Picture_9_original.png" alt=""  loading="lazy" /></p>
<ul>
<li>
<p>Another difference from Windows: Macs don&rsquo;t have drive letters (C:, D:, E:, and so on). The Mac, being a BSD Unix, behaves more like Unix/Linux, where DMG and ISO files are &ldquo;mounted&rdquo; inside the /Volumes directory and show up normally as disks in Finder that can be ejected. The Mac is very flexible with disk images: you can use Disk Utility to create bootable USB drives, create multiple boot partitions, copy DVDs into DMGs, and such. Network shared folders are also mounted in /Volumes. The behavior is consistent and fast, and Finder, unlike Windows Explorer, rarely crashes and almost never returns to an inconsistent state.</p>
</li>
<li>
<p>A technical detail you&rsquo;ll notice: Finder (including the top menu and Desktop), the Dock, and applications are very independent. On Windows, especially XP, you&rsquo;ll remember an application sometimes getting sluggish, hard even to drag, making it difficult to click the Start menu or taskbar. On the Mac, even when Finder crashes or gets slow, the Dock behaves independently. Other applications aren&rsquo;t affected either, including their window refresh. Another tip: if an application truly freezes, use ⌘+⌥+⎋ (Command+Option+Esc) to open a window where you can force-quit it. And ⌘+Shift+Q forces the current user to log out.</p>
</li>
<li>
<p>Speaking of deleting: select files and use ⌘+Shift+⌫. That ⌫ key is called &ldquo;Delete&rdquo; but it&rsquo;s the Mac equivalent of the PC&rsquo;s &ldquo;Backspace.&rdquo; The Mac equivalent of the PC&rsquo;s &ldquo;Delete&rdquo; key is Shift+⌫. You can also do more, like ⌥+⌫ to delete the whole word to the left of your cursor, or ⌘+⌫ to delete to the beginning of the line.</p>
</li>
<li>
<p>For navigating text, get used to combinations like ⌘+← and ⌘+→ to go to the beginning or end of the line, ⌘+↑ or ⌘+↓ for the equivalents of Page Up and Page Down, and ⌥+← and ⌥+→ to move by word left or right. These keys become second nature because you use them constantly.</p>
</li>
<li>
<p>If you&rsquo;re in a text editor (Mail.app, Safari, TextEdit, and so on) and the text is too small to read comfortably, use ⌘-Shift-&rsquo;+&rsquo; to increase the font size and ⌘-Shift-&rsquo;-&rsquo; to decrease it. To zoom in on an image or small detail, hold Ctrl and drag two fingers up on the trackpad to zoom in, or two fingers down to zoom out.</p>
</li>
<li>
<p>Still on text: if you select a passage in any application, you can drag it to the desktop or another folder in Finder. It&rsquo;s saved as a &ldquo;snippet,&rdquo; like a persistent clipboard item you can drag back into another text editor or leave on the desktop until you decide what to do with it.</p>
</li>
<li>
<p>All MacBooks, including older ones, have always had a two-finger multi-touch action for scrolling. Just slide two fingers, without clicking, up or down on the trackpad to scroll, for example in Safari.</p>
</li>
<li>
<p>Before Lion, there was a feature to encrypt your files in real time. It was called FileVault and was bad enough to ignore. But from Lion onward, <strong>FileVault 2</strong> arrived, completely different and this time so good it would be foolish not to use it. Open &ldquo;System Preferences, Security &amp; Privacy,&rdquo; the &ldquo;FileVault&rdquo; tab, and enable full disk encryption. <strong>VERY IMPORTANT:</strong> it generates secure keys that allow decryption of your data. Write them down somewhere safe and <strong>never lose them</strong>. One tip: grab your iPhone or any smartphone with a camera and take a photo of the screen when it shows you the keys.</p>
</li>
</ul>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2012/4/20/Screen%20Shot%202012-04-20%20at%206.29.06%20PM_original.png?1334957491" alt=""  loading="lazy" /></p>
<ul>
<li>From Lion onward there&rsquo;s <a href="http://web.archive.org/web/20120522082049/http://www.apple.com/br/macosx/whats-new/mission-control.html"target="_blank" rel="noopener">Mission Control</a>, which you activate by placing four fingers on the trackpad and swiping up. It&rsquo;s a replacement for the old Exposé and genuinely handy once you get used to it. When &ldquo;maximized,&rdquo; applications become their own parallel &ldquo;Space,&rdquo; and you navigate between them by swiping 3 fingers left or right. The default, though, has these Spaces rearranging automatically based on usage. I don&rsquo;t like that, because I prefer my applications and desktops always in the same position (in Mission Control you can drag Spaces to wherever you like). To disable the forced rearrangement, go to &ldquo;System Preferences, Mission Control&rdquo; and turn off &ldquo;Automatically rearrange spaces based on most recent use.&rdquo;</li>
</ul>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2012/4/20/Screen%20Shot%202012-04-20%20at%205.57.35%20PM_original.png?1334955644" alt=""  loading="lazy" /></p>
<ul>
<li>Also from Lion onward, the way you save files changed a lot. There&rsquo;s now an &ldquo;Auto Save&rdquo; feature. So if an unexpected crash happens, or you have to force-shutdown the machine, or any drastic situation where you&rsquo;d lose what you were editing, don&rsquo;t worry, because Lion is saving automatically. There is one annoyance, though: the file sometimes gets a &ldquo;Lock&rdquo; that prevents you from editing it. You can unlock it manually, but it&rsquo;s a hassle. I prefer to turn it off by going to &ldquo;System Preferences, Time Machine,&rdquo; clicking the &ldquo;options&rdquo; button, and disabling &ldquo;Lock documents.&rdquo; While you&rsquo;re there, check the photo below for how to do that, and also what I keep on my Time Machine exclusion list, things I&rsquo;d rather not back up either because they don&rsquo;t matter (Software Images, for example) or because I prefer to back them up manually (iPhoto).</li>
</ul>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2012/4/20/Screen%20Shot%202012-04-20%20at%206.38.10%20PM_original.png?1334958088" alt=""  loading="lazy" /></p>
<ul>
<li>
<p>Still on the new Lion way of handling documents and versions: in new applications you now have a &ldquo;Save a version&rdquo; option in the menu, so you can save moments in time in case you need to go back and recover an earlier state. Think of it as a mini Time Machine or granular backup. One option that no longer exists is &ldquo;Save As,&rdquo; which let you save the same file under a different name. Instead the operation is a bit more annoying: first &ldquo;Duplicate&rdquo; (all in the same main &ldquo;File&rdquo; menu) and then &ldquo;Save&rdquo; to store it under a different name. Get used to it; it&rsquo;s annoying at first but becomes trivial.</p>
</li>
<li>
<p>The Mac has plenty of unexpected surprises. In the main menu, the item with the application&rsquo;s name always has a sub-item called &ldquo;Services.&rdquo; Try selecting a block of text in any application, then go to the &ldquo;Services&rdquo; menu, then &ldquo;Speech,&rdquo; then &ldquo;Start Speaking Text,&rdquo; and the Mac reads the selected text aloud. Unfortunately there&rsquo;s no option in Portuguese.</p>
</li>
</ul>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2009/7/20/Picture_11_original.png" alt=""  loading="lazy" /></p>
<ul>
<li>
<p>In Finder you have the &ldquo;Go&rdquo; menu, then &ldquo;Connect to Server,&rdquo; or the shortcut ⌘+K, to connect to shared folders on other Macs or on your company&rsquo;s Windows file server. For a Windows server you&rsquo;re used to typing something like \server\folder. On the Mac you type something like smb://server.domain/folder. If your server is Windows 2000 or later, include the full server name, including the root domain of your directory. Usually that&rsquo;s all you need.</p>
</li>
<li>
<p>There&rsquo;s no shortcut to force-lock your computer so nobody can access it while you&rsquo;re away. One way is the screen saver. First, open &ldquo;System Preferences&rdquo; and &ldquo;Security&rdquo; and enable &ldquo;Require password to wake this computer from sleep or screen saver.&rdquo; Now, still in &ldquo;System Preferences,&rdquo; choose &ldquo;Desktop &amp; Screen Saver,&rdquo; then &ldquo;Screen Saver.&rdquo; On that screen there&rsquo;s a &ldquo;Hot Corners&rdquo; option where you can pick a corner that starts the screensaver when you move the mouse there. That gives you a quick way to lock your computer.</p>
</li>
<li>
<p>Every time you download a program from the internet, the first time you run it the Mac shows you the URL it was downloaded from and asks for confirmation. To be prompted whenever you or something tries to modify a system setting, go to &ldquo;System Preferences,&rdquo; &ldquo;Security,&rdquo; and enable &ldquo;Require password to unlock each System Preferences pane.&rdquo; The Mac warns you whenever something tries to escalate authority, and you enter your administrator password to confirm. For Linux users, it&rsquo;s like using &ldquo;sudo&rdquo; in the Terminal. The Mac is quite secure: its architecture keeps trivial malware from taking over the machine the way it does on Windows, and that has nothing to do with market share, since the user has to explicitly do something foolish to get compromised. Antivirus is only useful to make sure you don&rsquo;t forward someone an infected attachment you received. Your machine stays fine, but you might pass the virus along by accident.</p>
</li>
<li>
<p>You&rsquo;ll miss programs like Norton Utilities because you simply don&rsquo;t need them. For a defragmenter, for example, Mac OS defragments automatically for you. Also understand that your filesystem is HFS+, not FAT or NTFS. One quirk is that HFS+ has <a href="http://en.wikipedia.org/wiki/Resource_fork"target="_blank" rel="noopener">Resource Forks</a>, so when you copy Mac files to FAT USB drives you end up with what look like &ldquo;duplicate&rdquo; files with an underscore at the start of the name, which is the resource fork representation on filesystems that don&rsquo;t support it. Also understand that every Mac &ldquo;application&rdquo; is actually a folder with a &ldquo;.app&rdquo; extension and an icon. When transporting applications, don&rsquo;t copy them straight to a FAT USB drive; first put them in a DMG or just zip them (the &ldquo;Archive&rdquo; option in the context menu), then copy. Remember too that Unix files have permissions and FAT doesn&rsquo;t preserve them.</p>
</li>
<li>
<p>The equivalent of Windows Startup Items is in &ldquo;System Preferences,&rdquo; &ldquo;Accounts,&rdquo; your user, &ldquo;Login Items.&rdquo;</p>
</li>
<li>
<p>The Mac is a BSD Unix. As such, it has a Terminal application in the Utilities folder. Use Spotlight to reach it easily. It opens a BASH shell, and from there you can manipulate files and programs easily in a POSIX environment. If you come from Linux, you&rsquo;ll feel right at home.</p>
</li>
<li>
<p>Speaking of Linux, one weak spot is the lack of a good package manager. On Ubuntu/Debian we have apt-get; on Redhat/Fedora/CentOS we have Yum. On the Mac there&rsquo;s no standard. My recommendation is <a href="http://web.archive.org/web/20120419165352/http://mxcl.github.com/homebrew/"target="_blank" rel="noopener">HomeBrew</a>, a system for installing and maintaining open source projects. It&rsquo;s not as powerful or robust as Aptitude on Ubuntu, but it does its job well. You&rsquo;ll also come across others like MacPorts and Fink, but they&rsquo;re either outdated or more hassle, so I don&rsquo;t recommend them. See the next tip.</p>
</li>
<li>
<p><a href="https://github.com/mxcl/homebrew"target="_blank" rel="noopener">HomeBrew</a> is the best installer for open-source software like MySQL, PostgreSQL, Redis, Git, Android SDK, and much more. In some cases it downloads the Mac binary directly, but usually it downloads the source code, applies necessary patches, and compiles. For that you need compilers and other tools. The simplest way is to use the <strong>App Store</strong> to buy and download XCode. This tip is more for software developers; if you&rsquo;re not one, you can ignore it.</p>
</li>
<li>
<p>Every Mac comes with Apache 2 pre-installed. It&rsquo;s hidden under the name &ldquo;Web Sharing.&rdquo; You&rsquo;ll find it in System Preferences, &ldquo;Sharing,&rdquo; then &ldquo;Web Sharing.&rdquo; When you turn this on or off, you&rsquo;re dealing with Apache 2, which by default looks at the &ldquo;Sites&rdquo; folder in your Users/Home directory. Another option, &ldquo;Remote Login,&rdquo; enables or disables OpenSSH access. &ldquo;Screen Sharing,&rdquo; in turn, activates a VNC server, so a VNC client on Windows can also share the screen of your Mac.</p>
</li>
</ul>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2009/7/20/Picture_10_original.png" alt=""  loading="lazy" /></p>
<ul>
<li>
<p>One weakness fixed from Snow Leopard onward is the Firewall. On Leopard and earlier it ships disabled. Open System Preferences again, option &ldquo;Security,&rdquo; then &ldquo;Firewall.&rdquo; It comes set to &ldquo;Allow all incoming connections.&rdquo; Change it at minimum to &ldquo;Allow only essential services&rdquo; or, better, &ldquo;Set access for specific services and applications,&rdquo; which works as a whitelist. Everything is blocked by default, and only the applications you select in the box below get open ports.</p>
</li>
<li>
<p>Lion is the most practical version for disaster recovery. There&rsquo;s no more boot DVD. Every Mac now has a hidden partition with the installer, for when you need to reinstall, check disks, or do other things. Just boot while holding (Command-R) ⌘-R, or hold the (Option) ⌥ key during boot to get a menu with the available partitions and choose &ldquo;Recovery HD.&rdquo;</p>
</li>
</ul>
<p><a href="http://www.apple.com/macosx/recovery/"target="_blank" rel="noopener"><img src="http://s3.amazonaws.com/akitaonrails/assets/2012/4/20/commandr_original.jpg?1334958455" alt=""  loading="lazy" /></a></p>
<ul>
<li>Finally, to impress your friends: when you minimize a window, use Exposé, or activate the Dashboard, all these actions have animated transitions. Hold the &ldquo;Shift&rdquo; key at the same time and the animation plays in <em>slow motion</em>, showing every step of the transition at slow speed :-)</li>
</ul>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2009/7/21/Picture_18_original.png" alt=""  loading="lazy" /></p>
<h3>Applications<span class="hx:absolute hx:-mt-20" id="applications"></span>
    <a href="#applications" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p>Some of the applications below are on the Mac App Store, and I always recommend checking there first. Otherwise, follow the links and download manually. At the end of this section I have a tip on keeping your applications up to date.</p>
<ul>
<li>
<p>If you have an iPad, you can use it as a second monitor connected to your Mac over Wi-Fi (both need to be on the same network). For this, buy <a href="http://web.archive.org/web/20120420081551/http://avatron.com/apps/air-display"target="_blank" rel="noopener">Air Display</a>.</p>
</li>
<li>
<p>If you have a new Apple TV (the small black model), you can mirror the screen of your iPhone 4S, iPad 2, or later over Wi-Fi using the <a href="http://support.apple.com/kb/HT4437?viewlocale=pt_PT&amp;locale=pt_PT"target="_blank" rel="noopener">Air Play</a> feature on iOS. The next version of Mac, Mountain Lion, will let you do the same from your Mac. Until then, you can still mirror your Mac to an HDTV via Apple TV by buying <a href="http://airparrot.com/"target="_blank" rel="noopener">Air Parrot</a>. It&rsquo;s the simplest way to watch movies and videos from your Mac straight on your TV.</p>
</li>
<li>
<p>I personally love reading a lot of RSS and Atom feeds in my Google Reader account, and the best Mac and iOS app for that is easily <a href="http://reederapp.com/mac/"target="_blank" rel="noopener">Reeder</a>.</p>
</li>
<li>
<p>With so much internet content, you download a lot but don&rsquo;t always know which files are eating the most disk space. To find them (tip: most of the time it&rsquo;s your video podcasts in iTunes) there are excellent paid apps like <a href="http://www.daisydiskapp.com/"target="_blank" rel="noopener">DaisyDisk</a>, but I still like the free <a href="http://grandperspectiv.sourceforge.net/"target="_blank" rel="noopener">GrandPerspective</a>.</p>
</li>
<li>
<p>OS X handles compressed formats like zip and gz on its own. But to decompress more interesting formats like 7-zip and rar, be sure to install <a href="http://wakaba.c3.cx/s/apps/unarchiver.html"target="_blank" rel="noopener">The Unarchiver</a>.</p>
</li>
<li>
<p>For applications, use sites like Apple&rsquo;s own to see what&rsquo;s <a href="http://www.apple.com/downloads/macosx/index_top.html"target="_blank" rel="noopener">most popular</a>. To start, you&rsquo;ll want <a href="http://perian.org"target="_blank" rel="noopener">Perian</a> for more video codecs, <a href="http://www.telestream.net/flip4mac-wmv/overview.htm"target="_blank" rel="noopener">Flip4Mac</a> for Windows codecs, and <a href="http://www.videolan.org/vlc/download-macosx.html"target="_blank" rel="noopener">VLC</a> for a player that handles all the strangest codecs.</p>
</li>
<li>
<p>To rip DVDs and create mp4 files, use the freeware <a href="http://handbrake.fr/"target="_blank" rel="noopener">HandBrake</a>. To convert videos for iPod and iPhone, use <a href="http://www.macupdate.com/info.php/id/19769"target="_blank" rel="noopener">iSquint</a>. To create, edit, and convert subtitle files, use <a href="http://www.fluffalopefactory.com/miyu/"target="_blank" rel="noopener">Miyu</a> and <a href="http://www.bitfield.se/submerge/index.html"target="_blank" rel="noopener">Submerge</a>.</p>
</li>
<li>
<p>For presentations, forget Powerpoint. It&rsquo;s very <strong>worth</strong> buying <a href="http://web.archive.org/web/20110107211503/http://www.apple.com/iwork/download-trial/"target="_blank" rel="noopener">iWork</a> to use the famous Keynote. The iLife and iWork suites are all on the App Store, so buy them there.</p>
</li>
</ul>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2009/7/20/whatsnew-hero-20090106_original.jpg" alt=""  loading="lazy" /></p>
<ul>
<li>
<p>For communication, use <a href="http://adium.im/"target="_blank" rel="noopener">Adium</a>, a client for Jabber, Messenger, Yahoo, AIM, and more, one of the best around, though it doesn&rsquo;t yet support video chat for Messenger. The classic <a href="http://www.skype.com/intl/pt/download/skype/macosx/"target="_blank" rel="noopener">Skype</a> is another great option. If you like IRC, one of the best clients is <a href="http://web.archive.org/web/20090717071516/http://colloquy.info/"target="_blank" rel="noopener">Colloquy</a>.</p>
</li>
<li>
<p>You want to run Windows or some Linux distro. The option that comes with the Mac is Bootcamp (in Utilities), to repartition your HD and install a second operating system. Before that, though, I recommend virtualization products like the open-source <a href="http://www.virtualbox.org/wiki/Downloads"target="_blank" rel="noopener">VirtualBox</a>, or the commercial <a href="http://www.parallels.com/download/desktop/"target="_blank" rel="noopener">Parallels Desktop</a> or <a href="http://web.archive.org/web/20090719015503/http://www.vmware.com/products/fusion/"target="_blank" rel="noopener">VMWare Fusion</a>. They&rsquo;re all very good. With them you can run Windows XP or Windows 7 (I don&rsquo;t recommend Vista unless you have a desktop Mac with more than 4GB of RAM), Ubuntu, Fedora, and so on. In most cases, even heavy stuff like SQL Server with Visual Studio works great. For games, no, better to dual-boot, or better yet, buy a PlayStation 3 or Xbox 360.</p>
</li>
<li>
<p>The Mac is quite secure. Things like saving passwords in Safari go into an infrastructure called Keychain, an encrypted, secure storage. You can even encrypt your entire Home folder if you want. For other things, like sharing authentication data across multiple browsers or just storing notes securely, I suggest <a href="http://agilewebsolutions.com/products/1Password"target="_blank" rel="noopener">1Password</a>, one of the best out there.</p>
</li>
<li>
<p>Macs normally don&rsquo;t need uninstallers. For the vast majority of programs you just drag them to the Applications folder, so you delete them from there. They do leave behind a few artifacts, like files in the Library/Preferences directory. Normally it&rsquo;s fine to leave them; they&rsquo;re tiny and don&rsquo;t corrupt anything like a Registry. But if you&rsquo;re the paranoid type who needs to remove everything, use <a href="http://www.appzapper.com/"target="_blank" rel="noopener">AppZapper</a>, which does it for you.</p>
</li>
<li>
<p>Anyone who&rsquo;s watched Mac screencasts online might wonder, <em>&ldquo;How do they do that?&rdquo;</em> One of the secrets is the commercial <a href="http://www.telestream.net/screen-flow/overview.htm"target="_blank" rel="noopener">ScreenFlow</a>, by far one of the best, most performant, and easiest to use. Worth every cent. To record the keyboard shortcuts you&rsquo;re using as a layer on top of your video, use <a href="http://web.archive.org/web/20090801050033/http://stephendeken.net/software/keycastr/"target="_blank" rel="noopener">KeyCastr</a>. For mouse effects like focus and others, use <a href="http://web.archive.org/web/20090802092433/http://www.omnigroup.com/applications/omnidazzle/download/"target="_blank" rel="noopener">OmniDazzle</a>.</p>
</li>
</ul>
<p><a href="http://peepcode.com/products/screencasting-on-the-mac"target="_blank" rel="noopener"><img src="http://s3.amazonaws.com/akitaonrails/assets/2009/7/20/screencasting-on-the-mac_original.png" alt=""  loading="lazy" /></a></p>
<ul>
<li>
<p>The Mac needs very little maintenance, and most tools are already built into the operating system. As a visual shell to reach them more easily, use <a href="http://web.archive.org/web/20090802092434/http://www.titanium.free.fr/pgs2/english/download.html"target="_blank" rel="noopener">Onyx</a>, which runs all the maintenance scripts at once. Sometimes, when your Mac starts behaving strangely, running Onyx helps a lot, though that situation is very rare.</p>
</li>
<li>
<p>As a text editor there&rsquo;s no getting around it: after 3 years my favorite is still TextMate. If you&rsquo;re more of a Linux purist, you might prefer <a href="http://code.google.com/p/macvim/"target="_blank" rel="noopener">MacVim</a>, especially with my <a href="http://web.archive.org/web/20090725080422/http://akitaonrails.com/2009/04/27/the-best-environment-for-rails-on-windows-part-2"target="_blank" rel="noopener">Ruby snippets package</a> :-) Beyond those, there are dozens of other editors, but none really appealed to me. A plugin that makes TextMate even nicer is <a href="http://code.google.com/p/textmate-missingdrawer/"target="_blank" rel="noopener">MissingDrawer</a>, which I recommend trying. If you&rsquo;re a developer, follow my <a href="http://web.archive.org/web/20091005093524/http://github.com/akitaonrails/vimfiles"target="_blank" rel="noopener">vimfiles</a> repository to get your Vim pre-configured with the best of what&rsquo;s available.</p>
</li>
<li>
<p>For downloaders, Mozilla Firefox has various extensions, or if you&rsquo;re a solid Linux user you&rsquo;ll know how to use good old curl. But if you want something more visual, an excellent commercial alternative is <a href="http://yazsoft.com/"target="_blank" rel="noopener">Speed Download</a>, which has options for parallel downloads, resuming interrupted downloads, and so on. Still on downloads, if you&rsquo;re into BitTorrent, one of the best clients is <a href="http://web.archive.org/web/20090719033742/http://www.transmissionbt.com/download.php"target="_blank" rel="noopener">Transmission</a>.</p>
</li>
<li>
<p>For burning DVDs, the Mac handles it reasonably well on its own. But if you want more control and detail, one of the most traditional and best commercial options is <a href="http://www.roxio.com/enu/products/toast/default.html"target="_blank" rel="noopener">Toast</a> by Roxio, the equivalent of Nero on Windows. For something simpler there&rsquo;s <a href="http://web.archive.org/web/20090721195744/http://www.discoapp.com/"target="_blank" rel="noopener">Disco</a>, one of the most visually beautiful, with a feature that keeps a database of DVDs you&rsquo;ve burned to make searches easier. And a decent freeware is <a href="http://burn-osx.sourceforge.net/Pages/English/home.html"target="_blank" rel="noopener">Burn</a>.</p>
</li>
<li>
<p>Even though Time Machine already does an excellent job of backup, <a href="http://www.shirt-pocket.com/SuperDuper/SuperDuperDescription.html"target="_blank" rel="noopener">SuperDuper!</a> remains an excellent alternative. It makes a bit-for-bit image of your system, supports delta updates, and lets you create bootable external hard drives. It&rsquo;s a good thing to do before anything drastic, like installing a new version of Mac OS. It&rsquo;s the equivalent of Norton Ghost on Windows.</p>
</li>
<li>
<p>If you&rsquo;re a developer using Git with Gitk, you can install Git via <a href="http://web.archive.org/web/20120419165352/http://mxcl.github.com/homebrew/"target="_blank" rel="noopener">HomeBrew</a> (with HomeBrew installed, just open a Terminal and use &ldquo;brew install git&rdquo;) and then use <a href="http://gitx.frim.nl/"target="_blank" rel="noopener">Gitx</a> instead of the ugly Gitk. It uses Cocoa components, so it has the look and feel of a native Mac app.</p>
</li>
<li>
<p>If you have an iPod, know that it can play Audiobooks. Unlike mp3 and aac, the standard audiobook format is m4b, or mpeg-4 with bookmark support. That&rsquo;s very important because mp3 has no bookmarks, and when a book is 20 hours long it&rsquo;s painful if your iPod loses your place, or worse, if you want to navigate between chapters of a 40-hour book. If you have audiobooks in mp3, use <a href="http://www.splasm.com/audiobookbuilder/"target="_blank" rel="noopener">Audiobook Builder</a>, which compiles all the mp3s into a single m4b that your iTunes syncs to your iPod.</p>
</li>
<li>
<p>You were a Windows developer with dozens of e-books in Microsoft&rsquo;s CHM (compiled HTML) format. Fortunately, on the Mac you have the open-source reader <a href="http://chmox.sourceforge.net/"target="_blank" rel="noopener">Chmox</a>.</p>
</li>
<li>
<p>Say you have two computers, or some external hard drives, and you need to keep some folders in sync. Again, if you&rsquo;re a solid Linux user, you can comfortably use &ldquo;rsync&rdquo; from the command line. But if you want a visual shell for rsync, a great option is <a href="http://www.econtechnologies.com/pages/cs/chrono_overview.html"target="_blank" rel="noopener">ChronoSync</a>, which allows bi-directional synchronization and much more. It&rsquo;s how I keep two 500GB external hard drives synced through my Mac Mini, a poor man&rsquo;s RAID 1 :-)</p>
</li>
<li>
<p>A well-known subsystem is <a href="http://web.archive.org/web/20090722012006/http://www.growl.info/"target="_blank" rel="noopener">Growl</a>, a notification infrastructure. For example, when an application like Transmission finishes a download, it sends a message to Growl, which pops up on your desktop to notify you. Adium also uses it to show who came online, and so on. Growl ships with plugins for iTunes and Mail.app, plus a command-line tool to integrate with other applications.</p>
</li>
<li>
<p>Mail.app is organized with a list of emails on top and a view of the selected email below. Some prefer vertical bars instead of horizontal, more like Outlook. In that case use the <a href="http://web.archive.org/web/20090802092437/http://harnly.net/software/letterbox/"target="_blank" rel="noopener">LetterBox</a> plugin for Mail.app.</p>
</li>
<li>
<p>A famous but more advanced application is the legendary <a href="http://quicksilver.en.softonic.com/"target="_blank" rel="noopener">QuickSilver</a>, which some see only as a fast way to find applications, but which is really a sophisticated environment for chaining functionality. You can, for example, find and select several files, attach them to an email, and send it to an address in your Address Book. It has dozens of plugins and themes for customization. It&rsquo;s interesting at first, and there are various clones with the same idea, but in the end you&rsquo;ll notice you mostly use it just to find applications. And for that, the simplest thing is Command ⌘ + Space to activate Spotlight (the magnifying glass in the upper-right corner) and type the application&rsquo;s name. Same for finding documents. I find it more practical and faster.</p>
</li>
</ul>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2009/7/20/Picture_12_original.png" alt=""  loading="lazy" /></p>
<ul>
<li>
<p>Those coming from Windows might still need to reach their old machine, or at the office deal with Windows programs. Fortunately, Windows has RDP (Remote Desktop Protocol) for remote access. On the Mac the best option is <a href="http://cord.sourceforge.net/"target="_blank" rel="noopener">CoRD</a>, the equivalent of a Terminal Client.</p>
</li>
<li>
<p>A very useful utility for monitoring your CPU, RAM, disk, and network usage is <a href="http://www.apple.com/downloads/dashboard/status/istatpro.html"target="_blank" rel="noopener">iStat Pro</a>, which has a widget version for the Dashboard, or <a href="http://web.archive.org/web/20090717080452/http://www.islayer.com/apps/istatmenus/"target="_blank" rel="noopener">iStat Menu</a> for the top menu bar. I personally prefer the second, but both are very good.</p>
</li>
<li>
<p>A well-known benchmarker in the Mac world is <a href="http://www.xbench.com/"target="_blank" rel="noopener">XBench</a>, which tests your Mac and lets you compare results on their website against other Macs.</p>
</li>
<li>
<p>The last tip is to create an account on <a href="http://www.macupdate.com/"target="_blank" rel="noopener">MacUpdate</a> and then download the <a href="http://www.macupdate.com/desktop/"target="_blank" rel="noopener">MacUpdate Desktop</a> software. Open it occasionally and it tells you everything that&rsquo;s outdated on your machine, letting you pick what to update:</p>
</li>
</ul>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2012/4/20/Screen%20Shot%202012-04-20%20at%206.14.40%20PM_original.png?1334956624" alt=""  loading="lazy" /></p>
<h3>History<span class="hx:absolute hx:-mt-20" id="history"></span>
    <a href="#history" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p>To understand Mac OS X, you need to understand its history. For that, the best set of articles are the ones ArsTechnica has written since 2000:</p>
<ul>
<li>
<p><a href="http://arstechnica.com/reviews/4q99/macos-x-dp2/macos-x-dp2-1.html"target="_blank" rel="noopener">Mac OS X DP2: A Preview</a></p>
</li>
<li>
<p><a href="http://arstechnica.com/reviews/1q00/macos-x-gui/macos-x-gui-1.html"target="_blank" rel="noopener">Mac OS X Update: Quartz &amp; Aqua</a></p>
</li>
<li>
<p><a href="http://arstechnica.com/reviews/1q00/macos-x-dp3/macos-x-dp3-1.html"target="_blank" rel="noopener">Mac OS X DP3: Trial by Water</a></p>
</li>
<li>
<p><a href="http://www.arstechnica.com/reviews/2q00/macos-x-dp4/macos-x-dp4-1.html"target="_blank" rel="noopener">Mac OS X DP4</a></p>
</li>
<li>
<p><a href="http://www.arstechnica.com/reviews/2q00/macos-qna/macos-x-qa-1.html"target="_blank" rel="noopener">Mac OS X Q &amp; A</a></p>
</li>
<li>
<p><a href="http://arstechnica.com/reviews/4q00/macosx-pb1/macos-x-beta-1.html"target="_blank" rel="noopener">Mac OS X Public Beta</a></p>
</li>
<li>
<p><a href="http://arstechnica.com/reviews/01q1/macwldsf/mwsf-2.html"target="_blank" rel="noopener">MWSF: Mac OS X Post-Beta</a></p>
</li>
<li>
<p><a href="http://arstechnica.com/reviews/01q2/macos-x-final/macos-x-1.html"target="_blank" rel="noopener">Mac OS X 10.0 Cheetah</a></p>
</li>
<li>
<p><a href="http://arstechnica.com/apple/reviews/2001/10/macosx-10-1.ars"target="_blank" rel="noopener">Mac OS X 10.1 Puma</a></p>
</li>
<li>
<p><a href="http://arstechnica.com/apple/reviews/2002/09/macosx-10-2.ars"target="_blank" rel="noopener">Mac OS X 10.2 Jaguar</a></p>
</li>
<li>
<p><a href="http://arstechnica.com/apple/reviews/2003/11/macosx-10-3.ars"target="_blank" rel="noopener">Mac OS X 10.3 Panther</a></p>
</li>
<li>
<p><a href="http://arstechnica.com/apple/reviews/2005/04/macosx-10-4.ars"target="_blank" rel="noopener">Mac OS X 10.4 Tiger</a></p>
</li>
<li>
<p><a href="http://arstechnica.com/apple/reviews/2007/10/mac-os-x-10-5.ars"target="_blank" rel="noopener">Mac OS X 10.5 Leopard: the Ars Technica review</a></p>
</li>
<li>
<p><a href="http://arstechnica.com/apple/reviews/2009/08/mac-os-x-10-6.ars"target="_blank" rel="noopener">Mac OS X 10.6 Snow Leopard: the Ars Technica review</a></p>
</li>
<li>
<p><a href="http://arstechnica.com/apple/reviews/2011/07/mac-os-x-10-7.ars"target="_blank" rel="noopener">Mac OS X 10.6 Lion: the Ars Technica review</a></p>
</li>
</ul>
<p>Also understand that Mac OS X is completely different from its predecessor, the Mac OS, which ended its life at version 9. When Steve Jobs was forced out of Apple in 1985, he founded the company Next and built the <a href="http://en.wikipedia.org/wiki/Nextstep"target="_blank" rel="noopener">NextStep</a> operating system, a 32-bit, multitasking OS with a Mach-based kernel. Watch Steve Jobs himself <a href="http://www.youtube.com/watch?v=j02b8Fuz73A"target="_blank" rel="noopener">demonstrating NextStep</a> version 3. NextStep was later opened as a standard together with Sun as <a href="http://en.wikipedia.org/wiki/OpenStep"target="_blank" rel="noopener">OpenStep</a>. The <a href="http://www.windowmaker.info/"target="_blank" rel="noopener">WindowMaker</a> window manager is inspired by OpenStep and supports its open-source implementation, <a href="http://gnustep.org/"target="_blank" rel="noopener">GNUStep</a>. Later, in 1997, Apple reacquired Next, and NextStep became the foundation for Mac OS X. Its development framework was renamed <a href="http://en.wikipedia.org/wiki/Cocoa_%28API%29"target="_blank" rel="noopener">Cocoa</a>, which is why the development APIs have names like NSString and NSWindow, where &ldquo;NS&rdquo; stands for &ldquo;NextStep.&rdquo;</p>
]]></content:encoded><category>apple</category><category>developer-tools</category><category>learning</category><category>off-topic</category></item><item><title>[Off-Topic] Reference Books 2008-2009</title><link>https://akitaonrails.github.io/en/2009/07/11/off-topic-livros-de-refer-ncia-2008-2009/</link><guid isPermaLink="true">https://akitaonrails.github.io/en/2009/07/11/off-topic-livros-de-refer-ncia-2008-2009/</guid><pubDate>Sat, 11 Jul 2009 01:06:00 -0300</pubDate><description>&lt;p&gt;For anyone who got interested in the management, administration, and process topics I&amp;rsquo;ve been exploring in my posts and talks, here are my references. These are the books I&amp;rsquo;ve read over the past nine months and the ones sitting in my queue to start or finish.&lt;/p&gt;
&lt;h2&gt;Currently Reading&lt;span class="hx:absolute hx:-mt-20" id="currently-reading"&gt;&lt;/span&gt;
&lt;a href="#currently-reading" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;&lt;img src="https://akitaonrails.s3.amazonaws.com/files/2009-livro-30.png" alt="" loading="lazy" /&gt;&lt;br&gt;
&lt;a href="http://www.amazon.com/Free-Future-Radical-Chris-Anderson/dp/1401322905/ref=sr_1_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1247295319&amp;amp;sr=1-1"target="_blank" rel="noopener"&gt;Free: The Future of a Radical Price&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://akitaonrails.s3.amazonaws.com/files/2009-livro-1.png" alt="" loading="lazy" /&gt;&lt;br&gt;
&lt;a href="http://www.amazon.com/gp/product/0975568604/ref=s9_simx_gw_s3_p14_i1?pf_rd_m=ATVPDKIKX0DER&amp;amp;pf_rd_s=center-1&amp;amp;pf_rd_r=04KQFDC36R5X7NVFSH0M&amp;amp;pf_rd_t=101&amp;amp;pf_rd_p=470938131&amp;amp;pf_rd_i=507846"target="_blank" rel="noopener"&gt;The Visible Ops Handbook: Starting ITIL in 4 Practical Steps&lt;/a&gt;&lt;/p&gt;</description><content:encoded><![CDATA[<p>For anyone who got interested in the management, administration, and process topics I&rsquo;ve been exploring in my posts and talks, here are my references. These are the books I&rsquo;ve read over the past nine months and the ones sitting in my queue to start or finish.</p>
<h2>Currently Reading<span class="hx:absolute hx:-mt-20" id="currently-reading"></span>
    <a href="#currently-reading" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p><img src="https://akitaonrails.s3.amazonaws.com/files/2009-livro-30.png" alt=""  loading="lazy" /><br>
<a href="http://www.amazon.com/Free-Future-Radical-Chris-Anderson/dp/1401322905/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1247295319&amp;sr=1-1"target="_blank" rel="noopener">Free: The Future of a Radical Price</a></p>
<p><img src="https://akitaonrails.s3.amazonaws.com/files/2009-livro-1.png" alt=""  loading="lazy" /><br>
<a href="http://www.amazon.com/gp/product/0975568604/ref=s9_simx_gw_s3_p14_i1?pf_rd_m=ATVPDKIKX0DER&amp;pf_rd_s=center-1&amp;pf_rd_r=04KQFDC36R5X7NVFSH0M&amp;pf_rd_t=101&amp;pf_rd_p=470938131&amp;pf_rd_i=507846"target="_blank" rel="noopener">The Visible Ops Handbook: Starting ITIL in 4 Practical Steps</a></p>
<p><img src="https://akitaonrails.s3.amazonaws.com/files/2009-livro-5.png" alt=""  loading="lazy" /><br>
<a href="http://web.archive.org/web/20090802092436/http://www.submarino.com.br/produto/1/132873/sistema&#43;toyota&#43;de&#43;producao:&#43;do&#43;ponto&#43;de&#43;vista&#43;da&#43;engenharia&#43;de&#43;produ.."target="_blank" rel="noopener">A Study of the Toyota Production System from an Industrial Engineering Viewpoint (Sistema Toyota de Produção: do Ponto de Vista da Engenharia de Produção)</a> – before understanding a specialization like software, it&rsquo;s better to understand production in general</p>
<p><img src="https://akitaonrails.s3.amazonaws.com/files/2009-livro-7.png" alt=""  loading="lazy" /><br>
<a href="http://www.amazon.com/Elegant-Universe-Superstrings-Dimensions-Ultimate/dp/0393058581/ref=sr_1_3?ie=UTF8&amp;s=books&amp;qid=1247293142&amp;sr=1-3"target="_blank" rel="noopener">The Elegant Universe: Superstrings, Hidden Dimensions, and the Quest for the Ultimate Theory</a></p>
<h2>Already Read<span class="hx:absolute hx:-mt-20" id="already-read"></span>
    <a href="#already-read" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p><img src="https://akitaonrails.s3.amazonaws.com/files/2009-livro-6.png" alt=""  loading="lazy" /><br>
<a href="http://www.amazon.com/Fabric-Cosmos-Space-Texture-Reality/dp/0375727205/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1247293142&amp;sr=1-1"target="_blank" rel="noopener">The Fabric of the Cosmos: Space, Time, and the Texture of Reality</a> – every manager should understand relativity, nonlinearity, chaos, etc.</p>
<p><img src="https://akitaonrails.s3.amazonaws.com/files/2009-livro-8.png" alt=""  loading="lazy" /><br>
<a href="http://www.amazon.com/Linked-Everything-Connected-Else-Means/dp/0452284392/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1247293211&amp;sr=1-1"target="_blank" rel="noopener">Linked: How Everything Is Connected to Everything Else and What It Means</a> – the explanation of the foundation of self-organization</p>
<p><img src="https://akitaonrails.s3.amazonaws.com/files/2009-livro-9.png" alt=""  loading="lazy" /><br>
<a href="http://www.amazon.com/Outliers-Story-Success-Malcolm-Gladwell/dp/0316017922/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1247293241&amp;sr=1-1"target="_blank" rel="noopener">Outliers: The Story of Success</a></p>
<p><img src="https://akitaonrails.s3.amazonaws.com/files/2009-livro-10.png" alt=""  loading="lazy" /><br>
<a href="http://www.amazon.com/Tipping-Point-Little-Things-Difference/dp/0316346624/ref=sr_1_2?ie=UTF8&amp;s=books&amp;qid=1247293241&amp;sr=1-2"target="_blank" rel="noopener">The Tipping Point: How Little Things Can Make a Big Difference</a> – the practical effect of what Linked explains</p>
<p><img src="https://akitaonrails.s3.amazonaws.com/files/2009-livro-11.png" alt=""  loading="lazy" /><br>
<a href="http://www.amazon.com/Blink-Power-Thinking-Without/dp/0316010669/ref=sr_1_3?ie=UTF8&amp;s=books&amp;qid=1247293241&amp;sr=1-3"target="_blank" rel="noopener">Blink: The Power of Thinking Without Thinking</a></p>
<p><img src="https://akitaonrails.s3.amazonaws.com/files/2009-livro-15.png" alt=""  loading="lazy" /><br>
<a href="http://web.archive.org/web/20090802092444/http://www.submarino.com.br/produto/1/168336/virando&#43;a&#43;propria&#43;mesa"target="_blank" rel="noopener">Turning the Tables (Virando a Própria Mesa)</a> – the seed of democratic organizations, far more than a curiosity: it&rsquo;s the only way out</p>
<p><img src="https://akitaonrails.s3.amazonaws.com/files/2009-livro-16.png" alt=""  loading="lazy" /><br>
<a href="http://web.archive.org/web/20090802092442/http://www.submarino.com.br/produto/1/1672779/voce&#43;esta&#43;louco!:&#43;uma&#43;vida&#43;administrada&#43;de&#43;outra&#43;forma"target="_blank" rel="noopener">You&rsquo;re Crazy! (Você Está Louco!): A Life Managed a Different Way</a></p>
<p><img src="https://akitaonrails.s3.amazonaws.com/files/2009-livro-17.png" alt=""  loading="lazy" /><br>
<a href="http://web.archive.org/web/20090802092440/http://www.submarino.com.br/produto/1/232885/escola&#43;sem&#43;sala&#43;de&#43;aula"target="_blank" rel="noopener">School Without Walls (Escola sem Sala de Aula)</a> – today&rsquo;s education no longer works: the reason we don&rsquo;t have motivated, proactive, creative workers.</p>
<p><img src="https://akitaonrails.s3.amazonaws.com/files/2009-livro-19.png" alt=""  loading="lazy" /><br>
<a href="http://www.amazon.com/Blue-Ocean-Strategy-Uncontested-Competition/dp/1591396190/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1247293564&amp;sr=1-1"target="_blank" rel="noopener">Blue Ocean Strategy: How to Create Uncontested Market Space and Make Competition Irrelevant</a> – another definition of &ldquo;think different&rdquo;</p>
<p><img src="https://akitaonrails.s3.amazonaws.com/files/2009-livro-20.png" alt=""  loading="lazy" /><br>
<a href="http://www.amazon.com/Innovators-Solution-Creating-Sustaining-Successful/dp/1578518520/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1247293597&amp;sr=1-1"target="_blank" rel="noopener">The Innovator&rsquo;s Solution: Creating and Sustaining Successful Growth</a></p>
<p><img src="https://akitaonrails.s3.amazonaws.com/files/2009-livro-21.png" alt=""  loading="lazy" /><br>
<a href="http://www.amazon.com/Black-Swan-Impact-Highly-Improbable/dp/1400063515/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1247293637&amp;sr=1-1"target="_blank" rel="noopener">The Black Swan: The Impact of the Highly Improbable</a> – the war of Pareto vs Gauss</p>
<p><img src="https://akitaonrails.s3.amazonaws.com/files/2009-livro-22.png" alt=""  loading="lazy" /><br>
<a href="http://www.amazon.com/Fooled-Randomness-Hidden-Chance-Markets/dp/1400067936/ref=sr_1_2?ie=UTF8&amp;s=books&amp;qid=1247293637&amp;sr=1-2"target="_blank" rel="noopener">Fooled by Randomness: The Hidden Role of Chance in Life and in the Markets</a></p>
<p><img src="https://akitaonrails.s3.amazonaws.com/files/2009-livro-23.png" alt=""  loading="lazy" /><br>
<a href="http://www.amazon.com/Wikinomics-Mass-Collaboration-Changes-Everything/dp/1591841933/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1247293698&amp;sr=1-1"target="_blank" rel="noopener">Wikinomics: How Mass Collaboration Changes Everything</a></p>
<p><img src="https://akitaonrails.s3.amazonaws.com/files/2009-livro-24.png" alt=""  loading="lazy" /><br>
<a href="http://www.amazon.com/Long-Tail-Revised-Updated-Business/dp/B001PTG4BO/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1247293726&amp;sr=1-1"target="_blank" rel="noopener">Long Tail, The: Why the Future of Business is Selling Less of More</a></p>
<p><img src="https://akitaonrails.s3.amazonaws.com/files/2009-livro-3.png" alt=""  loading="lazy" /><br>
<a href="http://www.amazon.com/Lean-Thinking-Corporation-Revised-Updated/dp/0743249275/ref=sr_1_4?ie=UTF8&amp;s=books&amp;qid=1247292925&amp;sr=8-4"target="_blank" rel="noopener">Lean Thinking: Banish Waste and Create Wealth in Your Corporation, Revised and Updated</a></p>
<p><img src="https://akitaonrails.s3.amazonaws.com/files/2009-livro-4.png" alt=""  loading="lazy" /><br>
<a href="http://www.amazon.com/Lean-Solutions-Companies-Customers-Together/dp/B00121E1JM/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1247292937&amp;sr=8-1"target="_blank" rel="noopener">Lean Solutions: How Companies and Customers Can Create Value and Wealth Together</a></p>
<p><img src="https://akitaonrails.s3.amazonaws.com/files/2009-livro-13.png" alt=""  loading="lazy" /><br>
<a href="http://www.amazon.com/Going-Lean-Manufacturing-Principles-Uncertainty/dp/081441057X/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1247293377&amp;sr=1-1"target="_blank" rel="noopener">Going Lean: How the Best Companies Apply Lean Manufacturing Principles to Shatter Uncertainty, Drive Innovation, and Maximize Profits</a></p>
<p><img src="https://akitaonrails.s3.amazonaws.com/files/2009-livro-14.png" alt=""  loading="lazy" /><br>
<a href="http://www.amazon.com/Beyond-Goal-Eliyahu-Goldratt-Constraints/dp/1596590238/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1247293367&amp;sr=1-1"target="_blank" rel="noopener">Beyond the Goal: Eliyahu Goldratt Speaks on the Theory of Constraints</a></p>
<p><img src="https://akitaonrails.s3.amazonaws.com/files/2009-livro-12.png" alt=""  loading="lazy" /><br>
<a href="http://www.amazon.com/Freakonomics-Revised-Expanded-Economist-Everything/dp/0061234001/ref=sr_1_11?ie=UTF8&amp;s=books&amp;qid=1247293241&amp;sr=1-11"target="_blank" rel="noopener">Freakonomics [Revised and Expanded]: A Rogue Economist Explores the Hidden Side of Everything</a> – learning to ask the right questions</p>
<p><img src="https://akitaonrails.s3.amazonaws.com/files/2009-livro-18.png" alt=""  loading="lazy" /><br>
<a href="http://www.amazon.com/Lean-Software-Development-Agile-Toolkit/dp/0321150783/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1247293522&amp;sr=8-1"target="_blank" rel="noopener">Lean Software Development: An Agile Toolkit</a></p>
<h2>To Read<span class="hx:absolute hx:-mt-20" id="to-read"></span>
    <a href="#to-read" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p><img src="https://akitaonrails.s3.amazonaws.com/files/2009-livro-29.png" alt=""  loading="lazy" /><br>
<a href="http://www.amazon.com/Great-Game-Business-Jack-Stack/dp/038547525X/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1247294936&amp;sr=1-1"target="_blank" rel="noopener">The Great Game of Business</a> – one of the key elements for creating democratic organizations</p>
<p><img src="https://akitaonrails.s3.amazonaws.com/files/2009-livro-33.png" alt=""  loading="lazy" /><br>
<a href="http://www.amazon.com/gp/product/0887308023/ref=pd_luc_sbs_04_01"target="_blank" rel="noopener">Open-Book Management: Coming Business Revolution, The</a></p>
<p><img src="https://akitaonrails.s3.amazonaws.com/files/2009-livro-31.png" alt=""  loading="lazy" /><br>
<a href="http://www.amazon.com/Goal-Process-Ongoing-Improvement/dp/0884271781/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1247296468&amp;sr=8-1"target="_blank" rel="noopener">The Goal: A Process of Ongoing Improvement</a></p>
<p><img src="https://akitaonrails.s3.amazonaws.com/files/2009-livro-32.png" alt=""  loading="lazy" /><br>
<a href="http://www.amazon.com/End-Management-Rise-Organizational-Democracy/dp/078795912X/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1247296899&amp;sr=8-1"target="_blank" rel="noopener">The End of Management and the Rise of Organizational Democracy</a></p>
<p><img src="https://akitaonrails.s3.amazonaws.com/files/2009-livro-28.png" alt=""  loading="lazy" /><br>
<a href="http://www.amazon.com/Managers-Not-MBAs-Management-Development/dp/1576753514/ref=sr_1_6?ie=UTF8&amp;s=books&amp;qid=1247294191&amp;sr=1-6"target="_blank" rel="noopener">Managers Not MBAs: A Hard Look at the Soft Practice of Managing and Management Development</a> – I need to read at least one Mintzberg</p>
<p><img src="https://akitaonrails.s3.amazonaws.com/files/2009-livro-25.png" alt=""  loading="lazy" /><br>
<a href="http://www.amazon.com/Balanced-Scorecard-Translating-Strategy-Action/dp/0875846513/ref=sr_1_5?ie=UTF8&amp;s=books&amp;qid=1247293979&amp;sr=1-5"target="_blank" rel="noopener">The Balanced Scorecard: Translating Strategy into Action</a> – still not sure if it&rsquo;s worth it</p>
<p><img src="https://akitaonrails.s3.amazonaws.com/files/2009-livro-26.png" alt=""  loading="lazy" /><br>
<a href="http://web.archive.org/web/20090704130245/http://www.submarino.com.br:80/produto/1/21483534/marketing&#43;para&#43;o&#43;seculo&#43;xxi/?"target="_blank" rel="noopener">Marketing Para o Século XXI</a> – I need to read at least one Kotler</p>
<p><img src="https://akitaonrails.s3.amazonaws.com/files/2009-livro-27.png" alt=""  loading="lazy" /><br>
<a href="http://www.amazon.com/Six-Sigma-Way-Companies-Performance/dp/0071358064/ref=sr_1_7?ie=UTF8&amp;s=books&amp;qid=1247294099&amp;sr=1-7"target="_blank" rel="noopener">The Six Sigma Way: How GE, Motorola, and Other Top Companies are Honing Their Performance</a> – I&rsquo;m sure it&rsquo;s not worth it, but I want to know it with more arguments</p>
<h2>Conclusion<span class="hx:absolute hx:-mt-20" id="conclusion"></span>
    <a href="#conclusion" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>I&rsquo;ll admit I&rsquo;ve still read <strong>very little</strong>. There&rsquo;s more research sitting in the queue, and this counts books only, without the hundreds and hundreds of academic papers, articles, and Wikipedia pages that also went into it.</p>
<p>Even so, I&rsquo;d say everyone should read <strong>at minimum</strong> something close to what&rsquo;s on this list, counting only the general-knowledge titles, not the technical ones.</p>
<p>My specific interest is understanding how Agile and Lean culture leads to concepts like integrated quality, zero defects, and what you read in The Goal. Especially <a href="http://www.akitaonrails.com/en/2009/07/08/off-topic-agilidade-caos-auto-organizacao"target="_blank" rel="noopener">self-organization</a>. From there you get to Open Book Management and The Great Game, which lead to The End of Management and democratic organizations. All of it rests on what&rsquo;s in Linked and books like The Fabric of the Cosmos. In the end, the whole theory closes in a simple, elegant way.</p>
]]></content:encoded><category>learning</category><category>management</category><category>agile</category><category>off-topic</category></item><item><title>Off-Topic: Should I Go to College?</title><link>https://akitaonrails.github.io/en/2009/04/17/off-topic-devo-fazer-faculdade/</link><guid isPermaLink="true">https://akitaonrails.github.io/en/2009/04/17/off-topic-devo-fazer-faculdade/</guid><pubDate>Fri, 17 Apr 2009 20:41:00 -0300</pubDate><description>&lt;p&gt;I don&amp;rsquo;t know if it was a coincidence, but today I got an email asking for my opinion on this topic at the same time that &lt;a href="http://web.archive.org/web/20100930182801/http://www.michelazzo.com.br/textos/steve-jobs-e-burro-sera"target="_blank" rel="noopener"&gt;Paulino Michelazzo&lt;/a&gt; blogged about something similar.&lt;/p&gt;
&lt;p&gt;The short answer? When in doubt, go. Okay, let&amp;rsquo;s get to the longer answer.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://s3.amazonaws.com/akitaonrails/assets/2009/4/17/usp.jpg_original.jpeg" alt="" loading="lazy" /&gt;&lt;/p&gt;
&lt;h2&gt;Today&amp;rsquo;s Colleges&lt;span class="hx:absolute hx:-mt-20" id="todays-colleges"&gt;&lt;/span&gt;
&lt;a href="#todays-colleges" class="subheading-anchor" aria-label="Permalink for this section"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Like Paulino, most people have the sense that college &lt;em&gt;&amp;ldquo;doesn&amp;rsquo;t prepare students for the job market.&amp;rdquo;&lt;/em&gt; Others say exactly the opposite: that the problem is colleges focusing only on the job market and neglecting the academic side.&lt;/p&gt;</description><content:encoded><![CDATA[<p>I don&rsquo;t know if it was a coincidence, but today I got an email asking for my opinion on this topic at the same time that <a href="http://web.archive.org/web/20100930182801/http://www.michelazzo.com.br/textos/steve-jobs-e-burro-sera"target="_blank" rel="noopener">Paulino Michelazzo</a> blogged about something similar.</p>
<p>The short answer? When in doubt, go. Okay, let&rsquo;s get to the longer answer.</p>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2009/4/17/usp.jpg_original.jpeg" alt=""  loading="lazy" /></p>
<h2>Today&rsquo;s Colleges<span class="hx:absolute hx:-mt-20" id="todays-colleges"></span>
    <a href="#todays-colleges" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>Like Paulino, most people have the sense that college <em>&ldquo;doesn&rsquo;t prepare students for the job market.&rdquo;</em> Others say exactly the opposite: that the problem is colleges focusing only on the job market and neglecting the academic side.</p>
<p>For me there are two types of college. The first are the traditional, serious ones, like the federal universities and a few state ones: USP, Unicamp, UFRJ, ITA. These are seen as the ones that <em>&ldquo;don&rsquo;t prepare students for the real job market.&rdquo;</em></p>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2009/4/17/0471785989.jpg_original.jpeg" alt=""  loading="lazy" />The second type are the commercial ones, with their fast-food two-year degrees or less, instant diplomas, do-two-courses-in-one deals. I won&rsquo;t name names because they&rsquo;re obvious. These are seen as the ones that <em>&ldquo;focus, barely, on the job market.&rdquo;</em></p>
<p>A college&rsquo;s goal should be much bigger than preparing someone for &ldquo;the job market.&rdquo; It&rsquo;s the final stage of the formal educational process that starts in grade school and prepares a person &ldquo;for life.&rdquo; Preparing them to grow on their own, to value self-knowledge, respect for others, civic duty. Building a taste for discovery, for rational and independent thought, for systematic trial and error in the name of continuous improvement. Over more than ten formal years, the system should teach students to think and act on their own, aware of their own actions, with the scientific method above all.</p>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2009/4/17/9788126501205.jpg_original.jpeg" alt=""  loading="lazy" />Instead, students leave the educational system with a different proposition: I&rsquo;ll do whatever I&rsquo;m told to do, everything I&rsquo;m told is true and needs no verification, and everything I&rsquo;ve learned so far is enough to consider myself a good professional. In short, the student leaves college with their values completely corrupted. Half the blame goes to the system, the other half I place on the student, because I went through the same system myself.</p>
<p>The colleges considered top-tier, like USP, still have a more academic scope, and therefore a more experimental, more challenging, and more interesting one. If the student is willing, that can genuinely open doors. Students at these schools have more time, usually more purchasing power, and, with the right mindset, access to professors and material with far more depth. I&rsquo;m generalizing: not all professors are good, not all students are engaged. But that&rsquo;s not the norm there.</p>
<p>Commercial colleges have a single objective: being diploma factories. They present, in an absolutely superficial and disposable way, all the technical terms and basic procedures that entry-level jobs tend to ask for. They&rsquo;re pieces of a cruel puzzle whose only goal is to trivialize education and the craft. Again, I&rsquo;m generalizing: good professors and well-meaning people exist. They&rsquo;re just not the norm.</p>
<p>The traditional educational system as a whole is built on <strong>dogmatization</strong> far more than on actual <strong>learning</strong>. Through the end of high school, every student is a memorization machine. Commercial colleges keep the same rhythm: memorize, take the tests, get a diploma. Simple, easy, no effort (I repeat: no effort).</p>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2009/4/17/862_man_learning_computer_programming_and_reading_a_dummies_book_while_sitting_at_a_computer.jpg_original.png" alt=""  loading="lazy" /></p>
<h2>My Experience<span class="hx:absolute hx:-mt-20" id="my-experience"></span>
    <a href="#my-experience" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>I&rsquo;ve told this story before. About six years ago I decided to try a certain renowned commercial college, just for kicks. I scheduled the entrance exam for a Saturday, spent the previous Friday night hopping through three or four clubs with no sleep at all, and took the test literally still in post-club mode. I finished in half an hour, because it was absolutely trivial, and obviously passed. Let&rsquo;s just say this college&rsquo;s name is recognized by every company in the market.</p>
<p>It was so frustrating that I decided I wasn&rsquo;t going to waste my time somewhere that easy to get into. I didn&rsquo;t even bother to enroll.</p>
<p>Fifteen years ago I took the entrance exams for Fuvest, Unicamp, and Fatec, only those three, and passed all three. It was much harder: a full year at the same frantic pace of study, at least ten hours every day, weekends and holidays included. Thousands of exercises and practice tests, and even then I didn&rsquo;t reach the top of the list.</p>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2009/4/17/unix_plate.jpg_original.jpeg" alt=""  loading="lazy" /></p>
<p>Spending some time at USP was a great experience, even though I dropped out three years in. My reasons are personal and apply only to me, which is why I say I don&rsquo;t recommend anyone copy me. I left because I was certain I could learn the rest of the curriculum on my own, and faster. But don&rsquo;t get me wrong: I never thought what I was learning was unimportant. I had already been a programmer for at least five years. The first years at USP massively accelerated what I already knew and helped me take much bigger steps.</p>
<p>Even though I was at IME (Institute of Mathematics and Statistics), my best friends back then were electrical engineering students at Politécnica. That&rsquo;s the crowd that taught me Unix: guys who played with assembler over lunch, did computer graphics in their spare time, and still had time to design microprocessors before dinner. I watched Java, Delphi, HTML, and JavaScript being born alongside those people. And I had broadband internet access fifteen years ago, thanks to the university.</p>
<p>That crowd left a strong impression on me: students only a year or two older than me who seemed to have ten more years of experience.</p>
<h2>Talent and Effort<span class="hx:absolute hx:-mt-20" id="talent-and-effort"></span>
    <a href="#talent-and-effort" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>For me, college was extremely valuable and a hugely important step toward who I am today. I didn&rsquo;t finish by choice. Now comes the hard part: software development is not a repeatable manual craft. Like advertising, music, literature, medicine, architecture, and every great profession, it demands <strong>innate talent</strong>. Nobody learns to be a great musician: you&rsquo;re born with the talent and learn to refine it. You don&rsquo;t learn to be Da Vinci, or Mozart, or Niemeyer, or Villa Lobos. Either you&rsquo;re born Da Vinci or you aren&rsquo;t. Sure, you can always learn the techniques, but you won&rsquo;t get very far.</p>
<p>College won&rsquo;t make you a talented person; at best it helps <strong>shape</strong> your talent. Many people discover in college that they&rsquo;re on the wrong path, and many only find out much later. Unfortunately that&rsquo;s common. Some people are aware they still don&rsquo;t know what they want. Worse: many don&rsquo;t even know that they don&rsquo;t know yet.</p>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2009/4/17/linus.jpg_original.jpeg" alt=""  loading="lazy" /></p>
<p>Something else that matters: a talented person is never satisfied with what the system hands them, with what college or some course teaches. They always want more, much more. People like a Linus Torvalds, who creates a kernel from scratch. Like a Miguel de Icaza, who creates platforms from scratch. Like a Joe Armstrong, who challenges the status quo and creates a language like Erlang; like a Damien Katz, who creates different ways of handling old problems like databases, creating CouchDBs. People like Don Chamberlin and Raymond Boyce, who created the original SQL. People like Alonzo Church, who went deeper into mathematical disciplines like lambda calculus and opened up new forms of programming. People like John von Neumann, who literally laid the first brick in the foundation of computing.</p>
<p>Education is much more than learning a micro-trade, a series of mechanized tasks that can be repeated. There&rsquo;s a place for that kind of work, sure. But if you&rsquo;re reading this article, we&rsquo;re definitely not talking about painting walls or stacking bricks.</p>
<p>Many of the best programmers were already programmers before college. It&rsquo;s not a requirement, but it&rsquo;s common, especially nowadays, for the urge to program to show up well before entrance exams. That makes things easier, because there are fewer doubts. In that case, invest as much as you can in the talent you believe you have and get into a college capable of shaping what you know.</p>
<p>The biggest mistake I see is great potential entering bad colleges just to grab a diploma. They believe they&rsquo;re already good (they aren&rsquo;t yet, they only have potential) and that therefore they don&rsquo;t need college. That&rsquo;s two mistakes. The first: a bad college makes you waste time chasing a diploma with no value at all. I personally don&rsquo;t hire anyone based on a diploma, and neither does anyone truly serious who values knowledge.</p>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2009/4/17/job2_original.jpeg" alt=""  loading="lazy" /></p>
<p>The second mistake is reducing <strong>software development</strong> (including web development) to a mere set of specific pieces of knowledge. Thinking that knowing JavaScript, HTML, Linux, Apache adds up to a sufficient collection. Think about the painter again: a great painter either knows how to paint the whole work or doesn&rsquo;t know how to paint at all. A good chef either knows how to make every dish or none. A musician either knows how to compose a complete piece or nothing. There&rsquo;s no knowing the pieces, however well, and thinking you know enough.</p>
<h2>The Worker and the Artist<span class="hx:absolute hx:-mt-20" id="the-worker-and-the-artist"></span>
    <a href="#the-worker-and-the-artist" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>That mistake is fatal, because the individual will readily believe they know enough and give little or no attention to everything else. Software development is an art like any other. You&rsquo;ll never be perfect in all of its aspects, and the peculiarity of all these creative fields is precisely that they prize the <em>&ldquo;pursuit of perfection.&rdquo;</em> What counts is the rung above the one you&rsquo;ll be on tomorrow, and the wisdom that this ladder has no end. What matters is the journey, and the journey in pursuit of perfection is the engine of continuous improvement.</p>
<p>As they said of Socrates: <em>&ldquo;the more I learn, the less I know.&rdquo;</em> Stop for a moment and think about that again: most of us forget this principle. Diplomas and certificates do harm precisely because they discourage the long-term journey in exchange for false short-term trophies.</p>
<p><a href="http://en.wikipedia.org/wiki/Difference_engine"target="_blank" rel="noopener"><img src="http://s3.amazonaws.com/akitaonrails/assets/2009/4/17/10301732.jpg_original.jpeg" alt=""  loading="lazy" /></a></p>
<p>You think you really don&rsquo;t need college? Do you know probability and statistics? Because without them you can&rsquo;t build the most advanced anti-spam and anti-virus mechanisms. Think you understand linear algebra and calculus? Without them you&rsquo;ll never create anything in computer graphics. Do you really think you understand algebra? Without it you&rsquo;ll never grasp how cryptography mechanisms work. Did you actually learn boolean logic? Without it you don&rsquo;t understand the foundation of modern computing. Think quantum physics is irrelevant? Without it you can&rsquo;t even begin to imagine the possibilities of future <a href="http://en.wikipedia.org/wiki/Quantum_computing"target="_blank" rel="noopener">quantum computing</a>. Before the cynics take this too literally: I&rsquo;m not asking for expertise in any of these areas, and I don&rsquo;t have it myself. But I know where to look to solve each problem involving each of them.</p>
<p>Plenty of people find all of this very irrelevant. After all, why would a programmer need to know all this nonsense to be a mere &ldquo;form coder&rdquo;? The thing is, in the end, the bulk of &ldquo;the job market&rdquo; is building forms: forms in Visual Basic, forms in HTML, it&rsquo;s all forms. For that I don&rsquo;t need Da Vinci; a house painter will do.</p>
<p>If your purpose as a &ldquo;programmer&rdquo; stops there, this article ends here and I&rsquo;m wasting my time. I build forms too, but I&rsquo;m not content with that and I keep inventing different ways to build them. A Da Vinci doesn&rsquo;t choose or plan when or how his Mona Lisa will come out. It&rsquo;s the result of a long, laborious, difficult journey. The Mona Lisa began to be painted in 1503, he put the final touches on it until shortly before his death, around 1519, and that journey took him from Italy to France in 1516. It only started becoming truly famous in the mid-19th century. He made hundreds of other paintings along the way, some better known, some ignored.</p>
<p><a href="http://en.wikipedia.org/wiki/Eniac"target="_blank" rel="noopener"><img src="http://s3.amazonaws.com/akitaonrails/assets/2009/4/17/1946_eniac_large.jpg_original.jpeg" alt=""  loading="lazy" /></a></p>
<p>On top of that, knowing every aspect of the profession makes even the task of &ldquo;coding forms&rdquo; more interesting. A mediocre coder will code forms the same way for the rest of his life. A good programmer always looks for different approaches, experiments with new techniques, refines the ones he already knows, exactly as they did in the Renaissance. That&rsquo;s where the whole school of software architecture came from, the best practices, the best architectures, the entire process and discipline later taught as rote memorization to the mediocre.</p>
<p>Data structures, basic algorithms, relational databases, compilers, assemblers, operating systems, protocols: these are all disciplines that should be considered trivial. The challenge lies elsewhere. For an artist it&rsquo;s the same as knowing how to hold a brush or handle a piano&rsquo;s keys: what makes the difference is how you use them. That takes talent, that takes experience. Even the most talented person will need years of practical experimentation, thousands of hours of practice, trial and error, refinement, before reaching expert status. A good programmer should aspire to become a <a href="http://en.wikipedia.org/wiki/Polymath"target="_blank" rel="noopener">polymath</a>.</p>
<p><a href="http://en.wikipedia.org/wiki/Polymath"target="_blank" rel="noopener"><img src="http://s3.amazonaws.com/akitaonrails/assets/2009/4/17/180px-Leonardo_self.jpg_original.jpeg" alt=""  loading="lazy" /></a>By polymath I mean knowing programming, some administration, some marketing, general culture, communication, and various other areas that add to your main craft. The current &ldquo;social networks&rdquo; craze makes much more sense once you become familiar with the work of scholars like <a href="http://web.archive.org/web/20101224050752/http://www.nd.edu/~alb/Public%20Relations/NextBigThing%28Barabasi%29_NDMag,Vol36,No1,49-53%28Sprg07%29.pdf"target="_blank" rel="noopener">Albert-László Barabási</a> on scale-free networks, a discipline that didn&rsquo;t originate in computing but precisely explains the evolution of this kind of natural formation. For those leaning toward a management career, understanding <a href="http://books.google.com/books?id=4qM7yJKC_nkC&amp;printsec=frontcover&amp;dq=inauthor:Frederick&#43;inauthor:Winslow&#43;inauthor:Taylor&amp;ei=mSjpSdujDpeSkASGk-3xBg"target="_blank" rel="noopener">Frederick Taylor</a> gives you another perspective. More &ldquo;modern&rdquo; topics like agility or lean make much more sense after you&rsquo;ve seen the work of others like <a href="http://web.archive.org/web/20090428130356/http://deming.org/"target="_blank" rel="noopener">W. Edwards Deming</a> or Taiichi Ohno.</p>
<p>My point: you won&rsquo;t pull anything useful out of your own head alone. Forget that idea. You only sharpen what you know, at genuinely high speed, by standing on the shoulders of giants. In my case, I think I just absorbed that insight and consciously changed my attitude by going through college, in an environment that let me experience my own smallness before decades of cultural and academic evolution. You need to feel like a dwarf in order to pursue surpassing giants.</p>
<p>Today&rsquo;s traditional and commercial environments of teaching and work are unfortunately terrible places for that, I&rsquo;d say the worst in the world. In them you live the illusion of achieving more without pushing for more, in a predatory environment that rewards the fast and the superficial. Fast-food culture is completely hostile to the concept of continuous improvement, which by definition depends on time and disciplined effort. Today everyone wants a short college that&rsquo;s easy to get into, easy to pass, preferably cheap and low-effort. Courses and certificates follow the same path: in no time you get to call yourself a &ldquo;sage&rdquo; in some field. Instead of a meritocratic environment that values learning and wisdom, we have an opportunistic one that values smallness, minimal effort, and low culture.</p>
<p><a href="http://web.archive.org/web/20101224050752/http://www.nd.edu/~alb/Public%20Relations/NextBigThing%28Barabasi%29_NDMag,Vol36,No1,49-53%28Sprg07%29.pdf"target="_blank" rel="noopener"><img src="http://s3.amazonaws.com/akitaonrails/assets/2009/4/17/caldarelli1_original.gif" alt=""  loading="lazy" /></a></p>
<h2>A Recipe?<span class="hx:absolute hx:-mt-20" id="a-recipe"></span>
    <a href="#a-recipe" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>With all of that:</p>
<ul>
<li>
<p>If you&rsquo;re still of school age, in high school, do everything you can to figure out what you think you like. You&rsquo;ll rarely be certain, but you need to try.</p>
</li>
<li>
<p>If you&rsquo;re past school age and still don&rsquo;t know what you want to do, I&rsquo;m sorry: few people leave that condition for a position of distinction. Rare isn&rsquo;t impossible, but in that case understand that you&rsquo;ll need to work much harder than average, much harder than most naturally talented people. It will literally cut to the bone, it will hurt, and there&rsquo;s no guarantee of any return.</p>
</li>
<li>
<p>If you know what you want, go for it. But really go. Understand that the journey is long and has no end, that you&rsquo;ll never reach the top, and that there will always be many people above you, with the aggravating detail that they keep climbing fast. The reward: if you engage with the journey, you&rsquo;ll never have to separate work from fun. Let others decide whether what you&rsquo;re doing is work.</p>
</li>
</ul>
<p>Now the most complicated part of the equation: few people have the conditions for any of this. Most aren&rsquo;t just opportunists; they&rsquo;re in a situation of real financial distress, sometimes with even graver family problems. It&rsquo;s that terrible situation of having to choose between what you want and what others want, where either choice will be a bad one.</p>
<p>I have no magic solution for that, nor do I have that life experience. But I know up close, in detail, cases of people who managed to escape the negative cycle and became far more successful than me. There&rsquo;s a price: it will hurt. No great reward comes for free. No great value comes in the short term.</p>
<p><a href="http://en.wikipedia.org/wiki/Self-pity"target="_blank" rel="noopener"><img src="http://s3.amazonaws.com/akitaonrails/assets/2009/4/17/DavidHasselhoffsaysyousuck.jpg_original.jpeg" alt=""  loading="lazy" /></a></p>
<p>What I see most are people wasting a lot of time feeling <strong>sorry for themselves</strong>. I hate that type, acting like the victim of everything: the system is to blame, the company, the parents, everybody but themselves. There are always people in much worse situations than yours. Never assume you&rsquo;ve hit rock bottom, because you have no idea how deep that pit goes. And if you&rsquo;re here reading this blog, I can assure you that you&rsquo;re very far from that bottom, so you have no excuse.</p>
<p>The old saying still holds: <em>&ldquo;no pain, no gain.&rdquo;</em> The important thing is not to be a conformist. Most people who criticize me when I say these things start from the wrong premise: they separate what is work from what isn&rsquo;t. That person <strong>already is</strong> a conformist: they&rsquo;ve already accepted that their job is something they don&rsquo;t want to take home. And I&rsquo;m not talking about taking paperwork home to do at midnight. I mean the journey, the mindset, the thinking, the reflection. What&rsquo;s the right balance? Each person knows their own.</p>
<h2>Outliers<span class="hx:absolute hx:-mt-20" id="outliers"></span>
    <a href="#outliers" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>As Malcolm Gladwell tells it in his recent <a href="http://www.amazon.com/Outliers-Story-Success-Malcolm-Gladwell/dp/0316017922"target="_blank" rel="noopener">Outliers</a>, the Beatles went to Hamburg five times between 1960 and 1962. They played eight hours a night, seven days a week, trying to win over an audience that didn&rsquo;t speak their language and was more interested in the strippers. That was 270 nights in Hamburg. When &ldquo;I Want to Hold Your Hand&rdquo; finally broke in America in January 1964, the Beatles had already performed some 1,200 times. That&rsquo;s far more experience than most new artists accumulate in a lifetime.</p>
<p>You don&rsquo;t need to become the Beatles; that&rsquo;s nearly impossible. Nor a Bill Gates, a Steve Jobs, a Ray Kroc, a Henry Ford. It makes no sense to try to imitate them, follow their footsteps, take the same courses, do the same things, wear the same clothes. It&rsquo;s futile and it gets you nowhere: a biography comes nowhere near being a recipe for success. You need to absorb what drove them to the journey, not what they did during it.</p>
<p><a href="http://en.wikipedia.org/wiki/Ray_Kroc"target="_blank" rel="noopener"><img src="http://s3.amazonaws.com/akitaonrails/assets/2009/4/17/0427_18innova.jpg_original.jpeg" alt=""  loading="lazy" /></a></p>
<p>What they all have in common is talent, <strong>a lot of hard work</strong>, and a lot of experience. Mozart started composing at six, but it was only after his twenties that he finally composed a work of art: more than ten thousand hours of practice later.</p>
<p>So I return to the question: <em>&ldquo;Is college worth it?&rdquo;</em> Certainly, if it&rsquo;s a good college, with the intent of sharpening what you know and learning more. Very much worth it, as long as you understand that college is only a fraction of your journey of at least ten years of learning before you can finally say you know something.</p>
<p>My journey in computing began timidly in 1986 and picked up steam from 1989. My &ldquo;formal&rdquo; résumé starts around 1997. I&rsquo;m still very much a novice in many areas I&rsquo;d like to know more about. My journey has barely begun. Don&rsquo;t think yours is already over.</p>
<h2>Do You Need a College?<span class="hx:absolute hx:-mt-20" id="do-you-need-a-college"></span>
    <a href="#do-you-need-a-college" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>After all of that, you don&rsquo;t expect an easy answer, do you? :-)</p>
<p>To be mediocre, by definition doing what everyone else does, yes: you&rsquo;ll definitely need a college, any college, grab your diploma, and be just another one in a crowd of millions. Good luck, you&rsquo;ll need it.</p>
<p>To be above average, the only path worth taking, it depends. If you think you can learn everything on your own, that works too. I know several cases like that, of extraordinary people who never went to college (or went to a bad one, just for appearances, without letting it influence them) and who know every aspect of the field. Understand: knowledge is not a secret. There&rsquo;s nothing you&rsquo;ll only see after opening some secret door inside a college. All the information is out there. It&rsquo;s up to you to decide whether you&rsquo;ll go after all of it on your own. If you don&rsquo;t think you will, go to college, but a decent one, not one of these disposable commercial operations on every corner. I think it&rsquo;s worth it.</p>
<p>But if the question you really wanted to ask was <em>&ldquo;Is college decisive for a successful career?&rdquo;</em>, then the answer is no. Success depends solely and exclusively on the individual. If you succeed, the credit is all yours; if you fail, the blame belongs to no one else either. And once more, for the cynics (whom for some reason I suspect are intelligent and love pulling things out of context): no, nothing I said here is new. I&rsquo;m just repeating what should already be common sense.</p>
]]></content:encoded><category>career</category><category>learning</category><category>off-topic</category></item><item><title>Off-Topic: The Power of Myth, Redux</title><link>https://akitaonrails.github.io/en/2008/09/20/off-topic-o-poder-do-mito-redux/</link><guid isPermaLink="true">https://akitaonrails.github.io/en/2008/09/20/off-topic-o-poder-do-mito-redux/</guid><pubDate>Sat, 20 Sep 2008 05:56:00 -0300</pubDate><description>&lt;p&gt;&lt;a href="http://web.archive.org/web/20090216184030/http://locaweb.com.br:80/railssummit/"target="_blank" rel="noopener"&gt;&lt;img src="http://s3.amazonaws.com/akitaonrails/assets/2008/8/1/468x60.gif" alt="" loading="lazy" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In recent &lt;a href="http://web.archive.org/web/20231004031021/https://www.akitaonrails.com/2008/9/13/off-topic-matando-a-m-dia"target="_blank" rel="noopener"&gt;posts&lt;/a&gt; I explained why &amp;ldquo;mediocre&amp;rdquo; thinking is a problem and why there is no such thing as &amp;ldquo;average&amp;rdquo; in the real world.&lt;/p&gt;
&lt;p&gt;Some readers already asked me for book recommendations, and I dropped a few important ones in recent posts. &lt;a href="http://web.archive.org/web/20080915035007/http://www.submarino.com.br/books_productdetails.asp?Query=ProductPage&amp;amp;ProdTypeId=1&amp;amp;CatId=11682&amp;amp;ProdId=21389447&amp;amp;ST=BV11682"target="_blank" rel="noopener"&gt;The Black Swan&lt;/a&gt; is at the top of the list. It explains how we ignore &amp;ldquo;black swans&amp;rdquo; and why trying to predict the long-term future from past events is an exercise in futility. The core point: we instinctively &amp;ldquo;reduce&amp;rdquo; and &amp;ldquo;simplify&amp;rdquo; everything to make it digestible, and that is a problem.&lt;/p&gt;</description><content:encoded><![CDATA[<p><a href="http://web.archive.org/web/20090216184030/http://locaweb.com.br:80/railssummit/"target="_blank" rel="noopener"><img src="http://s3.amazonaws.com/akitaonrails/assets/2008/8/1/468x60.gif" alt=""  loading="lazy" /></a></p>
<p>In recent <a href="http://web.archive.org/web/20231004031021/https://www.akitaonrails.com/2008/9/13/off-topic-matando-a-m-dia"target="_blank" rel="noopener">posts</a> I explained why &ldquo;mediocre&rdquo; thinking is a problem and why there is no such thing as &ldquo;average&rdquo; in the real world.</p>
<p>Some readers already asked me for book recommendations, and I dropped a few important ones in recent posts. <a href="http://web.archive.org/web/20080915035007/http://www.submarino.com.br/books_productdetails.asp?Query=ProductPage&amp;ProdTypeId=1&amp;CatId=11682&amp;ProdId=21389447&amp;ST=BV11682"target="_blank" rel="noopener">The Black Swan</a> is at the top of the list. It explains how we ignore &ldquo;black swans&rdquo; and why trying to predict the long-term future from past events is an exercise in futility. The core point: we instinctively &ldquo;reduce&rdquo; and &ldquo;simplify&rdquo; everything to make it digestible, and that is a problem.</p>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2008/9/21/Picture_1.png" alt=""  loading="lazy" /></p>
<p>Now I want to explain how the modern hero has trivialized the great myths.</p>
<h2>Modern Heroes<span class="hx:absolute hx:-mt-20" id="modern-heroes"></span>
    <a href="#modern-heroes" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p><img src="http://s3.amazonaws.com/akitaonrails/assets/2008/9/20/51319.jpg" alt=""  loading="lazy" /></p>
<p>Another book I recommend, not directly related to the subject, is <a href="http://web.archive.org/web/20060308022045/http://www.submarino.com.br/books_productdetails.asp?Query=ProductPage&amp;ProdTypeId=1&amp;ProdId=51319&amp;ST=SE"target="_blank" rel="noopener">The Power of Myth</a> by the great Joseph Campbell. It&rsquo;s a fantastic book and it describes, among other things, the <strong>Hero&rsquo;s Journey</strong>. Every civilization had its myths, populated with heroic figures.</p>
<p>The short version: the <strong>Hero&rsquo;s Journey</strong> starts with someone just like most of us, at the &ldquo;average&rdquo; or below it. The road is packed with danger, temptation, and trials. In the end the hero completes the journey and returns to preach what he learned. It&rsquo;s one reason myths like Buddha&rsquo;s or Jesus&rsquo; are still told today: they are heroic allegories baked into every culture.</p>
<p>Every Star Wars fan knows George Lucas is a Campbell disciple. Luke Skywalker&rsquo;s story is the hero&rsquo;s tale beat for beat: a poor kid from the backwaters of Tatooine faces trials and the temptations of the Dark Side of the Force until he transcends himself and returns to his people as a hero. It&rsquo;s one reason Star Wars is a classic to this day.</p>
<p>The modern world still has its heroic stories. These days some of the heroes are successful businessmen: Steve Jobs, Jack Welch, Henry Ford, and many others.</p>
<p>We all like having these &ldquo;heroes&rdquo;. Their stories inspire us and, as a side effect, sell mountains of books and merchandise, like courses and certifications.</p>
<p>Today&rsquo;s self-help is a poor man&rsquo;s version of ancient mythology. And in this market bent on manufacturing the next heroes, pitiful copies fight over the spot of the next Perseus.</p>
<h2>Charlatans<span class="hx:absolute hx:-mt-20" id="charlatans"></span>
    <a href="#charlatans" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>All this hero talk was the setup for the point that matters: how easily charlatans fool us, and how to break the cycle.</p>
<p>Ask Campbell, but the need for heroes to model ourselves on is probably in our nature. Nothing wrong with that: the names I mentioned above are reasonably worthy of the &ldquo;modern hero&rdquo; title.</p>
<p>The problem is the charlatans selling themselves as heroes, and plenty of them pull it off. Today&rsquo;s &ldquo;Leader&rdquo; is yesterday&rsquo;s &ldquo;Hero&rdquo;. I searched for &ldquo;leader&rdquo; on Submarino&rsquo;s site and the results alone show the size of the gold rush: a flood of books on the same theme, <em>&ldquo;How to become a leader&rdquo;</em>. Probably the best-selling category in corporate self-help.</p>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2008/9/20/51JSQ66A63L.jpg" alt=""  loading="lazy" /></p>
<p>First things first: self-help is a giant exercise in futility. If you can avoid it, avoid it, because almost all of it is a waste of time. Publishers were never good filters, so there will always be a mountain of worthless books. The job is separating the wheat from the chaff.</p>
<p>Plenty of people say you should read a lot of books, and they&rsquo;re right. They just forget to add that not every book counts. Reading bad books makes you dumber; if those were the only books around, I&rsquo;d tell you to stop reading. Remember Pareto: maybe 20% of all books are worth anything.</p>
<p>A book titled <em>&ldquo;How to Be&hellip;&rdquo;</em>? Skip it, waste of time. To see why, ask the most obvious question: did any of history&rsquo;s great leaders need a self-help book, course, or lecture to become memorable? Can you picture John Kennedy, Martin Luther King, or Abraham Lincoln reading <em>&ldquo;How to Become a Leader&rdquo;</em> backstage? Hardly.</p>
<p>Now the second question: how many people around you actually became good leaders because of that material? I&rsquo;ll go further: there are dozens of project management &ldquo;methodologies&rdquo; promising miracles, and everyone buys in.</p>
<h2>The Great Fallacy<span class="hx:absolute hx:-mt-20" id="the-great-fallacy"></span>
    <a href="#the-great-fallacy" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>The logic goes like this: you apply the technique or methodology and, if the project succeeds, the method gets all the credit. <em>&ldquo;Of course it worked, thanks to the revolutionary methodology.&rdquo;</em></p>
<p>If the project fails, it&rsquo;s your fault, because you obviously didn&rsquo;t follow the methodology properly. Had you followed it, everything would have worked!</p>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2008/9/20/Dilbert_10-26-07_smaller.gif" alt=""  loading="lazy" /></p>
<p>See the absurdity? All those management, leadership, and results books and courses hide this exact trick: they list dozens of people and companies that benefited from their &ldquo;techniques&rdquo;. I&rsquo;d bet those projects succeeded because of the quality of the teams, the <strong>people</strong> who executed them. The methodology only showed up afterwards to take the credit.</p>
<p>These were teams full of people able to route around every obstacle, who subverted the &ldquo;methodology&rdquo; until they hit the goal. They would have gotten there with or without the recipe, and probably sooner without the magic-formula baggage.</p>
<p>I personally like the <a href="http://agilemanifesto.org/"target="_blank" rel="noopener">Agile philosophy</a>. Many people prefer to say Agile &ldquo;methodologies&rdquo;, but I prefer &ldquo;philosophy&rdquo;. Methodology implies a systematic recipe you can repeat in any scenario, which isn&rsquo;t true. If the team lacks awareness and discipline in the philosophy, you can implement the techniques all you want and the project will never be truly Agile. Writing on sticky notes, slapping them on the wall, and timing 15-minute meetings doesn&rsquo;t make any company agile.</p>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2008/9/20/dilbert98071208557.gif" alt=""  loading="lazy" /></p>
<p>In the modern age we think we&rsquo;re smarter, sharper. Are we? We chase the heroes who beat the odds and, as Nassim Taleb would say, we want to take their experience and their recipes and apply them to our own projects. In other words, we plan our future based on the past success of the people we call heroes.</p>
<p>Worse, we still &ldquo;adapt&rdquo; those recipes, convinced we know better. Take the reputation of the so-called &ldquo;Waterfall process&rdquo;, the staircase process, considered one of the worst ever created for software development.</p>
<p>Waterfall was described in the paper <a href="http://web.archive.org/web/20250913023017/https://leadinganswers.typepad.com/leading_answers/files/original_waterfall_paper_winston_royce.pdf"target="_blank" rel="noopener">Managing the Development of Large Software Systems</a>, from 1970, by Winston Royce. That&rsquo;s the paper with the famous staircase diagram. What few people know is that Royce himself wrote in it: <em>&quot;&hellip;the implementation described above is risky and invites failure.&quot;</em> He already proposed running the process at least twice, which means he knew it would evolve into something iterative.</p>
<p>We love leaning on past successful projects, on masters and scholars with magic solutions. The vast majority simply doesn&rsquo;t do the homework and falls for the fairy tale like naive kids.</p>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2008/9/20/Picture_1.png" alt=""  loading="lazy" /></p>
<p>Here&rsquo;s another thing almost nobody questions: has anyone empirically checked how many of these training-formed managers go on to have consistently successful careers? I never met one. I also never saw a single credible number on it, from a credible institution, in any relevant independent study.</p>
<h2>Manufacturing Managers<span class="hx:absolute hx:-mt-20" id="manufacturing-managers"></span>
    <a href="#manufacturing-managers" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>I&rsquo;ve sat through every kind of lecture and course on managing projects, dealing with people, being a leader. In a Gaussian world, where the whole educational system incentivizes the average, students hit the job market and suddenly there&rsquo;s a shortage of people above average.</p>
<p>Of course there is. We raise people in a paternalistic, protectionist way, the worst way to raise anyone. In school we only study what we&rsquo;re handed, only do the homework we&rsquo;re assigned, only study to scrape a passing grade. We&rsquo;re so used to taking orders that the outcome is plain for everyone to see: excellent factory workers, few thinking professionals, and very few great leaders.</p>
<p>I like to say that <em>&ldquo;leaders aren&rsquo;t formed, leaders form themselves.&rdquo;</em> The way to encourage future leaders, starting in childhood, is to rip out the average mindset and raise them in a <strong>meritocratic</strong> environment: one where merit gets rewarded far more than mediocrity. And when I say &ldquo;far more&rdquo;, I mean absolutely unequal.</p>
<p>A democratic, evolving civilization was never about forcing equality, artificially lifting the weak and dragging down the strong until everyone lands on the average. &ldquo;Equality&rdquo; simply means nobody will stop you from rising above the average. Most people confuse that with making everyone the same.</p>
<p>The correct solution is the opposite: keep a high level of inequality based on merit. That&rsquo;s how the real world works: the successful are orders of magnitude wealthier than those who barely try. Wealth in capital, but also in recognition and influence.</p>
<p>Companies keep doing the opposite: they rerun the grade-school playbook, stick employees in a classroom, and expect great leaders to walk out.</p>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2008/9/20/DilbertLeadership.gif" alt=""  loading="lazy" /></p>
<p>I know how this works: I&rsquo;m a PMP-certified Project Manager, certified by the <a href="http://www.pmi.org/"target="_blank" rel="noopener">PMI</a>, the &ldquo;renowned&rdquo; Project Management Institute. And I&rsquo;ll say it out loud: it&rsquo;s one more of the great corporate lies so common these days.</p>
<p>It works like this: you&rsquo;re required to sit through 2 or 3 months of classes to learn the &ldquo;trade&rdquo; of being a manager. You learn to break a project into a WBS, build a Gantt chart, calculate slacks, draw a project chart, analyze risks (in Gaussian fashion!), and so on.</p>
<p>You get a workbook, you do homework every week, just like grade school. At the end comes the &ldquo;entrance exam&rdquo;: the certification test, 200 questions. Beat the cut score, barely more than half, and you get a handsome PMP diploma, a lapel pin, a signature template for your business card, and the right to sign your emails &ldquo;Fabio Akita, PMP&rdquo;.</p>
<p>Does any of that make you a better manager? If you were truly awful, at least you climb out of absolute awfulness and land near the average. Don&rsquo;t be too proud of that.</p>
<p>But does it create good managers? Absolutely not. At best it proves you can read well enough to get slightly more than half the questions right in 4 hours, which proves exactly nothing. After the brainwashing and the rote memorization, anyone gets good at passing tests. Anyone who survived a cram school knows: a management course is the same deal.</p>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2008/9/20/pmp_1.jpg" alt=""  loading="lazy" /></p>
<p>I&rsquo;ve met many project managers, more than I&rsquo;d like, who are notoriously terrible. And they passed the PMP exam! When you get certified you&rsquo;re happy, of course, I was. But if you&rsquo;re smart, you start feeling embarrassed about the title once you see the other bad PMPs out there. That&rsquo;s when I stopped using mine, even after a process that cost me around R$ 5,000 (a piece of paper doesn&rsquo;t come cheap), plus dozens of hours of mock exams.</p>
<p>Oh, and we become Leaders with an expiration date. Mine expires in 2009&hellip;</p>
<h2>Manufacturing Leaders<span class="hx:absolute hx:-mt-20" id="manufacturing-leaders"></span>
    <a href="#manufacturing-leaders" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>Anyway, if your resume is weak and you know you can&rsquo;t deliver, go ahead and get certified in as many things as possible. The certification market exists because people never learned in school how to actually learn.</p>
<p>Everyone only learned to study what they&rsquo;re handed and to pass the test, at the average. I&rsquo;ve met few truly <strong>self-taught</strong> people with real street smarts. Those are exactly the ones who couldn&rsquo;t care less about certifications. A very smart acquaintance of mine, one I unfortunately had little contact with, put it to me straight: &ldquo;good people don&rsquo;t get manufactured.&rdquo; Indeed.</p>
<p>And by the way, acing a test and being intelligent are two very different things. You can get perfect scores across the board and still be far from smart. I&rsquo;ve known plenty of straight-A nerds who turned into slightly-better-than-average factory workers.</p>
<p>Our concept of the hero has changed a lot. For me, the Hero figure was always a strong influence on how I act: outliers who single-handedly went from zero to empire. I always admired the great Renaissance artists, like Leonardo da Vinci, who broke barriers as a painter, sculptor, inventor, philosopher, anatomist, physicist, and mathematician. And other giants like Thomas Edison, Benjamin Franklin, Carl Sagan, Stephen Hawking, and Charles Babbage, all of whom I met reading encyclopedias in junior high. Yes, encyclopedias were not made to be decoration.</p>
<p>Luckily, my upbringing always pushed me past the average. If I came home with a 9, my mother would say: <em>&ldquo;the test goes up to 10; if you&rsquo;re missing 1 point, you didn&rsquo;t try hard enough.&rdquo;</em> If I got a 5, the average, I was grounded. My father, for his part, always prized self-knowledge: he bought books and science magazines, and once gave me a world globe for my birthday.</p>
<p>You&rsquo;re a company and you want to grow great leaders? Put big challenges in their hands, push them to the limit, squeeze out everything they have. Be a tyrant without being a dictator. Demand perfection, and know how far each person can go. Only those who overcome extraordinary obstacles are extraordinary people. Leaders are Heroes, by definition!</p>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2008/9/20/the-office-spoilers.jpg" alt=""  loading="lazy" /></p>
<p>Now, you don&rsquo;t earn &ldquo;leader&rdquo; from a job title. Subordinates&rsquo; respect through sheer hierarchy is worth nothing, zip, zero. A structure where the only form of command is the old &ldquo;chain of command&rdquo;, where the subordinate obeys because his job depends on it, is a company extracting a tiny fraction of what it could. That&rsquo;s why I&rsquo;m against hierarchical organizations. As I mentioned in the other post, hierarchies are one more Gaussian form of control through the average, and it doesn&rsquo;t work. Insisting on the mistake only makes everything more wrong.</p>
<h2>The Death of Heroes<span class="hx:absolute hx:-mt-20" id="the-death-of-heroes"></span>
    <a href="#the-death-of-heroes" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>Here is the problem with Gaussian thinking: in a world that incentivizes the average, there&rsquo;s little room left for Heroes. By that logic, the heroes who do exist are &ldquo;accidents&rdquo;: Gaussian probability says the odds of a hero appearing are so small they&rsquo;re nearly zero, something no &ldquo;normal&rdquo; person could ever reach. Not even worth considering. The &ldquo;safe&rdquo; move is staying at the average.</p>
<p>Except heroes exist, and new ones show up every day. Open Forbes and look at the list of the world&rsquo;s richest people. Take the top 500: the last name on that list is already infinitely richer than any of us. Stretch it to the 10,000 richest and the last one is still far richer than anyone you&rsquo;ve ever met. Keep going down and you realize there are thousands of small heroes: people who left the &ldquo;normal&rdquo; path and won. And not only in money.</p>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2008/9/20/leadership.gif" alt=""  loading="lazy" /></p>
<p>There&rsquo;s another problem in the world of the average: plenty of people know the &ldquo;trick&rdquo;. People would even like to be heroes, but it&rsquo;s work. Everyone knows the hero&rsquo;s path takes a monumental, highly risky effort: the middle of the Journey is packed with trials, dangers, and the devil&rsquo;s temptations. Nobody likes suffering for an uncertain future. People are naturally short-term thinkers; they love to &ldquo;say&rdquo; they plan for the future, but that&rsquo;s just rhetoric.</p>
<p>And the people who know this trick best are precisely the ones who invent the magic recipes, the methodologies, the step-by-step procedures for becoming a hero in 24 hours, no sweat, no effort, no risk. For a small fee and a few hours of your day, anyone becomes a hero, certificate included! Companies hire these fast-food heroes, hand them command positions, and subordinates obey through the sheer force of the title. Could it get any easier?</p>
<p>As I said, there&rsquo;s no empirical data proving these methods work. Companies simply &ldquo;believe&rdquo; they do. The trainers&rsquo; pedigree looks good, other companies swear by it, the references are great. Why doubt it?</p>
<p>![](<a href="http://s3.amazonaws.com/akitaonrails/assets/2008/9/20/the_office_nbc_image"target="_blank" rel="noopener">http://s3.amazonaws.com/akitaonrails/assets/2008/9/20/the_office_nbc_image</a> <strong>3</strong>_ medium_.jpg)</p>
<p>Everyone falls for the <strong>fallacy</strong> of showcasing only the projects that succeeded, where the people did the heavy lifting, and &ldquo;forgetting&rdquo; to list the ones that applied the methodology and sank.</p>
<p>It sounds so smart when the trainer says: <em>&ldquo;as a Leader, you need to motivate your team.&rdquo;</em> He just forgets to explain, step by step, how you actually &ldquo;motivate&rdquo; someone. Of course nobody explains it. Worse: as Taleb describes, people get reduced to <strong>stereotypes</strong> and roles, inanimate puppets that, according to the magic recipe, are predictable and easy to control. Just &ldquo;motivate&rdquo;, just &ldquo;incentivize&rdquo;, just &ldquo;be communicative&rdquo;. Building attractive, empty rhetoric is easy. Actually leading a project to success is hard.</p>
<p>An acquaintance of mine used to say: <em>&ldquo;He who can, does. He who cannot, teaches.&rdquo;</em></p>
<p>And according to Pareto, that&rsquo;s normal. At least 80% of the population, companies, and professionals will think this way. Great news for the other 20%: less competition.</p>
<p>The world was not made to be fair or equal. The real world is, by nature, highly <strong>unfair</strong> and unequal. In it, true heroes are battle-scarred, thick-skinned from taking so many hits, and they rise solely and exclusively through their own effort. The real world runs on meritocracy. Many will fool themselves for a while, thinking they&rsquo;ve found a place that will stay stable and equal forever, but that period is temporary and doomed to disappear, replaced by a merit-based system that will crush them without mercy. Most people are terrified of that, terrified of losing their comfort zone.</p>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2008/9/20/dilbert-17-04-2004.gif" alt=""  loading="lazy" /></p>
<p>All these cake recipes dressed up as self-help, masquerading as serious courses, are cheap mythology in homeopathic doses. I won&rsquo;t describe them as anything more than what they really are. They all come loaded with &ldquo;advice&rdquo;, and the best definition of advice I&rsquo;ve ever seen is in the famous <a href="https://www.youtube.com/watch?v=sTJ7AzBIJoI"target="_blank" rel="noopener">Sunscreen</a> video:</p>
<p><em>&ldquo;Advice is a form of nostalgia. Dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than it&rsquo;s worth.&rdquo;</em></p>
<p>Campbell&rsquo;s Heroes don&rsquo;t live in the comfort zone: leaving the common path is the hero&rsquo;s routine. The journey begins exactly when he decides to challenge what everyone else considers impossible. The hero becomes a myth when he conquers the impossible, and the impossible never yields to &ldquo;normal&rdquo; paths.</p>
<p>Myths are rare, unfortunately (or fortunately).</p>
<p><img src="http://s3.amazonaws.com/akitaonrails/assets/2008/9/20/the-office-nbc.jpg" alt=""  loading="lazy" /></p>
]]></content:encoded><category>philosophy</category><category>career</category><category>learning</category><category>off-topic</category></item><item><title>Off Topic: Why Programmers Should Play Go</title><link>https://akitaonrails.github.io/en/2008/07/15/off-topic-por-que-programadores-devem-jogar-go/</link><guid isPermaLink="true">https://akitaonrails.github.io/en/2008/07/15/off-topic-por-que-programadores-devem-jogar-go/</guid><pubDate>Tue, 15 Jul 2008 01:07:00 -0300</pubDate><description>&lt;p&gt;It&amp;rsquo;s been a while since I did a translation, but this article felt quite nostalgic to me, so I made a point of sharing it. It&amp;rsquo;s by &lt;a href="http://web.archive.org/web/20080720152831/http://railspikes.com/2008/7/14/why-programmers-should-play-go"target="_blank" rel="noopener"&gt;Jon Dahl&lt;/a&gt; from the &lt;strong&gt;RailSpikes&lt;/strong&gt; blog. Read my &lt;a href="#akitas-notes"&gt;notes&lt;/a&gt; at the end. Here it is:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://flickr.com/photos/andres-colmen/2539473895/"target="_blank" rel="noopener"&gt;&lt;img src="http://s3.amazonaws.com/akitaonrails/assets/2008/7/15/2539473895_47418f2049.jpg" alt="" loading="lazy" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://en.wikipedia.org/wiki/Go_%28board_game%29"target="_blank" rel="noopener"&gt;Go&lt;/a&gt; is an ancient strategy game with simple rules and a profound degree of complexity.&lt;/p&gt;
&lt;p&gt;Software development is the art of managing complexity using a limited number of rules, structures, and patterns.&lt;/p&gt;</description><content:encoded><![CDATA[<p>It&rsquo;s been a while since I did a translation, but this article felt quite nostalgic to me, so I made a point of sharing it. It&rsquo;s by <a href="http://web.archive.org/web/20080720152831/http://railspikes.com/2008/7/14/why-programmers-should-play-go"target="_blank" rel="noopener">Jon Dahl</a> from the <strong>RailSpikes</strong> blog. Read my <a href="#akitas-notes">notes</a> at the end. Here it is:</p>
<p><a href="http://flickr.com/photos/andres-colmen/2539473895/"target="_blank" rel="noopener"><img src="http://s3.amazonaws.com/akitaonrails/assets/2008/7/15/2539473895_47418f2049.jpg" alt=""  loading="lazy" /></a></p>
<p><a href="http://en.wikipedia.org/wiki/Go_%28board_game%29"target="_blank" rel="noopener">Go</a> is an ancient strategy game with simple rules and a profound degree of complexity.</p>
<p>Software development is the art of managing complexity using a limited number of rules, structures, and patterns.</p>
<p>Programmers should play Go.</p>
<h3>Go in 2<sup>8</sup> words or less<span class="hx:absolute hx:-mt-20" id="go-in-28-words-or-less"></span>
    <a href="#go-in-28-words-or-less" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p>The beauty of Go is its combination of simplicity and complexity. On the one hand, go has only a handful of rules. Place stones, don&rsquo;t get completely surrounded, control territory. Like chess, the mechanics can be picked up in a few minutes, though Go only has a single type of &ldquo;move&rdquo;, and only one edge case (the <a href="http://en.wikipedia.org/wiki/Rules_of_Go#Ko_.28no_repetition_of_the_same_shape.29"target="_blank" rel="noopener">ko</a> rule). And like chess, one can spend a lifetime discovering the strategic and tactical layers of the game.</p>
<p>While chess is quite complex and rich, such that it took a 30-node supercomputer to defeat the reining chess champion, no computer comes close to defeating even a skilled amateur Go player. There are 361 positions on a Go board, and with two players, there are 2.08168199382×10<sup>170</sup> valid positions. That&rsquo;s quite a bit bigger than a <a href="http://en.wikipedia.org/wiki/Googol"target="_blank" rel="noopener">googol</a> (yes, that is the correct spelling). Realistically, there are something on the order of 10<sup>400</sup> possible ways that a typical game could play out. And the number of possible moves roughly follows 361!, which means that only 20 moves in, there are many googols of possible ways that the game could shake down. (As a fun exercise, try plugging 361! into an online <a href="http://web.archive.org/web/20240416232143/https://www.cs.uml.edu/~ytran/factorial.html"target="_blank" rel="noopener">factorial calculator</a>.)</p>
<h3>Managing complexity<span class="hx:absolute hx:-mt-20" id="managing-complexity"></span>
    <a href="#managing-complexity" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p>So how does one play Go, given this near-infinite complexity? On a tactical level, a player approaches Go like chess, thinking several moves ahead. But this only works in small spaces, like a tight battle in a small sector of the board. Beyond there, there are just too many possibilities. So on a strategic level, a player must think in <a href="http://en.wikipedia.org/wiki/Shape_%28Go%29"target="_blank" rel="noopener">shapes</a> or patterns. These shapes provide shorthand ways of managing the complexity of Go. As a non-master, I may have no idea how things will proceed in one sector of the board, but I may be able to recognize strong and weak patterns of stones, vulnerable shapes and effective formations.</p>
<p>But there&rsquo;s more: Go has several sorts of patterns. Beyond shapes, there are <a href="http://senseis.xmp.net/?GoProverbs"target="_blank" rel="noopener">Go proverbs</a>. These can be general: <em>&ldquo;Your opponent&rsquo;s good move is your good move&rdquo;</em>; specific: <em>&ldquo;Don&rsquo;t try to cut the one-point jump&rdquo;</em>; funny: <em>&ldquo;Even a moron connects against a peep&rdquo;</em>; and meta: <em>&ldquo;Don&rsquo;t follow proverbs blindly.&rdquo;</em> These proverbs are principles which help a player make good decisions. They are less specific than shapes, and so they provide guidelines for whatever situations may arise on the Go board. Proverbs often conflict, and a player must determine when and how to apply them.</p>
<p>Finally, there are <a href="http://en.wikipedia.org/wiki/Joseki"target="_blank" rel="noopener">joseki</a>. Joseki are patterns of play that are considered even for both sides. They typically happen in the corners of the board, and typically at the beginning of the game. Interestingly, there is a Go proverb that says <em>&ldquo;Learning joeski costs two stones,&rdquo;</em> meaning that memorizing these patterns isn&rsquo;t helpful. Instead, a player should learn <em>from</em> joseki by understanding what is going on in each move.</p>
<h3>Patterns in Go, patterns in software design<span class="hx:absolute hx:-mt-20" id="patterns-in-go-patterns-in-software-design"></span>
    <a href="#patterns-in-go-patterns-in-software-design" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p>Each of these Go patterns has a rough programming analogue.</p>
<p>Shapes in Go aren&rsquo;t unlike software <a href="http://c2.com/cgi/wiki?DesignPatterns"target="_blank" rel="noopener">design patterns</a>. While there is nothing preventing you from placing logic in your views, this shape is <a href="http://www.vimeo.com/1050804"target="_blank" rel="noopener">recognized</a> to be a weak one. Think of Gang-of-Four design patterns: the MVC, Adapter, and Factory patterns are recognized to be helpful in some circumstances (and not appropriate in others). On a lower level, iteration and recursion have commonly recognized shapes, as do database normalization vs. denormalization. Even if you can&rsquo;t hold an entire program or algorithm in your head at once, recognizing common shapes helps you to understand what is going on.</p>
<p>Go proverbs are like another type of pattern in software: CapitalizedPrinciples (for lack of a better term) made popular by Extreme Programming. Think DontRepeatYourself, YouArentGonnaNeedIt, CollectiveCodeOwnership, DailyBuild, TestFirst. These aren&rsquo;t specific code &ldquo;shapes&rdquo;, like a singleton class – they are general principles that guide the practice of programming.</p>
<p>Because joseki is about exchange between competing parties, its programming parallel is a little less clear. The closest comparison, in my mind, is programming exercises. <a href="http://binstock.blogspot.com/2008/04/perfecting-oos-small-classes-and-short.html"target="_blank" rel="noopener">This article</a>, for instance, suggests 9 exercises to help you become a better OO programmer, like:</p>
<ul>
<li>Use only one dot per line</li>
<li>Use only one level of indentation per method</li>
<li>Don&rsquo;t use setters, getters, or properties</li>
</ul>
<p>In a real-world program, you&rsquo;re unlikely to stick to these principles 100% of the time. But forcing yourself to write code in this way can be an eye-opening experience and can make you a better developer.</p>
<h3>So what can Go really do for you?<span class="hx:absolute hx:-mt-20" id="so-what-can-go-really-do-for-you"></span>
    <a href="#so-what-can-go-really-do-for-you" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p>Obviously, these parallels are structural. Specific Go proverbs (&ldquo;Your opponent&rsquo;s good move is your good move&rdquo;) may not have direct relevance to software development. So can Go really make you a better developer?</p>
<p>I think it can, and I&rsquo;ll go one further. I think Go can make you smarter. There is a lot of anecdotal evidence to this effect <a href="http://web.archive.org/web/20170616121831/http://www.godiscussions.com/forum/archive/index.php/t-6061.html"target="_blank" rel="noopener"><sup class="footnote" id="fnr1"><a href="#fn1">1</a></sup></a>, <a href="http://news.ycombinator.com/item?id=133178"target="_blank" rel="noopener"><sup class="footnote" id="fnr2"><a href="#fn2">2</a></sup></a>, <a href="http://news.ycombinator.com/item?id=228356"target="_blank" rel="noopener"><sup class="footnote" id="fnr3"><a href="#fn3">3</a></sup></a>, for example, <a href="http://www.china.org.cn/english/features/Archaeology/131298.htm"target="_blank" rel="noopener"><sup class="footnote" id="fnr4"><a href="#fn4">4</a></sup></a>:</p>
<blockquote>
  <p>In fact, all of our minds can benefit from playing Go, which officially has the capacity to make you smarter. Research has shown that that children who play Go have the potential for greater intelligence, since it motivates both the right and left sides of the brain.</p>

</blockquote>
<p>The research mentioned isn&rsquo;t footnoted, unfortunately, so take statements like this with a grain of salt.</p>
<p>But it makes sense: like chess, Go requires pattern recognition, a mix of strategic and tactical thinking, and comprehension of complex structures, though in Go the patterns are larger and the complexity is greater. A mind trained to think in these ways is going to have an easier time attacking similar problems in other spheres.</p>
<p>Like software development.</p>
<h3>Akita&rsquo;s Notes<span class="hx:absolute hx:-mt-20" id="akitas-notes"></span>
    <a href="#akitas-notes" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p>I&rsquo;ve liked Go for a long time. As someone of Japanese descent, of course I&rsquo;d been exposed to Go, Shogi, and other oriental games. But, like any good westernized Japanese, I paid very little attention to them. Because of this, today I know no more than the basic rules and philosophies behind Go.</p>
<p>My interest was particularly renewed when I read the <a href="http://en.wikipedia.org/wiki/Hikaru_no_Go"target="_blank" rel="noopener">Hikaru no Go</a> series, which is an entire story built around Go, and one of my favorite series, by the way. I even bought a Go board and some joseki books, but didn&rsquo;t get very far. These days I just peek at online games on the <a href="https://pandanet-igs.com/"target="_blank" rel="noopener">IGS</a> servers.</p>
<p><a href="http://web.archive.org/web/20080725154909/http://www.onemanga.com/Hikaru_no_Go/"target="_blank" rel="noopener"><img src="http://s3.amazonaws.com/akitaonrails/assets/2008/7/15/1hikaru800.jpg" alt=""  loading="lazy" /></a></p>
<p>I don&rsquo;t remember where I read this, but someone once mentioned something interesting: chess is primarily a game of destruction. Go is essentially a game of conquest and expansion. Not literally true, but there are nuances in Go that bring this to mind.</p>
<p>And in the parallel to software development, design patterns aren&rsquo;t just structures you copy and paste wherever you &ldquo;think&rdquo; they&rsquo;re needed. A handful of design patterns doesn&rsquo;t make good software.</p>
<p>What Jon was getting at makes a lot of sense. Just like a Go player, a software developer needs to be an artist. Playing is a creative activity. Strategy is a creative activity. Given a set of constraints, what&rsquo;s the best path forward?</p>
<p>More than that: the only way to learn Go is by playing, hundreds of thousands of times over many, many years. Go professionals are formed around age 10 and climb from there into old age. The only way to learn is by failing, failing, and failing again. Which circles back to what Ryan said about <a href="/2008/06/14/machucando-c-digo-por-divers-o-e-lucro/">Hurting Code</a>.</p>
<p>Refactoring is something similar to this: conquest and expansion. Only a good developer understands the real reasons for refactoring. Nobody refactors because someone told them to, just as an artist doesn&rsquo;t make a certain stroke because someone told them to.</p>
<p>A good developer values the form and philosophy of what is being built. Acronyms, brands, and fashionable names say nothing to them.</p>
<p>There&rsquo;s a lack of eastern philosophy in today&rsquo;s programmers. Being a brick-stacking coder is very easy: any grunt can do it. But reaching the <a href="http://en.wikipedia.org/wiki/Go_ranks_and_ratings"target="_blank" rel="noopener">10th dan</a> of programming is only for those who have put in the work in the art.</p>
]]></content:encoded><category>learning</category><category>programming</category><category>gaming</category><category>off-topic</category></item></channel></rss>