<?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>DEV Community: Tu codigo cotidiano</title>
    <description>The latest articles on DEV Community by Tu codigo cotidiano (@tu_codigocotidiano_f173d).</description>
    <link>https://dev.to/tu_codigocotidiano_f173d</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3375057%2Ffa90e872-13fe-4a57-b3d6-e75515a50879.png</url>
      <title>DEV Community: Tu codigo cotidiano</title>
      <link>https://dev.to/tu_codigocotidiano_f173d</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tu_codigocotidiano_f173d"/>
    <language>en</language>
    <item>
      <title>Python Dictionaries and Sets: Organize Named Data and Remove Duplicates</title>
      <dc:creator>Tu codigo cotidiano</dc:creator>
      <pubDate>Tue, 21 Jul 2026 16:44:17 +0000</pubDate>
      <link>https://dev.to/tu_codigocotidiano_f173d/python-dictionaries-and-sets-organize-named-data-and-remove-duplicates-4kc4</link>
      <guid>https://dev.to/tu_codigocotidiano_f173d/python-dictionaries-and-sets-organize-named-data-and-remove-duplicates-4kc4</guid>
      <description>&lt;p&gt;When we start learning Python, lists are often one of the first data structures we use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;student&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Laura&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;24&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Medellín&lt;/span&gt;&lt;span class="sh"&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 works, but what does each position represent?&lt;/p&gt;

&lt;p&gt;We need to remember that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Position &lt;code&gt;0&lt;/code&gt; contains the name.&lt;/li&gt;
&lt;li&gt;Position &lt;code&gt;1&lt;/code&gt; contains the age.&lt;/li&gt;
&lt;li&gt;Position &lt;code&gt;2&lt;/code&gt; contains the city.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A dictionary provides a clearer alternative because every value is identified by a descriptive key.&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating a dictionary
&lt;/h2&gt;

&lt;p&gt;A dictionary stores information as key-value pairs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;student&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;name&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Laura&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;age&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;24&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;city&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Medellín&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Instead of asking for the value at position &lt;code&gt;0&lt;/code&gt;, we can ask directly for the value associated with &lt;code&gt;"name"&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;student&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;name&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Laura
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A useful way to remember the difference is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A list position tells you where a value is. A dictionary key tells you what the value means.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Updating and adding information
&lt;/h2&gt;

&lt;p&gt;Python dictionaries are mutable, so their content can change after creation.&lt;/p&gt;

&lt;p&gt;To update an existing value:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;product&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;name&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Keyboard&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;price&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;120000&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="n"&gt;product&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;price&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;110000&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To add a new key-value pair, use the same syntax with a key that does not exist yet:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;product&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;available&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The resulting dictionary is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;name&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Keyboard&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;price&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;110000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;available&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Safely reading values with &lt;code&gt;get()&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;Using square brackets requires the key to exist:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;student&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;email&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If &lt;code&gt;"email"&lt;/code&gt; is missing, Python raises a &lt;code&gt;KeyError&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;get()&lt;/code&gt; method provides a safer alternative:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;student&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;email&lt;/span&gt;&lt;span class="sh"&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 returns &lt;code&gt;None&lt;/code&gt; when the key is missing.&lt;/p&gt;

&lt;p&gt;You can also define a default value:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;student&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;email&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Not registered&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Not registered
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To check whether a key exists, use the &lt;code&gt;in&lt;/code&gt; operator:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;city&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;student&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;student&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;city&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Keys, values, and pairs
&lt;/h2&gt;

&lt;p&gt;Python provides three useful dictionary methods:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;course&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;name&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Python Basics&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;duration&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;4 weeks&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;format&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Online&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;course&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;keys&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;course&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;values&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;course&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;items&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;They provide different views of the same information:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;keys()&lt;/code&gt; returns the keys.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;values()&lt;/code&gt; returns the stored values.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;items()&lt;/code&gt; returns complete key-value pairs.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Looping through a dictionary
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;items()&lt;/code&gt; method is especially useful when working with a &lt;code&gt;for&lt;/code&gt; loop:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;capitals&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Colombia&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Bogotá&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Peru&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Lima&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Argentina&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Buenos Aires&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;country&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;capital&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;capitals&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;items&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;country&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;capital&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Colombia: Bogotá
Peru: Lima
Argentina: Buenos Aires
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;During every iteration, Python assigns the current key to &lt;code&gt;country&lt;/code&gt; and its associated value to &lt;code&gt;capital&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a set?
&lt;/h2&gt;

&lt;p&gt;A set is a collection that stores unique values.&lt;/p&gt;

&lt;p&gt;Consider this list:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;languages&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Python&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Rust&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Python&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;JavaScript&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Rust&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We can remove repeated values by converting it into a set:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;unique_languages&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;languages&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;unique_languages&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The set keeps only one occurrence of each language.&lt;/p&gt;

&lt;p&gt;Sets are useful when you need to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Remove duplicate values.&lt;/li&gt;
&lt;li&gt;Check whether a value is present.&lt;/li&gt;
&lt;li&gt;Compare groups of elements.&lt;/li&gt;
&lt;li&gt;Work with unique categories or identifiers.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Unlike lists, sets do not support indexes or slicing.&lt;/p&gt;

&lt;h2&gt;
  
  
  An important detail
&lt;/h2&gt;

&lt;p&gt;Empty braces create an empty dictionary:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;empty_dictionary&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To create an empty set, use &lt;code&gt;set()&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;empty_set&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is a common source of confusion for Python beginners.&lt;/p&gt;

&lt;h2&gt;
  
  
  Which structure should you choose?
&lt;/h2&gt;

&lt;p&gt;Use a &lt;strong&gt;list&lt;/strong&gt; when position and order are important.&lt;/p&gt;

&lt;p&gt;Use a &lt;strong&gt;dictionary&lt;/strong&gt; when every value should have a descriptive name.&lt;/p&gt;

&lt;p&gt;Use a &lt;strong&gt;set&lt;/strong&gt; when you need unique values and repetitions do not matter.&lt;/p&gt;

&lt;p&gt;Understanding this distinction makes programs easier to read, maintain, and extend.&lt;/p&gt;

&lt;p&gt;The original Spanish guide includes a step-by-step explanation with additional examples:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://tucodigocotidiano.yarumaltech.com/leer_guias/diccionarios-y-conjuntos-datos-con-nombre-y-sin-duplicados/" rel="noopener noreferrer"&gt;https://tucodigocotidiano.yarumaltech.com/leer_guias/diccionarios-y-conjuntos-datos-con-nombre-y-sin-duplicados/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What was more confusing when you first learned Python: dictionaries or sets?&lt;/p&gt;

</description>
      <category>python</category>
      <category>beginners</category>
      <category>programming</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Python Lists and Tuples for Beginners: Organize Data Step by Step</title>
      <dc:creator>Tu codigo cotidiano</dc:creator>
      <pubDate>Thu, 16 Jul 2026 11:46:35 +0000</pubDate>
      <link>https://dev.to/tu_codigocotidiano_f173d/python-lists-and-tuples-for-beginners-organize-data-step-by-step-1mid</link>
      <guid>https://dev.to/tu_codigocotidiano_f173d/python-lists-and-tuples-for-beginners-organize-data-step-by-step-1mid</guid>
      <description>&lt;p&gt;When you start learning Python, storing information in individual variables feels natural:&lt;/p&gt;

&lt;p&gt;student_1 = "Ana"&lt;br&gt;
student_2 = "Luis"&lt;br&gt;
student_3 = "Marta"&lt;/p&gt;

&lt;p&gt;However, this approach becomes difficult to maintain as the amount of information grows.&lt;/p&gt;

&lt;p&gt;Python lists allow us to group related values inside a single ordered collection:&lt;/p&gt;

&lt;p&gt;students = ["Ana", "Luis", "Marta"]&lt;/p&gt;

&lt;p&gt;Now we can access each element using its index:&lt;/p&gt;

&lt;p&gt;print(students[0])   # Ana&lt;br&gt;
print(students[-1])  # Marta&lt;/p&gt;

&lt;p&gt;Because lists are mutable, their elements can be updated after creation:&lt;/p&gt;

&lt;p&gt;students[1] = "Carlos"&lt;/p&gt;

&lt;p&gt;We can also add new information using append() or insert():&lt;/p&gt;

&lt;p&gt;students.append("Laura")&lt;br&gt;
students.insert(1, "Daniel")&lt;/p&gt;

&lt;p&gt;To remove elements, Python provides methods such as remove() and pop():&lt;/p&gt;

&lt;p&gt;students.remove("Ana")&lt;br&gt;
removed_student = students.pop(1)&lt;/p&gt;

&lt;p&gt;Lists can also be inspected without modifying them:&lt;/p&gt;

&lt;p&gt;print(len(students))&lt;br&gt;
print("Laura" in students)&lt;br&gt;
print("Pedro" not in students)&lt;/p&gt;

&lt;p&gt;Another useful operation is slicing, which lets us obtain part of a list:&lt;/p&gt;

&lt;p&gt;numbers = [10, 20, 30, 40, 50]&lt;/p&gt;

&lt;p&gt;print(numbers[1:4])&lt;br&gt;
print(numbers[:3])&lt;br&gt;
print(numbers[3:])&lt;/p&gt;

&lt;p&gt;Lists are ideal when the information may change. Tuples, on the other hand, are useful when the values should remain stable.&lt;/p&gt;

&lt;p&gt;Understanding both structures is an essential step toward building cleaner programs, processing collections of data, and working with loops, functions, APIs, and databases.&lt;/p&gt;

&lt;p&gt;I created a practical, beginner-friendly guide explaining these concepts step by step, with examples in Spanish.&lt;/p&gt;

&lt;p&gt;📖 Read the complete guide:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://tucodigocotidiano.yarumaltech.com/leer_guias/listas-y-tuplas-organiza-informacion-en-orden/" rel="noopener noreferrer"&gt;https://tucodigocotidiano.yarumaltech.com/leer_guias/listas-y-tuplas-organiza-informacion-en-orden/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What was the first real project where you needed to use a Python list?&lt;/p&gt;

</description>
      <category>python</category>
      <category>beginners</category>
      <category>tutorial</category>
      <category>programming</category>
    </item>
    <item>
      <title>Python Strings From Scratch: Learn to Make Your Programs Communicate</title>
      <dc:creator>Tu codigo cotidiano</dc:creator>
      <pubDate>Wed, 15 Jul 2026 11:46:17 +0000</pubDate>
      <link>https://dev.to/tu_codigocotidiano_f173d/python-strings-from-scratch-learn-to-make-your-programs-communicate-25a1</link>
      <guid>https://dev.to/tu_codigocotidiano_f173d/python-strings-from-scratch-learn-to-make-your-programs-communicate-25a1</guid>
      <description>&lt;p&gt;Programming is not only about performing calculations. A useful program must also be able to display names, instructions, states and results that people can understand.&lt;/p&gt;

&lt;p&gt;I published a new Spanish guide in TuCódigoCotidiano explaining how strings work in Python from the ground up.&lt;/p&gt;

&lt;p&gt;In this guide, you will learn:&lt;/p&gt;

&lt;p&gt;What a string and the str data type are&lt;br&gt;
How to use single and double quotes&lt;br&gt;
How Python organizes characters through indexes&lt;br&gt;
How to access the first and last characters&lt;br&gt;
How to extract fragments using slicing&lt;br&gt;
How to concatenate and repeat text&lt;br&gt;
How to build clearer messages in your programs&lt;/p&gt;

&lt;p&gt;The explanations are accompanied by practical code examples that you can copy, run and modify while learning.&lt;/p&gt;

&lt;p&gt;Numbers allow programs to calculate. Strings allow programs to communicate.&lt;/p&gt;

&lt;p&gt;Read the complete guide in Spanish:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://tucodigocotidiano.yarumaltech.com/leer_guias/cadenas-de-texto-aprende-a-conversar-con-python/" rel="noopener noreferrer"&gt;https://tucodigocotidiano.yarumaltech.com/leer_guias/cadenas-de-texto-aprende-a-conversar-con-python/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>beginners</category>
      <category>programming</category>
      <category>spanish</category>
    </item>
    <item>
      <title>How to Build a Smart Android Compass with Kotlin, Jetpack Compose, and Sensor Fusion</title>
      <dc:creator>Tu codigo cotidiano</dc:creator>
      <pubDate>Mon, 13 Jul 2026 15:23:22 +0000</pubDate>
      <link>https://dev.to/tu_codigocotidiano_f173d/how-to-build-a-smart-android-compass-with-kotlin-jetpack-compose-and-sensor-fusion-551k</link>
      <guid>https://dev.to/tu_codigocotidiano_f173d/how-to-build-a-smart-android-compass-with-kotlin-jetpack-compose-and-sensor-fusion-551k</guid>
      <description>&lt;p&gt;A compass app sounds simple: read an angle from the phone and rotate a needle.&lt;/p&gt;

&lt;p&gt;Real sensors make the problem much more interesting.&lt;/p&gt;

&lt;p&gt;The measurements contain noise, the phone can rotate between portrait and landscape, nearby objects can affect the magnetometer, and angles cannot always be processed like ordinary numbers.&lt;/p&gt;

&lt;p&gt;I explored these challenges by building &lt;strong&gt;SmartCompass&lt;/strong&gt;, an Android application created with Kotlin and Jetpack Compose.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5jx677fle9hpj8wlqw3y.jpeg" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5jx677fle9hpj8wlqw3y.jpeg" alt="SmartCompass Android application showing the compass heading, cardinal direction, magnetic field strength, and calibration status" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What the application does
&lt;/h2&gt;

&lt;p&gt;SmartCompass combines the phone's accelerometer and magnetometer to calculate its magnetic orientation.&lt;/p&gt;

&lt;p&gt;The application can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Calculate a magnetic heading between 0° and 359°.&lt;/li&gt;
&lt;li&gt;Convert the heading into a cardinal direction.&lt;/li&gt;
&lt;li&gt;Calculate pitch and roll.&lt;/li&gt;
&lt;li&gt;Smooth accelerometer and magnetometer measurements.&lt;/li&gt;
&lt;li&gt;Stabilize the final heading.&lt;/li&gt;
&lt;li&gt;Correct the coordinate system when the screen rotates.&lt;/li&gt;
&lt;li&gt;Measure magnetic field strength in microteslas.&lt;/li&gt;
&lt;li&gt;Build a local magnetic reference.&lt;/li&gt;
&lt;li&gt;Detect persistent changes relative to that reference.&lt;/li&gt;
&lt;li&gt;Report the magnetometer accuracy and calibration state.&lt;/li&gt;
&lt;li&gt;Handle devices without the required sensors.&lt;/li&gt;
&lt;li&gt;Start and stop sensor collection according to the Android lifecycle.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It does not require GPS or location permissions because it displays &lt;strong&gt;magnetic north&lt;/strong&gt;, not geographic north.&lt;/p&gt;

&lt;h2&gt;
  
  
  The circular-angle problem
&lt;/h2&gt;

&lt;p&gt;One of the most interesting problems appears when the compass crosses north.&lt;/p&gt;

&lt;p&gt;Consider these two measurements:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;359°
1°
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A regular arithmetic mean produces:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(359 + 1) / 2 = 180°
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That result points south, even though both measurements are close to north.&lt;/p&gt;

&lt;p&gt;Angles form a circle rather than an infinite line. After 359°, the next direction is 0°. A heading filter must therefore understand circular distance.&lt;/p&gt;

&lt;p&gt;SmartCompass converts every angle into a two-dimensional unit vector:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;x = cos(angle)
y = sin(angle)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The vectors can be averaged, and the resulting direction can be recovered with &lt;code&gt;atan2()&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;This produces a value close to 0° for samples around 359° and 1°, avoiding the sudden jump to 180°.&lt;/p&gt;

&lt;h2&gt;
  
  
  Filtering the sensor measurements
&lt;/h2&gt;

&lt;p&gt;The application uses two different filtering strategies.&lt;/p&gt;

&lt;p&gt;First, a low-pass filter smooths the X, Y, and Z components received from the accelerometer and magnetometer:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;yₜ = αyₜ₋₁ + (1 − α)xₜ
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A larger &lt;code&gt;alpha&lt;/code&gt; produces a smoother but slower response. A smaller value reacts faster but preserves more noise.&lt;/p&gt;

&lt;p&gt;The filtered vectors are then used to calculate the device orientation.&lt;/p&gt;

&lt;p&gt;A second circular filter stabilizes the final heading. Keeping these responsibilities separate prevents a linear filter from being incorrectly applied to circular values.&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding magnetic reliability
&lt;/h2&gt;

&lt;p&gt;Displaying a number is not enough. The application should also communicate whether that number can be trusted.&lt;/p&gt;

&lt;p&gt;SmartCompass uses two sources of information:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The accuracy level reported by Android.&lt;/li&gt;
&lt;li&gt;Changes in magnetic field strength relative to a local baseline.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;During the first samples, the application learns an approximate reference for the current environment. Later measurements are compared with this baseline.&lt;/p&gt;

&lt;p&gt;A single unusual sample does not immediately trigger a warning. The change must persist across several readings. Recovery also requires multiple normal readings, preventing the interface from constantly switching between warning and normal states.&lt;/p&gt;

&lt;p&gt;This mechanism is educational and adaptive. It cannot identify the source of a magnetic change or replace professional measuring equipment.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keeping the domain logic independent
&lt;/h2&gt;

&lt;p&gt;The mathematical and calibration components do not depend directly on Android or Jetpack Compose.&lt;/p&gt;

&lt;p&gt;Classes responsible for tasks such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Normalizing angles.&lt;/li&gt;
&lt;li&gt;Finding the shortest angular difference.&lt;/li&gt;
&lt;li&gt;Converting headings into cardinal directions.&lt;/li&gt;
&lt;li&gt;Filtering vectors.&lt;/li&gt;
&lt;li&gt;Filtering circular values.&lt;/li&gt;
&lt;li&gt;Evaluating calibration.&lt;/li&gt;
&lt;li&gt;Analyzing magnetic measurements.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;can be tested with local unit tests.&lt;/p&gt;

&lt;p&gt;Sensor access is exposed through an abstraction, while the presentation layer receives application-specific models instead of raw &lt;code&gt;SensorManager&lt;/code&gt; events.&lt;/p&gt;

&lt;p&gt;This separation makes the code easier to understand, test, and extend.&lt;/p&gt;

&lt;h2&gt;
  
  
  A compass is more than a rotating needle
&lt;/h2&gt;

&lt;p&gt;The most valuable lesson from this project is that applications working with physical measurements should expose uncertainty and state, not only a final value.&lt;/p&gt;

&lt;p&gt;A useful compass should not merely say:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Heading: 23°
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It should also be able to explain:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Direction: Northeast
Accuracy: Medium
Magnetic field: 43.2 μT
Calibration: Acceptable
Reading status: Ready
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That additional context helps the user understand when the measurement is stable and when the environment or sensor may require attention.&lt;/p&gt;

&lt;p&gt;I documented the complete implementation step by step, including the Android project structure, sensor processing, circular filters, calibration models, magnetic analysis, Compose interface, lifecycle management, and testing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Read the complete tutorial
&lt;/h2&gt;

&lt;p&gt;The full tutorial is available in Spanish:&lt;/p&gt;

&lt;p&gt;👉 &lt;a href="https://tucodigocotidiano.yarumaltech.com/leer_tutoriales/construye-una-brujula-inteligente-en-android-con-kotlin-y-jetpack-compose/" rel="noopener noreferrer"&gt;Build a Smart Compass on Android with Kotlin and Jetpack Compose&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What other smartphone sensor would you use for your next Android experiment?&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxohc5a1ed8rmspf6c20g.jpeg" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxohc5a1ed8rmspf6c20g.jpeg" alt=" " width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>android</category>
      <category>kotlin</category>
      <category>jetpackcompose</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Bucles en Python: aprende for, while y range desde cero</title>
      <dc:creator>Tu codigo cotidiano</dc:creator>
      <pubDate>Thu, 09 Jul 2026 21:10:19 +0000</pubDate>
      <link>https://dev.to/tu_codigocotidiano_f173d/bucles-en-python-aprende-for-while-y-range-desde-cero-58pc</link>
      <guid>https://dev.to/tu_codigocotidiano_f173d/bucles-en-python-aprende-for-while-y-range-desde-cero-58pc</guid>
      <description>&lt;p&gt;Cuando empiezas a aprender Python, una de las primeras señales de avance es dejar de copiar el mismo código muchas veces.&lt;/p&gt;

&lt;p&gt;Ahí aparecen los bucles.&lt;/p&gt;

&lt;p&gt;Un bucle permite repetir instrucciones de forma automática. En lugar de escribir varias veces la misma línea, le dices a Python qué debe repetir y bajo qué regla debe hacerlo.&lt;/p&gt;

&lt;h2&gt;
  
  
  Primer ejemplo con &lt;code&gt;for&lt;/code&gt;
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;numero&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;numero&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Este código muestra los números del 1 al 5.&lt;/p&gt;

&lt;p&gt;La parte importante está aquí:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="nf"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;En Python, el valor final de &lt;code&gt;range()&lt;/code&gt; funciona como límite, pero no se incluye. Por eso &lt;code&gt;range(1, 6)&lt;/code&gt; llega hasta 5.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;code&gt;for&lt;/code&gt; también puede recorrer datos
&lt;/h2&gt;

&lt;p&gt;Un &lt;code&gt;for&lt;/code&gt; no solo sirve para contar. También puede recorrer elementos uno por uno:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;tareas&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;comprar&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;empacar&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;enviar&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;tarea&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;tareas&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Pendiente:&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;tarea&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Esto es útil cuando tienes datos parecidos: tareas, productos, nombres, mensajes o pedidos.&lt;/p&gt;

&lt;h2&gt;
  
  
  ¿Y qué hace &lt;code&gt;while&lt;/code&gt;?
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;while&lt;/code&gt; repite un bloque mientras una condición siga siendo verdadera.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;contador&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;

&lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="n"&gt;contador&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;contador&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;contador&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;contador&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;En este caso, el contador empieza en 1 y aumenta en cada vuelta. Cuando llega a un valor mayor que 5, la condición deja de cumplirse y el bucle termina.&lt;/p&gt;

&lt;h2&gt;
  
  
  Regla sencilla
&lt;/h2&gt;

&lt;p&gt;Usa &lt;code&gt;for&lt;/code&gt; cuando tienes una secuencia o una cantidad clara de repeticiones.&lt;/p&gt;

&lt;p&gt;Usa &lt;code&gt;while&lt;/code&gt; cuando la repetición depende de una condición.&lt;/p&gt;

&lt;h2&gt;
  
  
  Errores comunes
&lt;/h2&gt;

&lt;p&gt;Al empezar con bucles, estos errores son normales:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;olvidar los dos puntos &lt;code&gt;:&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;no indentar el bloque&lt;/li&gt;
&lt;li&gt;pensar que &lt;code&gt;range(1, 6)&lt;/code&gt; llega hasta 6&lt;/li&gt;
&lt;li&gt;no actualizar el contador en un &lt;code&gt;while&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;copiar manualmente código que podría ir dentro de un bucle&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Mini reto
&lt;/h2&gt;

&lt;p&gt;Crea una lista de pedidos y recórrela con &lt;code&gt;for&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;pedidos&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Pedido 1&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Pedido 2&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Pedido 3&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;pedido&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;pedidos&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Revisando:&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;pedido&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Todos los pedidos fueron revisados&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Guía completa
&lt;/h2&gt;

&lt;p&gt;Publiqué una guía más visual y paso a paso en TuCodigoCotidiano:&lt;/p&gt;

&lt;p&gt;👉 &lt;a href="https://tucodigocotidiano.yarumaltech.com/leer_guias/bucles-for-y-while-el-arte-de-repetir-sin-cansarse/" rel="noopener noreferrer"&gt;https://tucodigocotidiano.yarumaltech.com/leer_guias/bucles-for-y-while-el-arte-de-repetir-sin-cansarse/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;La idea es que una persona principiante pueda pasar de:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Estoy copiando el mismo código varias veces”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;a:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Puedo usar un bucle para repetir una tarea automáticamente”.&lt;/p&gt;
&lt;/blockquote&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxqgzy7biithbt3lzp13i.jpeg" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxqgzy7biithbt3lzp13i.jpeg" alt=" " width="800" height="566"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>beginners</category>
      <category>tutorial</category>
      <category>spanish</category>
    </item>
    <item>
      <title>Condicionales en Python: enseña a tu programa a tomar decisiones</title>
      <dc:creator>Tu codigo cotidiano</dc:creator>
      <pubDate>Thu, 09 Jul 2026 03:01:04 +0000</pubDate>
      <link>https://dev.to/tu_codigocotidiano_f173d/condicionales-en-python-ensena-a-tu-programa-a-tomar-decisiones-5pp</link>
      <guid>https://dev.to/tu_codigocotidiano_f173d/condicionales-en-python-ensena-a-tu-programa-a-tomar-decisiones-5pp</guid>
      <description>&lt;h1&gt;
  
  
  Condicionales en Python: enseña a tu programa a tomar decisiones
&lt;/h1&gt;

&lt;p&gt;Cuando una persona empieza a aprender Python, normalmente aprende primero a guardar datos, hacer operaciones y mostrar resultados.&lt;/p&gt;

&lt;p&gt;Pero hay un momento clave en el aprendizaje:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;cuando el programa deja de hacer siempre lo mismo y empieza a tomar decisiones.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Para eso existen los condicionales.&lt;/p&gt;

&lt;p&gt;En esta guía explico los condicionales desde cero, con ejemplos pensados para principiantes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Qué aprenderás
&lt;/h2&gt;

&lt;p&gt;En la guía se explica:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;qué es un condicional;&lt;/li&gt;
&lt;li&gt;qué es una condición;&lt;/li&gt;
&lt;li&gt;qué significan &lt;code&gt;True&lt;/code&gt; y &lt;code&gt;False&lt;/code&gt;;&lt;/li&gt;
&lt;li&gt;cómo usar &lt;code&gt;if&lt;/code&gt;;&lt;/li&gt;
&lt;li&gt;cómo usar &lt;code&gt;else&lt;/code&gt;;&lt;/li&gt;
&lt;li&gt;cómo usar &lt;code&gt;elif&lt;/code&gt;;&lt;/li&gt;
&lt;li&gt;cómo evitar errores comunes;&lt;/li&gt;
&lt;li&gt;y cómo resolver un mini reto práctico.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Ejemplo básico
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;edad&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;17&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;edad&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;18&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Puedes entrar&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Aún no puedes entrar&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;La idea es que Python revise una condición y decida qué bloque de código debe ejecutar.&lt;/p&gt;

&lt;h2&gt;
  
  
  Por qué es importante
&lt;/h2&gt;

&lt;p&gt;Los condicionales son una de las bases de la programación.&lt;/p&gt;

&lt;p&gt;Permiten crear programas que reaccionan a los datos, por ejemplo:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;validar una edad;&lt;/li&gt;
&lt;li&gt;aplicar un descuento;&lt;/li&gt;
&lt;li&gt;mostrar un mensaje diferente;&lt;/li&gt;
&lt;li&gt;elegir entre varios caminos;&lt;/li&gt;
&lt;li&gt;tomar decisiones a partir de resultados calculados.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Guía completa
&lt;/h2&gt;

&lt;p&gt;Puedes leer la guía completa aquí:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://tucodigocotidiano.yarumaltech.com/leer_guias/condicionales-ensena-a-tu-programa-a-tomar-decisiones/" rel="noopener noreferrer"&gt;https://tucodigocotidiano.yarumaltech.com/leer_guias/condicionales-ensena-a-tu-programa-a-tomar-decisiones/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Si estás empezando con Python, esta guía te ayuda a pasar de “Python calcula” a “Python decide”.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fooopw90io3wpjdjz4rqw.jpeg" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fooopw90io3wpjdjz4rqw.jpeg" alt=" " width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>beginners</category>
      <category>programming</category>
      <category>spanish</category>
    </item>
    <item>
      <title>I built Deception Mesh: an open-source Rust MVP for defensive cybersecurity telemetry</title>
      <dc:creator>Tu codigo cotidiano</dc:creator>
      <pubDate>Wed, 08 Jul 2026 21:06:08 +0000</pubDate>
      <link>https://dev.to/tu_codigocotidiano_f173d/i-built-deception-mesh-an-open-source-rust-mvp-for-defensive-cybersecurity-telemetry-2co3</link>
      <guid>https://dev.to/tu_codigocotidiano_f173d/i-built-deception-mesh-an-open-source-rust-mvp-for-defensive-cybersecurity-telemetry-2co3</guid>
      <description>&lt;p&gt;I just published &lt;strong&gt;Deception Mesh&lt;/strong&gt;, an open-source cybersecurity MVP built in Rust.&lt;/p&gt;

&lt;p&gt;Project page: &lt;a href="https://tucodigocotidiano.yarumaltech.com/proyectos/deception-mesh/" rel="noopener noreferrer"&gt;https://tucodigocotidiano.yarumaltech.com/proyectos/deception-mesh/&lt;/a&gt;&lt;br&gt;&lt;br&gt;
GitHub: &lt;a href="https://github.com/tucodigocotidiano/deception-mesh" rel="noopener noreferrer"&gt;https://github.com/tucodigocotidiano/deception-mesh&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I built it
&lt;/h2&gt;

&lt;p&gt;Most small projects and learning environments think about security only after something goes wrong.&lt;/p&gt;

&lt;p&gt;Firewalls, authentication and monitoring are important, but there is another useful defensive idea:&lt;/p&gt;

&lt;p&gt;What if we could deploy small decoy services that are not real production systems, but can help us observe suspicious behavior?&lt;/p&gt;

&lt;p&gt;That is the core idea behind Deception Mesh.&lt;/p&gt;

&lt;p&gt;Instead of exposing only real services, the project uses lightweight decoy sensors that can capture suspicious HTTP and SSH activity and turn it into structured telemetry.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Deception Mesh does
&lt;/h2&gt;

&lt;p&gt;Deception Mesh is a defensive MVP.&lt;/p&gt;

&lt;p&gt;It is not an offensive tool.&lt;/p&gt;

&lt;p&gt;It does not try to exploit systems.&lt;/p&gt;

&lt;p&gt;It does not provide attack automation.&lt;/p&gt;

&lt;p&gt;Its purpose is to help observe suspicious interactions against decoy services and make those events easier to inspect.&lt;/p&gt;

&lt;p&gt;The MVP includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;HTTP decoy sensor&lt;/li&gt;
&lt;li&gt;SSH decoy sensor&lt;/li&gt;
&lt;li&gt;REST API&lt;/li&gt;
&lt;li&gt;JWT authentication&lt;/li&gt;
&lt;li&gt;Role-based access control&lt;/li&gt;
&lt;li&gt;Webhook notifications&lt;/li&gt;
&lt;li&gt;CSV export&lt;/li&gt;
&lt;li&gt;Docker deployment&lt;/li&gt;
&lt;li&gt;Documentation for local execution and testing&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The technical idea
&lt;/h2&gt;

&lt;p&gt;The project is based on a simple flow:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A suspicious client interacts with a decoy service.&lt;/li&gt;
&lt;li&gt;The sensor captures the event.&lt;/li&gt;
&lt;li&gt;The system stores or exposes the event as structured telemetry.&lt;/li&gt;
&lt;li&gt;The operator can review the signal through logs, CSV exports, API responses or webhook notifications.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The goal is not to replace enterprise security platforms.&lt;/p&gt;

&lt;p&gt;The goal is to show that a small, understandable and auditable deception layer can be built with practical software engineering.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Rust
&lt;/h2&gt;

&lt;p&gt;I chose Rust because it is a strong fit for infrastructure-oriented security projects.&lt;/p&gt;

&lt;p&gt;It gives a good balance between performance, memory safety and explicit design.&lt;/p&gt;

&lt;p&gt;For a project that handles network-facing components, Rust also encourages discipline around error handling, data structures and system boundaries.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I wanted to prove
&lt;/h2&gt;

&lt;p&gt;With this MVP, I wanted to validate four things:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A deception-based security concept can be implemented without building a huge platform.&lt;/li&gt;
&lt;li&gt;Rust can be used to create small defensive sensors with clean architecture.&lt;/li&gt;
&lt;li&gt;Security telemetry can be made understandable for developers and students.&lt;/li&gt;
&lt;li&gt;A project can be useful even when its scope is intentionally limited.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That last point matters.&lt;/p&gt;

&lt;p&gt;This is not presented as a finished commercial product.&lt;/p&gt;

&lt;p&gt;It is a validated MVP with a clear defensive scope and room for improvement.&lt;/p&gt;

&lt;h2&gt;
  
  
  Who this project is for
&lt;/h2&gt;

&lt;p&gt;This project may be useful for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Software engineering students&lt;/li&gt;
&lt;li&gt;Cybersecurity students&lt;/li&gt;
&lt;li&gt;Backend developers&lt;/li&gt;
&lt;li&gt;Rust learners&lt;/li&gt;
&lt;li&gt;People interested in defensive infrastructure&lt;/li&gt;
&lt;li&gt;Anyone curious about deception-based security&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It can also be a starting point for discussions around telemetry, detection, infrastructure hardening and practical security engineering.&lt;/p&gt;

&lt;h2&gt;
  
  
  Current limitations
&lt;/h2&gt;

&lt;p&gt;The project is intentionally honest about its current stage.&lt;/p&gt;

&lt;p&gt;It is an MVP.&lt;/p&gt;

&lt;p&gt;It still needs more hardening, better testing, stronger deployment guidance and deeper validation before being treated as production-ready.&lt;/p&gt;

&lt;p&gt;That is part of the reason I am publishing it openly.&lt;/p&gt;

&lt;p&gt;I want feedback, technical criticism and ideas from people who care about building useful defensive systems.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final thoughts
&lt;/h2&gt;

&lt;p&gt;Deception Mesh started as a practical experiment, but it became a valuable learning project around cybersecurity, Rust, backend systems and telecommunications.&lt;/p&gt;

&lt;p&gt;If you are interested in open-source cybersecurity, defensive telemetry or Rust-based infrastructure, I would be happy if you take a look.&lt;/p&gt;

&lt;p&gt;GitHub: &lt;a href="https://github.com/tucodigocotidiano/deception-mesh" rel="noopener noreferrer"&gt;https://github.com/tucodigocotidiano/deception-mesh&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Feedback, issues, stars and technical suggestions are welcome.&lt;/p&gt;

</description>
      <category>cybersecurity</category>
      <category>rust</category>
      <category>opensource</category>
      <category>backend</category>
    </item>
    <item>
      <title>Python Operators and Expressions Explained for Beginners</title>
      <dc:creator>Tu codigo cotidiano</dc:creator>
      <pubDate>Wed, 08 Jul 2026 00:01:13 +0000</pubDate>
      <link>https://dev.to/tu_codigocotidiano_f173d/python-operators-and-expressions-explained-for-beginners-2dkp</link>
      <guid>https://dev.to/tu_codigocotidiano_f173d/python-operators-and-expressions-explained-for-beginners-2dkp</guid>
      <description>&lt;p&gt;When you start learning Python, one of the first big steps is understanding variables.&lt;/p&gt;

&lt;p&gt;A variable lets your program remember information.&lt;/p&gt;

&lt;p&gt;But the next step is even more powerful:&lt;/p&gt;

&lt;p&gt;using that information to calculate results.&lt;/p&gt;

&lt;p&gt;I recently published a new Spanish guide in my Python from scratch series:&lt;/p&gt;

&lt;p&gt;Operadores y expresiones: haz que Python calcule por ti&lt;/p&gt;

&lt;p&gt;The guide explains operators and expressions with simple examples, without heavy theory.&lt;/p&gt;

&lt;p&gt;The main idea is:&lt;/p&gt;

&lt;p&gt;A variable stores information.&lt;br&gt;&lt;br&gt;
An operator tells Python what to do.&lt;br&gt;&lt;br&gt;
An expression produces a result.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;precio&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;12000&lt;/span&gt;
&lt;span class="n"&gt;cantidad&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;

&lt;span class="n"&gt;subtotal&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;precio&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;cantidad&lt;/span&gt;
&lt;span class="n"&gt;descuento&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;subtotal&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;0.10&lt;/span&gt;
&lt;span class="n"&gt;total&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;subtotal&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;descuento&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;total&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The guide covers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;what an operator is&lt;/li&gt;
&lt;li&gt;what an expression is&lt;/li&gt;
&lt;li&gt;basic arithmetic operators in Python&lt;/li&gt;
&lt;li&gt;how to use variables inside calculations&lt;/li&gt;
&lt;li&gt;how to store calculated results&lt;/li&gt;
&lt;li&gt;why parentheses matter&lt;/li&gt;
&lt;li&gt;common beginner mistakes&lt;/li&gt;
&lt;li&gt;a small final challenge&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Some basic examples from the guide are:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;6&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And one important idea for beginners:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;resultado_sin_parentesis&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;
&lt;span class="n"&gt;resultado_con_parentesis&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Both lines look similar, but they can produce different results because parentheses change the order of the calculation.&lt;/p&gt;

&lt;p&gt;This guide is written in Spanish and is designed for people who are learning Python from zero.&lt;/p&gt;

&lt;p&gt;Full guide:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://tucodigocotidiano.yarumaltech.com/leer_guias/operadores-y-expresiones-haz-que-python-calcule-por-ti/" rel="noopener noreferrer"&gt;https://tucodigocotidiano.yarumaltech.com/leer_guias/operadores-y-expresiones-haz-que-python-calcule-por-ti/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What was the first programming concept that made you feel you were finally understanding how code works?&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fz78w8ea68y4rlislzp3n.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fz78w8ea68y4rlislzp3n.png" alt=" " width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>beginners</category>
      <category>tutorial</category>
      <category>programming</category>
    </item>
    <item>
      <title>Reverse proxy mínimo en Rust: enrutar tráfico por Host</title>
      <dc:creator>Tu codigo cotidiano</dc:creator>
      <pubDate>Mon, 06 Jul 2026 16:28:13 +0000</pubDate>
      <link>https://dev.to/tu_codigocotidiano_f173d/reverse-proxy-minimo-en-rust-enrutar-trafico-por-host-1e0l</link>
      <guid>https://dev.to/tu_codigocotidiano_f173d/reverse-proxy-minimo-en-rust-enrutar-trafico-por-host-1e0l</guid>
      <description>&lt;h1&gt;
  
  
  Reverse proxy mínimo en Rust: enrutar tráfico por Host
&lt;/h1&gt;

&lt;p&gt;Publiqué un nuevo tutorial en &lt;strong&gt;TuCodigoCotidiano&lt;/strong&gt; donde construimos un reverse proxy mínimo en Rust usando únicamente la librería estándar.&lt;/p&gt;

&lt;p&gt;La idea del tutorial es simple, pero poderosa:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Un reverse proxy no solo reenvía tráfico: también decide a dónde debe ir.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;En el proyecto, el proxy escucha en:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;127.0.0.1:8080
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Y enruta cada petición según el header &lt;code&gt;Host&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;app.localhost -&amp;gt; 127.0.0.1:9001
api.localhost -&amp;gt; 127.0.0.1:9002
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Qué vas a aprender
&lt;/h2&gt;

&lt;p&gt;En el tutorial construimos paso a paso un proxy que:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;escucha conexiones TCP con &lt;code&gt;TcpListener&lt;/code&gt;;&lt;/li&gt;
&lt;li&gt;lee peticiones HTTP desde un &lt;code&gt;TcpStream&lt;/code&gt;;&lt;/li&gt;
&lt;li&gt;extrae y normaliza el header &lt;code&gt;Host&lt;/code&gt;;&lt;/li&gt;
&lt;li&gt;decide el upstream correcto;&lt;/li&gt;
&lt;li&gt;reescribe headers como &lt;code&gt;Host&lt;/code&gt;, &lt;code&gt;Connection&lt;/code&gt;, &lt;code&gt;X-Forwarded-For&lt;/code&gt; y &lt;code&gt;X-Forwarded-Proto&lt;/code&gt;;&lt;/li&gt;
&lt;li&gt;responde &lt;code&gt;400 Bad Request&lt;/code&gt; cuando falta &lt;code&gt;Host&lt;/code&gt;;&lt;/li&gt;
&lt;li&gt;responde &lt;code&gt;404 Not Found&lt;/code&gt; cuando no existe una ruta;&lt;/li&gt;
&lt;li&gt;responde &lt;code&gt;502 Bad Gateway&lt;/code&gt; cuando el upstream está apagado;&lt;/li&gt;
&lt;li&gt;maneja varias conexiones usando threads;&lt;/li&gt;
&lt;li&gt;incluye pruebas con &lt;code&gt;curl.exe&lt;/code&gt; y tests unitarios.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Por qué hice este tutorial
&lt;/h2&gt;

&lt;p&gt;Muchas veces usamos herramientas como NGINX, Caddy, Traefik o HAProxy, pero no siempre entendemos qué pasa por dentro.&lt;/p&gt;

&lt;p&gt;Este proyecto no busca reemplazarlas. La meta es aprender la idea central:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Leer una petición, entender a qué servicio va dirigida y reenviarla al destino correcto.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Tutorial completo
&lt;/h2&gt;

&lt;p&gt;Puedes leerlo aquí:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://tucodigocotidiano.yarumaltech.com/leer_tutoriales/reverse-proxy-minimo-en-rust-enrutar-trafico-por-host/" rel="noopener noreferrer"&gt;https://tucodigocotidiano.yarumaltech.com/leer_tutoriales/reverse-proxy-minimo-en-rust-enrutar-trafico-por-host/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Si estás aprendiendo &lt;strong&gt;Rust&lt;/strong&gt;, &lt;strong&gt;HTTP&lt;/strong&gt;, &lt;strong&gt;backend&lt;/strong&gt;, &lt;strong&gt;redes&lt;/strong&gt; o &lt;strong&gt;DevOps&lt;/strong&gt;, este proyecto te puede ayudar a conectar teoría con práctica.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fm5ho78t1zhjvqbxd25pa.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fm5ho78t1zhjvqbxd25pa.png" alt=" " width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>rust</category>
      <category>devops</category>
      <category>backend</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Python Variables and Data Types Explained With a Simple Visual Analogy</title>
      <dc:creator>Tu codigo cotidiano</dc:creator>
      <pubDate>Fri, 03 Jul 2026 20:14:56 +0000</pubDate>
      <link>https://dev.to/tu_codigocotidiano_f173d/python-variables-and-data-types-explained-with-a-simple-visual-analogy-50me</link>
      <guid>https://dev.to/tu_codigocotidiano_f173d/python-variables-and-data-types-explained-with-a-simple-visual-analogy-50me</guid>
      <description>&lt;p&gt;When someone starts learning Python, the first line is usually something like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Hola, mundo&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That line is powerful because it shows a simple idea:&lt;/p&gt;

&lt;p&gt;you write an instruction, and the computer responds.&lt;/p&gt;

&lt;p&gt;But the next step is even more important:&lt;/p&gt;

&lt;p&gt;learning how to store information.&lt;/p&gt;

&lt;p&gt;That is where variables appear.&lt;/p&gt;

&lt;p&gt;I just published a beginner-friendly Spanish guide about variables and basic data types in Python.&lt;/p&gt;

&lt;p&gt;The main analogy is simple:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A variable is like a labeled box where your program stores information.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;nombre&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Ana&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="n"&gt;edad&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;17&lt;/span&gt;
&lt;span class="n"&gt;altura&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;1.65&lt;/span&gt;
&lt;span class="n"&gt;esta_aprendiendo&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt;
&lt;span class="n"&gt;lenguajes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Python&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;HTML&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;CSS&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The guide explains, step by step:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;what a variable is&lt;/li&gt;
&lt;li&gt;why a variable has a name&lt;/li&gt;
&lt;li&gt;what the &lt;code&gt;=&lt;/code&gt; symbol means in Python&lt;/li&gt;
&lt;li&gt;what a value is&lt;/li&gt;
&lt;li&gt;why &lt;code&gt;"Ana"&lt;/code&gt; is text&lt;/li&gt;
&lt;li&gt;why &lt;code&gt;17&lt;/code&gt; is a number&lt;/li&gt;
&lt;li&gt;what basic data types are&lt;/li&gt;
&lt;li&gt;how to recognize &lt;code&gt;str&lt;/code&gt;, &lt;code&gt;int&lt;/code&gt;, &lt;code&gt;float&lt;/code&gt;, &lt;code&gt;bool&lt;/code&gt;, and &lt;code&gt;list&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The goal is not to overwhelm beginners with technical definitions.&lt;/p&gt;

&lt;p&gt;The goal is to help them understand this:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A variable has a name, stores a value, and that value has a data type.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I also included visual explanations so the concept feels easier to remember.&lt;/p&gt;

&lt;p&gt;The full guide is in Spanish:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://tucodigocotidiano.yarumaltech.com/leer_guias/variables-y-tipos-de-datos-las-cajas-donde-vive-tu-informacion/" rel="noopener noreferrer"&gt;https://tucodigocotidiano.yarumaltech.com/leer_guias/variables-y-tipos-de-datos-las-cajas-donde-vive-tu-informacion/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What analogy helped you understand variables when you were learning to code?&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcabziv2jqs3qb5ndjudk.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcabziv2jqs3qb5ndjudk.png" alt=" " width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>beginners</category>
      <category>tutorial</category>
      <category>programming</category>
    </item>
    <item>
      <title>Python for Absolute Beginners: Start With One Line of Code</title>
      <dc:creator>Tu codigo cotidiano</dc:creator>
      <pubDate>Thu, 02 Jul 2026 17:03:39 +0000</pubDate>
      <link>https://dev.to/tu_codigocotidiano_f173d/why-python-is-the-language-of-the-moment-your-first-line-of-code-55ba</link>
      <guid>https://dev.to/tu_codigocotidiano_f173d/why-python-is-the-language-of-the-moment-your-first-line-of-code-55ba</guid>
      <description>&lt;p&gt;Many people want to learn programming, but they stop before writing their first line of code.&lt;/p&gt;

&lt;p&gt;Not because they are not capable.&lt;/p&gt;

&lt;p&gt;Because programming often feels too big at the beginning:&lt;/p&gt;

&lt;p&gt;artificial intelligence, data, automation, web development, frameworks, tools, installations, terminals, errors…&lt;/p&gt;

&lt;p&gt;So I wrote a beginner-friendly guide in Spanish with one simple goal:&lt;/p&gt;

&lt;p&gt;help someone understand why Python is so popular and write their first real line of code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Hola, mundo&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That line looks small, but it represents something powerful:&lt;/p&gt;

&lt;p&gt;you write an instruction, the computer reads it, and something happens on the screen.&lt;/p&gt;

&lt;p&gt;That is the first real connection with programming.&lt;/p&gt;

&lt;p&gt;In the guide, I explain visually and step by step:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;why Python is used in artificial intelligence&lt;/li&gt;
&lt;li&gt;why it is useful for data analysis&lt;/li&gt;
&lt;li&gt;how it helps with automation&lt;/li&gt;
&lt;li&gt;how it connects with web development&lt;/li&gt;
&lt;li&gt;why it is one of the best languages for beginners&lt;/li&gt;
&lt;li&gt;what &lt;code&gt;print("Hola, mundo")&lt;/code&gt; means&lt;/li&gt;
&lt;li&gt;how to try your first line without feeling overwhelmed&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The goal is not to understand everything on day one.&lt;/p&gt;

&lt;p&gt;The goal is much simpler:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“I can try this.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Programming does not start with knowing everything.&lt;/p&gt;

&lt;p&gt;It starts with curiosity, one simple instruction, and the confidence to keep going.&lt;/p&gt;

&lt;p&gt;I wrote this guide for people who are just starting and need a friendly first step.&lt;/p&gt;

&lt;p&gt;Full guide in Spanish:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://tucodigocotidiano.yarumaltech.com/leer_guias/por-que-python-es-el-lenguaje-del-momento-tu-primera-linea-de-codigo/" rel="noopener noreferrer"&gt;https://tucodigocotidiano.yarumaltech.com/leer_guias/por-que-python-es-el-lenguaje-del-momento-tu-primera-linea-de-codigo/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What was the first line of code you ever wrote?&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fssttkejdzpzjuacqz9jz.jpg" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fssttkejdzpzjuacqz9jz.jpg" alt=" " width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>beginners</category>
      <category>tutorial</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Build a Minimal Git in Rust: Objects, Hashes, Commits and Log</title>
      <dc:creator>Tu codigo cotidiano</dc:creator>
      <pubDate>Mon, 29 Jun 2026 14:01:56 +0000</pubDate>
      <link>https://dev.to/tu_codigocotidiano_f173d/build-a-minimal-git-in-rust-objects-hashes-commits-and-log-31i7</link>
      <guid>https://dev.to/tu_codigocotidiano_f173d/build-a-minimal-git-in-rust-objects-hashes-commits-and-log-31i7</guid>
      <description>&lt;h1&gt;
  
  
  I built a MiniGit in Rust to understand how Git works internally
&lt;/h1&gt;

&lt;p&gt;Git is one of those tools we use every day, but many times it feels like a black box.&lt;/p&gt;

&lt;p&gt;We know how to run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git init
git commit
git log
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But what actually happens inside?&lt;/p&gt;

&lt;p&gt;I wrote a full Spanish tutorial where we build a small educational version of Git in Rust, step by step.&lt;/p&gt;

&lt;p&gt;The project creates a &lt;code&gt;.minigit&lt;/code&gt; folder and implements the core ideas behind Git:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Reading files as exact bytes&lt;/li&gt;
&lt;li&gt;Creating blob objects&lt;/li&gt;
&lt;li&gt;Calculating SHA-1 hashes like Git&lt;/li&gt;
&lt;li&gt;Saving objects by hash&lt;/li&gt;
&lt;li&gt;Recovering content from objects&lt;/li&gt;
&lt;li&gt;Creating minimal commits&lt;/li&gt;
&lt;li&gt;Updating &lt;code&gt;refs/heads/main&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Walking commit history with &lt;code&gt;log&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The goal is not to replace Git.&lt;br&gt;&lt;br&gt;
The goal is to open the black box and understand the model:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;file
  ↓
exact bytes
  ↓
blob object
  ↓
SHA-1
  ↓
.minigit/objects/&amp;lt;hash&amp;gt;
  ↓
commit
  ↓
refs/heads/main
  ↓
log
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This tutorial is especially useful if you are learning Rust, Git internals, systems programming, or how content-addressed storage works.&lt;/p&gt;

&lt;p&gt;The article is in Spanish, but the code is simple and easy to follow.&lt;/p&gt;

&lt;p&gt;Read the full tutorial here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://tucodigocotidiano.yarumaltech.com/leer_tutoriales/tu-propio-git-minimo-en-rust-objetos-hashes-commits-y-log/" rel="noopener noreferrer"&gt;https://tucodigocotidiano.yarumaltech.com/leer_tutoriales/tu-propio-git-minimo-en-rust-objetos-hashes-commits-y-log/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I would love to know what you think, especially if you are also interested in building developer tools from scratch.&lt;/p&gt;

</description>
      <category>rust</category>
      <category>git</category>
      <category>tutorial</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
