<?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: Ryan Kikayi</title>
    <description>The latest articles on DEV Community by Ryan Kikayi (@its_ryann).</description>
    <link>https://dev.to/its_ryann</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%2F3723370%2F7e32cf48-68b7-4078-a5eb-92e467cf1890.png</url>
      <title>DEV Community: Ryan Kikayi</title>
      <link>https://dev.to/its_ryann</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/its_ryann"/>
    <language>en</language>
    <item>
      <title>Go Error Handling: Annoying or Awesome?</title>
      <dc:creator>Ryan Kikayi</dc:creator>
      <pubDate>Mon, 25 May 2026 07:40:27 +0000</pubDate>
      <link>https://dev.to/its_ryann/go-error-handling-annoying-or-awesome-4dja</link>
      <guid>https://dev.to/its_ryann/go-error-handling-annoying-or-awesome-4dja</guid>
      <description>&lt;p&gt;For weeks when I was completely new to coding,I would always keep wondering; "What did I get myself into?", barely understanding what I'm looking at whenever I come across code that looked like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"data.txt"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="no"&gt;nil&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;log&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Fatal&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;err&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;io&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ReadAll&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="no"&gt;nil&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;log&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Fatal&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;err&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;var&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="n"&gt;MyStruct&lt;/span&gt;
&lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Unmarshal&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;data&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;result&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="no"&gt;nil&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;log&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Fatal&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;err&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;And for some reason it just did not make any sense to me at first; what do you mean we're using 9 lines of code just for error checking - has to be a joke?!&lt;br&gt;
Over at YouTube, no tutorial was relatable. I mean there were tutorials on error checking for python, and javascript, but the concept wasn't just sticking.&lt;br&gt;
Eventually, I ended up just copying chunks of code that I barely understood and pasted them into mine. Function returns two things, assign them to a variable and &lt;code&gt;err&lt;/code&gt;. Basically pasting the &lt;code&gt;if err != nil&lt;/code&gt; block was what I knew I was doing, the reason why? Not so much.&lt;br&gt;
I wasn't reading the error half of the time, I was just calling &lt;code&gt;log.Fatal(err)&lt;/code&gt; hoping it would never have to run.&lt;/p&gt;

&lt;p&gt;Later on after getting comfortable with the language, I decided to work on a personal project - a CLI tool that reads config files, makes API calls, and writes its output to disk. Unfortunately, it broke in production, the problem;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;_&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Marshal&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I had used a blank identifier &lt;code&gt;_&lt;/code&gt; to ignore the error completely - a habit I discovered to avoid having to write the check. This caused an API call to fail silently because the marshal was sending an empty body, and the API was rejecting it. And there I was, trying to debug something a single error message would have told me immediately.&lt;br&gt;
I realized, in Go errors are not exceptions, they're values - like regular data, a functions gives back to you. When you call a function that can fail, it returns two things; the result, and an error. Go hands you the error and trusts you to deal with it. So basically, writing &lt;code&gt;if err != nil&lt;/code&gt; is like saying "Something could go wrong here. What do you want to do about it?" in Go. Once  I finally understood that I started seeing them as decision points.&lt;/p&gt;

&lt;p&gt;So how do you actually make peace with it?&lt;/p&gt;

&lt;p&gt;Early on, I used to write my errors the same: &lt;code&gt;log.Fatal(err)&lt;/code&gt;. When something broke, I'd get a vague message like unexpected end of JSON input with zero context about where in my program it came from.&lt;br&gt;
The fix was wrapping errors with context using &lt;code&gt;fmt.Errorf&lt;/code&gt; :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;io&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ReadAll&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="no"&gt;nil&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;fmt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Errorf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"failed to read config file: %w"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;err&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;The %w keeps the original error intact so you can still inspect it, but now every error message tells you what your program was trying to do when it failed. That one change made debugging significantly less painful.&lt;br&gt;
The second thing that helped was setting up a snippet in my editor. In VS Code, typing &lt;code&gt;ife&lt;/code&gt; and hitting Tab expands to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="no"&gt;nil&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;err&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The official Go extension already includes this — check your snippet settings if you haven't already. It sounds like a small thing, but when you're writing the pattern twenty times a day, not having to type it from scratch every time genuinely reduces the friction.&lt;/p&gt;

&lt;p&gt;So — annoying or awesome?&lt;/p&gt;

&lt;p&gt;Honestly? Both. Annoying at first, awesome once you understand why it exists.&lt;br&gt;
Go made a deliberate choice to make error handling visible and local, rather than something that silently bubbles up through your stack and crashes things in ways you didn't expect. Every if err != nil is a decision point baked directly into your code. You always know where an error came from. You always have to decide what to do with it.&lt;br&gt;
For a first language, that turned out to be a surprisingly good environment to learn in. I couldn't ignore problems — Go wouldn't let me. And when things went wrong, the error was almost always exactly where Go said it was.&lt;br&gt;
Would I have picked a different first language if someone had warned me about this pattern? Maybe. Am I glad I stuck with Go? Absolutely.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;If you're learning Go right now, I'm curious — what part of the language caught you off guard the most? Drop it in the comments.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>webdev</category>
      <category>go</category>
      <category>softwareengineering</category>
    </item>
    <item>
      <title>Vibe Coding is a Last Resort Mistake!!</title>
      <dc:creator>Ryan Kikayi</dc:creator>
      <pubDate>Thu, 12 Feb 2026 09:31:38 +0000</pubDate>
      <link>https://dev.to/its_ryann/vibe-coding-is-a-last-resort-mistake-4ndp</link>
      <guid>https://dev.to/its_ryann/vibe-coding-is-a-last-resort-mistake-4ndp</guid>
      <description>&lt;p&gt;We've all been there. You're deep into a project, making great progress, and then you hit a wall. Maybe the app is having trouble reading data from the API, or your code for handling mistakes feels messy and confusing.&lt;br&gt;
Instead of reaching for the official docs, you reach for the AI—your "coding genius."&lt;br&gt;
That was my first big mistake.&lt;br&gt;
Ten minutes later, all my clean, manual progress was gone. The AI had:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Restructured my structs without asking.&lt;/li&gt;
&lt;li&gt;    Injected unnecessary pointers that made no sense.&lt;/li&gt;
&lt;li&gt;    Turned my logic into a "hallucinated" masterpiece that wouldn't even run.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I didn’t realize it then, but I had fallen into the trap. I barely understood what was happening in my own file. It became a frantic back-and-forth conversation with ChatGPT where all I was doing was prompting, copying error messages, and pasting code. We all know how the copy-paste game ends.&lt;/p&gt;

&lt;h3&gt;
  
  
  How I Saved the Project:
&lt;/h3&gt;

&lt;p&gt;To save my work, I had to stop the cycle. I was the victim, and my project was the casualty. To get back on track from that AI-generated mess, I had to take these steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The Hard Reset
I had to go back to my last working version. If you aren't using Git yet, let this be your wake-up call. Being able to "undo" a hallucination is the ultimate safety net. I opened my terminal and ran:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bash
# This command resets your file to the last saved version
git checkout -- weather_app.go
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Just like that, the AI "slop" was gone, and my original logic was back.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Surgical Prompting
I stopped giving the AI my entire file. I isolated one specific logic block and asked: "Why is this specific line throwing an error?"&lt;/li&gt;
&lt;li&gt;Verification
Once the AI suggested a solution, I verified it using outside resources like StackOverflow and the Official Go Docs. This helped me actually learn the why behind the fix.&lt;/li&gt;
&lt;li&gt;The "No-Paste" Rule
Instead of pasting the code directly, I forced myself to manually type the solution back into my editor. This rebuilt the mental connection between my brain and the screen.&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  The "S.P.E.C." Framework:
&lt;/h4&gt;

&lt;p&gt;From this encounter, I’ve learned that AI should be your last resort, not your first move when you hit a dead end. To keep your code from turning into "Slop," follow this framework:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;S - Scope: Give the AI only the snippet it needs. "Only edit the FetchWeather function."&lt;/li&gt;
&lt;li&gt;    P - Parameters: Explicitly tell it: "Use only standard libraries."&lt;/li&gt;
&lt;li&gt;    E - Edge Cases: Ask: "How should this handle a 404 or a timeout?"&lt;/li&gt;
&lt;li&gt;    C - Constraints: Be firm: "Do not change my existing struct definitions."&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Final Thoughts:
&lt;/h3&gt;

&lt;p&gt;In 2026, anyone can prompt, but not everyone can engineer.&lt;br&gt;
Don't let AI be the lead architect of your learning journey. Use it as a pair programmer that requires strict instructions. The moment you stop understanding what you're doing or what is on your screen—stop.&lt;br&gt;
Go back to your original code, follow the framework, and stay in control of your logic.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>ai</category>
      <category>productivity</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
