<?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" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Victor Mwangi on Medium]]></title>
        <description><![CDATA[Stories by Victor Mwangi on Medium]]></description>
        <link>https://medium.com/@mwangiruoya?source=rss-7fb3c4ae7db7------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Mc_3ti-_HmukIAZkKq8aow.jpeg</url>
            <title>Stories by Victor Mwangi on Medium</title>
            <link>https://medium.com/@mwangiruoya?source=rss-7fb3c4ae7db7------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 16 Nov 2026 21:13:54 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mwangiruoya/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[MastraAI a Quick Guide]]></title>
            <link>https://medium.com/@mwangiruoya/mastraai-a-quick-guide-d8cf6e3f1fb2?source=rss-7fb3c4ae7db7------2</link>
            <guid isPermaLink="false">https://medium.com/p/d8cf6e3f1fb2</guid>
            <dc:creator><![CDATA[Victor Mwangi]]></dc:creator>
            <pubDate>Tue, 04 Nov 2025 16:11:53 GMT</pubDate>
            <atom:updated>2025-11-04T16:11:53.100Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://mastra.ai/docs/">MastraAI</a> makes it easy to quickly setup and build AI agents by offering a template weather AI assistant. To get started in using Mastra you first need to install it.</p><p>First we create the project directory.</p><pre>mkdir weatherAssistant</pre><p>Then we move into the directory and install mastra.</p><pre>cd weatherAssistant<br></pre><pre>npm create mastra@latest</pre><p>It will then provide you with a set of instructions to help you quickly get set up with what you want to build where you will also get to choose your model of choice.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/601/1*0bN9IK9qjmaSW6uJGF99TA.png" /></figure><p>It comes bundled with an MCP server that gets integrated into your IDE of choice. From here it installs all dependencies and the first thing we do since we never set our API key is create the environment variables.</p><pre>touch .env<br></pre><pre>echo &quot;GOOGLE_API_KEY=********&quot; &gt; .env</pre><p>The next thing I suggest is to understand the project structure and get to know what goes where. We navigate into the src directory where the core code for the project exists.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/633/1*QFd1WLXmGoZisLRxkDKIhw.png" /></figure><p>There four main directories offering separation of concerns and making the code cleaner and more maintenable.</p><p>agents/ — This is where we give the name, set of inctructions, models, tools for the AI assistant to use, scorers and memory to ensure the agent never looses context.</p><p>scorers/ — These help evaluate the agents performance over time. The success metrics in which the agent is measured by and are optional.</p><p>tools/ — These are tools that can include apis which the agent can use.</p><p>workflows/ — These are multi-step workflows that orchestrate agents and tools together.</p><p>The MCP server that gets bundled with the project provides full access to the mastraai documentation helping one’s IDE get full context of the mastra tool.</p><p>Depending on your needs or use cases the files in these four directories are what you need to change for example when creating a recipe AI assistant.</p><p>src/mastra/agents/recipe-agent.ts</p><pre>import { Agent } from &#39;@mastra/core/agent&#39;;<br>import { Memory } from &#39;@mastra/memory&#39;;<br>import { LibSQLStore } from &#39;@mastra/libsql&#39;;<br>import { recipeTool } from &#39;../tools/recipe-tool&#39;;<br>import { nutritionTool } from &#39;../tools/nutrition-tool&#39;;<br>import { substitutionTool } from &#39;../tools/substitution-tool&#39;;<br>import { scorers } from &#39;../scorers/recipe-scorer&#39;;<br><br>export const recipeAgent = new Agent({<br>  name: &#39;Recipe Assistant&#39;,<br>  instructions: `<br>      You are an expert culinary assistant that helps users discover, understand, and create delicious recipes.<br>      Your primary functions include:<br>      - Finding recipes based on ingredients, dietary restrictions, cuisine type, or meal preferences<br>      - Providing detailed cooking instructions with clear, step-by-step guidance<br>      - Suggesting ingredient substitutions for allergies, dietary needs, or availability<br>      - Offering nutritional information and portion adjustments<br>      - Recommending cooking techniques and tips for better results<br>      <br>      When responding:<br>      - If the user mentions ingredients they have, suggest recipes using those ingredients<br>      - Always clarify dietary restrictions (vegetarian, vegan, gluten-free, etc.) if relevant<br>      - Provide cook time, prep time, and serving size clearly<br>      - Use metric and imperial measurements based on user preference (default to their location)<br>      - If a recipe seems complex, offer to break it down into simpler steps<br>      - When suggesting substitutions, explain how they affect taste and texture<br>      - Keep responses organized and easy to follow<br>      - If the user asks for variations, offer creative but practical alternatives<br>      <br>      Use the available tools to fetch recipes, nutritional data, and ingredient substitutions.<br>`,<br>  model: &#39;google/gemini-2.5-pro&#39;,<br>  tools: { <br>    recipeTool,<br>    nutritionTool,<br>    substitutionTool<br>  },<br>  scorers: {<br>    toolCallAppropriateness: {<br>      scorer: scorers.toolCallAppropriatenessScorer,<br>      sampling: {<br>        type: &#39;ratio&#39;,<br>        rate: 1,<br>      },<br>    },<br>    recipeRelevance: {<br>      scorer: scorers.recipeRelevanceScorer,<br>      sampling: {<br>        type: &#39;ratio&#39;,<br>        rate: 1,<br>      },<br>    },<br>    instructionClarity: {<br>      scorer: scorers.instructionClarityScorer,<br>      sampling: {<br>        type: &#39;ratio&#39;,<br>        rate: 0.3, // Sample 30% to reduce overhead<br>      },<br>    },<br>    dietaryAccuracy: {<br>      scorer: scorers.dietaryAccuracyScorer,<br>      sampling: {<br>        type: &#39;ratio&#39;,<br>        rate: 1,<br>      },<br>    },<br>  },<br>  memory: new Memory({<br>    storage: new LibSQLStore({<br>      url: &#39;file:../mastra.db&#39;,<br>    }),<br>  }),<br>});</pre><p>The scorers for our recipe AI agent would then look like.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d8cf6e3f1fb2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Stage 0: HNG13]]></title>
            <link>https://medium.com/@mwangiruoya/stage-0-hng13-37fa460111a5?source=rss-7fb3c4ae7db7------2</link>
            <guid isPermaLink="false">https://medium.com/p/37fa460111a5</guid>
            <dc:creator><![CDATA[Victor Mwangi]]></dc:creator>
            <pubDate>Fri, 17 Oct 2025 19:26:53 GMT</pubDate>
            <atom:updated>2025-10-17T19:26:53.555Z</atom:updated>
            <content:encoded><![CDATA[<p>I have been learning Golang for a while now and got to understand the core concepts but I did not want to get stuck in tutorial hell so what better way than to join HNG13. I had been part of HNG11 using Python so i know it would be intensive but I am sure it would be the best way to learn.</p><p>To build my Go project I was stuck on whether I should use a framework or just utilize Go’s http Client, I decided to go with the latter and I am glad I did. I got to utilize Go’s in-built libraries:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/773/1*63N0VpXT7AsRUQqn7GTqaw.png" /></figure><p>They might seem simple but I assure you they pack a whole load of power. I got to also create structs and their simplicity especially had me in awe. You create structs, struct of structs and they make it so easy to handle data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/795/1*8I60XkA-RY-pS4lIaPQmAg.png" /></figure><p>The handler’s in Go are more or less like controllers, a concept I understand coming from an MVC background. Handler functions allow for one to create functions that allow http requests with the http.ResponseWriter and http.Request provided by net/http. These are only some of the handlers that the net/http library provides, one can also create custom handlers but for this one I opted to utilize what is provided by net/http.</p><p>Querying the cat fact API also gave me the chance to revisit the concept of Marshaling and UnMarshaling, a concept synonymous with JSON provided by the encoding/json library. This makes it easy to transmit or store data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FrXaXy5aUnZwMw0h1QJY1w.png" /></figure><p>To make sure this runs on an endpoint we define the endpoint and handler to call on that endpoint.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/944/1*bKiO-sQUreoyg4iynPgxZw.png" /></figure><p>Now, thats where we got to build it but now how do we run this? We have to first compile. Simply running: go build gives a compiled file that only leaves you with having to run ./profile to have the app running.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/944/1*yKY1ODAvYk40I8Q6Qu3G3Q.png" /></figure><p>Now let us test to ensure it works as we want it to. We use curl for this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bLlv-2vf8_pj2Zu1EByifA.png" /></figure><p>There we have it. I got to revisit alot of concepts and had alot of fun builing this one. And yes, yes I use vim by the way :-).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=37fa460111a5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[So HNG, Firsttime?]]></title>
            <link>https://medium.com/@mwangiruoya/so-hng-firsttime-43cfa5216587?source=rss-7fb3c4ae7db7------2</link>
            <guid isPermaLink="false">https://medium.com/p/43cfa5216587</guid>
            <category><![CDATA[internships]]></category>
            <category><![CDATA[backend-development]]></category>
            <dc:creator><![CDATA[Victor Mwangi]]></dc:creator>
            <pubDate>Sat, 29 Jun 2024 20:13:11 GMT</pubDate>
            <atom:updated>2024-06-29T20:15:33.056Z</atom:updated>
            <content:encoded><![CDATA[<iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FzPVOdbnFt0e4PxX6Rd%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExMjY4OTkwaWcyb2Qybzg3YzByMjB5enEyZGp3MzJrdGIyMXc1NWx3eCZlcD12MV9naWZzX3NlYXJjaCZjdD1n%2FzPVOdbnFt0e4PxX6Rd%2Fgiphy.gif&amp;image=https%3A%2F%2Fmedia2.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExM3B6aWl0OWdqaXdnNHdmN3Zra2xhajd4MjMzdjcyNGM0bTNvcTVvZiZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw%2FzPVOdbnFt0e4PxX6Rd%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="435" frameborder="0" scrolling="no"><a href="https://medium.com/media/127b72ab24e07f3cffb92a70eb43cead/href">https://medium.com/media/127b72ab24e07f3cffb92a70eb43cead/href</a></iframe><p>Being a backend developer who endeavours to create solutions that enhance human endeavors. I have in this journey faced significant obstacles but resilience and willingness to learn at every obstacle has helped me emerge better.One of the recent challenges i faced was while contributing to an open source project i couldn’t tell which database the initiaters of the project wanted being new to docker was what made me take time to realise.</p><h4><strong>Solutions</strong></h4><ol><li>RTFM<br>The old rule of ‘read the fucking manual’ had me going back to docker documentation to understand what goes where and especially considering the project was one that would be used by over a million users i understood this was necessary.<br>The yaml file turned out to be where the magic lays, and after a bit of twiking i was able to configure the database on my localhost to work with the project.</li></ol><h4>Why <a href="https://hng.tech/internship">HNG</a>, anyway?</h4><p>To be honest its not the first time i find myself being a part of this great internship, what i especially find addictive about it is its hands on approach to projects with clear timelines.<br>This constantly being on your toes while experiencing new challenges can be quite addictive especially being the kind of guy that likes a good challenge.<br>The journey and experience of being part of such great projects while interacting and contributing with people from diverse regions culminating into a rich thought pool that creates solutions that truly shine a light on why this <a href="https://hng.tech/internship">HNG</a> programme is truly worth it.</p><p>This year unlike the last one, i look forward to finishing what i start and i do wish the best for my fellow peers in this shared determination.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=43cfa5216587" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[To Django or to DjangoREST?]]></title>
            <link>https://medium.com/@mwangiruoya/to-django-or-to-djangorest-2ed15eb15ba4?source=rss-7fb3c4ae7db7------2</link>
            <guid isPermaLink="false">https://medium.com/p/2ed15eb15ba4</guid>
            <category><![CDATA[django-rest-framework]]></category>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[django]]></category>
            <category><![CDATA[django-framework]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Victor Mwangi]]></dc:creator>
            <pubDate>Sun, 04 Feb 2024 18:37:11 GMT</pubDate>
            <atom:updated>2024-02-04T18:37:11.190Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Qf6g2_-dVaFgdFts" /><figcaption>Photo by <a href="https://unsplash.com/@yessijes?utm_source=medium&amp;utm_medium=referral">Jessica Pamp</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Django and DjangoREST are high level frameworks in Python that are usually argued on whether they are different, but are they?. DjangoREST is used for building API’s(Application Programming Interface) while Django for web <a href="http://apps.to/">apps.To</a> leave it at that though would leave one with a conclusion and so lets explore further.</p><p><strong>What is Django?</strong></p><p>It is a high level framework that follows the Model-View-Template(MVT) pattern. It handles both front-end and back-end development providing features for a standard web app. Utilises the Object-Relational Mapping(ORM) simplifying database interactions and adhering to the DRY(Don’t Repeat Yourself) principle.</p><p>Handles URL routing, template rendering, database management. It is tightly coupled with django templates.</p><p><strong>What is DjangoREST?</strong></p><p>An extension of Django framework specialized for API’s. Data is returned in json format, the API standard. It leverages Djangos abilities to facilitate development of scalable, maintainable and secure API’s.</p><p>It adheres to Django’s principles like DRY and strongly emphasize code reusability and modularity.</p><p><strong>So really whats the difference?</strong></p><p>There really is no difference but instead one only needs to understand what they wish to accomplish.</p><p>i) DRF(DjangoREST Framework) offers scalability capabilities for example when your web app becomes popular and now you need an app, it makes it easy to switch over.</p><p>With Django one would need to create a whole other back-end and make migrations on the user data. This can be time consuming and resource intensive.</p><p>ii) When there is multiple teams, frontend and backend, working on a system, DRF makes it easy.The backend team can work on the backend while the frontend can work with frameworks and utilize axios to hit urls.</p><p>iii)If you are looking to create a standard and simple web app, Django offers inbuilt templating languages.When you need to use frontend frameworks like Angular or React then DRF makes it easier to integrate them.</p><p><strong>Conclusion</strong></p><p>There is no difference between Django and DRF(Django Rest Framework), while one renders templates and the other data in json format. It waters down to the projects specific needs and goals</p><p>Although this can be seen as a difference, It is truly only clear that one is an extension of the other and the difference lies in understanding what you want to accomplish.</p><p>Further read and references:</p><ul><li><a href="https://docs.djangoproject.com/en/4.2/faq/general/#django-appears-to-be-a-mvc-framework-but-you-call-the-controller-the-view-and-the-view-the-template-how-come-you-don-t-use-the-standard-names">Django</a></li><li><a href="https://www.django-rest-framework.org/">Home - Django REST framework</a></li></ul><p><a href="https://stackoverflow.com/questions/49109791/django-or-django-rest-framework">https://stackoverflow.com/questions/49109791/django-or-django-rest-framework</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2ed15eb15ba4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Jinja2 Templates in Flask]]></title>
            <link>https://medium.com/@mwangiruoya/jinja2-templates-in-flask-5f9661f4ffd8?source=rss-7fb3c4ae7db7------2</link>
            <guid isPermaLink="false">https://medium.com/p/5f9661f4ffd8</guid>
            <dc:creator><![CDATA[Victor Mwangi]]></dc:creator>
            <pubDate>Mon, 22 Jan 2024 19:39:49 GMT</pubDate>
            <atom:updated>2024-01-22T19:39:49.895Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*SeXzEvHpskJA4tQk" /><figcaption>Photo by <a href="https://unsplash.com/@casparrubin?utm_source=medium&amp;utm_medium=referral">Caspar Camille Rubin</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Jinja2 is a templating engine in Python,In flask it provides a way to dynamically pass backend content to the frontend this helps expand the functionality of the web app while maintaining a simple and organised file structure.</p><p>To install Jinja2 run:</p><pre>pip install Jinja2</pre><p>Jinja2 is compatible with Python3.</p><p><strong>Why consider?</strong></p><ol><li>Dynamic content: it seamlessly enables the embedding of dynamic content into HTML files by passing Python code to the template, with Jinja2 handling the rendering in HTML. This simplifies the display of dynamic information without the need for manual DOM manipulation with Javascript.</li><li>Code Reusability: allows one to reuse pieces of code across different pages.Elements like headers, footers or navigation bars can be placed in separate templates and included in multiple pages reducing redundancy and promoting maintainability.</li><li>Template Inheritance: you can create a base html and extend or override specific blocks in child templates.</li></ol><p><strong>Syntax:</strong></p><p>Variables: representations of application data that are used inside templates.They are identified with the {{ }} tag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/463/1*k8RkLg2GZCO9TFSdEa0BCg.png" /></figure><p>Conditionals:they control the content that is returned from Flask routes.</p><p>{% if condition %} {% endif %}.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/467/0*UHjEmnXEoMM1hc17" /></figure><p>Loops: used to repeat content or iterate through data during jinja2 template engine processing.</p><p>{% for topping in toppings %}</p><p>{% endfor %}</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/467/0*GRTFIhAwp5ap73vG" /></figure><p>This is the base.html file that gets extended.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/855/0*7c8zrYachBZQu7h6" /></figure><p>The {% block title %} marks the beginning of the title element and the stylesheet.</p><p>Further reading and references:</p><p><a href="https://www.codecademy.com/learn/learn-flask/modules/flask-templates-and-forms/cheatsheet">Code Academy</a></p><p><a href="https://flask.palletsprojects.com/en/2.0.x/security/">Security Considerations</a></p><p><a href="https://jinja.palletsprojects.com/en/3.1.x/api/#basics">Jinja Documentation</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5f9661f4ffd8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My alx Journey…]]></title>
            <link>https://medium.com/@mwangiruoya/my-alx-journey-eb25ae7528d9?source=rss-7fb3c4ae7db7------2</link>
            <guid isPermaLink="false">https://medium.com/p/eb25ae7528d9</guid>
            <dc:creator><![CDATA[Victor Mwangi]]></dc:creator>
            <pubDate>Tue, 08 Aug 2023 18:25:20 GMT</pubDate>
            <atom:updated>2023-08-08T18:25:20.174Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*I5o6yqc_VhFQs8Ib" /><figcaption>Photo by <a href="https://unsplash.com/@miquel_parera_mila?utm_source=medium&amp;utm_medium=referral">Miquel Parera</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>I recently graduated from alx-Africa Full Stack Software Engineering bootcamp and looking back one year i am reminded of Charles Dickens words, “It was the best of times, it was the worst of times”.From moments of complete understanding and innovative solutions to times of doubt and near defeat, my journey has been a rollercoaster of emotions. The greatest battles fought are those found within the realms of the mind,overcoming the lowest moments motivated me to keep going and stay consistent no matter what. It has been the greatest test of my resilience, discipline and consistency and I am glad that i emerged victorious in it all, the program has pushed me to think critically and devise solutions for real-world problems using code, solidifying my skills.</p><p>Starting from a point of fear and hestitation, I would spend long hours with the resources provided and longer ones on Youtube struggling to grasp the basics of programming. The people i met along this path of shared interest and determination we were able to help each other understand problems and come up with efficient solutions and this contributed to growth in our confidence. Long nights filled with collaborative coding sessions across time zones forging lasting friendships and fostering growth.</p><p>The tasks at hand were always robust in ensuring we came up with well documented solutions and more importantly efficient ones. In our continued efforts we quickly found out that the best way we could make progress is by failing first and fast so that it becomes easier to come up with better and more efficient solutions and the joy and satisfaction we found in finally finding working solutions was always an encouraging and humbling experience.</p><p>The challenges were not just technical; they encouraged critical, creative, and strategic thinking. Even when code seemed perfect, checkers could fail, forcing us to refine our approach. Amidst the highs and lows, the camaraderie with like-minded individuals was invaluable, providing support during the toughest moments.</p><p>The memories of late-night coding sessions spanning continents will forever remain, moments that encapsulated our determination to solve problems together, transcending geographical barriers. The transformative journey from mastering basics to creating critical solutions not only shaped me as a programmer but also as an individual.</p><p>With finality i say and acknowledge that this journey has been transformative, a great testament to my resilience, discipline and consistency constantly challenging me to push beyond limits.Proud of my achievements, I now embrace the Japanese philosophy of continuous improvement, kaizen. The journey has laid a solid foundation for my next chapter of learning, fueling my excitement and determination to embark on new challenges.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eb25ae7528d9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[PostMortem]]></title>
            <link>https://medium.com/@mwangiruoya/postmortem-6b65b8fc90c2?source=rss-7fb3c4ae7db7------2</link>
            <guid isPermaLink="false">https://medium.com/p/6b65b8fc90c2</guid>
            <category><![CDATA[incident-response]]></category>
            <category><![CDATA[incident-management]]></category>
            <category><![CDATA[postmortem]]></category>
            <dc:creator><![CDATA[Victor Mwangi]]></dc:creator>
            <pubDate>Tue, 07 Mar 2023 08:14:00 GMT</pubDate>
            <atom:updated>2023-03-07T08:14:00.253Z</atom:updated>
            <content:encoded><![CDATA[<iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F3oEjHWzZQaCrZW2aWs%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F3oEjHWzZQaCrZW2aWs%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2F3oEjHWzZQaCrZW2aWs%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="181" frameborder="0" scrolling="no"><a href="https://medium.com/media/b8fed380b2bf9e5b3b4490353f079bc5/href">https://medium.com/media/b8fed380b2bf9e5b3b4490353f079bc5/href</a></iframe><p>On March 4th, 2023, our online banking service suffered an outage that lasted for 1 hour and 45 minutes. During this time, customers were unable to access their account information, transfer funds, or complete any online transactions. Approximately 35% of our customers were affected by the outage.</p><p>The issue was detected at 8:30 AM EST through a monitoring alert that indicated several servers were offline. Our team quickly began investigating the issue, assuming it was a network problem. They checked our routers and switches but were unable to identify the root cause of the problem. After a more detailed investigation, it was discovered that the outage was due to a hardware failure in our data center.</p><p>The team quickly escalated the issue to our data center provider and began working on a resolution plan. Unfortunately, due to the severity of the hardware failure, it took longer than expected to bring the servers back online. However, at 10:15 AM EST, our team successfully resolved the issue, and all services were restored.</p><p>The root cause of the hardware failure was identified as a faulty power supply unit that caused several servers to fail. To fix the issue, our team replaced the power supply unit and performed thorough testing to ensure that the hardware failure did not cause any additional issues.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FYfOP4V0GugHohdb4US%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FYfOP4V0GugHohdb4US%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2FYfOP4V0GugHohdb4US%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="244" frameborder="0" scrolling="no"><a href="https://medium.com/media/54c5daae65d64bba8448199a4aa2cfeb/href">https://medium.com/media/54c5daae65d64bba8448199a4aa2cfeb/href</a></iframe><p>To prevent similar outages from happening in the future, we have put in place several corrective and preventative measures. Firstly, we will be conducting regular hardware checks to identify any potential issues before they cause a service disruption. We will also be implementing redundant power supplies for all critical servers to minimize the impact of any future hardware failures. Additionally, we will be improving our incident response plan to ensure that we can quickly identify and resolve any future issues.</p><p>Our incident response plan will be reviewed and updated, ensuring that we have the necessary processes and procedures in place to deal with similar issues more efficiently. We will also improve communication channels to ensure that all relevant teams are informed of any incidents and that there is a clear understanding of the issue and its severity.</p><p><strong>In conclusion</strong>, we acknowledge the impact the outage had on our customers and apologize for any inconvenience caused. We are committed to learning from this incident and improving our systems and processes to minimize the risk of similar incidents occurring in the future. We will continue to strive to provide reliable and secure services to our customers, and we appreciate their patience and understanding during this difficult time.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6b65b8fc90c2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What happens when you type ‘google.com’ in your browser]]></title>
            <link>https://medium.com/@mwangiruoya/what-happens-when-you-type-google-com-in-your-browser-7d9600e9beb3?source=rss-7fb3c4ae7db7------2</link>
            <guid isPermaLink="false">https://medium.com/p/7d9600e9beb3</guid>
            <category><![CDATA[dns]]></category>
            <category><![CDATA[internet]]></category>
            <category><![CDATA[load-balancing]]></category>
            <category><![CDATA[web-server]]></category>
            <category><![CDATA[firewall]]></category>
            <dc:creator><![CDATA[Victor Mwangi]]></dc:creator>
            <pubDate>Sat, 28 Jan 2023 09:36:55 GMT</pubDate>
            <atom:updated>2023-01-29T21:05:39.762Z</atom:updated>
            <content:encoded><![CDATA[<p>There is so much that happens in the small seconds between you pressing that search button and your request popping up,join me on this journey through the wires, the servers and connections that happen in that very instance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*xYYCz0WeKdmrgv20" /><figcaption>Photo by <a href="https://unsplash.com/@jjying?utm_source=medium&amp;utm_medium=referral">JJ Ying</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Humans know the words that make up the domain they are searching for, computers know the numbers that make up the addresses to these domains; the middle ground where this intersects is known as the <strong>DNS</strong>(Domain Name System) the domain name provided is matched to the IP address. The <strong>DNS</strong> looks for the IP address associated with that domain name.</p><p>Once the IP address has been found a<strong> TCP</strong>(Transmission Control Protocol) is opened to the server using that IP address. The responsibility of a TCP connection is to establish a connection between your computer and the server ensuring reliability in the transfer of data. For the connection to be truly made to the server it has to go through a set of security policies configured on the network traffic or what is simply known as a firewall.The request is assessed and based on the firewalls configuration a decision is made whether to establish the connection.</p><p>If the request is approved, it reaches the server hosting ‘<em>google.com</em>’; The server sends an <strong>SSL</strong> certificate which establishes a secure connection between your browser and the server via HTTP<strong>S </strong>a more secure version of HTTP(Hypertext Transfer Protocol) ensuring that the data exchanged is encrypted making it difficult for a third party to intercept the data.</p><p>The number of requests made globally per minute are <strong>2.4 million</strong> on<strong> </strong>Google alone<strong> </strong>, thats alot especially for one server to handle and therefore these requests are managed by a system that ensures the requests are spread out across many servers in a process known as <em>load balancing </em>by use of a <strong>load balancer</strong><em>. </em>This ensures that no single server is overwhelmed.</p><p>There are two types of servers:<em> web servers</em> and <em>application servers;</em> web<em> </em>servers respond to HTTP requests by returning appropriate <strong>HTML</strong>,<strong> CSS</strong> and <strong>JavaScript</strong> files that make up the webpage in this case the <em>Google</em> homepage. Application servers on the other hand deal with the logical part of web applications; they receive the request, perform any necessary processing and sends back appropriate responses.</p><p>In an instance where the request requires data from a database, application server may query a database in order to retrieve necessary information. Database server executes the query and returns the requested data to the application server which sends the response back to the web server.</p><figure><img alt="An diagrammatic representation of what happens when you make a query on your browser" src="https://cdn-images-1.medium.com/max/1024/1*LQ-oh9ZQFCfHhVFe3BE4pg.png" /></figure><p>All this occurs in an instance the tenth of a second. And thats mindblowing.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7d9600e9beb3" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>