<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Oscar Lopez</title>
    <description>The latest articles on Forem by Oscar Lopez (@oscareduardolp6).</description>
    <link>https://forem.com/oscareduardolp6</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F951857%2F836ef707-1942-4c00-8eb2-83d670b2d9f4.jpeg</url>
      <title>Forem: Oscar Lopez</title>
      <link>https://forem.com/oscareduardolp6</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/oscareduardolp6"/>
    <language>en</language>
    <item>
      <title>🍽️ Obsidian: Restaurantes</title>
      <dc:creator>Oscar Lopez</dc:creator>
      <pubDate>Mon, 24 Feb 2025 19:00:00 +0000</pubDate>
      <link>https://forem.com/oscareduardolp6/obsidian-restaurantes-28nm</link>
      <guid>https://forem.com/oscareduardolp6/obsidian-restaurantes-28nm</guid>
      <description>&lt;p&gt;Yo soy una persona con muy &lt;em&gt;mala memoria&lt;/em&gt;, es por eso que estoy tan obsesionado con tener &lt;em&gt;sistemas&lt;/em&gt; que me faciliten el &lt;em&gt;buscar&lt;/em&gt; información, porque muchas veces, si no estructuro muy bien esta, no &lt;em&gt;recuerdo&lt;/em&gt; cómo la guardé y de igual forma la termino &lt;em&gt;perdiendo&lt;/em&gt;. Esto mismo es gran parte del porqué me gusta tanto &lt;strong&gt;Obsidian&lt;/strong&gt; como herramienta, me permite &lt;em&gt;estructurar&lt;/em&gt; las cosas de forma muy &lt;em&gt;similar&lt;/em&gt; a cómo lo hago mentalmente, es decir, en &lt;em&gt;relaciones&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Por esta misma falta de memoria, he tenido situaciones en las que, por ejemplo, yo soy una persona que no tolera mucho el &lt;em&gt;picante&lt;/em&gt;, entonces me ha tocado que voy a un &lt;em&gt;restaurante&lt;/em&gt;, quiero pedir &lt;em&gt;chilaquiles&lt;/em&gt;, pero no recuerdo si la vez pasada pedí los &lt;em&gt;verdes&lt;/em&gt; y estos eran muy picantes, o si estaban bien, o si estaban mejor los &lt;em&gt;rojos&lt;/em&gt;, etc. Para &lt;em&gt;solucionar&lt;/em&gt; esto, como en muchas de las otras &lt;em&gt;áreas&lt;/em&gt; de mi vida, tengo un sistema que me ayuda a &lt;em&gt;organizar&lt;/em&gt; esta información de forma que pueda &lt;em&gt;visitarla&lt;/em&gt; con facilidad la siguiente vez que vaya al restaurante, ver si algo me gustó, los &lt;em&gt;detalles&lt;/em&gt; que tenía, cuánto me gustó, etc.&lt;/p&gt;

&lt;h2&gt;
  
  
  🧩 Partes
&lt;/h2&gt;

&lt;p&gt;Mi sistema consta de 3 partes:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Restaurante&lt;/strong&gt;: Como establecimiento o &lt;em&gt;cadena&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Platillo&lt;/strong&gt;: El platillo como tal que voy a &lt;em&gt;calificar&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Journal&lt;/strong&gt;: Normalmente esto se &lt;em&gt;enlaza&lt;/em&gt; gracias a que en mi &lt;a href="https://oscarlp6.dev/en/blogs/nutrition-system-obsidian/" rel="noopener noreferrer"&gt;Journal&lt;/a&gt; escribo mis &lt;em&gt;comidas&lt;/em&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  🍽 El Restaurante
&lt;/h3&gt;

&lt;p&gt;Creo una &lt;em&gt;nota&lt;/em&gt; del &lt;em&gt;restaurante&lt;/em&gt;, porque esta va a ser la nota que voy a &lt;em&gt;visitar&lt;/em&gt; cuando vuelva a ir al lugar. Además, voy a utilizar esa nota para que, al crear un nuevo &lt;em&gt;platillo&lt;/em&gt;, este se pueda &lt;em&gt;enlazar&lt;/em&gt; con el &lt;strong&gt;restaurante&lt;/strong&gt; al que &lt;em&gt;pertenece&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;La estructura es muy &lt;em&gt;simple&lt;/em&gt;. Para el ejemplo, voy a utilizar mi &lt;em&gt;nota&lt;/em&gt; sobre &lt;em&gt;McDonald's&lt;/em&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  🏗 Estructura general
&lt;/h4&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;---
tags:
    - lugar
    - restaurante
---
# 📌 McDonald's
## ⭐ Recomendaciones
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;```dataview
TABLE
calificacion as "Calificación"
FROM [[]]
WHERE calificacion
```
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;## 🎫 Última visita
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;```dataview
LIST WITHOUT ID link(dateformat(file.cday, "dd-MM-yyyy"))
FROM [[]]
SORT file.cday DESC
LIMIT 1
```
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  👀 Nota resultado
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ful3cyq5bsmo1l95limhn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ful3cyq5bsmo1l95limhn.png" alt="Vista renderizada de la nota de Mcdonalds" width="800" height="584"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Ahora vamos a &lt;em&gt;desglosar&lt;/em&gt; cada una de las partes de la nota.&lt;/p&gt;

&lt;h4&gt;
  
  
  🏷 Tags
&lt;/h4&gt;

&lt;p&gt;Las notas de &lt;em&gt;restaurante&lt;/em&gt; tienen los &lt;em&gt;tags:&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Lugar&lt;/li&gt;
&lt;li&gt;Restaurante&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Porque en mi sistema existen varios tipos de lugar, por ejemplo, &lt;em&gt;empresas&lt;/em&gt;, por eso es necesario hacer la &lt;em&gt;distinción&lt;/em&gt; de que es un &lt;em&gt;restaurante&lt;/em&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  ⭐ Recomendaciones
&lt;/h4&gt;

&lt;p&gt;Las recomendaciones no son nada más que una vista de &lt;a href="https://oscarlp6.dev/blogs/obsidian-introduction/#-comunidad" rel="noopener noreferrer"&gt;Dataview&lt;/a&gt; que &lt;em&gt;recopila&lt;/em&gt; todas las notas de &lt;strong&gt;Platillos&lt;/strong&gt; que vamos a ver más adelante y me las muestra junto con la &lt;em&gt;calificación&lt;/em&gt; que les puse. Como se puede apreciar en la imagen, yo soy muy &lt;em&gt;fan&lt;/em&gt; de &lt;strong&gt;McDonald's&lt;/strong&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  🎫 Última visita
&lt;/h4&gt;

&lt;p&gt;Por último, esta sección solo &lt;em&gt;busca&lt;/em&gt; cuándo fue la entrada más &lt;em&gt;reciente&lt;/em&gt; en la que se hizo &lt;em&gt;referencia&lt;/em&gt; al &lt;em&gt;establecimiento&lt;/em&gt; y me muestra la nota &lt;em&gt;correspondiente&lt;/em&gt; a esa fecha.&lt;br&gt;
Esta es una de las partes que menos me gusta, porque &lt;em&gt;requiere&lt;/em&gt; que yo llame &lt;em&gt;explícitamente&lt;/em&gt; al &lt;em&gt;establecimiento&lt;/em&gt; en mi nota de &lt;a href="https://oscarlp6.dev/blogs/obsidian-journaling/" rel="noopener noreferrer"&gt;Journal&lt;/a&gt;. Quiero mejorar la &lt;em&gt;query&lt;/em&gt; de forma que se &lt;em&gt;detecte&lt;/em&gt; cuando yo hago una referencia a un platillo que esté enlazado al establecimiento, pero no he tenido el tiempo para hacerlo.&lt;/p&gt;

&lt;h3&gt;
  
  
  🍕 El Platillo
&lt;/h3&gt;

&lt;p&gt;Esta nota hace referencia al &lt;em&gt;platillo&lt;/em&gt; en sí. Esta nota la utilizo desde el &lt;em&gt;restaurante&lt;/em&gt;, &lt;em&gt;enlazando&lt;/em&gt; la nota al &lt;em&gt;restaurante&lt;/em&gt; en el título para después obtener la &lt;em&gt;calificación&lt;/em&gt;, pero también para la información nutricional del platillo. Esto es más relacionado con la parte de &lt;em&gt;nutrición&lt;/em&gt;, entonces no lo voy a abordar.&lt;/p&gt;

&lt;h4&gt;
  
  
  🏗 Estructura general
&lt;/h4&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;---
calificacion: 5
tags:
  - platillo
---
# 🥘 McMuffin normal de [[McDonald's]]
Mi opinión con respecto a la comida. Algún *detalle* que deba recordar.
## 📊 Información nutrimental
[Calorías:: 310 kcal]
[Proteínas:: 12 g]
[Grasas:: 13 g]
[Carbohidratos:: 20 g]
[Fibra:: 2 g]
[Azúcares:: 2 g]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;El platillo tiene el &lt;em&gt;tag&lt;/em&gt; &lt;code&gt;platillo&lt;/code&gt; para poder &lt;em&gt;filtrarlo&lt;/em&gt; rápidamente en las &lt;em&gt;queries&lt;/em&gt;, pero además incluyo en la &lt;em&gt;metadata&lt;/em&gt; la &lt;em&gt;calificación&lt;/em&gt; que le doy en una &lt;em&gt;escala&lt;/em&gt; del &lt;em&gt;1 al 5&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Y en el cuerpo de la nota puedo &lt;em&gt;incluir&lt;/em&gt; cualquier &lt;em&gt;información&lt;/em&gt; relevante, si la comida estuvo muy &lt;em&gt;picante&lt;/em&gt;, si debía pedirlo sin &lt;em&gt;jitomate&lt;/em&gt;, cualquier cosa que quiera recordar la siguiente vez que vaya al lugar.&lt;/p&gt;

&lt;h3&gt;
  
  
  ✍ Journal
&lt;/h3&gt;

&lt;p&gt;El &lt;em&gt;journal&lt;/em&gt; no lo voy a enseñar, porque sería mostrar información privada, además de que no tiene mucha &lt;em&gt;ciencia&lt;/em&gt;, simplemente es incluir en mi nota &lt;em&gt;journal&lt;/em&gt; alguna mención que &lt;em&gt;enlace&lt;/em&gt; a la nota del &lt;em&gt;restaurante&lt;/em&gt;.&lt;br&gt;
De nuevo, esta es la parte que menos me gusta del &lt;em&gt;sistema&lt;/em&gt;, porque eso lo hago para tener la referencia de cuándo fue la última vez que fui, pero eso solo funciona si es la primera vez que voy y creo las notas de los platillos o si hago la &lt;em&gt;mención explícita&lt;/em&gt;.&lt;br&gt;
Si tú tienes una mejor idea de cómo hacer que cada vez que mencione la nota de &lt;em&gt;platillos&lt;/em&gt; en mi &lt;em&gt;sección&lt;/em&gt; de comidas, eso se &lt;em&gt;"registre"&lt;/em&gt; como una visita, te estaría muy &lt;em&gt;agradecido&lt;/em&gt; de que me lo dejaras en un comentario.&lt;/p&gt;

&lt;h2&gt;
  
  
  🏁 Conclusión
&lt;/h2&gt;

&lt;p&gt;Este sistema en &lt;strong&gt;Obsidian&lt;/strong&gt; me ha permitido mejorar mi organización y memoria con respecto a los restaurantes y platillos que he probado. Aunque tiene algunos puntos de mejora, como la automatización de la última visita, su estructura modular me ha sido bastante útil. Al final, lo importante es tener un sistema que se adapte a mis necesidades y que pueda evolucionar con el tiempo. Si tienes sugerencias sobre cómo mejorar esta metodología, me encantaría leerlas. ¡Gracias por tu tiempo! 😊&lt;/p&gt;

</description>
      <category>obsidian</category>
      <category>tooling</category>
      <category>productivity</category>
    </item>
    <item>
      <title>🍽️ Obsidian: Restaurant's rating</title>
      <dc:creator>Oscar Lopez</dc:creator>
      <pubDate>Mon, 24 Feb 2025 19:00:00 +0000</pubDate>
      <link>https://forem.com/oscareduardolp6/obsidian-restaurants-rating-3fcb</link>
      <guid>https://forem.com/oscareduardolp6/obsidian-restaurants-rating-3fcb</guid>
      <description>&lt;p&gt;I have a very &lt;em&gt;bad memory&lt;/em&gt;, which is why I am so obsessed with having &lt;em&gt;systems&lt;/em&gt; that make it easier for me to &lt;em&gt;search&lt;/em&gt; for information. Many times, if I don't structure it very well, I won't &lt;em&gt;remember&lt;/em&gt; how I saved it and will end up &lt;em&gt;losing&lt;/em&gt; it anyway. This is a big part of why I like &lt;strong&gt;Obsidian&lt;/strong&gt; so much as a tool; it allows me to &lt;em&gt;structure&lt;/em&gt; things in a way very &lt;em&gt;similar&lt;/em&gt; to how I do it mentally, meaning in &lt;em&gt;relationships&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Due to this same lack of memory, I have encountered situations where, for example, I am someone who does not tolerate &lt;em&gt;spicy food&lt;/em&gt; very well. So, when I go to a &lt;em&gt;restaurant&lt;/em&gt; and want to order &lt;em&gt;chilaquiles&lt;/em&gt;, I don't remember if last time I ordered the &lt;em&gt;green&lt;/em&gt; ones and they were too spicy, or if they were fine, or if the &lt;em&gt;red&lt;/em&gt; ones were better, etc. To &lt;em&gt;solve&lt;/em&gt; this, as in many other &lt;em&gt;areas&lt;/em&gt; of my life, I have a system that helps me &lt;em&gt;organize&lt;/em&gt; this information so that I can &lt;em&gt;revisit&lt;/em&gt; it easily the next time I go to the restaurant. This way, I can see if I liked something, what &lt;em&gt;details&lt;/em&gt; it had, how much I liked it, etc.&lt;/p&gt;

&lt;h2&gt;
  
  
  🧩 Parts
&lt;/h2&gt;

&lt;p&gt;My system consists of 3 parts:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Restaurant&lt;/strong&gt;: The establishment or &lt;em&gt;chain&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dish&lt;/strong&gt;: The specific dish I am going to &lt;em&gt;rate&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Journal&lt;/strong&gt;: This is usually &lt;em&gt;linked&lt;/em&gt; thanks to the fact that in my &lt;a href="https://oscarlp6.dev/en/blogs/nutrition-system-obsidian/" rel="noopener noreferrer"&gt;Journal&lt;/a&gt; I log my &lt;em&gt;meals&lt;/em&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  🍽 The Restaurant
&lt;/h3&gt;

&lt;p&gt;I create a &lt;em&gt;note&lt;/em&gt; for the &lt;em&gt;restaurant&lt;/em&gt; because this will be the note I &lt;em&gt;visit&lt;/em&gt; when I return to that place. Additionally, I use this note so that, when creating a new &lt;em&gt;dish&lt;/em&gt;, it can be &lt;em&gt;linked&lt;/em&gt; to the &lt;strong&gt;restaurant&lt;/strong&gt; it &lt;em&gt;belongs to&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;The structure is very &lt;em&gt;simple&lt;/em&gt;. For this example, I will use my &lt;em&gt;note&lt;/em&gt; about &lt;em&gt;McDonald's&lt;/em&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  🏗 General Structure
&lt;/h4&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;---
tags: 
- place 
- restaurant
---

# 📌 McDonald's
## ⭐ Recommendations
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;```dataview 
TABLE 
calificacion as "Rating" 
FROM [[]] 
WHERE calificacion 
```
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;## 🎫 Last Visit
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;```dataview
LIST WITHOUT ID link(dateformat(file.cday, "dd-MM-yyyy")) 
FROM [[]] 
SORT file.cday DESC 
LIMIT 1
```
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  👀 Example Note
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9cui67cc680sjou5qg4c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9cui67cc680sjou5qg4c.png" alt="Rendered view of the Mcdonalds note" width="800" height="584"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now let's &lt;em&gt;break down&lt;/em&gt; each part of the note.&lt;/p&gt;

&lt;h4&gt;
  
  
  🏷 Tags
&lt;/h4&gt;

&lt;p&gt;The &lt;em&gt;restaurant&lt;/em&gt; notes have the following &lt;em&gt;tags&lt;/em&gt;: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Place&lt;/li&gt;
&lt;li&gt;Restaurant&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Because my system includes various types of places, such as &lt;em&gt;companies&lt;/em&gt;, it is necessary to make the &lt;em&gt;distinction&lt;/em&gt; that it is a &lt;em&gt;restaurant&lt;/em&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  ⭐ Recommendations
&lt;/h4&gt;

&lt;p&gt;The recommendations are nothing more than a &lt;a href="https://oscarlp6.dev/blogs/obsidian-introduction/#-community" rel="noopener noreferrer"&gt;Dataview&lt;/a&gt; view that &lt;em&gt;compiles&lt;/em&gt; all &lt;strong&gt;Dish&lt;/strong&gt; notes, which we will see later, and displays them along with the &lt;em&gt;rating&lt;/em&gt; I assigned. As shown in the image, I am a big &lt;em&gt;fan&lt;/em&gt; of &lt;strong&gt;McDonald's&lt;/strong&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  🎫 Last Visit
&lt;/h4&gt;

&lt;p&gt;Finally, this section simply &lt;em&gt;searches&lt;/em&gt; for the most &lt;em&gt;recent&lt;/em&gt; entry that &lt;em&gt;references&lt;/em&gt; the &lt;em&gt;establishment&lt;/em&gt; and shows me the &lt;em&gt;corresponding&lt;/em&gt; note for that date.&lt;br&gt;
This is one of the parts I like the least because it &lt;em&gt;requires&lt;/em&gt; me to &lt;em&gt;explicitly&lt;/em&gt; mention the &lt;em&gt;establishment&lt;/em&gt; in my &lt;a href="https://oscarlp6.dev/blogs/obsidian-journaling/" rel="noopener noreferrer"&gt;Journal&lt;/a&gt; note. I want to improve the &lt;em&gt;query&lt;/em&gt; so that it &lt;em&gt;detects&lt;/em&gt; when I reference a dish linked to the establishment, but I haven't had time to do so.&lt;/p&gt;

&lt;h3&gt;
  
  
  🍕 The Dish
&lt;/h3&gt;

&lt;p&gt;This note refers to the &lt;em&gt;dish&lt;/em&gt; itself. I use this note from the &lt;em&gt;restaurant&lt;/em&gt;, &lt;em&gt;linking&lt;/em&gt; the note to the &lt;em&gt;restaurant&lt;/em&gt; in the title to later retrieve the &lt;em&gt;rating&lt;/em&gt;, but also to store nutritional information about the dish. This is more related to the &lt;em&gt;nutrition&lt;/em&gt; aspect, so I won’t cover it here.&lt;/p&gt;

&lt;h4&gt;
  
  
  🏗 General Structure
&lt;/h4&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;---
calificacion: 5
tags:
  - dish
---
# 🥘 McMuffin Regular from [[McDonald's]]
My opinion on the food. Any *detail* I should remember.
## 📊 Nutritional Information 
[Calories:: 310 kcal] 
[Proteins:: 12 g] 
[Fats:: 13 g] 
[Carbohydrates:: 20 g] 
[Fiber:: 2 g] 
[Sugars:: 2 g]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;The dish has the &lt;em&gt;tag&lt;/em&gt; &lt;code&gt;dish&lt;/code&gt; to make it easier to &lt;em&gt;filter&lt;/em&gt; in &lt;em&gt;queries&lt;/em&gt;. Additionally, I include the &lt;em&gt;rating&lt;/em&gt; in the &lt;em&gt;metadata&lt;/em&gt; on a &lt;em&gt;scale&lt;/em&gt; from &lt;em&gt;1 to 5&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;In the body of the note, I can &lt;em&gt;include&lt;/em&gt; any &lt;em&gt;relevant information&lt;/em&gt;, such as whether the food was too &lt;em&gt;spicy&lt;/em&gt;, if I should order it without &lt;em&gt;tomato&lt;/em&gt;, or anything I want to remember for my next visit.&lt;/p&gt;

&lt;h3&gt;
  
  
  ✍ Journal
&lt;/h3&gt;

&lt;p&gt;I won’t show my &lt;em&gt;journal&lt;/em&gt; because it contains private information, and besides, there isn’t much &lt;em&gt;complexity&lt;/em&gt; to it. It simply involves mentioning the &lt;em&gt;restaurant&lt;/em&gt; note in my &lt;em&gt;journal&lt;/em&gt; entry.&lt;br&gt;
Once again, this is the part of the &lt;em&gt;system&lt;/em&gt; that I like the least because it only works if it’s my first time at the place and I create dish notes, or if I make an &lt;em&gt;explicit mention&lt;/em&gt;.&lt;br&gt;
If you have a better idea on how to ensure that each time I mention a &lt;em&gt;dish&lt;/em&gt; note in my &lt;em&gt;meals&lt;/em&gt; section, it gets &lt;em&gt;"logged"&lt;/em&gt; as a visit, I would be very &lt;em&gt;grateful&lt;/em&gt; if you left me a comment.&lt;/p&gt;

&lt;h2&gt;
  
  
  🏁 Conclusion
&lt;/h2&gt;

&lt;p&gt;This system in &lt;strong&gt;Obsidian&lt;/strong&gt; has allowed me to improve my organization and memory regarding restaurants and dishes I have tried. Although it has some areas for improvement, such as automating the last visit, its modular structure has been quite useful. In the end, the important thing is to have a system that adapts to my needs and can evolve over time. If you have suggestions on how to improve this methodology, I would love to hear them. Thanks for your time! 😊&lt;/p&gt;

</description>
      <category>obsidian</category>
      <category>tooling</category>
      <category>productivity</category>
    </item>
    <item>
      <title>🚫Notion vs Obsidian</title>
      <dc:creator>Oscar Lopez</dc:creator>
      <pubDate>Thu, 16 Jan 2025 16:00:00 +0000</pubDate>
      <link>https://forem.com/oscareduardolp6/notion-vs-obsidian-2bd4</link>
      <guid>https://forem.com/oscareduardolp6/notion-vs-obsidian-2bd4</guid>
      <description>&lt;p&gt;Antes de implementar todo mi &lt;a href="https://oscarlp6.dev/blogs/obsidian-introduction/" rel="noopener noreferrer"&gt;sistema de productividad&lt;/a&gt; y de &lt;a href="https://oscarlp6.dev/blogs/obsidian-journaling/" rel="noopener noreferrer"&gt;journaling&lt;/a&gt; en &lt;a href="https://obsidian.md/" rel="noopener noreferrer"&gt;Obsidian&lt;/a&gt;, estuve &lt;em&gt;experimentando&lt;/em&gt; con varias otras herramientas. Una de las más &lt;em&gt;sonadas&lt;/em&gt; es &lt;a href="https://www.notion.com/es" rel="noopener noreferrer"&gt;Notion&lt;/a&gt;, una herramienta impresionante y altamente &lt;em&gt;personalizable&lt;/em&gt;, pero que hoy voy a &lt;em&gt;explorar&lt;/em&gt; el porqué yo creo que no es la mejor &lt;em&gt;opción&lt;/em&gt; para sistemas de productividad o cosas como &lt;em&gt;segundo cerebro&lt;/em&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  💡 Organización de ideas y pensamientos
&lt;/h2&gt;

&lt;p&gt;Desde que estaba en la &lt;em&gt;escuela&lt;/em&gt;, siempre tuve &lt;em&gt;complicaciones&lt;/em&gt; para tomar notas porque sentía que la forma en la que pensamos no está muy bien &lt;em&gt;adecuada&lt;/em&gt; a cómo, muchas veces, tomamos notas. Cuando ves un tema en la &lt;em&gt;escuela&lt;/em&gt;, un &lt;em&gt;concepto&lt;/em&gt; a su vez se relaciona con otras cosas que probablemente ya &lt;em&gt;sabes&lt;/em&gt;. Entonces, si tú veías las notas que tomaba, siempre veías muchas &lt;em&gt;flechas&lt;/em&gt; que se cruzaban a través de la página, porque para mí era muy &lt;em&gt;importante&lt;/em&gt; saber que el &lt;em&gt;concepto 1&lt;/em&gt; se relaciona o tiene que ver con el &lt;em&gt;concepto A&lt;/em&gt;. Por eso, para mí, &lt;em&gt;Obsidian&lt;/em&gt; es de las herramientas que más me gustan, porque la idea de &lt;em&gt;relacionar conceptos&lt;/em&gt; está en su filosofía. Y creo que es el punto que más lo hace &lt;em&gt;destacar&lt;/em&gt; sobre las otras &lt;em&gt;apps de notas&lt;/em&gt; como &lt;strong&gt;Notion&lt;/strong&gt;. A pesar de que en &lt;strong&gt;Notion&lt;/strong&gt; también puedes lograr que las cosas se &lt;em&gt;relacionen&lt;/em&gt;, es un hecho que no es tan &lt;em&gt;sencillo&lt;/em&gt; como en &lt;em&gt;Obsidian&lt;/em&gt; y que la propia &lt;em&gt;filosofía&lt;/em&gt; de &lt;strong&gt;Notion&lt;/strong&gt; no está orientada a crear &lt;em&gt;relaciones&lt;/em&gt; entre las notas. Esto está bien, pero, por lo menos para mis &lt;em&gt;propósitos&lt;/em&gt;, eso no era lo que quería. Por esta razón, creo que &lt;strong&gt;Notion&lt;/strong&gt; no logra un buen &lt;em&gt;desempeño&lt;/em&gt; a la hora de crear &lt;em&gt;bases de conocimiento&lt;/em&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  🔑 Propiedad de datos
&lt;/h2&gt;

&lt;p&gt;Una de las mayores ventajas de &lt;em&gt;Obsidian&lt;/em&gt; es que eres &lt;em&gt;dueño&lt;/em&gt; de tu información. A pesar de que existen servicios como &lt;em&gt;Sync&lt;/em&gt; para sincronizar tus datos entre dispositivos, todo el conocimiento, ideas, proyectos, etc., que tienes en &lt;em&gt;Obsidian&lt;/em&gt; es un &lt;em&gt;archivo&lt;/em&gt; que existe en tu dispositivo. Es por esto que, si mañana &lt;em&gt;Obsidian&lt;/em&gt; decide cambiar su &lt;em&gt;modelo&lt;/em&gt; de negocios y comienza a ser de paga, no tendrías que preocuparte por &lt;em&gt;migrar&lt;/em&gt; tu información, pues ya la posees como archivos en formato &lt;em&gt;Markdown&lt;/em&gt; dentro de tu dispositivo.&lt;/p&gt;

&lt;p&gt;Esto te da mucha &lt;em&gt;flexibilidad&lt;/em&gt; para probar otras herramientas que sigan la misma &lt;em&gt;filosofía&lt;/em&gt;. También te da tranquilidad acerca del uso de tu información, ya que, a menos que utilices &lt;em&gt;Obsidian Sync&lt;/em&gt; o algo similar, la información nunca deja tu computadora.&lt;/p&gt;

&lt;h2&gt;
  
  
  👨‍🎨 Formato de la información
&lt;/h2&gt;

&lt;p&gt;Como ya mencioné, no solo eres dueño de la información, sino que tus notas ya están en un formato &lt;em&gt;abierto&lt;/em&gt; que muchas otras herramientas pueden utilizar, en muchos casos sin tener que hacer ningún ajuste. Además, por sí solo, ya es un &lt;em&gt;formato humanamente legible&lt;/em&gt;, no como si tuvieras tus notas en &lt;code&gt;json&lt;/code&gt; o &lt;code&gt;yml&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  🔌 Extensibilidad para desarrolladores
&lt;/h2&gt;

&lt;p&gt;Creo que uno de los puntos que más me encanta de &lt;em&gt;Obsidian&lt;/em&gt; es el hecho de que tiene un gran sistema de &lt;em&gt;plugins&lt;/em&gt; que permite que la comunidad cree &lt;em&gt;extensiones&lt;/em&gt; para solventar las cosas que no tiene completamente resueltas &lt;em&gt;Obsidian&lt;/em&gt;. Esto te da muchísimo poder para &lt;em&gt;adaptar Obsidian&lt;/em&gt; a tu forma de pensar o trabajar. Te da mucha más libertad de pensar en cómo quieres &lt;em&gt;estructurar&lt;/em&gt; tus cosas. Si eres &lt;em&gt;desarrollador&lt;/em&gt; como yo, te va a ser mucho más &lt;em&gt;sencillo&lt;/em&gt; implementar &lt;em&gt;sistemas&lt;/em&gt; que te permitan mantener registros en orden, extraer información, etc. Las posibilidades son &lt;em&gt;infinitas&lt;/em&gt;, pero creo que es mucho más &lt;em&gt;sencillo&lt;/em&gt; lograr este tipo de sistemas con &lt;em&gt;Obsidian&lt;/em&gt; que con &lt;strong&gt;Notion&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  🫂 Colaboración
&lt;/h2&gt;

&lt;p&gt;A pesar de que me he dedicado a hablar de las ventajas de &lt;strong&gt;Obsidian&lt;/strong&gt;, creo que este es un punto en el que &lt;em&gt;definitivamente&lt;/em&gt; flaquea, porque ni siquiera está &lt;em&gt;integrado&lt;/em&gt; en su &lt;em&gt;filosofía&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Si quieres compartir información entre tu equipo o tener algo que pueda ser &lt;em&gt;colaborativo&lt;/em&gt;, es muy probable, por lo menos desde mi punto de vista, que tengas que &lt;em&gt;explorar&lt;/em&gt; posibilidades distintas. Esto se debe a que es un punto que &lt;em&gt;choca&lt;/em&gt; mucho con la naturaleza de &lt;strong&gt;Obsidian&lt;/strong&gt;, al ser archivos y estar almacenados en tu computadora. Al querer utilizarlo como una &lt;em&gt;solución colaborativa&lt;/em&gt;, te vas a encontrar con &lt;em&gt;overlaps&lt;/em&gt; de cambios o cosas similares. Es para este tipo de casos donde creo que &lt;em&gt;Notion&lt;/em&gt; reluce. Si quieres tener un &lt;em&gt;CMS&lt;/em&gt; o un tablero &lt;em&gt;kanban&lt;/em&gt; para tu equipo, ahí es donde sí te recomendaría utilizar &lt;em&gt;Notion&lt;/em&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  📃 Conclusión
&lt;/h2&gt;

&lt;p&gt;En resumen, tanto &lt;em&gt;Obsidian&lt;/em&gt; como &lt;strong&gt;Notion&lt;/strong&gt; tienen sus fortalezas y debilidades dependiendo del caso de uso. &lt;em&gt;Obsidian&lt;/em&gt; destaca por su filosofía centrada en la relación entre conceptos, la propiedad de los datos y su extensibilidad para desarrolladores. Sin embargo, carece de funcionalidades robustas para la colaboración en equipo. Por otro lado, &lt;strong&gt;Notion&lt;/strong&gt; es una herramienta más orientada a entornos colaborativos, como tableros de equipo y sistemas tipo &lt;em&gt;CMS&lt;/em&gt;. Por esta razón, mi elección entre ambas dependería del contexto y de las necesidades específicas del proyecto o sistema que quiera implementar.&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>obsidian</category>
      <category>notion</category>
      <category>tooling</category>
    </item>
    <item>
      <title>🚫 Notion vs Obsidian</title>
      <dc:creator>Oscar Lopez</dc:creator>
      <pubDate>Thu, 16 Jan 2025 16:00:00 +0000</pubDate>
      <link>https://forem.com/oscareduardolp6/notion-vs-obsidian-1nmd</link>
      <guid>https://forem.com/oscareduardolp6/notion-vs-obsidian-1nmd</guid>
      <description>&lt;p&gt;Before implementing my entire &lt;a href="https://oscarlp6.dev/en/blogs/obsidian-introduction/" rel="noopener noreferrer"&gt;productivity system&lt;/a&gt; and &lt;a href="https://oscarlp6.dev/en/blogs/obsidian-journaling/" rel="noopener noreferrer"&gt;journaling&lt;/a&gt; in &lt;a href="https://obsidian.md/" rel="noopener noreferrer"&gt;Obsidian&lt;/a&gt;, I &lt;em&gt;experimented&lt;/em&gt; with several other tools. One of the most &lt;em&gt;notable&lt;/em&gt; ones is &lt;a href="https://www.notion.com/es" rel="noopener noreferrer"&gt;Notion&lt;/a&gt;, an impressive and highly &lt;em&gt;customizable&lt;/em&gt; tool. However, today I will &lt;em&gt;explore&lt;/em&gt; why I believe it is not the best &lt;em&gt;option&lt;/em&gt; for productivity systems or things like a &lt;em&gt;second brain&lt;/em&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  💡 Organization of ideas and thoughts
&lt;/h2&gt;

&lt;p&gt;Since I was in &lt;em&gt;school&lt;/em&gt;, I always had &lt;em&gt;difficulties&lt;/em&gt; taking notes because I felt that the way we think is not well &lt;em&gt;aligned&lt;/em&gt; with how we often take notes. When you study a topic in &lt;em&gt;school&lt;/em&gt;, a &lt;em&gt;concept&lt;/em&gt; is often related to other things you probably already &lt;em&gt;know&lt;/em&gt;. So, if you looked at my notes, you would always see many &lt;em&gt;arrows&lt;/em&gt; crossing the page because, for me, it was very &lt;em&gt;important&lt;/em&gt; to know that &lt;em&gt;concept 1&lt;/em&gt; is related to or connected with &lt;em&gt;concept A&lt;/em&gt;. That is why, for me, &lt;em&gt;Obsidian&lt;/em&gt; is one of the tools I like the most, because the idea of &lt;em&gt;linking concepts&lt;/em&gt; is part of its philosophy. And I think this is the aspect that makes it &lt;em&gt;stand out&lt;/em&gt; the most compared to other &lt;em&gt;note-taking apps&lt;/em&gt; like &lt;strong&gt;Notion&lt;/strong&gt;. While in &lt;strong&gt;Notion&lt;/strong&gt;, you can also &lt;em&gt;link&lt;/em&gt; things, it is a fact that it is not as &lt;em&gt;straightforward&lt;/em&gt; as in &lt;em&gt;Obsidian&lt;/em&gt;. Moreover, the &lt;em&gt;philosophy&lt;/em&gt; of &lt;strong&gt;Notion&lt;/strong&gt; is not geared toward creating &lt;em&gt;relationships&lt;/em&gt; between notes. That’s fine, but, at least for my &lt;em&gt;purposes&lt;/em&gt;, it was not what I wanted. For this reason, I think &lt;strong&gt;Notion&lt;/strong&gt; does not perform well when it comes to creating &lt;em&gt;knowledge bases&lt;/em&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  🔑 Data ownership
&lt;/h2&gt;

&lt;p&gt;One of the greatest advantages of &lt;em&gt;Obsidian&lt;/em&gt; is that you are the &lt;em&gt;owner&lt;/em&gt; of your information. Even though there are services like &lt;em&gt;Sync&lt;/em&gt; to synchronize your data across devices, all the knowledge, ideas, projects, etc., that you have in &lt;em&gt;Obsidian&lt;/em&gt; are stored as &lt;em&gt;files&lt;/em&gt; on your device. This means that if &lt;em&gt;Obsidian&lt;/em&gt; decides to change its &lt;em&gt;business model&lt;/em&gt; tomorrow and becomes a paid service, you would not need to worry about &lt;em&gt;migrating&lt;/em&gt; your information since you already have it stored as &lt;em&gt;Markdown&lt;/em&gt; files on your device.&lt;/p&gt;

&lt;p&gt;This gives you a lot of &lt;em&gt;flexibility&lt;/em&gt; to try other tools that follow the same &lt;em&gt;philosophy&lt;/em&gt;. It also provides peace of mind regarding the use of your information since, unless you use &lt;em&gt;Obsidian Sync&lt;/em&gt; or something similar, the information never leaves your computer.&lt;/p&gt;

&lt;h2&gt;
  
  
  👨‍🎨 Format of the information
&lt;/h2&gt;

&lt;p&gt;As I already mentioned, not only are you the owner of the information, but your notes are also in an &lt;em&gt;open&lt;/em&gt; format that many other tools can use, often without requiring any adjustments. Additionally, by itself, it is already a &lt;em&gt;human-readable format&lt;/em&gt;. It’s not like having your notes in &lt;code&gt;json&lt;/code&gt; or &lt;code&gt;yml&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  🔌 Extensibility for developers
&lt;/h2&gt;

&lt;p&gt;One of the aspects I love the most about &lt;em&gt;Obsidian&lt;/em&gt; is its excellent &lt;em&gt;plugin&lt;/em&gt; system, which allows the community to create &lt;em&gt;extensions&lt;/em&gt; to address things that &lt;em&gt;Obsidian&lt;/em&gt; does not completely solve. This gives you tremendous power to &lt;em&gt;adapt Obsidian&lt;/em&gt; to your way of thinking or working. It offers much more freedom to decide how you want to &lt;em&gt;structure&lt;/em&gt; your content. If you are a &lt;em&gt;developer&lt;/em&gt; like me, it will be much &lt;em&gt;easier&lt;/em&gt; to implement &lt;em&gt;systems&lt;/em&gt; that help you keep records organized, extract information, etc. The possibilities are &lt;em&gt;endless&lt;/em&gt;, but I believe it is much &lt;em&gt;easier&lt;/em&gt; to achieve these kinds of systems with &lt;em&gt;Obsidian&lt;/em&gt; than with &lt;strong&gt;Notion&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  🫂 Collaboration
&lt;/h2&gt;

&lt;p&gt;Although I have focused on the advantages of &lt;strong&gt;Obsidian&lt;/strong&gt;, I believe this is a point where it &lt;em&gt;definitely&lt;/em&gt; falls short, as it is not even &lt;em&gt;integrated&lt;/em&gt; into its &lt;em&gt;philosophy&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;If you want to share information with your team or have something that can be &lt;em&gt;collaborative&lt;/em&gt;, it is very likely, at least from my point of view, that you will need to &lt;em&gt;explore&lt;/em&gt; other possibilities. This is because it clashes with the nature of &lt;strong&gt;Obsidian&lt;/strong&gt;, where files are stored on your computer. If you try to use it as a &lt;em&gt;collaborative solution&lt;/em&gt;, you will face issues like &lt;em&gt;overlaps&lt;/em&gt; in changes. For such cases, I think &lt;em&gt;Notion&lt;/em&gt; shines. If you want to have a &lt;em&gt;CMS&lt;/em&gt; or a &lt;em&gt;kanban&lt;/em&gt; board for your team, that is where I would recommend using &lt;em&gt;Notion&lt;/em&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  📃 Conclusion
&lt;/h2&gt;

&lt;p&gt;In summary, both &lt;em&gt;Obsidian&lt;/em&gt; and &lt;strong&gt;Notion&lt;/strong&gt; have their strengths and weaknesses depending on the use case. &lt;em&gt;Obsidian&lt;/em&gt; excels due to its philosophy centered on linking concepts, data ownership, and developer extensibility. However, it lacks robust features for team collaboration. On the other hand, &lt;strong&gt;Notion&lt;/strong&gt; is better suited for collaborative environments, such as team boards and CMS-like systems. For this reason, my choice between the two depends on the context and the specific needs of the project or system I want to implement.&lt;/p&gt;

</description>
      <category>notion</category>
      <category>obsidian</category>
      <category>tooling</category>
      <category>productivity</category>
    </item>
    <item>
      <title>🏗 Métodos `Is`</title>
      <dc:creator>Oscar Lopez</dc:creator>
      <pubDate>Wed, 18 Dec 2024 18:00:00 +0000</pubDate>
      <link>https://forem.com/oscareduardolp6/metodos-is-1cbo</link>
      <guid>https://forem.com/oscareduardolp6/metodos-is-1cbo</guid>
      <description>&lt;p&gt;Últimamente he estado muy &lt;em&gt;adentrado&lt;/em&gt; en la &lt;em&gt;programación funcional&lt;/em&gt; con lenguajes como &lt;em&gt;Typescript&lt;/em&gt; y en mucha menos medida con &lt;em&gt;Haskell&lt;/em&gt; y más allá de las partícularidades de de la &lt;em&gt;programación funcional&lt;/em&gt; como &lt;a href="https://oscarlp6.dev/blogs/exploring-reader-monad/" rel="noopener noreferrer"&gt;Monadas&lt;/a&gt; , me ha llamado la atención conceptos más relacionado al &lt;em&gt;tipado&lt;/em&gt;, como los &lt;em&gt;Union Types&lt;/em&gt; y las útilidades con la que &lt;em&gt;viene&lt;/em&gt;. &lt;/p&gt;

&lt;p&gt;Entre estas útilidades he aprendido el concepto de hacer que los &lt;em&gt;estados inválidos sean irrepresentables&lt;/em&gt;, es decir &lt;em&gt;evitar&lt;/em&gt; los métodos de la forma &lt;code&gt;isX&lt;/code&gt; y en lugar de tener que estar &lt;em&gt;verificando&lt;/em&gt; esas &lt;em&gt;condiciones&lt;/em&gt;, saber por el simple &lt;em&gt;tipado&lt;/em&gt; que tu estado está en un estado inválido. &lt;/p&gt;

&lt;p&gt;Esto no es exclusivo de la &lt;em&gt;programación funcional&lt;/em&gt;, de hecho incluso está muy relacionado con &lt;em&gt;conceptos&lt;/em&gt; como &lt;strong&gt;Value Objects&lt;/strong&gt; de la &lt;em&gt;programación orientada a objetos&lt;/em&gt;, pero se lleva muy bien con los &lt;strong&gt;Tipos Algebraicos&lt;/strong&gt; . &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Make illegal states unrepresentable&lt;br&gt;
- Yaron Minsky.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  🚯 Hacer los estados inválidos irrepresentables
&lt;/h2&gt;

&lt;p&gt;Estamos acostumbrados a que cuándo tenemos una entidad que puede estar en diferentes estados, utilizamos cosas como &lt;code&gt;enums&lt;/code&gt; o &lt;em&gt;constantes&lt;/em&gt;, que claro, es mejor que utilizar números o strings &lt;em&gt;magicos&lt;/em&gt;, pero de cualquier forma tiene ciertos problemas. &lt;/p&gt;

&lt;p&gt;Por ejemplo, el tener que estar &lt;em&gt;verificando&lt;/em&gt; si la entidad está en el estado que necesitas para poder trabajar con ella. &lt;/p&gt;

&lt;h3&gt;
  
  
  ❎ Alternativa con &lt;code&gt;is&lt;/code&gt; o &lt;code&gt;enums&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Con esta alternativa los métodos que dependen de que el &lt;code&gt;User&lt;/code&gt; esté en &lt;em&gt;status verificado&lt;/em&gt; tienen que &lt;em&gt;revisar&lt;/em&gt; el &lt;em&gt;status&lt;/em&gt; antes de ejecutar su acción, además de que puede &lt;em&gt;lanzar excepciones&lt;/em&gt; en &lt;em&gt;runtime&lt;/em&gt;, obligandonos a tener una forma de &lt;em&gt;controlar&lt;/em&gt; ese &lt;strong&gt;error&lt;/strong&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;User&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="na"&gt;email&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="na"&gt;verified&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;boolean&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;createUser&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;email&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nx"&gt;User&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;crypto&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;randomUUID&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="na"&gt;verified&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="nx"&gt;email&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;verifyUser&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;User&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nx"&gt;User&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="na"&gt;verified&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;sendPromoCode&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;User&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;verified&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Cannot send code to unverified user&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Promo code sended&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;unverifiedUser&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;createUser&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Oscar&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;oscareduardolp@gmail.com&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nf"&gt;sendPromoCode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;unverifiedUser&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// No error &amp;amp; insecure at runtime&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;verifiedUser&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;verifyUser&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;unverifiedUser&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nf"&gt;sendPromoCode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;verifiedUser&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// No error&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  ✅ Sin métodos &lt;code&gt;is&lt;/code&gt; o &lt;code&gt;enums&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;De esta forma haciendo que el método de &lt;code&gt;sendPromoCode&lt;/code&gt; solo pueda recibir &lt;em&gt;usuarios que ya estén verificados&lt;/em&gt;, este método solo tiene que preocuparse por hacer la lógica del envío y no tiene la &lt;em&gt;responsabilidad&lt;/em&gt; de verificar si el &lt;em&gt;Usuario&lt;/em&gt; está en un &lt;em&gt;estado válido&lt;/em&gt; además de que la &lt;em&gt;verificación&lt;/em&gt; está puesta en un punto más &lt;em&gt;alto&lt;/em&gt; e incluso tenemos una verificación desde el sistema de &lt;em&gt;tipado&lt;/em&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Sin métodos is o enums &lt;/span&gt;
&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;UnverifiedUser&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="na"&gt;email&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;VerifiedUser&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;UnverifiedUser&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;verifiedAt&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Date&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;createUser&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;email&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nx"&gt;UnverifiedUser&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;crypto&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;randomUUID&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="nx"&gt;email&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;verifyUser&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;unverifiedUser&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;UnverifiedUser&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nx"&gt;VerifiedUser&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;unverifiedUser&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="na"&gt;verifiedAt&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;sendPromoCode&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;verifiedUser&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;VerifiedUser&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Promo code sended&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;unverifiedUser&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;createUser&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Oscar&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;oscareduardolp@gmail.com&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nf"&gt;sendPromoCode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;unverifiedUser&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// Error: 'UnverifiedUser' is not assignable to parameter of type 'VerifiedUser'&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;verifiedUser&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;verifyUser&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;unverifiedUser&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;sendPromoCode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;verifiedUser&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// No error&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  📖 Conclusión
&lt;/h2&gt;

&lt;p&gt;Adoptar el enfoque de &lt;strong&gt;hacer los estados inválidos irrepresentables&lt;/strong&gt; nos permite construir sistemas más seguros, robustos y mantenibles. Al delegar la validación al propio sistema de tipos, no solo reducimos la carga de verificaciones redundantes en nuestro código, sino que también eliminamos una clase completa de errores en tiempo de ejecución, permitiendo que el compilador actúe como nuestra primera línea de defensa.&lt;/p&gt;

&lt;p&gt;Además, esta práctica no está limitada a un paradigma específico, ya que encaja tanto en la programación funcional como en la orientada a objetos. Al combinar conceptos como &lt;strong&gt;Tipos Algebraicos&lt;/strong&gt;, &lt;strong&gt;Value Objects&lt;/strong&gt; o incluso técnicas inspiradas en &lt;strong&gt;Domain-Driven Design&lt;/strong&gt;, podemos modelar nuestros dominios de manera más clara, legible y semántica.&lt;/p&gt;

&lt;p&gt;En última instancia, el diseño basado en tipos no solo mejora la experiencia de desarrollo, sino que también nos obliga a pensar cuidadosamente en nuestros modelos, asegurándonos de que el código represente fielmente las reglas de negocio. Así, evitamos que estados inválidos existan incluso como una posibilidad en nuestro sistema.&lt;/p&gt;

&lt;p&gt;💡 Te invito a reflexionar sobre tus prácticas actuales y experimentar con esta técnica en tus próximos proyectos. ¡Los beneficios pueden sorprenderte!&lt;/p&gt;

&lt;h2&gt;
  
  
  🗒 Referencias
&lt;/h2&gt;

&lt;p&gt;Este artículo fue basado en la información de las siguientes fuentes: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://tomasp.net/blog/type-first-development.aspx/" rel="noopener noreferrer"&gt;Type First Development&lt;/a&gt;: Desarollo dirigido por tipos &lt;/li&gt;
&lt;li&gt;
&lt;a href="https://fsharpforfunandprofit.com/posts/designing-with-types-intro/" rel="noopener noreferrer"&gt;Designing with types&lt;/a&gt; Desarrollando el dominio con tipos &lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.youtube.com/watch?v=K--Lmy8qUCQ" rel="noopener noreferrer"&gt;BettaTech&lt;/a&gt;: Vídeo con ejemplo de &lt;em&gt;servidores conectados y desconectados&lt;/em&gt;. &lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>typescript</category>
      <category>architecture</category>
    </item>
    <item>
      <title>🏗️ `Is` Methods</title>
      <dc:creator>Oscar Lopez</dc:creator>
      <pubDate>Wed, 18 Dec 2024 18:00:00 +0000</pubDate>
      <link>https://forem.com/oscareduardolp6/is-methods-1dg4</link>
      <guid>https://forem.com/oscareduardolp6/is-methods-1dg4</guid>
      <description>&lt;p&gt;Lately, I’ve been deeply &lt;em&gt;immersed&lt;/em&gt; in &lt;em&gt;functional programming&lt;/em&gt; with languages like &lt;em&gt;TypeScript&lt;/em&gt; and to a much lesser extent with &lt;em&gt;Haskell&lt;/em&gt;. Beyond the specificities of &lt;em&gt;functional programming&lt;/em&gt; like &lt;a href="https://oscarlp6.dev/blogs/exploring-reader-monad/" rel="noopener noreferrer"&gt;Monads&lt;/a&gt;, I’ve been fascinated by concepts related to &lt;em&gt;typing&lt;/em&gt;, such as &lt;em&gt;Union Types&lt;/em&gt; and the utilities they bring.&lt;/p&gt;

&lt;p&gt;Among these utilities, I’ve learned the concept of making &lt;em&gt;invalid states unrepresentable&lt;/em&gt;. This means &lt;em&gt;avoiding&lt;/em&gt; methods like &lt;code&gt;isX&lt;/code&gt; and, instead of having to constantly &lt;em&gt;check&lt;/em&gt; those &lt;em&gt;conditions&lt;/em&gt;, knowing through the simple &lt;em&gt;type system&lt;/em&gt; that your state is valid or invalid.&lt;/p&gt;

&lt;p&gt;This is not exclusive to &lt;em&gt;functional programming&lt;/em&gt;. In fact, it’s closely related to &lt;em&gt;concepts&lt;/em&gt; like &lt;strong&gt;Value Objects&lt;/strong&gt; in &lt;em&gt;object-oriented programming&lt;/em&gt;, but it integrates well with &lt;strong&gt;Algebraic Data Types&lt;/strong&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Make illegal states unrepresentable&lt;br&gt;&lt;br&gt;
- Yaron Minsky&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  🚯 Making Invalid States Unrepresentable
&lt;/h2&gt;

&lt;p&gt;We’re used to situations where entities can exist in multiple states, and we typically use tools like &lt;code&gt;enums&lt;/code&gt; or &lt;em&gt;constants&lt;/em&gt;. While this is certainly better than using magic numbers or strings, it still has some drawbacks.&lt;/p&gt;

&lt;p&gt;For example, we often have to &lt;em&gt;check&lt;/em&gt; if the entity is in the state we need before we can work with it.&lt;/p&gt;

&lt;h3&gt;
  
  
  ❎ Alternative with &lt;code&gt;is&lt;/code&gt; or &lt;code&gt;enums&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;With this approach, methods that depend on the &lt;code&gt;User&lt;/code&gt; being in the &lt;em&gt;verified status&lt;/em&gt; must &lt;em&gt;check&lt;/em&gt; the &lt;em&gt;status&lt;/em&gt; before executing their logic. This can lead to &lt;em&gt;runtime exceptions&lt;/em&gt; and forces us to implement ways to &lt;em&gt;handle&lt;/em&gt; those &lt;strong&gt;errors&lt;/strong&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;User&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;
  &lt;span class="na"&gt;email&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;
  &lt;span class="na"&gt;verified&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;boolean&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;createUser&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;email&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nx"&gt;User&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;crypto&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;randomUUID&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
  &lt;span class="na"&gt;verified&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;email&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;verifyUser&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;User&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nx"&gt;User&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;verified&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;sendPromoCode&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;User&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;verified&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Cannot send code to unverified user&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Promo code sent&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;unverifiedUser&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;createUser&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Oscar&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;oscareduardolp@gmail.com&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nf"&gt;sendPromoCode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;unverifiedUser&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// No error &amp;amp; insecure at runtime&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;verifiedUser&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;verifyUser&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;unverifiedUser&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nf"&gt;sendPromoCode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;verifiedUser&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// No error&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  ✅ Without &lt;code&gt;is&lt;/code&gt; Methods or &lt;code&gt;enums&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;By ensuring that the &lt;code&gt;sendPromoCode&lt;/code&gt; method can only receive &lt;em&gt;verified users&lt;/em&gt;, this method focuses solely on the logic of sending the promo code and doesn’t have the &lt;em&gt;responsibility&lt;/em&gt; of validating if the &lt;em&gt;User&lt;/em&gt; is in a &lt;em&gt;valid state&lt;/em&gt;. Additionally, the &lt;em&gt;validation&lt;/em&gt; is moved to a higher &lt;em&gt;level&lt;/em&gt;, with type system verification providing additional safety.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Without is methods or enums&lt;/span&gt;
&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;UnverifiedUser&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;
  &lt;span class="na"&gt;email&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;VerifiedUser&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;UnverifiedUser&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;verifiedAt&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Date&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;createUser&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;email&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nx"&gt;UnverifiedUser&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;crypto&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;randomUUID&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
  &lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;email&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;verifyUser&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;unverifiedUser&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;UnverifiedUser&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nx"&gt;VerifiedUser&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;unverifiedUser&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;verifiedAt&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;sendPromoCode&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;verifiedUser&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;VerifiedUser&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Promo code sent&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;unverifiedUser&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;createUser&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Oscar&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;oscareduardolp@gmail.com&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nf"&gt;sendPromoCode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;unverifiedUser&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// Error: 'UnverifiedUser' is not assignable to parameter of type 'VerifiedUser'&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;verifiedUser&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;verifyUser&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;unverifiedUser&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;sendPromoCode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;verifiedUser&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// No error&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  📖 Conclusion
&lt;/h2&gt;

&lt;p&gt;Adopting the approach of &lt;strong&gt;making invalid states unrepresentable&lt;/strong&gt; allows us to build safer, more robust, and maintainable systems. By delegating validation to the type system itself, we reduce the burden of redundant checks in our code and eliminate an entire class of runtime errors, allowing the compiler to serve as our first line of defense.&lt;/p&gt;

&lt;p&gt;Moreover, this practice is not limited to a specific paradigm. It fits well within both functional programming and object-oriented programming. By combining concepts such as &lt;strong&gt;Algebraic Data Types, Value Objects&lt;/strong&gt;, or even techniques inspired by &lt;strong&gt;Domain-Driven Design&lt;/strong&gt;, we can model our domains in a clearer, more readable, and semantic way.&lt;/p&gt;

&lt;p&gt;Ultimately, &lt;em&gt;type-driven&lt;/em&gt; design not only improves the development experience but also forces us to carefully consider our models, ensuring that our code faithfully represents business rules. In this way, we prevent invalid states from existing, even as a possibility, within our system.&lt;/p&gt;

&lt;p&gt;💡 I invite you to reflect on your current practices and experiment with this technique in your next projects. The benefits might surprise you!&lt;/p&gt;

&lt;h2&gt;
  
  
  🗒️ References
&lt;/h2&gt;

&lt;p&gt;This article is based on information from the following sources: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://tomasp.net/blog/type-first-development.aspx/" rel="noopener noreferrer"&gt;Type First Development&lt;/a&gt;: Type-Driven Development&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://fsharpforfunandprofit.com/posts/designing-with-types-intro/" rel="noopener noreferrer"&gt;Designing with types&lt;/a&gt; Domain Modeling with Types&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.youtube.com/watch?v=K--Lmy8qUCQ" rel="noopener noreferrer"&gt;BettaTech&lt;/a&gt;: Video example of &lt;em&gt;connected and disconnected servers&lt;/em&gt; &lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>typescript</category>
      <category>functional</category>
    </item>
    <item>
      <title>✍️ Obsidian: Journaling</title>
      <dc:creator>Oscar Lopez</dc:creator>
      <pubDate>Thu, 12 Dec 2024 15:00:00 +0000</pubDate>
      <link>https://forem.com/oscareduardolp6/obsidian-journaling-10ih</link>
      <guid>https://forem.com/oscareduardolp6/obsidian-journaling-10ih</guid>
      <description>&lt;p&gt;Since I was around 14 years old, I have found it very &lt;em&gt;satisfying&lt;/em&gt;, &lt;em&gt;relaxing&lt;/em&gt;, and &lt;em&gt;therapeutic&lt;/em&gt; to keep a &lt;strong&gt;journal&lt;/strong&gt; where I write down all sorts of things that happen to me throughout the day. At first, it was just about making a &lt;em&gt;summary&lt;/em&gt; of what had happened during the day: important events, feelings, etc.&lt;/p&gt;

&lt;p&gt;Over time, I’ve changed the way and the tools I use for it. At first, I did it in &lt;em&gt;OneNote&lt;/em&gt; on a tablet I had when I was &lt;em&gt;14 years old&lt;/em&gt;. Then I switched to &lt;em&gt;Journey&lt;/em&gt;, an app specialized in this that allowed you to add feelings and that kind of thing. Seeing that I was a bit &lt;em&gt;tied&lt;/em&gt; to the platform and, at at the time, to the device (since it didn’t have a desktop version), I moved to &lt;em&gt;Evernote&lt;/em&gt;. It was simpler there, but it gave me the advantage of being cross-platform. However, I felt that something was missing.&lt;/p&gt;

&lt;p&gt;One day, while watching a video on &lt;em&gt;YouTube&lt;/em&gt;, I came across &lt;em&gt;Roam Research&lt;/em&gt;, an app that allowed you to organize your notes with links. I loved this idea, but at that time it was in &lt;em&gt;beta&lt;/em&gt;, and I couldn’t get &lt;em&gt;access&lt;/em&gt;. This left me feeling &lt;em&gt;disappointed&lt;/em&gt;. I researched and looked for alternatives that offered the same capability: being able to &lt;em&gt;link&lt;/em&gt; things in a &lt;em&gt;graph-like&lt;/em&gt; manner. I struggled a lot to find a similar option; I even &lt;em&gt;considered&lt;/em&gt; &lt;em&gt;developing it&lt;/em&gt; myself (very enthusiastic thinking, XD). Finally, I found a solution that met all my needs: &lt;strong&gt;Obsidian&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;What I’m going to show here is how, by leveraging all the capabilities of &lt;strong&gt;Obsidian&lt;/strong&gt;, I’ve built a &lt;em&gt;journaling&lt;/em&gt; system that works for me and allows me to keep control of many &lt;em&gt;aspects&lt;/em&gt; of my life.&lt;/p&gt;

&lt;h2&gt;
  
  
  🧩 Parts
&lt;/h2&gt;

&lt;p&gt;My &lt;em&gt;journal&lt;/em&gt; consists of many parts, each dedicated to an important aspect of my life. In this article, I’ll touch on them briefly, but if there’s &lt;em&gt;interest&lt;/em&gt; in any particular one, feel free to mention it, and I can go into more detail on that topic.&lt;/p&gt;

&lt;h3&gt;
  
  
  🟦 Meta Info
&lt;/h3&gt;

&lt;p&gt;Since it’s written in &lt;em&gt;Obsidian&lt;/em&gt;, and therefore in &lt;em&gt;Markdown&lt;/em&gt;, my notes have a &lt;em&gt;meta information&lt;/em&gt; section where I record relevant things about the day that would otherwise be more complicated to log naturally.&lt;/p&gt;

&lt;h4&gt;
  
  
  💙 Feelings
&lt;/h4&gt;

&lt;p&gt;I think it’s good to be aware of how we feel throughout the day, beyond just &lt;em&gt;good or bad&lt;/em&gt;. I like having this section to express with &lt;em&gt;more precise words&lt;/em&gt; how I felt during the day: whether the day was &lt;em&gt;stressful&lt;/em&gt;, if I felt &lt;em&gt;overwhelmed&lt;/em&gt;, &lt;em&gt;worried&lt;/em&gt;, &lt;em&gt;excited&lt;/em&gt;, &lt;em&gt;tired&lt;/em&gt;, etc.&lt;br&gt;&lt;br&gt;
This also allows me to notice &lt;em&gt;patterns&lt;/em&gt; in my behavior, see what usually makes me feel overwhelmed, or how I feel in certain situations. Knowing this, I can better manage those situations. Moreover, it &lt;em&gt;promotes&lt;/em&gt; being more &lt;em&gt;specific&lt;/em&gt; in expressing our feelings.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="p"&gt;---&lt;/span&gt;
feeling:
&lt;span class="p"&gt;  -&lt;/span&gt; happy
&lt;span class="p"&gt;  -&lt;/span&gt; proud
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Having it in the note metadata, I can query which days I felt angry, happy, proud, etc.&lt;/p&gt;

&lt;h4&gt;
  
  
  😴 Sleep
&lt;/h4&gt;

&lt;p&gt;A fundamental part of my life is sleeping. I enjoy it a lot. For a long time, I struggled to know how much time I needed to sleep since sometimes 8 hours would leave me tired, and with fewer hours, I’d feel refreshed. This section helps me track times and actions on the occasions when I sleep best. I log bedtime, wake-up time, and quality.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;sleep:
  bedtime:
    hour: 23
    minute: 30
  wakeup:
    hour: 7
    minute: 30
  rating: 5
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As with feelings, having this in metadata allows me to have a dashboard to average the sleep time during which I rest better.&lt;/p&gt;

&lt;h4&gt;
  
  
  🎆 Important Events
&lt;/h4&gt;

&lt;p&gt;It’s happened to all of us: you’re chatting with a friend who asks what you’ve been up to, and you go blank. You’ve done a lot since you last saw each other, but right now, you’re not aware of it. For me, in this section, I log everything I think is worth mentioning in such situations: a small work achievement, progress toward an exercise goal, a new dish I cooked, etc.&lt;/p&gt;

&lt;p&gt;With this, I can later have a dashboard to select a date range and see the type of things that happened in that range.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Tablero de Logros / Eventos 
  ## 📆🏆 Mes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  ```dataview 
  TABLE evento
  FROM #bitacora 
  AND !"Plantillas"
  WHERE length(evento) &amp;gt; 0 
  AND date(file.name, "dd-MM-yyyy").month &amp;gt;= 12
  AND date(file.name, "dd-MM-yyyy").year = 2024
  SORT date(file.name, "dd-MM-yyyy") DESC
  ```
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  🏷 Tags
&lt;/h4&gt;

&lt;p&gt;Lastly, the most important part: &lt;em&gt;tags&lt;/em&gt;. These allow me, firstly, to know that the note I’m writing is part of my &lt;em&gt;journal&lt;/em&gt;, thanks to the &lt;code&gt;#journal&lt;/code&gt; &lt;em&gt;tag&lt;/em&gt;. This way, no matter where I write the note, I know it will be considered part of the &lt;em&gt;journal&lt;/em&gt;. Beyond that, there are many more tags, and you’re only limited by your needs, but for me, there are &lt;em&gt;two main ones&lt;/em&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;#nap&lt;/code&gt;: As part of my &lt;em&gt;sleep tracking&lt;/em&gt;, it’s also important to note which days I needed a nap because the exhaustion was too much.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;#pain_of_x&lt;/code&gt;: I tag whenever I feel unwell. It might be a headache, stomachache, backache. I like having this information in case an &lt;em&gt;illness&lt;/em&gt; or &lt;em&gt;discomfort&lt;/em&gt; evolves into something more &lt;em&gt;serious&lt;/em&gt;. Additionally, it helps me find patterns regarding what I ate or what happened on the days I felt unwell that could have influenced the &lt;em&gt;discomfort&lt;/em&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  🟧 Main Information
&lt;/h3&gt;

&lt;p&gt;This section is more like a standard &lt;em&gt;journal&lt;/em&gt;, except for a few parts, but it’s mostly what I see when reviewing notes. It’s more like the &lt;em&gt;content&lt;/em&gt; of the note and is written in a more &lt;em&gt;natural&lt;/em&gt; style.&lt;/p&gt;

&lt;h4&gt;
  
  
  💪 Exercise
&lt;/h4&gt;

&lt;p&gt;This section is not &lt;em&gt;written naturally&lt;/em&gt;, especially because it’s not something I log in the &lt;em&gt;journal&lt;/em&gt; note. All exercise-related information is a separate &lt;em&gt;methodology/system&lt;/em&gt; that I plan to review in another article.&lt;br&gt;&lt;br&gt;
For now, what I see in the note is a summary of the exercises &lt;em&gt;performed&lt;/em&gt;.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjrrsk2921o4x7gj3ise4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjrrsk2921o4x7gj3ise4.png" alt="Rendered view of my exercise summary" width="789" height="378"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And in each &lt;em&gt;individual&lt;/em&gt; note, I can find full information on &lt;em&gt;repetitions&lt;/em&gt;, variations, etc.&lt;/p&gt;

&lt;h4&gt;
  
  
  🥪 Meals
&lt;/h4&gt;

&lt;p&gt;In this section, I log my meals throughout the day to track the nutritional values of what I’ve eaten. Similarly, this system was reviewed in the &lt;a href="https://oscarlp6.dev/en/blogs/nutrition-system-obsidian/" rel="noopener noreferrer"&gt;Obsidian: Nutrition 🔗&lt;/a&gt; article. There, you can see the full system.&lt;/p&gt;

&lt;p&gt;In general, I log what I ate, and a table is &lt;em&gt;displayed&lt;/em&gt; showing the total values of my &lt;em&gt;macronutrients&lt;/em&gt; consumed.&lt;/p&gt;

&lt;h4&gt;
  
  
  🚀 Projects
&lt;/h4&gt;

&lt;p&gt;How I &lt;em&gt;manage&lt;/em&gt; my projects and &lt;em&gt;document&lt;/em&gt; my progress was already reviewed in the &lt;a href="https://oscarlp6.dev/en/blogs/projects-obsidian/" rel="noopener noreferrer"&gt;Obsidian: Projects 🔗&lt;/a&gt; article.&lt;/p&gt;

&lt;p&gt;In &lt;em&gt;summary&lt;/em&gt;, just like with &lt;em&gt;exercise&lt;/em&gt;, here I only have a &lt;em&gt;query&lt;/em&gt; showing the &lt;em&gt;completed tasks&lt;/em&gt; during the day related to any of the projects I work on. It gives me greater &lt;em&gt;visibility&lt;/em&gt; into how I’m progressing and how, bit by bit, I’m making substantial progress.&lt;/p&gt;

&lt;h4&gt;
  
  
  🙌 Gratitudes
&lt;/h4&gt;

&lt;p&gt;I like to keep in mind the things I’m &lt;em&gt;grateful&lt;/em&gt; for, not in a &lt;em&gt;"magical"&lt;/em&gt; way, but in a way that allows me to appreciate things we sometimes take for granted or that once thrilled us and later forgot how &lt;em&gt;lucky&lt;/em&gt; we are to have achieved them.&lt;br&gt;&lt;br&gt;
I make a big effort to fill this section as thoroughly as possible each day. Later, I can &lt;em&gt;gather&lt;/em&gt; all the entries in a &lt;em&gt;Gratitude Dashboard&lt;/em&gt; that reminds me, &lt;em&gt;as a whole&lt;/em&gt;, of all the things I’m grateful for.&lt;br&gt;&lt;br&gt;
It’s very useful on &lt;em&gt;hard days&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhprdbiqf5ad7ew9d588t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhprdbiqf5ad7ew9d588t.png" alt="Rendered view of my gratitudes list" width="214" height="234"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  ✅ Anti To-Do List
&lt;/h4&gt;

&lt;p&gt;We’re used to having a to-do list to see what we need to accomplish during the day. I have mine. But also, at the end of the day, I like to review all the tasks I completed. It gives me a dose of satisfaction to see everything I advanced, even if it’s unrelated to projects, but still very valuable and important, like cleaning the house or doing the dishes.&lt;/p&gt;

&lt;p&gt;Additionally (and this is just an idea), you can track something similar for the people you live with, not with the &lt;em&gt;intent&lt;/em&gt; of counting who does more, but with the &lt;em&gt;intent&lt;/em&gt; of being &lt;em&gt;aware&lt;/em&gt; of everything others do, which we might not always appreciate enough.&lt;/p&gt;

&lt;h4&gt;
  
  
  🏆 Recognitions
&lt;/h4&gt;

&lt;p&gt;I’m a big fan of the &lt;em&gt;culture&lt;/em&gt; of recognizing others. I think we often wait for the &lt;em&gt;right moment&lt;/em&gt; or the &lt;em&gt;right instance&lt;/em&gt; to &lt;em&gt;acknowledge&lt;/em&gt; people. Personally, I try to &lt;em&gt;recognize&lt;/em&gt; as soon as possible and as &lt;em&gt;specifically&lt;/em&gt; as possible to truly give value to the recognition. I really dislike dynamics where people are invited to give &lt;em&gt;recognitions&lt;/em&gt;, and they &lt;em&gt;"acknowledge"&lt;/em&gt; everyone because, at least in my *&lt;/p&gt;

&lt;p&gt;conception*, vaguely and generally recognizing everyone is equivalent to recognizing &lt;em&gt;no one&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;So, if I can, I like to &lt;em&gt;recognize&lt;/em&gt; the person as soon as possible. But in case I can’t, and also to have a &lt;em&gt;record&lt;/em&gt; of valuable things about that person, I keep track of &lt;em&gt;recognitions&lt;/em&gt; for people throughout the day.&lt;/p&gt;

&lt;p&gt;Again, leveraging the power of &lt;em&gt;dataview&lt;/em&gt;, I use these listings so that each recognition appears in the note for each person.&lt;/p&gt;

&lt;h4&gt;
  
  
  ❤‍🔥 Entries
&lt;/h4&gt;

&lt;p&gt;Here, I write about events of the day, but with much more detail: things I liked, how they made me feel, things that upset me, why they upset me, things that intrigue me. This is the most &lt;em&gt;personal&lt;/em&gt; part, as the main purpose is to &lt;em&gt;vent&lt;/em&gt; and clarify my thoughts.&lt;/p&gt;

&lt;p&gt;Still, through &lt;strong&gt;Obsidian&lt;/strong&gt;’s &lt;em&gt;links&lt;/em&gt; and metadata annotations, I can add more data to the note. For example, I can write &lt;code&gt;(feeling:: excited)&lt;/code&gt;, and that will automatically add it to the &lt;em&gt;feelings&lt;/em&gt; list I mentioned earlier.&lt;/p&gt;

&lt;p&gt;Beyond that, it’s the part with the least &lt;em&gt;technical&lt;/em&gt; purpose, but it holds the most emotional importance.&lt;/p&gt;

&lt;h4&gt;
  
  
  🧠 Thoughts and Things Learned
&lt;/h4&gt;

&lt;p&gt;Every day, we learn something. This section shows me a &lt;em&gt;summary&lt;/em&gt; of all the notes that are &lt;em&gt;reflections&lt;/em&gt; or &lt;em&gt;knowledge&lt;/em&gt; I wrote down during the day, giving me greater visibility into everything I learned that day and might not be as &lt;em&gt;aware&lt;/em&gt; of.&lt;/p&gt;

&lt;h3&gt;
  
  
  📖 Conclusion
&lt;/h3&gt;

&lt;p&gt;Keeping a &lt;em&gt;journal&lt;/em&gt; in &lt;strong&gt;Obsidian&lt;/strong&gt; has not only helped me better organize my daily life but also reflect on my experiences, learn from my patterns, and appreciate the small things that sometimes go unnoticed. The interesting thing about this system is that it’s not static; I can adapt it to my needs, add new sections, or even simplify it if necessary.&lt;/p&gt;

&lt;p&gt;I’d love to know if you also keep some kind of &lt;em&gt;journaling&lt;/em&gt; or if you have any tips or ideas that could complement this approach. Is there anything you would add or change in a system like this? I’d love to hear about it! 😊&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>tooling</category>
      <category>obsidian</category>
    </item>
    <item>
      <title>✍️ Obsidian: Journaling</title>
      <dc:creator>Oscar Lopez</dc:creator>
      <pubDate>Thu, 12 Dec 2024 15:00:00 +0000</pubDate>
      <link>https://forem.com/oscareduardolp6/obsidian-journaling-3mp1</link>
      <guid>https://forem.com/oscareduardolp6/obsidian-journaling-3mp1</guid>
      <description>&lt;p&gt;Desde que tenía como 14 años, he encontrado muy &lt;em&gt;satisfactorio&lt;/em&gt;, &lt;em&gt;relajante&lt;/em&gt; y &lt;em&gt;desahogante&lt;/em&gt; tener un &lt;strong&gt;journal&lt;/strong&gt; donde anotar todo tipo de cosas que me ocurren a lo largo del día. Al principio, solo fue hacer un &lt;em&gt;resumen&lt;/em&gt; de lo que había pasado en el día: eventos importantes, sentimientos, etc.&lt;/p&gt;

&lt;p&gt;Con el tiempo, he ido cambiando la forma y las herramientas con las que lo hago. Primero lo hice en &lt;em&gt;OneNote&lt;/em&gt;, en una tableta que tenía cuando tenía &lt;em&gt;14 años&lt;/em&gt;. Después me cambié a &lt;em&gt;Journey&lt;/em&gt;, una app especializada en eso que te permitía agregar sentimientos y ese tipo de cosas. Al ver que estaba un poco &lt;em&gt;atado&lt;/em&gt; a la plataforma y, en ese momento, al dispositivo (pues no tenía una versión para computadora), me cambié a &lt;em&gt;Evernote&lt;/em&gt;. Ahí era más simple, pero me daba la ventaja de ser multiplataforma. Sin embargo, sentía que algo me faltaba.&lt;/p&gt;

&lt;p&gt;Un día, viendo un video en &lt;em&gt;YouTube&lt;/em&gt;, me topé con la existencia de &lt;em&gt;Roam Research&lt;/em&gt;, una app que te permitía organizar tus notas con enlaces. Esta idea me encantó, pero en ese momento estaba en &lt;em&gt;beta&lt;/em&gt; y no pude obtener &lt;em&gt;acceso&lt;/em&gt;. Eso me hizo sentir &lt;em&gt;decepcionado&lt;/em&gt;. Estuve investigando y buscando alternativas que cumplieran con esa misma capacidad: el poder &lt;em&gt;enlazar&lt;/em&gt; las cosas a forma de &lt;em&gt;grafo&lt;/em&gt;. Me costó mucho trabajo encontrar una opción similar; incluso &lt;em&gt;consideré&lt;/em&gt; &lt;em&gt;desarrollarla&lt;/em&gt; yo mismo (un pensamiento muy entusiasta tenía XD). Hasta que por fin me encontré con una solución que cubría todo lo que necesitaba: &lt;strong&gt;Obsidian&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Lo que voy a mostrar aquí es cómo, aprovechando todas las capacidades que tiene &lt;strong&gt;Obsidian&lt;/strong&gt;, he armado un sistema de &lt;em&gt;journaling&lt;/em&gt; que funciona para mí y que me permite tener el control de muchos de los &lt;em&gt;aspectos&lt;/em&gt; de mi vida.&lt;/p&gt;

&lt;h2&gt;
  
  
  🧩 Partes
&lt;/h2&gt;

&lt;p&gt;Mi &lt;em&gt;journal&lt;/em&gt; consta de muchas partes, cada una destinada a un aspecto importante en mi vida. En este artículo las voy a tocar por encima, pero si existe &lt;em&gt;interés&lt;/em&gt; en alguna en particular, no duden en mencionarlo y puedo extenderme más en ese tema.&lt;/p&gt;

&lt;h3&gt;
  
  
  🟦 Meta Info
&lt;/h3&gt;

&lt;p&gt;Al estar escrito en &lt;em&gt;Obsidian&lt;/em&gt;, por lo tanto en &lt;em&gt;Markdown&lt;/em&gt;, mis notas tienen una parte de &lt;em&gt;meta información&lt;/em&gt; donde registro cosas relevantes al día, pero que de otra forma me sería más complicado ingresar de una forma más &lt;em&gt;natural&lt;/em&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  💙 Sentimientos
&lt;/h4&gt;

&lt;p&gt;Creo que es bueno ser consciente de cómo nos sentimos a lo largo del día, más allá de &lt;em&gt;bien o mal&lt;/em&gt;. Me gusta tener esta parte para expresar con &lt;em&gt;palabras más precisas&lt;/em&gt; cómo me sentí a lo largo del día: si el día fue &lt;em&gt;estresante&lt;/em&gt;, si me sentí &lt;em&gt;abrumado&lt;/em&gt;, &lt;em&gt;preocupado&lt;/em&gt;, &lt;em&gt;emocionado&lt;/em&gt;, &lt;em&gt;cansado&lt;/em&gt;, etc.&lt;br&gt;&lt;br&gt;
Esto, además, me permite notar &lt;em&gt;patrones&lt;/em&gt; en mi comportamiento, ver en la mayoría de las veces qué es lo que me hace sentir abrumado o cómo me siento bajo ciertas situaciones. A su vez, sabiendo eso, gestiono mejor esas situaciones. Además, &lt;em&gt;promueve&lt;/em&gt; ser más &lt;em&gt;preciso&lt;/em&gt; al expresar nuestros sentimientos.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="p"&gt;---&lt;/span&gt;
sentimiento: 
&lt;span class="p"&gt;    -&lt;/span&gt; contento
&lt;span class="p"&gt;    -&lt;/span&gt; orgulloso
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Al tenerlo en la metadata de la nota, puedo hacer queries de qué días me sentí molesto, contento, orgulloso, etc.&lt;/p&gt;

&lt;h4&gt;
  
  
  😴 Sueño
&lt;/h4&gt;

&lt;p&gt;Una parte fundamental de mi vida es dormir. Lo disfruto mucho. Por mucho tiempo batallé para saber cuánto tiempo dormir, pues algunas veces con 8 horas me levantaba cansado y, con menos horas, me levantaba fresco. Esta parte me permite llevar un registro de tiempos y cosas que hago en las ocasiones que mejor descanso. Registro hora de dormir y hora de despertar, además de la calidad.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;sueno: 
    dormir: 
        hora: 23
        minuto: 30
    despertar: 
        hora: 7
        minuto: 30
    rating: 5
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Al igual que con los sentimientos, el tenerlo en la metadata me permite tener un tablero para promediar con cuánto tiempo de sueño descanso mejor.&lt;/p&gt;

&lt;h4&gt;
  
  
  🎆 Eventos importantes
&lt;/h4&gt;

&lt;p&gt;A todos nos ha pasado que alguna vez hablas con alguna amistad que te pregunta qué has hecho y te quedas en blanco. Has hecho muchas cosas en todo el tiempo que no se han visto, pero justo ahora no eres consciente de ello. Para mí, en esta parte anoto todas las cosas que creo que son dignas de contar en esas situaciones: un pequeño logro del trabajo, un avance en alguna meta de ejercicio, alguna comida nueva que hice, etc.&lt;/p&gt;

&lt;p&gt;Con esto luego tengo un tablero en el que puedo seleccionar un rango de fechas y ver qué son ese tipo de cosas que han pasado en ese rango de tiempo.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Tablero de Logros / Eventos 
  ## 📆🏆 Mes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  ```dataview 
  TABLE evento
  FROM #bitacora 
  AND !"Plantillas"
  WHERE length(evento) &amp;gt; 0 
  AND date(file.name, "dd-MM-yyyy").month &amp;gt;= 12
  AND date(file.name, "dd-MM-yyyy").year = 2024
  SORT date(file.name, "dd-MM-yyyy") DESC
  ```
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  🏷 Tags
&lt;/h4&gt;

&lt;p&gt;Por último, la parte más importante: los &lt;em&gt;tags&lt;/em&gt;. Estos me permiten, en primer lugar, saber que la nota que estoy escribiendo es parte de mi &lt;em&gt;journal&lt;/em&gt;, gracias al &lt;em&gt;tag&lt;/em&gt; &lt;code&gt;#journal&lt;/code&gt;. De esta forma, no importa dónde escriba la nota, sé que será considerada dentro de lo que es el &lt;em&gt;journal&lt;/em&gt;. Después de esa, hay varias etiquetas más y ahí estás limitado solo por lo que dicten tus necesidades, pero para mí son &lt;em&gt;2 las más importantes&lt;/em&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;#siesta&lt;/code&gt;: Como parte de mi &lt;em&gt;monitoreo&lt;/em&gt; de sueño, también es importante tener en cuenta qué días necesité tomar una siesta porque el cansancio fue mucho.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;#dolor_de_x&lt;/code&gt;: Marco con un tag cada que me siento mal de algo. Puede ser que me haya dolido la cabeza, el estómago, la espalda. Me gusta tener esa información por si evoluciona de una forma más &lt;em&gt;importante&lt;/em&gt; la &lt;em&gt;enfermedad&lt;/em&gt; o el &lt;em&gt;malestar&lt;/em&gt;. Además, también me permite encontrar patrones con respecto a qué comí o qué pasó los días que me sentí mal que podría haber influido en ese &lt;em&gt;malestar&lt;/em&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  🟧 Información Principal
&lt;/h3&gt;

&lt;p&gt;Esta parte ya está más en forma de &lt;em&gt;journal&lt;/em&gt; normal, salvo por algunas partes, pero es mucho más parte de lo que veo al revisar notas. Es más como el &lt;em&gt;contenido&lt;/em&gt; de la nota y lo &lt;em&gt;redacto&lt;/em&gt; de forma más &lt;em&gt;natural&lt;/em&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  💪 Ejercicio
&lt;/h4&gt;

&lt;p&gt;Esta parte no es &lt;em&gt;redactada de forma natural&lt;/em&gt;, sobre todo porque ni siquiera es algo que capturo en la nota del &lt;em&gt;journal&lt;/em&gt;. Toda la información relacionada con mi &lt;em&gt;ejercicio&lt;/em&gt; es una &lt;em&gt;metodología/sistema&lt;/em&gt; aparte que tengo intenciones de revisar en otro artículo.&lt;br&gt;&lt;br&gt;
Por ahora, lo que veo en la nota es un resumen de los ejercicios &lt;em&gt;realizados&lt;/em&gt;.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjrrsk2921o4x7gj3ise4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjrrsk2921o4x7gj3ise4.png" alt="Renderizado de mi resumen de ejercicios" width="789" height="378"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Y ya en cada nota &lt;em&gt;individual&lt;/em&gt; puedo encontrar la información completa de &lt;em&gt;repeticiones&lt;/em&gt;, variación, etc.&lt;/p&gt;

&lt;h4&gt;
  
  
  🥪 Comida
&lt;/h4&gt;

&lt;p&gt;En esta parte anoto mis comidas a lo largo del día para llevar el &lt;em&gt;track&lt;/em&gt; de los valores nutricionales de lo que he comido. De igual forma, este sistema ya lo revisé en el artículo de &lt;a href="https://oscarlp6.dev/blogs/nutrition-system-obsidian/" rel="noopener noreferrer"&gt;Obsidian: Nutrición 🔗&lt;/a&gt;. Ahí puedes ver el sistema al completo.  &lt;/p&gt;

&lt;p&gt;En general, anoto lo que comí y se me &lt;em&gt;despliega&lt;/em&gt; una tabla con los valores totales de mis &lt;em&gt;macronutrientes&lt;/em&gt; ingeridos.  &lt;/p&gt;

&lt;h4&gt;
  
  
  🚀 Proyectos
&lt;/h4&gt;

&lt;p&gt;La forma en la que &lt;em&gt;gestiono&lt;/em&gt; mis proyectos y &lt;em&gt;documento&lt;/em&gt; mis avances ya lo revisé en el artículo de &lt;a href="https://oscarlp6.dev/blogs/projects-obsidian/" rel="noopener noreferrer"&gt;Obsidian: Proyectos 🔗&lt;/a&gt;.  &lt;/p&gt;

&lt;p&gt;De forma &lt;em&gt;resumida&lt;/em&gt;, al igual que con el &lt;em&gt;ejercicio&lt;/em&gt;, aquí solo tengo una &lt;em&gt;query&lt;/em&gt; que me muestra las &lt;em&gt;tareas completadas&lt;/em&gt; en el día que estuvieron relacionadas con alguno de los proyectos en los que trabajo. Me da mayor &lt;em&gt;visibilidad&lt;/em&gt; de cómo voy avanzando en las cosas y cómo, de poco en poco, voy avanzando bastante.  &lt;/p&gt;

&lt;h4&gt;
  
  
  🙌 Agradecimientos
&lt;/h4&gt;

&lt;p&gt;Me gusta tener presente las cosas por las que estoy &lt;em&gt;agradecido&lt;/em&gt;, no de una forma &lt;em&gt;"mágica"&lt;/em&gt;, sino de una forma que me permita apreciar las cosas que algunas veces damos por hecho o que, en su momento, nos hacían mucha ilusión y después olvidamos lo &lt;em&gt;afortunados&lt;/em&gt; que somos por haberlas logrado.&lt;br&gt;&lt;br&gt;
Me esfuerzo mucho en llenar esta parte lo mejor posible cada día. Además, después puedo &lt;em&gt;recolectar&lt;/em&gt; todas las cosas en un &lt;em&gt;Tablero de agradecimientos&lt;/em&gt; que me recuerda, en &lt;em&gt;conjunto&lt;/em&gt;, todas las cosas por las que estoy agradecido.&lt;br&gt;&lt;br&gt;
Es muy útil para los &lt;em&gt;días complicados&lt;/em&gt;.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhprdbiqf5ad7ew9d588t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhprdbiqf5ad7ew9d588t.png" alt="Renderizado de mi listado de agradecimientos" width="214" height="234"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  ✅ Anti Todo List
&lt;/h4&gt;

&lt;p&gt;Normalmente acostumbramos tener una lista de tareas para ver qué es lo que tenemos que hacer a lo largo del día. Yo tengo la mía. Pero también, al final del día, me gusta revisar todas las tareas que logré. Me da una dosis de satisfacción ver todo en lo que avancé, que no está relacionado con proyectos, pero que también es muy valioso e importante, por ejemplo, limpiar la casa o lavar los trastes.  &lt;/p&gt;

&lt;p&gt;Como adición (y esto solo es una idea), puedes llevar algo similar de la gente con la que vives, no con el &lt;em&gt;afán&lt;/em&gt; de contar quién hace más, sino con el &lt;em&gt;afán&lt;/em&gt; de ser &lt;em&gt;consciente&lt;/em&gt; de todo lo que los demás hacen, que tal vez no siempre apreciamos lo suficiente.  &lt;/p&gt;

&lt;h4&gt;
  
  
  🏆 Reconocimientos
&lt;/h4&gt;

&lt;p&gt;Soy muy fan de la &lt;em&gt;cultura&lt;/em&gt; de reconocer a las personas. Creo que muchas veces esperamos a los momentos &lt;em&gt;adecuados&lt;/em&gt; o la &lt;em&gt;instancia adecuada&lt;/em&gt; para &lt;em&gt;reconocer&lt;/em&gt; a la gente. Por mi parte, procuro &lt;em&gt;reconocer&lt;/em&gt; lo más pronto y lo más &lt;em&gt;específico&lt;/em&gt; posible, para de verdad darle valor al reconocimiento. No me gustan nada las dinámicas donde se da apertura para dar &lt;em&gt;reconocimientos&lt;/em&gt; y la gente &lt;em&gt;"reconoce"&lt;/em&gt; a todos porque, por lo menos para mi &lt;em&gt;concepción&lt;/em&gt;, reconocer a todos de &lt;em&gt;forma vaga y general&lt;/em&gt; es lo mismo que no &lt;em&gt;reconocer a nadie&lt;/em&gt;.  &lt;/p&gt;

&lt;p&gt;Entonces, si puedo, me gusta &lt;em&gt;reconocerle&lt;/em&gt; a la persona lo más pronto posible, pero en caso de que no, y además para yo tener un &lt;em&gt;registro&lt;/em&gt; de las cosas valiosas de esa persona, voy registrando los &lt;em&gt;reconocimientos&lt;/em&gt; a las personas a lo largo del día.  &lt;/p&gt;

&lt;p&gt;Otra vez, aprovechando el poder de &lt;em&gt;dataview&lt;/em&gt;, utilizo estos listados para que cada reconocimiento aparezca en la nota de cada persona.  &lt;/p&gt;

&lt;h4&gt;
  
  
  ❤‍🔥 Entradas
&lt;/h4&gt;

&lt;p&gt;Aquí escribo eventos del día, pero con mucho más detalle: cosas que me gustaron, cómo me hicieron sentir, cosas que me molestaron, por qué me molestaron, cosas que me intrigan. Esta es la parte más &lt;em&gt;personal&lt;/em&gt;, pues el mayor propósito es &lt;em&gt;desahogarme&lt;/em&gt; y poder aclarar mis ideas.  &lt;/p&gt;

&lt;p&gt;De cualquier forma, a través de los &lt;em&gt;links&lt;/em&gt; de &lt;strong&gt;Obsidian&lt;/strong&gt; y de anotaciones de meta información, puedo agregar más datos a la nota. Por ejemplo, puedo escribir &lt;code&gt;(sentimiento:: emocionado)&lt;/code&gt; y eso automáticamente se agregará al listado de &lt;em&gt;sentimientos&lt;/em&gt; que hablé al principio.  &lt;/p&gt;

&lt;p&gt;Más allá de eso, es la parte que menos &lt;em&gt;propósito&lt;/em&gt; técnico tiene, pero es la que más importancia emocional tiene.  &lt;/p&gt;

&lt;h4&gt;
  
  
  🧠 Pensamientos y cosas aprendidas
&lt;/h4&gt;

&lt;p&gt;Todos los días aprendemos algo. Esta sección me muestra un &lt;em&gt;resumen&lt;/em&gt; de todas las notas que son &lt;em&gt;reflexiones&lt;/em&gt; o &lt;em&gt;conocimientos&lt;/em&gt; que anoté a lo largo del día, dándome mayor visibilidad de todo lo que aprendí ese día y que tal vez no soy tan &lt;em&gt;consciente&lt;/em&gt;.  &lt;/p&gt;

&lt;h3&gt;
  
  
  📖 Conclusión
&lt;/h3&gt;

&lt;p&gt;Llevar un &lt;em&gt;journal&lt;/em&gt; en &lt;strong&gt;Obsidian&lt;/strong&gt; no solo me ha ayudado a organizar mejor mi día a día, sino también a reflexionar sobre mis experiencias, aprender de mis patrones y apreciar más las pequeñas cosas que a veces pasan desapercibidas. Lo interesante de este sistema es que no es estático; puedo adaptarlo según mis necesidades, añadir nuevas secciones o incluso simplificarlo si lo necesito.&lt;/p&gt;

&lt;p&gt;Me encantaría saber si tú también llevas algún tipo de &lt;em&gt;journaling&lt;/em&gt; o si tienes algún truco o idea que podría complementar este enfoque. ¿Hay algo que agregarías o cambiarías en un sistema como este? ¡Me encantaría leerlo! 😊&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>tooling</category>
      <category>obsidian</category>
    </item>
    <item>
      <title>🗺 Remote Work</title>
      <dc:creator>Oscar Lopez</dc:creator>
      <pubDate>Wed, 04 Dec 2024 18:06:00 +0000</pubDate>
      <link>https://forem.com/oscareduardolp6/remote-work-476d</link>
      <guid>https://forem.com/oscareduardolp6/remote-work-476d</guid>
      <description>&lt;p&gt;The &lt;em&gt;Covid-19&lt;/em&gt; pandemic marked a turning point in how many companies perceive work. Although it was a global tragedy with countless losses, it also forced organizations to explore alternative schemes, such as remote work, which previously seemed unfeasible for many sectors. This change not only transformed the workplace dynamics for companies but also had a significant impact on the lives of workers.&lt;/p&gt;

&lt;p&gt;In my case, the shift to remote work arose out of necessity rather than choice. During the peak of the pandemic, I worked in an office, but after moving out of my parents' house, transportation difficulties became a significant &lt;em&gt;obstacle&lt;/em&gt;. Without a car and with a limited salary, I depended on my parents' help to get to work, which made me question my &lt;em&gt;independence&lt;/em&gt;. It was then that I found a remote job opportunity, which not only solved my transportation issues but also allowed me to achieve true &lt;em&gt;autonomy&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;This new setup gave me the freedom to choose where to live without worrying about proximity to the workplace. It also removed barriers that limited my ability to balance personal and professional needs. Since that experience, I have been certain that remote work is not just a preference but a lifestyle that has provided me with benefits that would be nearly impossible to achieve in a traditional in-person setup.&lt;/p&gt;

&lt;p&gt;In this article, I will explore the many advantages of remote work, from the independence it provides to the opportunities it creates for improving quality of life.&lt;/p&gt;

&lt;h2&gt;
  
  
  ✅ Advantages of Remote Work
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;🚗 No commute time&lt;/strong&gt;: I don’t have to add the time spent commuting to and from the office to my workday. That time can be used for activities I truly value, like spending time with my partner, family, or friends, sleeping a little longer, exercising, or simply relaxing.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;🖥️ Control over the &lt;em&gt;setup&lt;/em&gt;&lt;/strong&gt;: Having my office at home allows me to customize my workspace according to my needs. My chair and desk are the ones I find most comfortable, and I can constantly improve my &lt;em&gt;setup&lt;/em&gt; because it’s mine. This not only improves my comfort but also &lt;em&gt;indirectly&lt;/em&gt; benefits my employer since I use this personal infrastructure to work more efficiently.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;⏳ Working more without commitment&lt;/strong&gt;: If a special occasion demands it, I feel more willing to stay a little longer working since being at home doesn’t take me away from my loved ones or personal activities. In an in-person setup, this extra time would mean sacrificing much more, making me less likely to agree to it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;🌱 Better quality of life&lt;/strong&gt;: Not spending time commuting allows me to dedicate myself to things that are more important to me, like eating healthier, exercising, sleeping better, learning something new, or simply enjoying activities that truly enrich my daily life.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;🔒 Safer&lt;/strong&gt;: In a country where insecurity is a constant problem, avoiding traveling around the city with a laptop gives me peace of mind. I prefer staying at home, where I feel safer and less exposed to unnecessary risks.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;🤓 Better focus for introverts&lt;/strong&gt;: Many engineers, myself included, work better without interruptions. At home, I can have &lt;em&gt;focused lapses&lt;/em&gt; without the physical distractions of an office. While this reduces casual conversations, the impact on performance is clearly positive.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;👨‍👩‍👧 Connection with family&lt;/strong&gt;: Staying home allows me to be more present for my family. I can enjoy small moments, like having a meal together or simply spending time with them, which would be impossible in an in-person setup.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;🥗 Better nutrition&lt;/strong&gt;: Working from home gives me access to my kitchen, allowing me to prepare healthier meals and save on eating out. This positively impacts both my health and my budget.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;💡 Trust in employees&lt;/strong&gt;: As Spotify said, employees are not children. If a company doesn’t trust its team, the problem isn’t remote work; it’s the company culture. Physical control doesn’t ensure performance, but trust does.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;🌍 Broader talent pool&lt;/strong&gt;: An in-person setup limits the talent you can access since you can only hire those who live nearby or are willing to relocate. Companies that offer remote work have access to a global talent pool and don’t need to spend extra to compete with companies that already allow it.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  ❎ Disadvantages of Remote Work
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;🤝 Less team unity&lt;/strong&gt;: Building a strong culture is harder because parallel cultures often arise: one for in-person employees and one for remote workers.&lt;br&gt;&lt;br&gt;
&lt;em&gt;Solution&lt;/em&gt;: Create an inclusive culture that can be appreciated by both remote and in-office workers. This includes documenting processes, sharing important anecdotes with the entire team, and organizing virtual activities to foster camaraderie.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;💬 Less spontaneous communication&lt;/strong&gt;: The lack of casual interactions limits informal conversations that could spark ideas or quickly solve problems.&lt;br&gt;&lt;br&gt;
&lt;em&gt;Solution&lt;/em&gt;: Encourage informal virtual communication spaces, such as dedicated channels on platforms like Slack, or quick, agenda-free meetings.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;🏠 Difficulty disconnecting&lt;/strong&gt;: Working from home makes it easy to fall into the habit of working extra hours or not setting clear boundaries.&lt;br&gt;&lt;br&gt;
&lt;em&gt;Solution&lt;/em&gt;: Set strict schedules and, if possible, have a separate workspace to mark the difference between work and personal life.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;📉 Feeling of isolation&lt;/strong&gt;: Some employees may feel disconnected from the team or the organization.&lt;br&gt;&lt;br&gt;
&lt;em&gt;Solution&lt;/em&gt;: Conduct regular check-ins with employees, prioritize meetings where the whole team is visible, and schedule integration activities that include everyone.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;📡 Dependence on technology&lt;/strong&gt;: Internet outages or technical problems can disrupt workflow.&lt;br&gt;&lt;br&gt;
&lt;em&gt;Solution&lt;/em&gt;: Provide employees with necessary tools, such as backup connections (e.g., portable modems) and accessible tech support.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;🧩 Difficulty integrating new employees&lt;/strong&gt;: New hires may take longer to adapt without direct interaction with the team.&lt;br&gt;&lt;br&gt;
&lt;em&gt;Solution&lt;/em&gt;: Develop a well-structured remote onboarding plan with assigned mentors and clear documentation to facilitate adaptation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;📊 Harder to supervise work progress&lt;/strong&gt;: The lack of physical interaction can make some leaders insecure about their team’s activities.&lt;br&gt;&lt;br&gt;
&lt;em&gt;Solution&lt;/em&gt;: Build a culture of trust based on rigorous selection processes and confidence in the employees’ capabilities. Recognize that employees are not children, and if someone abuses this trust, take immediate action to prevent it from affecting the rest of the team.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;👩‍🏫 Less informal learning&lt;/strong&gt;: In an office, it’s easier to learn by observing others, something that doesn’t happen naturally in remote work.&lt;br&gt;&lt;br&gt;
&lt;em&gt;Solution&lt;/em&gt;: Organize virtual coworking sessions or share recordings of important meetings to encourage peer learning.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;😓 Harder to handle conflicts&lt;/strong&gt;: Discussions can be more challenging to resolve without face-to-face communication.&lt;br&gt;&lt;br&gt;
&lt;em&gt;Solution&lt;/em&gt;: Train leaders in virtual conflict resolution and promote an environment of respect and clarity in written communication.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;🔄 Resistance to change&lt;/strong&gt;: Some companies or employees may struggle to adapt to remote work, creating initial friction.&lt;br&gt;&lt;br&gt;
&lt;em&gt;Solution&lt;/em&gt;: Provide training on remote work tools and highlight the benefits this setup offers to both the team and the organization.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  📖 Conclusion
&lt;/h2&gt;

&lt;p&gt;Remote work is not just a passing trend; it represents a shift in how we understand and execute our responsibilities. While it has its challenges, these can be addressed with conscious strategies that strengthen trust, communication, and team culture, without losing sight of the benefits this setup offers.&lt;/p&gt;

&lt;p&gt;The advantages are clear: greater flexibility, access to global talent, better quality of life for employees, and, in many cases, superior performance. Adapting to remote work is not just a way to meet modern expectations but also an opportunity to build stronger, more motivated, and productive teams.&lt;/p&gt;

&lt;p&gt;What do you think about remote work? Have you experienced its benefits or faced its challenges? I’d love to hear your experiences and perspectives in the comments. Let’s talk about the future of work! 🌍✨&lt;/p&gt;

</description>
      <category>management</category>
      <category>remote</category>
    </item>
    <item>
      <title>🗺 Trabajo remoto</title>
      <dc:creator>Oscar Lopez</dc:creator>
      <pubDate>Wed, 04 Dec 2024 18:00:00 +0000</pubDate>
      <link>https://forem.com/oscareduardolp6/trabajo-remoto-196</link>
      <guid>https://forem.com/oscareduardolp6/trabajo-remoto-196</guid>
      <description>&lt;p&gt;La pandemia de &lt;em&gt;Covid-19&lt;/em&gt; marcó un punto de inflexión en la manera en que muchas empresas conciben el trabajo. Aunque fue una tragedia global con innumerables pérdidas, también forzó a las organizaciones a explorar esquemas alternativos, como el trabajo remoto, que antes parecían inviables para muchos sectores. Este cambio no solo transformó la dinámica laboral de las empresas, sino que también tuvo un impacto significativo en la vida de los trabajadores.&lt;/p&gt;

&lt;p&gt;En mi caso, el cambio al trabajo remoto surgió como una necesidad antes que como una elección. Durante el punto más alto de la pandemia, trabajaba de manera presencial en una oficina, pero al mudarme de casa de mis padres, las dificultades para transportarme se convirtieron en un &lt;em&gt;obstáculo&lt;/em&gt; importante. Sin un coche y con un salario limitado, dependía del apoyo de mis padres para llegar al trabajo, lo que me hizo cuestionar mi &lt;em&gt;independencia&lt;/em&gt;. Fue entonces cuando encontré una oportunidad de empleo remoto, lo que no solo resolvió mis problemas de transporte, sino que también me permitió alcanzar una verdadera &lt;em&gt;autonomía&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Este nuevo esquema me dio la libertad de elegir dónde vivir sin preocuparme por la cercanía al lugar de trabajo. Además, eliminó barreras que limitaban mi capacidad de equilibrar mis necesidades personales con las laborales. Desde esa experiencia, tengo claro que el trabajo remoto no es solo una preferencia, sino un estilo de vida que me ha otorgado ventajas que difícilmente podría lograr en un esquema tradicional presencial.&lt;/p&gt;

&lt;p&gt;En este artículo, exploraré las múltiples ventajas del trabajo remoto, desde la independencia que brinda hasta las posibilidades que abre para mejorar la calidad de vida.&lt;/p&gt;

&lt;h2&gt;
  
  
  ✅ Ventajas del trabajo remoto
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;🚗 No tiempos de traslado&lt;/strong&gt;: No tengo que sumarle al horario laboral el tiempo que gasto yendo y viniendo de la oficina. Ese tiempo lo puedo invertir en actividades que realmente valoro, como pasar tiempo con mi pareja, familia o amigos, dormir un poco más, hacer ejercicio o simplemente relajarme.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;🖥️ Control sobre el &lt;em&gt;setup&lt;/em&gt;&lt;/strong&gt;: Tener mi oficina en casa me permite personalizar mi espacio de trabajo según mis necesidades. Mi silla y escritorio son los que considero más cómodos, y puedo mejorar mi &lt;em&gt;setup&lt;/em&gt; constantemente porque es mío. Esto no solo mejora mi comodidad, sino que &lt;em&gt;indirectamente&lt;/em&gt; también beneficia a mi empleador, ya que aprovecho esta infraestructura personal para trabajar de forma más eficiente.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;⏳ Trabajar más sin compromiso&lt;/strong&gt;: Si alguna ocasión especial lo amerita, me siento más dispuesto a quedarme un poco más tiempo trabajando, ya que estar en casa no me aleja de mis seres queridos ni de mis actividades personales. En un esquema presencial, este tiempo extra implica sacrificar mucho más, lo que hace menos probable que acepte hacerlo.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;🌱 Mejor calidad de vida&lt;/strong&gt;: Al no gastar tiempo en transporte, puedo dedicarme a cosas más importantes para mí, como cuidar mi alimentación, hacer ejercicio, dormir mejor, aprender algo nuevo o simplemente disfrutar de actividades que realmente enriquecen mi día a día.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;🔒 Más seguro&lt;/strong&gt;: En un país donde la inseguridad es un problema constante, evitar transportarme con una computadora por la ciudad me da tranquilidad. Prefiero quedarme en casa, donde me siento más seguro y menos expuesto a riesgos innecesarios.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;🤓 Mayor enfoque para los introvertidos&lt;/strong&gt;: Muchos ingenieros, incluyéndome, trabajamos mejor sin interrupciones. En casa puedo tener &lt;em&gt;lapsos&lt;/em&gt; de atención plena sin las distracciones físicas de una oficina. Aunque esto reduce las conversaciones casuales, a nivel de rendimiento el impacto es positivo.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;👨‍👩‍👧 Conexión con la familia&lt;/strong&gt;: Estar en casa me permite estar más presente para mi familia. Puedo disfrutar pequeños momentos, como una comida juntos o simplemente compartir tiempo, que serían imposibles en un esquema presencial.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;🥗 Mejor alimentación&lt;/strong&gt;: Al trabajar desde casa, tengo acceso a mi cocina, lo que me permite preparar comidas más saludables y ahorrar en alimentos fuera de casa. Esto impacta positivamente tanto mi salud como mi presupuesto.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;💡 Confianza en los empleados&lt;/strong&gt;: Como dijo Spotify, los empleados no son niños. Si una empresa no confía en su equipo, el problema no es el trabajo &lt;em&gt;remoto&lt;/em&gt;, sino la cultura de la empresa. El control físico no asegura el rendimiento, la confianza sí.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;🌍 Ampliación del talento disponible&lt;/strong&gt;: Un esquema presencial limita el talento al que puedes acceder, ya que solo puedes contratar a quienes viven cerca o están dispuestos a mudarse. Las empresas que ofrecen trabajo remoto tienen acceso a una base de talento global y, además, no necesitan gastar más para competir con compañías que ya lo permiten.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  ❎ Contras
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;🤝 Menos unidad en el equipo&lt;/strong&gt;: Es más difícil construir una cultura sólida porque suelen surgir dos culturas paralelas: la presencial y la remota.&lt;br&gt;&lt;br&gt;
&lt;em&gt;Solución&lt;/em&gt;: Crear una cultura inclusiva que pueda ser apreciada tanto por quienes están en remoto como por quienes están en la oficina. Esto incluye documentar procesos, compartir anécdotas importantes con todo el equipo y realizar actividades virtuales que fomenten la camaradería.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;💬 Menor comunicación espontánea&lt;/strong&gt;: La falta de interacciones casuales limita las conversaciones informales que pueden generar ideas o resolver problemas rápidamente.&lt;br&gt;&lt;br&gt;
&lt;em&gt;Solución&lt;/em&gt;: Fomentar espacios de comunicación informal virtual, como canales dedicados en plataformas como Slack o reuniones rápidas sin agenda para mantener esas interacciones.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;🏠 Dificultad para desconectarse&lt;/strong&gt;: Al trabajar desde casa, es fácil caer en el hábito de trabajar más horas o no establecer límites claros.&lt;br&gt;&lt;br&gt;
&lt;em&gt;Solución&lt;/em&gt;: Definir horarios estrictos y tener un espacio de trabajo separado, si es posible, para marcar la diferencia entre el trabajo y la vida personal.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;📉 Sensación de aislamiento&lt;/strong&gt;: Algunos empleados pueden sentirse desconectados del equipo o de la organización en general.&lt;br&gt;&lt;br&gt;
&lt;em&gt;Solución&lt;/em&gt;: Realizar check-ins regulares con los empleados, priorizar reuniones en las que se vea a todo el equipo y programar dinámicas de integración que incluyan a todos.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;📡 Dependencia tecnológica&lt;/strong&gt;: Si la conexión a internet falla o hay problemas técnicos, puede afectar el flujo de trabajo.&lt;br&gt;&lt;br&gt;
&lt;em&gt;Solución&lt;/em&gt;: Proveer a los empleados de herramientas necesarias, como conexiones secundarias (por ejemplo, un modem portátil) y soporte técnico accesible.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;🧩 Dificultad para integrar nuevos empleados&lt;/strong&gt;: Los nuevos integrantes pueden tardar más en adaptarse sin una interacción directa con el equipo.&lt;br&gt;&lt;br&gt;
&lt;em&gt;Solución&lt;/em&gt;: Crear un plan de onboarding remoto bien estructurado, con mentores asignados y documentación clara para facilitar la adaptación.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;📊 Más difícil supervisar el progreso del trabajo&lt;/strong&gt;: La falta de interacción física puede generar inseguridad en algunos líderes sobre las actividades del equipo.&lt;br&gt;&lt;br&gt;
&lt;em&gt;Solución&lt;/em&gt;: Construir una cultura de confianza basada en el hecho de que los empleados pasaron por un proceso de selección riguroso y están capacitados para realizar su trabajo. Reconocer que los empleados no son niños y confiar en ellos es clave. Si alguien abusa de esa confianza, tomar acciones inmediatas para evitar que afecte al resto del equipo.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;👩‍🏫 Menos aprendizaje informal&lt;/strong&gt;: En la oficina es más fácil aprender al observar a otros, algo que no ocurre de forma natural en remoto.&lt;br&gt;&lt;br&gt;
&lt;em&gt;Solución&lt;/em&gt;: Organizar sesiones de coworking virtual o compartir grabaciones de reuniones importantes para fomentar el aprendizaje entre compañeros.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;😓 Más difícil manejar conflictos&lt;/strong&gt;: Las discusiones pueden ser más complicadas de resolver sin comunicación cara a cara.&lt;br&gt;&lt;br&gt;
&lt;em&gt;Solución&lt;/em&gt;: Capacitar a los líderes en resolución de conflictos virtual y promover un ambiente de respeto y claridad en la comunicación escrita.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;🔄 Resistencia al cambio&lt;/strong&gt;: Algunas empresas o empleados pueden tener dificultad para adaptarse al remoto, creando fricciones iniciales.&lt;br&gt;&lt;br&gt;
&lt;em&gt;Solución&lt;/em&gt;: Ofrecer capacitación sobre las herramientas de trabajo remoto y aclarar los beneficios que este esquema aporta al equipo y a la organización.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  📖 Conclusión
&lt;/h2&gt;

&lt;p&gt;El trabajo remoto no es solo una tendencia pasajera; representa un cambio en la manera en que entendemos y ejecutamos nuestras responsabilidades laborales. Aunque tiene desafíos, estos pueden resolverse con estrategias conscientes que fortalezcan la confianza, la comunicación y la cultura del equipo, sin renunciar a los beneficios que este esquema ofrece.&lt;/p&gt;

&lt;p&gt;Las ventajas son claras: mayor flexibilidad, acceso a talento global, mejor calidad de vida para los empleados y, en muchos casos, un rendimiento superior. Adaptarse al trabajo remoto no solo es una forma de estar a la altura de las expectativas modernas, sino también una oportunidad para construir equipos más fuertes, motivados y productivos.&lt;/p&gt;

&lt;p&gt;¿Qué opinas tú sobre el trabajo remoto? ¿Has experimentado sus ventajas o enfrentado alguno de sus desafíos? Me encantaría conocer tus experiencias y puntos de vista en los comentarios. ¡Hablemos sobre el futuro del trabajo! 🌍✨&lt;/p&gt;

</description>
      <category>management</category>
      <category>remote</category>
    </item>
    <item>
      <title>✍️ Code Comments</title>
      <dc:creator>Oscar Lopez</dc:creator>
      <pubDate>Mon, 16 Sep 2024 03:00:00 +0000</pubDate>
      <link>https://forem.com/oscareduardolp6/code-comments-45le</link>
      <guid>https://forem.com/oscareduardolp6/code-comments-45le</guid>
      <description>&lt;p&gt;Recently, I came across this &lt;a href="https://dev.to/grantdotdev/code-comments-are-not-evil-20o9?utm_source=pocket_shared"&gt;other article&lt;/a&gt; where the author talks about when it’s appropriate to use &lt;em&gt;comments&lt;/em&gt; in &lt;em&gt;code&lt;/em&gt;, and when it’s not. It's a great article, and I recommend checking it out, even though I don’t fully agree with some of the points made.&lt;br&gt;&lt;br&gt;
In this article, I’ll try to give my take on using comments, when to use them, when not to, alternatives, and the reasoning behind each decision. &lt;/p&gt;
&lt;h2&gt;
  
  
  🗣 More Explicit Code
&lt;/h2&gt;

&lt;p&gt;In my case, I think of comments as a way to give &lt;em&gt;context&lt;/em&gt; to the people reading your code, but they should not be used to &lt;em&gt;explain&lt;/em&gt; the way you &lt;em&gt;implemented&lt;/em&gt; the logic. If the &lt;em&gt;implementation&lt;/em&gt; of the logic requires comments, you’re likely not being &lt;em&gt;expressive enough&lt;/em&gt; in your code. I believe it’s part of our &lt;em&gt;responsibility&lt;/em&gt; to make sure the &lt;em&gt;code&lt;/em&gt; &lt;strong&gt;"explains"&lt;/strong&gt; itself, even if that means being overly &lt;em&gt;explicit&lt;/em&gt; in some aspects.  &lt;/p&gt;

&lt;p&gt;For instance, if I have this code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;calculateTaxes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;income&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;personType&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;taxRate&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;personType&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="c1"&gt;// Is Moral Person &lt;/span&gt;
        &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="mf"&gt;0.3&lt;/span&gt; &lt;span class="c1"&gt;// Tax rate for moral person &lt;/span&gt;
        &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.2&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// Tax rate for natural person &lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;income&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;taxRate&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; 
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It has several comments that could &lt;em&gt;easily&lt;/em&gt; be &lt;em&gt;replaced&lt;/em&gt; by better variable naming and typing, rendering those comments &lt;em&gt;useless&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;A better approach might look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;calculateTaxes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;income&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;personType&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;PersonTypeEnum&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;taxRate&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;personType&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nx"&gt;PersonTypeEnum&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;MoralPerson&lt;/span&gt; 
        &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="nx"&gt;TAX_RATE_MORAL_PERSON&lt;/span&gt; 
        &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;TAX_RATE_NATURAL_PERSON&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; 
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;income&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;taxRate&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; 
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Looking at it now, our function might have more code, but it now &lt;em&gt;explains&lt;/em&gt; itself.  &lt;/p&gt;

&lt;h2&gt;
  
  
  🧰 Maintenance
&lt;/h2&gt;

&lt;p&gt;Another advantage of writing code that explains itself is that it’s safer and easier to maintain. It’s &lt;em&gt;very common&lt;/em&gt;, and actually happens often, that comments become &lt;em&gt;outdated&lt;/em&gt; relative to the code, which means the explanation in the comment no longer makes sense in the context of the function or class.  &lt;/p&gt;

&lt;h2&gt;
  
  
  🌍 Context
&lt;/h2&gt;

&lt;p&gt;A good way to use comments is to explain &lt;em&gt;why&lt;/em&gt; certain code is doing something, rather than &lt;em&gt;what&lt;/em&gt; it does. For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;calculateDiscount&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;product&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Product&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;product&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;category&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;smartphone&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// Smartphones has 0 discount&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;product&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;price&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;0.2&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  ❎ Good
&lt;/h3&gt;

&lt;p&gt;In this example, even though the comment might seem &lt;em&gt;"good"&lt;/em&gt;, it actually doesn’t add any value. Simply by reading the &lt;em&gt;code&lt;/em&gt;, we already know that &lt;em&gt;smartphones&lt;/em&gt; have no discount, but the real question we have is why? This is important for respecting the business rule, but the comment doesn’t help with that. It just gives us the information we would already get from reading the code.&lt;/p&gt;

&lt;h3&gt;
  
  
  ✔ Better
&lt;/h3&gt;

&lt;p&gt;A better use of comments would be to explain &lt;em&gt;why&lt;/em&gt; smartphones don’t get a discount, for example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;calculateDiscount&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;product&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Product&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;product&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;category&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;smartphones&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// Since smartphones are now made to order, they cannot have any discounts &lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;product&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;price&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;0.2&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This comment gives us much more information and helps us understand why that business rule exists.&lt;br&gt;&lt;br&gt;
This is just an example, I know this code could be improved in terms of semantics and clarity, but I’ll leave that as an exercise for the reader XD.&lt;/p&gt;

&lt;h2&gt;
  
  
  ⚰ Dead Code
&lt;/h2&gt;

&lt;p&gt;A &lt;em&gt;very bad&lt;/em&gt; practice I’ve encountered in my work is &lt;em&gt;commenting&lt;/em&gt; out code to &lt;em&gt;remove&lt;/em&gt; it. In my opinion, this is not acceptable. In the long run, it makes the code much harder to read. Without proper &lt;em&gt;syntax highlighting&lt;/em&gt;, it’s easy to lose track of where you’re working, and you might end up editing commented-out code. Plus, it just adds &lt;em&gt;noise&lt;/em&gt; by showing old implementations that can interfere with new ideas.&lt;br&gt;&lt;br&gt;
Today, there’s no need to do this. If we need to recover a piece of code, we can &lt;em&gt;rely&lt;/em&gt; on &lt;em&gt;git&lt;/em&gt; or another version control system. So please, stop doing that.&lt;/p&gt;

&lt;h2&gt;
  
  
  ✅ &lt;code&gt;TODO&lt;/code&gt; Comments
&lt;/h2&gt;

&lt;p&gt;The kind of comment you leave when there’s a missing functionality isn’t necessarily a bad comment &lt;em&gt;per se&lt;/em&gt;, but it can cause problems if it’s forgotten and makes its way into &lt;em&gt;production&lt;/em&gt;. Personally, I’d recommend having a &lt;em&gt;CI/CD&lt;/em&gt; system that checks for all those &lt;code&gt;TODO&lt;/code&gt;s and creates specific &lt;em&gt;issues&lt;/em&gt;, so nothing gets left &lt;em&gt;behind&lt;/em&gt;.  &lt;/p&gt;

&lt;h2&gt;
  
  
  👀 Important Considerations
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;When I talk about comments, I’m referring to those we use to explain things or even to prevent certain parts of the code from being executed, but I’m not including comments that are part of the documentation.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  📖 Conclusion
&lt;/h2&gt;

&lt;p&gt;In general, there is no &lt;em&gt;golden rule&lt;/em&gt; for comments; it all depends on what you’re working on. But I think these recommendations can help you get rid of bad habits you may not even be aware of, and overall improve the way you write code.&lt;/p&gt;

&lt;p&gt;If you have any thoughts, questions, or feedback, feel free to leave them in the comments, and I’d be happy to discuss them.&lt;/p&gt;

</description>
      <category>cleancode</category>
      <category>cleancoding</category>
    </item>
    <item>
      <title>✍️ Comentarios</title>
      <dc:creator>Oscar Lopez</dc:creator>
      <pubDate>Sun, 15 Sep 2024 15:00:00 +0000</pubDate>
      <link>https://forem.com/oscareduardolp6/comentarios-371</link>
      <guid>https://forem.com/oscareduardolp6/comentarios-371</guid>
      <description>&lt;p&gt;Recientemente me topé con este &lt;a href="https://dev.to/grantdotdev/code-comments-are-not-evil-20o9?utm_source=pocket_shared"&gt;otro artículo&lt;/a&gt; en el que habla acerca de cuándo es adecuado y cuándo no utilizar &lt;em&gt;comentarios&lt;/em&gt; en el &lt;em&gt;código&lt;/em&gt;, es un gran artículo y recomiendo que vayan a echarle un vistazo, a pesar de eso, aunque no coincido con algunos de los puntos que describe. &lt;br&gt;
En este artículo intentaré dar mi versión de los hechos acerca de utilizar comentarios, cuándo sí, cuándo no, alternativas y el porqué de cada de una de estas decisiones. &lt;/p&gt;
&lt;h2&gt;
  
  
  🗣 Código más explícito
&lt;/h2&gt;

&lt;p&gt;En mi caso, yo pienso en los comentarios como una forma de dar &lt;em&gt;contexto&lt;/em&gt; a la gente que lee tu código, más no debe de ser una forma de &lt;em&gt;explicar&lt;/em&gt; la forma en la que &lt;em&gt;implementaste&lt;/em&gt; la lógica, si la &lt;em&gt;implementacion&lt;/em&gt; de la lógica requiere agregar comentarios, lo más probable es que no estás siendo lo &lt;em&gt;suficientemente&lt;/em&gt; expresivo en tu código, ya que creo que parte de nuestra &lt;em&gt;responsabilidad&lt;/em&gt; es que el &lt;em&gt;código&lt;/em&gt; se &lt;strong&gt;"explique"&lt;/strong&gt; a sí mismo, incluso si esto &lt;em&gt;implica&lt;/em&gt; ser excesivamente &lt;em&gt;explícito&lt;/em&gt; en algunos aspectos. &lt;/p&gt;

&lt;p&gt;Es decir, si tengo este codigo:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;calculateTaxes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;income&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;personType&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;taxRate&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;personType&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="c1"&gt;// Is Moral Person &lt;/span&gt;
        &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="mf"&gt;0.3&lt;/span&gt; &lt;span class="c1"&gt;// Tax rate for moral person &lt;/span&gt;
        &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.2&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// Tax rate for natural person &lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;income&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;taxRate&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; 
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Tiene varios comentarios que &lt;em&gt;fácilmente&lt;/em&gt; podrían ser &lt;em&gt;reemplazados&lt;/em&gt; por un mejor nombramiento de variables y tipado, dejando &lt;em&gt;inútiles&lt;/em&gt; a esos comentarios. &lt;/p&gt;

&lt;p&gt;Un mejor enfoque sería algo como esto:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;calculateTaxes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;income&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;personType&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;PersonTypeEnum&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;taxRate&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;personType&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nx"&gt;PersonTypeEnum&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;MoralPerson&lt;/span&gt; 
        &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="nx"&gt;TAX_RATE_MORAL_PERSON&lt;/span&gt; 
        &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;TAX_RATE_NATURAL_PERSON&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; 
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;income&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;taxRate&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; 
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Viéndolo así, es posible que nuestra función ahora tenga más código pero ahora se &lt;em&gt;explica&lt;/em&gt; a sí mismo. &lt;/p&gt;

&lt;h2&gt;
  
  
  🧰 Mantenimiento
&lt;/h2&gt;

&lt;p&gt;Otra ventaja de hacer que el código se explique a sí mismo, es que es más seguro y fácil de mantener, ya que es muy &lt;em&gt;sencillo&lt;/em&gt; y de hecho ocurre mucho, que los comentarios queden &lt;em&gt;desactualizados&lt;/em&gt; con respecto al código de forma que lo que explique el comentario no tenga mucho sentido con respecto a la función o clase. &lt;/p&gt;

&lt;h2&gt;
  
  
  🌍 Contexto
&lt;/h2&gt;

&lt;p&gt;Una buena manera de usar los comentarios es no explicar el &lt;em&gt;qué&lt;/em&gt; hace cierta parte del código sino el &lt;em&gt;porqué&lt;/em&gt; lo hace, por ejemplo.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;calculateDiscount&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;product&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Product&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;product&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;category&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;smartphone&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// Smartphones has 0 discount&lt;/span&gt;
    &lt;span class="nx"&gt;product&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;price&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;0.2&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  ❎ Bien
&lt;/h3&gt;

&lt;p&gt;En este ejemplo, aunque el comentario podría parecer que está &lt;em&gt;"bien"&lt;/em&gt;, la realidad es que no nos aporta nada, simplemente leyendo el &lt;em&gt;código&lt;/em&gt; nosotros ya podemos saber que los &lt;em&gt;smartphones&lt;/em&gt; tienen cero descuento, pero la pregunta que tenemos es el porque, para también respetar esa regla de negocios, pero el comentario no nos ayuda con eso, se limita a darnos la información que obtendríamos leyendo el código. &lt;/p&gt;

&lt;h3&gt;
  
  
  ✔ Mejor
&lt;/h3&gt;

&lt;p&gt;Una mejor forma de utilizar los comentarios, sería para explicar el &lt;em&gt;porqué&lt;/em&gt; los &lt;em&gt;smartphones&lt;/em&gt; no tienen descuento, por ejemplo:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;calculateDiscount&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;product&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Product&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;product&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;category&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;smartphones&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// Since smartphones are now made to order, they cannot have any discounts &lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;product&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;price&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;0.2&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; 
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Este comentario nos da mucha más información y nos da mucho más idea de el porqué esa regla de negocio. &lt;br&gt;
Esto es parte del ejemplo, sé que este código podría mejorar en semántica y claridad , pero eso se queda como ejercicio para el lector XD.  &lt;/p&gt;

&lt;h2&gt;
  
  
  ⚰ Código muerto
&lt;/h2&gt;

&lt;p&gt;Una &lt;em&gt;muy mala&lt;/em&gt; práctica que me he encontrado en mi trabajo es el &lt;em&gt;comentar&lt;/em&gt; el código para &lt;em&gt;eliminar&lt;/em&gt; código, por mi parte, esto no es nada considerable, a la larga hace mucho más complicado de leer el código, sin el adecuado &lt;em&gt;resaltado&lt;/em&gt; de &lt;em&gt;sintaxis&lt;/em&gt; es muy sencillo de perder la concepción de dónde estar trabajando y puede que estés editando código comentado, y solo agrega &lt;em&gt;ruido&lt;/em&gt; pudiendo ver viejas implementaciones de algo y dejando que estas se cuelen a las nuevas ideas. &lt;br&gt;
Hoy en día ya no es necesario hacer ese tipo de cosas, si necesitamos recuperar una pieza de código podemos &lt;em&gt;recurrir&lt;/em&gt; a &lt;em&gt;git&lt;/em&gt; o algún sistema de control de versiones, así que por favor dejen de hacer eso. &lt;/p&gt;

&lt;h2&gt;
  
  
  ✅ Comentario &lt;code&gt;TODO&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;El tipo de comentario que dejas cuándo te falta implementar una funcionalidad, no es un comentario malo &lt;em&gt;per se&lt;/em&gt;, pero sí que puede desencadenar cosas muy malas si se olvida que se puso y llega a &lt;em&gt;producción&lt;/em&gt;, en lo personal yo recomendaría tener un sistema de &lt;em&gt;CI/CD&lt;/em&gt; que se encargue de revisar todos esos &lt;code&gt;TODO&lt;/code&gt; y crear los &lt;em&gt;issues&lt;/em&gt; especificos, para que nada se quede en el &lt;em&gt;olvido&lt;/em&gt;. &lt;/p&gt;

&lt;h2&gt;
  
  
  👀 Consideraciones importantes
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Cuándo hablo de comentarios, me refiero a los comentarios que utilizamos para explicar o incluso para evitar que cierta parte del código sea ejecutado, pero no incluye los comentarios que forman parte de la documentación del código.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  📖 Conclusión
&lt;/h2&gt;

&lt;p&gt;En general, no existe una &lt;em&gt;regla de oro&lt;/em&gt; acerca de los comentarios, todo a va a depender mucho de lo que estés haciendo, pero creo que estas recomendaciones te pueden servir si quieres irte quitando malas prácticas de las que tal vez no eres consciente y de forma &lt;em&gt;transversal&lt;/em&gt;, mejorar la forma en la que escribes tu código. &lt;/p&gt;

&lt;p&gt;Si tienes alguna consideración, duda o reclamos, dejala en los comentarios y con gusto podremos hablar de ello. &lt;/p&gt;

</description>
      <category>cleancode</category>
    </item>
  </channel>
</rss>
