Jekyll2021-08-22T17:27:22+00:00http://worksonmylocal.dev/feed.xmlWorks on my localMade with <b style="color: #f45;"><3</b>Tonatiuh NúñezNo Excuses, Do the Work2021-08-22T00:00:00+00:002021-08-22T00:00:00+00:00http://worksonmylocal.dev/no-excuses-do-the-work<p>Hey there! In this blog post, I want to share the five lessons I learned from the book <a href="https://blackirishbooks.com/product/do-the-work/">Do the work by Steven Pressfield</a>. The things I learned from this book helped me to better approach big pieces of work and deliver more of them.</p>
<h2 id="lesson-1-resistance-is-natural">Lesson 1: Resistance is natural</h2>
<p>The resistance you feel when going out of your comfort zone is natural among humans. It is natural to feel it, for example, when you have to do things that involve some significant effort, confront some fear, work on something that doesn’t pay off immediately, or get under the spotlight.</p>
<p>That resistance gets in the middle between you and delivering that big piece of work that you want. The one you want to ship and that you know is going to be good for your career.</p>
<p>Acknowledging that such resistance is natural is a great first step towards dealing better with it. To put that resistance aside and deliver more and more often.</p>
<h2 id="lesson-2-start-before-youre-ready">Lesson 2: Start before you’re ready</h2>
<p>There is a phrase that says, “The hardest thing to do is start,” that’s pretty much what this lesson is about. I guess the idea is to acknowledge that if you’re not aware of that or keep it in mind if you already knew it (because of how important it is).</p>
<p>The natural resistance will try to persuade you from starting that big thing you want to start on. You might say something like, “Yeah, I’ll start on X. I just need to get a little better on Y, and then I’ll start.” And that’s the trap; you’ll consciously or unconsciously lookup for blockers that prevent you from starting.</p>
<p>I like how the book even lists <em>excessive research</em> among the blockers that you can set to prevent you from starting that big thing. The book says that research is not bad when done within a fixed length but when used as a never-ending activity.</p>
<p>The lesson here is that there is no perfect moment to start. The best moment to start is today.</p>
<h2 id="lesson-3-perfection-is-resistance">Lesson 3: Perfection is resistance</h2>
<p>This lesson is very related to the previous one. The search for perfection can lead to resistance when you want to start working on something or deliver that something.</p>
<p>It’s always tempting to try to achieve perfection (at whatever level you consider perfection is reached). But, that search for perfection gets in the middle of delivering the work at all or delivering it at a good phase. Even worse sometimes what’s considered perfection are things arbitrarily aesthetic (visually or technically) that don’t really benefit the final product.</p>
<p>The lesson here is to acknowledge that perfection is another way of resistance. Ego in the search of perfection can get in the middle between you and delivering those big pieces of work.</p>
<p>I know this phrase says “better done than perfect,” and I could not agree more with it. Plus, things can (and should) be improved over iterations.</p>
<h2 id="lesson-4-killer-instinct">Lesson 4: Killer instinct</h2>
<p>Delivering might not be easy. You might fear success or maybe be fear getting your work criticized by other people. It can take courage to ship the thing you’ve been working on for some time. But wrapping up and shipping is crucial for anything you’ve been working on. If not, then all the work you did was for nothing.</p>
<p>The killer instinct in terms of work is a super helpful mindset. You need to look forward to killing the monster (where the monster is the delivery of the work). You’ve worked all the way up to get to where you’re; it’s time to finish the job, kill the monster, and ship that new piece of job.</p>
<p>The key thing from this lesson is the importance of wrapping up and shipping the work. Otherwise, all the effort was for nothing.</p>
<h2 id="lesson-5-panic-is-good">Lesson 5: Panic is good</h2>
<p>OK, you already shipped the work. At that point, you might feel afraid about what people will think or say about your work. You could even feel panic about being under the spotlight. That panic is natural, and it’s actually good, is a sign that you’re thriving.</p>
<p>You feel panic because you’re going out of your comfort zone, but as with anything else, the more you repeat that activity, the better you’ll get at handling it. So the lesson here is to embrace that panic and know that it’s a green flag letting you know you are developing yourself.</p>
<h2 id="wrapping-up">Wrapping up</h2>
<p><a href="https://blackirishbooks.com/product/do-the-work/">Do the work</a> is among the materials that I most recommend to people trying to be more productive. It’s such a small and straightforward book that the time you invest reading is nothing compared to all the great things you learn from it.</p>
<p>Remember that just because you’ll look forward to shipping more doesn’t mean you should ship low-quality work. On the contrary, look for shipping often without overworking things.</p>
<p>What do you think about these lessons? Have you already read the book or plan to read it? Let me know in the comments!</p>Tonatiuh NúñezHey there! In this blog post, I want to share the five lessons I learned from the book Do the work by Steven Pressfield. The things I learned from this book helped me to better approach big pieces of work and deliver more of them.VSCode and Tmux the Perfect Match2021-06-30T00:00:00+00:002021-06-30T00:00:00+00:00http://worksonmylocal.dev/vscode-and-tmux-the-perfec-match<p>Tmux is an excellent tool for managing multiple terminal windows and a perfect match to use with the fast VSCode terminal. In this blog post, I’ll show you how I set both for an ease development process.</p>
<p>If you don’t know Tmux already, here is a super-quick <a href="https://www.youtube.com/watch?v=MGN5JcpC7e0">video intro</a>.</p>
<p>OK, let’s talk about the tips.</p>
<h2 id="easier-shortcut-for-the-terminal">Easier Shortcut for the Terminal</h2>
<p>Instead of the default keybinding that VSCode comes with to open the terminal (which is <code class="language-plaintext highlighter-rouge">ctrl+`</code>), I prefer to use <code class="language-plaintext highlighter-rouge">ctrl+,</code> just because I feel it’s easier to reach. You can set up that shortcut this way:</p>
<ol>
<li>Load the VSCode Command pallet by pressing <code class="language-plaintext highlighter-rouge">CMD + shift + p</code> if you’re on Mac or <code class="language-plaintext highlighter-rouge">ctrl + shift + p</code> if you’re on Windows or Linux.</li>
<li>Lookup for “Open Keyboard Shortcuts (JSON)” and select it.</li>
<li>In the keyboard shortcuts file, add the following:</li>
</ol>
<div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">[</span><span class="w">
</span><span class="p">{</span><span class="w">
</span><span class="nl">"key"</span><span class="p">:</span><span class="w"> </span><span class="s2">"ctrl+,"</span><span class="p">,</span><span class="w">
</span><span class="nl">"command"</span><span class="p">:</span><span class="w"> </span><span class="s2">"workbench.action.terminal.toggleTerminal"</span><span class="w">
</span><span class="p">}</span><span class="w">
</span><span class="p">]</span><span class="w">
</span></code></pre></div></div>
<h2 id="better-tmux-bar">Better Tmux Bar</h2>
<p>By default, the Tmux bar will show up at the bottom of the screen with a green background color and, in my opinion, with a layout that’s not the greatest:</p>
<p><img src="/assets/img/tmux_and_vscode/tmux_default_bar.png" alt="Tmux Default Bar" /></p>
<p>I’ve built this other Tmux bar layout that I’ve found easier to work with:</p>
<p><img src="/assets/img/tmux_and_vscode/tmux_customized_bar.png" alt="Tmux Customized Bar" /></p>
<p>You can set yours that way by:</p>
<ol>
<li><code class="language-plaintext highlighter-rouge">$ code ~/.tmux.conf</code></li>
<li>Add the following to the file’s content:</li>
</ol>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c"># Tmux Bar Config #</span>
<span class="nb">set</span> <span class="nt">-g</span> status-position top
set-option <span class="nt">-g</span> status on
set-option <span class="nt">-g</span> status-interval 1
set-option <span class="nt">-g</span> status-justify <span class="s2">"left"</span>
set-option <span class="nt">-g</span> status-left-length 60
set-option <span class="nt">-g</span> status-right-length 90
set-option <span class="nt">-g</span> status-left <span class="s2">"#(/Users/tonatiuh/.tmux.powerline/powerline.sh left)"</span>
set-option <span class="nt">-g</span> status-right <span class="s2">"#(/Users/tonatiuh/.tmux.powerline/powerline.sh right)"</span>
<span class="nb">set</span> <span class="nt">-g</span> window-status-separator <span class="s1">''</span>
set-window-option <span class="nt">-g</span> window-status-current-format <span class="s2">"#[fg=colour255, bg=colour38]| #I • #W |"</span>
set-window-option <span class="nt">-g</span> window-status-format <span class="s2">"#[fg=colour255, bg=colour30]| #I • #W |"</span>
<span class="nb">set</span> <span class="nt">-g</span> status-bg default
</code></pre></div></div>
<ol>
<li>Then reload the latest changes by pressing your Tmux prefix (by default <code class="language-plaintext highlighter-rouge">ctrl + b</code>), then press <code class="language-plaintext highlighter-rouge">:</code> and enter:</li>
</ol>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>source-file ~/.tmux.conf
</code></pre></div></div>
<h2 id="change-windows-default-settings">Change Windows Default Settings</h2>
<p>By default, Tmux does these three things that I didn’t like that much and found how to change:</p>
<ul>
<li>Sets the default directory of new windows as the user’s home directory.</li>
<li>Sets the name of windows with the name of the shell you’re using (ex. “bash”).</li>
<li>Sets the windows index to start on zero (I prefer it starts on one).</li>
</ul>
<p>If you want to change that, here is how you can do it:</p>
<ol>
<li><code class="language-plaintext highlighter-rouge">$ code ~/.tmux.conf</code></li>
<li>Add in the file:</li>
</ol>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c"># Start new windows in the current path and call them "shell"</span>
<span class="nb">bind </span>c new-window <span class="nt">-c</span> <span class="s2">"#{pane_current_path}"</span> <span class="nt">-n</span> <span class="s2">"shell"</span>
<span class="c"># Start windows on index 1</span>
<span class="nb">set</span> <span class="nt">-g</span> base-index 1
</code></pre></div></div>
<p>Now when you open a new window, it’ll be named “shell” and will open in the same directory you were.</p>
<h2 id="my-usual-day-2-day-setup">My Usual Day-2-Day Setup</h2>
<p>As I’ve been using Tmux more and more, I’ve come up with my convention of what Tmux windows I need for most apps I work on. The list goes this way:</p>
<ol>
<li>The app’s server window (with the name of the project).</li>
<li>The REPL of the app I’m working on.</li>
<li>The shell where I do anything about Git.</li>
<li>The shell for testing.</li>
</ol>
<p>They’ll look pretty much this way:</p>
<p><img src="/assets/img/tmux_and_vscode/tmux_day_2_day.png" alt="Tmux Day-2-Day Setup" /></p>
<h2 id="wrapping-up">Wrapping up</h2>
<p>Another great thing about using Tmux with VSCode is that if I need to restart VSCode, my Tmux sessions will still be where I left them. That’s great when working on multiple apps because I can close and open their projects, but my Tmux sessions will be just where I left them.</p>Tonatiuh NúñezTmux is an excellent tool for managing multiple terminal windows and a perfect match to use with the fast VSCode terminal. In this blog post, I’ll show you how I set both for an ease development process.