<?xml version="1.0" encoding="utf-8" standalone="yes"?><?xml-stylesheet href="/rss.xsl" type="text/xsl"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" >
  <channel>
    <title>Articles on Jose M.</title>
    <link>https://josem.co/articles/</link>
    <description>Recent articles on Jose M.</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Wed, 09 Sep 2026 13:13:47 +0200</lastBuildDate>
    
	<atom:link href="https://josem.co/articles/index.xml" rel="self" type="application/rss+xml" />
    
    
    <item>
      <title>The new addiction to working all the time</title><link>https://josem.co/the-new-addiction-to-working-all-the-time/</link>
      <pubDate>Wed, 09 Sep 2026 13:13:47 +0200</pubDate>
      
      <guid>https://josem.co/the-new-addiction-to-working-all-the-time/</guid><description type="html">&lt;p&gt;We&amp;rsquo;re all so excited about the newest capabilities of each released AI model that we&amp;rsquo;re forgetting the consequences of having access to such an amazing tool, and the possibility of being able to do so much so fast.&lt;/p&gt;
&lt;p&gt;I know people who go to the gym and still have their phones connected so they can keep sending prompts to their laptops. I&amp;rsquo;m guilty myself of opening ChatGPT with audio mode in my car while I&amp;rsquo;m driving alone to chat about projects.&lt;/p&gt;
&lt;p&gt;So it&amp;rsquo;s not only that we&amp;rsquo;re constantly switching context when working, since we can work on multiple things in parallel, it&amp;rsquo;s also that we don&amp;rsquo;t know how to stop because the tokens are there for you to use.&lt;/p&gt;
&lt;p&gt;Nowadays I&amp;rsquo;m finishing my workdays with a level of mental exhaustion I don&amp;rsquo;t remember since the final exams at my university, but I have it every day instead. I&amp;rsquo;m not sure when/if this will ever change, but I think we need to bring back some calm into our lives.&lt;/p&gt;
&lt;p&gt;Where does this come from? Is it a sense of urgency or scarcity that we might not have the access we have nowadays in the near future, so we need to build as much as we can now? Is it a feeling of scarcity that it&amp;rsquo;s never going to be enough to be first / better / win over competitors? Where does it end?&lt;/p&gt;
&lt;p&gt;Self-analyzing myself, it feels like when you discovered there was a cheat code to have infinite money in your favorite game, and you start buying or building things like crazy because the constraint you&amp;rsquo;ve suffered for so long is now gone.&lt;/p&gt;
&lt;p&gt;That might be the key: the constraint on building software is, with some caveats, gone in many ways, so we don&amp;rsquo;t know how to regulate ourselves.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m optimistic that more people will realize the toll this is taking on our lives, and that even if we can build software all the time at a speed and quality probably never seen before, it doesn&amp;rsquo;t mean we should, and that we can do other things too.&lt;/p&gt;
&lt;p&gt;I know it&amp;rsquo;s fun, but we need to find out how much is &amp;ldquo;enough&amp;rdquo; for each day. The tokens might be available, but our lives won&amp;rsquo;t always be.&lt;/p&gt;
&lt;p&gt;Until next time.&lt;/p&gt;
</description>
      <abstract></abstract></item>
    
    <item>
      <title>Start With One Customer</title><link>https://josem.co/start-with-one-customer/</link>
      <pubDate>Sun, 06 Sep 2026 10:06:22 +0200</pubDate>
      
      <guid>https://josem.co/start-with-one-customer/</guid><description type="html">&lt;p&gt;If you&amp;rsquo;ve been into side projects, you&amp;rsquo;ve probably &lt;a href=&#34;https://www.reddit.com/r/SaaS/comments/1sfpabr/launched_my_saas_1_month_ago_a_few_users_0_paid_i/&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;seen&lt;/a&gt; &lt;a href=&#34;https://www.reddit.com/r/SaaS/comments/1scak5b/launched_my_first_saas_got_0_users_in_2_weeks/&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;countless&lt;/a&gt; &lt;a href=&#34;https://www.reddit.com/r/SaaS/comments/1rbzr6s/solo_founder_with_0_customers_what_actually/&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;times&lt;/a&gt; the story of someone building something really big and complex, launching it, and having 0 users. With the AI era we’re living in, this will become even more common since software is cheaper to make.&lt;/p&gt;
&lt;p&gt;I’ve worked on many side projects over the years, some with big ambitions and some very small, to solve a specific personal challenge. And that’s fine, I love to work on something that allows me to be fully creative without restrictions, but if your goal is to create a business, the starting place needs to be a bit different.&lt;/p&gt;
&lt;p&gt;Instead of working for months and launching something, thinking you can be really big and have thousands of random people all over the world using your product, start with one person. The auto repair shop owner down the street, a lawyer you know, the restaurant manager, a teacher at your kids&amp;rsquo; school. Start with that particular person and their specific challenges, and think of ways you can address them.&lt;/p&gt;
&lt;p&gt;Perhaps they don’t need your service or SaaS software for that, but if it makes their lives easier in any way (saving time or money, or making them feel better), you have a business opportunity.&lt;/p&gt;
&lt;p&gt;Build something with that person in mind, watch very closely how they operate, and start using your first version, and then, once a couple of months have passed, start expanding. Ask colleagues, talk to other people in that sector, and see who else might be interested.&lt;/p&gt;
&lt;p&gt;If you’ve been able to help one person, you can help two, and three.&lt;/p&gt;
&lt;p&gt;Things take time, of course, but if this is a side project, you have time on your side; there’s no VC asking for growth charts.&lt;/p&gt;
&lt;p&gt;A small piece of strategic advice: start with the marketing side as soon as possible. Landing page, social content, SEO… They take time to show up on Google and other places, so the sooner you start, the better.&lt;/p&gt;
&lt;p&gt;At some point, people will start looking for your solution and finding you, rather than the other way around. At that point, congratulations! You have a business.&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;img src=&#34;https://josem.co//images/2026/store@2x.jpg&#34; alt=&#34;Store&#34; decoding=&#34;async&#34; class=&#34;lazyload&#34; data-sizes=&#34;auto&#34; loading=&#34;lazy&#34;
          width=&#34;720&#34;  /&gt;&lt;/picture&gt;&lt;em&gt;Photo by &lt;a href=&#34;https://www.pexels.com/@bohlemedia/&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Tembela Bohle&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

    
</description>
      <abstract></abstract></item>
    
    <item>
      <title>HUMANS.md</title><link>https://josem.co/humans.md/</link>
      <pubDate>Sun, 12 Apr 2026 21:00:50 +0200</pubDate>
      
      <guid>https://josem.co/humans.md/</guid><description type="html">&lt;p&gt;Things got a bit messy.&lt;/p&gt;
&lt;p&gt;They all demanded more, more and more: clients, your manager, deadlines coming up, even yourself, feeling you were falling behind, and now, thanks to AI, you can provide.&lt;/p&gt;
&lt;p&gt;Oh boy, big time!&lt;/p&gt;
&lt;p&gt;You don’t even execute the code anymore, reviewing PRs is almost a lost art, and you can’t remember the last time you typed some actual code in your editor.&lt;/p&gt;
&lt;p&gt;You have reached peak productivity in this new world. You’ve even started experimenting with work trees, so you can put agents to work on multiple features and bugs at the same time.&lt;/p&gt;
&lt;p&gt;But who has time to test things locally anymore? To understand the thousands of lines of code you’ve put in there in the last month alone? That’s when we need a new kind of file.&lt;/p&gt;
&lt;p&gt;An understandable and self-updated file that tells me how things are organized in the code, how to run things manually, and which kind of technical direction we’re following with each change. That’s when we need humans.md.&lt;/p&gt;
&lt;p&gt;This file is inspired by AGENTS.md or CLAUDE.md, which allows the LLMs to get the context of your project, but in a world where we don’t code anymore, perhaps we also need the opposite: a file to explain to us (humans) what’s going on at multiple levels. We could even instruct the coding agent to keep it updated while summarizing the important points.&lt;/p&gt;
&lt;p&gt;P.S. This is a kind of joke at the moment, but I don’t think it’s too far into the future that we’ll see this file in some repositories.&lt;/p&gt;
</description>
      <abstract>Things got a bit messy. They all demanded more, more and more: clients, your manager, deadlines coming up, even yourself, feeling you were falling behind, and now, thanks to AI, you can provide. Oh boy, big time!</abstract></item>
    
    <item>
      <title>If you don&#39;t write it, I don&#39;t read it</title><link>https://josem.co/if-you-dont-write-it-i-dont-read-it/</link>
      <pubDate>Tue, 07 Apr 2026 07:07:32 +0200</pubDate>
      
      <guid>https://josem.co/if-you-dont-write-it-i-dont-read-it/</guid><description type="html">&lt;p&gt;Writing might be repetitive, boring, and difficult. It takes effort, skill, and countless edits to make it right, to transform what you had in your mind into something people can understand without getting bored.&lt;/p&gt;
&lt;p&gt;Now with AI, it&amp;rsquo;s very tempting to use Claude, or ChatGPT, to write something, or just use a dictation app because who wants to write anymore, right? But if you think that what you want to communicate is not worth the effort of sitting down and articulating it as a human being in writing form, perhaps it was not so important after all.&lt;/p&gt;
&lt;p&gt;Writing is not only a dump of your thoughts, but it&amp;rsquo;s an exercise to organize your thinking, to articulate better what you had in your mind, to summarize some things, even to realize you were wrong sometimes.&lt;/p&gt;
&lt;p&gt;Why would you think that if you didn&amp;rsquo;t take the time to write it, people will take the time to read it? Whenever I read something online and see some signals of AI-generated copy (like the infamous —), I skip it.&lt;/p&gt;
&lt;p&gt;My rule is simple: if you don&amp;rsquo;t have time to write it, I don&amp;rsquo;t have time to read it.&lt;/p&gt;
</description>
      <abstract>Writing is sometimes repetitive, hard, and boring, but if you don&#39;t spend the time writing something, expect the same from your readers when they encounter your text.</abstract></item>
    
    <item>
      <title>Going Back to the Physical World</title><link>https://josem.co/going-back-to-the-physical-world/</link>
      <pubDate>Wed, 04 Feb 2026 07:28:32 +0100</pubDate>
      
      <guid>https://josem.co/going-back-to-the-physical-world/</guid><description type="html">&lt;p&gt;We now spend more time looking at pixels than at real things.&lt;/p&gt;
&lt;p&gt;Almost everything involves a screen nowadays: buying things, looking up things to buy, ordering food, finding a date, driving, searching for a vacation destination, or reading the news. And the list goes on.&lt;/p&gt;
&lt;p&gt;It also doesn&amp;rsquo;t help that everything has a screen: fridges, cars, watches, treadmills, self-checkout machines&amp;hellip; even elevators, just in case you get bored for 10 seconds and have time to think. People attend live events and watch them through their phones.&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;img src=&#34;https://josem.co//images/2026/concert@2x.jpg&#34; alt=&#34;Concert&#34; decoding=&#34;async&#34; class=&#34;lazyload&#34; data-sizes=&#34;auto&#34; loading=&#34;lazy&#34;
          width=&#34;720&#34;  /&gt;&lt;/picture&gt;&lt;/p&gt;

    
&lt;p&gt;Even my parents are somewhat addicted to screens (in their 60s/70s), and I see whole families having lunch together while they look at their phones.&lt;/p&gt;
&lt;p&gt;We&amp;rsquo;re more present online than we are here, where we actually have each other.&lt;/p&gt;
&lt;p&gt;So, in a world where we&amp;rsquo;re seeing everything through a screen, I find myself missing, in a nostalgic way, analog objects.&lt;/p&gt;
&lt;p&gt;Perhaps &lt;a href=&#34;https://www.youtube.com/watch?v=v3AyOUjriJ8&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;&amp;ldquo;crushing&amp;rdquo;&lt;/a&gt; creative objects for the last 30 years into a touch screen wasn&amp;rsquo;t a good idea after all.&lt;/p&gt;
&lt;p&gt;Simple things like writing in a notebook, reading a book, getting my hands dirty in the garden, or having a conversation with a friend without our phones are therapeutic. It feels calmer and more connected compared to doing anything on a screen.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m running an experiment this month, starting to replace as many tools as I can with physical things. If it helps me avoid reaching for my phone or computer, it&amp;rsquo;s worth exploring.&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s a quick list (I already have some things) in case it inspires you.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A kitchen timer: cheap, and you can also use it for Pomodoros when working.&lt;/li&gt;
&lt;li&gt;A notebook.&lt;/li&gt;
&lt;li&gt;Physical Books.&lt;/li&gt;
&lt;li&gt;An analog camera.&lt;/li&gt;
&lt;li&gt;A calculator.&lt;/li&gt;
&lt;li&gt;A writing machine. I know, but please, watch &lt;a href=&#34;https://www.imdb.com/title/tt5966990/&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;California Typewriter&lt;/a&gt; and you&amp;rsquo;ll want one too.&lt;/li&gt;
&lt;li&gt;An iPod/mp3 player: people are going crazy with &lt;a href=&#34;https://www.ajfriesen.com/modding-an-ipod-classic/&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;the iPod mods&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;A physical agenda / printed calendar.&lt;/li&gt;
&lt;li&gt;A watch (not a smartwatch, just a simple watch, like a Casio).&lt;/li&gt;
&lt;li&gt;An encyclopedia. This one seems a bit crazy, but I&amp;rsquo;ve been reflecting on this ever since I read &lt;a href=&#34;https://www.optoutproject.net/what-is-true-on-the-internet/&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;this article&lt;/a&gt;, especially if you have kids.&lt;/li&gt;
&lt;li&gt;A reliable old car with no screens.&lt;/li&gt;
&lt;li&gt;A music player for the home.&lt;/li&gt;
&lt;li&gt;Post-its for ideas and quick notes.&lt;/li&gt;
&lt;li&gt;An alarm clock.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I understand the temptation: to have only a few things and not hoard random stuff so we&amp;rsquo;re all cool and minimalist, but I don&amp;rsquo;t want to end up spending half an hour on my phone when I just wanted to set an alarm clock, while my son is waiting for me to play with him. Not anymore.&lt;/p&gt;
</description>
      <abstract>Our world is quickly becoming a digital one. We now spend more time looking at pixels than at real things.</abstract></item>
    
    <item>
      <title>Learning How to Stop</title><link>https://josem.co/learning-how-to-stop/</link>
      <pubDate>Fri, 30 Jan 2026 10:29:43 +0100</pubDate>
      
      <guid>https://josem.co/learning-how-to-stop/</guid><description type="html">&lt;p&gt;We&amp;rsquo;ve accelerated so much that we forgot how to stop.&lt;/p&gt;
&lt;p&gt;Now, more than ever, it&amp;rsquo;s important to define what&amp;rsquo;s enough for us. How much do we need? How much money, space, recognition, power, and status?&lt;/p&gt;
&lt;p&gt;In a time when you can build anything with AI, create your own &amp;ldquo;economy&amp;rdquo; based on your personal brand through social media, or get the best education in history thanks to all the information online, it&amp;rsquo;s important we define when it&amp;rsquo;s enough.&lt;/p&gt;
&lt;p&gt;There are two problems that fuel this endless pursuit of more: comparison and opportunities.&lt;/p&gt;
&lt;h2 id=&#34;comparison&#34;&gt;Comparison&lt;/h2&gt;
&lt;p&gt;For anything meaningful I&amp;rsquo;ve accomplished, there are probably hundreds of people who have accomplished more, sometimes even faster, and they&amp;rsquo;re on the Internet showing off. The scale makes sense: you share what you do, and thousands, or even millions of people can see you.&lt;/p&gt;
&lt;p&gt;But the numbers also play against us, as individuals. Anyone probably knows dozens of people who are &amp;ldquo;better&amp;rdquo; at whatever they&amp;rsquo;re pursuing than they are, because of the Internet.&lt;/p&gt;
&lt;h2 id=&#34;opportunities&#34;&gt;Opportunities&lt;/h2&gt;
&lt;p&gt;The other piece of the fuel for our endless pursuit of doing more is the countless opportunities we have. Having a computer connected to the Internet is like receiving a menu with too many options in a good restaurant where you don&amp;rsquo;t know what to choose, and end up wondering if the other options were better instead of enjoying what you got.&lt;/p&gt;
&lt;p&gt;You can become famous with a viral video, sell anything online, or connect with anyone in the world. You can even build apps without technical knowledge thanks to AI, there&amp;rsquo;s always more to do.&lt;/p&gt;
&lt;h2 id=&#34;a-way-out&#34;&gt;A way out&lt;/h2&gt;
&lt;p&gt;The problem is that we can do so much that no matter what we do, we&amp;rsquo;ll always feel we&amp;rsquo;re falling behind, because there are things we&amp;rsquo;re not doing, and even the things we do, there are people who are doing better (or projecting they are). So, when is enough?&lt;/p&gt;
&lt;p&gt;I have the answer: never.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s like in &lt;a href=&#34;https://www.imdb.com/title/tt1706620/&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;SnowPiercer&lt;/a&gt;, we&amp;rsquo;re on a high-speed train that goes on a circular track around the world because if you stop, you might die. But the train doesn&amp;rsquo;t take you anywhere; you always end up where you started.&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;img src=&#34;https://josem.co//images/2026/train@2x.png&#34; alt=&#34;Endless train in SnowPiercer&#34; decoding=&#34;async&#34; class=&#34;lazyload&#34; data-sizes=&#34;auto&#34; loading=&#34;lazy&#34;
          width=&#34;720&#34;  /&gt;&lt;/picture&gt;&lt;em&gt;Photo by &lt;a href=&#34;https://image-engine.com/case-studies/snowpiercer/&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Image Engine&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

    
&lt;p&gt;It&amp;rsquo;s a game where we&amp;rsquo;ll be forever looking for the next thing to accomplish, the next milestone, the next possession or promotion, the next financial achievement, and yet, we&amp;rsquo;ll never be satisfied.&lt;/p&gt;
&lt;p&gt;But this is not a game; it&amp;rsquo;s our life, and, unlike in games, we only have one chance.&lt;/p&gt;
&lt;p&gt;What&amp;rsquo;s the solution, then?&lt;/p&gt;
&lt;p&gt;Well, it&amp;rsquo;s very simple, but not easy: to stop playing. To hop off the high-speed train that will take us nowhere, other than to more frustration and anxiety because we haven&amp;rsquo;t achieved &amp;ldquo;enough&amp;rdquo;, and to start enjoying the scenery.&lt;/p&gt;
&lt;p&gt;Being grateful and appreciating what we have can only happen when we stop. To notice what&amp;rsquo;s worth and beautiful in this world is only possible if we&amp;rsquo;re not &amp;ldquo;locked in&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;The train will keep moving whether you&amp;rsquo;re on it or not. Perhaps learning to stop isn&amp;rsquo;t giving up; it&amp;rsquo;s finally arriving.&lt;/p&gt;
</description>
      <abstract>The internet gave us unlimited opportunities and unlimited people to compare ourselves to. We can build anything, learn anything, become anyone — and yet we&#39;ve never felt more behind. What if the answer isn&#39;t doing more, but finally deciding what&#39;s enough?</abstract></item>
    
    <item>
      <title>How to Own Expensive Things for Little Money</title><link>https://josem.co/how-to-own-expensive-things-for-little-money/</link>
      <pubDate>Mon, 15 Sep 2025 00:18:28 +0200</pubDate>
      
      <guid>https://josem.co/how-to-own-expensive-things-for-little-money/</guid><description type="html">&lt;p&gt;I didn&amp;rsquo;t know this until COVID hit, I was stuck at home, and wanted to set up a home gym.&lt;/p&gt;
&lt;p&gt;Naturally, after watching too much content from &lt;a href=&#34;https://www.youtube.com/@MatFraserHWPOTraining&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Matt Fraser&lt;/a&gt; and other CrossFit athletes, I knew which brand I &lt;s&gt;wanted&lt;/s&gt; needed: &lt;a href=&#34;https://www.roguefitness.com/&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Rogue&lt;/a&gt; (spoiler: an expensive one). Durable, excellent quality, but pricey.&lt;/p&gt;
&lt;p&gt;So, the question was, how could I justify (wife included) spending so much money on a home gym knowing that after COVID, I was probably not going to use it? Well, I didn&amp;rsquo;t. Instead, I found a way to have the home gym I wanted, and not only didn&amp;rsquo;t cost me too much, I made money in the process.&lt;/p&gt;
&lt;p&gt;After I was done with the gym (roughly 8 months later), I was able to sell all the equipment for what I had paid plus some extra because Rogue was having stock issues in Europe and it was hard to order anything online.&lt;/p&gt;
&lt;p&gt;I was lucky, but it led me to rethink how I relate to buying and owning some things nowadays. I know this is extremely obvious for most people, but for me, I had never really considered it before.&lt;/p&gt;
&lt;p&gt;The trick is as simple as considering the resale value when buying something. You move from buying things, thinking that you&amp;rsquo;ll own them forever, and that the price you paid is gone, to thinking they&amp;rsquo;re more in &amp;ldquo;rental&amp;rdquo; mode until you resell them.&lt;/p&gt;
&lt;p&gt;Naturally, this approach also means you no longer consider the full price but the &lt;code&gt;original price - reselling price&lt;/code&gt;. That&amp;rsquo;s the magic formula.&lt;/p&gt;
&lt;p&gt;So, when considering buying something expensive, think about whether you could resell it later on and research how much it would cost in your local second-hand market. That&amp;rsquo;s the real price you&amp;rsquo;ll be paying.&lt;/p&gt;
&lt;p&gt;Some resell better than others: nice watches, bikes, gym equipment, jewelry, or hardware tools from respected brands like DeWalt, Milwaukee, or Makita (any &lt;a href=&#34;https://www.youtube.com/watch?v=xI3mB0x24x0&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Van Neistat&lt;/a&gt; fans out there?).&lt;/p&gt;
&lt;p&gt;In fact, you might find it&amp;rsquo;s cheaper to buy an expensive product and resell it later than rent it, or worse, buy something cheap and have to throw it away because no one wants it afterwards.&lt;/p&gt;
&lt;p&gt;Until next time!&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;img src=&#34;https://josem.co//images/2025/rogue@2x.jpg&#34; alt=&#34;Rogue&#34; decoding=&#34;async&#34; class=&#34;lazyload&#34; data-sizes=&#34;auto&#34; loading=&#34;lazy&#34;
          width=&#34;720&#34;  /&gt;&lt;/picture&gt;&lt;em&gt;Photograph by &lt;a href=&#34;https://www.pexels.com/@victorfreitas/&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Victor Freitas&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

    
</description>
      <abstract>Consider the resale value when buying something. You move from buying things, thinking that you&#39;ll own them forever, and that the price you paid is gone, to thinking they&#39;re more in rental mode until you resell them.</abstract></item>
    
    <item>
      <title>How to Learn From Youtube More Efficiently</title><link>https://josem.co/how-to-learn-from-youtube-more-efficiently/</link>
      <pubDate>Mon, 08 Sep 2025 06:57:32 +0200</pubDate>
      
      <guid>https://josem.co/how-to-learn-from-youtube-more-efficiently/</guid><description type="html">&lt;p&gt;YouTube is an excellent source of information. But it&amp;rsquo;s usually hard to find exactly what you&amp;rsquo;re interested in efficiently.&lt;/p&gt;
&lt;p&gt;Recently, I&amp;rsquo;ve been using this method to learn from long-form videos, usually dense in information where the visual part is not so important, like a podcast. Thanks to AI, I don&amp;rsquo;t need to watch two hours of videos to get to the content I&amp;rsquo;m interested in anymore.&lt;/p&gt;
&lt;p&gt;The process I&amp;rsquo;ve been using is based on &lt;a href=&#34;https://notebooklm.google.com/&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;NotebookLM&lt;/a&gt;:&lt;/p&gt;
&lt;p class=&#34;bigger-image&#34;&gt;&lt;picture&gt;&lt;a href=&#34;https://josem.co/images/2025/sketch-youtube_double@2x.png&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;
            &lt;img src=&#34;https://josem.co//images/2025/sketch-youtube_double@2x.png&#34; alt=&#34;Youtube to Text&#34; decoding=&#34;async&#34; class=&#34;lazyload&#34; data-sizes=&#34;auto&#34; loading=&#34;lazy&#34;
          width=&#34;1000&#34; /&gt;
          &lt;/a&gt;
        &lt;/picture&gt;
      &lt;/p&gt;

    
&lt;p&gt;&lt;a href=&#34;https://notebooklm.google.com/&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;NotebookLM&lt;/a&gt; is a Google product that allows you to gather information from various sources and then ask questions or analyze it. You can use websites, Google Drive, files, and, yes, YouTube.&lt;/p&gt;
&lt;h2 id=&#34;1-grab-the-link&#34;&gt;1. Grab the link&lt;/h2&gt;
&lt;p&gt;Go to YouTube and get the link to the video you&amp;rsquo;re interested in.&lt;/p&gt;
&lt;h2 id=&#34;2-using-it-as-a-source-in-notebooklm&#34;&gt;2. Using it as a source in NotebookLM&lt;/h2&gt;
&lt;p&gt;Now, create a &lt;a href=&#34;https://notebooklm.google.com/&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;new notebook&lt;/a&gt;:&lt;/p&gt;
&lt;p class=&#34;bigger-image&#34;&gt;&lt;picture&gt;&lt;a href=&#34;https://josem.co/images/2025/notebooklm-1_double@2x.png&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;
            &lt;img src=&#34;https://josem.co//images/2025/notebooklm-1_double@2x.png&#34; alt=&#34;Youtube to Text&#34; decoding=&#34;async&#34; class=&#34;lazyload&#34; data-sizes=&#34;auto&#34; loading=&#34;lazy&#34;
          width=&#34;1000&#34; /&gt;
          &lt;/a&gt;
        &lt;/picture&gt;
      &lt;/p&gt;

    
&lt;p&gt;Add a YouTube video as the source:&lt;/p&gt;
&lt;p class=&#34;bigger-image&#34;&gt;&lt;picture&gt;&lt;a href=&#34;https://josem.co/images/2025/notebooklm-2_double@2x.png&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;
            &lt;img src=&#34;https://josem.co//images/2025/notebooklm-2_double@2x.png&#34; alt=&#34;Youtube to Text&#34; decoding=&#34;async&#34; class=&#34;lazyload&#34; data-sizes=&#34;auto&#34; loading=&#34;lazy&#34;
          width=&#34;1000&#34; /&gt;
          &lt;/a&gt;
        &lt;/picture&gt;
      &lt;/p&gt;

    
&lt;p class=&#34;bigger-image&#34;&gt;&lt;picture&gt;&lt;a href=&#34;https://josem.co/images/2025/notebooklm-3_double@2x.png&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;
            &lt;img src=&#34;https://josem.co//images/2025/notebooklm-3_double@2x.png&#34; alt=&#34;Youtube to Text&#34; decoding=&#34;async&#34; class=&#34;lazyload&#34; data-sizes=&#34;auto&#34; loading=&#34;lazy&#34;
          width=&#34;1000&#34; /&gt;
          &lt;/a&gt;
        &lt;/picture&gt;
      &lt;/p&gt;

    
&lt;p&gt;And start asking questions:&lt;/p&gt;
&lt;p class=&#34;bigger-image&#34;&gt;&lt;picture&gt;&lt;a href=&#34;https://josem.co/images/2025/notebooklm-4_double@2x.png&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;
            &lt;img src=&#34;https://josem.co//images/2025/notebooklm-4_double@2x.png&#34; alt=&#34;Youtube to Text&#34; decoding=&#34;async&#34; class=&#34;lazyload&#34; data-sizes=&#34;auto&#34; loading=&#34;lazy&#34;
          width=&#34;1000&#34; /&gt;
          &lt;/a&gt;
        &lt;/picture&gt;
      &lt;/p&gt;

    
&lt;p&gt;You can even generate a mind map or a briefing doc based on the video, but I think the most interesting part is being able to tell them specifically what you&amp;rsquo;re interested in.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&#34;alternative-approach-using-claude-or-chatgpt&#34;&gt;Alternative approach using Claude or ChatGPT&lt;/h2&gt;
&lt;p&gt;Another way to achieve the same: use one of the free tools available to get the full transcript of a video like &lt;a href=&#34;https://tactiq.io/tools/youtube-transcript&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;this one&lt;/a&gt;, or &lt;a href=&#34;https://www.youtube-transcript.io/&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;this one&lt;/a&gt;, and then paste the content on ChatGPT or Claude with this simple prompt:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Read this video transcript, and now I&amp;#39;ll ask you questions.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;hr&gt;
&lt;p&gt;I hope you found that useful. Until next time!&lt;/p&gt;
</description>
      <abstract>Recently, I&#39;ve been using this method to learn from long-form videos, usually dense in information where I&#39;m just interested in some parts of it. Thanks to AI, we don&#39;t need to watch 2 hours of videos anymore to get to the content we&#39;re interested in. </abstract></item>
    
    <item>
      <title>Side Projects and AI</title><link>https://josem.co/side-projects-and-ai/</link>
      <pubDate>Mon, 01 Sep 2025 08:32:30 +0200</pubDate>
      
      <guid>https://josem.co/side-projects-and-ai/</guid><description type="html">&lt;p&gt;&lt;picture&gt;&lt;img src=&#34;https://josem.co//images/2025/desk@2x.jpg&#34; alt=&#34;Desk&#34; decoding=&#34;async&#34; fetchpriority=&#34;high&#34; loading=&#34;eager&#34;
          width=&#34;720&#34;  /&gt;&lt;/picture&gt;&lt;em&gt;Photo by &lt;a href=&#34;https://unsplash.com/@remyloz&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Remy Loz&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

    
&lt;p&gt;Some years ago, building a side project meant finding time wherever you could. Late nights, weekends, or early mornings to squeeze in some work before your real job starts.&lt;/p&gt;
&lt;p&gt;Any SaaS or app you wanted to build used to take months of this busy schedule until you could launch it. As a result, balancing building a side project with a day job (plus family!) was a challenge that few people were willing to accept.&lt;/p&gt;
&lt;p&gt;Now, with tools like Claude Code, the paradigm has shifted. The cost of creating software is much cheaper. What used to take months now takes days. You can do most of your basic features with AI if you use a well-known framework with good standards. But what does this mean?&lt;/p&gt;
&lt;p&gt;First, there is a natural big shift in our job market. With less effort to build software, everybody else is experiencing the same benefit, so we&amp;rsquo;ll need to hire fewer engineers to do the same job we were doing before. I already know great people who are facing hard challenges entering the job market as junior engineers.&lt;/p&gt;
&lt;p&gt;If the barrier to launching a software product is lower, more will be in the market, making it harder to succeed. But at this point is where we, as software developers, are wrong; in fact it&amp;rsquo;s a great time to be an entrepreneur.&lt;/p&gt;
&lt;p&gt;As a software developer, &lt;strong&gt;coding was never the real barrier&lt;/strong&gt; to building a successful side business. Without AI, it might have taken longer, but we could still build what we wanted.&lt;/p&gt;
&lt;p&gt;The real challenge was—and still is—everything else required to get paying customers. We love staying in our IDEs, shipping yet-one-more-feature to our grand total of zero users. It&amp;rsquo;s comfortable. It&amp;rsquo;s safe. It&amp;rsquo;s familiar.&lt;/p&gt;
&lt;p&gt;What&amp;rsquo;s uncomfortable? Sales calls, cold emails, blog posts echoing in the void, facing rejection, or talking to potential customers (I know, scary!). These are the skills that turn code into revenue, and AI hasn&amp;rsquo;t fully automated them yet. So the challenges remain for everybody else, too.&lt;/p&gt;
&lt;p&gt;The only difference is that now we get a faster feedback loop about the skills we lack to build a business. The sooner we recognize what&amp;rsquo;s actually holding us back, the sooner we can develop the skills that matter.&lt;/p&gt;
&lt;p&gt;AI didn&amp;rsquo;t remove the obstacles—it just helped us find them faster.&lt;/p&gt;
</description>
      <abstract>Some years ago, building a side project meant finding time wherever you could. Late nights, weekends, or early mornings to squeeze some work in before your real job starts.</abstract></item>
    
    <item>
      <title>Skip the Next iPhone</title><link>https://josem.co/skip-the-next-iphone/</link>
      <pubDate>Mon, 25 Aug 2025 16:34:24 +0200</pubDate>
      
      <guid>https://josem.co/skip-the-next-iphone/</guid><description type="html">&lt;p&gt;There&amp;rsquo;s a ritual that happens every September. Apple unveils its latest iPhone, and millions of us suddenly discover that the device in our pocket—the one we loved just yesterday—has become obsolete.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s marketing genius, really. The same phone that was &amp;ldquo;revolutionary&amp;rdquo; twelve months ago is now just&amp;hellip;old.&lt;/p&gt;
&lt;p&gt;Big tech companies have mastered the art of manufactured desire. Apple and Samsung don&amp;rsquo;t need to release a new phone every year—the technological leaps between generations have become increasingly small. But why wait three years when you can extract revenue annually?&lt;/p&gt;
&lt;p&gt;The real innovation cycle in smartphones peaked years ago. Now we&amp;rsquo;re just polishing small details.&lt;/p&gt;
&lt;h2 id=&#34;yesterdays-innovation&#34;&gt;Yesterday&amp;rsquo;s Innovation&lt;/h2&gt;
&lt;p&gt;&lt;picture&gt;&lt;img src=&#34;https://josem.co//images/2025/iphone-12@2x.jpg&#34; alt=&#34;iPhone 12 Ad&#34; decoding=&#34;async&#34; fetchpriority=&#34;high&#34; loading=&#34;eager&#34;
          width=&#34;720&#34;  /&gt;&lt;/picture&gt;&lt;/p&gt;

    
&lt;p&gt;It&amp;rsquo;s almost funny to look at older iPhone ads. &amp;ldquo;The best iPhone we&amp;rsquo;ve ever made!&amp;rdquo;, they&amp;rsquo;ve said about every single iPhone since the iPhone 3GS. And, while technically true, watching it now feels like a joke. And yes, there&amp;rsquo;s a great &lt;a href=&#34;https://www.youtube.com/watch?v=bPkso_6n0vs&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;compilation of this on YouTube&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;my-anti-upgrade-philosophy&#34;&gt;My Anti-Upgrade Philosophy&lt;/h2&gt;
&lt;p&gt;Here&amp;rsquo;s my approach: I treat new phone releases like I treat Black Friday sales—I tune out the noise and enjoy what I already have.&lt;/p&gt;
&lt;p&gt;My work iPhone 13 does everything I need just fine. My wife&amp;rsquo;s iPhone 11? She genuinely loves it, and it takes perfectly good photos of our kids; she has zero FOMO about titanium frames or whatever this year&amp;rsquo;s buzzword is.&lt;/p&gt;
&lt;p&gt;When I finally upgrade—usually when my current phone has lived a full life and earned its retirement—I can notice the jump. Going from an iPhone X to an iPhone 15? That&amp;rsquo;s an upgrade. You notice the speed, the camera quality, and the battery life.&lt;/p&gt;
&lt;p&gt;I usually buy a previous-generation phone, second-hand. That&amp;rsquo;s where value lives. The iPhone 15 when the 16 launches. The Samsung S24 when the S25 is out. You get flagship performance without flagship prices and skip the &lt;a href=&#34;https://apple.fandom.com/wiki/Bendgate&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;early adopter bugs&lt;/a&gt; as a bonus.&lt;/p&gt;
&lt;p&gt;While everyone&amp;rsquo;s chasing the newest shiny object, I&amp;rsquo;m picking up last year&amp;rsquo;s &amp;ldquo;revolutionary&amp;rdquo; device at 40% off.&lt;/p&gt;
&lt;h2 id=&#34;the-real-revolution&#34;&gt;The Real Revolution&lt;/h2&gt;
&lt;p&gt;You know what&amp;rsquo;s truly revolutionary? Keeping your phone for 5+ years. Use it until the battery needs replacing, then replace just the battery. Protect it with a good case instead of treating it as disposable. Or switch to a repairable phone like the &lt;a href=&#34;https://www.fairphone.com/&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Fairphone&lt;/a&gt; when you&amp;rsquo;re done with yours.&lt;/p&gt;
&lt;p&gt;Every phone you don&amp;rsquo;t buy is money that could fund experiences or investments. It&amp;rsquo;s less e-waste in landfills. It&amp;rsquo;s one less vote for the annual consumption cycle that tech companies desperately want us trapped in.&lt;/p&gt;
&lt;h2 id=&#34;the-mindful-approach&#34;&gt;The Mindful Approach&lt;/h2&gt;
&lt;p&gt;Next time Apple or Samsung tries to convince you that your life is incomplete without their latest glass and metal rectangle, remember this: Your current phone is probably fine. That tiny camera improvement won&amp;rsquo;t make your memories more meaningful. That slightly faster processor won&amp;rsquo;t make you more productive.&lt;/p&gt;
&lt;p&gt;What will make a difference? Being present with the technology you have, rather than constantly yearning for what&amp;rsquo;s next.&lt;/p&gt;
</description>
      <abstract>There&#39;s a ritual that happens every September. Apple unveils its latest iPhone, and millions of us suddenly discover that the device in our pocket—the one we loved just yesterday—has become obsolete.</abstract></item>
    
    <item>
      <title>Trips Are an Opportunity</title><link>https://josem.co/trips-are-an-opportunity/</link>
      <pubDate>Thu, 21 Aug 2025 08:14:45 +0200</pubDate>
      
      <guid>https://josem.co/trips-are-an-opportunity/</guid><description type="html">&lt;p&gt;Now that summer is in full swing in many parts of the world, I thought it would be a good time to write about something I&amp;rsquo;ve felt for years whenever I go away for a few days. Trips might be the only chance we get to view our lives from a distance. Let me explain.&lt;/p&gt;
&lt;p&gt;In the midst of our daily responsibilities, it&amp;rsquo;s almost impossible to gain distance and evaluate what&amp;rsquo;s working and what could be improved in our lives and whether our current work is leading us in the right direction. We&amp;rsquo;re so close to everything that the only way is forward: doing one more task, having one more meeting, completing one more daily chore, day after day, week after week, for months on end.&lt;/p&gt;
&lt;p&gt;On the other hand, when we physically go somewhere else, we can detach from everything in our daily lives. We can start looking at our lives as if they&amp;rsquo;re someone else&amp;rsquo;s, and only then can we see where our path is taking us, how our decisions have led us here.&lt;/p&gt;
&lt;p&gt;To me, time away is not only time to rest, but also time to think and plan for the next few months.&lt;/p&gt;
&lt;p&gt;The most impactful decisions I&amp;rsquo;ve made have all happened while I was away, and now that I&amp;rsquo;m back, well, it&amp;rsquo;s time to work.&lt;/p&gt;
</description>
      <abstract>Now that summer is in full swing in many parts of the world, I thought it would be a good time to write about something I&#39;ve felt for years whenever I go away for a few days. Trips might be the only chance we get to view our lives from a distance. Let me explain.</abstract></item>
    
    <item>
      <title>The Schedule Takes Care of Us</title><link>https://josem.co/the-schedule-takes-care-of-us/</link>
      <pubDate>Sun, 17 Aug 2025 06:33:37 +0200</pubDate>
      
      <guid>https://josem.co/the-schedule-takes-care-of-us/</guid><description type="html">&lt;p&gt;I vividly remember a school trip to a Catholic monastery as a kid. The Dominican monk we met could speak 12 languages, had several degrees, did daily chores like working in the garden, and still had time to follow a strict routine of prayers and study. When I asked him how he managed it all, he replied:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;ldquo;We take care of the schedule, and the schedule takes care of us.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;That sentence stuck with me, and it resembles how even the smallest details, like choosing the time for your alarm clock, might be a foundation for your goals in life. But we&amp;rsquo;re usually blind to our own patterns.&lt;/p&gt;
&lt;p&gt;When we reflect on whether we&amp;rsquo;re satisfied with our lives and circumstances, we like to fantasize and think about grandiose plans. Like: &amp;ldquo;I want to make more money&amp;rdquo;, &amp;ldquo;I&amp;rsquo;d like to learn a new language&amp;rdquo;, or &amp;ldquo;I wish I had more energy throughout the day&amp;rdquo;. But, by definition, those big plans lack specific daily micro steps that can take you there.&lt;/p&gt;
&lt;p&gt;Instead, we could ask: What am I doing now? Which choices do I have in front of me today that could contribute to (or go against) my goals?&lt;/p&gt;
&lt;p&gt;We can plan for the future, but pay attention to our day, just one day at a time. Each morning, the game restarts.&lt;/p&gt;
&lt;p&gt;You can go through a few areas and reflect or research how they could affect you.&lt;/p&gt;
&lt;h2 id=&#34;sleep&#34;&gt;Sleep&lt;/h2&gt;
&lt;p&gt;This may be the easiest one to solve. Reflect on how much you sleep (7-9 hours seems like the perfect spot) and the quality of your rest. Even the temperature of your room is key to how well you sleep.&lt;/p&gt;
&lt;h2 id=&#34;distractions&#34;&gt;Distractions&lt;/h2&gt;
&lt;p&gt;No matter what you want to do, it will become challenging at some point. The passion and fuel you get when you start learning a new language or working on a new personal project will soon vanish, and once they do, distractions will welcome you with open arms.&lt;/p&gt;
&lt;p&gt;Going through Instagram or X, browsing Reddit, or watching a new random TV show are all forms of procrastination. And what feels worse is that no matter how much you retreat to your comfy distraction, the task will always be there for you.&lt;/p&gt;
&lt;h2 id=&#34;food&#34;&gt;Food&lt;/h2&gt;
&lt;p&gt;I&amp;rsquo;m not a nutrition expert, so I cannot give you specific advice, but learn the pillars of good nutrition (macronutrients, micronutrients, and calorie intake) and find an eating style that can help you maintain good health and energy levels throughout the day.&lt;/p&gt;
&lt;p&gt;Go to your doctor and get a blood test. You might be missing some key micronutrients that are significantly affecting your mood, well-being, and health.&lt;/p&gt;
&lt;h2 id=&#34;strength-training&#34;&gt;Strength training&lt;/h2&gt;
&lt;p&gt;Lifting weights might have a &lt;a href=&#34;https://www.mayoclinic.org/healthy-lifestyle/fitness/in-depth/strength-training/art-20046670&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;profound impact&lt;/a&gt; on your life. You don&amp;rsquo;t need to compare yourself with anyone, but we should all aim to be a bit stronger each day.&lt;/p&gt;
&lt;h2 id=&#34;psychological-traps&#34;&gt;Psychological &amp;ldquo;traps&amp;rdquo;&lt;/h2&gt;
&lt;p&gt;Please read the &lt;a href=&#34;https://en.wikipedia.org/wiki/List_of_cognitive_biases&#34; rel=&#34;noopener&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;list of cognitive biases from Wikipedia&lt;/a&gt;, and reflect on how and where they affect you. You might be surprised how your brain can trick you.&lt;/p&gt;
&lt;p&gt;For example, the present bias (tendency to settle for a smaller present reward rather than wait for a larger future reward), is behind procrastination because we want to avoid the immediate pain (small reward), even though we might not get the larger reward in the future.&lt;/p&gt;
&lt;p&gt;Meditating and developing a habit of being more mindful also helps when dealing with challenges.&lt;/p&gt;
&lt;h2 id=&#34;relationships&#34;&gt;Relationships&lt;/h2&gt;
&lt;p&gt;Who do you talk to on a daily basis? What do you talk about? Are they positive people? Do they support you in what you want to do? Observing this can be very revealing.&lt;/p&gt;
&lt;p&gt;Even if you observe your relationship with yourself and your own thoughts, you may notice some dark patterns that are undermining your life. Do you encourage yourself when you want to start something new? Do you think you can succeed? Do you forgive yourself when you make a mistake?&lt;/p&gt;
&lt;h2 id=&#34;inputs&#34;&gt;Inputs&lt;/h2&gt;
&lt;p&gt;What do you usually read about? Do you watch the news? Are you worried about the world ending tomorrow? News, or media, can sometimes be a distraction, but also a source of anxiety you might not need. There are &lt;a href=&#34;https://josem.co/breaking-free-from-the-news/#a-different-approach-to-be-informed&#34; rel=&#34;noopener&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;better ways to be informed&lt;/a&gt;, like picking good sources that don&amp;rsquo;t focus on the drama and more on the objective facts, if that&amp;rsquo;s what you want.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;Looking back at that monk&amp;rsquo;s life through this lens, I realize he wasn&amp;rsquo;t just disciplined—he had designed his days around his goals. He had a strict schedule, a good relationship with his fellow monks, bringing accountability, support, and a spiritual practice that helped him avoid some of his natural shortcomings. Even his relationship with food was intentional. Because he took care of all these small details,  he could study for 10+ hours each day and still have time and energy to do other important things in his life.&lt;/p&gt;
&lt;p&gt;We can all act on each of these areas at the lowest level possible and choose what we do each minute of each day. If we start to realize which decisions can take us where we want to go, this approach can also give meaning to our lives in a deep way. It makes each choice of the day mean something.&lt;/p&gt;
&lt;p&gt;And here&amp;rsquo;s a final secret: all of these areas are interconnected. When we eat well, we sleep better. If we sleep better, we&amp;rsquo;ll have more energy to go to the gym, and so on. The opposite is also true: bad habits lead to more bad habits, so we&amp;rsquo;d better choose wisely.&lt;/p&gt;
&lt;p&gt;I discovered this myself when I started going to bed a bit earlier. I could wake up before my kids and go to the gym. Because I started going to the gym again, my energy and mood improved throughout the day. Just one small change with rippling effects.&lt;/p&gt;
&lt;p&gt;Small habits are like the roots of the big tree. While everyone admires the beautiful leaves or the giant trunk, it&amp;rsquo;s those hidden roots that sustain and feed the tree each day. Don&amp;rsquo;t underestimate them.&lt;/p&gt;
&lt;p&gt;Pick one thing you know is going against your life goals, and fix it. Aim low; it might be something as small as stopping watching TV in the evenings so you can sleep better and wake up a bit earlier, and once it&amp;rsquo;s fixed, find another one. The path is infinite, and so is the potential for improvement.&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;img src=&#34;https://josem.co//images/2025/take-care-of-the-details@2x.jpg&#34; alt=&#34;Man alone in the forest in the morning&#34; decoding=&#34;async&#34; class=&#34;lazyload&#34; data-sizes=&#34;auto&#34; loading=&#34;lazy&#34;
          width=&#34;720&#34;  /&gt;&lt;/picture&gt;&lt;em&gt;Photograph by &lt;a href=&#34;https://unsplash.com/@martinedholm&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Martin Edholm&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

    
</description>
      <abstract>Paying attention to the small, daily details of life—like sleep, nutrition, habits, and relationships—can have a profound impact on your well-being and long-term goals. This article explores how focusing on these micro-level choices, rather than just big-picture plans, creates the foundation for meaningful change and personal growth.</abstract></item>
    
    <item>
      <title>What Are We Losing With AI?</title><link>https://josem.co/what-are-we-losing-with-ai/</link>
      <pubDate>Tue, 29 Jul 2025 17:53:54 +0200</pubDate>
      
      <guid>https://josem.co/what-are-we-losing-with-ai/</guid><description type="html">&lt;p&gt;Once it&amp;rsquo;s well integrated into our lives, any new technology can be seen as an exchange. We lose something and get something else in return.&lt;/p&gt;
&lt;p&gt;When we started using our calculator app, we lost the ability to do basic operations by hand, but we got accurate results quickly. After some time, even making a basic addition without it seems like a struggle.&lt;/p&gt;
&lt;p&gt;I don&amp;rsquo;t remember the last time I used a map, other than in school when I was a kid and was learning about them. By the time I got my driver&amp;rsquo;s license, smartphones were fully out, so Google Maps was my navigator. I lost (or maybe even didn&amp;rsquo;t develop the capacity to navigate with a map in the first place?), but I got instant directions to any destination in return.&lt;/p&gt;
&lt;p&gt;The pattern of losing something and getting something else in return, usually in the form of convenience, is everywhere in any technological advancement. Even getting cars meant we &lt;a href=&#34;https://bigthink.com/health/america-has-a-walking-problem/&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;walk less&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In the last few months, I&amp;rsquo;ve asked myself, &amp;ldquo;What are we losing with AI?&amp;rdquo;&lt;/p&gt;
&lt;p&gt;AI can be seen as a form of &amp;ldquo;thinking&amp;rdquo; that can solve problems for you. Its ability to connect past context with creating a plan and producing something feels very human—too human, I&amp;rsquo;d say. The AI technologies we have in 2025 can fully do things like writing, programming, or planning a marketing campaign.&lt;/p&gt;
&lt;p&gt;This ability to get information, connect it in our heads with our past knowledge, and produce something using our intelligence is what makes us intelligent beings; it&amp;rsquo;s what has allowed us to get where we are. If we lose this capacity, what&amp;rsquo;s left? Prompt &amp;ldquo;engineers&amp;rdquo;?&lt;/p&gt;
&lt;p&gt;One of the most widespread usages of AI is writing something for you: an email, a document, or even papers. There was a &lt;a href=&#34;https://www.nature.com/articles/s44222-025-00323-4&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;recent article&lt;/a&gt; published on Nature.com, which tries to defend writing as a form of thinking, and that we shouldn&amp;rsquo;t stop doing it, if we want to keep making progress in some science fields.&lt;/p&gt;
&lt;p&gt;AI can indeed mean we lose the ability to think through complex problems, to understand better many areas of knowledge that will be fully abstracted for you by AI, and to have a conversation with someone because you want to learn from them, too many things that make us what we are: humans. Also, we become dependent on this new tool to make basic things that otherwise would be great exercises to keep developing our brains.&lt;/p&gt;
&lt;p&gt;There must be a balance there, a way to use this technology, like any other, that can give us the best of both worlds, a balance where it can help us, but we still appreciate and develop basic thinking and planning skills.&lt;/p&gt;
&lt;p&gt;Maybe it can help us to get some ideas, but we can develop them. Or in programming, it can help us to understand some obscure parts of a codebase, but we have in our minds what a good architecture or design should look like.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m still exploring where that balance is, and I don&amp;rsquo;t know the exact formula, but I&amp;rsquo;m sure we might be losing too much if we delegate any thinking and knowledge-based planning to software just because we can.&lt;/p&gt;
&lt;p&gt;ChatGTP, Claude, or others should be more like a companion than a main driver. Or we won&amp;rsquo;t know how to drive anymore.&lt;/p&gt;
</description>
      <abstract>Once it&#39;s well integrated into our lives, any new technology can be seen as an exchange. We lose something and get something else in return. We lose something and get something else in return. In the last few months, I&#39;ve asked myself, &#34;What are we losing with AI?&#34;?</abstract></item>
    
    <item>
      <title>The Rebellious Act of Slowing Down</title><link>https://josem.co/the-rebellious-act-of-slowing-down/</link>
      <pubDate>Tue, 20 May 2025 07:20:15 +0200</pubDate>
      
      <guid>https://josem.co/the-rebellious-act-of-slowing-down/</guid><description type="html">&lt;p&gt;We&amp;rsquo;ve all been living under the promise that things will get faster, and oh boy, that promise has certainly been fulfilled. We now have faster transportation, fast food, two-hour delivery shopping, and faster technology each year.&lt;/p&gt;
&lt;p&gt;Yet, we rarely pause to reflect on what this speed means for us—how it affects us individually and collectively. It impacts our habits, sleep (or lack of it!), relationships, and the planet.&lt;/p&gt;
&lt;p&gt;What if there are consequences that we haven&amp;rsquo;t fully noticed yet, but are palpable in many ways if we take a deeper look? What if, after so many breakthroughs, we&amp;rsquo;re left with less patience, fewer personal connections, less appreciation for what we have, and more craving for what we don&amp;rsquo;t?&lt;/p&gt;
&lt;p&gt;In this era of speed and efficiency, slowing down almost feels revolutionary. Achieving the same result, but taking longer, is almost counterintuitive. But in that search for more calm, we might also find some benefits.&lt;/p&gt;
&lt;p&gt;Sending a letter to a loved one is way slower than sending a quick message, but taking some time to think about what you want to say and putting in some effort in how you express it might help you process how you feel or might have a more profound impact on the other person.&lt;/p&gt;
&lt;p&gt;Reading a book will profoundly impact your mindset more than watching a random video on YouTube or reading a trending topic tweet on X.&lt;/p&gt;
&lt;p&gt;Have you done anything with your hands lately? Sure, you can buy or delegate it to someone else, but the pure satisfaction and connection you get from any activity involving a more physical activity is quite something.&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s a quick exercise: Take a morning this weekend and go to your nearest forest (or a large park will do). Take a slow, calm walk. No rush, &lt;a href=&#34;https://josem.co/leaving-the-phone-at-home/&#34; rel=&#34;noopener&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;no phone&lt;/a&gt;, no commitments, just a walk.&lt;/p&gt;
&lt;p&gt;Walking in nature to reconnect with what we&amp;rsquo;ve lost isn&amp;rsquo;t a new idea. In 1845, &lt;a href=&#34;https://en.wikipedia.org/wiki/Henry_David_Thoreau&#34; rel=&#34;noopener&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Thoreau&lt;/a&gt; went to live in a small cabin in the woods for two years, searching for the same things, and rejecting the growing speed and materialism of his time.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Live in each season as it passes; breathe the air, drink the drink, taste the fruit, and resign yourself to the influence of the earth.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The defiance of what&amp;rsquo;s established and considered &amp;ldquo;normal&amp;rdquo; has always been seen as odd at first, rebellious later on, but perhaps that&amp;rsquo;s precisely what we all need: a slow revolution to change ourselves, and change the world.&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source srcset=&#34;https://josem.co/images/2025/forest_friends@2x.webp&#34; type=&#34;image/webp&#34;&gt;&lt;img src=&#34;https://josem.co//images/2025/forest_friends@2x.jpg&#34; alt=&#34;Group of friends in a forest&#34; decoding=&#34;async&#34; class=&#34;lazyload&#34; data-sizes=&#34;auto&#34; loading=&#34;lazy&#34;
          width=&#34;720&#34;  /&gt;&lt;/picture&gt;&lt;/p&gt;

    
</description>
      <abstract>We&#39;ve all been living under the promise that things will get faster, and oh boy, that promise has certainly been fulfilled. We now have faster transportation, fast food, two-hour delivery</abstract></item>
    
    <item>
      <title>From Simple to Ornate and Back Again</title><link>https://josem.co/simple-to-ornate-and-back-again/</link>
      <pubDate>Wed, 07 Aug 2024 05:04:53 +0200</pubDate>
      
      <guid>https://josem.co/simple-to-ornate-and-back-again/</guid><description type="html">&lt;p&gt;Art history shows us that we tend to move between adding &amp;ldquo;unnecessary&amp;rdquo; elaborate decorations to clean styles and back again. It&amp;rsquo;s almost an endless cycle repeated over and over.&lt;/p&gt;
&lt;p&gt;This cycle happens in the different arts and other fields where design is involved, like software. Let&amp;rsquo;s trace it in architecture first.&lt;/p&gt;
&lt;p&gt;Here is the &lt;a href=&#34;https://www.wikiart.org/en/romanesque-architecture/abbey-church-of-st-james-lebeny-hungary-1208-0&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Abbey Church of St James&lt;/a&gt; in Hungary (1206), a clear example of the Romanesque style. By its side, &lt;a href=&#34;https://en.wikipedia.org/wiki/Notre-Dame_de_Paris&#34; rel=&#34;noopener&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Notre Dame&lt;/a&gt;, completed in 1345. Take a moment to appreciate all the decorations in the second picture not present in the first one.&lt;/p&gt;
&lt;p class=&#34;bigger-image&#34;&gt;&lt;picture&gt;&lt;source srcset=&#34;https://josem.co/images/2024/simple-ornate/architecture1_double@2x.webp&#34; type=&#34;image/webp&#34;&gt;&lt;a href=&#34;https://josem.co/images/2024/simple-ornate/architecture1_double@2x.png&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;
            &lt;img src=&#34;https://josem.co//images/2024/simple-ornate/architecture1_double@2x.png&#34; alt=&#34;Abbey Church of St James, in Hungary, and Notre Dame by its side&#34; decoding=&#34;async&#34; class=&#34;lazyload&#34; data-sizes=&#34;auto&#34; loading=&#34;lazy&#34;
          width=&#34;1000&#34; /&gt;
          &lt;/a&gt;
        &lt;/picture&gt;
      &lt;/p&gt;

    
&lt;p&gt;This tendency to add more details and decorations to an already functioning element of architecture went out of fashion (like it had done in previous periods). Here, you can compare Notre Dame with the &lt;a href=&#34;https://it.wikipedia.org/wiki/Duomo_di_Pienza&#34; rel=&#34;noopener&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Cathedral of Pienza&lt;/a&gt;, an example of Renaissance architecture.&lt;/p&gt;
&lt;p class=&#34;bigger-image&#34;&gt;&lt;picture&gt;&lt;source srcset=&#34;https://josem.co/images/2024/simple-ornate/architecture2_double@2x.webp&#34; type=&#34;image/webp&#34;&gt;&lt;a href=&#34;https://josem.co/images/2024/simple-ornate/architecture2_double@2x.png&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;
            &lt;img src=&#34;https://josem.co//images/2024/simple-ornate/architecture2_double@2x.png&#34; alt=&#34;Notre Dame, in Paris, and the Cathedral of Pienza by its side&#34; decoding=&#34;async&#34; class=&#34;lazyload&#34; data-sizes=&#34;auto&#34; loading=&#34;lazy&#34;
          width=&#34;1000&#34; /&gt;
          &lt;/a&gt;
        &lt;/picture&gt;
      &lt;/p&gt;

    
&lt;p&gt;So, 250 years to realize again that we don&amp;rsquo;t want to add so many grandiose elements and prefer simplicity?&lt;/p&gt;
&lt;p&gt;If we move to Baroque and Rococo, it&amp;rsquo;s like going in the opposite direction again, adding more and more decorations that weren&amp;rsquo;t essential to the buildings. Here&amp;rsquo;s the Cathedral of Pienza compared to the &lt;a href=&#34;https://en.wikipedia.org/wiki/Catherine_Palace&#34; rel=&#34;noopener&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Catherine Palace&lt;/a&gt; in Russia.&lt;/p&gt;
&lt;p class=&#34;bigger-image&#34;&gt;&lt;picture&gt;&lt;source srcset=&#34;https://josem.co/images/2024/simple-ornate/architecture3_double@2x.webp&#34; type=&#34;image/webp&#34;&gt;&lt;a href=&#34;https://josem.co/images/2024/simple-ornate/architecture3_double@2x.png&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;
            &lt;img src=&#34;https://josem.co//images/2024/simple-ornate/architecture3_double@2x.png&#34; alt=&#34;Cathedral of Pienza compared to Catherine Palace, in Tsarskoe Selo&#34; decoding=&#34;async&#34; class=&#34;lazyload&#34; data-sizes=&#34;auto&#34; loading=&#34;lazy&#34;
          width=&#34;1000&#34; /&gt;
          &lt;/a&gt;
        &lt;/picture&gt;
      &lt;/p&gt;

    
&lt;p&gt;But after a while, we got tired and returned to simple and clear lines.&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source srcset=&#34;https://josem.co/images/2024/simple-ornate/architecture4@2x.webp&#34; type=&#34;image/webp&#34;&gt;&lt;img src=&#34;https://josem.co//images/2024/simple-ornate/architecture4@2x.png&#34; alt=&#34;Jefferson Memorial, 1943&#34; decoding=&#34;async&#34; class=&#34;lazyload&#34; data-sizes=&#34;auto&#34; loading=&#34;lazy&#34;
          width=&#34;720&#34;  /&gt;&lt;/picture&gt;&lt;em&gt;Thomas Jefferson Memorial in Washington, D.C&lt;/em&gt;&lt;/p&gt;

    
&lt;p&gt;The cycle between this highly detailed and elaborate style and returning to simple and clean elements is not perfect. Art is a complicated combination of influence, technique available at the time, and the historical context in which it&amp;rsquo;s developed. However, the pattern is there.&lt;/p&gt;
&lt;p class=&#34;bigger-image&#34;&gt;&lt;picture&gt;&lt;source srcset=&#34;https://josem.co/images/2024/simple-ornate/cycleart_double@2x.webp&#34; type=&#34;image/webp&#34;&gt;&lt;a href=&#34;https://josem.co/images/2024/simple-ornate/cycleart_double@2x.png&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;
            &lt;img src=&#34;https://josem.co//images/2024/simple-ornate/cycleart_double@2x.png&#34; alt=&#34;Cycle of art&#34; decoding=&#34;async&#34; class=&#34;lazyload&#34; data-sizes=&#34;auto&#34; loading=&#34;lazy&#34;
          width=&#34;1000&#34; /&gt;
          &lt;/a&gt;
        &lt;/picture&gt;
      &lt;/p&gt;

    
&lt;p&gt;The cycle is not only present in architecture. It can also be found in painting, photography, sculpting, literature, theatre, and even fashion. So it&amp;rsquo;s not surprising that we see it in software.&lt;/p&gt;
&lt;p&gt;This is one of the first text editors: vi. It was created in 1978, and it is as simple as it gets visually. Although you need to learn a shortcut or two to use it :)&lt;/p&gt;
&lt;p class=&#34;bigger-image&#34;&gt;&lt;picture&gt;&lt;source srcset=&#34;https://josem.co/images/2024/simple-ornate/vi_double@2x.webp&#34; type=&#34;image/webp&#34;&gt;&lt;a href=&#34;https://josem.co/images/2024/simple-ornate/vi_double@2x.png&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;
            &lt;img src=&#34;https://josem.co//images/2024/simple-ornate/vi_double@2x.png&#34; alt=&#34;Vi Editor&#34; decoding=&#34;async&#34; class=&#34;lazyload&#34; data-sizes=&#34;auto&#34; loading=&#34;lazy&#34;
          width=&#34;1000&#34; /&gt;
          &lt;/a&gt;
        &lt;/picture&gt;
      &lt;/p&gt;

    
&lt;p&gt;Here&amp;rsquo;s Microsoft Word, the king of text editors for a long time.&lt;/p&gt;
&lt;p class=&#34;bigger-image&#34;&gt;&lt;picture&gt;&lt;source srcset=&#34;https://josem.co/images/2024/simple-ornate/word1995_double.webp&#34; type=&#34;image/webp&#34;&gt;&lt;a href=&#34;https://josem.co/images/2024/simple-ornate/word1995_double.jpg&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;
            &lt;img src=&#34;https://josem.co//images/2024/simple-ornate/word1995_double.jpg&#34; alt=&#34;Microsoft Word&#34; decoding=&#34;async&#34; class=&#34;lazyload&#34; data-sizes=&#34;auto&#34; loading=&#34;lazy&#34;
          width=&#34;1000&#34; /&gt;
          &lt;/a&gt;
        &lt;/picture&gt;
      &lt;/p&gt;

    
&lt;p&gt;You could say it&amp;rsquo;s just the technology that didn&amp;rsquo;t allow developers to create something more visually appealing in the early 80s, and that&amp;rsquo;s partially right. But now, technology lets you do much more, and people are returning to this minimalism. Here&amp;rsquo;s iA Writer, a text editor for Mac I use to write these articles, and loved by many people.&lt;/p&gt;
&lt;p class=&#34;bigger-image&#34;&gt;&lt;picture&gt;&lt;source srcset=&#34;https://josem.co/images/2024/simple-ornate/iawriter_double@2x.webp&#34; type=&#34;image/webp&#34;&gt;&lt;a href=&#34;https://josem.co/images/2024/simple-ornate/iawriter_double@2x.png&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;
            &lt;img src=&#34;https://josem.co//images/2024/simple-ornate/iawriter_double@2x.png&#34; alt=&#34;iA Writer&#34; decoding=&#34;async&#34; class=&#34;lazyload&#34; data-sizes=&#34;auto&#34; loading=&#34;lazy&#34;
          width=&#34;1000&#34; /&gt;
          &lt;/a&gt;
        &lt;/picture&gt;
      &lt;/p&gt;

    
&lt;p&gt;You can find a similar tendency in Operating Systems like Mac OS. Here&amp;rsquo;s Mac OS X 10.0 (released in 2001).&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source srcset=&#34;https://josem.co/images/2024/simple-ornate/macosxcheetah@2x.webp&#34; type=&#34;image/webp&#34;&gt;&lt;img src=&#34;https://josem.co//images/2024/simple-ornate/macosxcheetah@2x.jpg&#34; alt=&#34;Mac OS X Cheetah&#34; decoding=&#34;async&#34; class=&#34;lazyload&#34; data-sizes=&#34;auto&#34; loading=&#34;lazy&#34;
          width=&#34;720&#34;  /&gt;&lt;/picture&gt;&lt;em&gt;2001 (&lt;a href=&#34;https://blog.aventure-apple.com/&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;source&lt;/a&gt;)&lt;/em&gt;&lt;/p&gt;

    
&lt;p&gt;And we&amp;rsquo;re clearly back to clean interfaces in a recent version of Mac OS X 14.0, released 22 years later.&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source srcset=&#34;https://josem.co/images/2024/simple-ornate/mac14@2x.webp&#34; type=&#34;image/webp&#34;&gt;&lt;img src=&#34;https://josem.co//images/2024/simple-ornate/mac14@2x.png&#34; alt=&#34;Mac OS X Sonoma&#34; decoding=&#34;async&#34; class=&#34;lazyload&#34; data-sizes=&#34;auto&#34; loading=&#34;lazy&#34;
          width=&#34;720&#34;  /&gt;&lt;/picture&gt;&lt;em&gt;2023&lt;/em&gt;&lt;/p&gt;

    
&lt;hr&gt;
&lt;h2 id=&#34;will-we-go-back-to-rococo-software&#34;&gt;Will We Go Back to &amp;ldquo;Rococo&amp;rdquo; Software?&lt;/h2&gt;
&lt;p&gt;I know it seems impossible now, but we&amp;rsquo;ll certainly will.&lt;/p&gt;
&lt;p&gt;We naturally get tired of the same design styles over time, so we&amp;rsquo;ll get a new wave of overly designed software in the next few years. Given its reduced timeline compared to architecture or painting, software will take more time to see this cycle clearly, but it&amp;rsquo;ll be there.&lt;/p&gt;
&lt;p&gt;That said, if we see software design as an independent visual art, it&amp;rsquo;s also possible that this change happens much more quickly, and what takes 100 years in architectural styles to change could take ten years in software. Only time will tell.&lt;/p&gt;
&lt;p&gt;In the meantime, let&amp;rsquo;s enjoy this period of mostly simple software that focuses on doing one thing without distracting you.&lt;/p&gt;
</description>
      <abstract>Art history shows us that we tend to move between adding &#34;unnecessary&#34; elaborate decorations to clean styles and back again. It&#39;s almost an endless cycle repeated over and over. This cycle happens in the different arts and other fields where design is involved, like software. Let&#39;s trace it in architecture first.</abstract></item>
    
    <item>
      <title>Why Parenting Makes You Human</title><link>https://josem.co/why-parenting-makes-you-human/</link>
      <pubDate>Wed, 17 Jul 2024 17:27:34 +0200</pubDate>
      
      <guid>https://josem.co/why-parenting-makes-you-human/</guid><description type="html">&lt;p&gt;A family in my environment has recently lost their child in a terrible accident. I cannot imagine what those parents must be going through, but it has made me reflect on what it means to be a parent.&lt;/p&gt;
&lt;p&gt;In this semi-digital world, we&amp;rsquo;re losing touch with what makes us feel fully alive, what makes us feel, cry, laugh, and bond. What makes us human.&lt;/p&gt;
&lt;p&gt;Some experiences can keep you in touch with that human side: art, an honest hug, faith, a good book, your first kiss, a genuine laugh, or losing someone you love. But those moments are few and far in between.&lt;/p&gt;
&lt;p&gt;There&amp;rsquo;s a more permanent act that can keep you connected to that human side that very few other things can: parenting.&lt;/p&gt;
&lt;p&gt;Interestingly enough, parenting starts almost as a selfish act. It all starts the moment we say: I want kids. It&amp;rsquo;s not that I want to help a new human being for the rest of their life by sacrificing myself; no, I want something for myself, someone in this case. I want kids.&lt;/p&gt;
&lt;p&gt;However, that selfish aspect of the planning phase goes away very soon.&lt;/p&gt;
&lt;p&gt;Sides are somehow turned from day one, even before that. You start to worry about someone else during pregnancy. &amp;ldquo;Will they be ok?&amp;rdquo;, &amp;ldquo;All I want is a healthy baby,&amp;rdquo; most say. And for the first time in your life, you know what it&amp;rsquo;s like to worry about another defenseless person.&lt;/p&gt;
&lt;p&gt;When a baby is born, you quickly find yourself giving more than receiving and it&amp;rsquo;s overwhelming at first. Your priorities shift, your time is no longer yours, and you learn what&amp;rsquo;s truly important in your life the first time you visit a hospital holding your sick baby.&lt;/p&gt;
&lt;p&gt;On the other hand, you start to feel love, compassion, gratitude, or joy in a way that is almost impossible to reproduce without that new person in your life. In the long term, it transform you into a more decent, understanding, patient, and overall better human being. For many parents, kids give them a purpose.&lt;/p&gt;
&lt;p&gt;And, when you die, you&amp;rsquo;ll probably remember the laughs, hugs, kisses, love, tears, and unique moments, and I don&amp;rsquo;t know anything else that can give you so much of that so often for so long.&lt;/p&gt;
&lt;p&gt;So, yes, in a way, parenting makes you more human, and that, on its own, is worth pursuing.&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source srcset=&#34;https://josem.co/images/2024/baby-parent@2x.webp 2x, https://josem.co/images/2024/baby-parent.webp&#34; type=&#34;image/webp&#34;&gt;&lt;img src=&#34;https://josem.co//images/2024/baby-parent.jpg&#34; alt=&#34;Baby and Parent&#34; decoding=&#34;async&#34; class=&#34;lazyload&#34; data-sizes=&#34;auto&#34; loading=&#34;lazy&#34;
          width=&#34;720&#34;  /&gt;&lt;/picture&gt;&lt;/p&gt;

    
</description>
      <abstract>What it means to be a parent and why it forces you to connect to a human and natural side of us that very few other things can.</abstract></item>
    
    <item>
      <title>How I Overcame My Addiction to Sugar</title><link>https://josem.co/how-i-overcame-my-addiction-to-sugar/</link>
      <pubDate>Sat, 29 Jun 2024 12:29:35 +0200</pubDate>
      
      <guid>https://josem.co/how-i-overcame-my-addiction-to-sugar/</guid><description type="html">&lt;p&gt;&lt;picture&gt;&lt;source srcset=&#34;https://josem.co/images/2024/sugar-cookies@2x.webp 2x, https://josem.co/images/2024/sugar-cookies.webp&#34; type=&#34;image/webp&#34;&gt;&lt;img src=&#34;https://josem.co//images/2024/sugar-cookies.jpg&#34; alt=&#34;Baked Cookies And Glass Of Milk&#34; decoding=&#34;async&#34; class=&#34;lazyload&#34; data-sizes=&#34;auto&#34; loading=&#34;lazy&#34;
          width=&#34;720&#34;  /&gt;&lt;/picture&gt;&lt;em&gt;Photo by &lt;a href=&#34;https://www.pexels.com/@suzyhazelwood/&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Suzy Hazelwood&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

    
&lt;p&gt;I remember my breakfast as a kid. It was as sugary as it gets, with cereal and milk or a good marmalade toast and a chocolate shake to start my day.&lt;/p&gt;
&lt;p&gt;I remember the highs and lows of my energy levels throughout the day or how I would look in the mirror and wonder why I grew as a chubby kid instead of thinner and stronger like some friends.&lt;/p&gt;
&lt;p&gt;I had no idea what a good diet looked like, and without any good examples to follow in my environment, I was pretty deep into an addiction that has been hard to defeat in my adulthood.&lt;/p&gt;
&lt;p&gt;The problem with sugar, apart from being &lt;a href=&#34;https://www.healthline.com/health/food-nutrition/experts-is-sugar-addictive-drug&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;very addictive&lt;/a&gt;, is that I used it as a gateway.&lt;/p&gt;
&lt;p&gt;Later in my adult life, when I felt stressed or overwhelmed, I drank a glass of milk and cookies and watched a movie at night. Somehow, the immediate pleasure of the taste was enough to make me forget about my problems. I felt better, even if it was just for a few minutes.&lt;/p&gt;
&lt;p&gt;When I didn&amp;rsquo;t have anything sugary at home to eat, I had to go to the supermarket, sometimes at embarrassingly late hours, to buy some cookies or a sponge cake.&lt;/p&gt;
&lt;p&gt;At some point in my early twenties, overweight and tired, I accepted I had a problem. I also learned that sugar is very addictive. So, I made a decision—no more added sugar in my diet.&lt;/p&gt;
&lt;p&gt;I cannot count how many times I&amp;rsquo;ve succumbed again to the addiction. These episodes, and how long they lasted, were thankfully less frequent and shorter over time, but it wasn&amp;rsquo;t a straight line from point A to point B.&lt;/p&gt;
&lt;p&gt;Thankfully, I&amp;rsquo;m in a much better position after countless drawbacks. I still have some added sugar here and there, like a dessert on a special occasion, but it&amp;rsquo;s far from my previous daily consumption levels.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;d say there are perhaps three aspects that helped me overcome my addiction.&lt;/p&gt;
&lt;h2 id=&#34;1-change-of-environment&#34;&gt;1. Change of environment&lt;/h2&gt;
&lt;p&gt;In 1971, the public knew that many soldiers in the Vietnam War were addicted to heroin. Authorities run tests to see who was addicted before returning home and then after the first, second, and third years. The results were surprisingly positive.&lt;/p&gt;
&lt;p&gt;Of all the men addicted in Vietnam, only 12% relapsed to addiction in the three years after returning home—almost 90% of the recovery rate.&lt;/p&gt;
&lt;p&gt;The main conclusion from the &lt;a href=&#34;https://findings.org.uk/PHP/dl.php?f=Robins_LN_3.cab&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;study&lt;/a&gt; is that a change of environment as radical as Vietnam&amp;rsquo;s during a war period compared to the US was critical for their recovery.&lt;/p&gt;
&lt;p&gt;I used this principle by taking some long vacations in the summer to stop eating sugar. I wasn&amp;rsquo;t at home and had a different schedule, but I&amp;rsquo;m sure it made things easier.&lt;/p&gt;
&lt;p&gt;When I came back, I moved to the second step.&lt;/p&gt;
&lt;h2 id=&#34;2-removing-the-possibility&#34;&gt;2. Removing the possibility&lt;/h2&gt;
&lt;p&gt;Not having anything sugary around the house made it easier not to take it. Of course, I could still buy it, but it was easier not to do it.&lt;/p&gt;
&lt;p&gt;When I returned from my trip, my fridge was empty, so I resisted the temptation to buy those products. This was a one-time challenge compared to the ongoing fight I would have endured if I had something at home.&lt;/p&gt;
&lt;h2 id=&#34;3-influential-habits&#34;&gt;3. Influential habits&lt;/h2&gt;
&lt;p&gt;Like water overflowing a vase and filling other vases around it, some habits have a positive rippling effect on your life.&lt;/p&gt;
&lt;p&gt;For example, after a good strength session at the gym, I didn&amp;rsquo;t want to have anything sugary, and overall, I was prone to eat healthier because my body needed more protein and good energy. Or if I drank enough water, I felt full and ate less overall.&lt;/p&gt;
&lt;p&gt;So, another thing I implemented was a good schedule for visiting the gym regularly, drinking enough water, and living an active lifestyle.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;I wish this could help someone out there struggling with the same problem. I can see sugar addiction is very common, even though many people don’t even think about it, but it is still bad for you and your freedom.&lt;/p&gt;
&lt;p&gt;Good luck if you’re struggling with something similar; you&amp;rsquo;ve got this!&lt;/p&gt;
&lt;p&gt;Until next time.&lt;/p&gt;
</description>
      <abstract>Overcoming any addiction is hard. Sugar is very addictive and bad for your health. Here&#39;s my journey fighting with that addiction so far in case it can help anyone out there.</abstract></item>
    
    <item>
      <title>Breaking Free from the News</title><link>https://josem.co/breaking-free-from-the-news/</link>
      <pubDate>Thu, 13 Jun 2024 17:57:11 +0200</pubDate>
      
      <guid>https://josem.co/breaking-free-from-the-news/</guid><description type="html">&lt;p&gt;I haven&amp;rsquo;t watched the news in over three years.&lt;/p&gt;
&lt;p&gt;Yes, I&amp;rsquo;m living in a bubble. We all are, but mine is a bit smaller. More controlled.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s not that I don&amp;rsquo;t care about our world, but we&amp;rsquo;re not designed to keep up with this level of information coming in from all directions. It sometimes feels too much because it is too much.&lt;/p&gt;
&lt;p&gt;I still remember how hard it was to resist the temptation to get another small dose of the daily external drama, perhaps to be a good and informed citizen, but more likely because it was easier to visit the news site one more time than to focus on what I truly wanted in life.&lt;/p&gt;
&lt;p&gt;That said, I&amp;rsquo;m still relatively well informed nowadays, but from sources that don&amp;rsquo;t use drama or stressing headlines suggesting the world will end every other week.&lt;/p&gt;
&lt;p&gt;There are many reasons to abandon this stream of negative and stressful facts. Here are mine.&lt;/p&gt;
&lt;h2 id=&#34;almost-all-news-are-negative&#34;&gt;Almost all news are negative&lt;/h2&gt;
&lt;p&gt;Haven&amp;rsquo;t you noticed it? They all present the world like it will end tomorrow (tragically, of course).&lt;/p&gt;
&lt;p&gt;I understand that negative news has an important role in our society. It can make us react to things and reflect on our problems, but there are also good things happening all the time.&lt;/p&gt;
&lt;p&gt;For example, just in the last 14 days, I&amp;rsquo;ve read that a glowing dye might help surgeons eradicate prostate cancer more easily (&lt;a href=&#34;https://medicalxpress.com/news/2024-06-dye-surgeons-eradicate-prostate-cancer.html&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;ref&lt;/a&gt;), and there&amp;rsquo;s a new algorithm that&amp;rsquo;s able to detect disinformation in real time (&lt;a href=&#34;https://techxplore.com/news/2024-05-algorithm-disinformation-social-media.html&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;ref&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;They&amp;rsquo;re not as attractive as reading about when World War III is coming to your neighborhood, but they also represent a part of what&amp;rsquo;s happening out there.&lt;/p&gt;
&lt;p&gt;For more &amp;ldquo;happy&amp;rdquo; news, you can read &lt;em&gt;Enlightenment now&lt;/em&gt;, by Steven Pinker. Some facts from the book:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You&amp;rsquo;re way less likely to die on the job. Every year.&lt;/li&gt;
&lt;li&gt;Time spent doing laundry fell from 11.5 hours a week in 1920 to an hour and a half in 2014.&lt;/li&gt;
&lt;li&gt;You&amp;rsquo;re 37 times less likely to be killed by a lightning bolt than at the turn of the century.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;i-dont-have-enough-context-to-understand&#34;&gt;I don&amp;rsquo;t have enough context to understand&lt;/h2&gt;
&lt;p&gt;Here&amp;rsquo;s a recent headline:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;South Korea fires warning shots as North Korean soldiers briefly cross border.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;After reading that sentence, I understand what happened. Still, I don&amp;rsquo;t have enough historical knowledge to know exactly where the conflict between the two countries came from, what the general feeling about North Korea in South Korea is nowadays, a general view of the cultural context in the two countries, and a long list of essential details that give this headline its proper place in History.&lt;/p&gt;
&lt;h2 id=&#34;most-news-doesnt-live-for-too-long&#34;&gt;Most news doesn&amp;rsquo;t live for too long&lt;/h2&gt;
&lt;p&gt;In Ancient Greek, the word ἐφημερῐ́ς (ephemeris), from ἐφήμερος, could be translated as &amp;ldquo;short-lived,&amp;rdquo; showing that news has a short life.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m not indifferent to bad things happening in the world, but let me show you an example. Here&amp;rsquo;s a headline from one year ago on the cover page of the &lt;a href=&#34;https://www.nytimes.com/2023/06/22/us/titanic-missing-submarine-implosion.html&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;New York Times&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Deep in the Atlantic, a &amp;lsquo;Catastrophic Implosion&amp;rsquo; and Five Lives Lost.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Five people died trying to see the R.M.S. Titanic using a poorly designed submarine for that depth.&lt;/p&gt;
&lt;p&gt;Considering that around 63 million people died in 2023 in the world, do I have those five people present in my thoughts after a year? Do you?&lt;/p&gt;
&lt;p&gt;I wish this didn&amp;rsquo;t happen, but it did.&lt;/p&gt;
&lt;p&gt;If a similar accident happens again, do we need to know? Will it improve our lives in any way? Or will it make us suffer a bit for those people and their families for a few days, and then we&amp;rsquo;ll move on to the next drama that the media wants to use to sell more?&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;I&amp;rsquo;m developing a more comprehensive theory about choices in a capitalist world.&lt;/p&gt;
&lt;p&gt;Since everything is within our reach in a capitalist society (products, experiences, media, drugs, alcohol, etc.), people will be able to differentiate themselves by being able to control how (and if) they consume these things and have more freedom, or they just live addicted to them.&lt;/p&gt;
&lt;p&gt;We could also apply this to news consumption, but knowing we&amp;rsquo;re fighting an uphill battle here.&lt;/p&gt;
&lt;p&gt;Consuming something in moderation that&amp;rsquo;s designed to catch your attention and keep you reading is hard. So you need a better strategy than saying, &amp;ldquo;Just five more minutes, and I&amp;rsquo;ll be back at work.&lt;/p&gt;
&lt;p&gt;We must eliminate entirely or at least think carefully about how we read the news.&lt;/p&gt;
&lt;h2 id=&#34;a-different-approach-to-be-informed&#34;&gt;A different approach to be informed&lt;/h2&gt;
&lt;p&gt;Instead of opening a news site and reading about what&amp;rsquo;s happening now, I prefer a more calm approach, reading about things that will still matter tomorrow and using non-clickbait headlines if possible.&lt;/p&gt;
&lt;p&gt;For that, there are some good options:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A weekly (instead of daily) newspaper like the Economist. More in-depth analysis of what happened last week since they&amp;rsquo;re not focused on what&amp;rsquo;s happening now and have great journalists.&lt;/li&gt;
&lt;li&gt;A more generalist news source like &lt;a href=&#34;https://www.reddit.com/r/worldnews/&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;/r/worldnews&lt;/a&gt; on Reddit.&lt;/li&gt;
&lt;li&gt;A more neutral list of news like the &lt;a href=&#34;https://en.wikipedia.org/wiki/Portal:Current_events&#34; rel=&#34;noopener&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;current events on Wikipedia&lt;/a&gt;. It doesn&amp;rsquo;t use almost any images, and if you want to read more, you can go to the source.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;using-books-instead-of-expiring-news&#34;&gt;Using books instead of expiring news&lt;/h2&gt;
&lt;p&gt;Following the &lt;a href=&#34;https://en.wikipedia.org/wiki/Lindy_effect&#34; rel=&#34;noopener&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Lindy effect&lt;/a&gt;, we could assume that the longer some information or idea has been around, the more likely it is to stay relevant. That inevitably leads us to books.&lt;/p&gt;
&lt;p&gt;Instead of constantly checking the news, we can spend more time reading good books that have shaped the world. There are countless lists about any topic you can imagine, so I won&amp;rsquo;t share any. If you need help figuring out where to start, reading about History is an excellent first choice.&lt;/p&gt;
</description>
      <abstract>Our attention and capacity to think are finite like a small battery draining out every time we get another piece of information. So, it&#39;s important to be selective about how much, how often, and in which form we get this information to have more mental space to focus on what we want.</abstract></item>
    
    <item>
      <title>You&#39;re Wearing the Wrong Pair of Shoes</title><link>https://josem.co/youre-wearing-the-wrong-pair-of-shoes/</link>
      <pubDate>Wed, 15 May 2024 08:24:42 +0200</pubDate>
      
      <guid>https://josem.co/youre-wearing-the-wrong-pair-of-shoes/</guid><description type="html">&lt;p&gt;I read somewhere that we should invest a lot in whatever separates us from the floor: our mattress, our car (or tires, more specifically), or our shoes.&lt;/p&gt;
&lt;p&gt;There are countless options when it comes to shoes, but most of them are the wrong choice for your feet. Let&amp;rsquo;s see why.&lt;/p&gt;
&lt;h2 id=&#34;your-foot-and-its-natural-shape&#34;&gt;Your foot and its natural shape&lt;/h2&gt;
&lt;p&gt;The main problem with our shoes is that they need to be designed based on our feet&amp;rsquo; natural form. Here&amp;rsquo;s a photograph from a &lt;a href=&#34;https://www.tuhykorinek.cz/wp-content/uploads/2016/12/1905hoffman.pdf&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;study made in 1905 by Phil. Hoffmann&lt;/a&gt;, in which he compared the feet of people who wore shoes to people who didn&amp;rsquo;t.&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;img src=&#34;https://josem.co//images/2024/foot-image.jpeg&#34; alt=&#34;Feet form, natural vs shaped&#34; decoding=&#34;async&#34; class=&#34;lazyload&#34; data-sizes=&#34;auto&#34; loading=&#34;lazy&#34;
          width=&#34;720&#34;  /&gt;&lt;/picture&gt;&lt;/p&gt;

    
&lt;p&gt;The image shows wide feet and fingers separated from one another. In contrast, this image shows how the feet adapt to the shoe shape.&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source srcset=&#34;https://josem.co/images/2024/feet-shoes@2x.webp 2x, https://josem.co/images/2024/feet-shoes.webp&#34; type=&#34;image/webp&#34;&gt;&lt;img src=&#34;https://josem.co//images/2024/feet-shoes.png&#34; alt=&#34;Feet, shaped by shoes&#34; decoding=&#34;async&#34; class=&#34;lazyload&#34; data-sizes=&#34;auto&#34; loading=&#34;lazy&#34;
          width=&#34;720&#34;  /&gt;&lt;/picture&gt;&lt;/p&gt;

    
&lt;p&gt;We can see a more extreme case from China called &lt;a href=&#34;https://en.wikipedia.org/wiki/Foot_binding&#34; rel=&#34;noopener&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;foot binding&lt;/a&gt;. In this practice, women bound their feet to modify their natural form and put them in very tiny shoes. You can Google some images of the results if you&amp;rsquo;re up for it, but let me tell you, it&amp;rsquo;s not nice.&lt;/p&gt;
&lt;p&gt;Still, it proves more strongly that feet can be shaped if we force them into a hard shape day in and day out.&lt;/p&gt;
&lt;h2 id=&#34;why-is-having-a-different-shape-in-our-feet-a-problem&#34;&gt;Why is having a different shape in our feet a problem?&lt;/h2&gt;
&lt;p&gt;Maybe you don&amp;rsquo;t mind having my feet shaped like that, but it&amp;rsquo;s not only aesthetics. By losing their natural form, your feet can no longer serve you equally well, and you might have problems.&lt;/p&gt;
&lt;p&gt;We lose function in parts of the foot, including the arch and toes, due to the constriction of modern shoe design, and we tend to have static foot conditions.&lt;/p&gt;
&lt;p&gt;You can check &lt;a href=&#34;https://naturalfootgear.com/blogs/educational-articles/foot-health-research-resources&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;here&lt;/a&gt; a complete list of references about this topic.&lt;/p&gt;
&lt;h2 id=&#34;whats-the-solution-going-barefoot&#34;&gt;What&amp;rsquo;s the solution? Going barefoot?&lt;/h2&gt;
&lt;p&gt;Well, kind of. The idea is to wear shoes that support our natural form and protect our feet from cuts, slippery surfaces, etc.&lt;/p&gt;
&lt;p&gt;These shoes are usually called minimal shoes or barefoot shoes, and there are countless brands available nowadays.&lt;/p&gt;
&lt;p&gt;The ideal shoe should be flat, give enough space for your feet and fingers, and be suited for your environment (weather, usual surface, etc.).&lt;/p&gt;
&lt;p&gt;Also, you can go barefoot when you&amp;rsquo;re at home.&lt;/p&gt;
&lt;h2 id=&#34;adaptation-period-a-rocky-period&#34;&gt;Adaptation period, a rocky period&lt;/h2&gt;
&lt;p&gt;Apart from feeling the surface on each step, you might have an adaptation period during which your Achilles tendon hurts. This is normal since these barefoot shoes don&amp;rsquo;t usually have any &amp;ldquo;drop,&amp;rdquo; which means the angle between your heel and your toes is near zero.&lt;/p&gt;
&lt;p&gt;You can start wearing a few days a week, for a few hours, and overtime completely replace your other shoes.&lt;/p&gt;
&lt;h2 id=&#34;some-recommendations&#34;&gt;Some recommendations&lt;/h2&gt;
&lt;p&gt;I don&amp;rsquo;t get any referrals for these recommendations, but I hate when people point me toward an entirely new category of products and leave me clueless about brands or what to look for.&lt;/p&gt;
&lt;p&gt;Here are some excellent options. These brands are expensive, although not so much if you compare them with some cool Nike shoes.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://www.vivobarefoot.com/&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Vivo Barefoot&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.vibram.com/&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Vibram&lt;/a&gt; (famous for their five-finger design).&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://feelgrounds.com/&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Feel Grounds&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Going barefoot. Try to spend more time without shoes, at home, on the grass, etc.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It will take you some time to adapt, and, indeed, we&amp;rsquo;re not used to this natural form of shoes aesthetically, but your feet will thank you twenty years from now.&lt;/p&gt;
</description>
      <abstract>I read somewhere that we should invest a lot in whatever separates us from the floor: our mattress, our car (or tires, more specifically), or our shoes. When it comes to shoes, most of them are the wrong choice for your feet. Let&#39;s see why.</abstract></item>
    
    <item>
      <title>Start Today</title><link>https://josem.co/start-today/</link>
      <pubDate>Fri, 29 Dec 2023 16:04:11 +0100</pubDate>
      
      <guid>https://josem.co/start-today/</guid><description type="html">&lt;p&gt;Don&amp;rsquo;t wait until January 1st, or next Monday, or any other random date when you think everything will be perfectly aligned to start. Do something before today ends.&lt;/p&gt;
&lt;p&gt;Do you want to get fit and still cannot go to the gym for some reason? Do 100 burpees today, or go for a run.&lt;/p&gt;
&lt;p&gt;Do you want to read more? Try to read ten pages before going to bed.&lt;/p&gt;
&lt;p&gt;Do you want to meditate or adopt any other habit? Start small; a minute or two of that activity, and you can increase that time tomorrow.&lt;/p&gt;
&lt;p&gt;When January 1st or that Monday comes, you&amp;rsquo;ll already be on the journey, not on the sidelines. And more importantly, you would have overcome the procrastination, which was the real challenge, not the day you&amp;rsquo;re in, whether is December 29th or January 1st.&lt;/p&gt;
&lt;p&gt;See you next year.&lt;/p&gt;
</description>
      <abstract>Don&#39;t wait until January 1st, or next Monday, or any other random date when you think everything will be perfectly aligned to start. Do something before today ends.</abstract></item>
    
    <item>
      <title>The Real Price of Things</title><link>https://josem.co/the-real-price-of-things/</link>
      <pubDate>Wed, 06 Dec 2023 18:11:37 +0100</pubDate>
      
      <guid>https://josem.co/the-real-price-of-things/</guid><description type="html">&lt;p&gt;When we buy something, we pay only a small fraction of its cost.&lt;/p&gt;
&lt;p&gt;I reflected on this while also realizing how many good things capitalism does for us (others not so good, but that&amp;rsquo;s for another day). Given enough demand, more companies compete to offer you a better product, usually at a lower price. Products get better and cheaper over time.&lt;/p&gt;
&lt;p&gt;Take &amp;lsquo;Elden Ring&amp;rsquo; as an example. This video game, five years in the making, can be purchased for 60 USD and is yours forever. Hundreds of people have been working on something for years, and you can get it for 60 USD. It&amp;rsquo;s a bargain.&lt;/p&gt;
&lt;h2 id=&#34;a-realistic-look-at-the-total-cost&#34;&gt;A realistic look at the total cost&lt;/h2&gt;
&lt;p&gt;Now you start playing. According to this &lt;a href=&#34;https://www.reddit.com/r/Eldenring/comments/tilmgk/how_many_hours_yall_put_into_elden_ring_so_far/&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Reddit post&lt;/a&gt; where people sharing their playtime, some have around 175 hours, some even more. Think about that for a moment. One hundred seventy-five hours of your life are gone because of a video game.&lt;/p&gt;
&lt;p&gt;If we were dying of cancer next week, our time would be priceless, but we can be more conservative and assign a monetary value to our time to understand this cost. Let&amp;rsquo;s say 100 USD per hour—or 50 USD if we&amp;rsquo;re young and careless.&lt;/p&gt;
&lt;p&gt;So, do the math: 175 hours * 50 USD = 8750 USD.&lt;/p&gt;
&lt;p&gt;Now, that&amp;rsquo;s a more realistic price. But there&amp;rsquo;s more, like the opportunity cost of not doing something else with your time. You also need to store that plastic box, carry it around if you move to a new place, or spend some time taking pictures to sell it online.&lt;/p&gt;
&lt;p&gt;This principle isn&amp;rsquo;t limited to video games. Anything consuming hours of our lives carries an enormous price tag.&lt;/p&gt;
&lt;h2 id=&#34;a-positive-return-on-investment&#34;&gt;A positive return on investment&lt;/h2&gt;
&lt;p&gt;Like buying Apple stocks in 2007, spending our time well can also bring us positive returns.&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source srcset=&#34;https://josem.co/images/2023/apple_stock@2px.webp&#34; type=&#34;image/webp&#34;&gt;&lt;img src=&#34;https://josem.co//images/2023/apple_stock@2px.png&#34; alt=&#34;Apple Stock Price chart&#34; decoding=&#34;async&#34; class=&#34;lazyload&#34; data-sizes=&#34;auto&#34; loading=&#34;lazy&#34;
          width=&#34;720&#34;  /&gt;&lt;/picture&gt;&lt;/p&gt;

    
&lt;p&gt;We only get small dopamine hits playing a video game, but, like an addict, we&amp;rsquo;ll be craving for more as soon as we&amp;rsquo;re done.&lt;/p&gt;
&lt;p&gt;Imagine you buy a kettlebell or a barbell with some weights instead. The product cost is relatively cheap, but the time you can spend with them is high. The difference here is that that time, as costly as it sounds on paper, will improve your life. You&amp;rsquo;ll be stronger and increase your lifespan, so the net result of the investment is worthwhile.&lt;/p&gt;
&lt;h2 id=&#34;conclusion&#34;&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;By being more mindful, we could better control how we spend our time, present and future. Paying the initial price is just the beginning. And we should think twice before deciding if paying it in full is worth it.&lt;/p&gt;
</description>
      <abstract>When we buy something, we pay only a small fraction of its cost. Anything consuming hours of our lives carries an enormous price tag.</abstract></item>
    
    <item>
      <title>Your Next Ten Years</title><link>https://josem.co/your-next-ten-years/</link>
      <pubDate>Wed, 22 Nov 2023 06:38:32 +0100</pubDate>
      
      <guid>https://josem.co/your-next-ten-years/</guid><description type="html">&lt;p&gt;It&amp;rsquo;s amazing what we can achieve in ten years.&lt;/p&gt;
&lt;p&gt;At 15, Hakeem Olajuwon joined a local Nigerian sports tournament. He had planned to play handball there but ended up playing basketball, and it changed his life.&lt;/p&gt;
&lt;p&gt;&amp;ldquo;He couldn&amp;rsquo;t even dunk at first,&amp;rdquo; said one of his first coaches in an &lt;a href=&#34;https://news.google.com/newspapers?nid=1345&amp;amp;dat=19830404&amp;amp;id=2rUSAAAAIBAJ&amp;amp;sjid=mvkDAAAAIBAJ&amp;amp;pg=5114,528204&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;interview&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The article&amp;rsquo;s headline was &amp;ldquo;Olajuwon: He&amp;rsquo;s not the best yet.&amp;rdquo; They didn&amp;rsquo;t know how accurate it was.&lt;/p&gt;
&lt;p&gt;A decade later, he was the undisputed leader of the Houston Rockets in the 1988-1989 season. He went from knowing nothing about basketball to being one of the greatest players in the world&amp;rsquo;s most competitive league.&lt;/p&gt;
&lt;p&gt;Olajuwon&amp;rsquo;s journey shows that, with time and consistency, we can achieve anything in ten years.&lt;/p&gt;
&lt;h2 id=&#34;10-years--10000-hours&#34;&gt;10 years ≃ 10,000 hours&lt;/h2&gt;
&lt;p&gt;You&amp;rsquo;ve probably heard about the 10,000-hour rule already. It takes around 10,000 hours of intensive practice to master complex skills and topics.&lt;/p&gt;
&lt;p&gt;This equates to roughly 2 hours and 40 minutes of daily practice over ten years.&lt;/p&gt;
&lt;p&gt;If we want to get good at anything, we must dedicate at least that much time each day. And day by day, we&amp;rsquo;ll get closer to the golden mark. Imagine the painter&amp;rsquo;s strokes becoming more confident with each canvas or a musician feeling his fingers getting nimbler every day.&lt;/p&gt;
&lt;p&gt;This daily pace is flexible and can change over the years, too. We may start with one hour a day, and then, after a year, we increase it because we have more time.&lt;/p&gt;
&lt;h2 id=&#34;ten-years-can-be-split-into-phases&#34;&gt;Ten years can be split into phases&lt;/h2&gt;
&lt;p&gt;The ten-year period is also helpful for gaining perspective, as we can divide it into phases.&lt;/p&gt;
&lt;p&gt;We can focus the first year on the basics of whatever we&amp;rsquo;re doing, like learning a new language, and then increase the difficulty and level of focus as we progress.&lt;/p&gt;
&lt;p&gt;We&amp;rsquo;ll probably be more fullfilled if we accept it will take such a long time. That&amp;rsquo;s what happened to me when I resumed this blog.&lt;/p&gt;
&lt;p&gt;I began writing more seriously in 2023 and strive to write daily. Often, I don&amp;rsquo;t publish my work, but it&amp;rsquo;s still practice.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m not expecting to gain a large audience or sign a book deal within the next six months. However, writing one article a week for ten years will amount to 520 articles. I might not be great by then, but I&amp;rsquo;ll certainly be much better.&lt;/p&gt;
&lt;p&gt;So, when considering our goals, let&amp;rsquo;s think long-term. We&amp;rsquo;ll probably end up way further than we think if we keep going.&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source srcset=&#34;https://josem.co/images/2023/olajuwon@2x.webp&#34; type=&#34;image/webp&#34;&gt;&lt;img src=&#34;https://josem.co//images/2023/olajuwon@2x.jpg&#34; alt=&#34;Hakeem Olajuwon&#34; decoding=&#34;async&#34; class=&#34;lazyload&#34; data-sizes=&#34;auto&#34; loading=&#34;lazy&#34;
          width=&#34;720&#34;  /&gt;&lt;/picture&gt;&lt;em&gt;Hakeem Olajuwon (by Mitchell Layton)&lt;/em&gt;&lt;/p&gt;

    
</description>
      <abstract>When considering our goals, let&#39;s think long-term. We&#39;ll probably end up way further than we think if we keep going.</abstract></item>
    
    <item>
      <title>Don&#39;t Hijack Our Browser Shortcuts</title><link>https://josem.co/dont-hijack-our-browser-shortcuts/</link>
      <pubDate>Fri, 17 Nov 2023 07:29:38 +0100</pubDate>
      
      <guid>https://josem.co/dont-hijack-our-browser-shortcuts/</guid><description type="html">&lt;p&gt;I&amp;rsquo;m angry today.&lt;/p&gt;
&lt;p&gt;As web apps become increasingly complex, developers need more shortcuts to map various actions. Now we have countless shortcuts for any site.&lt;/p&gt;
&lt;p&gt;Take &lt;a href=&#34;https://docs.github.com/en/get-started/accessibility/keyboard-shortcuts&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;GitHub&amp;rsquo;s shortcuts&lt;/a&gt; as an example; they have a few.&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source srcset=&#34;https://josem.co/images/2023/github_shortcuts@2x.webp&#34; type=&#34;image/webp&#34;&gt;&lt;img src=&#34;https://josem.co//images/2023/github_shortcuts@2x.png&#34; alt=&#34;Github Shortcuts Screenshot&#34; decoding=&#34;async&#34; class=&#34;lazyload&#34; data-sizes=&#34;auto&#34; loading=&#34;lazy&#34;
          width=&#34;720&#34;  /&gt;&lt;/picture&gt;&lt;/p&gt;

    
&lt;p&gt;But there&amp;rsquo;s a limit, and I&amp;rsquo;m here to draw that line.&lt;/p&gt;
&lt;p&gt;Your website shouldn&amp;rsquo;t hijack the default browser shortcuts.&lt;/p&gt;
&lt;p&gt;Don&amp;rsquo;t assume your feature is more important than years of muscle memory. I want to get things done, but I feel lost when I use a shortcut, and your website does something else instead or tries to replace the default behavior of the browser.&lt;/p&gt;
&lt;p&gt;Have you tried doing CMD/Ctrl + F on &lt;a href=&#34;https://www.dropbox.com/paper/start&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Paper (Dropbox)&lt;/a&gt;? You&amp;rsquo;ll get a surprise.&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source srcset=&#34;https://josem.co/images/2023/paper_dropbox@2x.webp&#34; type=&#34;image/webp&#34;&gt;&lt;img src=&#34;https://josem.co//images/2023/paper_dropbox@2x.png&#34; alt=&#34;Paper Find feature&#34; decoding=&#34;async&#34; class=&#34;lazyload&#34; data-sizes=&#34;auto&#34; loading=&#34;lazy&#34;
          width=&#34;720&#34;  /&gt;&lt;/picture&gt;&lt;/p&gt;

    
&lt;p&gt;What about Developer Tools in Chrome?&lt;/p&gt;
&lt;p&gt;Switching to another profile with Cmd/Ctrl + Shift + M? Ah no, sorry. You&amp;rsquo;ll see a nice mobile view of the current website instead.&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source srcset=&#34;https://josem.co/images/2023/developer_tools.webp&#34; type=&#34;image/webp&#34;&gt;&lt;img src=&#34;https://josem.co//images/2023/developer_tools.png&#34; alt=&#34;Chrome Developer Tools&#34; decoding=&#34;async&#34; class=&#34;lazyload&#34; data-sizes=&#34;auto&#34; loading=&#34;lazy&#34;
          width=&#34;720&#34;  /&gt;&lt;/picture&gt;&lt;/p&gt;

    
&lt;p&gt;I&amp;rsquo;m not against progress; I accept that web apps like Google Sheets are so complex that they need our poor right-click menus for their things, but please leave our shortcuts alone. You can always choose from the long list of free shortcuts that are still available.&lt;/p&gt;
&lt;p&gt;Any potential speed benefit we might get in your app with that shortcut is offset by the annoyance of being unable to do what we always do. Thanks, but no thanks.&lt;/p&gt;
</description>
      <abstract>Any potential speed benefit we might get in your app with that shortcut is offset by the annoyance of being unable to do what we always do.</abstract></item>
    
    <item>
      <title>Happiness Is Not a Scroll Away</title><link>https://josem.co/happiness-is-not-a-scroll-away/</link>
      <pubDate>Mon, 13 Nov 2023 05:30:25 +0100</pubDate>
      
      <guid>https://josem.co/happiness-is-not-a-scroll-away/</guid><description type="html">&lt;p&gt;When you open your browser, you usually have a legitimate interest. What&amp;rsquo;s the weather like tomorrow? How long is the flight? How do you write &amp;ldquo;definitively&amp;rdquo;?&lt;/p&gt;
&lt;p&gt;All valid questions, and the Internet provides.&lt;/p&gt;
&lt;p&gt;But then, you jump to another type of content. This second phase starts with a dangerous question that defines what you&amp;rsquo;re about to do: &amp;ldquo;What new things do you have for me?&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;Like in a slot machine, you insert your coin and pull the lever of the Internet to see what you get.&lt;/p&gt;
&lt;p&gt;You open a news site, then another one in case you missed anything. Done with that, you dive into social media, scrolling through a sea of random pictures from people you&amp;rsquo;ve never met.&lt;/p&gt;
&lt;p&gt;There&amp;rsquo;s this nagging feeling that the next scroll might reveal something amazing, and you might miss it if you don&amp;rsquo;t keep scrolling.&lt;/p&gt;
&lt;p&gt;Since infinite scrolling is the norm nowadays for many apps and sites, you&amp;rsquo;re like &lt;a href=&#34;https://en.wikipedia.org/wiki/Sisyphus&#34; rel=&#34;noopener&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Sisyphus&lt;/a&gt;: eternally rolling the boulder up a hill, only for it to roll back down each time he neared the top. Putting the boulder away is the only way to finish.&lt;/p&gt;
&lt;p&gt;You&amp;rsquo;re aware, deep down, that endless scrolling will only leave you feeling mentally drained. True happiness doesn&amp;rsquo;t hide in the next image or video you&amp;rsquo;ll see.&lt;/p&gt;
&lt;p&gt;When you get lost in your feed, you&amp;rsquo;re just avoiding the next challenging task.&lt;/p&gt;
&lt;h2 id=&#34;some-ways-to-prevent-mindless-scrolling&#34;&gt;Some ways to prevent mindless scrolling&lt;/h2&gt;
&lt;p&gt;It&amp;rsquo;s hard, but if you don&amp;rsquo;t allow this endless browsing to happen, you can get more time to dedicate to what can truly make you happy and fulfilled. Here are a few things you can try.&lt;/p&gt;
&lt;h3 id=&#34;catch-yourself-before-it-happens&#34;&gt;Catch yourself before it happens&lt;/h3&gt;
&lt;p&gt;It might sound trivial, but it works. Set up an alarm every hour to get you back from the mindless scrolling. This alarm can be enabled throughout your day, and it&amp;rsquo;ll catch you once or twice in the middle of doing something you don&amp;rsquo;t want to do.&lt;/p&gt;
&lt;h3 id=&#34;meditation&#34;&gt;Meditation&lt;/h3&gt;
&lt;p&gt;Our default mode of functioning in the world is through automatisms. Waiting in line? Check the phone. Watching a movie? Let&amp;rsquo;s snack.&lt;/p&gt;
&lt;p&gt;If you start meditating, you can become more aware of your acts. What am I doing now? How do I feel? What do I want to do next? Those questions will help you to tame the mind.&lt;/p&gt;
&lt;p&gt;I use an app called &lt;a href=&#34;https://dynamic.wakingup.com/shareOpenAccess/SC3A79457&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Waking Up&lt;/a&gt;, but &lt;a href=&#34;https://headspace-web.app.link/mVkKBeIiDEb&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Headspace&lt;/a&gt; is also really good.&lt;/p&gt;
&lt;h3 id=&#34;remove-distractions&#34;&gt;Remove distractions&lt;/h3&gt;
&lt;p&gt;Like that &lt;a href=&#34;https://josem.co/the-domino-effect-of-good-habits/&#34; rel=&#34;noopener&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;croissant&lt;/a&gt; waiting for you in the kitchen, removing the temptation is better. Uninstall the apps you know are not helping you, block access to the news sites, and leave the phone in another room at night. If the distraction is not there, you&amp;rsquo;re safe.&lt;/p&gt;
&lt;h3 id=&#34;allocate-specific-times-for-tasks&#34;&gt;Allocate specific times for tasks&lt;/h3&gt;
&lt;p&gt;Want to tackle that lingering to-do list item? Set aside the next 45 minutes as if it&amp;rsquo;s an unmissable doctor&amp;rsquo;s appointment. During that time, let this task be your sole focus.&lt;/p&gt;
&lt;p&gt;Practice with all of this, and see how it goes. Having a more focused mind is one of the key ingredients in happiness, so any effort in that direction will be a great investment.&lt;/p&gt;
&lt;p&gt;And remember, happiness is not a scroll away.&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source srcset=&#34;https://josem.co/images/2023/reading-park@2x.webp&#34; type=&#34;image/webp&#34;&gt;&lt;img src=&#34;https://josem.co//images/2023/reading-park@2x.jpg&#34; alt=&#34;A person reading in a park&#34; decoding=&#34;async&#34; class=&#34;lazyload&#34; data-sizes=&#34;auto&#34; loading=&#34;lazy&#34;
          width=&#34;720&#34;  /&gt;&lt;/picture&gt;&lt;em&gt;Photo by &lt;a href=&#34;https://www.pexels.com/@yaroslav-shuraev/&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Yaroslav Shuraev&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

    
&lt;hr&gt;
</description>
      <abstract>There&#39;s this nagging feeling that the next scroll might reveal something amazing, and you might miss it if you don&#39;t keep scrolling.</abstract></item>
    
    <item>
      <title>The Domino Effect of Good Habits</title><link>https://josem.co/the-domino-effect-of-good-habits/</link>
      <pubDate>Tue, 07 Nov 2023 04:35:34 +0100</pubDate>
      
      <guid>https://josem.co/the-domino-effect-of-good-habits/</guid><description type="html">&lt;p&gt;Opening your eyes, you glance at the clock on the night table—time to get up.&lt;/p&gt;
&lt;p&gt;The house is completely silent as you make your way to the kitchen. Each sound feels amplified at this early time in the morning.&lt;/p&gt;
&lt;p&gt;Entering the kitchen, you remember the fantastic croissant your partner bought you yesterday. It looks delicious and crispy on the outside. It must taste so good. You can&amp;rsquo;t help but wonder if you should have it. After many failed attempts over the years, you&amp;rsquo;ve resolved to usually have a healthy breakfast, but it&amp;rsquo;s just one day.&lt;/p&gt;
&lt;p&gt;After finally eating the croissant, you still have an hour before work.&lt;/p&gt;
&lt;p&gt;Pondering what to do with that hour, you skip the gym today and prepare for work. You can always go tomorrow. Besides, there&amp;rsquo;s so much to do at work that you can use that extra time.&lt;/p&gt;
&lt;p&gt;Your manager has told you the project needs to be ready by next week, so after some time browsing email and checking different messages, you start working on it.&lt;/p&gt;
&lt;p&gt;Getting to a challenging part, you start to procrastinate. This is not so much of a voluntary decision; your brain wants a way out. A bit of YouTube, a bit of Instagram, and somehow, it&amp;rsquo;s already lunchtime. You have done way less of what you had in mind.&lt;/p&gt;
&lt;p&gt;Finishing lunch, you&amp;rsquo;re determined to work much more, but still, the to-do list doesn&amp;rsquo;t shrink at all. Time passes, and after a long day, you finally come home and have dinner. Feeling tired and upset with the unproductive day, you turn on the TV to feel better.&lt;/p&gt;
&lt;p&gt;After watching an episode of the latest trending TV show, feeling really sleepy, you go to bed. Before closing your eyes, you realize you&amp;rsquo;re not prioritizing what you truly want to do, and you&amp;rsquo;re just working all the time, but how did it happen?&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;Some small habits are like little domino pieces that can make you go in the right or wrong direction with the rest of your decisions.&lt;/p&gt;
&lt;p&gt;If you eat something sugary, like that crunchy croissant, your energy level will drop thanks to the glucose curve. You get high glucose levels in your bloodstream, which then falls as fast, leaving you a bit dizzy and with low energy levels.&lt;/p&gt;
&lt;p&gt;It was only a croissant, but since you didn&amp;rsquo;t have the energy because you didn&amp;rsquo;t have a healthy breakfast, you decided to skip the gym.&lt;/p&gt;
&lt;p&gt;Skipping the gym felt bad at the end of the day. You&amp;rsquo;re finally determined to make health a top priority in your life, and yet, you didn&amp;rsquo;t make any progress. Not working out today also made you feel less focused at work because of your hormone levels.&lt;/p&gt;
&lt;p&gt;Making your bed first thing in the morning or having a good breakfast are little choices, but they have a rippling effect on the rest of your day, filling your day with what you truly want to do or with a miserable life.&lt;/p&gt;
&lt;p&gt;A good and happy day is based on a chain of habits, so start your days with the good ones, and somehow, the rest will fall into place.&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source srcset=&#34;https://josem.co/images/2023/domino@2x.webp&#34; type=&#34;image/webp&#34;&gt;&lt;img src=&#34;https://josem.co//images/2023/domino@2x.jpg&#34; alt=&#34;Domino tiles falling in a row&#34; decoding=&#34;async&#34; class=&#34;lazyload&#34; data-sizes=&#34;auto&#34; loading=&#34;lazy&#34;
          width=&#34;720&#34;  /&gt;&lt;/picture&gt;&lt;em&gt;Photo by &lt;a href=&#34;https://www.pexels.com/@ron-lach/&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Ron Lach&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

    
</description>
      <abstract>Some small habits are like little domino pieces that can make you go in the right or wrong direction with the rest of your decisions</abstract></item>
    
    <item>
      <title>The Beauty of Finished Software</title><link>https://josem.co/the-beauty-of-finished-software/</link>
      <pubDate>Tue, 31 Oct 2023 08:32:49 +0200</pubDate>
      
      <guid>https://josem.co/the-beauty-of-finished-software/</guid><description type="html">&lt;p&gt;Let me introduce you to &lt;a href=&#34;https://en.wikipedia.org/wiki/WordStar&#34; rel=&#34;noopener&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;WordStar 4.0&lt;/a&gt;, a popular word processor from the early 80s.&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source srcset=&#34;https://josem.co/images/wordstar.webp&#34; type=&#34;image/webp&#34;&gt;&lt;img src=&#34;https://josem.co//images/wordstar.jpg&#34; alt=&#34;Wordstar 4.0&#34; decoding=&#34;async&#34; class=&#34;lazyload&#34; data-sizes=&#34;auto&#34; loading=&#34;lazy&#34;
          width=&#34;720&#34;  /&gt;&lt;/picture&gt;&lt;em&gt;WordStar 4.0&lt;/em&gt;&lt;/p&gt;

    
&lt;p&gt;As old as it seems, George R.R. Martin used it to write &amp;ldquo;A Song of Ice and Fire&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;Why would someone use such an old piece of software to write over 5,000 pages? I love how he puts it:&lt;/p&gt;

&lt;blockquote&gt;
It does everything I want a word processing program to do and it doesn&#39;t do anything else. I don&#39;t want any help. I hate some of these modern systems where you type up a lowercase letter and it becomes a capital. I don&#39;t want a capital, if I&#39;d wanted a capital, I would have typed the capital.&lt;cite&gt;&lt;a href=&#34;https://josem.co/#rf1&#34; class=&#34;reference&#34;&gt;George R.R. Martin&lt;/a&gt;&lt;/cite&gt;&lt;/blockquote&gt;

&lt;p&gt;This program embodies the concept of finished software — a software you can use forever with no unneeded changes.&lt;/p&gt;
&lt;p&gt;Finished software is software that&amp;rsquo;s not expected to change, and that&amp;rsquo;s a feature! You can rely on it to do some real work.&lt;/p&gt;
&lt;p&gt;Once you get used to the software, once the software works for you, you don&amp;rsquo;t need to learn anything new; the interface will exactly be the same, and all your files will stay relevant. No migrations, no new payments, no new changes.&lt;/p&gt;
&lt;p&gt;This kind of software can be created intentionally, with a compromise from the creators that they won&amp;rsquo;t bother you with things you don&amp;rsquo;t need, and only the absolutely necessary will change, like minor updates to make it compatible with new operating systems.&lt;/p&gt;
&lt;p&gt;Sometimes, finished software happens accidentally; maybe the company behind it has disappeared, or the product has been abandoned.&lt;/p&gt;
&lt;p&gt;There are also some great examples in the UNIX world of finished software: commands like &lt;code&gt;cd&lt;/code&gt;(to change the current directory) or &lt;code&gt;ls&lt;/code&gt;(to list what&amp;rsquo;s there) won&amp;rsquo;t ever change in a significant way. You can rely on them until the end of your career.&lt;/p&gt;
&lt;h2 id=&#34;the-seduction-of-constant-updates&#34;&gt;The seduction of constant updates&lt;/h2&gt;
&lt;p&gt;Our expectations for software are different from other products we use in our daily lives.&lt;/p&gt;
&lt;p&gt;When we buy a physical product, we accept that it won&amp;rsquo;t change in its lifetime. We&amp;rsquo;ll use it until it wears off, and we replace it. We can rely on that product not evolving; the gas pedal in my car will always be in the same place.&lt;/p&gt;
&lt;p&gt;However, when it comes to software, we usually have the ingrained expectations of perpetual updates. We believe that if software doesn&amp;rsquo;t evolve it&amp;rsquo;ll be boring, old and unusable. If we see an app with no updates in the last year, we think the creator might be dead.&lt;/p&gt;
&lt;p&gt;We also expect new versions of any software will be better than the previous ones. Once it&amp;rsquo;s released, most of our problems will be solved! What a deceiving lie.&lt;/p&gt;
&lt;p&gt;Sometimes, a software upgrade is a step backward: less usable, less stable, with new bugs. Even if it&amp;rsquo;s genuinely better, there&amp;rsquo;s the learning curve. You were efficient with the old version, but now your most used button is on the other side of the screen under a hidden menu.&lt;/p&gt;
&lt;h2 id=&#34;finished-software-is-a-good-reminder&#34;&gt;Finished software is a good reminder&lt;/h2&gt;
&lt;p&gt;In a world where constant change is the norm, finished software provides a breath of fresh air. It&amp;rsquo;s a reminder that reliability, consistency, and user satisfaction can coexist in the realm of software development.&lt;/p&gt;
&lt;p&gt;So the next time you find yourself yearning for the latest update, remember that sometimes, the best software is the one that doesn&amp;rsquo;t change at all.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&#34;references&#34;&gt;References&lt;/h3&gt;
&lt;p&gt;&lt;span class=&#34;reference-note&#34; id=&#34;rf1&#34;&gt;[1] George R.R. Martin in Conan show (2014). &lt;a href=&#34;https://www.youtube.com/watch?v=X5REM-3nWHg&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;https://www.youtube.com/watch?v=X5REM-3nWHg&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
</description>
      </item>
    
    <item>
      <title>Avoiding Addictions</title><link>https://josem.co/avoiding-addictions/</link>
      <pubDate>Wed, 25 Oct 2023 08:29:25 +0200</pubDate>
      
      <guid>https://josem.co/avoiding-addictions/</guid><description type="html">&lt;p&gt;Capitalism is great at giving people what they demand and making them even want things they don&amp;rsquo;t need. Once a company creates a product or service, the industry streamlines its production, distribution, and sales to maximize efficiency. The more they sell, the better it is for the business.&lt;/p&gt;
&lt;p&gt;Living in a market-driven society is a blessing if you want to buy a good fork or a reliable car. However, there&amp;rsquo;s a flip side to this coin: an entire sector focuses on enticing consumers with addictive products and services, and that&amp;rsquo;s where the danger begins.&lt;/p&gt;
&lt;p&gt;Think about it. Tobacco, alcohol, sugary food, or drugs are available to you almost anywhere at all hours, often at incredibly competitive prices. There are also some services or experiences you can use designed to be addictive, like slot machines, sports bets, or social media. Even regular news is usually framed to generate a feeling of anxiety, leaving you craving more information.&lt;/p&gt;
&lt;p&gt;Believing you can indulge in these product in a controlled way is like thinking you can make a consistent income from daily visits to the casino.&lt;/p&gt;
&lt;p&gt;The issue is that many of us are already entangled in the web of these deliberately addictive offerings, making it challenging to regulate our consumption.&lt;/p&gt;
&lt;p&gt;You&amp;rsquo;re up against a massive industry with substantial financial resources that has studied and discovered what works best to keep you in the hook. Sometimes, their work is easy since the product itself is addictive, but even then, they&amp;rsquo;ll make sure you have a great image of it and will perfect it to get most of your money for the cheapest possible product to produce.&lt;/p&gt;
&lt;p&gt;What alternatives do you have, then? Because once you&amp;rsquo;ve put some of these addictions in your life, keeping them at bay is extremely hard.&lt;/p&gt;
&lt;p&gt;The only realistic strategy is to avoid these addictive traps like the plague. Some of them can kill you, so the analogy is not too far from reality.&lt;/p&gt;
&lt;p&gt;Protecting your physical and mental well-being and how you spend your precious time each day must become a top priority. In an ideal world, some of these products and services shouldn&amp;rsquo;t exist at all, but they do, and those who profit from them will ensure that you crave them.&lt;/p&gt;
&lt;p&gt;Companies behind these addictive products and services don&amp;rsquo;t care about the consequences of consuming what they sell as long as they keep selling.&lt;/p&gt;
&lt;p&gt;Your only option is to realize you&amp;rsquo;ll always lose the game if you start playing, so ignore them completely and look at healthier alternatives. Your life depends on it.&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source srcset=&#34;https://josem.co/images/sunflowers@2x.webp&#34; type=&#34;image/webp&#34;&gt;&lt;img src=&#34;https://josem.co//images/sunflowers@2x.jpg&#34; alt=&#34;Sunflowers at sun rise&#34; decoding=&#34;async&#34; class=&#34;lazyload&#34; data-sizes=&#34;auto&#34; loading=&#34;lazy&#34;
          width=&#34;720&#34;  /&gt;&lt;/picture&gt;&lt;em&gt;Photo by &lt;a href=&#34;https://www.pexels.com/@peter-de-vink-288978/&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Peter de Vink&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

    
</description>
      </item>
    
    <item>
      <title>Leaving the Phone at Home</title><link>https://josem.co/leaving-the-phone-at-home/</link>
      <pubDate>Fri, 20 Oct 2023 12:24:16 +0200</pubDate>
      
      <guid>https://josem.co/leaving-the-phone-at-home/</guid><description type="html">&lt;p&gt;I&amp;rsquo;ve been experimenting with ways to be more disconnected from technology for a long time, from disabling notifications to using a dumbphone. However, a challenging exercise still hard to do is to go for a walk without my phone.&lt;/p&gt;
&lt;p&gt;When I leave my place without my phone, I feel like I&amp;rsquo;m leaving my pants at home; the whole experience is stressful. What if someone needs me? What if I need it for something? How am I going to survive?&lt;/p&gt;
&lt;p&gt;After a few times, I got used to it and realized being disconnected also connects us with a past where people didn&amp;rsquo;t have cell phones. Can you imagine?&lt;/p&gt;
&lt;p&gt;You leave it behind, and now you&amp;rsquo;re entirely free; no one will bother you with anything, no new likes on Instagram, no new offers on Amazon, no meaningless WhatsApps. Nothing. Just a walk, a great day, and your freedom.&lt;/p&gt;
&lt;p&gt;Why does it feel so liberating?&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s just a device, you might say. Oh no, it&amp;rsquo;s much more than that. It&amp;rsquo;s a chain you carry 24/7 connected to the rest of the world, and anyone can pull from the other side. People you care about, sure, but also a random algorithm that thinks you might be hungry, sending you a food delivery offer so you don&amp;rsquo;t cook today.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s try simplicity and get some freedom for a bit, just a 15-minute walk, no phone, no music, just the world and you, walking and thinking, for once, freely.&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source srcset=&#34;https://josem.co/images/walking@2x.webp&#34; type=&#34;image/webp&#34;&gt;&lt;img src=&#34;https://josem.co//images/walking@2x.jpg&#34; alt=&#34;Photo of man walking freely&#34; decoding=&#34;async&#34; class=&#34;lazyload&#34; data-sizes=&#34;auto&#34; loading=&#34;lazy&#34;
          width=&#34;720&#34;  /&gt;&lt;/picture&gt;&lt;em&gt;Photo by &lt;a href=&#34;https://www.pexels.com/@efrem-efre-2786187/&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Efrem Efre&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

    
</description>
      </item>
    
    <item>
      <title>Guiding Like a Lighthouse</title><link>https://josem.co/guiding-like-a-lighthouse/</link>
      <pubDate>Sun, 10 Sep 2023 15:14:29 +0200</pubDate>
      
      <guid>https://josem.co/guiding-like-a-lighthouse/</guid><description type="html">&lt;p&gt;I&amp;rsquo;ve always loved lighthouses. Apart from their astounding views and beautiful settings, they&amp;rsquo;re a great reminder of how we can have a deeper meaning in our lives.&lt;/p&gt;
&lt;p&gt;We live in a world where you don&amp;rsquo;t need to talk too much to anyone if you don&amp;rsquo;t want to.&lt;/p&gt;
&lt;p&gt;Do you want a pizza, an Uber, or a date? Open the right app and tap on the right places.&lt;/p&gt;
&lt;p&gt;Do you want to feel important? Post a photo, and some random people will give you their virtual hearts.&lt;/p&gt;
&lt;p&gt;The human connection needed for survival seems too distant nowadays, too virtual to realize it&amp;rsquo;s still there.&lt;/p&gt;
&lt;p&gt;So, what does it matter what you do with your life then? What&amp;rsquo;s the point in doing certain things correctly if nobody cares and they&amp;rsquo;re all minding their own businesses?&lt;/p&gt;
&lt;p&gt;Lighthouses can still prove us wrong. The first ones were built over two thousand years ago. They emit their lights with the same frequency, night after night, week after week, non-stop.&lt;/p&gt;
&lt;p&gt;A ship in the middle of the storm might see that light coming from the coast, and its crew will save their lives. And yet, the lighthouse keeper&lt;a href=&#34;https://josem.co/#rf1&#34; class=&#34;reference&#34;&gt;[1]&lt;/a&gt; will never know. But the lighthouse will keep working.&lt;/p&gt;
&lt;p&gt;Our lives, as disconnected from others as they seem, have the potential to be positive beacons for our fellow human beings.&lt;/p&gt;
&lt;p&gt;Were you friendly with the cashier in the supermarket? Maybe the person behind you in the line saw it and was positively affected by that.&lt;/p&gt;
&lt;p&gt;Are you taking care of your health? Your significant other or friends may draw inspiration from your commitment to well-being.&lt;/p&gt;
&lt;p&gt;In the middle of the night, it seems nobody cares about that lighthouse working, but the light might save someone out there. And that, indeed, can make all the difference.&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source srcset=&#34;https://josem.co/images/lighthouse@2x.webp 2x, https://josem.co/images/lighthouse.webp&#34; type=&#34;image/webp&#34;&gt;&lt;img src=&#34;https://josem.co//images/lighthouse.jpg&#34; alt=&#34;Lighthouse at night&#34; decoding=&#34;async&#34; class=&#34;lazyload&#34; data-sizes=&#34;auto&#34; loading=&#34;lazy&#34;
          width=&#34;720&#34;  /&gt;&lt;/picture&gt;&lt;em&gt;Lighthouse at night&lt;/em&gt;&lt;/p&gt;

    
&lt;h2 id=&#34;references&#34;&gt;References&lt;/h2&gt;
&lt;p&gt;&lt;span class=&#34;reference-note&#34; id=&#34;rf1&#34;&gt;[1] Most lighthouses are fully automated nowadays, but some around the world still depend on their keepers. This &lt;a href=&#34;https://en.wikipedia.org/wiki/Lighthouse_keeper&#34; rel=&#34;noopener&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Wikipedia article&lt;/a&gt; shows the current status.&lt;/span&gt;&lt;/p&gt;
</description>
      </item>
    
    <item>
      <title>You Are Already There</title><link>https://josem.co/you-are-already-there/</link>
      <pubDate>Sat, 27 May 2023 05:25:13 +0200</pubDate>
      
      <guid>https://josem.co/you-are-already-there/</guid><description type="html">&lt;p&gt;I&amp;rsquo;ve been fighting all my life. I always wanted to move forward, to get somewhere.&lt;/p&gt;
&lt;p&gt;Once I pass that exam, everything will be ok.&lt;/p&gt;
&lt;p&gt;Once I get my degree, I&amp;rsquo;ll be fulfilled and happy.&lt;/p&gt;
&lt;p&gt;Once I get enough money, my life will be great.&lt;/p&gt;
&lt;p&gt;I was always looking forward to the next stage, always wanting something more. Like if all my problems would fade away as soon as I achieved something. But then, when I got there, I felt happy for a moment and then back to needing something more in my life.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m done with that.&lt;/p&gt;
&lt;p&gt;That constant wishing for something more, something else, leaves me unfulfilled and unhappy with the current situation, whatever it is.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m already there; I&amp;rsquo;ve already arrived at the right time and the right place. Everything is great as it is.&lt;/p&gt;
&lt;p&gt;I might have some things I want to do, or things I want to improve, but my present is where I am and where I want to be.&lt;/p&gt;
&lt;p&gt;When I watch my kids, I can see they already know this. They play fully absorbed in the present moment. There&amp;rsquo;s nothing else but that. They&amp;rsquo;ve already arrived where they want to be.&lt;/p&gt;
&lt;p&gt;Maybe we all knew this when we were kids, but someone, perhaps ourselves, told us otherwise at some point in our life.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s get back to that state of mind.&lt;/p&gt;
&lt;p&gt;We&amp;rsquo;re all already there. We just need to notice.&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source srcset=&#34;https://josem.co/images/kid-playing@2x.webp 2x, https://josem.co/images/kid-playing.webp&#34; type=&#34;image/webp&#34;&gt;&lt;img src=&#34;https://josem.co//images/kid-playing.jpg&#34; alt=&#34;Kid Playing&#34; decoding=&#34;async&#34; class=&#34;lazyload&#34; data-sizes=&#34;auto&#34; loading=&#34;lazy&#34;
          width=&#34;720&#34;  /&gt;&lt;/picture&gt;&lt;em&gt;Photo by &lt;a href=&#34;https://unsplash.com/@leorivas&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Leo Rivas&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

    
</description>
      </item>
    
    <item>
      <title>My Biggest Mistake Working Remotely</title><link>https://josem.co/my-biggest-mistake-working-remotely/</link>
      <pubDate>Wed, 24 May 2023 03:55:01 +0200</pubDate>
      
      <guid>https://josem.co/my-biggest-mistake-working-remotely/</guid><description type="html">&lt;p&gt;I&amp;rsquo;ve been working fully remotely for more than ten years now. The last eight as a software engineer at Buffer, a fully remote company since its inception in 2010.&lt;/p&gt;
&lt;p&gt;From all these years, I&amp;rsquo;ve learned a lot: how to balance my work and my personal life, how to communicate better when I write, heck I&amp;rsquo;ve even learned how to use the right emoji at the right time; it&amp;rsquo;s more useful than you think if you&amp;rsquo;re on Slack each day. 😉&lt;/p&gt;
&lt;p&gt;In all those years, I&amp;rsquo;ve also made many mistakes. Way more than I can count, but among those, one is very common among remote workers: reducing my personal relationships at work to almost zero.&lt;/p&gt;
&lt;p&gt;When you start working remotely, you suddenly realize how much freedom you have and how little you need to talk about anything outside work with colleagues. You might have some meetings (calls in the remote jargon) here and there, and if you&amp;rsquo;re lucky, you start to develop some relationships, but you don&amp;rsquo;t have those moments when you can talk about anything simply because they don&amp;rsquo;t exist. Each call has a purpose; each interruption has a cost.&lt;/p&gt;
&lt;p&gt;Also, if you live outside a big city, you won&amp;rsquo;t attend many events related to your work, which will decrease your chances of meeting new people in your industry even more.&lt;/p&gt;
&lt;p&gt;Developing relationships in a fully remote company is hard; you&amp;rsquo;re isolated by design. In-person meetings can help a lot even if they don&amp;rsquo;t happen so often, but you can also visit some colleagues on your own. The real solution is really caring about others in your work environment, which will naturally nurture those relationships and pave the foundation for great relationships.&lt;/p&gt;
&lt;p&gt;Some people find this aspect of remote work so hard that they avoid it altogether, and I get it. We&amp;rsquo;re social creatures; even the most heads-down hardcore programmer in any company needs some social interactions from time to time. We shouldn&amp;rsquo;t neglect this important aspect of our well-being and instead develop better relationships there.&lt;/p&gt;
</description>
      </item>
    
    <item>
      <title>How to Change the World</title><link>https://josem.co/how-to-change-the-world/</link>
      <pubDate>Fri, 28 Apr 2023 07:27:00 +0200</pubDate>
      
      <guid>https://josem.co/how-to-change-the-world/</guid><description type="html">&lt;p&gt;There are two fundamental components in the world: human beings and nature. By influencing either one of them, you can effectively create change in the world.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s hard to have a significant impact on nature, though. Even if you use your bike more, recycle regularly, or vote for the right politicians to pass environmentally-friendly laws, your impact will be small. While we should all strive to make a difference, we won&amp;rsquo;t be able to witness much of that impact in our lifetimes.&lt;/p&gt;
&lt;p&gt;When we picture changing the world, some grandiose ideas and leaders come to mind: Gandhi, Martin Luther King Jr., Nelson Mandela, etc. But we don&amp;rsquo;t need to be so big; all of us can&amp;rsquo;t become great leaders. Instead, there&amp;rsquo;s a more realistic approach to changing the world -a more approachable and natural way of doing it- through interactions and relationships with people.&lt;/p&gt;
&lt;p&gt;Whenever you encounter someone, you&amp;rsquo;re having an impact on that person. It can be good, bad, or neutral. If you&amp;rsquo;re polite and say &amp;ldquo;hi,&amp;rdquo; you&amp;rsquo;re probably being neutral. If you yell at the driver that just made a sudden turn on the road, and they hear you, you&amp;rsquo;re probably making their day worse (and yours!).&lt;/p&gt;
&lt;p&gt;But what if we take each encounter as an opportunity for change, for a positive impact?&lt;/p&gt;
&lt;p&gt;Instead of saying &amp;ldquo;hello&amp;rdquo; to your coworker, spend 10 minutes asking about how they are, caring about their family and friends, and the events in their life. Truly listen, and be there for them.&lt;/p&gt;
&lt;p&gt;When paying in a business, be genuinely thankful for the service to the person there and wish them a great day.&lt;/p&gt;
&lt;p&gt;You might call names to that driver that was a bit distracted, but if that person were your father or your mother, your reaction would be different. If someone makes something wrong, imagine they&amp;rsquo;re a relative and act as if that person can be forgiven and loved.&lt;/p&gt;
&lt;p&gt;There&amp;rsquo;s also a great benefit to trying to impact the world through other people positively: you&amp;rsquo;ll feel happier and more fulfilled.&lt;/p&gt;
&lt;p&gt;Somehow, when you give more, you&amp;rsquo;ll also receive more. It&amp;rsquo;s not a zero-sum game where you lose and the other person wins. If you smile at the cashier, you likely feel better, and they smile at you too. Try it; the world will be better because of you.&lt;/p&gt;
</description>
      </item>
    
    <item>
      <title>Foundational Habits</title><link>https://josem.co/foundational-habits/</link>
      <pubDate>Fri, 21 Apr 2023 05:04:53 +0200</pubDate>
      
      <guid>https://josem.co/foundational-habits/</guid><description type="html">&lt;p&gt;If you&amp;rsquo;re like most people, you have some free time every day to choose what to do with daily outside obligations like work or taking care of your family.&lt;/p&gt;
&lt;p&gt;What you do with your free time has a direct and profound impact physically and mentally, and you probably repeat some activities each day. They&amp;rsquo;ve become your habits now.&lt;/p&gt;
&lt;p&gt;If we repeat certain behaviors daily, wouldn&amp;rsquo;t it be helpful to think deeply about what they bring to our life? Any change in them will significantly impact our lives.&lt;/p&gt;
&lt;h2 id=&#34;picking-the-right-habits&#34;&gt;Picking the right habits&lt;/h2&gt;
&lt;p&gt;Now, which habits should you incorporate? Which ones are important?
I recommend incorporating two sets of habits.&lt;/p&gt;
&lt;p&gt;The first group is whatever brings you closer to your priorities in life. If you&amp;rsquo;re progressing in your career, and that&amp;rsquo;s important to you, things like learning more and networking will be key. This group will likely vary on each individual, so I can&amp;rsquo;t comment too much on that.&lt;/p&gt;
&lt;p&gt;The second group is foundational habits. Independently of what you&amp;rsquo;re doing with your life, they will provide you with a solid ground to build the rest of things.&lt;/p&gt;
&lt;p&gt;Most people can incorporate many of these habits in one way or the other. They&amp;rsquo;re only four, and will take care of your mind, your body and your time.&lt;/p&gt;
&lt;h3 id=&#34;meditation&#34;&gt;Meditation&lt;/h3&gt;
&lt;p&gt;If you can breathe and get 10 minutes of free time each day, you can meditate.&lt;/p&gt;
&lt;p&gt;One thing is certain: until you die, you&amp;rsquo;ll live with the same brain for the rest of your life (unless we can transplant brains like hard drives in the future, but I don&amp;rsquo;t think we&amp;rsquo;re there yet). This means that any work you do to improve how you perceive the world and how you think will go with you for the rest of your life.&lt;/p&gt;
&lt;p&gt;Meditation changes everything. Any experience that you have in life (good, bad, neutral) goes through your conscious mind. Life has its ups and downs, but if you meditate regularly, you can control how much anything affects you and your overall level of contentment.&lt;/p&gt;
&lt;h3 id=&#34;eat-well&#34;&gt;Eat well&lt;/h3&gt;
&lt;p&gt;Our bodies will also be with us in everything we do from now until our last day, so taking care of them is our top two priority.&lt;/p&gt;
&lt;p&gt;Prioritize unprocessed and unrefined food and avoid sugar, alcohol, and bad fats.&lt;/p&gt;
&lt;p&gt;This &lt;a href=&#34;https://legionathletics.com/healthy-meal-planning-tips/&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;article&lt;/a&gt; pictures a clear way of what&amp;rsquo;s important regarding nutrition if you want to have a fit body, but there are other great sources out there on what to eat, like &lt;a href=&#34;https://nutritionfacts.org/&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Nutrition Facts&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&#34;work-out&#34;&gt;Work out&lt;/h3&gt;
&lt;p&gt;Prioritize strength training over other types of exercise, but combine it with others if you like to practice a particular sport.&lt;/p&gt;
&lt;p&gt;If you like to play tennis, or run, keep doing it but introduce at least three days a week strength training. I&amp;rsquo;ve been following the program described in &lt;a href=&#34;https://amzn.to/3KHFv7K&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;this great book&lt;/a&gt; for years.&lt;/p&gt;
&lt;p&gt;If you&amp;rsquo;ve never worked out or visited a gym consistently, focus on strength training for now.&lt;/p&gt;
&lt;p&gt;Strength training doesn&amp;rsquo;t have to be fun; it is basic maintenance of your body, like brushing your teeth. You don&amp;rsquo;t need to like it, but when it becomes a habit, you feel you need it.&lt;/p&gt;
&lt;p&gt;Just 30 to 60 minutes a week of weight training may significantly reduce your chance of premature death from cancer, heart disease, and other health problems. (&lt;a href=&#34;https://bjsm.bmj.com/content/56/13/755&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Ref&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;Add some form of cardio a couple of days a week if you don&amp;rsquo;t do anything outside lifting weights to maximize the health benefits.&lt;/p&gt;
&lt;h3 id=&#34;remove-distractions&#34;&gt;Remove distractions&lt;/h3&gt;
&lt;p&gt;Lastly, we have a finite amount of time in our lives, Around 4000 weeks, so we need to protect it.&lt;/p&gt;
&lt;p&gt;If you want to balance your life and still carry on your responsibilities in your job, family, etc., you simply don&amp;rsquo;t have enough time to be distracted.&lt;/p&gt;
&lt;p&gt;Ditch that TV, remove all the distracting apps for your phone, and you&amp;rsquo;ll realize you can get a lot of time back each day.&lt;/p&gt;
&lt;p&gt;You can indulge in a movie or a TV show occasionally, but it needs to be controlled. The infinite scrolling from social media or the constant pressure of watching the last thing coming to Netflix will conflict with your priorities, so put those out of your life.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;One caveat about habits before you go.&lt;/p&gt;
&lt;p&gt;The main problem with improving your life is that once you&amp;rsquo;ve done it, and incorporated one of these habits; you don&amp;rsquo;t remember what it was like before. You might not even value those habits anymore.&lt;/p&gt;
&lt;p&gt;If you&amp;rsquo;re eating healthy and avoiding alcohol, you no longer know what it feels like to wake up one day overweight and with a big hungover from yesterday.&lt;/p&gt;
&lt;p&gt;But these habits are your foundation; they provide immense value and a great framework for the rest of your life, so go and start now.&lt;/p&gt;
</description>
      </item>
    
    <item>
      <title>Own Your Work</title><link>https://josem.co/own-your-work/</link>
      <pubDate>Sun, 02 Apr 2023 06:31:01 +0200</pubDate>
      
      <guid>https://josem.co/own-your-work/</guid><description type="html">&lt;p&gt;One of the easiest ways to start sharing your work in the form of writing, designs, or photographs is by using the latest trendy platform in that space, especially when everyone else seems to be using it.&lt;/p&gt;
&lt;p&gt;How many Blogspot sites are you checking these days? They still work, but Google has killed &lt;a href=&#34;https://killedbygoogle.com/&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;one or two services&lt;/a&gt;, so who knows for how long?&lt;/p&gt;
&lt;p&gt;Medium was great for publishing content, but it doesn&amp;rsquo;t seem to be &lt;a href=&#34;https://news.ycombinator.com/item?id=34743772&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;the case&lt;/a&gt; anymore.&lt;/p&gt;
&lt;p&gt;Nowadays, many people start a Substack newsletter if they want to share content and monetize it too, but will it be around in five or ten years? What will happen with your content and your audience if they&amp;rsquo;re not?&lt;/p&gt;
&lt;p&gt;Imagine a billionaire buying one of the main social media services and some things not going as expected. What would happen with all the effort you&amp;rsquo;ve put into it that brought your followers and your content?&lt;/p&gt;
&lt;p&gt;You&amp;rsquo;re safer assuming all platforms and any work and content you put there will eventually be gone, so don&amp;rsquo;t put all your eggs in one basket—especially one you don&amp;rsquo;t own.&lt;/p&gt;
&lt;p&gt;Claiming your place online has never been easier, so we no longer need to trust external organizations with our creations.&lt;/p&gt;
&lt;p&gt;Buy &lt;a href=&#34;https://www.namesilo.com/domain/search-domains?rid=da86199wc&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;a domain&lt;/a&gt; you like, create a simple site with a technology you can maintain for a long time, like a static HTML site or even a simple WordPress theme can help you if you&amp;rsquo;re not tech-savvy, and pour your creativity there. Do you want to share your writings, photos, or designs? That should be the place.&lt;/p&gt;
&lt;p&gt;If it&amp;rsquo;s important enough for you to spend time creating something, it&amp;rsquo;s important enough to have a safe online place.&lt;/p&gt;
&lt;p&gt;You&amp;rsquo;ll own everything, and it&amp;rsquo;ll be yours forever. No investors, no market changes, and not a single external factor will sweep away all your work there.&lt;/p&gt;
&lt;p&gt;Use external platforms to expand your audience and engage with others. You can adapt your content to suit each platform&amp;rsquo;s specific features and audiences while maintaining the original and long-lasting content on your site. The rest will eventually be gone.&lt;/p&gt;
</description>
      </item>
    
    <item>
      <title>Call Yourself Titles</title><link>https://josem.co/call-yourself-titles/</link>
      <pubDate>Sat, 25 Mar 2023 16:07:34 +0100</pubDate>
      
      <guid>https://josem.co/call-yourself-titles/</guid><description type="html">&lt;p&gt;We constantly question ourselves when attempting anything new for the first time, which is daunting. And what&amp;rsquo;s worse, it prevents us from doing anything new, so we can&amp;rsquo;t change who we are.&lt;/p&gt;
&lt;p&gt;If you&amp;rsquo;ve always been terrible at sports and want to start working out, the natural reaction after a few attempts is to stop and return to your old habits. At the end of the day, you&amp;rsquo;re not an athlete.&lt;/p&gt;
&lt;p&gt;If you&amp;rsquo;ve always drawn poorly and always had low marks in arts, and want to start drawing, after a few attempts, you might wonder, what am I even doing? I&amp;rsquo;m not an artist. And so on and so forth. But there&amp;rsquo;s a solution to this challenge: calling ourselves with the new title very early in the process.&lt;/p&gt;
&lt;p&gt;We become a runner when we start running a few days a week. An amateur one, a beginner in the world of runners, but a runner nonetheless. And runners run.&lt;/p&gt;
&lt;p&gt;If you start going to the gym to improve your fitness (and not just record yourself to post it on TikTok), you&amp;rsquo;re an athlete. Yes, you&amp;rsquo;re not a CrossFit world champion; you&amp;rsquo;re a beginner, but an athlete at the end of the day.&lt;/p&gt;
&lt;p&gt;And here&amp;rsquo;s where the magic happens. If you&amp;rsquo;re now an athlete, you&amp;rsquo;ll go to the gym often and pay attention to your nutrition because that&amp;rsquo;s what athletes do. When presented with a decision around your lifestyle, you&amp;rsquo;ll choose correctly because of your new identity.&lt;/p&gt;
&lt;p&gt;If we start calling ourselves our new titles, what we think of ourselves changes as well, and it&amp;rsquo;ll be easier to overcome that impostor syndrome and stick to new habits, feeling that you&amp;rsquo;re doing what you&amp;rsquo;re supposed to be doing.&lt;/p&gt;
&lt;p&gt;The earlier you use that new term: &amp;ldquo;athlete,&amp;rdquo; &amp;ldquo;writer,&amp;rdquo; or &amp;ldquo;artist,&amp;rdquo; the easier it will be to accept your new identity and act accordingly.&lt;/p&gt;
&lt;p&gt;If you start playing the piano, you&amp;rsquo;re a pianist, and pianists play the piano. Some do it better than others, but they practice and keep improving, and now you belong to that group.&lt;/p&gt;
&lt;p&gt;You don&amp;rsquo;t need to do something for years, or even professionally, to call yourself by your new title. By using that new identity early and accepting it naturally, you&amp;rsquo;ll have a head start in your new hobby or habit you want to incorporate. Give it a try.&lt;/p&gt;
</description>
      </item>
    
    <item>
      <title>Selling My Side Project</title><link>https://josem.co/selling-my-side-project/</link>
      <pubDate>Fri, 17 Mar 2023 06:13:48 +0100</pubDate>
      
      <guid>https://josem.co/selling-my-side-project/</guid><description type="html">&lt;p&gt;In the summer of 2019, I started to build &lt;a href=&#34;https://planleave.com/&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Planleave&lt;/a&gt;, a SaaS product to manage time off days in an organization. I did it as a side project while working full-time as a software engineer at Buffer. Three years later, in 2022, I sold it.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve never worked harder on any side project than on Planleave.&lt;/p&gt;
&lt;p&gt;When I start any project, I usually go through the first honeymoon phase of absolutely loving the idea, but that fades away quickly, and I usually stop at that point. Still, with this project, I kept going and added features, fully automatized sign-ups and billing, and talked to many potential customers.&lt;/p&gt;
&lt;p&gt;I planned to continue investing in user acquisition through cold emails, organic content, etc., and I had complete trust that it would be helpful to many more people once it grew, but I decided to sell it.&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source srcset=&#34;https://josem.co/images/planleave@2x.webp 2x, https://josem.co/images/planleave.webp&#34; type=&#34;image/webp&#34;&gt;&lt;img src=&#34;https://josem.co//images/planleave.png&#34; alt=&#34;Planleave home&#34; decoding=&#34;async&#34; class=&#34;lazyload&#34; data-sizes=&#34;auto&#34; loading=&#34;lazy&#34;
          width=&#34;720&#34;  /&gt;&lt;/picture&gt;&lt;em&gt;Planleave UI&lt;/em&gt;&lt;/p&gt;

    
&lt;h2 id=&#34;why-did-i-sell-my-side-project&#34;&gt;Why did I sell my side project?&lt;/h2&gt;
&lt;p&gt;It was just too many things to juggle, and the potential success of my solo-founded side project was not at the top of the list. I&amp;rsquo;m a parent of two kids, I work full time, and I like to do other things beyond being at my desk programming.&lt;/p&gt;
&lt;p&gt;On top of not being a priority, even if I could manage to make it more successful, the period while working full time and attending a growing functioning business, sounded a bit terrifying.&lt;/p&gt;
&lt;p&gt;I thought, &amp;ldquo;Imagine that I get to 2000 USD / month. That&amp;rsquo;s around 1000 active users (2 USD / user). I can receive incidents about a 500 error on a peaceful Sunday evening with my family or in the middle of the night. Even real vacation time won&amp;rsquo;t be possible&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;Luckily, my full-time worker salary is way higher than the revenue in the early stage, so it didn&amp;rsquo;t seem very appealing. I know the future revenue might have been way more than my salary but I also suspected it was going to take me a lot of time.&lt;/p&gt;
&lt;p&gt;Only a few people will recognize this, but I also noticed that it affected my performance in my full-time job. Sleeping less and spending more time programming beyond my responsibilities with Buffer was hard, and my mind needed to be fresher for my paid job.&lt;/p&gt;
&lt;p&gt;Perhaps I could have taken it further with no kids in my 20s, but it doesn&amp;rsquo;t matter, I&amp;rsquo;m in a different stage of my life now, and it&amp;rsquo;s essential to keep my priorities straight.&lt;/p&gt;
&lt;p&gt;When I realized this, my first intention was to close it, but I had invested so much time on it, and I had some active users, so I thought I could sell it to someone.&lt;/p&gt;
&lt;h2 id=&#34;how-i-sold-my-side-project&#34;&gt;How I sold my side project&lt;/h2&gt;
&lt;p&gt;First, I contacted some friends and colleagues in the industry. If you don&amp;rsquo;t know anyone, that&amp;rsquo;s fine, my contacts weren&amp;rsquo;t interested, but they pointed me in the right direction: side projects marketplaces.&lt;/p&gt;
&lt;p&gt;I signed up for a few of them, and I got lucky with &lt;a href=&#34;https://acquire.com/&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Acquire.com&lt;/a&gt;, but I&amp;rsquo;d encourage you to try others; they&amp;rsquo;re usually free for you, like: &lt;a href=&#34;https://www.microns.io/&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Microns.io&lt;/a&gt; or &lt;a href=&#34;https://secondfounder.com/&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;SecondFounder&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I suggest drafting some basic information because you&amp;rsquo;ll probably receive many similar requests: more context about the business, competitors, why you&amp;rsquo;re selling it, etc.&lt;/p&gt;
&lt;p&gt;Having the SaaS project fully set up was important so a new potential owner could take it and grow it with little technical involvement. Users could sign up on Planleave and upgrade with no manual intervention from my side.&lt;/p&gt;
&lt;p&gt;Once you get an offer, don&amp;rsquo;t be afraid of negotiating. It&amp;rsquo;s important to have some revenue to sell your project, but even if you don&amp;rsquo;t, you can still get more than the original offer by negotiating a bit.&lt;/p&gt;
&lt;p&gt;After a few emails with different people, the new owner found the project, so we went through the negotiation, and that was it.&lt;/p&gt;
&lt;p&gt;I can&amp;rsquo;t share the exact amount, but as you can imagine at an early stage, it wasn&amp;rsquo;t life-changing. Still, I felt rewarded for my work and happy because I knew that the new owner would take it to a different level.&lt;/p&gt;
&lt;h2 id=&#34;conclusion&#34;&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;It was a tremendous adventure to create a SaaS product from nothing by myself and be able to sell it. I learned a lot about many different aspects of running a software business, especially outside my comfort zone of software development.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;d encourage you to work on a side project if you&amp;rsquo;ve never done it. If it doesn&amp;rsquo;t take off or your priorities change, the sale might be a good closure to that journey, but you don&amp;rsquo;t need it to learn as much as you will.&lt;/p&gt;
</description>
      </item>
    
    <item>
      <title>Finding Contentment in the Internet Age</title><link>https://josem.co/finding-contentment-in-the-internet-age/</link>
      <pubDate>Fri, 10 Mar 2023 15:20:43 +0100</pubDate>
      
      <guid>https://josem.co/finding-contentment-in-the-internet-age/</guid><description type="html">&lt;p&gt;Your car is perfect until you see your neighbor&amp;rsquo;s.&lt;/p&gt;
&lt;p&gt;Everything seems good enough, but then you see an ad or your Instagram feed and wish you had that beautiful desk instead of the perfectly fine one you&amp;rsquo;re using.&lt;/p&gt;
&lt;p&gt;&amp;ldquo;If only I had that new thing.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;&amp;ldquo;If only I could go to that beautiful place.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;&amp;ldquo;If only I could get that new laptop, car, or watch. My life would be much better&amp;rdquo;, we might think, but we&amp;rsquo;re wrong.&lt;/p&gt;
&lt;p&gt;The problem is we have too much to compare to. Without the Internet, the only comparison possible would be way more limited and healthy.&lt;/p&gt;
&lt;p&gt;Thanks to seeing what the world has to offer, we can see the best item in any imaginable category. We even discover some things we didn&amp;rsquo;t know we wanted.&lt;/p&gt;
&lt;p&gt;There&amp;rsquo;s always an upgrade we could make, a trip we could take, or a new thing we could buy.&lt;/p&gt;
&lt;p&gt;We shouldn&amp;rsquo;t compare anything, but if we do, let&amp;rsquo;s try that our references of what&amp;rsquo;s best or good don&amp;rsquo;t come from the whole world.&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source srcset=&#34;https://josem.co/images/compare-laptop@2x.webp 2x, https://josem.co/images/compare-laptop.webp&#34; type=&#34;image/webp&#34;&gt;&lt;img src=&#34;https://josem.co//images/compare-laptop.jpg&#34; alt=&#34;Compare Laptop Typewriter&#34; decoding=&#34;async&#34; class=&#34;lazyload&#34; data-sizes=&#34;auto&#34; loading=&#34;lazy&#34;
          width=&#34;720&#34;  /&gt;&lt;/picture&gt;&lt;em&gt;Photo by &lt;a href=&#34;https://unsplash.com/photos/6rkJD0Uxois&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Glenn Carstens-Peters&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

    
</description>
      </item>
    
    <item>
      <title>A Guide to Reclaim Our Attention</title><link>https://josem.co/a-guide-to-reclaim-our-attention/</link>
      <pubDate>Mon, 06 Mar 2023 07:50:30 +0100</pubDate>
      
      <guid>https://josem.co/a-guide-to-reclaim-our-attention/</guid><description type="html">&lt;p&gt;We&amp;rsquo;re losing our capacity to focus.&lt;/p&gt;
&lt;p&gt;When Apple introduced the iPhone in 2007, little we knew how much that would change the world, it was the first step towards the ubiquity of smartphones. There was a premonitory phrase from Steve Jobs: &amp;ldquo;iPhone is like having your life in your pocket&amp;rdquo;.&lt;a href=&#34;https://josem.co/#rf1&#34; class=&#34;reference&#34;&gt;[1]&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source srcset=&#34;https://josem.co/images/life_in_your_pocket@2x.webp 2x, https://josem.co/images/life_in_your_pocket.webp&#34; type=&#34;image/webp&#34;&gt;&lt;img src=&#34;https://josem.co//images/life_in_your_pocket.png&#34; alt=&#34;Life in your pocket&#34; decoding=&#34;async&#34; class=&#34;lazyload&#34; data-sizes=&#34;auto&#34; loading=&#34;lazy&#34;
          width=&#34;720&#34;  /&gt;&lt;/picture&gt;&lt;em&gt;iPhone presentation in 2007&lt;/em&gt;&lt;/p&gt;

    
&lt;p&gt;And we loved it.&lt;/p&gt;
&lt;p&gt;We&amp;rsquo;ve embraced smartphones to the point where it&amp;rsquo;s hard to find someone who doesn&amp;rsquo;t own one, but we have yet to consider the consequences. Steve Jobs was right, more and more of our lives are on our phones instead of outside them.&lt;/p&gt;
&lt;p&gt;How can we no longer read a book for more than 10 minutes or play with our kids for an hour without getting distracted? How are we so used to receiving dozens of notifications each day?&lt;/p&gt;
&lt;h2 id=&#34;a-formed-habit&#34;&gt;A formed habit&lt;/h2&gt;
&lt;p&gt;We check our phones before going to sleep, when we wake up, when walking, or even talking to people in real life. Checking our phones is an escape from reality, a quick way out of boredom, sadness, or dissatisfaction, but this habit has two main effects on our lives.&lt;/p&gt;
&lt;p&gt;First, we fragment our days into periods between checking the phone. We might expect that if we use the phone for a few hours daily, it&amp;rsquo;s just a chunk or two, but it doesn&amp;rsquo;t work like that.&lt;/p&gt;
&lt;p&gt;How we picture mobile usage time:&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source srcset=&#34;https://josem.co/images/interruptions_day_expectations@2x.webp 2x, https://josem.co/images/interruptions_day_expectations.webp&#34; type=&#34;image/webp&#34;&gt;&lt;img src=&#34;https://josem.co//images/interruptions_day_expectations.png&#34; alt=&#34;Interruptions Expectation&#34; decoding=&#34;async&#34; class=&#34;lazyload&#34; data-sizes=&#34;auto&#34; loading=&#34;lazy&#34;
          width=&#34;720&#34;  /&gt;&lt;/picture&gt;&lt;/p&gt;

    
&lt;p&gt;How mobile usage looks in reality:&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source srcset=&#34;https://josem.co/images/interruptions_day_reality@2x.webp 2x, https://josem.co/images/interruptions_day_reality.webp&#34; type=&#34;image/webp&#34;&gt;&lt;img src=&#34;https://josem.co//images/interruptions_day_reality.png&#34; alt=&#34;Interruptions Reality&#34; decoding=&#34;async&#34; class=&#34;lazyload&#34; data-sizes=&#34;auto&#34; loading=&#34;lazy&#34;
          width=&#34;720&#34;  /&gt;&lt;/picture&gt;&lt;/p&gt;

    
&lt;p&gt;Second, we&amp;rsquo;re overflowing our brains with too much information. We see new messages, likes, videos, or frightening news each time we look at our phones, and that adds up, leaving little space to think more deeply about other important things or even &lt;a href=&#34;https://www.frontiersin.org/articles/10.3389/fpsyt.2021.629407/full&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;sleep properly at night&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The odds are against us, but there&amp;rsquo;s a way out.&lt;/p&gt;
&lt;p&gt;We can still reclaim what was once ours: our mental space, our mental health, without constant interruptions and distractions.&lt;/p&gt;
&lt;h2 id=&#34;a-plan-to-get-our-attention-back&#34;&gt;A plan to get our attention back&lt;/h2&gt;
&lt;h3 id=&#34;1-lets-accept-where-we-are&#34;&gt;1. Let&amp;rsquo;s accept where we are&lt;/h3&gt;
&lt;p&gt;Like with any other habit, we must first recognize how ingrained smartphones are in our lives.&lt;/p&gt;
&lt;p&gt;I encourage you to take a look at &lt;a href=&#34;https://support.apple.com/en-us/HT208982&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Screen Time&lt;/a&gt; on your iPhone or &lt;a href=&#34;https://support.google.com/android/answer/9346420?hl=en&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Digital Wellbeing&lt;/a&gt; on Android. It&amp;rsquo;ll be eye-opening if you&amp;rsquo;ve never done it.&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;img src=&#34;https://josem.co//images/screen_time.jpeg&#34; alt=&#34;Screen Time on iPhone&#34; decoding=&#34;async&#34; class=&#34;lazyload&#34; data-sizes=&#34;auto&#34; loading=&#34;lazy&#34;
          width=&#34;720&#34;  /&gt;&lt;/picture&gt;&lt;em&gt;Screen Time on iPhone&lt;/em&gt;&lt;/p&gt;

    
&lt;p&gt;It&amp;rsquo;s hard to find accurate data on the average usage time per day but according to some resources&lt;a href=&#34;https://josem.co/#rf2&#34; class=&#34;reference&#34;&gt;[2]&lt;/a&gt;, it&amp;rsquo;s around three hours.&lt;/p&gt;
&lt;p&gt;If we spend two hours per day looking at our phone, it&amp;rsquo;s like spending one month looking at a screen after one year. Four hours a day? That&amp;rsquo;s about two months each year it passes.&lt;/p&gt;
&lt;h3 id=&#34;2-uninstall-almost-all-the-apps&#34;&gt;2. Uninstall almost all the apps&lt;/h3&gt;
&lt;p&gt;Once we accept the situation, the next step is to re-frame our relationship with our phones. They&amp;rsquo;re a tool and an addictive distraction, so the apps we don&amp;rsquo;t use for work or something completely critical should be gone.&lt;/p&gt;
&lt;p&gt;Trying to limit the time we use these apps is not enough because it&amp;rsquo;s easy to go over time; I think removing them for good is better.&lt;/p&gt;
&lt;p&gt;The browser like Safari or Chrome is also dangerous because it&amp;rsquo;s essentially an infinite scrolling pit, but it&amp;rsquo;s more tricky to remove and sometimes useful, so let&amp;rsquo;s leave it for now.&lt;/p&gt;
&lt;p&gt;We should also leave our phones at home more often. I know it&amp;rsquo;s scary to go out without our phone, but let&amp;rsquo;s take a short walk without it one day, even if it&amp;rsquo;s just for 10 or 15 minutes.&lt;/p&gt;
&lt;p&gt;Now, with less addictive apps and occasionally leaving the phone at home, we can stay in this phase for a week. If we want to gamify this, let&amp;rsquo;s track our progress daily with Screen Time or Digital Wellbeing on Android.&lt;/p&gt;
&lt;p&gt;After feeling more disconnected, we can go to the next stage, where the real change will happen.&lt;/p&gt;
&lt;h3 id=&#34;3-using-a-dumbphone&#34;&gt;3. Using a dumbphone&lt;/h3&gt;
&lt;p&gt;Smartphones are designed to give us many apps to get and retain our attention. Their algorithms don&amp;rsquo;t care how much time and mental energy you waste there. They want more money by showing you more and more ads. They&amp;rsquo;re soulless.&lt;/p&gt;
&lt;p&gt;In contrast, dumbphones are minimal phones. Like an old Nokia, you can only call and send a message; some might have basic tools like a calculator or a crappy camera.&lt;/p&gt;
&lt;p&gt;We could remove even more things from our current phone and make it &amp;ldquo;dumb&amp;rdquo; but that entails some tricky settings and the temptation will always be a couple of taps away, so it&amp;rsquo;s better to just get a dumbphone.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m preparing an entire article on dumbphones, but for now, we just need to know there are some fancy (and expensive) dumbphones like the &lt;a href=&#34;https://www.thelightphone.com&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Light Phone&lt;/a&gt; or the &lt;a href=&#34;https://www.punkt.ch/en/products/mp02-4g-mobile-phone/&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Punkt MP02&lt;/a&gt;, but we don&amp;rsquo;t need to spend $300+ to get our life back.&lt;/p&gt;
&lt;p&gt;Go with something basic like the Nokia 225 4G for $45, or even an old phone would do it for now. If you want to explore more options, &lt;a href=&#34;https://josebriones.org/dumbphone-finder&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;this tool&lt;/a&gt; is a great resource.&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;img src=&#34;https://josem.co//images/dumbphones.jpeg&#34; alt=&#34;Light Phone II and Punkt MP02&#34; decoding=&#34;async&#34; class=&#34;lazyload&#34; data-sizes=&#34;auto&#34; loading=&#34;lazy&#34;
          width=&#34;720&#34;  /&gt;&lt;/picture&gt;&lt;em&gt;Light Phone II and Punkt MP02, the nice dumbphones, by u/raybanning &lt;a href=&#34;https://www.reddit.com/r/LightPhone/comments/hez26k/light_phone_ii_and_punkt_mp02_side_by_side/&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;on Reddit&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

    
&lt;h3 id=&#34;4-find-creative-alternatives-for-the-tools-were-missing&#34;&gt;4. Find creative alternatives for the tools we&amp;rsquo;re missing&lt;/h3&gt;
&lt;p&gt;We may need some of the tools we used to have in our phones, and we can probably start to consider that it&amp;rsquo;ll be ok if we get our shiny smartphones back, but that&amp;rsquo;s not a good idea because it&amp;rsquo;ll be very easy to go back to square one. Instead, let&amp;rsquo;s be creative and find alternatives for them.&lt;/p&gt;
&lt;p&gt;Living without a smartphone is a lifestyle change; some things we used to do with them won&amp;rsquo;t be possible anymore, and others will be less convenient. We&amp;rsquo;re talking about valuable things like paying in a store or getting a notification of an upcoming event, but we can find alternatives for each.&lt;/p&gt;
&lt;p&gt;We can call our friends from time to time instead of messaging them, or getting a physical notebook instead of an app.&lt;/p&gt;
&lt;p&gt;It might take longer to do the same things without smartphones, but remember where we come from. Remember, we used to ignore our loved ones to check our email for the 20th time more often than we&amp;rsquo;d like to accept.&lt;/p&gt;
&lt;h3 id=&#34;5-take-some-time-to-adapt-to-your-new-phone&#34;&gt;5. Take some time to adapt to your new phone&lt;/h3&gt;
&lt;p&gt;Living without our smartphones will be challenging at first, almost like a mourning phase. It&amp;rsquo;s scary not to have a constant accessible distraction source all the time, but in return, we&amp;rsquo;ll get our life back.&lt;/p&gt;
&lt;p&gt;When some days pass by, you&amp;rsquo;ll start to see the benefits. From my experience:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Your capacity to focus will improve. You can maintain conversations listen to the other person, and read for an hour or even more some days.&lt;/li&gt;
&lt;li&gt;You&amp;rsquo;ll notice a big improvement at work too. You&amp;rsquo;ll be able to work on one task for longer periods of time.&lt;/li&gt;
&lt;li&gt;You&amp;rsquo;ll start to feel calmer. I began to think less about work because I wasn&amp;rsquo;t checking Slack at 8:00 PM while bathing my kids or preparing dinner.&lt;/li&gt;
&lt;li&gt;You&amp;rsquo;ll have more time to do things, around two or more hours each day! I can write more now because I no longer waste two hours on the phone.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;conclusion&#34;&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;I&amp;rsquo;d encourage you to try these steps. What&amp;rsquo;s at stake is our mental health, our time, our life. It might be hard at first, but the reward is worth it.&lt;/p&gt;
&lt;h2 id=&#34;references&#34;&gt;References&lt;/h2&gt;
&lt;p&gt;&lt;p class=&#34;reference-note&#34; id=&#34;rf1&#34;&gt;&lt;span&gt;[1] Steve Jobs, in the 2007 Keynote introducing the original iPhone &lt;a href=&#34;http://www.european-rhetoric.com/analyses/ikeynote-analysis-iphone/transcript-2007/&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;full transcription&lt;/a&gt;. &lt;/p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=&#34;reference-note&#34; id=&#34;rf2&#34;&gt;[2] &lt;a href=&#34;https://www.bankmycell.com/blog/smartphone-addiction/#chapter2&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;BankMyCell Report&lt;/a&gt;. &lt;/span&gt;&lt;/p&gt;
</description>
      </item>
    
    <item>
      <title>Obvious to You, Amazing to Others</title><link>https://josem.co/obvious-to-you-amazing-to-others/</link>
      <pubDate>Fri, 03 Mar 2023 05:03:20 +0100</pubDate>
      
      <guid>https://josem.co/obvious-to-you-amazing-to-others/</guid><description type="html">&lt;p&gt;Once you&amp;rsquo;ve learned something, it&amp;rsquo;s not interesting anymore. What was surprising once now feels dull and obvious.&lt;/p&gt;
&lt;p&gt;Have you ever chatted with an adult friend about how rivers form?
How does the water evaporate in the sea, forming clouds, and then the rain creates snow in the mountains? How is that snow melted and rivers are born, bringing that water down to the seas again?&lt;/p&gt;
&lt;p&gt;I bet you haven&amp;rsquo;t because it&amp;rsquo;s obvious to you.&lt;/p&gt;
&lt;p&gt;But instead, if you help a little kid figure out how that process works, they&amp;rsquo;ll be amazed. What was obvious to you, it&amp;rsquo;s now amazing to that kid.&lt;/p&gt;
&lt;p&gt;There are countless examples of lessons you&amp;rsquo;ve learned over the years that you could share with others to help them, lessons from your life, work, or passions.&lt;/p&gt;
&lt;p&gt;If you share what you&amp;rsquo;ve learned, someone will eventually find it useful because it&amp;rsquo;ll be new to many people. For others it&amp;rsquo;ll be obvious too, but that&amp;rsquo;s ok.&lt;/p&gt;
&lt;p&gt;Your experience might be inspiring, interesting, and even eye-opening to some, and that might make a small difference today. The kind of difference that makes the world a slightly better place.&lt;/p&gt;
&lt;p&gt;Have a great day.&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source srcset=&#34;https://josem.co/images/river@2x.webp 2x, https://josem.co/images/river.webp&#34; type=&#34;image/webp&#34;&gt;&lt;img src=&#34;https://josem.co//images/river.jpg&#34; alt=&#34;River&#34; decoding=&#34;async&#34; class=&#34;lazyload&#34; data-sizes=&#34;auto&#34; loading=&#34;lazy&#34;
          width=&#34;720&#34;  /&gt;&lt;/picture&gt;&lt;em&gt;Photo by &lt;a href=&#34;https://unsplash.com/@jack_anstey&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Jack Anstey&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

    
&lt;p&gt;&lt;em&gt;Funnily enough, after publishing this article I&amp;rsquo;ve found &lt;a href=&#34;https://sive.rs/obvious&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Derek Sivers&amp;rsquo;&lt;/a&gt; take on this from 2010, so you can read the same idea from him :)&lt;/em&gt;&lt;/p&gt;
</description>
      </item>
    
    <item>
      <title>Don&#39;t Keep Ideas to Yourself</title><link>https://josem.co/dont-keep-ideas-to-yourself/</link>
      <pubDate>Mon, 27 Feb 2023 06:46:15 +0100</pubDate>
      
      <guid>https://josem.co/dont-keep-ideas-to-yourself/</guid><description type="html">&lt;p&gt;Naturally, as you grow in your profession, you develop a vision and think about ideas and opportunities you can take to grow and have a more significant impact.&lt;/p&gt;
&lt;p&gt;The natural process when these ideas come to mind is to add them to a never-ending to-do list. When I have time, I&amp;rsquo;ll propose that thing I&amp;rsquo;ve been thinking about for the last two months, you might think. Sometimes, it&amp;rsquo;s even worse. You forget about them.&lt;/p&gt;
&lt;p&gt;Being selfish with your ideas reduces your overall impact and the growth of others.&lt;/p&gt;
&lt;p&gt;By keeping those great ideas to yourself you&amp;rsquo;re not letting others grow. You&amp;rsquo;re making the space where others can grow smaller, making it more difficult for others to learn and level up.&lt;/p&gt;
&lt;p&gt;Some of those ideas can and will positively impact the project you&amp;rsquo;re working on, but you need to make them happen.&lt;/p&gt;
&lt;p&gt;If you don&amp;rsquo;t have the time to work on those opportunities, you&amp;rsquo;re also missing their impact.&lt;/p&gt;
&lt;p&gt;Share that idea with others so they could work on it.&lt;/p&gt;
&lt;p&gt;You&amp;rsquo;ve grown in the first place because someone let you take on some of these initiatives. Don&amp;rsquo;t be selfish now. You&amp;rsquo;ll be surprised by the after-effect.&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source srcset=&#34;https://josem.co/images/person-alone-sunset@2x.webp 2x, https://josem.co/images/person-alone-sunset.webp&#34; type=&#34;image/webp&#34;&gt;&lt;img src=&#34;https://josem.co//images/person-alone-sunset.jpg&#34; alt=&#34;Person Alone in the Sunset&#34; decoding=&#34;async&#34; class=&#34;lazyload&#34; data-sizes=&#34;auto&#34; loading=&#34;lazy&#34;
          width=&#34;720&#34;  /&gt;&lt;/picture&gt;&lt;em&gt;Photo by &lt;a href=&#34;https://unsplash.com/@mabe12&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Austin Mabe&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

    
</description>
      </item>
    
    <item>
      <title>Creation Happens in Silence</title><link>https://josem.co/creation-happens-in-silence/</link>
      <pubDate>Sun, 19 Feb 2023 00:08:51 +0100</pubDate>
      
      <guid>https://josem.co/creation-happens-in-silence/</guid><description type="html">&lt;p&gt;It&amp;rsquo;s Saturday, and I&amp;rsquo;m enjoying the last sunlight for the day in my studio. The house is silent now; my family is taking a nap downstairs. And I&amp;rsquo;m here, writing, in silence.&lt;/p&gt;
&lt;p&gt;There&amp;rsquo;s a thought that kept coming in the last few weeks.&lt;/p&gt;
&lt;p&gt;As painful as it is, any creation happens in isolation without any signals or external validation until it&amp;rsquo;s complete.&lt;/p&gt;
&lt;p&gt;Any idea or creative work you can think of happens in silence.&lt;/p&gt;
&lt;p&gt;Whatever you&amp;rsquo;re working on only exists in a vacuum until you publish it. And you might be full of doubts.&lt;/p&gt;
&lt;p&gt;Will it work?&lt;/p&gt;
&lt;p&gt;Will it be useful for someone?&lt;/p&gt;
&lt;p&gt;Will people like it?&lt;/p&gt;
&lt;p&gt;Am I crazy for doing this?&lt;/p&gt;
&lt;p&gt;I will only know if you&amp;rsquo;ll like this article once I publish it.&lt;/p&gt;
&lt;p&gt;This isolation happens in all fields: movies, music, literature, or product development. But it&amp;rsquo;s necessary. No one will come and tell you to create something.&lt;/p&gt;
&lt;p&gt;While you&amp;rsquo;re reading this, creative people are working hard now across the world on the next novel, movie, or song you&amp;rsquo;ll love, and yet, you don&amp;rsquo;t know anything about it, and they don&amp;rsquo;t know if you&amp;rsquo;ll like it either.&lt;/p&gt;
&lt;p&gt;And yet, creating is such a big part of our DNA that we don&amp;rsquo;t care.&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source srcset=&#34;https://josem.co/images/writing-alone.webp&#34; type=&#34;image/webp&#34;&gt;&lt;img src=&#34;https://josem.co//images/writing-alone.jpg&#34; alt=&#34;Photo of man writing on the street&#34; decoding=&#34;async&#34; class=&#34;lazyload&#34; data-sizes=&#34;auto&#34; loading=&#34;lazy&#34;
          width=&#34;720&#34;  /&gt;&lt;/picture&gt;&lt;em&gt;Photo by &lt;a href=&#34;https://unsplash.com/@bradneathery&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Brad Neathery&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

    
</description>
      </item>
    
    <item>
      <title>How to Make Youtube Less Distracting</title><link>https://josem.co/how-to-make-youtube-less-distracting/</link>
      <pubDate>Thu, 02 Feb 2023 00:08:51 +0100</pubDate>
      
      <guid>https://josem.co/how-to-make-youtube-less-distracting/</guid><description type="html">&lt;p class=&#34;bigger-image&#34;&gt;&lt;picture&gt;&lt;a href=&#34;https://josem.co/images/2023/youtube_double@2x.png&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;
            &lt;img src=&#34;https://josem.co//images/2023/youtube_double@2x.png&#34; alt=&#34;A more calm homepage&#34; decoding=&#34;async&#34; class=&#34;lazyload&#34; data-sizes=&#34;auto&#34; loading=&#34;lazy&#34;
          width=&#34;1000&#34; /&gt;
          &lt;/a&gt;
        &lt;/picture&gt;
      &lt;/p&gt;

    
&lt;p&gt;Youtube is a great free source of information and entertainment that we&amp;rsquo;ve all used at some point.&lt;/p&gt;
&lt;p&gt;If it&amp;rsquo;s free, then how does Google make money from it? Yes, you guessed it, ads. And the more videos you see, the more ads they show you, so more money for them.&lt;/p&gt;
&lt;p&gt;If Google gets more money the more time you spend on Youtube watching videos, it&amp;rsquo;s safe to assume that that principle guides its design.&lt;/p&gt;
&lt;p&gt;The radical solution to avoid that addicting design is to avoid it entirely, but there is still so much good information in there that it probably doesn&amp;rsquo;t make sense.&lt;/p&gt;
&lt;p&gt;A good balance is using some extensions in your browser to see what you want to see without dozens of other videos already queued to keep you engaged so they can sell more ads.&lt;/p&gt;
&lt;h2 id=&#34;1-makes-your-subscriptions-your-homepage&#34;&gt;1. Makes your subscriptions your homepage&lt;/h2&gt;
&lt;p&gt;Instead of seeing all the tempting videos arranged for you by the great and soulless algorithm, you can skip that and go directly to your subscriptions with this extension for &lt;a href=&#34;https://addons.mozilla.org/en-US/firefox/addon/ytmysubs/&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Firefox&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If you use a different browser, you can remove the suggestions by disabling the Watch History.&lt;/p&gt;
&lt;p&gt;Go &lt;a href=&#34;https://myactivity.google.com/activitycontrols?settings=youtube&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;to your Google account&lt;/a&gt;, and click on &amp;ldquo;Turn Off&amp;rdquo;.&lt;/p&gt;
&lt;h2 id=&#34;2-remove-recommended-videos&#34;&gt;2. Remove recommended videos&lt;/h2&gt;
&lt;p&gt;If you&amp;rsquo;ve found a video valuable enough to spend 10+ minutes of your life with it, it&amp;rsquo;s wise to stop there, and if you need another video go and find it later yourself.&lt;/p&gt;
&lt;p&gt;The problem is Youtube will recommend videos based on your history and other information Google has on you, like your location or your interests, so you keep watching.&lt;/p&gt;
&lt;p&gt;There&amp;rsquo;s a solution for that. This extension called Unhook for &lt;a href=&#34;https://chrome.google.com/webstore/detail/unhook-remove-youtube-rec/khncfooichmfjbepaaaebmommgaepoid/related?hl=en&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Chrome&lt;/a&gt; and &lt;a href=&#34;https://addons.mozilla.org/en-US/firefox/addon/youtube-recommended-videos/&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Firefox&lt;/a&gt; will remove the recommended videos.&lt;/p&gt;
&lt;h2 id=&#34;3-skip-sponsored-content&#34;&gt;3. Skip sponsored content&lt;/h2&gt;
&lt;p&gt;In order to automatically skip the sponsored portion of the video install this extension &lt;a href=&#34;https://chrome.google.com/webstore/detail/sponsorblock-for-youtube/mnjggcdmjocbbbhaepdhchncahnbgone?hl=en&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;on Chrome&lt;/a&gt; or &lt;a href=&#34;https://addons.mozilla.org/en-US/firefox/addon/sponsorblock/&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Firefox&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;4-hide-ads&#34;&gt;4. Hide ads&lt;/h2&gt;
&lt;p&gt;The uBlock Origin extension will hide the ads when you watch videos on Youtube and also when you&amp;rsquo;re browsing the web.&lt;/p&gt;
&lt;p&gt;There&amp;rsquo;s a version for &lt;a href=&#34;https://chrome.google.com/webstore/detail/ublock-origin/cjpalhdlnbpafiamejdnhcphjbkeiagm?hl=en&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Chrome&lt;/a&gt; and &lt;a href=&#34;https://addons.mozilla.org/en-US/firefox/addon/ublock-origin/&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Firefox&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;5-hide-thumbnails&#34;&gt;5. Hide thumbnails&lt;/h2&gt;
&lt;p&gt;Hiding the video thumbnails is a bit radical to me, but if they become too tempting not to click on them, this extension for &lt;a href=&#34;https://chrome.google.com/webstore/detail/hide-youtube-thumbnails/phmcfcbljjdlomoipaffekhgfnpndbef?hl=en&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Chrome&lt;/a&gt; and &lt;a href=&#34;https://addons.mozilla.org/en-US/firefox/addon/hide-youtube-thumbnails/&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Firefox&lt;/a&gt; will hide them for you.&lt;/p&gt;
&lt;h2 id=&#34;conclusion&#34;&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;With the flexibility that a web browser and extensions provide we can make Youtube design work for us instead of against us. Give it a try to some of these extensions, I&amp;rsquo;m sure it&amp;rsquo;ll reduce the time you waste on Youtube.&lt;/p&gt;
&lt;p&gt;We should also consider how we can support the creators behind the channels we follow if we use these extensions. Something like Patreon or other alternative platforms are a good way to support them outside Youtube ads and sponsored content.&lt;/p&gt;
</description>
      </item>
    
    <item>
      <title>Single-Purpose Devices</title><link>https://josem.co/single-purpose-devices/</link>
      <pubDate>Fri, 07 Jan 2022 00:08:51 +0100</pubDate>
      
      <guid>https://josem.co/single-purpose-devices/</guid><description type="html">&lt;p&gt;I love my Kindle. It allows me to read and buy a new book, and that&amp;rsquo;s it. Everything on it is oriented towards reading e-books. When you&amp;rsquo;re reading a book on it, there&amp;rsquo;s nothing else on the screen and no interruptions.&lt;/p&gt;
&lt;p&gt;I hate my smartphone. It allows me to do almost anything without a clear sign of what&amp;rsquo;s more important. I can receive a notification about a doctor&amp;rsquo;s appointment for my kids or the last offer from a random brand I bought from once; both can interrupt me in the same way.&lt;/p&gt;
&lt;p&gt;Sometimes I grab my phone to do something, and 20 minutes later, I realize I&amp;rsquo;m checking a random news page or browsing Reddit, not remembering what I wanted to do originally.&lt;/p&gt;
&lt;p&gt;Maybe having so many options and tools is not good for us. Is there a way to design these products to prioritize a clearer purpose when using them?&lt;/p&gt;
&lt;p&gt;We should probably demand better designs of the things we use the most, or, if not, try to set them up in a way that can help us.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m exploring ways to improve my focus and being less distracted by technology. I&amp;rsquo;ll share a few articles on the topic in the coming weeks.&lt;/p&gt;
</description>
      </item>
    
    <item>
      <title>Creating a Side Project when You Don&#39;t Need the Money</title><link>https://josem.co/creating-a-side-project-when-you-dont-need-the-money/</link>
      <pubDate>Sun, 04 Apr 2021 14:08:51 +0100</pubDate>
      
      <guid>https://josem.co/creating-a-side-project-when-you-dont-need-the-money/</guid><description type="html">&lt;p&gt;I&amp;rsquo;ve recently launched &lt;a href=&#34;https://josem.co/projects/#planleave&#34; rel=&#34;noopener&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;a side project&lt;/a&gt;, a SaaS product to manage absences in companies. It might generate some money in the future and yet, I don&amp;rsquo;t need any of it.&lt;/p&gt;
&lt;p&gt;I know what you&amp;rsquo;re thinking. Money is always nice, and you&amp;rsquo;re right, but I&amp;rsquo;m also working full-time as a software engineer. Any extra income is welcomed but not needed.&lt;/p&gt;
&lt;p&gt;This is a great path for many creative people. You have the good parts of working for an employer and the benefits of having a side business where you can fully unleash your creativity and learn new things, and learning is so important for professional growth.&lt;/p&gt;
&lt;p&gt;You can only learn and apply certain topics in your job, but a side project is limitless. You get more rounded as a professional because you understand more deeply what other teams do in your company.&lt;/p&gt;
&lt;p&gt;If you want to maximize learning, you need to try new things, and you can only innovate that much working for an established business. Still, you can try anything in your side project like a new marketing strategy, a new technology you&amp;rsquo;re excited about, or a new onboarding process.&lt;/p&gt;
&lt;p&gt;On top of learning new things, you also minimize the risks associated with starting a new business.&lt;/p&gt;
&lt;p&gt;Founders who leave everything to start their companies need to make it work at all costs, especially if they&amp;rsquo;re risking their own money.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;d be very stressed to make my project grow if my family depended on it, but if I do a good job and help my employer stay in business, I know I&amp;rsquo;ll regularly receive my salary.&lt;/p&gt;
&lt;p&gt;Why do I do it then if I don&amp;rsquo;t need the money and my side project&amp;rsquo;s growth is not that important in my life? Why would anyone do it?&lt;/p&gt;
&lt;p&gt;Because you can redefine success for your projects when you don&amp;rsquo;t need the money.&lt;/p&gt;
&lt;p&gt;Founders usually set some arbitrary mark for success, like X monthly or annual recurring revenue. I don&amp;rsquo;t care about that.&lt;/p&gt;
&lt;p&gt;For me, success with a side project is only about three things.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Learning something new&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Launching it&lt;/strong&gt;. It’s easy to come up with ideas, but implementing them and showing something to the world is a different story.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Improving the world&lt;/strong&gt;, even if it&amp;rsquo;s in a small way. For this project, it means that someone, somewhere, enjoys a day off to be with their family because my software suggested it.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I already have a couple of companies using it, so I&amp;rsquo;ve already fully succeeded with it. From now on, it&amp;rsquo;s just fun.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ll learn more, experiment more, and apply what I learn from my side project to my full-time job and vice-versa. I might or might not reap some big monetary fruits, but it doesn&amp;rsquo;t matter, and that makes the journey much more pleasant.&lt;/p&gt;
</description>
      </item>
    
    <item>
      <title>Good Code Is Invisible</title><link>https://josem.co/good-code-is-invisible/</link>
      <pubDate>Wed, 19 Feb 2020 14:08:51 +0100</pubDate>
      
      <guid>https://josem.co/good-code-is-invisible/</guid><description type="html">&lt;p&gt;We all try to create good and clean code, projects that are maintainable and easy to change and yet, we don&amp;rsquo;t appreciate when we have one.&lt;/p&gt;
&lt;p&gt;Do you remember the last time you easily change something in your code?&lt;/p&gt;
&lt;p&gt;Maybe it was a simple constant that was only in one place, or a new parameter in an API endpoint that was fast to test. You might remember but I bet you didn&amp;rsquo;t stop to appreciate how easy the change was, how productive it felt and how it could have been much worse in other scenarios, it just felt right. You didn&amp;rsquo;t think too much about it because good code is invisible.&lt;/p&gt;
&lt;p&gt;We don&amp;rsquo;t think too much about existing code until it gets in our way to accomplish what we want, in the same way we don&amp;rsquo;t appreciate our own good health until we get ill.&lt;/p&gt;
&lt;h2 id=&#34;products-perspective&#34;&gt;Product&amp;rsquo;s perspective&lt;/h2&gt;
&lt;p&gt;From the stakeholders of a product, good and maintainable code is expected, although rare to find.&lt;/p&gt;
&lt;p&gt;They treat code in the same way that I treat my car. When I get into my car and start the engine, I expect it to work well and get me safely to my destination. I&amp;rsquo;d not be very happy if I see a warning light complaining about something I didn&amp;rsquo;t know it existed and I&amp;rsquo;d be even more concerned if three of them are on in the same trip.&lt;/p&gt;
&lt;p&gt;When you work with product stakeholders, they don&amp;rsquo;t pay attention to the code. They don&amp;rsquo;t care about how many returns or lines you have in a single method or whether you use TDD or modify the code in production with an FTP client.&lt;/p&gt;
&lt;p&gt;They see the project as the final user is going to perceive it. They&amp;rsquo;re trying to get the project somewhere else and code can help or prevent that from happening. They care about results in the form of features, bugs or speed, things way more tangible that the code you see in the editor.&lt;/p&gt;
&lt;p&gt;The fact that your code is good and maintainable is a competitive advantage that only you and your colleagues truly appreciate and, although it affects all the stakeholders of the product in a big way, they&amp;rsquo;re just usually not aware of it.&lt;/p&gt;
&lt;p&gt;And with all of this, if it&amp;rsquo;s very likely that few people notice how easy is to work with that project, why should you care?&lt;/p&gt;
&lt;h2 id=&#34;this-is-your-life&#34;&gt;This is your life&lt;/h2&gt;
&lt;p&gt;First of all, because, as Dave Thomas and Andrew Hunt mention in &amp;ldquo;The Pragmatic Programmer&amp;rdquo;: &amp;ldquo;this is your life&amp;rdquo;. Do you want to have a fulfilling pride of your accomplishments every week? Do you want to look at that piece of code and easily see how you made it better? Or do you prefer to spend the rest of your days in that company or project barely surviving, sweeping dirty code under the carpet with the hope that it&amp;rsquo;ll get better magically someday because you&amp;rsquo;ll have time for the ultimate refactoring (or rewriting the whole thing)?&lt;/p&gt;
&lt;h2 id=&#34;common-goals&#34;&gt;Common goals&lt;/h2&gt;
&lt;p&gt;Outside your personal feelings and goals, you&amp;rsquo;re working in that project because, deep down, you care about something. It could be the mission of the company, your team, the users or even just the money you&amp;rsquo;re making there. In any case, the better the project is because you cared about your work, the more chances it&amp;rsquo;ll have to succeed. And even if it doesn&amp;rsquo;t, you won&amp;rsquo;t have any regrets that it was your fault.&lt;/p&gt;
&lt;h2 id=&#34;bad-code-is-like-a-disease&#34;&gt;Bad code is like a disease&lt;/h2&gt;
&lt;p&gt;Bad code can hurt and eventually kill companies. If your company can&amp;rsquo;t adapt fast enough in a new market others will pass by and win. If your users aren&amp;rsquo;t happy about the quality of something you&amp;rsquo;ve built and you don&amp;rsquo;t know where the issue is because the code is a mess, you might lose them. If they leave others might follow and soon, what you cared about when you started in that project, might be lost forever.&lt;/p&gt;
&lt;p&gt;Do what you can every day to stay healthy and treat your code in the same way, you won&amp;rsquo;t regret it.&lt;/p&gt;
</description>
      </item>
    
    <item>
      <title>How to schedule a post in Hugo with Gitlab</title><link>https://josem.co/how-to-schedule-a-post-in-hugo-with-gitlab/</link>
      <pubDate>Tue, 19 Nov 2019 15:08:51 +0100</pubDate>
      
      <guid>https://josem.co/how-to-schedule-a-post-in-hugo-with-gitlab/</guid><description type="html">
&lt;p style=&#34;text-align:center;&#34;&gt;
&lt;img src=&#34;https://josem.co//images/calendar-colour-1200px.png&#34; alt=&#34;Calendar illustration&#34; title=&#34;Calendar illustration&#34; width=&#34;500px&#34; style=&#34;margin-left:auto;margin-right:auto;&#34;/&gt;
&lt;em&gt;Illustration by &lt;a target=&#34;_blank&#34; href=&#34;https://www.drawkit.io/illustrations/calendar-colour&#34;&gt;Drawkit&lt;/a&gt;&lt;/em&gt;
&lt;/p&gt;

I&#39;ve recently used a nice feature in Gitlab to automatically post my articles scheduled in the future in Hugo and I share how I did it in this article.

&lt;h2 id=&#34;setup&#34;&gt;Setup&lt;/h2&gt;
&lt;p&gt;This static blog uses &lt;a href=&#34;https://gohugo.io/&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Hugo&lt;/a&gt; to be generated and its repository is in Gitlab.&lt;/p&gt;
&lt;p&gt;I have a private repo but it doesn&amp;rsquo;t really matter for this, it could also be public.&lt;/p&gt;
&lt;p&gt;The final site is hosted on Gitlab too with a custom domain. If you don&amp;rsquo;t know how to achieve this, &lt;a href=&#34;https://gohugo.io/hosting-and-deployment/hosting-on-gitlab/&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;here&amp;rsquo;s a great guide&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;the-build-step&#34;&gt;The build step&lt;/h2&gt;
&lt;p&gt;If you have your blog on Gitlab with Hugo, you&amp;rsquo;ll probably have a .gitlab-ci.yml file in your repository. Here&amp;rsquo;s mine for reference:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nt&#34;&gt;image&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;l&#34;&gt;registry.gitlab.com/pages/hugo/hugo_extended:0.58.3&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nt&#34;&gt;variables&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;GIT_SUBMODULE_STRATEGY&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;l&#34;&gt;recursive&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nt&#34;&gt;test&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;script&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;- &lt;span class=&#34;l&#34;&gt;hugo&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;except&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;- &lt;span class=&#34;l&#34;&gt;master&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nt&#34;&gt;pages&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;script&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;- &lt;span class=&#34;l&#34;&gt;hugo --minify&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;artifacts&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;paths&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;- &lt;span class=&#34;l&#34;&gt;public&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;only&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;- &lt;span class=&#34;l&#34;&gt;master&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;the-strategy-to-automatically-post-in-the-future&#34;&gt;The strategy to automatically post in the future&lt;/h2&gt;
&lt;p&gt;First of all you should have an article with a date in the future in Hugo. As you know, by default it won&amp;rsquo;t be rendered by Hugo when the site is generated but the file will be in the repository when you push your changes.&lt;/p&gt;
&lt;p&gt;Remember you can preview future posts locally with the F flag:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;hugo server -F
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;After having that article pushed to production, go to your repository in Gitlab and click on &amp;ldquo;Schedules&amp;rdquo;, under CI/CD in the sidebar:&lt;/p&gt;

&lt;p style=&#34;text-align:center&#34;&gt;
&lt;img src=&#34;https://josem.co//images/sidebar-gitlab.png&#34; alt=&#34;Sidebar Gitlab&#34; title=&#34;Sidebar Gitlab&#34; width=&#34;250px&#34;/&gt;
&lt;/p&gt;

&lt;p&gt;Once there, click on New Schedule and fill the data with:&lt;/p&gt;


&lt;p style=&#34;text-align:center&#34;&gt;
&lt;img src=&#34;https://josem.co//images/schedule-gitlab-form.png&#34; alt=&#34;Sidebar Gitlab&#34; title=&#34;Sidebar Gitlab&#34; width=&#34;750px&#34;/&gt;
&lt;/p&gt;

&lt;p&gt;As you can see, this is just an example and you could run it just once every day at the same time but I prefer to be more accurate with the publishing time.&lt;/p&gt;
&lt;p&gt;This configuration will generate your blog in Hugo every hour. If there&amp;rsquo;s a new article that needs to be created since the last built, it&amp;rsquo;ll be included in the site.&lt;/p&gt;
&lt;h2 id=&#34;some-fun-stats&#34;&gt;Some fun stats&lt;/h2&gt;
&lt;p&gt;Just for fun, I&amp;rsquo;ve noticed that the average build time in Gitlab is 30 seconds in my case and the full generation of this blog takes around 350ms with the minify option added (to have the HTML minimized):&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;hugo --minify
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;P.S. This article was automatically posted by Gitlab. 😉&lt;/p&gt;
</description>
      </item>
    
    <item>
      <title>Why I Keep a Personal Log of Bugs</title><link>https://josem.co/why-i-keep-a-personal-log-of-bugs/</link>
      <pubDate>Thu, 24 Oct 2019 15:08:51 +0100</pubDate>
      
      <guid>https://josem.co/why-i-keep-a-personal-log-of-bugs/</guid><description type="html">&lt;p&gt;&lt;p&gt;&lt;picture&gt;&lt;source srcset=&#34;https://josem.co/images/apple-black-and-white-black-and-white-169573.webp&#34; type=&#34;image/webp&#34;&gt;&lt;img src=&#34;https://josem.co//images/apple-black-and-white-black-and-white-169573.jpg&#34; alt=&#34;Notebook&#34; decoding=&#34;async&#34; class=&#34;lazyload&#34; data-sizes=&#34;auto&#34; loading=&#34;lazy&#34;
          width=&#34;720&#34;  /&gt;&lt;/picture&gt;Notebook&lt;/p&gt;

    

&lt;em&gt;Photo by &lt;a href=&#34;https://www.pexels.com/@negativespace&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Negative Space&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;br/&gt;
When creating software, you&#39;ll make mistakes. Sometimes they&#39;ll be huge, sometimes they&#39;ll be small but you can always learn from them if you spend some extra time documenting them.
&lt;p&gt;After working for more 10 years as a software engineer I&amp;rsquo;ve realized it doesn&amp;rsquo;t change. You might develop some techniques to prevent some from happening but others will show up, it never ends.&lt;/p&gt;
&lt;p&gt;In order to learn from those mistakes and try to avoid them in the future you can develop a bug log. We&amp;rsquo;ll see here what that is and how it works but I promise it helps.&lt;/p&gt;
&lt;p&gt;I recently introduced this idea at &lt;a href=&#34;https://buffer.com&#34; rel=&#34;noopener&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Buffer&lt;/a&gt; where I&amp;rsquo;ve been working for almost 5 years now and I thought it&amp;rsquo;d be cool to share it publicly here as well.&lt;/p&gt;
&lt;h2 id=&#34;the-endless-cycle-of-software-development&#34;&gt;The (endless) cycle of software development&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;1. Work on a new feature
2. Fix bug(s)
3. Go back to 1.
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Sometimes you might focus on only developing new features or only fixing bugs but those are the biggest chunks of your work if you&amp;rsquo;re building software.&lt;/p&gt;
&lt;p&gt;I think we focus a lot on the how to develop more effectively new features: using the latest framework, text editor or IDE, a new programming paradigm, etc. and when we build something new again, we try to apply the things we&amp;rsquo;ve learnt and improve.&lt;/p&gt;
&lt;p&gt;On the other hand, when we fix a bug, we tend to do it as quick as possible and then move on to something else, almost like it didn&amp;rsquo;t happen in the first place. Very few people spend any time trying to learn new debugging techniques instead of learning the latest framework that came out.&lt;/p&gt;
&lt;p&gt;If we spent more time reflecting on those errors, learning from them and understanding where they came from we could improve a lot.&lt;/p&gt;
&lt;h2 id=&#34;documenting-a-personal-mistake&#34;&gt;Documenting a personal mistake&lt;/h2&gt;
&lt;p&gt;I&amp;rsquo;ve started to document those bugs, only the ones where I was the only engineer who did it so I can totally understand the context and reflect on what I personally did.&lt;/p&gt;
&lt;p&gt;There are many different ways to do this, but I thought it&amp;rsquo;d be cool to have one place where I can gather all of them and search in the future for references and patterns. I don&amp;rsquo;t know if the term already exist but I called it the &amp;ldquo;bug log&amp;rdquo;. 🤷‍♂️ 😅&lt;/p&gt;
&lt;h2 id=&#34;whats-a-bug-log&#34;&gt;What&amp;rsquo;s a bug log?&lt;/h2&gt;
&lt;p&gt;A bug log is a collection of your past introduced bugs with different sections for each bug:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The context where the bug was introduced and what you were trying to achieve (fixing another bug, adding a new feature, etc).&lt;/li&gt;
&lt;li&gt;Why the bug happened. What was wrong in production that made you realize that there was a bug.&lt;/li&gt;
&lt;li&gt;How you fixed it.&lt;/li&gt;
&lt;li&gt;The lesson you learned afterwards. A summary of what you&amp;rsquo;ve learned in the process.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These sections are the ones that work for me, but feel free to adapt them to your needs if you want to start a bug log.&lt;/p&gt;
&lt;h2 id=&#34;an-example-of-an-entry-in-the-bug-log&#34;&gt;An example of an entry in the bug log&lt;/h2&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-md&#34; data-lang=&#34;md&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;gh&#34;&gt;# Context
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;When working on this JIRA ticket &lt;span class=&#34;gs&#34;&gt;____&lt;/span&gt;, trying to track an action on the backend,
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;I merged the pull request and it failed in production in a certain environment.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;-&lt;/span&gt; Link to ticket: ....
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;-&lt;/span&gt; Link to pull request: ....
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;gh&#34;&gt;# Why the bug happened
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;The environment variable was not set in one of the environments and that caused
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;an error in production.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;gh&#34;&gt;# How I fixed it.
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;I created the new environment variable by doing X and Y.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;gh&#34;&gt;# Lesson learned.
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;When using an environment variable make sure it&amp;#39;s available in all the environments
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;before deploying.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;As you can see it&amp;rsquo;s not anything formal and it&amp;rsquo;s just for you so feel free to use the format and tone that makes the most sense.&lt;/p&gt;
&lt;p&gt;The nice aspect about this is that if I see this becomes a pattern like if I introduced more than one bug of this type in the next year or so, I can work on a better solution. For example, a parser that compares the env. variables used in a new pull request with the ones that are in production.&lt;/p&gt;
&lt;h2 id=&#34;where-do-i-store-the-bug-log&#34;&gt;Where do I store the bug log?&lt;/h2&gt;
&lt;p&gt;I&amp;rsquo;ve become a big fan of &lt;a href=&#34;https://notion.so&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Notion&lt;/a&gt; and I&amp;rsquo;ve added it there so other team members can see it but it could be anywhere, any note-taking app or even a Github repo with some markdown files could work.&lt;/p&gt;
&lt;h2 id=&#34;what-to-do-with-the-lesson-learned-sections&#34;&gt;What to do with the &amp;ldquo;lesson learned&amp;rdquo; sections?&lt;/h2&gt;
&lt;p&gt;Something I&amp;rsquo;ve realized is that by summarizing in one sentence the bug I introduced and why I can easily reflect and learn the lesson. I&amp;rsquo;ve taken one extra step to not forget it for the future so I use &lt;a href=&#34;https://apps.ankiweb.net/&#34; target=&#34;_blank&#34;&gt;Anki&lt;/a&gt;, a solution for reviewing cards from time to time, helping you learn what&amp;rsquo;s in the card.&lt;/p&gt;
&lt;p&gt;I used it before for other purposes but I created a new collection for this. What I do is creating a card whose front is the situation I faced when I introduced the bug and the back is the lesson learned. For example, here it&amp;rsquo;d be:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;Front
--------
What should I do when I use an environment variable in the code?

Back
--------
Check by doing X/Y if it&amp;#39;s set in the right environments.
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Here&amp;rsquo;s how it looks in Anki:&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source srcset=&#34;https://josem.co/images/anki-bug-log.webp&#34; type=&#34;image/webp&#34;&gt;&lt;img src=&#34;https://josem.co//images/anki-bug-log.png&#34; alt=&#34;Anki Bug Log&#34; decoding=&#34;async&#34; class=&#34;lazyload&#34; data-sizes=&#34;auto&#34; loading=&#34;lazy&#34;
          width=&#34;720&#34;  /&gt;&lt;/picture&gt;Anki Bug Log&lt;/p&gt;

    
&lt;p&gt;This will reinforce my learning and it&amp;rsquo;s easier that I remember it in the future. It can also include some code samples so you associated the situation to new code that you&amp;rsquo;ll be modifying in the future.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m a big fan of &lt;a href=&#34;https://apps.ankiweb.net/&#34; target=&#34;_blank&#34;&gt;Anki&lt;/a&gt; and how it can help you improve as an engineer so I&amp;rsquo;ll write an article about it soon.&lt;/p&gt;
&lt;h1 id=&#34;repeating-past-mistakes&#34;&gt;Repeating past mistakes&lt;/h1&gt;
&lt;p&gt;The other thing I do is before filling a new entry, I can try to search in the log something similar. Sometimes that helps me understand if I tend to make the same kind of mistakes.&lt;/p&gt;
&lt;p&gt;I hope this was useful to you! Do you have any thoughts or feedback? Let me know &lt;a href=&#34;https://twitter.com/gilgado_&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;on Twitter&lt;/a&gt;! 😉&lt;/p&gt;
</description>
      </item>
    
    <item>
      <title>How to render a React component in Hugo</title><link>https://josem.co/how-to-render-a-react-component-in-hugo/</link>
      <pubDate>Thu, 17 Oct 2019 15:08:51 +0100</pubDate>
      
      <guid>https://josem.co/how-to-render-a-react-component-in-hugo/</guid><description type="html">&lt;p&gt;&lt;picture&gt;&lt;source srcset=&#34;https://josem.co/images/react.webp&#34; type=&#34;image/webp&#34;&gt;&lt;img src=&#34;https://josem.co//images/react.png&#34; alt=&#34;React &amp;#43; Hugo&#34; decoding=&#34;async&#34; class=&#34;lazyload&#34; data-sizes=&#34;auto&#34; loading=&#34;lazy&#34;
          width=&#34;720&#34;  /&gt;&lt;/picture&gt;&lt;/p&gt;

    
&lt;p&gt;In order to render a React component in the Hugo framework, we need first a way to have custom JS for a certain blog post. Let&amp;rsquo;s start with that.&lt;/p&gt;
&lt;h2 id=&#34;adding-javascript-to-a-post-in-hugo&#34;&gt;Adding Javascript to a post in Hugo&lt;/h2&gt;
&lt;p&gt;There are different approaches to this. I&amp;rsquo;ve used one where I can have a specific JS file for any given blog post.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Find the &lt;code&gt;single.html&lt;/code&gt; file in the layouts directory in your Hugo theme. (this could be in default or in posts or articles folder, in my case it&amp;rsquo;s &lt;code&gt;themes/jane/layouts/articles/single.html&lt;/code&gt;).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Go to the part where you render the content with &lt;code&gt;{{ .Content }}&lt;/code&gt; and after it, add:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-js&#34; data-lang=&#34;js&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{{&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;$jsFile&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;:=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;Title&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;|&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;anchorize&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{{&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;$pathJS&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;:=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;printf&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;%s%s%s&amp;#34;&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;js/posts/&amp;#34;&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;$jsFile&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;.js&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;{{&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;fileExists&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;printf&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;%s%s&amp;#34;&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;static/&amp;#34;&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;$pathJS&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;     &lt;span class=&#34;o&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;script&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;type&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;text/javascript&amp;#34;&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;src&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;{{ $pathJS | absURL }}&amp;#34;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;err&#34;&gt;/script&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;{{&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;end&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In your root site directory, create a directory under &lt;code&gt;static/js/&lt;/code&gt; called posts.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a new file with the name of a blog post slug, like &lt;code&gt;this-is-a-post.js&lt;/code&gt; if you have a post called &amp;ldquo;This is a post&amp;rdquo;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Inside that file you can now add some JS code like:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-js&#34; data-lang=&#34;js&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;alert&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;From JS&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;What this is doing is trying to find a JS file whose name is the title in the URL form and lives in the &lt;code&gt;static/posts/...&lt;/code&gt; directory. This approach could be extended to support multiple files per post too but let&amp;rsquo;s keep it simple to focus on how to add React.&lt;/p&gt;
&lt;h2 id=&#34;react-component-without-jsx-in-a-post-in-hugo&#34;&gt;React component without JSX in a post in Hugo&lt;/h2&gt;
&lt;p&gt;Now that we have a file where we can put any Javascript code, we can change our &lt;code&gt;alert&lt;/code&gt; from before to something in React like:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-js&#34; data-lang=&#34;js&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;use strict&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kr&#34;&gt;const&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;e&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;React&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;createElement&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kr&#34;&gt;class&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;LikeButton&lt;/span&gt; &lt;span class=&#34;kr&#34;&gt;extends&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;React&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;Component&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nx&#34;&gt;constructor&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;props&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kr&#34;&gt;super&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;props&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;this&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;state&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;liked&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;false&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nx&#34;&gt;render&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;this&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;state&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;liked&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;You liked this.&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;e&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;s1&#34;&gt;&amp;#39;button&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;onClick&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;this&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;setState&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;({&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;liked&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;true&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;})&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;},&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;s1&#34;&gt;&amp;#39;Like&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kr&#34;&gt;const&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;domContainer&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;document&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;querySelector&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;#root&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;ReactDOM&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;render&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;e&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;LikeButton&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;),&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;domContainer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;And then add an element to render this component in the DOM. If you&amp;rsquo;re using Hugo 0.60 or a more recent version, you need to create a shortcode in your theme to render HTML directly first.&lt;/p&gt;
&lt;p&gt;Go to your theme folder / layouts / shortcodes, and create a new file called &lt;code&gt;raw-html.html&lt;/code&gt;. The content should be:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;{{ .Inner }}
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Now, in the article you&amp;rsquo;re writing add somewhere:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-mardown&#34; data-lang=&#34;mardown&#34;&gt;{{&amp;lt; raw-html &amp;gt;}}
&amp;lt;div id=&amp;#34;root&amp;#34;&amp;gt;&amp;lt;/div&amp;gt;
{{&amp;lt;/ raw-html &amp;gt;}}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You&amp;rsquo;ll also need to load React and there are several ways to do this depending on how efficient you want to be. I think the simplest approach is to have a new part of the template that will iterate over a collection of JS files you want to add.&lt;/p&gt;
&lt;p&gt;To do so, go to the header file in your theme and add:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{{&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;and&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;IsPage&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;Params&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;jsFiles&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}}&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{{&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;range&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;Params&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;jsFiles&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}}&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;script&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;src&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;{{ . }}&amp;#34;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;script&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{{&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;end&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}}&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{{&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;end&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;I assume we&amp;rsquo;ll use external JS so we don&amp;rsquo;t have to host them ourselves but we could modify this approach to do it too.&lt;/p&gt;
&lt;p&gt;And now, in your post where you want to use React, you can add at the top:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;------
....
jsFiles:
- &amp;#34;https://unpkg.com/react@16/umd/react.production.min.js&amp;#34;
- &amp;#34;https://unpkg.com/react-dom@16/umd/react-dom.production.min.js&amp;#34;
...
------
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;In this fashion, for every article we&amp;rsquo;ll have the chance to load any JS files we want from a CDN.&lt;/p&gt;
&lt;p&gt;But still this code will probably look odd to you if you&amp;rsquo;re used to JSX since we&amp;rsquo;re not using any of that syntax there. The problem is that the JSX syntax is not part of ES6 or anything like that so the browser by default doesn&amp;rsquo;t recognize it as valid. That&amp;rsquo;s why we had to use the &lt;code&gt;createElement&lt;/code&gt; call. Let&amp;rsquo;s see how we can fix that.&lt;/p&gt;
&lt;h2 id=&#34;react-component-with-jsx-in-a-post-in-hugo&#34;&gt;React component with JSX in a post in Hugo&lt;/h2&gt;
&lt;p&gt;In order to solve the problem with JSX and being able to use it too, we need to include Babel.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Add this line to the included scripts in the header:&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;https://unpkg.com/babel-standalone@6/babel.min.js&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;ol start=&#34;2&#34;&gt;
&lt;li&gt;
&lt;p&gt;In the &lt;code&gt;single.html&lt;/code&gt; file, change the code we added to:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-js&#34; data-lang=&#34;js&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{{&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;$jsFileName&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;:=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;Title&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;|&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;anchorize&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{{&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;$pathWithoutExtension&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;:=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;printf&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;%s%s&amp;#34;&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;js/posts/&amp;#34;&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;$jsFileName&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;  &lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{{&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;$pathJS&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;:=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;printf&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;%s%s&amp;#34;&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;$pathWithoutExtension&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;.js&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{{&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;$pathJSX&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;:=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;printf&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;%s%s&amp;#34;&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;$pathWithoutExtension&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;.jsx&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{{&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;fileExists&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;printf&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;%s%s&amp;#34;&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;static/&amp;#34;&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;$pathJS&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;o&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;script&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;src&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;{{ $pathJS | absURL }}&amp;#34;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;err&#34;&gt;/script&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{{&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;else&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;fileExists&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;printf&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;%s%s&amp;#34;&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;static/&amp;#34;&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;$pathJSX&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;o&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;script&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;type&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;text/babel&amp;#34;&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;src&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;{{ $pathJSX | absURL }}&amp;#34;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;err&#34;&gt;/script&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{{&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;end&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I&amp;rsquo;m sure there&amp;rsquo;s a better way to concatenate strings in Hugo but that&amp;rsquo;s what I use for now. 🤷‍♂️&lt;/p&gt;
&lt;ol start=&#34;3&#34;&gt;
&lt;li&gt;And now you can use JSX freely in the title-of-the-article file, but with jsx as its extension. For example &lt;code&gt;title-of-the-article.jsx&lt;/code&gt;:&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-js&#34; data-lang=&#34;js&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;use strict&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kr&#34;&gt;class&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;LikeButton&lt;/span&gt; &lt;span class=&#34;kr&#34;&gt;extends&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;React&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;Component&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nx&#34;&gt;constructor&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;props&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kr&#34;&gt;super&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;props&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;this&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;state&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;liked&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;false&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nx&#34;&gt;render&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;this&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;state&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;liked&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;You liked this.&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;o&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;button&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;onClick&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{()&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;this&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;setState&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;({&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;liked&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;true&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;})}&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nx&#34;&gt;Like&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;o&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;err&#34;&gt;/button&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;ReactDOM&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;render&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;o&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;LikeButton&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;/&amp;gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nb&#34;&gt;document&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;getElementById&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;root&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Here&amp;rsquo;s a live example:&lt;/p&gt;

&lt;div id=&#34;root&#34;&gt;&lt;/div&gt;

&lt;h2 id=&#34;approach-for-more-complex-react-code&#34;&gt;Approach for more complex React code&lt;/h2&gt;
&lt;p&gt;I&amp;rsquo;m aware this is not the ideal scenario to work with complex components hierarchies in React but I can use this to show small examples of components in React without having to bundle anything on my side.&lt;/p&gt;
&lt;p&gt;For a more complex setup, we&amp;rsquo;d probably need a full tool and bundling process and a way to include the results files in the articles. Maybe in the future if I need it I&amp;rsquo;ll try to make it work with Hugo. 👋🙂&lt;/p&gt;
</description>
      </item>
    
    <item>
      <title>How to be a better remote worker</title><link>https://josem.co/how-to-be-a-better-remote-worker/</link>
      <pubDate>Mon, 14 Oct 2019 10:08:51 +0100</pubDate>
      
      <guid>https://josem.co/how-to-be-a-better-remote-worker/</guid><description type="html">&lt;p&gt;&lt;p&gt;&lt;picture&gt;&lt;source srcset=&#34;https://josem.co/images/advice-advise-advisor-7075.webp&#34; type=&#34;image/webp&#34;&gt;&lt;img src=&#34;https://josem.co//images/advice-advise-advisor-7075.jpg&#34; alt=&#34;Startup&#34; decoding=&#34;async&#34; class=&#34;lazyload&#34; data-sizes=&#34;auto&#34; loading=&#34;lazy&#34;
          width=&#34;720&#34;  /&gt;&lt;/picture&gt;Startup&lt;/p&gt;

    

&lt;em&gt;Photo by &lt;a href=&#34;https://www.pexels.com/@startup-stock-photos&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Startup Stock Photos&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;The current scene, with so many companies working remotely, leaves the employees with some changes in how things work in a company when there&amp;rsquo;s no office that are not obvious. Dynamics, habits and workflows change to some extent in a remote organization.&lt;/p&gt;
&lt;p&gt;In this article, I share some of the things I&amp;rsquo;ve learnt in the last few years that helped me from the perspective of a regular employee in a fully remote company. Let&amp;rsquo;s start!&lt;/p&gt;
&lt;h2 id=&#34;open-communication-by-default&#34;&gt;Open communication by default&lt;/h2&gt;
&lt;p&gt;How do you know if your teammate is blocked? Or if you&amp;rsquo;re a manager that you&amp;rsquo;re happy with somebody&amp;rsquo;s performance. How does the team lead know what&amp;rsquo;s the current status of a project?&lt;/p&gt;
&lt;p&gt;These questions, as necessary as they are, are hard to answer in a remote company since they&amp;rsquo;re usually answered over coffee or just by physically walking to the other person&amp;rsquo;s desk if you work in an office. When you work remotely, you need to actively think about giving them their space.&lt;/p&gt;
&lt;p&gt;By working remotely you need to change your mindset and communicate by default all you do and how you are feeling with your current workload/team/schedule. Yes, this will have an impact on your time available for other things but on the other side you shouldn&amp;rsquo;t have too many interruptions. How should do this?&lt;/p&gt;
&lt;p&gt;Any format is good as long as is easy to use and transparent to the rest of your team. There are teams that do daily asynchronous standup, others keep track of everything in a tool like Jira or Trello. It&amp;rsquo;s up to you but you need to communicate way more than in a regular company. Some tips:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Have you made progress in a task? Leave an update in the card.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Are you blocked or feeling that the current task is too hard? Reach out as soon as possible and ask for help.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Have you found something unexpected that might delay the whole project? Prepare a quick document with the context and share it with the team.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Have you had an idea on how to improve something? You know the drill 😉.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The alternative to this &amp;ldquo;over-communication&amp;rdquo; are isolated teams and team members, no transparency with stakeholders, not knowing where things are and how far you&amp;rsquo;re with a project and an overall feeling that the team or full company is not driven towards a particular direction and everyone is just doing their own thing.&lt;/p&gt;
&lt;p&gt;Try to think who might be interested in knowing something, how much they know and how to share that as clearly as possible. This also implies that sometimes you might need to communicate the same thing more than once. For example, if I&amp;rsquo;ve just completed a task I might share:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The full context of the technical details with my teammates if it&amp;rsquo;s interesting because maybe I refactored something.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The current status with the product manager and the designer.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The change that this will bring and potential issues customers might find with the customer support team.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In each case, the context I&amp;rsquo;ll provide and the information will be focus on what those people know. The refactoring part probably doesn&amp;rsquo;t matter to the customer support team for example.&lt;/p&gt;
&lt;p&gt;This is just a fun chart but not too far from reality: 🙂&lt;/p&gt;



&lt;h2 id=&#34;your-schedule-is-yours-and-yours-only&#34;&gt;Your schedule is yours and yours only&lt;/h2&gt;
&lt;p&gt;Use it to your advantage. I&amp;rsquo;ve started working sometimes at 4:30 AM because I was feeling great and finished that day earlier too. I was more productive and had more quiet time before the rest of my team woke up.&lt;/p&gt;
&lt;p&gt;Some days I knew I had a couple of calls in the evening so I spent the first few hours of the day working out or doing something else.&lt;/p&gt;
&lt;p&gt;The key here is finding that balance because for the most part you won&amp;rsquo;t have anyone telling you need to work from 9 to 5. In a remote company, your output is way more important than the hours you put in. As long as you perform well you should be ok.&lt;/p&gt;
&lt;p&gt;This also applies to your workspace, try different things and see what works better for you, it might be a co-working space, an occasional walk to your favorite coffee shop, it&amp;rsquo;s up to you but try different things and see how it feels.&lt;/p&gt;
&lt;h2 id=&#34;youre-not-alone-help-others&#34;&gt;You&amp;rsquo;re not alone, help others&lt;/h2&gt;
&lt;p&gt;In my experience, it&amp;rsquo;s much easier to isolate yourself working on your own thing, or even not collaborating with almost anyone if it&amp;rsquo;s not strictly required. At the end of the day, you&amp;rsquo;re mainly focus on your output so it&amp;rsquo;s easy to forget that you have the chance to learn and collaborate with your teammates. Some actions could be:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Send a message in your team channel or email group if you need help.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Reach out to one of your teammates at your level of experience to chat about vision, strategies to improve or a new book you&amp;rsquo;ve read that it&amp;rsquo;s influencing the way you work.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;if-something-feels-off-say-it&#34;&gt;If something feels off, say it&lt;/h2&gt;
&lt;p&gt;Or, as the old saying goes, give feedback 😊. I&amp;rsquo;d say this is equally important in an office but in a remote environment is slightly harder, you need to actively reach out to someone to share it, it doesn&amp;rsquo;t happen casually over coffee.&lt;/p&gt;
&lt;p&gt;Depending on the kind of company you&amp;rsquo;re working, you might need to adjust this or be more or less direct. Some companies love feedback at every level and others don&amp;rsquo;t but if you have the chance, sharing feedback early and often it&amp;rsquo;s a great exercise to improve as a professional and you&amp;rsquo;re opening the door to some feedback for you, which is even better.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;ll feel odd at first, it&amp;rsquo;s hard to give and even harder to receive feedback but there&amp;rsquo;s no other way to know that what you or others are doing can be better.&lt;/p&gt;
&lt;p&gt;Some tools that helps in the company I work for, Buffer, are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Anonymous link that we all have to share feedback anytime.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Q&amp;amp;A with the CEO and leaders every month or so where you can submit questions anonymously (or signed).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Anonymous survey every quarter from the company.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Retro sessions where we can share how we feel in our team and what we could improve.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A general culture of welcoming feedback.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The key realization about feedback for me was that it&amp;rsquo;s not about you, your ego, your work culture or anything like that, it&amp;rsquo;s just about a specific action that you did or didn&amp;rsquo;t do and where you can improve next time. It&amp;rsquo;s only that, don&amp;rsquo;t make it bigger.&lt;/p&gt;
&lt;h2 id=&#34;be-creative-and-proactive&#34;&gt;Be creative and proactive&lt;/h2&gt;
&lt;p&gt;When you&amp;rsquo;re in an office, ideas flow all the time. People talk about ideas, ways to improve things, something they&amp;rsquo;ve read about another company that&amp;rsquo;s great and they could use, etc.&lt;/p&gt;
&lt;p&gt;When you&amp;rsquo;re working remotely, you tend to focus much more on the task at hand so it&amp;rsquo;s very important to take a step back from time to time and come up with some ways to improve things that might be different from what you&amp;rsquo;ve been doing.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;When was the last time you took a couple of hours to think and plan? Make it a habit. Every x days, book some time off and do it. Paper, drawings, a whiteboard or even a walk in the nearest park with a notebook can help.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Share ideas early and often. Also related to the open communication you need to maintain, but in this case it&amp;rsquo;s a great way to invite others to work on new things that will improve the company. Be specific with the kind of feedback you want to receive from the people you ask, are you asking for approval, real feedback or it&amp;rsquo;s just FYI? Be sure to mention that with the people you share it. For example, for other teammates in another team something might be FYI but for my CTO or closer teammates I want their real feedback on an idea.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Innovation comes from different places, expose yourself to new ideas. Books, conferences, chats with other people in the industry, tweets!, podcasts, videos&amp;hellip; the list is big and you don&amp;rsquo;t know where the next good idea might come from. Make sure you read/watch/listen some different people and companies to get new ideas that you can try.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;find-a-mentor&#34;&gt;Find a mentor&lt;/h2&gt;
&lt;p&gt;If you have someone you admire, or someone you feel you can learn a lot from, talk to that person often and ask them questions. A mentor-mentee relationship doesn&amp;rsquo;t have to be anything formal or official and you can have multiple people you respect, in or outside your company, that you can learn from. Use that to get more knowledge, improve, ask questions, learn from the same sources they learn and you&amp;rsquo;ll see a lot of improvement soon.&lt;/p&gt;
&lt;h2 id=&#34;align-with-the-team-or-companys-goals&#34;&gt;Align with the team or company&amp;rsquo;s goals&lt;/h2&gt;
&lt;p&gt;These goals are usually shared transparently and they&amp;rsquo;re a very good indicator of what&amp;rsquo;s most important at this point for your team or the company.&lt;/p&gt;
&lt;p&gt;They might be focus on growth, quality, scaling the team by hiring and mentoring new people, pivot to another product or industry, etc. You&amp;rsquo;ll soon discover in your career that almost all the software companies share the same problems, they only vary in degree.&lt;/p&gt;
&lt;p&gt;Make those goals your goals as well and try to come up with ways on how you can contribute. For example:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Is the company hiring a lot? Volunteer to onboard those new teammates or even interviewing new candidates.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Is the focus on growth? Try to come up with some ideas to improve your and your team&amp;rsquo;s effectiveness when working. It could automated tests, a CI system with a quick deploy process or better flows to communicate changes.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Is the company pivoting to another product/industry? Go ahead and discover people in your position working in those products. What do they know? How do they work? What are their main challenges? Anticipate to those questions in your company and bring solutions.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;focus-on-one-thing-at-a-time-and-one-thing-only&#34;&gt;Focus on one thing at a time and one thing only&lt;/h2&gt;
&lt;p&gt;Constantly ask yourself, what&amp;rsquo;s the most important and impactful thing I could be doing and then go ahead and only focus on that until you finish it.&lt;/p&gt;
&lt;p&gt;Make that reflection a habit, a daily, weekly, quarterly one. There are big things and small things. Mentoring other people is a big thing, solving a problem that&amp;rsquo;s affecting and delaying other engineers is a small one but both could be equally important depending on the situation.&lt;/p&gt;
&lt;h2 id=&#34;focus-on-the-things-that-dont-change&#34;&gt;Focus on the things that don&amp;rsquo;t change&lt;/h2&gt;
&lt;p&gt;Jeff Bezos famously shared that Amazon actively focuses on the things that don&amp;rsquo;t change even if it&amp;rsquo;s in the long term. You won&amp;rsquo;t want to wait longer in the future for a package, or have less products on Amazon so can&amp;rsquo;t buy what you need, or have a slower website where you can buy products. If you focus on improving those things, customers will appreciate it and buy more from you.&lt;/p&gt;
&lt;p&gt;There&amp;rsquo;s a great exercise you can make with that idea: &lt;strong&gt;think about the aspects of your product or workflow that won&amp;rsquo;t change in the future and whose constant improvement will always bring benefits to the team&lt;/strong&gt;. You don&amp;rsquo;t need to be in a high level position for doing this, you don&amp;rsquo;t need to be the CEO or CTO of that company, even a junior software engineer or manager can contribute with this approach.&lt;/p&gt;
&lt;p&gt;Here are some challenging questions that helped me:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;How long does it take to load your main product&amp;rsquo;s site?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;How do you know if something fails in your product?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;How long does it take from idea to execution in your team if the idea is great?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Is there a way to automatize that little thing you need to do almost daily? What would be the impact in a week if you and each of your teammates could save 5 minutes on a daily basis? And in a month? What about in a year?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;From the X hours you work every day, would there be a way to come up with a schedule that makes you more efficient?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Do you need to explain that little thing that&amp;rsquo;s particular to the project every time or could you just create a written resource so others won&amp;rsquo;t need to ask next time?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;After some time working there, if you started again in the company tomorrow, what are the things you&amp;rsquo;d like to have to be more productive from day one? Could you help creating those resources for the new people that will come?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Do you have some annoying things that fail from time to time but haven&amp;rsquo;t fixed yet? How much is that delaying you and your teammates? How is that affecting your motivation?&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;other-ideas&#34;&gt;Other ideas?&lt;/h2&gt;
&lt;p&gt;Do you have other ideas that have helped you? Reach out on &lt;a href=&#34;https://twitter.com/gilgado_&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Twitter&lt;/a&gt;! 🙂&lt;/p&gt;
</description>
      </item>
    
    <item>
      <title>Introduction to Bitwise Operations</title><link>https://josem.co/introduction-to-bitwise-operations/</link>
      <pubDate>Wed, 09 Oct 2019 10:08:51 +0100</pubDate>
      
      <guid>https://josem.co/introduction-to-bitwise-operations/</guid><description type="html">&lt;p&gt;Bitwise operations are really useful and fast for storing and operate on certain values. They are way more used in systems where resources are more limited like video-games or embedded devices.&lt;/p&gt;
&lt;p&gt;In this first article about bitwise operations, we get a quick introduction to them with a drawing (new format!) and some written content but I plan on sharing more 🙂.&lt;/p&gt;
&lt;h2 id=&#34;what-are-bitwise-operations&#34;&gt;What are bitwise operations?&lt;/h2&gt;
&lt;p&gt;They&amp;rsquo;re operations that deal with bits directly. Bits are 1s and 0s and it&amp;rsquo;s how everything is stored internally in a computer so being able to operate with them directly is very efficient because the processor is able to do those operations natively. &lt;a href=&#34;https://en.wikipedia.org/wiki/Bitwise_operation&#34; rel=&#34;noopener&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Wikipedia says&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;hellip;typically, bitwise operations are substantially faster than division, several times faster than multiplication, and sometimes significantly faster than addition&amp;hellip;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id=&#34;the-three-basic-operators&#34;&gt;The three basic operators&lt;/h2&gt;
&lt;p&gt;There are more but let&amp;rsquo;s take a look today at the three most basic operators:&lt;/p&gt;
&lt;h3 id=&#34;not&#34;&gt;NOT&lt;/h3&gt;
&lt;p&gt;NOT is very simple, if there&amp;rsquo;s a 1 we get 0. If there&amp;rsquo;s a 0, we get 1.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s represented by &lt;code&gt;~&lt;/code&gt; in most programming languages so for example: &lt;code&gt;~0101011 = 1010100&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&#34;and&#34;&gt;AND&lt;/h3&gt;
&lt;p&gt;AND is like the boolean equivalent you already use in if conditions but with one difference, this operates at the level of bits:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-c&#34; data-lang=&#34;c&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;or&#34;&gt;OR&lt;/h3&gt;
&lt;p&gt;The same goes for the OR operation, represented with the | symbol in many programming languages.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-c&#34; data-lang=&#34;c&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;|&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;|&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;|&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;|&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;how-they-operate-with-more-than-1-bit&#34;&gt;How they operate with more than 1 bit&lt;/h2&gt;
&lt;p&gt;The key here is to remember that when we have a bitwise operation with more than 1 bit, we do it bit by bit. For example:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-c&#34; data-lang=&#34;c&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;// Bitwise OR
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;mi&#34;&gt;111010&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;mo&#34;&gt;001100&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;-------&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;mi&#34;&gt;111110&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Or in an AND operation:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-c&#34; data-lang=&#34;c&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;// Bitwise AND
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;mi&#34;&gt;111010&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;mo&#34;&gt;001100&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;-------&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;mo&#34;&gt;001000&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;example-to-show-how-to-use-them&#34;&gt;Example to show how to use them:&lt;/h2&gt;
&lt;p&gt;&lt;p&gt;&lt;picture&gt;&lt;source srcset=&#34;https://josem.co/images/intro-bitwise.webp&#34; type=&#34;image/webp&#34;&gt;&lt;img src=&#34;https://josem.co//images/intro-bitwise.png&#34; alt=&#34;Intro to bitwise&#34; decoding=&#34;async&#34; class=&#34;lazyload&#34; data-sizes=&#34;auto&#34; loading=&#34;lazy&#34;
          width=&#34;720&#34;  /&gt;&lt;/picture&gt;Intro to bitwise&lt;/p&gt;

    

&lt;em&gt;&lt;a href=&#34;https://josem.co/images/intro-bitwise-full.png&#34;&gt;Full drawing here&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;br&gt;
In a future article we&#39;ll see other operators because you can do some very efficient calculations with numbers but we need more than just these three. See you soon!</description>
      </item>
    
    <item>
      <title>Remove Empty Elements in an Array in PHP</title><link>https://josem.co/remove-empty-elements-in-an-array-in-php/</link>
      <pubDate>Tue, 01 Oct 2019 08:08:51 +0100</pubDate>
      
      <guid>https://josem.co/remove-empty-elements-in-an-array-in-php/</guid><description type="html">&lt;h1 id=&#34;problem-with-array_filter&#34;&gt;Problem with array_filter&lt;/h1&gt;
&lt;p&gt;This is a small trick to avoid issues when removing elements in PHP in an array.&lt;/p&gt;
&lt;p&gt;If you have an array where some elements might be empty, like null, the first idea that comes to mind is doing something like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-php&#34; data-lang=&#34;php&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;&amp;lt;?&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;php&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;$array&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;a&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;b&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;c&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;d&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;array_filter&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$array&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;function&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$element&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;!&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;empty&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$element&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;});&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Of, if we don&amp;rsquo;t provide a callback to array_filter, PHP will do the same for us:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-php&#34; data-lang=&#34;php&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;&amp;lt;?&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;php&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;array_filter&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$array&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This will give us a new array with all the empty elements removed. The problem though, is that the structure of the array in terms of indexes is not the expected one:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-php&#34; data-lang=&#34;php&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;&amp;lt;?&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;php&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;$array&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;a&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;b&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;c&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;d&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;print_r&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;array_filter&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$array&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;));&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;// Array
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;// (
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;//     [0] =&amp;gt; a
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;//     [2] =&amp;gt; b
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;//     [3] =&amp;gt; c
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;//     [5] =&amp;gt; d
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;// )
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;So the indexes for the items that we skipped are gone. This could be ok but when we try to use that array in some situations like a query in the DB, we might find some issues.&lt;/p&gt;
&lt;p&gt;In MongoDB for example, if you&amp;rsquo;re trying to do a find with &lt;code&gt;$in&lt;/code&gt;, you&amp;rsquo;ll get an error if the array is missing some indexes.&lt;/p&gt;
&lt;h1 id=&#34;solution&#34;&gt;Solution&lt;/h1&gt;
&lt;p&gt;The easiest solution to this problem of skipped indexes is to use &lt;code&gt;array_values&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-php&#34; data-lang=&#34;php&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;&amp;lt;?&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;php&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;$array&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;a&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;b&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;c&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;d&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;$result&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;array_values&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;array_filter&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$array&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;));&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;print_r&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$result&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;// Array
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;// (
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;//     [0] =&amp;gt; a
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;//     [1] =&amp;gt; b
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;//     [2] =&amp;gt; c
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;//     [3] =&amp;gt; d
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;// )
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p class=&#34;link-code&#34;&gt;
 &lt;span class=&#34;link-code&#34;&gt;&lt;a target=&#34;_blank&#34; href=&#34;https://repl.it/repls/SnowSurprisedHypercard&#34;&gt;(see it live)&lt;/a&gt;&lt;/span&gt;
&lt;/p&gt;

&lt;p&gt;This will extract the values into a new, well indexed, array.&lt;/p&gt;
</description>
      </item>
    
    <item>
      <title>CS Basics: How to refactor a boolean expression</title><link>https://josem.co/cs-basics-how-to-refactor-a-boolean-expression/</link>
      <pubDate>Mon, 23 Sep 2019 08:08:51 +0100</pubDate>
      
      <guid>https://josem.co/cs-basics-how-to-refactor-a-boolean-expression/</guid><description type="html">&lt;p&gt;&lt;p&gt;&lt;picture&gt;&lt;source srcset=&#34;https://josem.co/images/auditorium-benches-chairs-207691.webp&#34; type=&#34;image/webp&#34;&gt;&lt;img src=&#34;https://josem.co//images/auditorium-benches-chairs-207691.jpg&#34; alt=&#34;Class&#34; decoding=&#34;async&#34; class=&#34;lazyload&#34; data-sizes=&#34;auto&#34; loading=&#34;lazy&#34;
          width=&#34;720&#34;  /&gt;&lt;/picture&gt;Class&lt;/p&gt;

    

&lt;em&gt;Photo by &lt;a href=&#34;https://www.pexels.com/@pixabay&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Pixabay&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Computer Science sounds so boring, so academic, that sometimes it&amp;rsquo;s hard to know if there&amp;rsquo;s even any useful knowledge for our jobs building actual software.&lt;/p&gt;
&lt;p&gt;Of course, I&amp;rsquo;m half joking. Computer Science is very important to understand what&amp;rsquo;s going on in a computer but I understand it doesn&amp;rsquo;t sound as attractive as learning a specific technology that&amp;rsquo;s in demand in the industry.&lt;/p&gt;
&lt;p&gt;With this series of posts, I&amp;rsquo;ll try to extract from those long boring books a few things we can start applying right away and I hope you&amp;rsquo;ll find useful.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ll always start with the immediate practical part and then I&amp;rsquo;ll explain a bit more about the underlying reasons and terminology.&lt;/p&gt;
&lt;!-- more --&gt;
&lt;p&gt;Let&amp;rsquo;s start today with some boolean expressions.&lt;/p&gt;
&lt;h1 id=&#34;why-is-it-useful-to-refactor-a-boolean-expression&#34;&gt;Why is it useful to refactor a boolean expression?&lt;/h1&gt;
&lt;p&gt;It has happened to me many times that, when refactoring a condition, I had to change it to create a method that makes sense in the class. Let&amp;rsquo;s show an simple example.&lt;/p&gt;
&lt;p&gt;Imagine we have the following class (in Javascript, but can be applied to almost any language):&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-js&#34; data-lang=&#34;js&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kr&#34;&gt;class&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;Person&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nx&#34;&gt;constructor&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;name&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;active&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;email&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;this&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;name&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;name&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;this&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;active&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;active&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;this&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;email&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;email&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nx&#34;&gt;hasEmail&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;this&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;email&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;!==&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nx&#34;&gt;isActive&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;this&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;active&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nx&#34;&gt;sendEmail&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;!&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;this&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;isActive&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;||&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;!&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;this&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;hasEmail&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;())&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;false&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;c1&#34;&gt;// ... send email ...
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;At some point we realize that it might be easier to have an internal method that can tell us if the user can receive emails. According to the code that&amp;rsquo;d mean that it&amp;rsquo;s an active user and has an email set.&lt;/p&gt;
&lt;p&gt;We could do this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-js&#34; data-lang=&#34;js&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nx&#34;&gt;canReceiveEmail&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;c1&#34;&gt;// What do we return here? 🤔
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nx&#34;&gt;sendEmail&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;!&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;this&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;canReceiveEmail&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;())&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;false&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;c1&#34;&gt;// ...
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;As you can see the &lt;code&gt;sendEmail&lt;/code&gt; method is more readable now, &lt;strong&gt;but what should we put in the &lt;code&gt;canReceiveEmail()&lt;/code&gt; method&lt;/strong&gt;?&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ll let you think for a second&amp;hellip;🙂&lt;/p&gt;
&lt;p&gt;🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔&lt;/p&gt;
&lt;p&gt;🤔🤔🤔🤔🤔🤔🤔🤨🐶🤨🤔🤔🤔🤔🤔🤔🤔🤔&lt;/p&gt;
&lt;p&gt;🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Did you figure it out?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;What we need is the opposite value of the condition we had:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-js&#34; data-lang=&#34;js&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;!&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;this&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;isActive&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;||&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;!&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;this&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;hasEmail&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;();&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The negation of that expression would be:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-js&#34; data-lang=&#34;js&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;this&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;isActive&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;this&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;hasEmail&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;();&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I think intuitively we can understand that if what we were looking for is that:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The user is not active &lt;em&gt;OR&lt;/em&gt; doesn&amp;rsquo;t have email;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The opposite would be that:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The user is active &lt;em&gt;AND&lt;/em&gt; has email.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So the final class would look like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-js&#34; data-lang=&#34;js&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kr&#34;&gt;class&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;Person&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nx&#34;&gt;constructor&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;name&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;active&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;email&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;this&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;name&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;name&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;this&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;active&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;active&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;this&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;email&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;email&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nx&#34;&gt;hasEmail&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;this&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;email&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;!==&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nx&#34;&gt;isActive&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;this&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;active&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nx&#34;&gt;canReceiveEmail&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;this&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;isActive&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;this&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;hasEmail&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;();&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nx&#34;&gt;sendEmail&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;!&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;this&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;canReceiveEmail&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;())&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;c1&#34;&gt;// Notice negation of the method with !
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;false&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;c1&#34;&gt;// ... send email ...
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class=&#34;link-code&#34;&gt;
 &lt;span class=&#34;link-code&#34;&gt;&lt;a target=&#34;_blank&#34; href=&#34;https://jsbin.com/lusafuv/edit?js,console&#34;&gt;(see in JSbin)&lt;/a&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;We could also have created the negative version &lt;code&gt;cannotReceiveEmail()&lt;/code&gt; but I prefer to use &amp;ldquo;positive&amp;rdquo; method names since they tend to be more useful in other places of the code. Nevertheless, If we had done that the result would have been:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-js&#34; data-lang=&#34;js&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;cannotReceiveEmail&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;!&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;this&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;isActive&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;this&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;hasEmail&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;());&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;sendEmail&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;this&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;cannotReceiveEmail&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;())&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;false&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;c1&#34;&gt;// ... send email ...
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h1 id=&#34;computer-science-behind-solution&#34;&gt;Computer Science behind solution&lt;/h1&gt;
&lt;p&gt;What you just saw wasn&amp;rsquo;t discovered recently, the mathematician who formulated this solution, Augustus De Morgan, died in 1871.&lt;/p&gt;
&lt;p&gt;This rule, along with another one we&amp;rsquo;ll see in a bit, are called &amp;ldquo;De Morgan&amp;rsquo;s Laws&amp;rdquo;. They&amp;rsquo;re part of a bigger field in Mathematics and studied in any computer science course, called Boolean Algebra.&lt;/p&gt;
&lt;p&gt;The other rule is as follows. If we have this expression:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-js&#34; data-lang=&#34;js&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kr&#34;&gt;const&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;willDieSoon&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;!&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;this&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;isYoung&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;!&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;this&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;worksOut&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;It&amp;rsquo;s equivalent to:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-js&#34; data-lang=&#34;js&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kr&#34;&gt;const&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;willDieSoon&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;!&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;this&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;isYoung&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;||&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;this&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;worksOut&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If you didn&amp;rsquo;t get this one, think about what would happen in all the potential conditions:&lt;/p&gt;
&lt;p&gt;Consider &lt;code&gt;isYoung&lt;/code&gt; is true/false and &lt;code&gt;worksOut&lt;/code&gt; is true/false. What would be the result of the expression? Wouldn&amp;rsquo;t that be the same that in the first case?&lt;/p&gt;
&lt;p&gt;To truly understand this, it&amp;rsquo;s often useful to create a small table of possibilities. The last column represents: &lt;code&gt;willDieSoon&lt;/code&gt;.&lt;/p&gt;
&lt;table&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th&gt;&lt;code&gt;isYoung&lt;/code&gt;&lt;/th&gt;
					&lt;th style=&#34;text-align: left&#34;&gt;&lt;code&gt;worksOut&lt;/code&gt;&lt;/th&gt;
					&lt;th&gt;&lt;code&gt;isYoung OR worksOut&lt;/code&gt;&lt;/th&gt;
					&lt;th&gt;&lt;code&gt;!(isYoung OR worksOut)&lt;/code&gt;&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
			&lt;tr&gt;
					&lt;td&gt;false&lt;/td&gt;
					&lt;td style=&#34;text-align: left&#34;&gt;false&lt;/td&gt;
					&lt;td&gt;false&lt;/td&gt;
					&lt;td&gt;true&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;true&lt;/td&gt;
					&lt;td style=&#34;text-align: left&#34;&gt;false&lt;/td&gt;
					&lt;td&gt;true&lt;/td&gt;
					&lt;td&gt;false&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;false&lt;/td&gt;
					&lt;td style=&#34;text-align: left&#34;&gt;true&lt;/td&gt;
					&lt;td&gt;true&lt;/td&gt;
					&lt;td&gt;false&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;true&lt;/td&gt;
					&lt;td style=&#34;text-align: left&#34;&gt;true&lt;/td&gt;
					&lt;td&gt;true&lt;/td&gt;
					&lt;td&gt;false&lt;/td&gt;
			&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The same table can be applied to the first expression:&lt;/p&gt;
&lt;table&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th&gt;&lt;code&gt;isYoung&lt;/code&gt;&lt;/th&gt;
					&lt;th style=&#34;text-align: left&#34;&gt;&lt;code&gt;worksOut&lt;/code&gt;&lt;/th&gt;
					&lt;th&gt;&lt;code&gt;!isYoung AND !worksOut&lt;/code&gt;&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
			&lt;tr&gt;
					&lt;td&gt;false&lt;/td&gt;
					&lt;td style=&#34;text-align: left&#34;&gt;false&lt;/td&gt;
					&lt;td&gt;true&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;true&lt;/td&gt;
					&lt;td style=&#34;text-align: left&#34;&gt;false&lt;/td&gt;
					&lt;td&gt;false&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;false&lt;/td&gt;
					&lt;td style=&#34;text-align: left&#34;&gt;true&lt;/td&gt;
					&lt;td&gt;false&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;true&lt;/td&gt;
					&lt;td style=&#34;text-align: left&#34;&gt;true&lt;/td&gt;
					&lt;td&gt;false&lt;/td&gt;
			&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id=&#34;the-morgans-laws&#34;&gt;The Morgan&amp;rsquo;s Laws&lt;/h2&gt;
&lt;p&gt;So the two rules, written in a formal manner, would be:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;\( \neg (P\lor Q)\iff (\neg P)\land (\neg Q) \)&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;\( \neg (P\land Q)\iff (\neg P)\lor (\neg Q) \)&lt;/code&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;\( \neg \)&lt;/code&gt; means negation. In Javascript and many other languages is !&lt;/li&gt;
&lt;li&gt;&lt;code&gt;\( \land \)&lt;/code&gt; means AND. In Javascript: &amp;amp;&amp;amp;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;\( \lor \)&lt;/code&gt; means OR. In Javascript: ||&lt;/li&gt;
&lt;li&gt;&lt;code&gt;\( \iff \)&lt;/code&gt; means, without going too much into the details, that both expressions can be replaced with each other, that is, that both expressions are equivalent.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So in Javascript, we could say this is:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-js&#34; data-lang=&#34;js&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;!&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;P&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;||&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;Q&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;==&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;!&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;P&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;!&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;Q&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;!&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;P&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;Q&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;==&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;!&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;P&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;||&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;!&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;Q&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We&amp;rsquo;ve used the second one to refactor our code.&lt;/p&gt;
&lt;p&gt;We started with the &lt;code&gt;!P || !Q&lt;/code&gt; and ended with &lt;code&gt;!(P &amp;amp;&amp;amp; Q)&lt;/code&gt;. Let&amp;rsquo;s review it now:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-js&#34; data-lang=&#34;js&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;// we started with this condition to check before sending the email:
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;!&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;this&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;isActive&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;||&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;!&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;this&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;hasEmail&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;// Then, we moved the logic to canReceiveEmail()
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;this&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;isActive&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;this&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;hasEmail&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;// And used the negation of that:
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;!&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;this&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;isActive&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;||&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;!&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;this&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;hasEmail&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;==&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;!&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;this&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;canReceiveEmail&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;())&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;// Which is:
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;!&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;this&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;isActive&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;||&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;!&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;this&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;hasEmail&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;==&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;!&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;this&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;isActive&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;this&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;hasEmail&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;());&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;// So:
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;!&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;P&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;||&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;!&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;Q&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;==&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;!&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;P&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;B&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;other-boolean-algebra-laws&#34;&gt;Other Boolean Algebra Laws&lt;/h2&gt;
&lt;p&gt;If you didn&amp;rsquo;t know about this boolean algebra laws specifically, don&amp;rsquo;t worry! You&amp;rsquo;re probably applying others like:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;\( x \lor y = y \lor x \)&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;\( x \land y = y \land x \)&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Those mean that:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-js&#34; data-lang=&#34;js&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;weAreInChrome&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;||&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;weAreInFirefox&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;())&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;===&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;weAreInFirefox&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;||&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;weAreInChrome&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;())&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;isRaining&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;isCloudy&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;())&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;===&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;isCloudy&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;isRaining&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;())&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;So, intuitively perhaps, you know that the boolean conditions with two values can be switched in order and the result is the same (🤓🗯️ &lt;em&gt;that&amp;rsquo;s commutativity!&lt;/em&gt;).&lt;/p&gt;
&lt;p&gt;There are &lt;a href=&#34;https://en.wikipedia.org/wiki/Boolean_algebra#Laws&#34; rel=&#34;noopener&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;many others boolean laws&lt;/a&gt; that are useful so I might do a second part of boolean logic later in the series with the ones that are not so intuitive.&lt;/p&gt;
&lt;p&gt;Did you find this one useful? Let me know &lt;a href=&#34;https://twitter.com/gilgado_&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;on Twitter&lt;/a&gt; please! 👋 🙂&lt;/p&gt;
&lt;h2 id=&#34;references&#34;&gt;References&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://en.wikipedia.org/wiki/Boolean_algebra&#34; rel=&#34;noopener&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Boolean Algebra&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://en.wikipedia.org/wiki/De_Morgan%27s_laws&#34; rel=&#34;noopener&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;De Morgan&amp;rsquo;s laws&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
      </item>
    
    <item>
      <title>Better Console Debug in Javascript</title><link>https://josem.co/better-console-debug-in-javascript/</link>
      <pubDate>Sun, 15 Sep 2019 22:56:23 -0700</pubDate>
      
      <guid>https://josem.co/better-console-debug-in-javascript/</guid><description type="html">&lt;p&gt;When debugging an object in Javascript, you usually do something like:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-js&#34; data-lang=&#34;js&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;console&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;log&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;myObject&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Or even:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-js&#34; data-lang=&#34;js&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;console&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;debug&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;myObject&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If we create the object with:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-js&#34; data-lang=&#34;js&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;myObject&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nx&#34;&gt;name&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;test&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nx&#34;&gt;size&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;1234&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;And you do a console.debug from somewhere in the code, in the console you&amp;rsquo;ll see:&lt;/p&gt;

&lt;p style=&#34;text-align:center&#34;&gt;&lt;img alt=&#34;&#34; src=&#34;https://josem.co/images/better-console-debug-js.png&#34; class=&#34;alignnone&#34; width=&#34;720&#34; /&gt;&lt;/p&gt;

&lt;p&gt;So it might not be clear which object you&amp;rsquo;re dealing with. To solve this you can do:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-js&#34; data-lang=&#34;js&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;console&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;debug&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;({&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;myObject&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;});&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The result is the name of the object and the full object printed:&lt;/p&gt;

&lt;p style=&#34;text-align:center&#34;&gt;&lt;img alt=&#34;&#34; src=&#34;https://josem.co/images/better-console-debug-js-2.png&#34; class=&#34;alignnone&#34; width=&#34;720&#34; /&gt;&lt;/p&gt;

&lt;p&gt;This comes from ES6, it&amp;rsquo;s usually called &lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Object_initializer#Property_definitions&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;shorthand property names&lt;/a&gt; and it works because the key and the object variable has the same name.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s the same thing that saying:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-js&#34; data-lang=&#34;js&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;console&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;debug&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;({&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;myObject&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;myObject&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;});&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;But more convenient as you can see. 😉&lt;/p&gt;</description>
      </item>
    
    <item>
      <title>Don&#39;t Start With Buying</title><link>https://josem.co/dont-start-with-buying/</link>
      <pubDate>Thu, 28 Feb 2019 08:08:51 +0100</pubDate>
      
      <guid>https://josem.co/dont-start-with-buying/</guid><description type="html">&lt;p&gt;It&amp;rsquo;s so tempting. We have a new idea, a new hobby that&amp;rsquo;s exciting and the first thing we do is buying something new. It seems necessary at the moment and it&amp;rsquo;s so easy.&lt;/p&gt;
&lt;p&gt;I remember when I took up tennis some years ago, I researched and bought the best racket and 6 months later I got an injury in my shoulder and haven&amp;rsquo;t played tennis ever since.&lt;/p&gt;
&lt;p&gt;But it still happens, every time I think about doing something new I start with the product I want to buy and I need to revert that. It&amp;rsquo;s much better to start with a simple but harder question:&lt;/p&gt;
&lt;p&gt;How can I do something new with what I have?&lt;/p&gt;</description>
      </item>
    
    <item>
      <title>What I&#39;ve Learnt at Buffer</title><link>https://josem.co/what-ive-learnt-at-buffer/</link>
      <pubDate>Sun, 10 Feb 2019 00:00:00 +0000</pubDate>
      
      <guid>https://josem.co/what-ive-learnt-at-buffer/</guid><description type="html">&lt;p&gt;From the interviews with Buffer until now, over four years later, I have the feeling I work in a unique environment and I want to share here some lessons I&amp;rsquo;ve learnt so far.&lt;/p&gt;
&lt;p&gt;Thirty days after sending my application to Buffer, in November of 2014, I received an email from our CTO back then, Sunil, asking me if I could have a call for the first interview. Two months later I attended my first  Buffer retreat, in Sydney.&lt;/p&gt;

&lt;p style=&#34;text-align:center&#34;&gt;&lt;img alt=&#34;Team retreat in Sydney in 2015&#34; src=&#34;https://josem.co/images/team-pic-Sydney.jpg&#34; class=&#34;alignnone&#34; width=&#34;720&#34; /&gt;&lt;/p&gt;

&lt;p&gt;From the interviews with Buffer until now, over four years later, I have the feeling that I work in a unique environment and I want to share here some lessons I&amp;rsquo;ve learnt so far.&lt;/p&gt;
&lt;p&gt;Ah, and the team has grown a lot during my time here, here we are in Singapore with some of our significant others in 2018:&lt;/p&gt;

&lt;p style=&#34;text-align:center&#34;&gt;&lt;img alt=&#34;Team retreat in Singapore in 2018&#34; src=&#34;https://josem.co/images/team-pic-singapore.jpeg&#34; class=&#34;alignnone&#34; width=&#34;720&#34; /&gt;&lt;br&gt;&lt;/p&gt;

&lt;h2 id=&#34;communication&#34;&gt;Communication&lt;/h2&gt;
&lt;p&gt;English is not, as you can probably guess, my first language, so when I joined Buffer one of the goals was communicating well with my teammates. I expected a business English style but I couldn&amp;rsquo;t be more wrong. The language used at Buffer is much more friendly, close but at the same time carefully crafted to respect everybody&amp;rsquo;s cultural backgrounds and language barriers. I confess this was at first hard but I learnt that the way you communicate, especially in a remote environment, defines a lot the culture of the workplace.&lt;/p&gt;
&lt;p&gt;For example, If you use a word or concept that&amp;rsquo;s only known in the US you&amp;rsquo;re excluding other people that might not have that context. If someone is wrong, you can tell them but there&amp;rsquo;s no need to do it publicly so the other person can save face. Little things matter.&lt;/p&gt;
&lt;h2 id=&#34;remote&#34;&gt;Remote&lt;/h2&gt;
&lt;p&gt;Buffer is a fully remote company, so we don&amp;rsquo;t even have an office and this weekend I could go to another country and an email to my team would be enough, just to reschedule some calls if necessary.&lt;/p&gt;
&lt;p&gt;Yes, this is amazing and allows you to have a flexibility and lifestyle that you can&amp;rsquo;t even compare with a traditional work environment. I can&amp;rsquo;t thank enough Buffer for this. It has allowed me traveling when I wanted, try different schedules, spending more time with my family and saving a lot of hours every week because I don&amp;rsquo;t need to commute, but there are other aspects of a remote work environment that come with it and are not so good.&lt;/p&gt;
&lt;p&gt;The positives aspects are way more than the negative ones but not everything is working from beautiful spots and traveling every week. Remote work is not for everybody and sometimes is harder in terms of work/life balance and motivation than a more traditional office environment.&lt;/p&gt;
&lt;p&gt;First and foremost, when you have a hard problem in hand, is equally hard from a beach in Thailand or your beautiful private home office. The focus, collaboration and effort required to overcome it are the same.&lt;/p&gt;
&lt;p&gt;Also, when your professional world is there after opening your laptop that&amp;rsquo;s next to you and you don&amp;rsquo;t have a schedule is not easy to separate your work from the rest of your life if you&amp;rsquo;re not intentional about it. You don&amp;rsquo;t leave work &amp;ldquo;at work&amp;rdquo; because you carry it all the time with you if you want.&lt;/p&gt;
&lt;p&gt;You&amp;rsquo;re also responsible of setting up a work environment that works for you, and that takes months to discover. Besides, setting up a schedule and clear boundaries with your family and friends to make them understand that being at home doesn&amp;rsquo;t mean you&amp;rsquo;re free is not so easy.&lt;/p&gt;
&lt;p&gt;The other aspect of remote work is that getting help is usually not immediate and that&amp;rsquo;s good, since you can respect more other people&amp;rsquo;s schedules, but especially if you&amp;rsquo;re junior in your area, it might make you feel more isolated. It&amp;rsquo;s true that we help each other but we don&amp;rsquo;t share coffee or lunch every day so you need to make an extra effort to improve the collaboration and sharing with your team.&lt;/p&gt;
&lt;p&gt;After 4 years my schedule looks very similar to a regular one in an office. I mainly work in the morning, starting early with a quick stop to drop my kid at the day-care center, and leave the evening for some calls if I have them. I&amp;rsquo;ve discovered that silence and a fresh mind in the morning works best for me.&lt;/p&gt;
&lt;p&gt;If you&amp;rsquo;re interested in improving as a remote worker, you should read &lt;a href=&#34;https://www.amazon.com/Deep-Work-Focused-Success-Distracted/dp/1455586692&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Deep Focus&lt;/a&gt; by Cal Newport. Focus is a rare skill these days.&lt;/p&gt;
&lt;h2 id=&#34;culture-and-leadership&#34;&gt;Culture and leadership&lt;/h2&gt;
&lt;p&gt;Buffer is a special company in terms of culture and transparency. You can know how much we make as a company, our salaries, our growth, how many people use the product, our values and many other things we share in our open blog.&lt;/p&gt;
&lt;p&gt;Many changes have happened in my time at Buffer so far. Some things worked great from the first time they implemented it and others have been discarded or updated when needed. When I joined Buffer, for example, there was no parental leave policy because nobody had had a baby while working here.&lt;/p&gt;
&lt;p&gt;The lesson I&amp;rsquo;ve learnt after so many changes is that it&amp;rsquo;s impossible to join a startup and expect them to have all the answers and protocols like a big corporation but that&amp;rsquo;s ok as long as you trust the leaders of the organization.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve seen countless examples of Buffer actively trying to improve things for the team without asking and that makes me trust a lot our leaders so I&amp;rsquo;m sure that whatever change or experiment that comes in the future will come or be changed to make it better for us. This is probably one of the key aspects that makes me keep working here after four years.&lt;/p&gt;
&lt;h2 id=&#34;changing-things&#34;&gt;Changing things&lt;/h2&gt;
&lt;p&gt;Coming from more traditional companies, I was very surprised when I joined Buffer and I could talk directly to the CEO or the CTO about everything. This was true when we were 25 but still is nowadays with 80+ teammates. I can book a call with the CEO, see the leaders weekly call notes and submit an anonymous question to them or give feedback. We also have anonymous surveys to evaluate how we are as employees and what we&amp;rsquo;d like to improve.&lt;/p&gt;
&lt;h2 id=&#34;more-lessons&#34;&gt;More lessons&lt;/h2&gt;
&lt;p&gt;I&amp;rsquo;ve learnt so many other things about software, product, marketing and company culture but these are the main ones, I&amp;rsquo;ll probably write more about this if I see interest. &lt;a href=&#34;https://josem.co/about/#contact&#34; rel=&#34;noopener&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Reach out&lt;/a&gt; if you have any questions about Buffer or my journey so far here, I&amp;rsquo;d love to talk.&lt;/p&gt;
</description>
      </item>
    
    <item>
      <title>UX and Efficiency</title><link>https://josem.co/ux-and-efficiency/</link>
      <pubDate>Tue, 18 Nov 2014 00:00:00 +0000</pubDate>
      
      <guid>https://josem.co/ux-and-efficiency/</guid><description type="html">&lt;p&gt;&lt;picture&gt;&lt;source srcset=&#34;https://josem.co/images/iceberg.webp&#34; type=&#34;image/webp&#34;&gt;&lt;img src=&#34;https://josem.co//images/iceberg.jpg&#34; alt=&#34;Illustration by Miriam (all rights reserved)&#34; decoding=&#34;async&#34; class=&#34;lazyload&#34; data-sizes=&#34;auto&#34; loading=&#34;lazy&#34;
          width=&#34;720&#34;  /&gt;&lt;/picture&gt;&lt;/p&gt;

    
&lt;h2 id=&#34;introduction&#34;&gt;Introduction&lt;/h2&gt;
&lt;p&gt;We can visualize the knowledge about an application as an iceberg where the users will head down as they use it more and more and the UX experts should be in charge of guiding them step by step to deeper areas.&lt;/p&gt;
&lt;p&gt;This knowledge will allow them to perform actions quicker and more efficiently. On Gmail, for example, you can create a new mail by clicking on the “Compose” button or by pressing the key c.&lt;/p&gt;
&lt;h2 id=&#34;games-and-ux&#34;&gt;Games and UX&lt;/h2&gt;
&lt;p&gt;When a new user arrives to an application there is a set actions that should be very intuitive and the way they can be done should be as simple as possible like clicking on a button or filling an form.&lt;/p&gt;
&lt;p&gt;Some of the users, after a while, will be very fast in those actions and yet not as efficient as they could because they haven’t learnt better ways to perform them.&lt;/p&gt;
&lt;p&gt;In my opinion, the UX experts should provide a way to improve the efficiency for the most experienced users and, at the same time, keep the learning curve as steady as possible. The nice thing about this approach is that game developers have been doing this for a while so we can learn from them.&lt;/p&gt;
&lt;p&gt;I don’t play a lot of video games nowadays but one I’ve recently enjoyed is &lt;a href=&#34;http://en.wikipedia.org/wiki/SteamWorld_Dig&#34; rel=&#34;noopener&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;SteamWorld Dig&lt;/a&gt;, so I’ll use some screenshots to illustrate my point.&lt;/p&gt;
&lt;h3 id=&#34;basic-knowledge&#34;&gt;Basic knowledge&lt;/h3&gt;
&lt;p&gt;When we start in the game we can just go left or right, very easy and the most basic gamers know how to do that.&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source srcset=&#34;https://josem.co/images/steam_world_1.webp&#34; type=&#34;image/webp&#34;&gt;&lt;img src=&#34;https://josem.co//images/steam_world_1.png&#34; alt=&#34;Steam&#34; decoding=&#34;async&#34; class=&#34;lazyload&#34; data-sizes=&#34;auto&#34; loading=&#34;lazy&#34;
          width=&#34;720&#34;  /&gt;&lt;/picture&gt;&lt;/p&gt;

    
&lt;p&gt;This basic area of knowledge can be asumed and depends highly on the platform. If we are creating a web based application, for instance, we can assume that all the users will know how to submit a form or click on a button. Of course, the design will help them to know where they should focus.&lt;/p&gt;
&lt;h3 id=&#34;advanced-knowledge&#34;&gt;Advanced knowledge&lt;/h3&gt;
&lt;p&gt;As we play the game there are things that we need to learn, like digging or jumping using the walls, just like the users of an application use more and more the application there are things that can be done more efficiently.&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source srcset=&#34;https://josem.co/images/steam_world_2.webp&#34; type=&#34;image/webp&#34;&gt;&lt;img src=&#34;https://josem.co//images/steam_world_2.png&#34; alt=&#34;Steam&#34; decoding=&#34;async&#34; class=&#34;lazyload&#34; data-sizes=&#34;auto&#34; loading=&#34;lazy&#34;
          width=&#34;720&#34;  /&gt;&lt;/picture&gt;&lt;/p&gt;

    
&lt;p&gt;&lt;picture&gt;&lt;source srcset=&#34;https://josem.co/images/steam_world_3.webp&#34; type=&#34;image/webp&#34;&gt;&lt;img src=&#34;https://josem.co//images/steam_world_3.png&#34; alt=&#34;Steam&#34; decoding=&#34;async&#34; class=&#34;lazyload&#34; data-sizes=&#34;auto&#34; loading=&#34;lazy&#34;
          width=&#34;720&#34;  /&gt;&lt;/picture&gt;&lt;/p&gt;

    
&lt;p&gt;These tips, just like in a video game, should be gradually introduced to the user. For example, if the user creates an element and there is a shortcut for that, after four elements created we can show a small bubble suggesting it.&lt;/p&gt;
&lt;p&gt;Another example could be a list of elements where the user can perform batch actions, the first times will probably select one by one but we can provide a better way with the SHIFT key selecting many of them at the same time.&lt;/p&gt;
&lt;p&gt;This tips should be shown one at a time and only when it makes sense.&lt;/p&gt;
&lt;h2 id=&#34;alternative-methods&#34;&gt;Alternative methods&lt;/h2&gt;
&lt;p&gt;Apart for trying to teach our users better ways to use the application when they need it, there are alternative ways to improve their knowledge:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Cheatsheet with all the shortcuts (&lt;a href=&#34;http://www.makeuseof.com/downloads/gmail-cheat-sheet.pdf&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;example&lt;/a&gt;).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Site with tutorials and common questions (&lt;a href=&#34;https://basecamp.com/help&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;example&lt;/a&gt;).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Blog with new features and tips (&lt;a href=&#34;https://github.com/blog/1264-introducing-the-command-bar&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;example&lt;/a&gt;).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Tours in events and conferences.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Basically, any source where we can share valuable content for the user and they can consult is worth it.&lt;/p&gt;
&lt;h2 id=&#34;why&#34;&gt;Why&lt;/h2&gt;
&lt;p&gt;In my opinion, there are three basic reasons why providing better ways to perform actions in an application is a good idea.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Gives the users more efficient ways to achieve what they need (obviously).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;As the users improve their knowledge about an application a certain kind of emotion comes up because they have invested time and get a positive feedback by achieving things faster.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;It keeps the application &amp;ldquo;alive&amp;rdquo; and interesting because there will always be room for improvement and the user will be able to keep learning new things.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;credits&#34;&gt;Credits&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Illustration by &lt;a href=&#34;http://cargocollective.com/miriamm&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Miriam&lt;/a&gt;. All rights reserved.&lt;/li&gt;
&lt;/ul&gt;
</description>
      </item>
    
    <item>
      <title>Avoiding the Law of the Instrument</title><link>https://josem.co/avoiding-the-law-of-the-instrument/</link>
      <pubDate>Mon, 28 Jul 2014 00:00:00 +0000</pubDate>
      
      <guid>https://josem.co/avoiding-the-law-of-the-instrument/</guid><description type="html">&lt;p&gt;Many times in our careers as software developers we tend to use the same known tools to do a completely new different project with new constraints.&lt;/p&gt;
&lt;p&gt;Why do we tend to choose the same tools with small changes over and over again if we have the chance? Abraham Kaplan wrote in 1964 &lt;a href=&#34;https://josem.co/#rf1&#34; class=&#34;reference&#34;&gt;[1]&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I call it the law of the instrument, and it may be formulated as follows: Give a small boy a hammer, and he will find that everything he encounters needs pounding.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Two years later, in 1966, Maslow added &lt;a href=&#34;https://josem.co/#rf2&#34; class=&#34;reference&#34;&gt;[2]&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;If all you have is a hammer, everything looks like a nail.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;As humans we don&amp;rsquo;t change too much and principles like these, written more than 40 years ago, are still relevant to our industry.&lt;/p&gt;
&lt;p&gt;In my opinion this is related to the comfort zone state where you don&amp;rsquo;t change anything to avoid risk. The problem with using the same tools every time you can is that you don&amp;rsquo;t have enough arguments to make a choice because you have nothing to compare to and is limiting your knowledge.&lt;/p&gt;
&lt;p&gt;There are always other possibilities, but the important thing here is to keep looking for the best possible choice, even if we aren&amp;rsquo;t very familiar with it.&lt;/p&gt;
&lt;p&gt;Sometimes you can&amp;rsquo;t make the best possible choice and that&amp;rsquo;s fine, imagine you don&amp;rsquo;t know anything about C++ and you choose that language because you have read it has a better performance. You are probably going to spend a lot of time just learning the language and your manager won&amp;rsquo;t be very happy about it. Sometimes it all comes down to make a choice that makes sense in your case not just the language or library you always use.&lt;/p&gt;
&lt;p&gt;There are more examples of the law of the instrument, one of my favorite is &lt;a href=&#34;http://www.rubymotion.com/&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;RubyMotion&lt;/a&gt;, which claims this in its homepage:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;RubyMotion is a revolutionary toolchain that lets you quickly develop and test native iOS and OS X applications for iPhone, iPad and Mac, all using the awesome Ruby language you know and love.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Yes, you might know Ruby but using a wrapper to avoid a native language like Objective-C or Swift without very clear advantages apart from using Ruby itself doesn&amp;rsquo;t sound very convincing to me.&lt;/p&gt;
&lt;p&gt;Just to clarify this point, I think using the same language to wrap other native languages is not always a bad idea, the &lt;a href=&#34;http://xamarin.com/&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Xamarin project&lt;/a&gt; is a good solution because you can actually share the codebase in four different platforms (Android, iOS, Windows and Mac) and the language (C#) is more similar to the native ones.&lt;/p&gt;
&lt;p&gt;In conclusion, the next time we face a new problem in a new context we should try to explore new tools, because we&amp;rsquo;ll find better ones to solve the problem, we can learn a lot with new technologies, the system will be much better and we can actually defend the decisions because we would have compared some approaches.&lt;/p&gt;
&lt;h2 id=&#34;references&#34;&gt;References&lt;/h2&gt;
&lt;p&gt;&lt;span class=&#34;reference-note&#34; id=&#34;rf1&#34;&gt;[1] Abraham Kaplan (1964). &lt;a href=&#34;http://books.google.es/books?id=OYe6fsXSP3IC&amp;amp;pg=PA28&amp;amp;dq=%22law&amp;#43;of&amp;#43;the&amp;#43;instrument%22&amp;#43;inauthor:kaplan&amp;amp;redir_esc=y#v=onepage&amp;amp;q=%22law%20of%20the%20instrument%22%20inauthor%3Akaplan&amp;amp;f=false&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;The Conduct of Inquiry: Methodology for Behavioral Science&lt;/a&gt;. San Francisco: Chandler Publishing Co. p. 28.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=&#34;reference-note&#34; id=&#34;rf2&#34;&gt;[2] Abraham H. Maslow (1966). &lt;a href=&#34;http://books.google.es/books?id=3_40fK8PW6QC&amp;amp;lpg=PP1&amp;amp;pg=PT21#v=onepage&amp;amp;q&amp;amp;f=false&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;The Psychology of Science&lt;/a&gt;. p. 15.&lt;/span&gt;&lt;/p&gt;
</description>
      </item>
    
    <item>
      <title>Useful Utilities in Unix for Developers</title><link>https://josem.co/useful-utilities-in-unix-for-developers/</link>
      <pubDate>Fri, 13 Jun 2014 00:00:00 +0000</pubDate>
      
      <guid>https://josem.co/useful-utilities-in-unix-for-developers/</guid><description type="html">&lt;p&gt;After some years working as a software developer in different companies I have used many programs and utilities in *nix environments that I&amp;rsquo;d like to share.&lt;/p&gt;
&lt;p&gt;This is not an exhaustive tutorial about how to get the most of them, many options will be just ignored and I will list only how I use them on a daily basis.&lt;/p&gt;
&lt;h2 id=&#34;text-processing&#34;&gt;Text processing&lt;/h2&gt;
&lt;p&gt;I use these utilities to get info from a log or to quickly change a config file on a server.&lt;/p&gt;
&lt;h3 id=&#34;tail&#34;&gt;tail&lt;/h3&gt;
&lt;p&gt;It prints the last part of a file, it accepts some parameters like -f which will print the last part of a file and waits to print what it&amp;rsquo;s appended to the file (useful to see live logs).&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;$ tail -f logs/log.txt
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Or if you want just the last n lines you can do:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;$ tail -n &lt;span class=&#34;m&#34;&gt;200&lt;/span&gt; logs/log.txt
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Further reading: &lt;a href=&#34;http://man7.org/linux/man-pages/man1/tail.1.html&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Manual Page&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&#34;grep&#34;&gt;grep&lt;/h3&gt;
&lt;p&gt;The grep command searches a file, the standard input or multiple files for a pattern and prints the lines that match that pattern. As a pattern you can use a string or a regular expression, here are some examples.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;$ grep error logs/log.txt &lt;span class=&#34;c1&#34;&gt;# searchs error in log&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The same result using the standard input with a pipe:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;$ cat logs/log.txt &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; grep error &lt;span class=&#34;c1&#34;&gt;# searchs error in log&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If you want to search only for the whole word, not including parts of it in the results you can with -w:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;$ grep -w &lt;span class=&#34;s2&#34;&gt;&amp;#34;error&amp;#34;&lt;/span&gt; logs/log.txt
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In order to find a text in a tree of files you can use -r:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;$ grep -r &lt;span class=&#34;s2&#34;&gt;&amp;#34;error&amp;#34;&lt;/span&gt; logs
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If you want to show the number of lines that match that pattern:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;$ grep -c &lt;span class=&#34;s2&#34;&gt;&amp;#34;error&amp;#34;&lt;/span&gt; logs/log.txt
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Further reading: &lt;a href=&#34;http://www.gnu.org/software/grep/manual/grep.html&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Manual Page&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&#34;diff&#34;&gt;diff&lt;/h3&gt;
&lt;p&gt;Compares two files, I tend to use it without options.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;$ diff file1.txt file2.txt
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Further reading: &lt;a href=&#34;http://unixhelp.ed.ac.uk/CGI/man-cgi?diff&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Manual Page&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&#34;vi&#34;&gt;vi&lt;/h3&gt;
&lt;p&gt;Well I could say many things about this editor. In my computer I use Vim on a daily basis but in many servers this is not installed by default where vi is so I use the later for small edits in config files.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;$ vi nginx.conf
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;network&#34;&gt;Network&lt;/h2&gt;
&lt;h3 id=&#34;curl&#34;&gt;curl&lt;/h3&gt;
&lt;p&gt;Allows you to transfer data with many protocols (HTTP, FTP&amp;hellip;etc). I tend to use it to download something from the Internet.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;$ curl http://example.com/file.zip
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You can also use patterns like:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;$ curl http://example.com/&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;2000-2014&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;/part&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;a,b,c&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;.zip
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Further reading: &lt;a href=&#34;http://curl.haxx.se/docs/manpage.html&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Manual Page&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&#34;scp&#34;&gt;scp&lt;/h3&gt;
&lt;p&gt;It&amp;rsquo;s like the combination of SSH and cp (altough it actually stands for secure copy), basically you can copy files through the SSH protocol, a simple example:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;$ scp user@1.1.1.1:/files/1.txt .
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;It also works the other way around:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;$ scp 1.txt user@1.1.1.1:/files/
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Further reading: &lt;a href=&#34;http://linux.die.net/man/1/scp&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Manual Page&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&#34;rsync&#34;&gt;rsync&lt;/h3&gt;
&lt;p&gt;Rsync it&amp;rsquo;s a very complete tool but I tend to use like a simple &amp;ldquo;Dropbox&amp;rdquo; for certain directories.&lt;/p&gt;
&lt;p&gt;Totally worth it to read the whole man page: &lt;a href=&#34;http://ss64.com/bash/rsync.html&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;http://ss64.com/bash/rsync.html&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;management&#34;&gt;Management&lt;/h2&gt;
&lt;h3 id=&#34;htop&#34;&gt;htop&lt;/h3&gt;
&lt;p&gt;An interactive process viewer, it&amp;rsquo;s like an improved top. You just need to execute htop and it will start. It isn&amp;rsquo;t installed by default in many distributions but it&amp;rsquo;s a common package. If you can&amp;rsquo;t install it you can use top, which is very similar.&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source srcset=&#34;https://josem.co/images/htop.webp&#34; type=&#34;image/webp&#34;&gt;&lt;img src=&#34;https://josem.co//images/htop.png&#34; alt=&#34;Screenshot of htop&#34; decoding=&#34;async&#34; class=&#34;lazyload&#34; data-sizes=&#34;auto&#34; loading=&#34;lazy&#34;
          width=&#34;720&#34;  /&gt;&lt;/picture&gt;Screenshot of htop&lt;/p&gt;

    
&lt;p&gt;Further reading: &lt;a href=&#34;http://linux.die.net/man/1/htop&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Manual Page&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&#34;iostat&#34;&gt;iostat&lt;/h3&gt;
&lt;p&gt;Useful to monitor devices. It comes in handy when you don&amp;rsquo;t know what&amp;rsquo;s happening with a certain disk.&lt;/p&gt;
&lt;p&gt;&lt;picture&gt;&lt;source srcset=&#34;https://josem.co/images/iostat.webp&#34; type=&#34;image/webp&#34;&gt;&lt;img src=&#34;https://josem.co//images/iostat.png&#34; alt=&#34;Screenshot of iostat on a Mac&#34; decoding=&#34;async&#34; class=&#34;lazyload&#34; data-sizes=&#34;auto&#34; loading=&#34;lazy&#34;
          width=&#34;288&#34;  /&gt;&lt;/picture&gt;Screenshot of iostat on a Mac&lt;/p&gt;

    
&lt;p&gt;Further reading: &lt;a href=&#34;http://linux.die.net/man/1/iostat&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Manual Page&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;##Directories &amp;amp; Files&lt;/p&gt;
&lt;p&gt;A lot in Unix systems has to do with files in some OS like Plan9 you can even treat a network interface as a file. These utilities are very basic but I could not leave them out.&lt;/p&gt;
&lt;h3 id=&#34;mv--cd--cp--ls&#34;&gt;mv / cd / cp / ls&lt;/h3&gt;
&lt;p&gt;Very basic utilities to move files or directories, change current directory, copy files or directories and list the content of a certain directory respectively.&lt;/p&gt;
&lt;h3 id=&#34;pwd&#34;&gt;pwd&lt;/h3&gt;
&lt;p&gt;Response to the question: where am I?&lt;/p&gt;
&lt;h3 id=&#34;rm&#34;&gt;rm&lt;/h3&gt;
&lt;p&gt;Remove a file or tree of directories (with -r option).&lt;/p&gt;
&lt;h3 id=&#34;ln&#34;&gt;ln&lt;/h3&gt;
&lt;p&gt;Link between two files or directories.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;$ ln -f origin new_link
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Further reading: &lt;a href=&#34;https://www.mkssoftware.com/docs/man1/ln.1.asp&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Manual Page&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&#34;find&#34;&gt;find&lt;/h3&gt;
&lt;p&gt;I use it to find a file by name on a server:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;$ find / -name foo
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Further reading: &lt;a href=&#34;http://unixhelp.ed.ac.uk/CGI/man-cgi?find&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Manual Page&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;best-utility-man&#34;&gt;Best utility: man&lt;/h2&gt;
&lt;p&gt;I remember that in my first class of OSs the teacher taught us the man utility. With man you can find everything you need, &lt;a href=&#34;http://linux.die.net/man/1/man&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;here&lt;/a&gt; you can see how to use it.&lt;/p&gt;
</description>
      </item>
    
    <item>
      <title>&#34;Class Methods&#34; in Scala</title><link>https://josem.co/class-methods-in-scala/</link>
      <pubDate>Mon, 15 Jul 2013 00:00:00 +0000</pubDate>
      
      <guid>https://josem.co/class-methods-in-scala/</guid><description type="html">&lt;p&gt;In Scala you can&amp;rsquo;t declare class methods, all the methods defined in a class belong to the object.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-scala&#34; data-lang=&#34;scala&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;class&lt;/span&gt; &lt;span class=&#34;nc&#34;&gt;House&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;val&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;street&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;String&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;k&#34;&gt;def&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;clean&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;println&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Cleaning!&amp;#34;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;val&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;h&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;new&lt;/span&gt; &lt;span class=&#34;nc&#34;&gt;House&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;5th&amp;#34;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;h&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;clean&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;//&lt;/span&gt; &lt;span class=&#34;nc&#34;&gt;Cleaning&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;!&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;If we want a class method so we can do something like House.cleanAll we have to declare a &lt;strong&gt;companion object&lt;/strong&gt;, which is basically an object with the same name of a previously defined Class:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-scala&#34; data-lang=&#34;scala&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;object&lt;/span&gt; &lt;span class=&#34;nc&#34;&gt;House&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;k&#34;&gt;def&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;cleanAll&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;println&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Cleaning all!&amp;#34;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nc&#34;&gt;House&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;cleanAll&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;And now we have the methods of the objects defined in the class and the &amp;ldquo;class methods&amp;rdquo; defined in the companion object, kind of tricky but this is how it works in Scala.&lt;/p&gt;</description>
      </item>
    
    <item>
      <title>Switch in Scala (Pattern Matching)</title><link>https://josem.co/switch-in-scala-pattern-matching/</link>
      <pubDate>Wed, 10 Jul 2013 00:00:00 +0000</pubDate>
      
      <guid>https://josem.co/switch-in-scala-pattern-matching/</guid><description type="html">&lt;p&gt;Scala has a powerful pattern matching mechanism, that we can think of a kind of &amp;ldquo;switch&amp;rdquo; if we come from another programming language, but it&amp;rsquo;s much more powerful and I&amp;rsquo;d love to explore some of its options here. A simple switch in Scala would look like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;match&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;case&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;One&amp;#34;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;case&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Two&amp;#34;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;case&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;_&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Whatever&amp;#34;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In this case we have cases with 1 and 2, and if something else is matched then we return &amp;ldquo;Whatever&amp;rdquo;. But this is really simple, let&amp;rsquo;s make it more complex matching with types too.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;match&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;case&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;i&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Int&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Integer!&amp;#34;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;case&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;s&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;String&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;String: &amp;#34;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;+&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;s&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;case&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;_&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Whatever&amp;#34;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The above piece of code would look like this in Java:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;instanceOf&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Integer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;return&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Integer!&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;instanceOf&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;String&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;return&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;String: &amp;#34;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;+&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;s&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;return&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Whatever&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now if &lt;b&gt;a&lt;/b&gt; is a string we return &amp;ldquo;String&amp;rdquo;, if it&amp;rsquo;s an integer we return &amp;ldquo;Integer!&amp;rdquo; and if it&amp;rsquo;s something else we return &amp;ldquo;Whatever&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;We can also match against case classes. Imagine we have a case class with an integer and a string called Element.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;case&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kd&#34;&gt;class&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;Element&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;weight&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Int&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;name&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;String&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In that case we can make a more complete match:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;Element&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;85&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Fruit&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;match&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;case&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Element&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;_&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Fruit&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Fruit is coming&amp;#34;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;case&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Element&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;80&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;_&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;80 kg!&amp;#34;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;case&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Element&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;80&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Fruit&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;80 kg of Fruit&amp;#34;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;case&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;_&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Whatever&amp;#34;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Apart from all the options described here we can add a boolean before the &lt;i&gt;=&amp;gt;&lt;/i&gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;Element&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;85&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Fruit&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;match&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;case&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Element&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;weight&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Fruit&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;weight&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;50&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;More than 50kg of fruit&amp;#34;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;case&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Element&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;80&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;_&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;80 kg!&amp;#34;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;case&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;_&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Whatever&amp;#34;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The nice thing about pattern matching is that you can use exactly the same structures in closures or catch blocks.&lt;/p&gt;
</description>
      </item>
    
    <item>
      <title>SBT in Scala Compile when You Save a File</title><link>https://josem.co/sbt-in-scala-compile-when-you-save-a-file/</link>
      <pubDate>Mon, 08 Jul 2013 00:00:00 +0000</pubDate>
      
      <guid>https://josem.co/sbt-in-scala-compile-when-you-save-a-file/</guid><description type="html">&lt;p&gt;I&amp;rsquo;ve worked on some Scala projects recently using &lt;a href=&#34;http://www.scala-sbt.org/&#34;&gt;SBT (Scala Building Tool)&lt;/a&gt; and every time I had a change in a file I needed to go to SBT and type compile until I found a simple instruction to keep it compiling for me. Just execute SBT and run the following command:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;~ compile&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Now every time you save a file it will be compiled automatically. In the &lt;a href=&#34;http://www.scala-sbt.org/0.13.0/docs/Detailed-Topics/Triggered-Execution.html&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;official documentation&lt;/a&gt; you can see more details.&lt;/p&gt;
</description>
      </item>
    
    <item>
      <title>Set Content Type in RSpec</title><link>https://josem.co/set-content-type-in-rspec/</link>
      <pubDate>Tue, 11 Jun 2013 00:00:00 +0000</pubDate>
      
      <guid>https://josem.co/set-content-type-in-rspec/</guid><description type="html">&lt;p&gt;The last week I had a spec with a request where I needed to specify the content type and Google sensei didn&amp;rsquo;t help me.&lt;/p&gt;
&lt;p&gt;It took me an hour until I finally found it, so let me show here briefly how to do it just in case I have to find it again.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-ruby&#34; data-lang=&#34;ruby&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;it&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;sets the content type&amp;#39;&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;n&#34;&gt;post&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;http://example.com&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;kp&#34;&gt;nil&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;CONTENT_TYPE&amp;#39;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;application/json&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;n&#34;&gt;expect&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;request&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;content_type&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;to&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;eq&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;application/json&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;end&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The fact that the content type must be set with an underscore is counterintuitive since the &lt;a href=&#34;http://www.ietf.org/rfc/rfc2616.txt&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;RFC says otherwise&lt;/a&gt;.&lt;/p&gt;</description>
      </item>
    
    <item>
      <title>Bruno: Localizable.strings to strings.xml (iOS - Android)</title><link>https://josem.co/bruno-localizable.strings-to-strings.xml-ios-android/</link>
      <pubDate>Sun, 19 May 2013 00:00:00 +0000</pubDate>
      
      <guid>https://josem.co/bruno-localizable.strings-to-strings.xml-ios-android/</guid><description type="html">&lt;p&gt;I&amp;rsquo;ve created a small gem, Bruno, to convert a Localizable.strings (iOS) file to a strings XML file (Android) and vice-versa.&lt;/p&gt;
&lt;p&gt;To install it:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;$ gem install bruno&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;A Localizable.strings file in an iOS project looks like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;APP_NAME&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Test App&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;TITLE_ACTIVITY_MAIN&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Test&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;INFO_TITLE&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Information&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;INFO_SUBTITLE&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;More information&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;And with a single command:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;$ bruno convert --in Localizable.strings --out strings.xml&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;You will get this file:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cp&#34;&gt;&amp;lt;?xml version=&amp;#34;1.0&amp;#34; encoding=&amp;#34;UTF-8&amp;#34;?&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nt&#34;&gt;&amp;lt;resources&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nt&#34;&gt;&amp;lt;string&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;name=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;APP_NAME&amp;#34;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;gt;&lt;/span&gt;Test App&lt;span class=&#34;nt&#34;&gt;&amp;lt;/string&amp;gt;&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nt&#34;&gt;&amp;lt;string&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;name=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;TITLE_ACTIVITY_MAIN&amp;#34;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;gt;&lt;/span&gt;;Test&lt;span class=&#34;nt&#34;&gt;&amp;lt;/string&amp;gt;&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nt&#34;&gt;&amp;lt;string&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;name=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;INFO_TITLE&amp;#34;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;gt;&lt;/span&gt;;Information&lt;span class=&#34;nt&#34;&gt;&amp;lt;/string&amp;gt;&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nt&#34;&gt;&amp;lt;string&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;name=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;INFO_SUBTITLE&amp;#34;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;gt;&lt;/span&gt;;More information&lt;span class=&#34;nt&#34;&gt;&amp;lt;/string&amp;gt;&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nt&#34;&gt;&amp;lt;/resources&amp;gt;&lt;/span&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;You can use a strings XML file from Android to convert it to iOS too:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;$ bruno convert --in strings.xml --out Localizable.strings&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;You can find the Git repository here: &lt;a href=&#34;https://github.com/josem/bruno&#34; rel=&#34;noopener&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;https://github.com/josem/bruno&lt;/a&gt; with further instructions.&lt;/p&gt;</description>
      </item>
    
    <item>
      <title>Dynamic Conditions for Associations in Rails 3</title><link>https://josem.co/dynamic-conditions-for-associations-in-rails-3/</link>
      <pubDate>Wed, 06 Feb 2013 00:00:00 +0000</pubDate>
      
      <guid>https://josem.co/dynamic-conditions-for-associations-in-rails-3/</guid><description type="html">&lt;p&gt;If you are using dynamic conditions in Rails 3, like Time.now or 1.week.ago you should use a Proc for that condition.&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s an example:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-ruby&#34; data-lang=&#34;ruby&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;has_many&lt;/span&gt; &lt;span class=&#34;ss&#34;&gt;:rented_cars&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;...&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;         &lt;span class=&#34;ss&#34;&gt;:conditions&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;proc&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&amp;#39;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;#{&lt;/span&gt;&lt;span class=&#34;no&#34;&gt;Date&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;today&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;to_s&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;ss&#34;&gt;:db&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#39; &amp;lt;= end_rent_date&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This way, Date.today will be called every time you perform a query.&lt;/p&gt;
&lt;p&gt;If you would have done it like in the following example, there will be cases when the results you&amp;rsquo;ll get are not expected since the condition will have the day you started the Rails application and Date.today won&amp;rsquo;t be called again.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-ruby&#34; data-lang=&#34;ruby&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;has_many&lt;/span&gt; &lt;span class=&#34;ss&#34;&gt;:rented_cars&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;...&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;         &lt;span class=&#34;ss&#34;&gt;:conditions&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&amp;#39;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;#{&lt;/span&gt;&lt;span class=&#34;no&#34;&gt;Date&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;today&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;to_s&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;ss&#34;&gt;:db&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#39; &amp;lt;= end_rent_date&amp;#34;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;(&lt;a href=&#34;http://www.ruby-doc.org/core-1.9.3/Proc.html&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Link to Proc docs in Ruby&lt;/a&gt;).&lt;/p&gt;</description>
      </item>
    
    <item>
      <title>Rescue from MultiJson::DecodeError in Ruby on Rails</title><link>https://josem.co/rescue-from-multijsondecodeerror-in-ruby-on-rails/</link>
      <pubDate>Thu, 17 Jan 2013 00:00:00 +0000</pubDate>
      
      <guid>https://josem.co/rescue-from-multijsondecodeerror-in-ruby-on-rails/</guid><description type="html">&lt;p&gt;If you are developing an API with Rails you need to rescue from the errors produced by a bad formatted JSON. In order to do that I use a middleware file placed in app/middleware named ParamsParserRescue.rb.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-ruby&#34; data-lang=&#34;ruby&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;class&lt;/span&gt; &lt;span class=&#34;nc&#34;&gt;ParamsParserRescue&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;ActionDispatch&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;::&lt;/span&gt;&lt;span class=&#34;no&#34;&gt;ParamsParser&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;k&#34;&gt;def&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;call&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;env&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;begin&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;k&#34;&gt;super&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;env&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;rescue&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;MultiJson&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;::&lt;/span&gt;&lt;span class=&#34;no&#34;&gt;DecodeError&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;400&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{},&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;Bad Request&amp;#34;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;]]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;end&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;k&#34;&gt;end&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;end&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;And with this middleware file you need to tell Rails that should use it. In the configuration file &lt;strong&gt;application.rb&lt;/strong&gt; add:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-ruby&#34; data-lang=&#34;ruby&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;config&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;middleware&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;swap&lt;/span&gt; &lt;span class=&#34;no&#34;&gt;ActionDispatch&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;::&lt;/span&gt;&lt;span class=&#34;no&#34;&gt;ParamsParser&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;ParamsParserRescue&amp;#34;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Basically, we are doing whatever the call method does in ActionDispatch::ParamsParser and if the MultiJson::DecodeError exception is raised then we return a 400 HTTP Code instead of crashing.&lt;/p&gt;</description>
      </item>
    
    <item>
      <title>Programming Challenges</title><link>https://josem.co/programming-challenges/</link>
      <pubDate>Tue, 08 Jan 2013 00:00:00 +0000</pubDate>
      
      <guid>https://josem.co/programming-challenges/</guid><description type="html">&lt;p&gt;I&amp;rsquo;d like to share some sites with programming challenges, also known as programming puzzles. I find them very useful to learn a new language, much more than reading a lot of books. Actually, I usually read one book for beginners of the language and after that I go to one of the following sites and start to code. My favourite is /r/dailyprogrammer.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;http://www.reddit.com/r/dailyprogrammer/&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;/r/DailyProgrammer&lt;/a&gt;. Subreddit with three challenges every week or so (easy, intermediate and hard).&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;http://projecteuler.net/&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Project Euler&lt;/a&gt;. Math problems, created to be solved with a program.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;http://codeforces.com/problemset&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Code Forces&lt;/a&gt;. More problems!&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;http://codegolf.stackexchange.com/&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Code Golf&lt;/a&gt;. Part of the Stack Exchange platform. Very focus on the number of lines, but that makes it more fun.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;http://codingbat.com/&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Coding Bat&lt;/a&gt;. Most of the problems here are easy, and some of them include the solutions.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;http://www.reddit.com/r/programmingchallenges&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;/r/ProgrammingChallenges&lt;/a&gt;. Another subreddit, less organized.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;http://www.billthelizard.com/2009/06/programming-and-logic-puzzles.html&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Extra: a post with more links to challenges&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Enjoy!&lt;/p&gt;
</description>
      </item>
    
    <item>
      <title>Creating a Great RESTful API</title><link>https://josem.co/creating-a-great-restful-api/</link>
      <pubDate>Wed, 26 Dec 2012 00:00:00 +0000</pubDate>
      
      <guid>https://josem.co/creating-a-great-restful-api/</guid><description type="html">&lt;p&gt;REST is a style of software architecture, often used in web. The design of Rails, for instance, is based a lot on REST. The idea behind this architecture is to have very similar interfaces to access all the resources in your system.&lt;/p&gt;
&lt;p&gt;Recently I had to create 2 APIs in 3 months so I had to learn all I could in a very short time. I&amp;rsquo;d like to share some conclusions but giving the fact that to develop an API people usually say you need 10 years of experience take them with caution.&lt;/p&gt;
&lt;h2 id=&#34;use-versions&#34;&gt;Use versions&lt;/h2&gt;
&lt;p&gt;People will trust your API so if you change something in the architecture of your application the 3rd party clients shouldn&amp;rsquo;t be affected by that.&lt;/p&gt;
&lt;p&gt;The common approach here is to add a parameter to your URL, something like:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;http://myapp.com/api/v1/&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Or:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;http://myapp.com/api/1/&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;I personally prefer the first method since is more clear, Google uses that too.&lt;/p&gt;
&lt;h2 id=&#34;use-proper-http-methods&#34;&gt;Use proper HTTP methods&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;GET: To get a resource or resources of one type.&lt;/li&gt;
&lt;li&gt;POST: To create a new resource if you don&amp;rsquo;t know where it&amp;rsquo;s going to be.&lt;/li&gt;
&lt;li&gt;PUT: To update a resource&lt;/li&gt;
&lt;li&gt;DELETE: To remove a resource.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;consistent-structure-of-urls&#34;&gt;Consistent structure of URLs&lt;/h2&gt;
&lt;p&gt;If you don&amp;rsquo;t have a very simple system, probably you&amp;rsquo;ll end up with a lot of URLs so it&amp;rsquo;s important to respect a pattern, I used this one:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;GET &lt;a href=&#34;http://example.com/api/cars&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;http://example.com/api/cars&lt;/a&gt;. To get a list of the resources of one type (cars, for example).&lt;/li&gt;
&lt;li&gt;GET &lt;a href=&#34;http://example.com/api/cars/1&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;http://example.com/api/cars/1&lt;/a&gt;. To get a resource with the id 2.&lt;/li&gt;
&lt;li&gt;POST &lt;a href=&#34;http://example.com/api/cars&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;http://example.com/api/cars&lt;/a&gt;. To create a new resource.&lt;/li&gt;
&lt;li&gt;PUT &lt;a href=&#34;http://example.com/api/cars/1&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;http://example.com/api/cars/1&lt;/a&gt;. To update the resource with id 1.&lt;/li&gt;
&lt;li&gt;DELETE &lt;a href=&#34;http://example.com/api/cars/1&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;http://example.com/api/cars/1&lt;/a&gt;. To remove the resource with id 1.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;security&#34;&gt;Security&lt;/h2&gt;
&lt;p&gt;I haven&amp;rsquo;t used the best avaliable method: OAuth. In my case with a token parameter and SSL was enough, but in your case it might not be.&lt;/p&gt;
&lt;h2 id=&#34;show-examples&#34;&gt;Show examples&lt;/h2&gt;
&lt;p&gt;There will be a lot of users with a lot of different systems so it would be great if you can provide copy&amp;amp;paste examples. Probably curl will be enough for everyone.&lt;/p&gt;
&lt;h2 id=&#34;follow-the-leaders&#34;&gt;Follow the leaders&lt;/h2&gt;
&lt;p&gt;Also known as Twitter, Google and Facebook engineers are probably smarter than you. To create my APIs I have &lt;del&gt;copied&lt;/del&gt; studied the following APIs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://developers.google.com/&amp;#43;/api/&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Google Plus API&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://dev.twitter.com/docs/api&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;The Twitter REST API&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://developers.facebook.com/docs/reference/rest/&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Facebook REST API (deprecated but still good for this purpose)&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://parse.com/docs/rest&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Parse REST API&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;some-references-i-used-to-learn&#34;&gt;Some References I used to learn&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;http://marakana.com/s/post/1221/designing_a_beautiful_rest_json_api_video&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Designing a beautiful REST JSON API&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://restful-api-design.readthedocs.org/en/latest/&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Thoughts on RESTful API Design&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;http://blog.apigee.com/detail/slides_for_restful_api_design_second_edition_webinar/&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;RESTful API Design: Second Edition&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;</description>
      </item>
    
    <item>
      <title>Subversion and Files With @</title><link>https://josem.co/subversion-and-files-with-@/</link>
      <pubDate>Fri, 07 Dec 2012 07:30:40 +0100</pubDate>
      
      <guid>https://josem.co/subversion-and-files-with-@/</guid><description type="html">&lt;p&gt;If you have worked with Subversion and iOS you are probably aware of this problem. Whenever you are going to do something with a file that has an at sign in its name you can&amp;rsquo;t. For instance imagine you&amp;rsquo;ve just added a file for retina and try to add it to the repository (XCode can do this too):&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;$ svn add logo@2x.png&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The message from Subversion will be:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Skipped logo@2x.png&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;That&amp;rsquo;s because Subversion uses the @ for other purposes.&lt;/p&gt;
&lt;p&gt;From &lt;a href=&#34;http://svnbook.red-bean.com/nightly/en/svn.advanced.pegrevs.html&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;the Subversion book&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;hellip;how does svn know whether news@11 is the name of a directory in my tree or just a syntax for “revision 11 of news”? Thankfully, while svn will always assume the latter, there is a trivial workaround&amp;hellip;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The workaround is as simple as adding an at sign to the end of the path:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;$ svn add logo@2x.png@&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
</description>
      </item>
    
    <item>
      <title>Learning Vim - Introduction</title><link>https://josem.co/learning-vim-introduction/</link>
      <pubDate>Tue, 20 Nov 2012 00:00:00 +0000</pubDate>
      
      <guid>https://josem.co/learning-vim-introduction/</guid><description type="html">&lt;p&gt;I&amp;rsquo;ve started the great journal of learning Vim. I&amp;rsquo;ve heard a lot of good things about this editor and I&amp;rsquo;d like to learn how to use it effectively and share here all the things I&amp;rsquo;ll learn and my thoughts about every step of the way.&lt;/p&gt;
&lt;p&gt;As a novice I&amp;rsquo;ll make a lot of mistakes but I&amp;rsquo;ll try to search all the commands and tips to make sure they will be accurate enough to be shared.&lt;/p&gt;
&lt;h2 id=&#34;learning-curve&#34;&gt;Learning Curve&lt;/h2&gt;
&lt;p&gt;It&amp;rsquo;s probable you&amp;rsquo;ve heard that Vim is hard, that, in order to generate a random string you just need to put a student in front of this editor and tell him to close it. Here you can see a slide with the learning curve of different editors:&lt;/p&gt;
&lt;p&gt;&lt;p&gt;&lt;picture&gt;&lt;source srcset=&#34;https://josem.co/images/editor-learning-curve.webp&#34; type=&#34;image/webp&#34;&gt;&lt;img src=&#34;https://josem.co//images/editor-learning-curve.png&#34; alt=&#34;Learning curves of different editors&#34; decoding=&#34;async&#34; class=&#34;lazyload&#34; data-sizes=&#34;auto&#34; loading=&#34;lazy&#34;
          width=&#34;600&#34;  /&gt;&lt;/picture&gt;&lt;/p&gt;

    

&lt;em&gt;Learning curves of different editors&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Yes, Vim is scary right? But the truth is you can use Vim almost as any other editor until you learn the most basic commands and concepts that will make a good vim user. If you&amp;rsquo;ve using Vim for 20 years and you see me using vim the first weeks doing things like grabbing the mouse or using the arrow keys you could be surprised but the truth is &lt;b&gt;you don&amp;rsquo;t need to use the most efficient way to do things all the time&lt;/b&gt;.&lt;/p&gt;
&lt;h2 id=&#34;resources&#34;&gt;Resources&lt;/h2&gt;
&lt;p&gt;One of the main reasons so many people use Vim is its great community, which means a lot of good resources to learn too. In my case I&amp;rsquo;ll be following the &lt;a href=&#34;http://derekwyatt.org/vim/tutorials/&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;great videos of Derek Wyatt&lt;/a&gt; and of course my dear friend Google.&lt;/p&gt;
&lt;p&gt;I am looking forward to sharing all the things I&amp;rsquo;ll learn, stay tuned!&lt;/p&gt;
</description>
      </item>
    
    <item>
      <title>Naming of Predicate Methods</title><link>https://josem.co/naming-of-predicate-methods/</link>
      <pubDate>Wed, 07 Nov 2012 00:00:00 +0000</pubDate>
      
      <guid>https://josem.co/naming-of-predicate-methods/</guid><description type="html">&lt;p&gt;A predicate method is tipically one that should return a boolean value (true or false). These methods are useful in a lot of scenarios, like when you have an class with a boolean attribute.&lt;/p&gt;
&lt;p&gt;Naming these kind of methods depends on the language you are using, but here are my top priorities.&lt;/p&gt;
&lt;h3 id=&#34;question-mark&#34;&gt;Question mark&lt;/h3&gt;
&lt;p&gt;If you are using Ruby you can name it with a question mark at the end, which makes the code really readable. Something like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-ruby&#34; data-lang=&#34;ruby&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;def&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;is_alive?&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;vi&#34;&gt;@alive&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;end&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3 id=&#34;question-style&#34;&gt;Question style&lt;/h3&gt;
&lt;p&gt;In some languages you can&amp;rsquo;t use a question mark in the name of a method, so I usually name it like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;public&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Boolean&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;isAlive&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;return&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;alive&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3 id=&#34;simple-getter&#34;&gt;Simple Getter&lt;/h3&gt;
&lt;p&gt;The worst name here, in my opinion, is having a get, like any other getter. It&amp;rsquo;s much better to have something like:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-ruby&#34; data-lang=&#34;ruby&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;zombie&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;isAlive?&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Rather than:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-ruby&#34; data-lang=&#34;ruby&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;zombie&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;getAlive&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3 id=&#34;conclusion&#34;&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;Naming is so debatable that it would be silly to think more about this problem. I think with experience you can see the pros and cons of every option, I could even change my mind in some months about this :)&lt;/p&gt;</description>
      </item>
    
    <item>
      <title>Too Short Routines?</title><link>https://josem.co/too-short-routines/</link>
      <pubDate>Wed, 03 Oct 2012 00:00:00 +0000</pubDate>
      
      <guid>https://josem.co/too-short-routines/</guid><description type="html">&lt;p&gt;I think as developers we tend to create complexity if we don&amp;rsquo;t think carefully about every line of code we are typing. Systems tend to be complex and managing that complexity is one of the main task we have.&lt;/p&gt;
&lt;p&gt;Routines are great, they are one of the best ways to encapsulate algorithms and make your code more readable. Sometimes we think routines are too short, but actually the usually are too long. Reading &lt;a href=&#34;http://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Clean Code&lt;/a&gt; I realized Uncle Bob creates very short routines and all of them have a meaningful name.&lt;/p&gt;
&lt;h2 id=&#34;correlation-between-length-of-a-routine-and-its-name&#34;&gt;Correlation between length of a routine and its name&lt;/h2&gt;
&lt;p&gt;Usually the longer a routine is the harder is to name it. When you do something like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-c&#34; data-lang=&#34;c&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;var&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;i&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;i&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;array&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;length&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;i&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;++&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nf&#34;&gt;show&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;i&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;It&amp;rsquo;s very easy to come up with a name like &lt;em&gt;showAllElements(array)&lt;/em&gt;. But if you are processing a lot of input parameters (like in a web service) and cleaning the input a good name will be harder to find.&lt;/p&gt;
&lt;p&gt;Apart from that with small routines you&amp;rsquo;ll find your bugs easier and the reuse of that little algorithm is more likable since it&amp;rsquo;s already encapsulated and ready to be used again.&lt;/p&gt;
&lt;p&gt;In the book &lt;a href=&#34;http://www.amazon.com/Code-Complete-Practical-Handbook-Construction/dp/0735619670&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;Code Complete&lt;/a&gt; a lot of studies are shown without a clear conclusion but when the author is listing all the valid reasons to create a routine you get the idea that most small routines can achieve that. These are some of them:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Reduce complexity&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Make a section of code readable&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Improve portability&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Simplify complicated boolean tests&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;exceptions&#34;&gt;Exceptions&lt;/h2&gt;
&lt;p&gt;Steve Mcconnell says in Code Complete that &lt;em&gt;to ensure all routines are small&lt;/em&gt; is not a valid reason to create a routine:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;In fact, some jobs are performed better in a single large routine.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id=&#34;conclusion&#34;&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;In my experience, most of the time you can improve the readability of your code by creating smaller routines. To finish let me show you the following piece of code used by Steve to illustrate how using short routines can improve readability:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;node&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;lt;&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;NULL&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;then&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;while&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;node&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;next&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;lt;&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;NULL&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;do&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;node&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;node&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;next&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;leafName&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;node&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;name&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;end&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;while&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;else&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;leafName&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;end&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;He points out that this code should be encapsulated in a routine like &lt;em&gt;GetLeafName(node)&lt;/em&gt;.&lt;/p&gt;
</description>
      </item>
    
    <item>
      <title>An Important Lesson from Objective-C</title><link>https://josem.co/an-important-lesson-from-objective-c/</link>
      <pubDate>Fri, 21 Sep 2012 00:00:00 +0000</pubDate>
      
      <guid>https://josem.co/an-important-lesson-from-objective-c/</guid><description type="html">&lt;p&gt;I&amp;rsquo;ve started to develop applications for iOS about 3 months ago and there were a lot of things new for me in that environment (there are a lot yet) and Objective-C wasn&amp;rsquo;t an exception.&lt;/p&gt;
&lt;p&gt;The syntax of this programming language is scary the first time you see it but with time you get used to it and you can get a lot of good practices too.&lt;/p&gt;
&lt;p&gt;One of the most important things I&amp;rsquo;ve learnt is that the more self-explanatory a method is, the better. It doesn&amp;rsquo;t matter how long it is. Actually this is something you can apply to other languages. Let me show you a quick example:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-objc&#34; data-lang=&#34;objc&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;function&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;cleanAllInputValuesAfterValidation&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;values&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;){}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;function&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;sortDirectoriesAlphabetically&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;directories&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;){}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;In fact, in Objective-C you can pass parameters in the middle of the method&amp;rsquo;s name, which teaches you a couple of things about naming. You can see DHH&amp;rsquo;s thoughts (the creator of the framework Ruby on Rails) about this &lt;a href=&#34;http://37signals.com/svn/posts/3250-clarity-over-brevity-in-variable-and-method-names&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;</description>
      </item>
    
    <item>
      <title>Subversion: Remove All the Deleted Files from a Repository</title><link>https://josem.co/subversion-remove-all-the-deleted-files-from-a-repository/</link>
      <pubDate>Tue, 04 Sep 2012 00:00:00 +0000</pubDate>
      
      <guid>https://josem.co/subversion-remove-all-the-deleted-files-from-a-repository/</guid><description type="html">&lt;p&gt;In order to remove all the files from the repository after they have been deleted from disk you have a couple of options.&lt;/p&gt;
&lt;p&gt;Using Sed:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;svn st &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; grep &lt;span class=&#34;s1&#34;&gt;&amp;#39;^!&amp;#39;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; sed &lt;span class=&#34;s1&#34;&gt;&amp;#39;s/! *//&amp;#39;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; xargs -I% svn rm %&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Or with AWK:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;svn st &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; grep &lt;span class=&#34;s1&#34;&gt;&amp;#39;^!&amp;#39;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; awk &lt;span class=&#34;s1&#34;&gt;&amp;#39;{print $2}&amp;#39;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; xargs -I% svn rm %&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;If you don&amp;rsquo;t trust these commands (you shouldn&amp;rsquo;t but nowadays we don&amp;rsquo;t have enough time right?) you can see the list of files that will be removed from the repository without the xargs part:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;svn st &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; grep &lt;span class=&#34;s1&#34;&gt;&amp;#39;^!&amp;#39;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; sed &lt;span class=&#34;s1&#34;&gt;&amp;#39;s/! *//&amp;#39;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Or:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;svn st &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; grep &lt;span class=&#34;s1&#34;&gt;&amp;#39;^!&amp;#39;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; awk &lt;span class=&#34;s1&#34;&gt;&amp;#39;{print $2}&amp;#39;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;I think AWK is more elegant in this case since it seems more obvious to me to print the second column than removing the &amp;ldquo;!&amp;rdquo; part, but that&amp;rsquo;s just my opinion.&lt;/p&gt;</description>
      </item>
    
    <item>
      <title>Return at the Beginning of Functions</title><link>https://josem.co/return-at-the-beginning-of-functions/</link>
      <pubDate>Fri, 24 Aug 2012 00:00:00 +0000</pubDate>
      
      <guid>https://josem.co/return-at-the-beginning-of-functions/</guid><description type="html">&lt;p&gt;I had a little doubt about when to do the return if you have a big if, something like the following function:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-ruby&#34; data-lang=&#34;ruby&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;function&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;animateElements&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;o&#34;&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pool&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;allAnimationsCompleted&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;doAnimation1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;();&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;doAnimation2&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;();&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;doOtherOperations&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;();&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;In that case all the function is inside of an if, so the following implementation would do the same:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-ruby&#34; data-lang=&#34;ruby&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;function&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;animateElements&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;o&#34;&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;!&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;pool&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;allAnimationsCompleted&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;n&#34;&gt;doAnimation1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;();&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;n&#34;&gt;doAnimation2&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;();&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;n&#34;&gt;doOtherOperations&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;();&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;I was totally sure that this was better, because the function is cleaner but recently, after doing some memory management on my own and forgetting some releases I&amp;rsquo;m not that sure. Let me expose the pros and cons and and a more complex example:&lt;/p&gt;
&lt;h2 id=&#34;pros&#34;&gt;Pros&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Less indentation&lt;/li&gt;
&lt;li&gt;Cleaner code&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;cons&#34;&gt;Cons&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;You are breaking the normal flow of a function, which is returning something after doing all the operations, this is critically important if you have to release some resources and the function returns before the execution of those lines. This could happen in a slightly different case:&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-ruby&#34; data-lang=&#34;ruby&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;function&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;createElements&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;n&#34;&gt;var&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;elem1&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;createElement&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;();&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;n&#34;&gt;var&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;square&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;createSquare&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;();&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;square&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;==&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;n&#34;&gt;elem1&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;doSomething&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;();&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;n&#34;&gt;removeElement&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;elem1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;In my opinion, it&amp;rsquo;s not as readable as the normal flow, with an if, even if this if is huge.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;conclusion&#34;&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;I&amp;rsquo;m not sure if in the first case is better to put that return, but after the leaks I had (I was working with Objective-C) if the function is more complex and the return is in the middle, in my opinion it&amp;rsquo;s better to have something like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-ruby&#34; data-lang=&#34;ruby&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;function&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;createElements&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;n&#34;&gt;var&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;elem1&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;createElement&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;();&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;n&#34;&gt;var&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;square&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;createSquare&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;();&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;square&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;!=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;elem1&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;doSomething&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;();&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;n&#34;&gt;removeElement&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;elem1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;For the rest of cases, an early exit at the top if some precondition is not met seems good enough to me.&lt;/p&gt;</description>
      </item>
    
    <item>
      <title>Origin of HTML Radio Buttons</title><link>https://josem.co/origin-of-html-radio-buttons/</link>
      <pubDate>Tue, 03 Jul 2012 00:00:00 +0000</pubDate>
      
      <guid>https://josem.co/origin-of-html-radio-buttons/</guid><description type="html">&lt;p&gt;The radio buttons in HTML come in handy when the user should select only one option in a form.&lt;/p&gt;
&lt;p&gt;The HTML looks like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;input&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;type&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;radio&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;id&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;mac&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;name&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;computer&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;value&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;mac&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;label&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;for&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;mac&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Mac&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;label&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;input&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;type&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;radio&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;name&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;computer&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;value&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;pc&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;id&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;pc&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;label&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;for&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;pc&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;PC&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;label&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;input&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;type&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;radio&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;name&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;computer&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;value&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;hackintosh&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;id&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;hackintosh&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;label&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;for&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;hackintosh&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Hackintosh&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;label&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This element was called radio buttons because of the behaviour of the old car radios, where you could keep pushed only one button at the same time.&lt;/p&gt;

&lt;img src=&#34;https://josem.co//images/radio.jpg&#34; alt=&#34;&#34; title=&#34;Car Radio&#34; width=&#34;640&#34; height=&#34;480&#34; class=&#34;aligncenter size-full wp-image-190&#34; /&gt;</description>
      </item>
    
    <item>
      <title>IPad Acceleration with Javascript</title><link>https://josem.co/ipad-acceleration-with-javascript/</link>
      <pubDate>Sat, 09 Jun 2012 00:00:00 +0000</pubDate>
      
      <guid>https://josem.co/ipad-acceleration-with-javascript/</guid><description type="html">&lt;p&gt;It&amp;rsquo;s well known that Apple supports HTML5 from the very beginning, that comes with a lot of advantages for Javascript developers. One of them is knowing the exact position of the iPad using a couple of events.&lt;/p&gt;
&lt;p&gt;First of all I have to say I&amp;rsquo;ve only tested this with an Ipad 2 with iOS 5, but it should work too with the new iPad (a.k.a. iPad 3).&lt;/p&gt;
&lt;p&gt;In order to know what&amp;rsquo;s the position of an iPad we can use the Device Motion Event, specified by the W3C &lt;a href=&#34;http://dev.w3.org/geo/api/spec-source-orientation.html#devicemotion&#34; rel=&#34;noopener nofollow&#34; target=&#34;_blank&#34; class=&#34;external&#34;&gt;here&lt;/a&gt;. For my purpose I only use 3 variables:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-ruby&#34; data-lang=&#34;ruby&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;window&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;addEventListener&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;devicemotion&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;function&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;e&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;n&#34;&gt;x&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;e&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;accelerationIncludingGravity&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;x&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;n&#34;&gt;y&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;e&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;accelerationIncludingGravity&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;y&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;n&#34;&gt;z&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;e&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;accelerationIncludingGravity&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;z&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;},&lt;/span&gt; &lt;span class=&#34;kp&#34;&gt;false&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Once we have these variables it&amp;rsquo;s all about testing and playing with ranges of values. What I did was creating some messages after I detect a certain position, for instance, when the iPad is in landscape or portrait position using a function executed every 10ms.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-js&#34; data-lang=&#34;js&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;mainLoop&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;setInterval&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;moveMe()&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;10&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;function&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;moveMe&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;c1&#34;&gt;// here you check what&amp;#39;s the value of a, y, and z
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;c1&#34;&gt;// and it&amp;#39;s checked every 10 ms
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;I know, it would be great to have a little plugin to detect the different positions and trigger events accordingly, but I don&amp;rsquo;t own an iPad yet so I can only test with borrowed iPads :(&lt;/p&gt;</description>
      </item>
    
    <item>
      <title>Starting to Learn Python (for Programmers)</title><link>https://josem.co/starting-to-learn-python-for-programmers/</link>
      <pubDate>Tue, 22 May 2012 00:00:00 +0000</pubDate>
      
      <guid>https://josem.co/starting-to-learn-python-for-programmers/</guid><description type="html">&lt;p&gt;Some months ago I started to learn Python, I found a lot of resources and not all of them were really useful, they were either for non-programmers or too long for an introduction. After some research I came up with a list of resources.&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;&lt;a title=&#34;Google&#39;s Python Class&#34; href=&#34;http://code.google.com/edu/languages/google-python-class/set-up.html&#34; target=&#34;_blank&#34;&gt;Google&#39;s Python Class&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a title=&#34;Python Design Patterns&#34; href=&#34;http://code.google.com/intl/es-ES/edu/languages/index.html#_python_patterns&#34; target=&#34;_blank&#34;&gt;Python Design Patterns&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&#34;http://me.veekun.com/blog/2012/05/05/python-faq-webdev/&#34; target=&#34;_blank&#34;&gt;Python FAQ: Webdev&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;&lt;/div&gt;

&lt;p&gt;Apart from the links and all the hours reading and studying I find really important to create little projects that I can finish and publish.&lt;/p&gt;
&lt;p&gt;I think these projects have two advantages, on one side you can see that Python (or any language you are learning) can be actually used for something that you were trying to resolve. On the other, you are able to build it all by yourself (and that will encourage you to keep learning).&lt;/p&gt;</description>
      </item>
    
  </channel>
</rss>
