<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Night Shift Dev]]></title><description><![CDATA[Night Shift Dev]]></description><link>https://blog.rickmwasofficial.me</link><generator>RSS for Node</generator><lastBuildDate>Fri, 17 Apr 2026 13:38:08 GMT</lastBuildDate><atom:link href="https://blog.rickmwasofficial.me/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[The DeepMind Quest]]></title><description><![CDATA[There is a seductive path in modern AI learning: jump straight into Python, import Scikit-learn or PyTorch, run a tutorial script, and watch the accuracy numbers go up. I took that path. It felt productive. I was "doing AI."
But there was always a na...]]></description><link>https://blog.rickmwasofficial.me/the-deepmind-quest</link><guid isPermaLink="true">https://blog.rickmwasofficial.me/the-deepmind-quest</guid><category><![CDATA[AI]]></category><category><![CDATA[research]]></category><category><![CDATA[Google DeepMind]]></category><category><![CDATA[Google]]></category><category><![CDATA[Machine Learning]]></category><category><![CDATA[Math]]></category><category><![CDATA[linear algebra ]]></category><dc:creator><![CDATA[Erick Mwangi]]></dc:creator><pubDate>Sun, 14 Dec 2025 09:43:01 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1765703845734/89ac42c9-4b82-4aab-aae2-ef7b3d7caa97.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>There is a seductive path in modern AI learning: jump straight into Python, import Scikit-learn or PyTorch, run a tutorial script, and watch the accuracy numbers go up. I took that path. It felt productive. I was "doing AI."</p>
<p>But there was always a nagging feeling, an imposter syndrome hovering in the background. I knew <em>how</em> to call the functions, but I didn’t truly understand <em>why</em> they worked. I was building a mental skyscraper on a foundation of sand. When things broke, or when I wanted to move beyond canned tutorials, I hit a wall. I realized something crucial was missing: the deep, intuitive understanding of the mathematics underneath the code.</p>
<p>My ultimate ambition is high: I want to work on cutting-edge AI at a place like Google DeepMind. To get there, "good enough" isn't good enough. I needed to stop, rewind, and build the foundation properly.</p>
<h3 id="heading-the-map-mathematics-for-machine-learning">The Map: <em>Mathematics for Machine Learning</em></h3>
<p><img src="https://mml-book.github.io/static/images/mml-book-cover.jpg" alt class="image--center mx-auto" /></p>
<p>I decided to tackle the definitive textbook: <a target="_blank" href="https://mml-book.github.io/"><em>Mathematics for Machine Learning</em></a> by Deisenroth, Faisal, and Ong. My goal is to internalize the "grammar" of ML before writing more "paragraphs" of code.</p>
<p>Today, I’m celebrating a significant milestone: <strong>I have completed Chapter 2: Linear Algebra.</strong> (The book starts counting content at Ch. 2).</p>
<p>This wasn't just about memorizing formulas. It was a journey from computation to intuition:</p>
<ol>
<li><p><strong>The Mechanics:</strong> It started with the nuts and bolts, what is a matrix, how does multiplication work, and solving systems of linear equations using Gaussian elimination.</p>
</li>
<li><p><strong>The Structure:</strong> Then, we moved into the abstract, vector spaces, subspaces, and bases. Understanding <em>where</em> these mathematical objects live.</p>
</li>
<li><p><strong>The Breakthrough (Linear Mappings):</strong> This was the most critical shift. I stopped seeing matrices as just static grids of numbers and started seeing them as active <em>transformations</em>, machines that stretch, rotate, and squash vectors from one coordinate system to another.</p>
</li>
</ol>
<p>Understanding that matrix multiplication is essentially a transformation of space is a game-changer for visualizing what neural networks are actually doing.</p>
<p>$$\begin{bmatrix} a &amp; b \\ c &amp; d \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = x \begin{bmatrix} a \\ c \end{bmatrix} + y \begin{bmatrix} b \\ d \end{bmatrix} = \begin{bmatrix} ax + by \\ cx + dy \end{bmatrix}$$</p><h3 id="heading-the-strategy-how-i-stay-consistent">The Strategy: How I Stay Consistent</h3>
<p>Math is hard. Self-studying math is even harder. Relying solely on willpower doesn't work for long-term goals like this. I needed a system.</p>
<p>My routine relies on a few key pillars to keep the momentum going:</p>
<ul>
<li><p><strong>The Pomodoro Technique:</strong> I break my study sessions into focused intervals. It prevents burnout and keeps my brain fresh for dense topics like null spaces and affine subspaces.</p>
</li>
<li><p><strong>Virtual Accountability (</strong><a target="_blank" href="https://www.youtube.com/@JamesScholz"><strong>James Scholz</strong></a><strong>):</strong> Studying alone can be isolating. I sync my sessions with James Scholz’s "Study With Me" streams on YouTube. There is a powerful, unspoken motivation in working alongside thousands of others, even virtually.</p>
</li>
<li><p><strong>Daily Inspiration (</strong><a target="_blank" href="https://www.instagram.com/5amoljen/"><strong>5amoljen</strong></a><strong>):</strong> Following accounts like 5amoljen on Instagram provides that necessary jolt of daily discipline. Seeing others wake up early and grind reminds me that the work needs to be done, regardless of how I feel.</p>
</li>
</ul>
<h3 id="heading-whats-next">What’s Next</h3>
<p>Clearing the Linear Algebra chapter feels great, but I’m not rushing to the next topic yet. Knowledge without application fades quickly.</p>
<p>My next step is to dive into the practice problems in the book. I need to prove to myself that I can apply these concepts, calculating ranks, finding kernels, and performing changes of basis, before moving on.</p>
<p>Once I’m confident, I will begin <strong>Chapter 3: Analytic Geometry</strong>, where we will add lengths, angles, and distances to the vector spaces I just learned about.</p>
<p>The journey to DeepMind is long, and I'm still near the starting line. But for the first time, I feel like I’m running on solid ground.</p>
]]></content:encoded></item><item><title><![CDATA[Building an Image Upload API in Go]]></title><description><![CDATA[I recently started learning Go (a.k.a. Golang) with the specific goal of writing backend APIs.Go is a lightweight, compiled, and blazing-fast language.
For this project-based learning session, I decided to build something practical: a backend API to ...]]></description><link>https://blog.rickmwasofficial.me/building-an-image-upload-api-in-go</link><guid isPermaLink="true">https://blog.rickmwasofficial.me/building-an-image-upload-api-in-go</guid><category><![CDATA[Go Language]]></category><category><![CDATA[Programming Blogs]]></category><category><![CDATA[APIs]]></category><dc:creator><![CDATA[Erick Mwangi]]></dc:creator><pubDate>Wed, 13 Aug 2025 17:51:57 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1755107435392/d8f7f6ab-a990-442c-a099-f0c48f868352.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I recently started learning <strong>Go</strong> (a.k.a. Golang) with the specific goal of writing backend APIs.<br />Go is a lightweight, compiled, and blazing-fast language.</p>
<p>For this project-based learning session, I decided to build something practical: <strong>a backend API to handle image uploads and store them locally</strong>.</p>
<p>Here’s the high-level process:</p>
<ol>
<li><p><strong>User uploads</strong> an image and metadata (like title and description) from the frontend via <code>multipart/form-data</code>.</p>
</li>
<li><p>The data is sent to an <strong>exposed API endpoint</strong>.</p>
</li>
<li><p>The server <strong>parses the request, validates the file, and stores it</strong>.</p>
</li>
</ol>
<hr />
<h2 id="heading-project-structure">Project Structure</h2>
<p>I wanted the codebase to be simple but easy to scale, so I split it into <code>cmd</code> and <code>internal</code> folders:</p>
<pre><code class="lang-markdown">image-api/
<span class="hljs-code">    cmd/
        server/
            server.go
    internal/
        handlers/
            handlers.go
        utils/
            utils.go</span>
</code></pre>
<ul>
<li><p><code>cmd/server/server.go</code> – Entry point. Sets up the HTTP server, defines API endpoints, and handles CORS.</p>
</li>
<li><p><code>internal/handlers/handlers.go</code> – Contains handler functions for each API route.</p>
</li>
<li><p><code>internal/utils/utils.go</code> – Utility functions (like file type validation).</p>
</li>
</ul>
<hr />
<h2 id="heading-setting-up-the-server-servergo">Setting Up the Server (<code>server.go</code>)</h2>
<pre><code class="lang-go"><span class="hljs-keyword">package</span> main

<span class="hljs-keyword">import</span> (
    <span class="hljs-string">"image_api/internal/handlers"</span>
    <span class="hljs-string">"log"</span>
    <span class="hljs-string">"net/http"</span>
)

<span class="hljs-function"><span class="hljs-keyword">func</span> <span class="hljs-title">main</span><span class="hljs-params">()</span></span> {
    http.HandleFunc(<span class="hljs-string">"/image-upload"</span>, withCORS(handlers.HandleImageUpload))
    http.HandleFunc(<span class="hljs-string">"/delete"</span>, withCORS(handlers.HandleImageDelete))
    http.HandleFunc(<span class="hljs-string">"/update"</span>, withCORS(handlers.HandleImageUpdate))
    http.HandleFunc(<span class="hljs-string">"/image"</span>, withCORS(handlers.HandleImageUpdate))

    log.Println(<span class="hljs-string">"Listening on port: 8282"</span>)
    err := http.ListenAndServe(<span class="hljs-string">"localhost:8282"</span>, <span class="hljs-literal">nil</span>)
    <span class="hljs-keyword">if</span> err != <span class="hljs-literal">nil</span> {
        log.Fatal(err)
    }
}

<span class="hljs-function"><span class="hljs-keyword">func</span> <span class="hljs-title">withCORS</span><span class="hljs-params">(h http.HandlerFunc)</span> <span class="hljs-title">http</span>.<span class="hljs-title">HandlerFunc</span></span> {
    <span class="hljs-keyword">return</span> <span class="hljs-function"><span class="hljs-keyword">func</span><span class="hljs-params">(w http.ResponseWriter, r *http.Request)</span></span> {
        w.Header().Set(<span class="hljs-string">"Access-Control-Allow-Origin"</span>, <span class="hljs-string">"*"</span>)
        w.Header().Set(<span class="hljs-string">"Access-Control-Allow-Methods"</span>, <span class="hljs-string">"GET, POST, PUT, DELETE, OPTIONS"</span>)
        w.Header().Set(<span class="hljs-string">"Access-Control-Allow-Headers"</span>, <span class="hljs-string">"Content-Type"</span>)
        h(w, r)
    }
}
</code></pre>
<p>The <code>withCORS</code> wrapper ensures requests from different origins don’t fail with <strong>CORS</strong> errors — essential when connecting your API to a frontend.</p>
<hr />
<h2 id="heading-handling-image-uploads-handlersgo">Handling Image Uploads (<code>handlers.go</code>)</h2>
<p>The heart of the project is the <strong>image upload handler</strong>:</p>
<pre><code class="lang-go"><span class="hljs-function"><span class="hljs-keyword">func</span> <span class="hljs-title">HandleImageUpload</span><span class="hljs-params">(w http.ResponseWriter, r *http.Request)</span></span> {
    <span class="hljs-comment">// Limit upload size to 10MB</span>
    err := r.ParseMultipartForm(<span class="hljs-number">10</span> &lt;&lt; <span class="hljs-number">20</span>)
    <span class="hljs-keyword">if</span> err != <span class="hljs-literal">nil</span> {
        http.Error(w, <span class="hljs-string">"File is too big or invalid format"</span>, http.StatusBadRequest)
        <span class="hljs-keyword">return</span>
    }

    <span class="hljs-comment">// Retrieve the file from form data</span>
    file, handler, err := r.FormFile(<span class="hljs-string">"file"</span>)
    <span class="hljs-keyword">if</span> err != <span class="hljs-literal">nil</span> {
        http.Error(w, <span class="hljs-string">"Could not read file"</span>, http.StatusBadRequest)
        <span class="hljs-keyword">return</span>
    }
    <span class="hljs-keyword">defer</span> file.Close()

    <span class="hljs-comment">// Validate file type</span>
    fileBytes, err := io.ReadAll(file)
    <span class="hljs-keyword">if</span> err != <span class="hljs-literal">nil</span> {
        http.Error(w, <span class="hljs-string">"Invalid file"</span>, http.StatusBadRequest)
        <span class="hljs-keyword">return</span>
    }
    <span class="hljs-keyword">if</span> !utils.IsValidFileType(fileBytes) {
        http.Error(w, <span class="hljs-string">"Invalid file type"</span>, http.StatusUnsupportedMediaType)
        <span class="hljs-keyword">return</span>
    }

    <span class="hljs-comment">// Get additional form fields</span>
    title := r.FormValue(<span class="hljs-string">"title"</span>)
    description := r.FormValue(<span class="hljs-string">"description"</span>)

    uploadDir := <span class="hljs-string">`C:\Users\USER\GolandProjects\image_api\uploads`</span>
    <span class="hljs-keyword">if</span> err := os.MkdirAll(uploadDir, <span class="hljs-number">0755</span>); err != <span class="hljs-literal">nil</span> {
        http.Error(w, <span class="hljs-string">"Could not create upload directory"</span>, http.StatusInternalServerError)
        <span class="hljs-keyword">return</span>
    }

    <span class="hljs-comment">// Save file to disk</span>
    filePath := filepath.Join(uploadDir, handler.Filename)
    dst, err := os.Create(filePath)
    <span class="hljs-keyword">if</span> err != <span class="hljs-literal">nil</span> {
        http.Error(w, <span class="hljs-string">"Could not save file"</span>, http.StatusInternalServerError)
        <span class="hljs-keyword">return</span>
    }
    <span class="hljs-keyword">defer</span> dst.Close()
    io.Copy(dst, bytes.NewReader(fileBytes))

    w.WriteHeader(http.StatusOK)
    fmt.Fprintf(w, <span class="hljs-string">"Uploaded: %s\nTitle: %s\nDescription: %s"</span>, handler.Filename, title, description)
}
</code></pre>
<p>Key points:</p>
<ul>
<li><p><strong>Size limit</strong> prevents huge uploads from consuming memory.</p>
</li>
<li><p><strong>File type validation</strong> ensures only images are accepted.</p>
</li>
<li><p><code>os.MkdirAll</code> guarantees the upload directory exists.</p>
</li>
<li><p><strong>Metadata capture</strong> allows storing more than just the image.</p>
</li>
</ul>
<hr />
<h2 id="heading-utility-functions-utilsgo">Utility Functions (<code>utils.go</code>)</h2>
<pre><code class="lang-go"><span class="hljs-function"><span class="hljs-keyword">func</span> <span class="hljs-title">IsValidFileType</span><span class="hljs-params">(file []<span class="hljs-keyword">byte</span>)</span> <span class="hljs-title">bool</span></span> {
    fileType := http.DetectContentType(file)
    <span class="hljs-keyword">return</span> strings.HasPrefix(fileType, <span class="hljs-string">"image/"</span>)
}
</code></pre>
<p>This small function makes sure the uploaded file really is an image — no disguised <code>.exe</code> files slipping in.</p>
<hr />
<h2 id="heading-running-the-api">Running the API</h2>
<ol>
<li><p>Clone or create the project.</p>
</li>
<li><p>Run:</p>
<pre><code class="lang-bash"> go run ./cmd/server
</code></pre>
</li>
<li><p>Send a request via <strong>Postman</strong> or a frontend form with:</p>
<ul>
<li><p>File field: <code>file</code></p>
</li>
<li><p>Metadata fields: <code>title</code>, <code>description</code></p>
</li>
</ul>
</li>
</ol>
<hr />
<p>With this small project, I not only learned about Go’s <code>net/http</code> package but also got comfortable with handling <strong>multipart/form-data</strong>, file validation, and CORS.<br />It’s a solid first step toward building more complex APIs in Go.</p>
]]></content:encoded></item><item><title><![CDATA[Palantir Secures Up to $10B Deal with U.S. Army]]></title><description><![CDATA[Palantir Technologies (NASDAQ:PLTR) has announced a significant deal with the U.S. Army, potentially worth up to $10 billion over the next ten years. This agreement establishes a framework for the Army's use of Palantir's data analysis and software s...]]></description><link>https://blog.rickmwasofficial.me/palantir-secures-up-to-10b-deal-with-us-army</link><guid isPermaLink="true">https://blog.rickmwasofficial.me/palantir-secures-up-to-10b-deal-with-us-army</guid><category><![CDATA[AI]]></category><category><![CDATA[automation]]></category><dc:creator><![CDATA[Erick Mwangi]]></dc:creator><pubDate>Sat, 02 Aug 2025 12:41:25 GMT</pubDate><enclosure url="https://static.seekingalpha.com/cdn/s3/uploads/getty_images/2219849110/image_2219849110.jpg?io=getty-c-w750" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Palantir Technologies (NASDAQ:PLTR) has announced a significant deal with the U.S. Army, potentially worth up to $10 billion over the next ten years. This agreement establishes a framework for the Army's use of Palantir's data analysis and software solutions. The deal represents a major win for Palantir, solidifying its position as a key technology provider for the U.S. military. This is a significant financial commitment and demonstrates continued confidence in Palantir's capabilities to support the Army's operational needs. </p>
<p><a target="_blank" href="https://static.seekingalpha.com/cdn/s3/uploads/getty_images/2219849110/image_2219849110.jpg?io=getty-c-w750">Image of military personnel and data analytics interface</a></p>
]]></content:encoded></item><item><title><![CDATA[Battlefield 6 Preorders Now Live: Get Ready to Deploy!]]></title><description><![CDATA[Get ready, soldiers! Battlefield 6 is on the horizon, launching October 10th for PS5, Xbox Series X|S, and PC. After nearly four years, the next installment in the Battlefield series is almost here, and preorders are officially open!
This is exciting...]]></description><link>https://blog.rickmwasofficial.me/battlefield-6-preorders-now-live-get-ready-to-deploy</link><guid isPermaLink="true">https://blog.rickmwasofficial.me/battlefield-6-preorders-now-live-get-ready-to-deploy</guid><category><![CDATA[AI]]></category><category><![CDATA[automation]]></category><dc:creator><![CDATA[Erick Mwangi]]></dc:creator><pubDate>Sat, 02 Aug 2025 12:38:08 GMT</pubDate><enclosure url="https://www.gamespot.com/a/uploads/screen_kubrick/1595/15950357/4541675-bf6hed.jpg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Get ready, soldiers! Battlefield 6 is on the horizon, launching October 10th for PS5, Xbox Series X|S, and PC. After nearly four years, the next installment in the Battlefield series is almost here, and preorders are officially open!</p>
<p>This is exciting news for fans eager to jump back into the action. While details on specific gameplay features are still emerging, the preorder availability signals a significant step toward the game's release. Keep an eye out for more information about different editions and their exclusive bonuses as they become available.</p>
]]></content:encoded></item><item><title><![CDATA[From Observer to Participant: My First Tech Event Experience 🌟]]></title><description><![CDATA[Yesterday marked a significant milestone in my tech journey as I attended DevFest Mt.Kenya 2024. As a first-timer in the tech conference scene, I wasn't quite sure what to expect - but what unfolded was nothing short of inspiring.
Key takeaways that ...]]></description><link>https://blog.rickmwasofficial.me/from-observer-to-participant-my-first-tech-event-experience</link><guid isPermaLink="true">https://blog.rickmwasofficial.me/from-observer-to-participant-my-first-tech-event-experience</guid><category><![CDATA[technology]]></category><category><![CDATA[devfest]]></category><dc:creator><![CDATA[Erick Mwangi]]></dc:creator><pubDate>Sat, 02 Aug 2025 07:31:24 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1754119783211/dfc92e0e-8c59-4d51-9ceb-e58884c3fa30.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Yesterday marked a significant milestone in my tech journey as I attended DevFest Mt.Kenya 2024. As a first-timer in the tech conference scene, I wasn't quite sure what to expect - but what unfolded was nothing short of inspiring.</p>
<p>Key takeaways that resonated with me:</p>
<p>💡 Community &amp; Collaboration</p>
<p>One of the standout moments was connecting with incredible minds in tech, including several professionals I've long admired. A powerful reminder came from a keynote speaker: "If you want to go fast, work alone; but if you want to go far, work with a team." This perfectly captures the essence of what I learned about the tech community's collaborative spirit.</p>
<p>🔍 Building Developer Relations</p>
<p>We delved into strategic approaches for fostering developer relationships, focusing on three critical pillars:</p>
<ul>
<li><p>Identifying clear goals</p>
</li>
<li><p>Understanding your target audience</p>
</li>
<li><p>Measuring impact and iterating based on successes and failures</p>
</li>
</ul>
<p>🤖 AI Beyond Chatbots</p>
<p>The AI breakout sessions were particularly enlightening. It was refreshing to explore AI applications beyond the typical chatbot use cases, discovering innovative solutions to real-world challenges. This session expanded my perspective on AI's potential impact across various sectors.</p>
<p>🎯 Moving Forward</p>
<p>This experience has ignited a dual mission: developing my technical skills while contributing to our campus tech community's growth. While I feel challenged by the road ahead, I'm incredibly motivated by the possibilities.</p>
<p>As I look toward DevFest 2025, I'm excited to measure my growth and continue this journey in tech. A huge thank you to the organizers and everyone who made this event unforgettable!</p>
]]></content:encoded></item></channel></rss>