<?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: Jesee Jackson Kuya</title>
    <description>The latest articles on DEV Community by Jesee Jackson Kuya (@jeseekuya).</description>
    <link>https://dev.to/jeseekuya</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%2F1794282%2F748f861f-b1cb-4823-8e81-5457e7b37338.png</url>
      <title>DEV Community: Jesee Jackson Kuya</title>
      <link>https://dev.to/jeseekuya</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jeseekuya"/>
    <language>en</language>
    <item>
      <title>Many Days Later</title>
      <dc:creator>Jesee Jackson Kuya</dc:creator>
      <pubDate>Sat, 28 Mar 2026 01:04:20 +0000</pubDate>
      <link>https://dev.to/jeseekuya/many-days-later-56fn</link>
      <guid>https://dev.to/jeseekuya/many-days-later-56fn</guid>
      <description>&lt;p&gt;I owe you an apology.&lt;br&gt;
I said I was going to document my journey learning Rust daily…&lt;/p&gt;

&lt;p&gt;Yeah… that didn’t happen 😅&lt;/p&gt;

&lt;p&gt;Life happened. Work happened. Overthinking happened.&lt;/p&gt;

&lt;p&gt;But I didn’t stop learning.&lt;/p&gt;

&lt;p&gt;And honestly, that’s what matters.&lt;/p&gt;

&lt;p&gt;So here we are — &lt;strong&gt;many days later&lt;/strong&gt;.&lt;/p&gt;


&lt;h1&gt;
  
  
  Quick Recap
&lt;/h1&gt;

&lt;p&gt;Last time, we:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Installed Rust&lt;/li&gt;
&lt;li&gt;Built a simple guessing game&lt;/li&gt;
&lt;li&gt;Learned basic syntax (&lt;code&gt;let&lt;/code&gt;, &lt;code&gt;mut&lt;/code&gt;, &lt;code&gt;match&lt;/code&gt;, &lt;code&gt;use&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;At that point, Rust felt…&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Not that scary.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;But then I kept going.&lt;/p&gt;

&lt;p&gt;And I finally met the thing everyone warns you about:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Ownership&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;


&lt;h1&gt;
  
  
  The Project
&lt;/h1&gt;

&lt;p&gt;Before we dive in, let me make this real.&lt;/p&gt;

&lt;p&gt;I’m not just learning Rust for fun.&lt;/p&gt;

&lt;p&gt;I’m building something.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A &lt;strong&gt;ride sharing app&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Think:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;requesting rides&lt;/li&gt;
&lt;li&gt;matching drivers&lt;/li&gt;
&lt;li&gt;tracking trips&lt;/li&gt;
&lt;li&gt;handling payments (eventually)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Why this?&lt;/p&gt;

&lt;p&gt;Because it’s complex enough to &lt;strong&gt;force me to actually understand Rust&lt;/strong&gt;, not just play with syntax.&lt;/p&gt;


&lt;h1&gt;
  
  
  So… What is Ownership?
&lt;/h1&gt;

&lt;p&gt;Let me explain this in the simplest way possible.&lt;/p&gt;

&lt;p&gt;Ownership is basically:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Who owns a piece of data in your program&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And Rust is VERY strict about this.&lt;/p&gt;


&lt;h1&gt;
  
  
  Imagine This
&lt;/h1&gt;

&lt;p&gt;You have money.&lt;/p&gt;

&lt;p&gt;Only one person can own it at a time.&lt;/p&gt;

&lt;p&gt;You can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;give it away&lt;/li&gt;
&lt;li&gt;borrow it&lt;/li&gt;
&lt;li&gt;or keep it&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But you can’t have &lt;strong&gt;two real owners at the same time&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;That’s exactly how Rust treats data.&lt;/p&gt;


&lt;h1&gt;
  
  
  Example Time
&lt;/h1&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;s1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nn"&gt;String&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;from&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"hello"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;s2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;s1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Looks harmless, right?&lt;/p&gt;

&lt;p&gt;Wrong.&lt;/p&gt;

&lt;p&gt;After this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;s1&lt;/code&gt; is &lt;strong&gt;no longer valid&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;s2&lt;/code&gt; now owns the data&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you try to use &lt;code&gt;s1&lt;/code&gt;, Rust will stop you immediately.&lt;/p&gt;


&lt;h1&gt;
  
  
  Why Does Rust Do This?
&lt;/h1&gt;

&lt;p&gt;Because Rust wants to prevent:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;memory leaks&lt;/li&gt;
&lt;li&gt;crashes&lt;/li&gt;
&lt;li&gt;weird bugs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Languages like JavaScript or Python hide this from you.&lt;/p&gt;

&lt;p&gt;Rust says:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“No. You will deal with memory properly.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;At first, it feels annoying.&lt;/p&gt;

&lt;p&gt;Then you realize:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;This is actually protecting you.&lt;/p&gt;
&lt;/blockquote&gt;


&lt;h1&gt;
  
  
  The First Confusing Moment
&lt;/h1&gt;

&lt;p&gt;When I saw this, I was like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Wait… why can’t I use s1 anymore?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It felt unnecessary.&lt;/p&gt;

&lt;p&gt;But then it clicked.&lt;/p&gt;

&lt;p&gt;Rust is making sure:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;There is &lt;strong&gt;only one clear owner&lt;/strong&gt; of data at any time.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h1&gt;
  
  
  Borrowing (This Saved Me)
&lt;/h1&gt;

&lt;p&gt;Instead of giving away ownership, you can &lt;strong&gt;borrow&lt;/strong&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;s1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nn"&gt;String&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;from&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"hello"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;len&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;calculate_length&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;s1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="nd"&gt;println!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Length: {len}"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;calculate_length&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;usize&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="nf"&gt;.len&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;Notice this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;s1&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That &lt;code&gt;&amp;amp;&lt;/code&gt; means:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“I’m borrowing this, not taking it.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;So:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;s1&lt;/code&gt; is still valid&lt;/li&gt;
&lt;li&gt;the function just uses it temporarily&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  Real Life Meaning
&lt;/h1&gt;

&lt;p&gt;Think of it like this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ownership → giving someone your car&lt;/li&gt;
&lt;li&gt;Borrowing → letting someone drive your car&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Big difference.&lt;/p&gt;




&lt;h1&gt;
  
  
  Why This Matters (Especially for My Project)
&lt;/h1&gt;

&lt;p&gt;Remember the ride sharing app?&lt;/p&gt;

&lt;p&gt;We’ll have:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;users&lt;/li&gt;
&lt;li&gt;drivers&lt;/li&gt;
&lt;li&gt;trips&lt;/li&gt;
&lt;li&gt;locations&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Data will be moving everywhere.&lt;/p&gt;

&lt;p&gt;Without ownership rules, things could get messy:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;multiple parts of the app modifying the same data&lt;/li&gt;
&lt;li&gt;crashes&lt;/li&gt;
&lt;li&gt;inconsistent states&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Rust prevents this at &lt;strong&gt;compile time&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Meaning:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Bugs are caught BEFORE the app runs.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That’s huge.&lt;/p&gt;




&lt;h1&gt;
  
  
  My Honest Experience
&lt;/h1&gt;

&lt;p&gt;Ownership is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;confusing at first&lt;/li&gt;
&lt;li&gt;frustrating in the beginning&lt;/li&gt;
&lt;li&gt;but makes sense over time&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I won’t lie…&lt;/p&gt;

&lt;p&gt;I had to re-read parts of the Rust book multiple times.&lt;/p&gt;

&lt;p&gt;But once it clicks, you start seeing:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Oh… this is actually clean.”&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h1&gt;
  
  
  What I’ve Learned So Far
&lt;/h1&gt;

&lt;p&gt;After spending more time with Rust:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It forces discipline&lt;/li&gt;
&lt;li&gt;It doesn’t allow shortcuts&lt;/li&gt;
&lt;li&gt;It makes you think before coding&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And I’m starting to understand why people say:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Rust changes how you think about programming&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h1&gt;
  
  
  What’s Next
&lt;/h1&gt;

&lt;p&gt;Now that ownership is (kind of) making sense…&lt;/p&gt;

&lt;p&gt;Next up:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;borrowing deeper&lt;/li&gt;
&lt;li&gt;references&lt;/li&gt;
&lt;li&gt;lifetimes (yes… that scary word)&lt;/li&gt;
&lt;li&gt;and starting the &lt;strong&gt;ride sharing backend&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  Final Thoughts
&lt;/h1&gt;

&lt;p&gt;I didn’t keep up with daily updates.&lt;/p&gt;

&lt;p&gt;That’s on me.&lt;/p&gt;

&lt;p&gt;But I didn’t quit.&lt;/p&gt;

&lt;p&gt;And honestly, that’s the real journey.&lt;/p&gt;

&lt;p&gt;We’re still going from:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;0 → 1&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Just not in a straight line.&lt;/p&gt;




</description>
      <category>beginners</category>
      <category>devjournal</category>
      <category>learning</category>
      <category>rust</category>
    </item>
    <item>
      <title>RUST:MY JOURNEY FROM 0 TO 1(Day 1)</title>
      <dc:creator>Jesee Jackson Kuya</dc:creator>
      <pubDate>Thu, 12 Mar 2026 08:50:06 +0000</pubDate>
      <link>https://dev.to/jeseekuya/rustmy-journey-from-0-to-1day-1-51co</link>
      <guid>https://dev.to/jeseekuya/rustmy-journey-from-0-to-1day-1-51co</guid>
      <description>&lt;p&gt;You’ve probably heard the rumors and hype surrounding Rust.&lt;/p&gt;

&lt;p&gt;The language that &lt;em&gt;does everything&lt;/em&gt;.&lt;br&gt;
The language developers fear.&lt;br&gt;
The language AI supposedly struggles with.&lt;br&gt;
The language companies are rewriting their entire codebases in.&lt;/p&gt;

&lt;p&gt;And so on...&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%2F6pfy5yad5id92h3a780k.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.amazonaws.com%2Fuploads%2Farticles%2F6pfy5yad5id92h3a780k.jpeg" alt="typical" width="282" height="178"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But how much of this is actually true?&lt;/p&gt;

&lt;p&gt;This series is my journey to &lt;strong&gt;debunk the rumors&lt;/strong&gt;. I want to see for myself what Rust is really about.&lt;/p&gt;

&lt;p&gt;The goal is simple:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Learn Rust and ship a real product to production.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And I’ll track &lt;strong&gt;how many days it actually takes&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;I’m a firm believer in learning the hard way, so instead of watching 50 tutorials on YouTube, I’ll be using the official Rust documentation:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Rust Book&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://doc.rust-lang.org/book/" rel="noopener noreferrer"&gt;https://doc.rust-lang.org/book/&lt;/a&gt;&lt;/p&gt;


&lt;h1&gt;
  
  
  Installation
&lt;/h1&gt;

&lt;p&gt;Installing Rust is surprisingly easy.&lt;/p&gt;

&lt;p&gt;I’m using &lt;strong&gt;Manjaro Linux&lt;/strong&gt;, which is Arch-based. On most Linux distributions, you can install Rust with a single command.&lt;/p&gt;

&lt;p&gt;Open your terminal and run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;--proto&lt;/span&gt; &lt;span class="s1"&gt;'=https'&lt;/span&gt; &lt;span class="nt"&gt;--tlsv1&lt;/span&gt;.2 https://sh.rustup.rs &lt;span class="nt"&gt;-sSf&lt;/span&gt; | sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This installs Rust using &lt;strong&gt;rustup&lt;/strong&gt;, the official installer and version manager.&lt;/p&gt;

&lt;p&gt;Honestly, this might be one of the &lt;strong&gt;smoothest language installations&lt;/strong&gt; I’ve ever done.&lt;/p&gt;




&lt;h3&gt;
  
  
  Important Note
&lt;/h3&gt;

&lt;p&gt;There’s one thing that can cause installation errors.&lt;/p&gt;

&lt;p&gt;Rust requires a &lt;strong&gt;C compiler&lt;/strong&gt; during installation.&lt;/p&gt;

&lt;p&gt;If you don't already have one installed, install &lt;code&gt;gcc&lt;/code&gt; first.&lt;/p&gt;

&lt;p&gt;On Arch / Manjaro:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;pacman &lt;span class="nt"&gt;-S&lt;/span&gt; base-devel
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the installation command fails, you can follow the official guide here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://doc.rust-lang.org/book/ch01-01-installation.html" rel="noopener noreferrer"&gt;https://doc.rust-lang.org/book/ch01-01-installation.html&lt;/a&gt;&lt;/p&gt;




&lt;h1&gt;
  
  
  Jumping Right Into Rust
&lt;/h1&gt;

&lt;p&gt;The first example in the Rust book is a &lt;strong&gt;number guessing game&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Here’s the full code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="k"&gt;use&lt;/span&gt; &lt;span class="nn"&gt;std&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nn"&gt;cmp&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;Ordering&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;use&lt;/span&gt; &lt;span class="nn"&gt;std&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;io&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;use&lt;/span&gt; &lt;span class="nn"&gt;rand&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;Rng&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nd"&gt;println!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Guess the number!"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;secret_number&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nn"&gt;rand&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;thread_rng&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="nf"&gt;.gen_range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="o"&gt;..=&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="k"&gt;loop&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nd"&gt;println!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Please input your guess."&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

        &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="k"&gt;mut&lt;/span&gt; &lt;span class="n"&gt;guess&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nn"&gt;String&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

        &lt;span class="nn"&gt;io&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;stdin&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
            &lt;span class="nf"&gt;.read_line&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="k"&gt;mut&lt;/span&gt; &lt;span class="n"&gt;guess&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="nf"&gt;.expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Failed to read line"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

        &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;guess&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;u32&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;match&lt;/span&gt; &lt;span class="n"&gt;guess&lt;/span&gt;&lt;span class="nf"&gt;.trim&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="nf"&gt;.parse&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nf"&gt;Ok&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;num&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;num&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="nf"&gt;Err&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;_&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="k"&gt;continue&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;};&lt;/span&gt;

        &lt;span class="nd"&gt;println!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"You guessed: {guess}"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

        &lt;span class="k"&gt;match&lt;/span&gt; &lt;span class="n"&gt;guess&lt;/span&gt;&lt;span class="nf"&gt;.cmp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;secret_number&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nn"&gt;Ordering&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;Less&lt;/span&gt; &lt;span class="k"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nd"&gt;println!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Too small!"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
            &lt;span class="nn"&gt;Ordering&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;Greater&lt;/span&gt; &lt;span class="k"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nd"&gt;println!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Too big!"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
            &lt;span class="nn"&gt;Ordering&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;Equal&lt;/span&gt; &lt;span class="k"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="nd"&gt;println!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"You win!"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
                &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;}&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;If you're new to Rust, this code might look a little unusual at first.&lt;/p&gt;

&lt;p&gt;But surprisingly, it becomes readable pretty quickly.&lt;/p&gt;

&lt;p&gt;Let’s break it down.&lt;/p&gt;




&lt;h1&gt;
  
  
  Understanding &lt;code&gt;use&lt;/code&gt;
&lt;/h1&gt;

&lt;p&gt;The first thing you notice is the code starting with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="k"&gt;use&lt;/span&gt; &lt;span class="nn"&gt;std&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nn"&gt;cmp&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;Ordering&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;use&lt;/span&gt; &lt;span class="nn"&gt;std&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;io&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;use&lt;/span&gt; &lt;span class="nn"&gt;rand&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;Rng&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;use&lt;/code&gt; keyword is essentially &lt;strong&gt;Rust’s import system&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;It tells the compiler which functionality from other modules we want to use.&lt;/p&gt;

&lt;p&gt;Think of it like:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Language&lt;/th&gt;
&lt;th&gt;Import syntax&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Python&lt;/td&gt;
&lt;td&gt;&lt;code&gt;import random&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;JavaScript&lt;/td&gt;
&lt;td&gt;&lt;code&gt;import fs from "fs"&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Rust&lt;/td&gt;
&lt;td&gt;&lt;code&gt;use rand::Rng&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="k"&gt;use&lt;/span&gt; &lt;span class="nn"&gt;std&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;io&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This imports Rust’s &lt;strong&gt;input/output library&lt;/strong&gt; so we can read input from the terminal.&lt;/p&gt;

&lt;p&gt;And this line:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="k"&gt;use&lt;/span&gt; &lt;span class="nn"&gt;rand&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;Rng&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;imports a trait that allows us to generate random numbers.&lt;/p&gt;




&lt;h1&gt;
  
  
  Generating the Secret Number
&lt;/h1&gt;

&lt;p&gt;This line creates the number the user must guess:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;secret_number&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nn"&gt;rand&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;thread_rng&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="nf"&gt;.gen_range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="o"&gt;..=&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What’s happening here?&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;thread_rng()&lt;/code&gt; creates a random number generator.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;gen_range(1..=100)&lt;/code&gt; generates a number between &lt;strong&gt;1 and 100&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;So every time the game runs, a new number is generated.&lt;/p&gt;




&lt;h1&gt;
  
  
  Variables in Rust
&lt;/h1&gt;

&lt;p&gt;This line creates a variable:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="k"&gt;mut&lt;/span&gt; &lt;span class="n"&gt;guess&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nn"&gt;String&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Two important things are happening here.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;let&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;let&lt;/code&gt; declares a variable.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;mut&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Rust variables are &lt;strong&gt;immutable by default&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;That means their value cannot change unless you explicitly say they can.&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;x&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;This value &lt;strong&gt;cannot be changed&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;But this can:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="k"&gt;mut&lt;/span&gt; &lt;span class="n"&gt;x&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;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&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;Rust forces you to be &lt;strong&gt;explicit about mutation&lt;/strong&gt;, which helps prevent bugs.&lt;/p&gt;




&lt;h1&gt;
  
  
  Reading User Input
&lt;/h1&gt;

&lt;p&gt;This section reads input from the terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="nn"&gt;io&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;stdin&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="nf"&gt;.read_line&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="k"&gt;mut&lt;/span&gt; &lt;span class="n"&gt;guess&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="nf"&gt;.expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Failed to read line"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What this does:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Waits for user input&lt;/li&gt;
&lt;li&gt;Stores it in the &lt;code&gt;guess&lt;/code&gt; variable&lt;/li&gt;
&lt;li&gt;Crashes with a helpful message if something fails&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Rust prefers &lt;strong&gt;explicit error handling&lt;/strong&gt;, which you’ll see a lot.&lt;/p&gt;




&lt;h1&gt;
  
  
  Pattern Matching
&lt;/h1&gt;

&lt;p&gt;One of Rust’s most powerful features is &lt;strong&gt;pattern matching&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This block converts the input into a number:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;guess&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;u32&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;match&lt;/span&gt; &lt;span class="n"&gt;guess&lt;/span&gt;&lt;span class="nf"&gt;.trim&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="nf"&gt;.parse&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;Ok&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;num&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;num&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nf"&gt;Err&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;_&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="k"&gt;continue&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;Here’s what’s happening:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The program tries to convert the input into a number.&lt;/li&gt;
&lt;li&gt;If it succeeds → use the number.&lt;/li&gt;
&lt;li&gt;If it fails → ignore it and ask again.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This avoids crashes if the user types something like:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;Instead of breaking the program, Rust simply loops again.&lt;/p&gt;




&lt;h1&gt;
  
  
  Comparing the Guess
&lt;/h1&gt;

&lt;p&gt;Now we compare the guess with the secret number.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="k"&gt;match&lt;/span&gt; &lt;span class="n"&gt;guess&lt;/span&gt;&lt;span class="nf"&gt;.cmp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;secret_number&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;Rust compares the values and returns:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Less&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Greater&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Equal&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then we print the appropriate message.&lt;/p&gt;




&lt;h1&gt;
  
  
  What I Learned on Day 1
&lt;/h1&gt;

&lt;p&gt;After writing this small program, a few things became clear.&lt;/p&gt;

&lt;h3&gt;
  
  
  Rust is strict
&lt;/h3&gt;

&lt;p&gt;Rust forces you to write &lt;strong&gt;safe code&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This can feel annoying at first, but it prevents many bugs.&lt;/p&gt;




&lt;h3&gt;
  
  
  Rust is very explicit
&lt;/h3&gt;

&lt;p&gt;Nothing happens magically.&lt;/p&gt;

&lt;p&gt;You must clearly state:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;variable types&lt;/li&gt;
&lt;li&gt;mutability&lt;/li&gt;
&lt;li&gt;error handling&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Rust is not as scary as people say
&lt;/h3&gt;

&lt;p&gt;So far, it actually feels &lt;strong&gt;logical and structured&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Yes, the syntax is different, but it's not impossible to understand.&lt;/p&gt;




&lt;h1&gt;
  
  
  The Plan
&lt;/h1&gt;

&lt;p&gt;The challenge continues.&lt;/p&gt;

&lt;p&gt;My goal is to go from &lt;strong&gt;zero to production&lt;/strong&gt; with Rust.&lt;/p&gt;

&lt;p&gt;Over the next posts I will explore:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ownership&lt;/li&gt;
&lt;li&gt;borrowing&lt;/li&gt;
&lt;li&gt;lifetimes&lt;/li&gt;
&lt;li&gt;crates&lt;/li&gt;
&lt;li&gt;building a real project&lt;/li&gt;
&lt;li&gt;deploying it&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And eventually ship something real.&lt;/p&gt;




&lt;h1&gt;
  
  
  Final Thoughts
&lt;/h1&gt;

&lt;p&gt;The hype around Rust is massive.&lt;/p&gt;

&lt;p&gt;But after the first day, one thing is clear:&lt;br&gt;
Rust is just another common language.&lt;/p&gt;

&lt;p&gt;Let’s see how far this rabbit hole goes.&lt;/p&gt;

</description>
      <category>rust</category>
      <category>programming</category>
      <category>learning</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Zero-Downtime Go Module Updates Using AI and CLI Automation</title>
      <dc:creator>Jesee Jackson Kuya</dc:creator>
      <pubDate>Sat, 10 May 2025 21:36:15 +0000</pubDate>
      <link>https://dev.to/jeseekuya/zero-downtime-go-module-updates-using-ai-and-cli-automation-11e8</link>
      <guid>https://dev.to/jeseekuya/zero-downtime-go-module-updates-using-ai-and-cli-automation-11e8</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/aws-amazon-q-v2025-04-30"&gt;Amazon Q Developer "Quack The Code" Challenge&lt;/a&gt;: Crushing the Command Line&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;I built a CLI tool in Go that automates safe dependency upgrades in Go projects using Amazon Q Developer. The tool addresses the common pain point of manually updating dependencies, which is often error-prone and time-consuming due to compatibility issues. Here's what it does:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Auto-scans Go projects for outdated dependencies

Uses Amazon Q to generate AI-powered compatibility reports

Predicts potential code conflicts before upgrading

Automatically applies safe upgrades, runs tests, and opens a GitHub PR
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;The tool streamlines the entire upgrade pipeline while integrating AI-powered risk analysis before making any changes — something that's often missing in conventional dependency managers&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&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%2F2rswjk2tgz284l5nktzf.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%2F2rswjk2tgz284l5nktzf.png" alt=" " width="469" height="441"&gt;&lt;/a&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%2Fa5egokdzy0hib0dty72u.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%2Fa5egokdzy0hib0dty72u.png" alt=" " width="469" height="493"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Demo Flow:

    Run the CLI: ./q-dep-updater -path=~/dev/myproject -repo=me/myproject

    See predicted conflicts before upgrades

    PR automatically created once tests pass
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
  
  
  Code Repository
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/jesee-kuya/cli-rules" rel="noopener noreferrer"&gt;🔗 GitHub Repository – cli-rules&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  How I Used Amazon Q Developer
&lt;/h2&gt;

&lt;p&gt;Amazon Q Developer was the intelligence behind this tool. I used the q chat CLI interface to:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Scan the project and extract outdated dependencies in structured JSON

Predict compatibility conflicts based on code patterns and version diffs

Generate a compatibility report with AI-based suggestions for refactoring
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;By integrating Amazon Q directly into the upgrade workflow, I was able to:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Detect breaking changes before installation

Avoid unnecessary manual debugging

Ensure only conflict-free upgrades move forward
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Tip:&lt;/p&gt;

&lt;p&gt;I found Amazon Q Developer's ability to contextualize Go code very effective when fed with detailed prompts about version differences. Using structured output like JSON made it easy to integrate with the CLI logic.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>awschallenge</category>
      <category>ai</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Understanding Runes in Go</title>
      <dc:creator>Jesee Jackson Kuya</dc:creator>
      <pubDate>Tue, 30 Jul 2024 12:01:10 +0000</pubDate>
      <link>https://dev.to/jeseekuya/understanding-runes-in-go-4ie5</link>
      <guid>https://dev.to/jeseekuya/understanding-runes-in-go-4ie5</guid>
      <description>&lt;p&gt;&lt;strong&gt;Introduction to Runes&lt;/strong&gt;&lt;br&gt;
The American Standard Code for Information Interchange(ASCII) is a character set representing uppercase letters, lowercase letters, digits, and various punctuations and device-control characters.  The issue with the ASCII is it does not include most characters used in the world like Chinese characters and other character sets used by different languages. This limitation led to the invention of Unicode characters. Unicode is a superset of ASCII; It contains all the characters present in today's global writing system and it assigns each character a special Unicode Code Point. This Unicode Code Point is known as runes in Golang.&lt;/p&gt;

&lt;p&gt;Below is a representation of the ASCII table.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Oct   Dec   Hex   Char                        Oct   Dec   Hex   Char
────────────────────────────────────────────────────────────────────────
000   0     00    NUL '\0' (null character)   100   64    40    @
001   1     01    SOH (start of heading)      101   65    41    A
002   2     02    STX (start of text)         102   66    42    B
003   3     03    ETX (end of text)           103   67    43    C
004   4     04    EOT (end of transmission)   104   68    44    D
005   5     05    ENQ (enquiry)               105   69    45    E
006   6     06    ACK (acknowledge)           106   70    46    F
007   7     07    BEL '\a' (bell)             107   71    47    G
010   8     08    BS  '\b' (backspace)        110   72    48    H
011   9     09    HT  '\t' (horizontal tab)   111   73    49    I
012   10    0A    LF  '\n' (new line)         112   74    4A    J
013   11    0B    VT  '\v' (vertical tab)     113   75    4B    K
014   12    0C    FF  '\f' (form feed)        114   76    4C    L
015   13    0D    CR  '\r' (carriage ret)     115   77    4D    M
016   14    0E    SO  (shift out)             116   78    4E    N
017   15    0F    SI  (shift in)              117   79    4F    O
020   16    10    DLE (data link escape)      120   80    50    P
021   17    11    DC1 (device control 1)      121   81    51    Q
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A Unicode Code Point uniquely identifies a character in Unicode, where runes represent these characters as numbers. For instance, rune 32 denotes a space character. In Golang, &lt;code&gt;UTF-8&lt;/code&gt; encoding is utilized for characters (Unicode code points), represented by a sequence of 1 to 4 bytes. This makes runes the preferred method for string manipulation in Golang, facilitating direct interaction with characters. As software evolves, developers increasingly use runes to manage Unicode complexities, ensuring applications support multilingualism, emojis, and other Unicode functionalities.&lt;/p&gt;

&lt;p&gt;In Golang, a byte, an alias for uint8, spans 1 to 255, while a rune, aliasing &lt;code&gt;int32&lt;/code&gt;, signifies a Unicode code point, with characters encoded using &lt;code&gt;UTF-8&lt;/code&gt;. Runes empower developers to engage directly with characters.&lt;br&gt;
&lt;strong&gt;Working with Runes in Golang&lt;/strong&gt;&lt;br&gt;
There are different ways to initialize a rune in Golang. Let's use the Japanese Yen as an example. The Unicode code point of the Yen is &lt;code&gt;U+00A5.&lt;/code&gt;&lt;br&gt;
To initialize the yen, we can do so directly with the character or the Unicode representation of the character. This representation can be as an integer or a hexadecimal. The yen can also be initialized by an escape sequence. This escapes the U and + of the Unicode code point making it to be &lt;code&gt;\u00A5.&lt;/code&gt; The same escape as an octal escape will be &lt;code&gt;\245.&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;package main


func main() {
   yen := '¥'                  //initializing with the rune literal
   japYen := 165               //initializing with an integer
   jYen := 0x00A5              //initializing with a hex
   japanYen := '\u00A5'        //initializing with escape sequence
   japnYen := '\245'
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To print the rune as a character. You can use &lt;code&gt;fmt.Printf&lt;/code&gt; with the &lt;code&gt;%c&lt;/code&gt;  or type cast the rune variable to a string.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;package main


import "fmt"


func main() {
   yen := '¥'           // initializing with the rune literal
   japYen := 165        // initializing with an integer
   jYen := 0x00A5       // initializing with a hex
   japanYen := '\u00A5' // initializing with escape sequence
   japnYen := '\245'


   fmt.Printf("%c\n", yen)
   fmt.Printf("%c\n", japYen)
   // jYen is an int type, type cast it to rune then string to print the character.
   fmt.Println(string(rune(jYen)))
   fmt.Println(string(japanYen))
   fmt.Printf("%c\n", japnYen)
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This program will print the  &lt;code&gt;'¥'&lt;/code&gt; character on the terminal as shown below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;\test$ go run .
¥
¥
¥
¥
¥
\test$
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Slicing a string will give you a byte. In string manipulation, that is not ideal because as stated earlier; strings in go are encoded as a sequence 1 t0 4 bytes.&lt;br&gt;
To get the individual characters in a string. Range over the string to get the runes.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;package main


import "fmt"


func main() {
   str := "Happy Coding"


   // Range str to get the individual characters
   for _, v := range str {
       //This will print the characters one by one
       fmt.Println(string(v))
   }
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The above code will print the individual characters as follows;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/test$ go run .
H
a
p
p
Y


C
o
d
i
n
g
/test$
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To get the first character in a string. Range over, slicing it will give you the first byte, not the first character.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;package main


import "fmt"


func main() {
  str := "💞 code"


  // slicing a string gives you a byte not the character
  // not ideal for string manipulation
  fmt.Println(string(str[0]))


  // Range str to get the first character
  for i, v := range str {
     if i == 0 {
        fmt.Println(string(v))
     }
  }
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The first printing will give you this character ð. This is not the first character that you wanted. Ranging the string gives you the right character as shown below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/test$ go run .
ð
💞
/test$

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To better understand how to work with runes, let us develop a function that works as a Stconv.Atoi package where it takes a string and returns an integer type.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Atoi takes a string and returns an int with an error message
func Atoi(str string) (int, error) {
   var num int
   neg := false //check for negative numbers
   // str[0] gives us a byte. In this case the first byte
   // since the negative sign is an Ascii character. It is encoded as 1 byte
   //non-ASCII characters are encoded as sequences of 2 to 4 bytes
   //Slicing, or indexing a string gives you a byte, not a rune
   if string(str[0]) == "-" {
       neg = true
       str = str[1:]
   }


   // To get the runes in the string, range over the string
   //Ranging a string gives you a rune, not a byte
   for _, v := range str {
       // In the ascii table. The characters 0 to 9 are arranged in order
       if v &amp;gt;= '0' &amp;amp;&amp;amp; v &amp;lt;= '9' {
           // Let's say v is the character 5 with the rune of 54
           // subtracting 54 from the rune of 0 which is 49
           // gives you 5
           num = num*10 + int(v-'0')
       } else {
           // characters with runes less than 49 and
           // runes greater than 58 will return 0 and a
           // parsing error
           return 0, fmt.Errorf(" parsing %v: invalid syntax", str)
       }
   }
   if neg {
       num *= -1
   }
   return num, nil
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let’s write a program to test the function.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;package main


import "fmt"


func main() {
  // I'm not checking for errors
  num, _ := Atoi("45")
  num1, _ := Atoi("89")
  // Print the sum of num and num1
  fmt.Println(num + num1)


  // I am checking for errors
  num2, err2 := Atoi("ax56")
  if err2 != nil {
     fmt.Println(err2)
  }
  // num2 will be zero
  fmt.Println(num2)
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The above program will output the following;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/test$ go run .
134
parsing ax56: invalid syntax
0
/test$
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In summary, runes in Golang are fundamental for handling Unicode characters effectively within strings. They provide a way to represent and process individual characters in a way that is essential for robust and internationalized software development.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>go</category>
      <category>coding</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
