<?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 Estheroginga on Medium]]></title>
        <description><![CDATA[Stories by Estheroginga on Medium]]></description>
        <link>https://medium.com/@estheroginga5?source=rss-9dbe0b123658------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*YzQmH0ST_K95GI-o</url>
            <title>Stories by Estheroginga on Medium</title>
            <link>https://medium.com/@estheroginga5?source=rss-9dbe0b123658------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 21:42:30 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@estheroginga5/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[My Week 11 DSA Journey: Learning to Write More Efficient Code]]></title>
            <link>https://medium.com/@estheroginga5/my-week-11-dsa-journey-learning-to-write-more-efficient-code-58c5cd863b4a?source=rss-9dbe0b123658------2</link>
            <guid isPermaLink="false">https://medium.com/p/58c5cd863b4a</guid>
            <category><![CDATA[sad]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[learning]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[datara-flow]]></category>
            <dc:creator><![CDATA[Estheroginga]]></dc:creator>
            <pubDate>Sun, 29 Nov 2026 21:16:08 GMT</pubDate>
            <atom:updated>2026-11-29T21:16:08.791Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VQTZQRxkcogviQ6SVP4ocw.png" /></figure><p>This week, I worked on Data Structures and Algorithms (DSA) as part of my DataraFlow learning journey. I focused on understanding how different data structures and algorithms help solve problems efficiently.</p><h3>What I Learnt</h3><p>I explored several important concepts, including:</p><ul><li>Sliding window technique</li><li>Two pointers</li><li>Hashing and sets</li><li>Linked lists</li><li>Stacks</li><li>Recursion</li><li>Binary search</li><li>Time and space complexity</li></ul><p>I also learnt that writing code that works is not enough. It is important to consider how efficiently it runs.</p><h3>What I Solved</h3><p>I completed all 10 coding problems in the Week 11 take-home assignment. These included finding maximum window sums, grouping anagrams, reversing linked lists, checking balanced brackets, flattening nested lists, and searching sorted arrays.</p><p>I successfully passed all the tests and earned all three available speed bonuses.</p><h3>Challenges I Faced</h3><p>Some problems were challenging, especially understanding how stacks, recursion, and binary search work. I also experienced a few setup issues when importing the required DSA support library in Google Colab.</p><h3>How I Overcame Them</h3><p>I approached the problems one at a time, implemented the solutions, ran the tests, and corrected issues along the way. Breaking the assignment into smaller tasks made it easier to manage.</p><h3>Final Thoughts</h3><p>This week taught me that problem-solving in programming requires patience, practice, and understanding. I am proud of completing all ten problems, but I also recognise that I need more practice to understand the underlying concepts deeply.</p><p><strong>One lesson I am taking forward: Don’t just write code that works; learn to write code that works efficiently.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=58c5cd863b4a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Raw Data to Meaningful Insights: My Week 8 Data Analysis Journey]]></title>
            <link>https://medium.com/@estheroginga5/from-raw-data-to-meaningful-insights-my-week-8-data-analysis-journey-59d17d142a1f?source=rss-9dbe0b123658------2</link>
            <guid isPermaLink="false">https://medium.com/p/59d17d142a1f</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Estheroginga]]></dc:creator>
            <pubDate>Sat, 31 Oct 2026 21:13:01 GMT</pubDate>
            <atom:updated>2026-10-31T21:13:01.234Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SxMwoS-V0fWHEd9U5wl_lQ.png" /></figure><h3>Exploring UK Milk Trade Through Python, SQL and Data Visualisation</h3><p>This week, I worked on <strong>Advanced Data Analysis and Visualisation</strong> as part of my DataRaflow learning journey. The focus was on transforming raw datasets into meaningful information, identifying patterns, and communicating findings through visualisations.</p><p>For my main project, I explored the United Kingdom’s milk imports and exports in 2015 using data from UN Comtrade. It was an opportunity to apply concepts I had previously learned in Python, SQL, Pandas and data visualisation to a practical problem.</p><h3>1. Exploring the UK Milk Trade</h3><p>The main project involved analysing UK milk trade between January and May 2015.</p><p>I worked with two milk categories:</p><ul><li><strong>Unprocessed milk and cream (HS 0401)</strong></li><li><strong>Processed milk and cream (HS 0402)</strong></li></ul><p>The objective was to understand the UK’s international milk trade by answering several questions:</p><ul><li>How much milk did the UK import and export?</li><li>What was its overall trade balance?</li><li>Which countries were its main trading partners?</li><li>Which countries consistently purchased UK milk?</li><li>Which countries traded milk with the UK in both directions?</li></ul><p>Using Python and Pandas, I prepared the dataset by selecting relevant columns, categorising the milk products and removing the World aggregate from the partner records.</p><p>I then applied grouping and aggregation techniques to calculate trade totals, rank trading partners and identify recurring export customers.</p><p>One important lesson was that data analysis is not simply about calculating totals. It is about asking meaningful questions and using the available data to answer them.</p><h3>2. Learning Grouping and Aggregation</h3><p>A major concept this week was the <strong>split-apply-combine approach</strong>.</p><p>This involves splitting data into groups, applying calculations to each group and combining the results into a meaningful output.</p><p>I used Pandas groupby() to examine trade by country and trade flow. I also explored pivot tables to compare imports and exports.</p><p>These techniques helped me understand how large datasets can be summarised without manually examining individual records.</p><p>I also practised identifying countries that appeared consistently across different months and comparing the UK’s import and export relationships.</p><h3>3. Bringing Data to Life Through Visualisation</h3><p>Numbers can communicate information, but visualisations can make patterns easier to recognise.</p><p>Using Matplotlib and Seaborn, I explored different ways of presenting the milk trade dataset:</p><ul><li><strong>Histograms:</strong> To understand the distribution of trade values.</li><li><strong>KDE plots:</strong> To examine the distribution and concentration of values.</li><li><strong>Box plots:</strong> To compare trade-value distributions and identify potential outliers.</li><li><strong>Regression plots:</strong> To explore relationships between variables.</li><li><strong>Heatmaps:</strong> To compare monthly import and export patterns.</li></ul><p>I also learned the importance of giving visualisations meaningful titles, labelled axes and clear interpretations.</p><p>A chart should not simply look attractive. It should communicate something useful about the data.</p><h3>4. Taking SQL Beyond Basic Queries</h3><p>Another important part of the week involved advanced SQL practice.</p><p>I worked on five exercises covering different SQL concepts:</p><ol><li><strong>GROUP BY:</strong> Grouping trade data by trade flow and milk category.</li><li><strong>Conditional aggregation:</strong> Comparing monthly imports, exports and trade balances using CASE WHEN.</li><li><strong>GROUPING SETS:</strong> Calculating quarterly totals and yearly subtotals in one query.</li><li><strong>Window functions:</strong> Ranking trading partners and calculating their percentage contributions.</li><li><strong>CTEs and joins:</strong> Identifying the top five export partners and grouping the remaining countries into an ‘Other’ category.</li></ol><p>These exercises helped me appreciate how SQL can do much more than retrieve records. It can also organise, summarise, rank and transform data before it reaches a visualisation or reporting tool.</p><p>I particularly found window functions interesting because they allow calculations across related rows without collapsing the dataset into a single grouped result.</p><h3>5. Challenges and Lessons Learned</h3><p>This week was not entirely straightforward.</p><p>One challenge involved connecting my notebook to the existing DataRaflow database module. I initially encountered import errors because my notebook was running from a different directory than the database module.</p><p>I resolved this by identifying the project root and adding it to Python’s system path.</p><p>Another challenge arose when I attempted to use the SQL practice checker. The expected db.practice module was missing from my project directory. Rather than spending more time troubleshooting an unavailable file, I decided to execute the SQL queries directly using the existing run_query() function.</p><p>This reminded me that debugging is an important part of programming. Understanding an error, identifying its cause and finding a practical alternative are skills that matter just as much as writing code.</p><p>I also learned to pay attention to the source tables and their time periods. The main Comtrade project used 2015 data, while some SQL practice exercises used a separate 2014 dataset. Keeping these datasets distinct was important for accurate analysis.</p><h3>6. What I Am Taking Away From Week 8</h3><p>Week 8 helped me connect several concepts I had been learning independently.</p><p>I now have a better understanding of how Python, Pandas and SQL work together in a data analysis workflow.</p><p>More importantly, I am beginning to see data analysis as a process rather than a collection of programming commands:</p><ol><li>Understand the problem.</li><li>Obtain and explore the data.</li><li>Clean and prepare the dataset.</li><li>Analyse patterns and relationships.</li><li>Visualise the findings.</li><li>Communicate meaningful conclusions.</li></ol><p>Every stage contributes to the quality of the final result.</p><h3>Final Thoughts</h3><p>My biggest takeaway from this week is that <strong>data becomes valuable when we know how to ask the right questions and interpret the answers.</strong></p><p>Working with international trade data gave me an opportunity to practise turning a real-world dataset into structured analysis. I also gained more confidence working with SQL aggregation, window functions, Pandas and statistical visualisations.</p><p>I am still learning, and there is much more to explore. However, each week is helping me build a stronger foundation in data science and develop the ability to approach problems analytically.</p><p>I look forward to applying these skills to datasets that explore challenges closer to home, particularly problems affecting Kenya and other African communities.</p><p><em>One dataset, several questions, and many lessons learned.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=59d17d142a1f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Week 7: Turning Data into Meaningful Insights]]></title>
            <link>https://medium.com/@estheroginga5/week-7-turning-data-into-meaningful-insights-f99978071c26?source=rss-9dbe0b123658------2</link>
            <guid isPermaLink="false">https://medium.com/p/f99978071c26</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[tech-girlies]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[datara-flow]]></category>
            <dc:creator><![CDATA[Estheroginga]]></dc:creator>
            <pubDate>Sat, 24 Oct 2026 22:10:45 GMT</pubDate>
            <atom:updated>2026-10-24T22:10:45.841Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QLFw3zD-e3PlQt6oWT3IZg.jpeg" /></figure><p>This week at DataraFlow felt like a real step forward. I spent time working with Python, SQL, and visualisation tools, learning how to clean messy data, combine different sources, and draw out patterns that actually mean something. What struck me most is that data science isn’t just about writing clever code — it’s about asking better questions and letting the evidence guide the answers.<br>One of the more practical exercises involved historical weather data from London. I set out to find the driest 14-day stretch in the summer of 2014. The numbers pointed clearly to 9–22 July, when total rainfall was just 1.02 mm. It’s a small finding, but it showed me how analysis can answer everyday questions with real precision.<br>I also looked at the relationship between GDP and life expectancy across 219 countries in 2013. Using Spearman’s rank correlation I got a coefficient of 0.4151 — a moderate positive association. The result was interesting, but it also reinforced an important lesson: correlation is not causation. Economic development and health outcomes move together in many places, yet the story behind that relationship is far more complex.<br>Looking back, Week 7 strengthened my skills in cleaning, joining, analysing, and visualising data. More than that, it reminded me that every dataset hides a question waiting to be asked carefully and answered honestly.<br>Biggest takeaway: Data becomes powerful only when we turn it into clear evidence, interpret it with care, and use it to make better decisions.<br>The journey continues — one dataset, one question, and one insight at a time.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f99978071c26" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Week 6 at DataraFlow: Learning NumPy, Pandas, and SQL]]></title>
            <link>https://medium.com/@estheroginga5/week-6-at-dataraflow-learning-numpy-pandas-and-sql-4d96631e57ca?source=rss-9dbe0b123658------2</link>
            <guid isPermaLink="false">https://medium.com/p/4d96631e57ca</guid>
            <category><![CDATA[women-in-tech]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[datara-flow]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Estheroginga]]></dc:creator>
            <pubDate>Mon, 19 Oct 2026 02:58:09 GMT</pubDate>
            <atom:updated>2026-10-19T04:24:12.283Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1V09fAGP8o-70zsfK1k1qw.png" /></figure><p>This week at DataraFlow Cohort 2, I explored NumPy, Pandas, and intermediate SQL, strengthening my understanding of data analysis and database management.</p><p>With <strong>NumPy</strong>, I learned how to identify missing numerical values, compare arrays, check number types, and calculate memory usage. Through <strong>Pandas</strong>, I explored Series and DataFrames, including selecting rows and columns, filtering data, sorting values, and converting data types.</p><p>One of the most practical parts of the week was working with a live SQL database. I learned to inspect database schemas, retrieve datasets, handle inconsistent column names, and combine weather data from six cities using SQL. I also explored population and tuberculosis data using Python and Pandas.</p><p>I faced challenges with Python project paths and SQL queries that used inconsistent column names. By checking the database structure and correcting my queries, I was able to resolve these issues. This taught me the importance of investigating errors rather than guessing.</p><p>The intermediate SQL exercises also introduced me to joins, aggregations, CTEs, window functions, and running totals. These techniques showed me how to use SQL to answer practical business questions rather than simply retrieve data.</p><p><strong>My biggest takeaway is that data analysis involves more than writing code.</strong> It requires understanding the data, checking its quality, asking the right questions, and interpreting results carefully.</p><p>As I continue my data science journey, I aim to become more confident in using Python and SQL to transform raw data into meaningful insights. Week 6 has been another important step towards that goal.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4d96631e57ca" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Title:
I Chose Credit Risk for My Data Science Research — Here’s Why It Matters in Kenya
Subtitle…]]></title>
            <link>https://medium.com/@estheroginga5/title-i-chose-credit-risk-for-my-data-science-research-heres-why-it-matters-in-kenya-subtitle-1a254b699464?source=rss-9dbe0b123658------2</link>
            <guid isPermaLink="false">https://medium.com/p/1a254b699464</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[fintech]]></category>
            <category><![CDATA[africa]]></category>
            <category><![CDATA[credit-risk]]></category>
            <dc:creator><![CDATA[Estheroginga]]></dc:creator>
            <pubDate>Sat, 10 Oct 2026 18:47:27 GMT</pubDate>
            <atom:updated>2026-10-11T06:39:56.222Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_rqN7DQ7jp7JAoTvRW6RFA.jpeg" /></figure><p>Title:<br>I Chose Credit Risk for My Data Science Research — Here’s Why It Matters in Kenya<br>Subtitle<br>As a DataraFlow intern, I’m diving into loan default prediction. Not because the topic is new, but because the problem is still real.<br>When I joined the DataraFlow internship, one of the earliest and most important tasks was choosing a research topic. We were told to pick something we could carry for the full six months — something real, something that would force us to apply every new skill we learned.<br>I was stuck for a while between health and finance. Both felt important. Then I narrowed it to credit risk.<br>At first I hesitated. “Hasn’t this been done before?” I asked myself. The honest answer is yes. Loan default prediction is not a brand-new idea. Researchers and data scientists in Kenya and across Africa have already applied machine learning to this problem. But that didn’t mean the work was finished.<br>The Real Problem Still Exists<br>Kenya has one of the most active digital credit markets in Africa. Mobile loans, SACCOs, and microfinance institutions have expanded access to credit for millions of people who were previously locked out of the formal system. That is a good thing.<br>The challenge is that default rates remain a serious concern. When too many borrowers fail to repay, lenders become more cautious. Interest rates stay high. Some people who genuinely need credit get rejected. Financial inclusion slows down.<br>Traditional credit assessment methods often struggle when borrowers have little or no formal credit history. This is especially common among first-time borrowers, informal traders, and women-owned micro-enterprises. Machine learning offers a possible improvement — but only if the models are transparent, fair, and useful in real decision-making.<br>That is the gap I want to work on.<br>What My Research Will Focus On<br>My research title is:<br>Predicting Loan Default Among Kenyan Microfinance and Digital Credit Borrowers: A Comparative Machine Learning Approach Using Publicly Available Data<br>In simple terms, I will:<br>Use publicly available loan datasets with Kenyan relevance<br>Explore which borrower and loan characteristics are linked to default<br>Build a traditional logistic regression model as a baseline<br>Compare it with stronger machine learning models such as Random Forest or XGBoost<br>Examine which features the models consider most important<br>Discuss what the results could mean for lenders who want to make better and fairer credit decisions<br>I am deliberately using public data so that the work remains transparent and reproducible. This also means other learners and practitioners can examine or build on what I do.<br>Why This Matters to Me<br>I am from Kenya. I see how important access to credit is for small businesses and everyday people. At the same time, I understand that reckless lending hurts both borrowers and lenders. Good credit risk tools should help strike a better balance — expanding access while managing risk responsibly.<br>As I move through the DataraFlow programme, every new skill (data cleaning, visualisation, regression, classification, model evaluation) will feed directly into this research. The project is not separate from my learning. It is the reason I am learning.<br>A Note on Novelty<br>Some people worry that if a topic has been studied before, it is no longer worth doing. I disagree. In applied data science, progress often comes from careful, well-executed work on real problems — not only from inventing completely new questions. My contribution will not be claiming I invented credit risk modelling. It will be producing a clear, honest, and reproducible study grounded in accessible data and focused on practical insight.<br>What’s Next<br>Over the coming months, I will clean the data, explore patterns, build models, evaluate them properly (especially since defaults are usually the minority class), and interpret the results. I will document the process publicly as part of the DataraFlow requirement.<br>If you work in fintech, microfinance, or data science in Kenya (or East Africa), I would be interested in your thoughts. What challenges do you see in credit risk assessment today? What would make a predictive model actually useful in practice?<br>I’m just getting started, but I’m excited to dig in.</p><p>#Data Science #Machine Learning #Credit Risk #Fintech Africa #Kenya #DataraFlow #Financial Inclusion #Loan Default</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1a254b699464" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Day “Pip Install” Finally Made Sense]]></title>
            <link>https://medium.com/@estheroginga5/the-day-pip-install-finally-made-sense-45b2cdcbedef?source=rss-9dbe0b123658------2</link>
            <guid isPermaLink="false">https://medium.com/p/45b2cdcbedef</guid>
            <category><![CDATA[women]]></category>
            <category><![CDATA[writing]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Estheroginga]]></dc:creator>
            <pubDate>Sat, 26 Sep 2026 20:57:31 GMT</pubDate>
            <atom:updated>2026-09-26T20:57:31.997Z</atom:updated>
            <content:encoded><![CDATA[<p>For the longest time, I nodded along to words I didn’t actually understand.</p><p>“Just pip install it.” “Wrap it in a try-except.” “Import the module.” I’d hear these phrases in every YouTube tutorial, type them exactly as shown, watch my code magically work, and move on — without a clue what any of it actually meant. I was copying, not understanding.</p><p>This week, that changed.</p><p>I sat down and went through the basics properly: modules, dates, math operations, JSON, pip, error handling, virtual environments. Nothing fancy. But going slow enough to actually <em>get</em> it did something copy-pasting never could.</p><p><strong>“Module” stopped being a buzzword.</strong><br> It’s just a .py file. That&#39;s it. When a tutorial says &quot;import the math module,&quot; they mean: there&#39;s a file somewhere with math functions in it, and I&#39;m borrowing from it. A package is just a folder of these files. Once that clicked, half the mystery around Python&#39;s ecosystem disappeared.</p><p><strong>JSON stopped feeling like a foreign language.</strong><br> I used to see {&quot;name&quot;: &quot;Essy&quot;, &quot;age&quot;: 21} in API responses and just... scroll past it, hoping the code handled it. Now I know it&#39;s just a dictionary wearing a different outfit — json.dumps() turns my Python data into that text format, json.loads() turns it back. It&#39;s the same handshake every app makes when it talks to another app.</p><p><strong>Pip finally has a face.</strong><br> It’s just Python’s delivery service. “Pip install requests” means “go fetch this package and drop it in my project.” And a virtual environment? It’s just a clean room for each project, so installing something for one thing doesn’t quietly break another. I used to run these commands like spells. Now they’re just… instructions.</p><p><strong>Try/except stopped feeling scary.</strong><br> Errors used to feel like the code was broken. Now I see them as the program politely saying “this specific thing didn’t work” — and try/except is just me saying “okay, if that happens, do this instead.” Dividing by zero, converting “abc” into a number — these aren’t disasters anymore. They’re just cases to plan for.</p><p>None of this is advanced. That’s kind of the point. I’m not writing this because I learned something complicated — I’m writing it because I finally understand something simple, all the way through, instead of just performing that I understand it.</p><p>If you’re where I was — following tutorials, getting the right output, but not really knowing <em>why</em> — take the detour. Go back to the basics you skipped. It’s a strange kind of relief, hearing a word you’ve typed a hundred times and finally knowing what it means.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=45b2cdcbedef" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What OOP in Python Actually Taught Me (A Student’s Honest Breakdown)]]></title>
            <link>https://medium.com/@estheroginga5/what-oop-in-python-actually-taught-me-a-students-honest-breakdown-6703684f7040?source=rss-9dbe0b123658------2</link>
            <guid isPermaLink="false">https://medium.com/p/6703684f7040</guid>
            <category><![CDATA[women-in-tech]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[datara-flow]]></category>
            <dc:creator><![CDATA[Estheroginga]]></dc:creator>
            <pubDate>Sat, 19 Sep 2026 05:25:16 GMT</pubDate>
            <atom:updated>2026-09-19T05:25:16.290Z</atom:updated>
            <content:encoded><![CDATA[<p>I’ll be honest — the first time I saw class, self, and __init__ in the same file, I copied the syntax, got it to run, and moved on without really understanding <em>why</em> any of it was necessary. It wasn&#39;t until I sat down to build an actual project — a small library management system, as a class assignment — that these concepts stopped being things I memorized and started being things I <em>needed</em>.</p><p>This is what actually made sense to me, in the order it made sense.</p><h4>__init__ isn&#39;t just &quot;where you put the variables&quot;</h4><p>For the longest time I thought of __init__ as boilerplate you&#39;re supposed to write because the textbook says so. Building the Book class is what changed that:</p><p>python</p><pre>class Book:<br>    def __init__(self, title, author, year):<br>        self.title = title<br>        self.author = author<br>        self.year = year<br>        self.is_borrowed = False</pre><p>What clicked for me: __init__ is basically the class saying, &quot;give me these things up front, and every object I create will have them guaranteed.&quot; Once I understood it that way, I stopped seeing it as a formality and started seeing it as the actual foundation every other method relies on.</p><h4>I genuinely confused self.x and a class variable at first</h4><p>This one embarrassed me a little. I wrote a Counter class to track how many objects had been created, and my first instinct was to just use self.total. It didn&#39;t work the way I expected — each object had its <em>own</em> counter instead of a shared one. That&#39;s when the difference between instance attributes and class attributes stopped being a textbook definition and became something I&#39;d actually felt the consequences of:</p><p>python</p><pre>class Counter:<br>    total_instances = 0  # shared by every object of this class</pre><pre>    def __init__(self):<br>        Counter.total_instances += 1</pre><p>self.something belongs to one object. Counter.something belongs to the whole class. Mixing them up is a very normal beginner mistake, and honestly, making it once taught me more than reading about it three times would have.</p><h4>Inheritance finally made sense once I stopped repeating myself</h4><p>I used to think inheritance was just a fancy diagram — arrows pointing from child to parent, mostly there to look impressive in slides. Writing EBook and PrintedBook, both extending Book, is what made it click:</p><p>python</p><pre>class EBook(Book):<br>    def __init__(self, title, author, year, file_size, format_):<br>        super().__init__(title, author, year)<br>        self.file_size = file_size<br>        self.format = format_</pre><p>super().__init__() isn&#39;t ceremony — it&#39;s literally &quot;don&#39;t rewrite what the parent already does, just build on top of it.&quot; As a student, this is the part where inheritance stopped being abstract theory and started feeling like a genuinely useful shortcut.</p><h4>Polymorphism is the concept I’m proudest of finally understanding</h4><p>This is the one that made me feel like the course was actually paying off. Both EBook and PrintedBook have their own version of get_description(), but the code that <em>uses</em> them never has to know which one it&#39;s dealing with:</p><p>python</p><pre>for book in library:<br>    print(book.get_description())</pre><p>No if isinstance(book, EBook) anywhere. Each object just knows how to describe itself, and the loop doesn&#39;t care. Python pushes this even further with duck typing, where an object doesn&#39;t even need to be related to anything — it just needs the right method:</p><p>python</p><pre>def animal_sound(animal):<br>    return animal.sound()</pre><p>As a student, this was the first moment OOP stopped feeling like “extra rules to memorize” and started feeling like “a genuinely smarter way to write code.”</p><h4>Encapsulation surprised me — Python doesn’t lock anything</h4><p>I assumed “private” meant private, the way it might in other languages. Turns out in Python, a single underscore (_borrowed_books) is really just a note to other developers saying &quot;please don&#39;t touch this directly,&quot; and a double underscore (__library_name) gets name-mangled to make it <em>harder</em> to access — not impossible. That genuinely surprised me. It reframed encapsulation for me: it&#39;s less about the language enforcing rules on you, and more about clearly communicating intent to whoever reads your code next — including future me.</p><h4>Iterators made me realize for loops aren&#39;t magic</h4><p>I’d used for loops for two years before I ever wondered what was happening underneath one. Writing my own Fibonacci iterator forced me to find out:</p><p>python</p><pre>class Fibonacci:<br>    def __init__(self, n):<br>        self.n = n<br>        self.a, self.b = 0, 1</pre><pre>    def __iter__(self):<br>        return self</pre><pre>    def __next__(self):<br>        if self.a &gt; self.n:<br>            raise StopIteration<br>        value = self.a<br>        self.a, self.b = self.b, self.a + self.b<br>        return value</pre><p>Realizing that StopIteration is just a normal exception the for loop quietly catches was one of those small moments where a piece of Python stopped feeling like magic and started feeling like something I could actually reason about.</p><h4>Multiple inheritance is the part I was most scared of — and MRO is what fixed that</h4><p>I’d read warnings about multiple inheritance being messy and mostly avoided it out of caution. Then I had to build a Duck inheriting from both Flyer and Swimmer, and I had to actually answer: when Duck calls super().move(), which parent responds?</p><p>The answer is the Method Resolution Order — Duck → Flyer → Swimmer → object — and it&#39;s not a guess, it&#39;s a fixed search order based on how you list the parent classes. Understanding that didn&#39;t just answer the one question. It made me trust super() instead of quietly avoiding it in my own code.</p><h4>What I’m taking away from this, as a student</h4><p>None of these ideas meant much to me as isolated definitions. What actually taught me OOP was noticing, while building the library system, that I could add an entirely new kind of book or a new kind of member without editing a single line of the code that already worked. That’s the part nobody explained to me clearly before I built something myself: OOP isn’t about following a checklist of “four pillars.” It’s about writing code today that doesn’t punish you six months from now when you’ve forgotten your own reasoning.</p><p>If you’re a student working through this the same way I did — my honest advice is to build something with actual moving parts, even something small. The syntax will make sense either way eventually. It’s the design instincts that only show up once something breaks and you have to figure out, on your own, where the fix belongs.</p><p>#DataraFlow #RoadToDataScience #GirlTechies #Students</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6703684f7040" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>