<?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 Cynthia Oduor on Medium]]></title>
        <description><![CDATA[Stories by Cynthia Oduor on Medium]]></description>
        <link>https://medium.com/@macinary?source=rss-8b836ad47544------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*b-dEbbhtvz8Wf-gZvLZ2pA.png</url>
            <title>Stories by Cynthia Oduor on Medium</title>
            <link>https://medium.com/@macinary?source=rss-8b836ad47544------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 18:39:29 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@macinary/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[The tech scene started 2026 on a strong note.]]></title>
            <link>https://macinary.medium.com/the-tech-scene-started-2026-on-a-strong-note-4c1b0b2bb864?source=rss-8b836ad47544------2</link>
            <guid isPermaLink="false">https://medium.com/p/4c1b0b2bb864</guid>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Cynthia Oduor]]></dc:creator>
            <pubDate>Mon, 19 Jan 2026 10:18:32 GMT</pubDate>
            <atom:updated>2026-01-19T10:18:32.102Z</atom:updated>
            <content:encoded><![CDATA[<p>On January 6, the Consumer Electronics Show (CES), the world’s largest and most influential tech trade show kicked off in Las Vegas. This year’s focus was clear: AI that thinks, reasons, and works in the real world, not just in theory.</p><p>One article that stood out highlighted how companies like Nvidia, BMW, and Mercedes are building AI systems that can interpret roads, understand complex situations, and predict outcomes.</p><p>And it got me thinking:<br>If AI is intelligent enough to navigate traffic and make split-second decisions, what could that same logic do for society especially here in Kenya?</p><p>Here’s what I came up with.</p><blockquote><em>1. We can </em><strong><em>build simple AI tools chatbots</em></strong><em> on WhatsApp or SMS that:</em></blockquote><blockquote><em>Explain voter registration steps<br>Break down the Constitution in simple language<br>Answer questions about what MCAs, MPs, and Governors actually do<br>Summarize party manifestos without bias</em></blockquote><p>The goal isn’t to tell people what to think, but to help young and first-time voters understand how civic systems work.</p><blockquote><em>2. CES highlighted </em><strong><em>AI’s growing ability to reason, not just repeat patterns</em></strong><em>. Imagine uploading two manifestos and AI:</em></blockquote><blockquote><em>Highlights the key differences<br>Shows focus areas like jobs, education, and health<br>Summarizes content in Kiswahili, Sheng, or local languages<br>Produces a short, easy-to-read summary</em></blockquote><p>This shifts decisions away from social-media sound bites toward informed choices.</p><blockquote><em>3. Another big trend at CES is </em><strong><em>AI that runs directly on devices</em></strong><em>, not only in the cloud and that matters in Kenya, where many people still use basic phones.<br>We can design AI civic educators that:</em></blockquote><blockquote><em>Work with minimal or no internet<br>Run on low-cost smartphones<br>Translate content into local dialects<br>Provide audio explanations for people with limited literacy</em></blockquote><p>Access shouldn’t depend on data bundles.</p><blockquote><em>4. </em><strong><em>Making accountability visible</em></strong><em>. Just as autonomous vehicles use AI to monitor and predict, the same logic can help governance:</em></blockquote><blockquote><em>Track campaign promises versus actual performance<br>Summarize county budgets and public spending<br>Highlight patterns in procurement or parliamentary votes<br>Turn complex data into simple visuals communities can share</em></blockquote><p>Accountability becomes understandable, not abstract.</p><blockquote><em>5. CES 2026 shows </em><strong><em>AI is no longer reserved for tech elites</em></strong><em>. With open tools, youth can:</em></blockquote><blockquote><em>Learn to build localized AI civic tools<br>Host hackathons focused on voter education and accountability<br>Partner with universities to teach practical AI skills<br>Create open resources for civic-focused AI projects</em></blockquote><p>The shift is from consuming systems to shaping them.</p><h3>In conclusion:</h3><p>CES 2026 is about embedding intelligence into the real world. Kenyan youth can borrow that idea not to build autonomous cars, but autonomous civic tools: AI that explains, compares, informs, and empowers.</p><p>✨ That’s what I’m learning. That’s what I’m sharing.</p><p>See you on the next one!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Eha-9x3U9eaO2CNnQUm3vg.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4c1b0b2bb864" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ Python Iterators and Generators — A Beginner’s Guide]]></title>
            <link>https://macinary.medium.com/python-iterators-and-generators-a-beginners-guide-8bb178592dac?source=rss-8b836ad47544------2</link>
            <guid isPermaLink="false">https://medium.com/p/8bb178592dac</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Cynthia Oduor]]></dc:creator>
            <pubDate>Wed, 07 Jan 2026 11:51:19 GMT</pubDate>
            <atom:updated>2026-01-07T11:58:45.067Z</atom:updated>
            <content:encoded><![CDATA[<h3>🐍 Python Iterators and Generators (A Beginner’s Guide)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Dag77HocEJmf8K1ZGuJ05A.png" /></figure><p>If you’re learning Python, you’ve probably used for loops, lists, and ranges without thinking too much about <em>how</em> Python moves from one item to the next.</p><p>Behind the scenes, Python relies on <strong>iterators</strong> and <strong>generators</strong> to make this possible.</p><p>In this post, we’ll explore:</p><ul><li>What iterators are</li><li>What generators are</li><li>How they work</li><li>When to use each</li><li>Simple, practical examples</li></ul><p>No prior knowledge required, let’s start from the basics.</p><h3>What Does “Iteration” Mean in Python?</h3><p>Iteration simply means <strong>going through items one at a time</strong>.</p><p>For example:</p><pre>fruits = [&quot;apple&quot;, &quot;banana&quot;, &quot;mango&quot;]<br><br>for fruit in fruits:<br>    print(fruit)</pre><p>Here, Python is doing the following internally:</p><ol><li>Get the first item</li><li>Move to the next</li><li>Repeat until there are no more items</li></ol><p>This “one-at-a-time” behavior is powered by <strong>iterators</strong>.</p><h3>What Is an Iterator?</h3><p>An <strong>iterator</strong> is an object that:</p><ul><li>Knows how to return items one by one</li><li>Keeps track of its current position</li><li>Stops automatically when there are no more items</li></ul><p>In Python, any object that can be looped over (like lists, tuples, strings) is iterable and internally uses an iterator.</p><h4>🔑 Key Idea</h4><blockquote><em>An iterator does NOT give all values at once, only </em><strong><em>when requested</em></strong></blockquote><h3>How Iterators Work Internally</h3><p>An iterator must implement two special methods:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/549/1*0HeYUQiDrDcNgF6vp6NnKg.png" /></figure><p>Python calls these methods automatically when you use a for loop.</p><p>✨ Example 1: Using a Built-in Iterator</p><pre>numbers = [1, 2, 3]<br><br>iterator = iter(numbers)<br><br>print(next(iterator))  # 1<br>print(next(iterator))  # 2<br>print(next(iterator))  # 3</pre><h4>🪜 Steps to Use an Iterator</h4><ol><li>Create a collection (list, tuple, string)</li><li>Convert it using iter()</li><li>Get values using next()</li><li>Stop when values are exhausted</li></ol><p>🛠️ Example 2: Creating Your Own Iterator</p><pre>class CountToThree:<br>    def __init__(self):<br>        self.current = 1<br><br>    def __iter__(self):<br>        return self<br><br>    def __next__(self):<br>        if self.current &lt;= 3:<br>            value = self.current<br>            self.current += 1<br>            return value<br>        else:<br>            raise StopIteration</pre><h4>Using it:</h4><pre>counter = CountToThree()<br><br>for number in counter:<br>    print(number)</pre><p>✅ Output:</p><pre>1<br>2<br>3</pre><h3>What Is a Generator?</h3><p>A <strong>generator</strong> is a simpler way to create an iterator.</p><p>Instead of writing a full class, you use a function with the yield keyword.</p><h4>Key idea:</h4><blockquote><em>yield returns a value </em><strong><em>and pauses the function</em></strong><em>, saving its state for the next call.</em></blockquote><p>A Simple Generator Example</p><pre>def count_to_three():<br>    yield 1<br>    yield 2<br>    yield 3</pre><p>Using the generator:</p><pre>for number in count_to_three():<br>    print(number)</pre><p>Same output as before, but with far less code.</p><h3>Using next() with a Generator</h3><p>Generators also work with next():</p><pre>gen = count_to_three()<br><br>print(next(gen))  # 1<br>print(next(gen))  # 2<br>print(next(gen))  # 3</pre><p>Once exhausted, the generator stops automatically.</p><h3>Why Generators Are So Powerful</h3><h3>1. Memory Efficiency</h3><p>Generators produce values <strong>only when needed</strong>, instead of storing everything in memory. This is far more efficient than creating a huge list.</p><h3>2. Clean and Readable Code</h3><p>Generators reduce boilerplate code and are easier to understand once you get used to them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/627/1*M2blSLlxoWD6ld2oGVEflw.png" /></figure><h3>Real-Life Analogy</h3><p><strong>Iterator:</strong><br> Like a DVD player, you press <em>Next</em> to move forward.</p><p><strong>Generator:</strong><br> Like streaming on Netflix, content loads only when needed.</p><h3>When Should You Use Generators?</h3><p>Use generators when:</p><ul><li>Working with large datasets</li><li>Reading files line by line</li><li>Processing streams of data</li><li>You want clean, readable, memory-efficient code</li></ul><h3>Final Thoughts</h3><ul><li>Iterators explain how Python loops work under the hood</li><li>Generators provide a cleaner, simpler way to create iterators</li><li>If you’re new to Python, start with <strong>generators, </strong>they’re easier and more practical</li></ul><p>Once generators click, Python becomes more powerful and more fun to use ✨</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8bb178592dac" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>