<?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: Collins Kipruto</title>
    <description>The latest articles on DEV Community by Collins Kipruto (@collo006).</description>
    <link>https://dev.to/collo006</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%2F3965939%2Fda206f1a-8660-487b-b104-99ad393f2d6e.jpeg</url>
      <title>DEV Community: Collins Kipruto</title>
      <link>https://dev.to/collo006</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/collo006"/>
    <language>en</language>
    <item>
      <title># Two Sleepless Nights, One Big Challenge: Building Resili at the Zone01 Hackathon 🌍🌧️</title>
      <dc:creator>Collins Kipruto</dc:creator>
      <pubDate>Mon, 31 Aug 2026 09:33:20 +0000</pubDate>
      <link>https://dev.to/collo006/-two-sleepless-nights-one-big-challenge-building-resili-at-the-zone01-hackathon-5ea</link>
      <guid>https://dev.to/collo006/-two-sleepless-nights-one-big-challenge-building-resili-at-the-zone01-hackathon-5ea</guid>
      <description>&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%2F55wqwsnc7618fo3r28j4.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%2F55wqwsnc7618fo3r28j4.png" alt=" " width="800" height="451"&gt;&lt;/a&gt;&lt;br&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%2Fnxp0d8zslnksxgt6f82c.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%2Fnxp0d8zslnksxgt6f82c.png" alt=" " width="800" height="451"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After two sleepless nights, countless ideas, debugging sessions, and team discussions, we finally made it to the finish line.&lt;/p&gt;

&lt;p&gt;I recently had the opportunity to participate in an &lt;strong&gt;in-house hackathon at Zone01&lt;/strong&gt;, focused on one of the most important challenges facing communities and businesses today: &lt;strong&gt;the Green Economy&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The challenge wasn't simply to build software.&lt;/p&gt;

&lt;p&gt;We had to identify a real-world problem, understand who was affected by it, and use technology to design a solution that could make a meaningful difference.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Challenge
&lt;/h2&gt;

&lt;p&gt;We were given seven different tracks to choose from:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;🌊 &lt;strong&gt;Lake Victoria Water Quality Monitoring &amp;amp; Intelligence Platform&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;💧 &lt;strong&gt;Smart Irrigation &amp;amp; Water Management for Smallholder Farmers&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;🌱 &lt;strong&gt;Carbon Footprint &amp;amp; Sustainability Reporting for SMEs&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;☀️ &lt;strong&gt;Solar Installation Monitoring &amp;amp; Asset Management Platform&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;♻️ &lt;strong&gt;Smart Waste Management &amp;amp; Route Optimization&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;🌧️ &lt;strong&gt;Climate Risk Intelligence &amp;amp; Resilience Platform&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;🐟 &lt;strong&gt;Fish Traceability Platform&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;After discussing the different challenges, my team decided to take on &lt;strong&gt;Track 6: Climate Risk Intelligence &amp;amp; Resilience Platform&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;And that is where &lt;strong&gt;Resili&lt;/strong&gt; was born.&lt;/p&gt;

&lt;h2&gt;
  
  
  🌧️ The Problem We Wanted to Solve
&lt;/h2&gt;

&lt;p&gt;Flooding is a major challenge for communities living in flood-prone areas, particularly around the Lake Victoria region.&lt;/p&gt;

&lt;p&gt;One of the biggest problems isn't necessarily the lack of information.&lt;/p&gt;

&lt;p&gt;It's &lt;strong&gt;getting the right information to the right people early enough to act&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;When communities receive warnings too late, there may not be enough time to move people, protect property, relocate livestock, or prepare essential supplies.&lt;/p&gt;

&lt;p&gt;We asked ourselves:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;What if technology could help communities receive trusted flood warnings days before a disaster occurs?&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That question became the foundation of our project.&lt;/p&gt;

&lt;h2&gt;
  
  
  Introducing Resili
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Resili&lt;/strong&gt; is a climate resilience and early-warning platform designed to help communities prepare for potential flooding before it happens.&lt;/p&gt;

&lt;p&gt;The idea is to combine &lt;strong&gt;verified information, risk intelligence, and community communication&lt;/strong&gt; into a single platform.&lt;/p&gt;

&lt;p&gt;Instead of simply telling someone:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"A flood is coming."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;We wanted the system to answer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Where is the risk?&lt;/li&gt;
&lt;li&gt;How serious is it?&lt;/li&gt;
&lt;li&gt;Who is likely to be affected?&lt;/li&gt;
&lt;li&gt;How much time do people have to prepare?&lt;/li&gt;
&lt;li&gt;What actions should they take?&lt;/li&gt;
&lt;li&gt;Where should they go if evacuation becomes necessary?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The goal is to move from &lt;strong&gt;reacting to disasters&lt;/strong&gt; to &lt;strong&gt;preparing for them&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  🤝 Working With Local Authorities
&lt;/h2&gt;

&lt;p&gt;One of the most important parts of our idea was collaboration with &lt;strong&gt;county governments and relevant authorities&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;A climate warning system is only useful if people trust the information it provides.&lt;/p&gt;

&lt;p&gt;For that reason, Resili was designed around the idea of using &lt;strong&gt;verified and signed sources&lt;/strong&gt; to communicate important warnings.&lt;/p&gt;

&lt;p&gt;The system could help authorities:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Monitor potential flood risks.&lt;/li&gt;
&lt;li&gt;Identify vulnerable areas.&lt;/li&gt;
&lt;li&gt;Issue verified warnings.&lt;/li&gt;
&lt;li&gt;Notify affected communities.&lt;/li&gt;
&lt;li&gt;Provide recommended preparedness actions.&lt;/li&gt;
&lt;li&gt;Coordinate evacuation efforts when necessary.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This creates a communication chain between &lt;strong&gt;risk intelligence → authorities → communities&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  🧠 More Than Just an Alert System
&lt;/h2&gt;

&lt;p&gt;We didn't want Resili to be another application that simply sends notifications.&lt;/p&gt;

&lt;p&gt;We wanted it to provide &lt;strong&gt;actionable information&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;For example, instead of only receiving:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;⚠️ Flood Warning&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;a resident could receive information such as:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HIGH FLOOD RISK&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;📍 Your area may be affected.&lt;/p&gt;

&lt;p&gt;⏱️ Prepare for possible evacuation.&lt;/p&gt;

&lt;p&gt;🎒 Keep essential documents and supplies ready.&lt;/p&gt;

&lt;p&gt;🐄 Move livestock and valuable equipment to safer locations.&lt;/p&gt;

&lt;p&gt;📢 Follow instructions from verified local authorities.&lt;/p&gt;

&lt;p&gt;This approach makes the information more useful because people know &lt;strong&gt;what to do next&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  💻 Building Under Pressure
&lt;/h2&gt;

&lt;p&gt;The most interesting part of the hackathon wasn't just the final product.&lt;/p&gt;

&lt;p&gt;It was the process.&lt;/p&gt;

&lt;p&gt;We had a very limited amount of time to go from:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Problem → Idea → Architecture → Development → Testing → Demo&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;And we had to make decisions quickly.&lt;/p&gt;

&lt;p&gt;There were moments when things didn't work.&lt;/p&gt;

&lt;p&gt;There were features we wanted to implement but couldn't complete within the available time.&lt;/p&gt;

&lt;p&gt;And, of course, there was a lot of debugging. 😅&lt;/p&gt;

&lt;p&gt;But that is probably one of the biggest lessons I took from the experience:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;You don't need perfect conditions to build something meaningful. You need a clear problem, a focused team, and the willingness to keep iterating.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  👨‍💻 What I Learned
&lt;/h2&gt;

&lt;p&gt;This hackathon taught me several things beyond writing code.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Start With the Problem
&lt;/h3&gt;

&lt;p&gt;It's easy as a developer to immediately think:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;"What technology can I use?"&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;But the better question is:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;"What problem are we actually solving?"&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Understanding the problem helped us decide which features were actually important.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Teamwork Matters
&lt;/h3&gt;

&lt;p&gt;Building a project under time pressure requires everyone to contribute.&lt;/p&gt;

&lt;p&gt;Ideas need to be challenged.&lt;/p&gt;

&lt;p&gt;Tasks need to be divided.&lt;/p&gt;

&lt;p&gt;People need to communicate.&lt;/p&gt;

&lt;p&gt;And sometimes you need someone on the team to say:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"This feature is nice, but we don't have time for it. Let's focus on what matters."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That discipline was extremely important for us.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Constraints Can Improve Your Thinking
&lt;/h3&gt;

&lt;p&gt;Having only a short amount of time forced us to focus on the &lt;strong&gt;MVP&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Instead of trying to build everything, we had to ask:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is the smallest version of this idea that can demonstrate real value?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That's a lesson I want to carry into future projects.&lt;/p&gt;

&lt;h2&gt;
  
  
  🏆 The Result
&lt;/h2&gt;

&lt;p&gt;After two intense and sleepless nights, we successfully completed the hackathon and presented &lt;strong&gt;Resili&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;I'm extremely proud of what our team managed to accomplish in such a short period.&lt;/p&gt;

&lt;p&gt;But more importantly, I'm grateful for the opportunity to work on a problem that goes beyond technology.&lt;/p&gt;

&lt;p&gt;Climate change and extreme weather events affect real people.&lt;/p&gt;

&lt;p&gt;As developers, we have an opportunity to build systems that don't just make life more convenient, but can potentially help communities become &lt;strong&gt;more informed, prepared, and resilient&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;A huge thank you to my amazing teammates and everyone at &lt;strong&gt;Zone01&lt;/strong&gt; who made this experience possible.&lt;/p&gt;

&lt;p&gt;Two sleepless nights.&lt;/p&gt;

&lt;p&gt;One challenging problem.&lt;/p&gt;

&lt;p&gt;One great team.&lt;/p&gt;

&lt;p&gt;And one solution we are proud to call &lt;strong&gt;Resili&lt;/strong&gt;. 🌍💻&lt;/p&gt;

&lt;h1&gt;
  
  
  Zone01 #Hackathon #ClimateTech #GreenEconomy #ClimateResilience #FloodManagement #EarlyWarningSystems #SoftwareDevelopment #TechnologyForGood
&lt;/h1&gt;

</description>
      <category>hackathon</category>
      <category>programming</category>
      <category>software</category>
    </item>
    <item>
      <title>🚀 Go Journey – Day 3: Accessing a Relational Database</title>
      <dc:creator>Collins Kipruto</dc:creator>
      <pubDate>Wed, 29 Jul 2026 13:03:42 +0000</pubDate>
      <link>https://dev.to/collo006/go-journey-day-3-accessing-a-relational-database-5g42</link>
      <guid>https://dev.to/collo006/go-journey-day-3-accessing-a-relational-database-5g42</guid>
      <description>&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%2Fp1w3kuf4gt8xpe88bgas.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%2Fp1w3kuf4gt8xpe88bgas.png" alt=" " width="800" height="392"&gt;&lt;/a&gt;&lt;br&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%2F02wrw1k9pk73bgr7q1jd.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%2F02wrw1k9pk73bgr7q1jd.png" alt=" " width="800" height="764"&gt;&lt;/a&gt;Today I wrapped up another milestone in my Go learning journey—connecting a Go application to a relational database.&lt;/p&gt;

&lt;p&gt;Over the past few days, I've been building my backend fundamentals step by step. I started with RESTful APIs, moved on to web applications, and today I learned how to interact with a MySQL database.&lt;/p&gt;

&lt;p&gt;One thing that stood out was how Go connects to a database. Instead of jumping straight into queries, you first configure the connection using the MySQL driver's Config struct and generate a DSN (Data Source Name) with FormatDSN(). After that, establishing the connection is surprisingly straightforward:&lt;/p&gt;

&lt;p&gt;db, err := sql.Open(...)&lt;br&gt;
if err != nil {&lt;br&gt;
    // handle error&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;This pattern has become very familiar to me. Whether I was building HTTP servers, writing REST APIs, or now working with databases, I keep seeing the same Go idiom:&lt;/p&gt;

&lt;p&gt;Perform an operation.&lt;br&gt;
Capture the result and err.&lt;br&gt;
Check if err != nil.&lt;br&gt;
Handle the error before moving on.&lt;/p&gt;

&lt;p&gt;At first, I wondered why Go checks for errors so frequently. But the more I build with it, the more I appreciate the language's philosophy. By handling errors immediately, you're forced to think about what could go wrong and make your applications more reliable.&lt;/p&gt;

&lt;p&gt;Another interesting observation was how similar querying multiple records and retrieving a single record by ID are. The structure is almost identical—the main difference is using Query() when expecting multiple rows and QueryRow() when expecting just one. That consistency made the concepts much easier to grasp.&lt;/p&gt;

&lt;p&gt;Ironically, this was the topic I was most nervous about before starting. I expected databases to be the hardest part of the journey, but they turned out to be the smoothest so far. It's a reminder that sometimes the things we anticipate the most end up being the easiest once we dive in.&lt;/p&gt;

&lt;p&gt;Looking forward to the next challenge as I continue building with Go.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>🚀 Go Journey – Day 1: Building my first RESTful API with Gin</title>
      <dc:creator>Collins Kipruto</dc:creator>
      <pubDate>Sun, 19 Jul 2026 10:47:36 +0000</pubDate>
      <link>https://dev.to/collo006/go-journey-day-1-building-my-first-restful-api-with-gin-316c</link>
      <guid>https://dev.to/collo006/go-journey-day-1-building-my-first-restful-api-with-gin-316c</guid>
      <description>&lt;p&gt;Last week, I officially started learning how to build RESTful APIs in Go.&lt;br&gt;
To keep things simple, I focused on the fundamentals before jumping into larger projects. My first API can:&lt;br&gt;
✅ Retrieve all albums (GET /albums)&lt;br&gt;
 ✅ Add a new album (POST /albums)&lt;br&gt;
 ✅ Retrieve a specific album by its ID (GET /albums/:id)&lt;br&gt;
Along the way, I learned what some of Gin's core features actually do instead of just copying code from tutorials.&lt;br&gt;
A few concepts that finally clicked for me:&lt;br&gt;
🔹 gin.Context&lt;br&gt;
Carries information about the incoming HTTP request.&lt;br&gt;
Helps read request data, validate input, and send responses back to the client.&lt;br&gt;
🔹 Context.IndentedJSON()&lt;br&gt;
Converts Go structs into properly formatted JSON.&lt;br&gt;
Sends the JSON back to the client along with the appropriate HTTP status code.&lt;br&gt;
🔹 BindJSON()&lt;br&gt;
Reads the JSON sent in the request body.&lt;br&gt;
Maps that data directly into a Go struct, making it easy to work with user input.&lt;br&gt;
One thing I'm trying to do differently this time is document everything I learn instead of rushing to the next topic. I even created a README explaining what each function in my project does, because I want to understand the "why" behind the code—not just make it work.&lt;br&gt;
This is only the beginning, but every endpoint I build is helping me understand how backend systems communicate with clients.&lt;br&gt;
Next up:&lt;br&gt;
Input validation&lt;br&gt;
Better error handling&lt;br&gt;
Connecting the API to a database&lt;br&gt;
Authentication&lt;br&gt;
I'm looking forward to seeing how much I improve over the next few months. 🚀&lt;/p&gt;

</description>
      <category>api</category>
      <category>backend</category>
      <category>beginners</category>
      <category>go</category>
    </item>
    <item>
      <title>Go Journey – Day 2: Building My First Web Application in Go 🚀</title>
      <dc:creator>Collins Kipruto</dc:creator>
      <pubDate>Sun, 19 Jul 2026 10:44:29 +0000</pubDate>
      <link>https://dev.to/collo006/go-journey-day-2-building-my-first-web-application-in-go-49md</link>
      <guid>https://dev.to/collo006/go-journey-day-2-building-my-first-web-application-in-go-49md</guid>
      <description>&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%2Fj5yka6u794q9twvx6nod.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%2Fj5yka6u794q9twvx6nod.png" alt=" " width="800" height="304"&gt;&lt;/a&gt;&lt;br&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%2Fj2zq4brrgdisu9kvcba8.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%2Fj2zq4brrgdisu9kvcba8.png" alt=" " width="800" height="304"&gt;&lt;/a&gt;&lt;br&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%2Fim0vbqdzmh7i5nn5o3i9.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%2Fim0vbqdzmh7i5nn5o3i9.png" alt=" " width="800" height="304"&gt;&lt;/a&gt;&lt;br&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%2Fd9hig3uylsiyrtfak69n.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%2Fd9hig3uylsiyrtfak69n.png" alt=" " width="800" height="599"&gt;&lt;/a&gt;&lt;br&gt;
I shared my experience building my first RESTful API in Go. This week, I took the next step in my Go journey by learning how to build web applications.&lt;/p&gt;

&lt;p&gt;The next milestone? Working with relational databases in Go.&lt;/p&gt;

&lt;p&gt;My goal with this series is simple: learn Go one step at a time while documenting the journey. By the end, I want to have enough knowledge to build a complete web application—from the backend to the frontend—and I hope others who are learning Go can follow along too.&lt;/p&gt;

&lt;p&gt;What I Learned This Week&lt;/p&gt;

&lt;p&gt;This week was all about understanding how a web application works under the hood. Instead of just writing code, I focused on understanding the flow of a request and how different components fit together.&lt;/p&gt;

&lt;p&gt;Here are some of the concepts I covered.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Storing Data with Structs&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The first step was learning how to represent data using Go structs.&lt;/p&gt;

&lt;p&gt;For the wiki application, each page was represented as a struct containing the page title and body.&lt;/p&gt;

&lt;p&gt;type Page struct {&lt;br&gt;
    Title string&lt;br&gt;
    Body  []byte&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;This became the foundation for everything else in the application.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Saving Data&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;After creating the struct, I learned how to save a page to disk.&lt;/p&gt;

&lt;p&gt;Each page is stored as a text file, using the page title as the filename. This gave me a better understanding of how Go handles file operations and methods.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Loading Existing Pages&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Saving data isn't enough—you also need to retrieve it.&lt;/p&gt;

&lt;p&gt;I learned how to read the stored files back into memory so users can view pages that were previously created.&lt;/p&gt;

&lt;p&gt;Although simple, this really helped me understand the flow of data in a web application.&lt;/p&gt;

&lt;p&gt;Understanding net/http&lt;/p&gt;

&lt;p&gt;One of the biggest topics this week was Go's net/http package.&lt;/p&gt;

&lt;p&gt;I learned how HTTP requests move through the application and how Go uses handlers to respond to users.&lt;/p&gt;

&lt;p&gt;Some of the things I explored included:&lt;/p&gt;

&lt;p&gt;Creating routes&lt;br&gt;
Handling requests and responses&lt;br&gt;
Redirecting users when a page doesn't exist&lt;br&gt;
Understanding http.ResponseWriter&lt;br&gt;
Understanding *http.Request&lt;/p&gt;

&lt;p&gt;Seeing how everything connects made the request-response cycle much clearer.&lt;/p&gt;

&lt;p&gt;Template Caching&lt;/p&gt;

&lt;p&gt;One of my favorite takeaways was learning about template caching.&lt;/p&gt;

&lt;p&gt;At first, I was parsing HTML templates every single time a request came in.&lt;/p&gt;

&lt;p&gt;func renderTemplate(w http.ResponseWriter, tmpl string, p *Page) {&lt;br&gt;
    t, err := template.ParseFiles(tmpl + ".html")&lt;br&gt;
    if err != nil {&lt;br&gt;
        http.Error(w, err.Error(), http.StatusInternalServerError)&lt;br&gt;
        return&lt;br&gt;
    }&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;err = t.Execute(w, p)
if err != nil {
    http.Error(w, err.Error(), http.StatusInternalServerError)
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;Then I learned there's a much better approach.&lt;/p&gt;

&lt;p&gt;Instead of repeatedly reading template files from disk, you can parse them once when the application starts.&lt;/p&gt;

&lt;p&gt;var templates = template.Must(&lt;br&gt;
    template.ParseFiles("edit.html", "view.html"),&lt;br&gt;
)&lt;/p&gt;

&lt;p&gt;This small change improves efficiency and is considered the better practice.&lt;/p&gt;

&lt;p&gt;It was a great reminder that writing code isn't just about making it work—it's also about making it perform well.&lt;/p&gt;

&lt;p&gt;Path Validation and Closures&lt;/p&gt;

&lt;p&gt;Another interesting concept I encountered was path validation.&lt;/p&gt;

&lt;p&gt;I learned how validating request paths prevents users from accessing invalid or unexpected routes.&lt;/p&gt;

&lt;p&gt;While implementing this, I was introduced to closures in Go—something I had heard about before but hadn't used in a practical example.&lt;/p&gt;

&lt;p&gt;That's definitely a topic I plan to explore further.&lt;/p&gt;

&lt;p&gt;My Biggest Takeaway&lt;/p&gt;

&lt;p&gt;This week taught me that building web applications is about much more than displaying pages.&lt;/p&gt;

&lt;p&gt;It's about understanding:&lt;/p&gt;

&lt;p&gt;how data flows,&lt;br&gt;
how requests are processed,&lt;br&gt;
how files are managed,&lt;br&gt;
how templates are rendered efficiently,&lt;br&gt;
and how to build applications that are secure and maintainable.&lt;/p&gt;

&lt;p&gt;Every chapter makes me appreciate Go's simplicity even more.&lt;/p&gt;

&lt;p&gt;What's Next?&lt;/p&gt;

&lt;p&gt;The next chapter of my journey is working with relational databases in Go.&lt;/p&gt;

&lt;p&gt;Once I have that in place, I'll begin combining everything I've learned into a larger project instead of isolated tutorials.&lt;/p&gt;

&lt;p&gt;If you're also learning Go, I'd love to hear what you're currently building or what topics you think I should explore next.&lt;/p&gt;

&lt;p&gt;Thanks for reading, and see you in the next chapter!&lt;/p&gt;

&lt;p&gt;Happy coding! 🚀&lt;/p&gt;

&lt;p&gt;Series: Learning Go in Public&lt;/p&gt;

&lt;p&gt;✅ Part 1: Building My First RESTful API&lt;br&gt;
✅ Part 2: Building My First Web Application&lt;br&gt;
🔜 Part 3: Working with Relational Databases in Go&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>devjournal</category>
      <category>go</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Building a Go Payment API Library From Scratch</title>
      <dc:creator>Collins Kipruto</dc:creator>
      <pubDate>Thu, 09 Jul 2026 13:03:30 +0000</pubDate>
      <link>https://dev.to/collo006/what-i-learned-building-a-go-payment-api-library-from-scratch-1chi</link>
      <guid>https://dev.to/collo006/what-i-learned-building-a-go-payment-api-library-from-scratch-1chi</guid>
      <description>&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%2F8yt38zuxi7qsy3nom4an.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%2F8yt38zuxi7qsy3nom4an.png" alt=" " width="800" height="414"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  description:
&lt;/h1&gt;

&lt;p&gt;Insights on pointers, methods, resource management, and HTTP clients while building an open-source Go library.&lt;/p&gt;

&lt;h1&gt;
  
  
  tags:
&lt;/h1&gt;

&lt;p&gt;golang, backend, webdev, learning&lt;/p&gt;

&lt;p&gt;A few days ago, a couple of friends and I decided to take a detour from our usual routines to build something practical: a &lt;strong&gt;Go library for payment APIs&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;The goal is simple. Instead of every Go developer writing custom, repetitive code to integrate payment gateways, they can just import our open-source library straight from GitHub. &lt;/p&gt;

&lt;p&gt;Building a library forces you to think deeply about architecture, developer experience, and language fundamentals. Here is everything this project has taught me so far.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Client Structure and a Sharper Grip on Pointers
&lt;/h2&gt;

&lt;p&gt;Setting up the base client structure required a lot of intentional data modeling. In doing so, I gained a much clearer understanding of &lt;strong&gt;pointers&lt;/strong&gt; in Go. Deciding when to pass a struct by value versus passing a pointer to mutating states is a critical choice when designing an API client that other developers will rely on.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Deconstructing the Authentication Flow
&lt;/h2&gt;

&lt;p&gt;Implementing authentication gave me a front-row seat to the full request-response lifecycle. I broke down the exact steps needed to establish a secure connection:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;URL Construction:&lt;/strong&gt; Building clean, dynamic endpoints.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Request Creation:&lt;/strong&gt; Preparing payloads and setting secure headers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Validation:&lt;/strong&gt; Verifying our data before it leaves the application.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Transmission &amp;amp; Response:&lt;/strong&gt; Sending the request to the admin server and handling the incoming payload cleanly.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  3. Functions vs. Methods: The Concrete Difference
&lt;/h2&gt;

&lt;p&gt;While the terms are often used interchangeably in other languages, Go draws a distinct line between functions and methods. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A Function&lt;/strong&gt; is a standalone block of code used to execute a program routine.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A Method&lt;/strong&gt; is simply a function that contains a &lt;strong&gt;receiver&lt;/strong&gt;, meaning it belongs to a specific type.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="c"&gt;// This is a standalone function&lt;/span&gt;
&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="n"&gt;ClearCache&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c"&gt;// logic here&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;// This is a method belonging to the 'User' struct type&lt;/span&gt;
&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;u&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;User&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;DeactivateAccount&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c"&gt;// logic here&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  4. Resource Management: Why You Must &lt;code&gt;defer Body.Close()&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;One of the biggest gotchas for newer Go developers is resource leakage via HTTP responses. When you make a network request, the server keeps the connection open until you explicitly close it. &lt;/p&gt;

&lt;p&gt;Using &lt;code&gt;defer response.Body.Close()&lt;/code&gt; right after checking for errors is mandatory. &lt;/p&gt;

&lt;p&gt;Think of it like borrowing a book from a library. If you keep borrowing books and never return them, your state keeps looping on "borrowing." Eventually, the library runs out of space, and you cannot borrow anymore. In Go, failing to close the body will cause your application to run out of memory and file descriptors.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Staying Flexible with &lt;code&gt;http.Client.Do()&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;When interacting with different payment endpoints, you encounter various HTTP verbs like &lt;code&gt;POST&lt;/code&gt;, &lt;code&gt;GET&lt;/code&gt;, &lt;code&gt;PUT&lt;/code&gt;, and &lt;code&gt;DELETE&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;Instead of wrapping our client in strict, specialized helpers, we relied on Go's native &lt;code&gt;http.Client.Do()&lt;/code&gt; method. Because &lt;code&gt;.Do()&lt;/code&gt; accepts a completely custom &lt;code&gt;*http.Request&lt;/code&gt; object, it accommodates any HTTP method seamlessly. If an upstream payment provider suddenly changes a route from a &lt;code&gt;POST&lt;/code&gt; to a &lt;code&gt;PUT&lt;/code&gt;, our underlying architecture remains intact and resilient.&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrapping Up
&lt;/h2&gt;

&lt;p&gt;This project is turning out to be an amazing engineering journey. By building this library, I am moving past just "using" payment APIs to truly understanding how they function under the hood. &lt;/p&gt;

&lt;p&gt;I'll be sharing more updates as my team moves closer to our alpha release. If you have any tips on building clean SDKs in Go, let me know in the comments below!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>What I Learned Building My First Go Project (go-reloaded)</title>
      <dc:creator>Collins Kipruto</dc:creator>
      <pubDate>Wed, 17 Jun 2026 09:42:25 +0000</pubDate>
      <link>https://dev.to/collo006/what-i-learned-building-my-first-go-project-go-reloaded-26k8</link>
      <guid>https://dev.to/collo006/what-i-learned-building-my-first-go-project-go-reloaded-26k8</guid>
      <description>&lt;p&gt;During my first week at Zone01 Kisumu, I worked on a project called &lt;strong&gt;go-reloaded&lt;/strong&gt;. It was my first real hands-on experience using Go, and it helped me understand not just the language, but also how to think like a developer.&lt;/p&gt;

&lt;p&gt;In this article, I’ll share what I learned, the challenges I faced, and the key concepts that made everything click.&lt;/p&gt;

&lt;p&gt;What the Project Was About&lt;/p&gt;

&lt;p&gt;The goal of the project was to build a small Go program that works with command-line arguments and processes input using Go’s standard libraries.&lt;/p&gt;

&lt;p&gt;This was my first time interacting deeply with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;os package&lt;/li&gt;
&lt;li&gt;command-line arguments (os.Args)&lt;/li&gt;
&lt;li&gt;basic Go program structure&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;At first, it felt confusing, but step by step, things started to make sense.&lt;/p&gt;

&lt;p&gt;What I Learned&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;How command-line arguments work in Go
I learned that Go provides access to raw input from the terminal using:
os.Args&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This returns a slice of strings where:&lt;br&gt;
os.Args[0] is the program name&lt;br&gt;
os.Args[1:] are the actual inputs&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Working with the &lt;code&gt;os&lt;/code&gt; package
The &lt;code&gt;os&lt;/code&gt; package became one of the most important parts of the project.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I used it to:&lt;br&gt;
Read input arguments&lt;br&gt;
Handle program execution flow&lt;br&gt;
Understand how programs interact with the system&lt;/p&gt;

&lt;p&gt;This helped me realize that Go is very close to the system level compared to JavaScript.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Breaking problems into smaller steps
One of the biggest lessons wasn’t about code—it was about thinking.
Instead of trying to solve everything at once, I learned to:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Understand the problem first&lt;br&gt;
Break it into smaller tasks&lt;br&gt;
Solve each part step by step&lt;/p&gt;

&lt;p&gt;This made debugging much easier.&lt;/p&gt;

&lt;p&gt;Challenges I Faced&lt;/p&gt;

&lt;p&gt;At the beginning, I struggled with:&lt;/p&gt;

&lt;p&gt;Understanding how &lt;code&gt;os.Args&lt;/code&gt; works&lt;br&gt;
Knowing where to start in the code&lt;br&gt;
Handling errors when inputs were missing&lt;/p&gt;

&lt;p&gt;Sometimes I would get stuck just trying to figure out what the program was actually receiving.&lt;/p&gt;

&lt;p&gt;But debugging helped me a lot. Printing values at each step made things clearer.&lt;/p&gt;

&lt;p&gt;Key Takeaways&lt;/p&gt;

&lt;p&gt;Go is very explicit compared to JavaScript&lt;br&gt;
The &lt;code&gt;os&lt;/code&gt; package is powerful for system-level interaction&lt;br&gt;
Command-line arguments are simple but very useful&lt;br&gt;
Problem-solving is more important than syntax&lt;br&gt;
Debugging is part of learning, not a failure&lt;/p&gt;

&lt;p&gt;Final Thoughts&lt;/p&gt;

&lt;p&gt;This project was a big step in my learning journey. It helped me understand how Go works and how to approach programming problems more effectively.&lt;/p&gt;

&lt;p&gt;I’m still learning, but each project is making things clearer.&lt;/p&gt;

&lt;p&gt;Next, I’m looking forward to building more complex projects and improving my backend and DevOps skills.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>cli</category>
      <category>go</category>
      <category>learning</category>
    </item>
  </channel>
</rss>
