<?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 Prince C. Ngumoha on Medium]]></title>
        <description><![CDATA[Stories by Prince C. Ngumoha on Medium]]></description>
        <link>https://medium.com/@chukwuemekangumoha?source=rss-129511df49fc------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*zhzHGtsvHM3H2KAXtVzEpA.png</url>
            <title>Stories by Prince C. Ngumoha on Medium</title>
            <link>https://medium.com/@chukwuemekangumoha?source=rss-129511df49fc------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 16:13:00 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@chukwuemekangumoha/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[365 Days With My Bible]]></title>
            <link>https://medium.com/@chukwuemekangumoha/365-days-with-my-bible-86510ef2840f?source=rss-129511df49fc------2</link>
            <guid isPermaLink="false">https://medium.com/p/86510ef2840f</guid>
            <category><![CDATA[religion]]></category>
            <category><![CDATA[theology]]></category>
            <category><![CDATA[bible-study]]></category>
            <category><![CDATA[history]]></category>
            <category><![CDATA[self-improvement]]></category>
            <dc:creator><![CDATA[Prince C. Ngumoha]]></dc:creator>
            <pubDate>Sat, 17 Jan 2026 13:07:26 GMT</pubDate>
            <atom:updated>2026-01-17T13:07:26.044Z</atom:updated>
            <content:encoded><![CDATA[<h4>How understanding and accepting myself led to a win.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*xN2Vuf2KIqrzg8yT" /><figcaption>Photo by <a href="https://unsplash.com/@rachelstrong10?utm_source=medium&amp;utm_medium=referral">Rachel Strong</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>For a long time, I found the Bible (with the exception of the Book of Revelation) dull and unworthy of sustained attention. As a child, my parents tried every possible method to get me to read it consistently, but nothing ever stuck. I would begin with some enthusiasm, keep at it for a few days, and then quietly abandon the habit. That pattern repeated itself for years.</p><p>But 2025 was different. I made a deliberate decision to read the entire Bible over the course of the year — and, for the first time, I followed through. The purpose of this piece is simply to document that accomplishment. More importantly, I want to share how I did it and what the experience did to me. So, keep reading.</p><h3>The How</h3><p>I don’t recall the exact moment, but early in the year I realized two important things about myself: I value external feedback and validation, and I’m most engaged when I know people are paying attention to both the quality and consistency of my work. Rather than fight these traits, I decided to use them to my advantage in the following ways:</p><ul><li>Every day as I studied the Bible, I took notes — but not as mindless summaries of what I read. Instead, they captured the questions, insights, and observations that arose as I engaged with each passage.</li><li>After finishing the day’s passage and writing down my insights, I would share a summary of what I read — and sometimes the insights themselves — on my WhatsApp status. On most days, though, I simply posted the passage and left it at that.</li></ul><p>Surprisingly, this simple system kept me going — even on days when I seriously considered giving up.</p><p><strong><em>So, what did I learn ?</em></strong> <br>That’s up next.</p><h3>The What</h3><p>Reading the Bible every day forced me to develop a habit of Bible study that I never believed I could sustain. There were extremely hectic days when I almost missed a reading, and on those days I noticed a strange, lingering feeling — as though I was forgetting something important. That feeling wouldn’t lift until I realized I had skipped my reading.</p><p>Reading through each book also changed how I understood the Bible itself. I began to see it not as a collection of stories about flawless characters, but as a deeply human record — full of history, emotion, contradiction, and imperfection. It became clear that the authors were very different people, writing in different contexts, with no awareness that their writings would one day be compiled into a single canon and read by people far beyond Judea, including someone like me.</p><p>That reality shows up clearly in the text. Some books aim to be factual and historical, others poetic and emotional. Some are meant to be sung (like the Psalms), others to record events, and others to speak symbolically about the future (like Revelation). Seeing the Bible this way made it feel more grounded, more honest, and ultimately more compelling.</p><p>Along the way, I made several observations that stood out to me:</p><p><strong>First</strong>, the Devil’s backstory as commonly presented in Christian popular culture — particularly the idea of a heavenly rebellion followed by Lucifer’s exile to earth — has <em>no clear foundation in the Old Testament</em>. While various passages are often cited as veiled references to this narrative, a closer reading makes it difficult to sustain that interpretation. <strong>Isaiah 14:12–16</strong>, one of the most frequently quoted texts, is explicitly introduced in <strong>verse 4</strong> as a proverbial condemnation of the King of Babylon, not a description of Satan. After careful reading, I could find no substantive Old Testament account that functions as an origin story for the Devil. However, references to Satan and demonic activity become much more explicit in the New Testament.</p><p><strong>Second</strong>, the Babylonian king known in English Bibles as <em>Evil-Merodach</em> is a striking example of how layers of translation and transliteration across centuries can distort meaning. When I encountered him on day <strong>231</strong> of my reading (<strong>2 Kings 25:27–30</strong>), I was puzzled by the mismatch between his seemingly benevolent actions and the word <em>“Evil”</em> attached to his name. Curious, I decided to investigate further.</p><p>What I discovered was that this was not a moral judgment at all, but a linguistic accident. The king’s original Akkadian name was <strong>Amēl-Marduk</strong> (𒀀𒈨𒈠𒀭𒀫𒌓), meaning <em>“Servant of Marduk”</em> — Marduk being the chief god of Babylon. When rendered into Hebrew, the name became <strong>ʼĔwîl-Mərōḏaḵ</strong> (אֱוִיל־מְרֹדַךְ), a phonetic approximation rather than a translation. This form was preserved in the Greek Septuagint as <strong>Eouil-Marōdach</strong> (Ἐουιλμαρωδάχ), and later carried into the Latin Vulgate as <strong>Evilmerodach</strong>. From there, it entered the English King James Version as <em>Evil-Merodach</em>. It’s amazing how a tiny change in something as simple as a name could distort a great man’s legacy. But alas, this is what happened to <strong>Amēl-Marduk</strong>.</p><p>Fortunately, many modern Bible translations now render his name more accurately as <strong>Amēl-Marduk</strong>, restoring its original meaning and avoiding the misleading implication created by centuries of transliteration.</p><p>There were many other discoveries along the way — some surprising, some illuminating, and others that challenged ideas I had long accepted as a result of exposure to Christian popular culture and religious thought. But to attempt to catalogue them all here would only make this piece longer than it needs to be, and that was never my aim.</p><p>What matters more is that the discipline of daily reading reshaped both my understanding of the Bible and my relationship with it. What once felt distant and unapproachable became human, textured, and alive. Finishing the Bible in a year was not just an exercise in consistency; it was an invitation to slow down, ask better questions, and engage more honestly with the text.</p><p>This post exists simply as a record of that journey. If it encourages you to read more attentively, question more freely, or commit more patiently, then it has served its purpose. THANK YOU.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=86510ef2840f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[In Time: What If Your Time Was Money You Could Spend?]]></title>
            <link>https://medium.com/@chukwuemekangumoha/in-time-what-if-your-time-was-money-you-could-spend-92764552a5af?source=rss-129511df49fc------2</link>
            <guid isPermaLink="false">https://medium.com/p/92764552a5af</guid>
            <category><![CDATA[fiction]]></category>
            <category><![CDATA[politics]]></category>
            <category><![CDATA[economics]]></category>
            <category><![CDATA[time-management]]></category>
            <dc:creator><![CDATA[Prince C. Ngumoha]]></dc:creator>
            <pubDate>Thu, 09 Mar 2023 05:33:58 GMT</pubDate>
            <atom:updated>2023-03-09T05:33:58.608Z</atom:updated>
            <content:encoded><![CDATA[<p><em>What would life really be like if your time was indeed your money and your life?</em></p><figure><img alt="An Image of four men standing in front of a giant clock showing them how much time they have lived for and how much time they have left to live." src="https://cdn-images-1.medium.com/max/1024/1*EGBWwctfWjgEEKUztKiPmQ.png" /><figcaption><strong>Time is almost up: A life well lived</strong> by the <strong><em>midjourney bot</em></strong></figcaption></figure><p>Today, I watched a movie titled <em>In Time</em> , featuring such stars as <em>Amanda Seyfried</em> (who played the role of <em>Elizabeth Holmes</em> in <em>The Dropout</em>), <em>Justin Timberlake </em>(Known globally for music), <em>Cillian Murphy</em> (who played the role of <em>Tommy Shelby</em> in <em>Peaky Blinders</em>) to name only a few. This movie’s message really challenged my life and my way of thinking. And most importantly, this movie left me with a simple question: <em>What would life really be like if your time was indeed your money and your life?</em></p><p>The question above might seem like an easy one at first, but believe me when I say that there are many layers to this question. First, let me start by stating explicitly my greatest admiration for <em>Andrew Niccol</em> who I have come to understand is the screenwriter, director and producer of the movie. He really gave it a lot of thought. The storyline was, in my opinion, well written. Secondly, I must also state clearly that the points I’m about to share are simply opinions I derived from my interpretation of the movie and as such should be taken with a pinch of salt. In fact, I encourage you to watch the movie after reading this if you haven’t done so already so that you can form your own opinions and hopefully share them with me in the <strong><em>Comments</em></strong>.</p><p>Alright, with that out of the way, let’s get into the storytelling and lesson-building.</p><p>I want to ask another question: <em>What is time</em>? Is it simply an arbitrary standard that is set, determined and used by civilizations as a way to keep track of events? Is it, as some scientists posit, a deterministic, non-arbitrary natural constant that can only be defined and redefined by the best physics of the day and then broken or circumvented by some future technology which does not yet exist but maybe will? or is it, as the creators of <em>In Time</em> posit, a perfect form of money?</p><p>If you were expecting me to give a straight answer to this question, then I forgive your ignorance for even supposing that a mere pen-pusher like myself could even hope to give an answer to this question that has haunted the brightest minds for what seems an eternity. I can not answer this. But alas, I never aimed to do that. My aim in asking you this question is to lead you down the rabbit-hole necessary to explain to you what your life would be like if your time was indeed your money and your life. So, for our discussion, let’s say that time is money.</p><p>And not just money, but let’s also say that it’s the kind of money whose value is monitored, regulated and influenced by a centrally controlled stock market firmly in the hands of big business tycoons and state governments. If you’re reading this and have not been living under a rock for the past few years now, then I think you already have a rough idea of what happens when money is centrally controlled by incompetent governments and greedy businessmen (all things we have or used to have in no short supply in Nigeria) i.e The cost of living goes up, the poor get poorer and suffer and the rich get richer and that kinda stuff. Now picture this happening with your time in real time. Do you see how messed up this could be? Read on.</p><p>In the movie (<em>In Time</em>), humanity is portrayed to have developed the technology at some time in the 19th century to be able to live forever for as long as they are able to get more time added to their life’s clock. Human beings are portrayed to be able to live up to the age of 25 free from the menacing ticks of their life’s clock. But as soon as he/she approaches 25, the clock starts ticking and he/she has to literally work to get more time and hence, more life. To add to all this, as though all this were not terrible enough, your time is money. And when I say this, I actually mean that your time is literally the monetary object or currency that you use to buy food, book a taxi, buy a house, surprise that special someone with a gift e.t.c. Just let that sink in for a minute. In this system, nobody is interested in your naira, in fact there is no naira for that matter. You literally trade in your years, months, weeks, days, hours, minutes, seconds e.t.c for anything you could ever want the same way you would do with actual naira, or any other currency for that matter, today.</p><p>So, now that you fully understand what I’m talking about, let me tell you what I think about this. Let’s start with some of the positives of such a system. Believe me, even a terrible system like this does have it’s beauty.</p><h4>Advantages</h4><ul><li>Firstly, the more I think about it the more I see that time is indeed truest form of money there is. Even in the real world, what makes money valuable is how scarce it is, how hard it is to obtain a unit of it and whether or not it can be produced at will (the less, the better in this regard). When examined against the above listed criteria, no currency or form of money in the modern world exceeds time in value. In fact, I’d go as far as saying that every other measure of value in a sense derives it’s value from time i.e You’re only as valuable as the time others are willing to spend in order to get you, be you a carat of diamond, a pound of gold or a physically endowed woman at the bar. It’s all the same. So based on all this, a monetary system based on actually tracking time can never really be subject to the whims of the regulators as time in any universe cannot be printed out of thin air like a naira note can.</li><li>Secondly, and this is a messy one, if you’re fortunate enough to be born into an affluent family under such a system, you could literally achieve immortality with ease. And not just you, but all your loved ones as well. So you don’t have to be lonely. That is, as long as the universe stays friendly and no one falls of the balcony <em>accidentally</em> …</li><li>Thirdly, in such a system you could literally give and be given more time to and by someone you love and who loves you. Maybe a relative who has enough time due to his/her many business dealings would simply send you a few hundred years the same way you send your girlfriend some much needed airtime today. Wouldn’t that be awesome?</li></ul><p>But alas, in the words of Raymond Leon (Cillian Murphy) in the movie: <em>For a few to be immortal, many have to die</em>. Without further ado, here are some of the dreadful Consequences of such a system:</p><h4>Disadvantages</h4><ul><li>It is a capitalist’s dream. In the sense that, if you’re already rich and influential with a lot of businesses involved the Time exchange, think banks and other financial institutions, you could raise the interest rate for time borrowed by any of your time-lenders knowing fully well that your lenders can never pay you back and will have to give you a cut of the time they earn through their hardwork, sweat and tears <em>Forever</em>. Hence, this kind of system would create an eternally entrenched upper class and an eternally downtrodden working class, there’ll be no such thing as middle class. There’ll be no such thing as class mobility. Horrible, isn’t it?</li><li>And to make matters even worse, the upper class will do what upperclass men always do in any world and constantly seek to influence the cost of living so that they make more money at the expense of the poor. No one would give a damn, it’ll all be about unbridled greed. Who doesn’t want more time ? To paint a vivid picture, imagine your dad (or any parent you love more) dying on his way back home simply because he only had one hour of life and had to trek a distance that would on average take him four hours to complete simply because he could not afford the two hour bus fare. And the prices would just keep going up.</li><li>Thirdly, the police and every other form of law enforcement would be in the palms of the rich and powerful and would do their bidding and do everything to protect said rich and powerful people. This will most likely be because many of these same law enforcement agencies are staffed primarily by humans who also need time and because, time cannot be printed out of thin air, they would be heavily reliant on freewill donations from the same rich and powerful men they are supposed to enforce the law on. Leading to the further legitimization of the subjugation of the poor working class people in such a system.</li><li>Lastly, the global talent pool will never get replenished and global innovation and scientific advancement will come to an eternal halt. This is because, the rich will never really die and the poor will never really live and can not escape their lot. We all need death, this world needs death to be an equal destination for all men, so such a system will only hasten the demise of the human race. A race already on the precipice.</li><li>There are still many more disadvantages to this system, many of which I was unable to properly articulate for this write-up, if you watch the movie and come up with something different, please let me know in the <strong><em>Comments</em></strong> section. <em>But the point is clear, if you ever wake up in a world with such a system, make sure you are not poor</em>.</li></ul><h3>Conclusion</h3><p>So, why did I write this long article?</p><p>Well, it’s simple. I want you to think about how valuable your time actually is. After watching the movie I realized that I’ve been lying to myself about how much time I have. Even though no one is buying or trading my time literally, my time is still the most valuable asset I have. It is my life. Time is indeed money. It is the only money that I and the billionaire get paid the same amount of everyday.</p><p>So after watching this movie, I realized that I have to start treating my time as money. I have to stop thinking about the past because it’s gone. I have to stop thinking about the future because it’s never going to come. I only must focus on the present, this present moment. Because, this is where all that could ever happen happens. And I hope that I’ve succeeded in making you see your time in the same light.</p><p><strong><em>Thank you</em></strong>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=92764552a5af" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Configuration Management Using Puppet: A Basic Overview]]></title>
            <link>https://medium.com/@chukwuemekangumoha/configuration-management-using-puppet-a-basic-overview-50604e6d8891?source=rss-129511df49fc------2</link>
            <guid isPermaLink="false">https://medium.com/p/50604e6d8891</guid>
            <category><![CDATA[backend-development]]></category>
            <category><![CDATA[puppeteer]]></category>
            <category><![CDATA[configuration-management]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[puppet]]></category>
            <dc:creator><![CDATA[Prince C. Ngumoha]]></dc:creator>
            <pubDate>Tue, 10 Jan 2023 19:50:11 GMT</pubDate>
            <atom:updated>2023-01-10T19:50:11.970Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="A cup with pens inside it" src="https://cdn-images-1.medium.com/max/1024/1*SY2SYV9-LwsLS06k4oQuuQ.png" /><figcaption>fig: Mental Model For Configuration Management</figcaption></figure><p>Being a developer doesn’t make you any less of a human being than the next person. Being a human, you are bound to make costly mistakes sometimes. Unfortunately, in the world of high-performance software systems with extensive backend infrastructures and high-priced hardware, certain mistakes can be quite costly indeed. For example, imagine yourself to be a backend web developer working for google. Now, imagine yourself working on their servers and then imagine that you fail to notice a bug in your code before you deployed it to the production environment and it goes on to cause about 60% of all the user data on the company’s databases to be erased. Now, imagine how much trouble you’d be in if you fail to fix it, imagine how many hours it will take you to manually restore just 25% of what was lost. Now, you can see why I said mistakes as a developer are indeed costly, both for you and the company you work for.</p><p>Now, you might be wondering what the solution to this could be. Surely, it’s not possible for humans to stop making mistakes. Well, that’s the purpose of this write-up. Today, we are going to be talking about <em>Configuration Management</em>; What it is, why it is important and how we can perform it using an industry tool known as <em>Puppet</em>. Mind you, this is not going to be an exhaustive introduction to Puppet, so I’ll do my best to link to more comprehensive stuff in the course of this article. Alright, if you’re reading this, let’s get into this:</p><h3>Configuration Management: What is it?</h3><p><em>Configuration Management</em> is simply the process of keeping record of the information describing the state of system’s hardware and software so that in the advent of a disruptive change to said system, the system can be easily be made to attain and retain the recorded state automatically.</p><p>Now, why would you want to care about this. What makes Configuration Management so special and why should I care about it? In your case, there’s only one reason that makes sense and that is the fact that this process could help you restore all the files from the company server that you just lost and it can help you do so in less time than it would take you to do so manually. I think this is a good enough reason to learn this. Don’t you?</p><p>Now, there are a bunch of Configuration Management tools on the market. But among these, only three tools; Ansible, Puppet and Chef tend to grab the bulk of the market share among many tech companies. And, in this article, we’ll be touching solely on the basics of Puppet because that is all I’m familiar with at the present moment (Sorry…).</p><h3>Puppet</h3><figure><img alt="A simple logo of the Puppet Configuration Management tool" src="https://cdn-images-1.medium.com/max/259/1*wEOJp_XKjAbjXSYN9OGGbQ.png" /><figcaption>Fig: <em>Logo of Puppet C.M tool</em></figcaption></figure><p><em>Puppet</em> is a tool that helps us carry out the process of Configuration Management. It is built and maintained by <a href="https://www.puppet.com/">Puppet Labs</a> using the <em>Ruby</em> programming language and makes use of a <em>Domain Specific Language</em> or <em>D.S.L</em> which is for the most part based on Ruby. Puppet takes a very centralized approach to performing Configuration Management with a single workstation or server on the network being designated as the <em>Puppet master</em> while the other servers on the network are designated as <em>Puppet agents</em>. The master is in responsible for keeping track of the state of the agents and where one of them, due to some unanticipated disruption, deviates from the state predefined for the system by the System Administrator, the master attempts to revert the specific agent back to said state. In order to learn more about Puppet, it’s architecture and operation, check <a href="https://www.techtarget.com/searchitoperations/definition/Puppet-Puppet-Labs">here</a> and <a href="https://docs.oracle.com/cd/E53394_01/html/E77676/gqqvw.html#:~:text=Puppet%20works%20by%20using%20a,typically%20as%20a%20background%20service.">here</a>. Alright, before we call it a day, let’s look at the Puppet D.S.L.</p><h3>The Puppet D.S.L</h3><p>Unlike many other configuration management tools, Puppet makes use of a relatively simple D.S.L. Today we’ll be looking at <em>Resources</em>, <em>Variables</em> and <em>Classes</em> which will be more than enough to enable you start writing the most basic Puppet scripts or as they are called <em>manifests</em>.</p><h4>Resources</h4><p>Due to the fact that the goal of Puppet is to describe the desired state of a given system, it’s D.S.L provides us with a simple way to represent computer resources in our manifests. This is accomplished in puppet through the use of <em>Resource Types</em>. resource types provide a set of attributes which further help us simplify the process of describing the state of the system. In Puppet, resource types are defined using the following syntax:</p><pre>resource_type {&#39;name of resource&#39;:<br>  attribute1  =&gt; value1<br>  attribute2  =&gt; value2<br>  ...<br>}</pre><p>where resource_type can be the name of any of the resources shown below (must be written in lowercase though, most times), attribute is any attribute provided for that specific resource as documented in <a href="https://www.puppet.com/docs/puppet/7/intro_puppet_language_and_code.html#intro_puppet_language_and_code">Puppet’s documentation</a></p><p>There are a lot of resource types in Puppet, but below are five of the most commonly used resource types and what system resources they represent:</p><ul><li><strong>Exec</strong>: This is intended to represent commands typed by the user on the <em>Command Line Interface</em> or <em>C.L.I</em> of an operating system.</li><li><strong>Package</strong>: This is intended to represent a software program to be either installed or uninstalled e.g Installing Nginx server software can be done using Puppet through the use of this resource type.</li><li><strong>Service</strong>: A service or utility software running on the system at the moment e.g <em>SSH</em> and the <em>SSH</em> daemon are very good examples of this.</li><li><strong>File</strong>: A file, directory or symbolic link on the system that we wish to work with.</li><li><strong>Cron</strong>: A cron job. Essentially any process or job running in the background of the system.</li></ul><h4>Classes</h4><p>Classes come in handy when we wish to organize the contents of our manifest and make them easier to read and manage. Essentially, classes can make a certain description of an entity reusable and maintainable. A good example of where a class comes in handy is when we wish to setup a specific package which requires certain files and services to be modified or destroyed for it’s setup to be completed. We could create many independent resource descriptions for each entity involved in this process, but this would be a really clumsy and error-prone way of doing it, one that would become very hard to manage as the system we wish to describe gets more and more complex. A better way to do this would be to simply encapsulate (contain) all our resource descriptions in a class description representing the package’s setup process and call that class whereever and whenever it’s needed. In Puppet, classes are defined using the following syntax:</p><pre>class class_name {<br>  resource1 {&#39;name of resource&#39;:<br>    # all attributes for this resource go here<br>  }<br>  resource2 {&#39;name of resource&#39;:<br>    # all attributes for this resource go here<br>  }<br>  ...<br>}</pre><p>and then the defined class can be called using the following syntax:</p><pre>include class_name</pre><p>To learn more about classes, check <a href="https://www.puppet.com/docs/puppet/6/lang_classes.html">here</a>.</p><h4>Variables</h4><p>As in all programming languages, there are times when we wish to make our data reusable and easy to update. And just like other languages, Puppet gives us the ability to work with variables. In puppet, a variable can be created using the following syntax:</p><pre>$variable_name = value</pre><p>And the created variable can be used through the use of the following syntax:</p><pre>attribute_to_set: &quot;${variable_name}&quot;</pre><p>where attribute_to_set is a an attribute of a certain resource type to which we wish to assign the value stored in the variable stored in variable_name (<strong><em>Take Note of the double quotes used in the example code block above, they are important</em></strong>). Variables come in handy when we wish to stop repeating literal values in our code.</p><h3>In Conclusion</h3><p>Seeing as this has already become a very long article, I’ll call it a day at this point. Thank you so much for reading all I had to say on this topic. I hope I’ve successfully persuaded you to embrace Configuration Management in your work and most importantly, to do so using Puppet as your tool of choice.<br>If you found this piece helpful, then make sure to FOLLOW me because I’m always posting articles like this which I’m sure you’ll find useful and helpful. I post roughly every two weeks, so don’t miss out.</p><p>If you’re also interested in learning more about Configuration Management, then please check out this <a href="https://www.youtube.com/watch?v=F-NGOvYiV9g">video</a>.</p><p>Alright, until the next time.</p><p><strong>Keep Learning</strong></p><p><strong>Keep Growing</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=50604e6d8891" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[All The Way Through The Stack]]></title>
            <link>https://medium.com/@chukwuemekangumoha/all-the-way-through-the-stack-5dc5d062296d?source=rss-129511df49fc------2</link>
            <guid isPermaLink="false">https://medium.com/p/5dc5d062296d</guid>
            <category><![CDATA[servers]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[google]]></category>
            <category><![CDATA[sysadmin]]></category>
            <dc:creator><![CDATA[Prince C. Ngumoha]]></dc:creator>
            <pubDate>Fri, 11 Nov 2022 23:54:06 GMT</pubDate>
            <atom:updated>2022-11-11T23:54:06.252Z</atom:updated>
            <content:encoded><![CDATA[<p>What Really Happens When You Type “<em>google.com</em>” In Your Browser’s Search Bar And Press ENTER</p><p>As a seven-year old child, browsing the internet on my dad’s laptop in 2008, the entire process of getting a website from the internet was a pretty interesting experience to me. At the time, I enjoyed playing games on the internet. Although the games were very basic compared to what obtains today, I enjoyed them a lot. And as I played and had fun on the internet, I became curious to understand how everything really worked behind the scenes. It is this curiosity, that has led me to create this simple write-up in which I attempt to explain the inner workings of the internet. In particular, I attempt to explain what happens when you type ‘<em>www.google.com</em>’ into the search bar on your browser and hit the ENTER button.</p><p>I hope this satisfies your curiosity as much as it did my desire to write.</p><h3>Browser, I want “google.com” . Bring Me “google.com”</h3><p>So, let’s imagine a scenario with you, my reader, trying to get to the site: “www.google.com”. You’ve just typed in the full URL;</p><pre>https://www.google.com</pre><p>Then you hit the ENTER button on your keyboard, and almost immediately the google homepage (as depicted in the image below) is displayed in the browser. Almost like Magic.</p><p>But wait a second, is this Magic? or is there more to it? Well, I’m about to show you that indeed it is not magic, but technology at it’s finest.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/275/1*-7aynw2EgqAnCjhSF4kw0A.png" /><figcaption><em>Image of a laptop displaying the google homepage</em></figcaption></figure><h3>Alright, if it’s not magic, then what is it?</h3><p>You are about to find out. Just read on carefully and patiently.</p><p>When you type <a href="http://www.google.com/"><em>www.google.com</em></a> in the browser’s search bar, a lot of pretty cool processes are set into motion behind the scenes to enable the browser display a page as simple as the google homepage to you.</p><figure><img alt="Example Infrastructure diagram" src="https://cdn-images-1.medium.com/max/665/1*lCTTKZxRPQFhZvcfLFAq7Q.png" /><figcaption>Infrastructure diagram demonstrating the process of fetching google.com</figcaption></figure><p>Alright, let’s get into it;</p><p>Firstly, the browser has to understand what you mean by <a href="http://www.google.com./"><em>www.google.com </em>.</a> This is thanks to the fact that the browser does not really understand “plain english” domain names like <a href="http://www.google.com/"><em>www.google.com</em></a>, <a href="http://www.facebook.com/"><em>www.facebook.com</em></a> e.t.c. To the browser, these names are just gibberish, totally meaningless and do not provide the information it needs such as the <em>I.P Address </em>of the server holding the resource you asked it to look for, in this case the google homepage<a href="http://www.google.com)./">.</a> A classic IP Address (IPv4) is a set of four numbers seperated by periods/dots. It is used to identify resources and devices connected on the internet. A typical IP Address looks like this:</p><pre>xxx.xxx.xxx.xxx</pre><p>Where each <em>xxx</em> represents a particular number ranging from 0 to 255. As an example, let’s say that <a href="http://www.google.com/"><em>www.google.com</em></a> is located in a server with the I.P address: <em>10.245.76.21</em>. In order to get to this server, we need to make the browser understand that <em>10.245.76.21</em> and <a href="http://www.google.com/"><em>www.google.com</em></a> are essentially referring to the same thing. We make use of the <em>Domain Name Server/Service</em> or <em>D.N.S</em> for this. For the sake of simplicity, just think of the D.N.S as a register/book containing the name of every website in existence along with their respective I.P Addresses. This register is not located on the browser, but is housed on a special machine known as a D.N.S server located at some other point in the world. As a matter of fact, there are many such D.N.S servers around the globe. And the browser has to make a request to one of these servers in order to get the I.P address of the desired server holding the google homepage.</p><p>“Does that mean that the browser has to make a request to this server every time we want to access <em>www.google.com</em>?”</p><p>Well, not exactly. Doing things this way has the downside of being really slow and frustrating for the average user. So, in a bid to fix this problem, most browsers come with a local <em>Cache</em> memory which is used to store, for a short period, the IP addresses of websites that are regularly visited.</p><p>So, the browser first checks this local Cache memory and if it can’t find the IP address we need there, it forwards the request to the root D.N.S server which then returns the corresponding I.P address for the domain name <em>google.com</em> and returns said I.P address to the browser (<em>10.245.76.21</em> in this case). The browser then sends a HTTP request directly to the server at that I.P address. At the server, our request is further processed:</p><ul><li>The <em>Web Server</em> (NGINX or Apache) will receive the request and determine what actions to take. If the request is for <em>static</em> content, the web server returns that and moves on to process other requests. If the request is for content that has to be generated “on the fly” (A.K.A <em>dynamic</em> content), the web server forwards the request to the <em>application server</em>.</li><li>At the <em>Application server</em>, the forwarded request is processed and the required page is generated and forwarded back to the web server which returns this content to the user.</li><li>The Application server depends on the business logic (code) contained in the <em>Application files</em> in order to generate the required dynamic content which it forwards to the web server.</li><li>And occasionally, if there is a need to store or retrieve data about specific things, the Application Server downloads the required data from the <em>Database</em> which is usually hosted on a seperate <em>Database Server</em> but could still reside on the same server.</li></ul><p>Once our request is processed, the server sends back to the browser all the specific resources we requested for and then the browser proceeds to parse, organize and display these pieces of data as the google homepage.</p><h3>Is This All There Is?</h3><p>YES. On a very basic level, this is all that really happens whenever you request a website like <em>www.google.com</em>.</p><p>But there are some additional tools and technique used by google (and most other organizations for that matter) to make the request-response process more reliable and secure. So, let’s talk about them along with the rationale for using them:</p><ul><li>Firstly, due to the massive number of requests that a site like <a href="http://www.google.com/"><em>www.google.com</em></a> gets on an hourly basis, it becomes impossible for google to use a single server to host their websites as this could cause the server to break down more frequently due to overload leading to interruptions in service. Hence, organizations like google make use of multiple servers hosting identical copies of the google homepage to service the large volumes of requests coming from millions of browsers on an hourly basis. This is accomplished in most cases through the use of a <em>Load Balancer</em> which, as the name implies, helps to distribute the load/requests between the many servers in use for this website (<em>www.google.com</em>).</li><li>Secondly, <em>H.T.T.P</em> (Hypertext Transfer Protocol) is not a secure protocol and is vulnerable to security threats. In reality, google (like many other organizations) makes use of H.T.T.P.S (Hypertext Transfer Protocol Secure) which uses <em>S.S.L</em> (Secure Socket Layer) to provide security.</li><li>Thirdly, google makes use of some of the most advanced and sophisticated <em>firewalls</em> and other techniques in order to prevent certain kinds of access to their servers which have the potential to lead to security breaches. These firewalls are usually configured by Sysadmins from the company: google</li><li>Lastly, At google, they surely make use of Server <em>Monitoring</em> software like <strong><em>Datadog</em></strong> which helps to automate the process of keeping track of the health of all the servers in use, drawing the attention of Sysadmins only as the need arises.</li></ul><h4>Alright, let’s take a quick recap of the whole process</h4><p>So, when the user types in <a href="http://www.google.com/">www.google.com</a> into the search bar on the browser and hits ENTER, the browser tries to get the I.P Address of the server which holds the google homepage from the D.N.S server. The D.N.S server receives the domain name (google.com in this case) and returns the I.P address mapped to said domain name to the browser. The browser then sends a HTTPS request through to the load balancer at the specified I.P address. The load balancer then forwards our request to any one of the servers under it’s management. The firewall on the server selected by the load balancer then examines the nature of requests and determines if it poses a security threat or not. If it does not, then the firewall forwards the request to the server which then processes our request and returns the required resources in the form of a HTTPS response to the browser. The browser then proceeds to parse, organize and display the contents of this response.</p><p>And that, in a nutshell, is what happens when you type “www.google.com” on browser search bar and hit ENTER. Once again, Thanks for reading. Till the next time.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5dc5d062296d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Try … Except … Finally]]></title>
            <link>https://medium.com/@chukwuemekangumoha/try-except-finally-9a1ad0887cea?source=rss-129511df49fc------2</link>
            <guid isPermaLink="false">https://medium.com/p/9a1ad0887cea</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[error-handling]]></category>
            <dc:creator><![CDATA[Prince C. Ngumoha]]></dc:creator>
            <pubDate>Wed, 10 Aug 2022 17:44:35 GMT</pubDate>
            <atom:updated>2022-08-10T17:57:45.508Z</atom:updated>
            <content:encoded><![CDATA[<h3>Try … Except … Finally</h3><h4>Errors, Exceptions and What To Do With Them</h4><figure><img alt="An image of a laptop with error messages displayed on it’s screen." src="https://cdn-images-1.medium.com/max/1024/1*7fexjmQMzTnbgIPbLVQI4A.png" /><figcaption>Debugging session and error messages</figcaption></figure><p>I have always had to deal with problems (errors) whenever I code. For as long as I can remember, this has always been the case.</p><p>There were times when I would be trying to write a very simple program, at least, I would consider it to be a simple program right before I would get my first error message and then everything would change for the worse and I would begin to freak out.</p><p>Although, it can be very unpleasant whenever it happens, the truth still remains that whenever you work with or on code (except simple two-liners and snippets), you will inevitably have to deal with one or more error messages along the way. Nowadays, to me at least, it feels somewhat like a fact of life that as a developer, I can’t have a single day in which all my code just works perfectly without errors. And the worst part about it is that these errors could be caused by some of the most mundane reasons imaginable. Simple things like forgetting to place a semicolon or colon at certain points in the code, could lead to some of the longest debugging sessions. Sometimes, I wish the interpreter or computer were a bit smarter and could help me out once in a while.</p><p>So today, we are going to be talking about Errors and Exceptions, what they are, why they occur and how to handle them in modern programming languages like Python. Specifically, we are going to be looking at the following points:</p><ul><li>Errors and Exceptions:</li><li>Mechanisms for handling Exceptions in Python</li><li>When to do Exception handling when writing code.</li></ul><p><strong>NOTE: Exception handling is just one of many approaches used by Software Engineers to detect and resolve somewhat fatal errors as they occur, but it is by no means the only approach. So, feel free to do your own research. And share whatever you discovered with me on my twitter handle </strong><a href="https://twitter.com/PNgumoha"><strong>@PNgumoha</strong></a><strong>. Also, FOLLOW me on twitter for more content like this.</strong></p><p>Alright, without any further delays, let’s get cracking</p><h3>Errors and Exceptions</h3><figure><img alt="Errors and Exceptions" src="https://cdn-images-1.medium.com/max/424/1*jG7UgapJbP88x6oMOktKrg.png" /><figcaption>Venn Diagram depicting the relationship between errors and exceptions.</figcaption></figure><p>Alright, let’s get some definitions out of the way:</p><p><em>What is an Error?</em></p><blockquote>An error, at least in the context of Software Engineering, is simply anything that interferes with the expected flow of execution of a program.</blockquote><p>From the definition above, it’s not too hard to get an idea of what an error really is. But just to drive the point home a bit, let’s consider an example:</p><p>Let’s say we are writing a program to print the numbers zero to nine on the screen and we wrote the following code:</p><pre>#!/usr/bin/python3</pre><pre>for num in range(10)<br>    print(num)</pre><p>What do you think will be the output of the code above when it is executed?</p><p>If your answer was that the output would look somewhat like this :</p><pre>0<br>1<br>2<br>3<br>4<br>5<br>6<br>7<br>8<br>9</pre><p>Then, you’re terribly wrong. That’s because, instead of producing the output above which is the expected output for this particular program, the interpreter goes on to produce the following error message:</p><pre>File &quot;example.py&quot;, line 3<br>    for num in range(10)<br>                       ^<br>SyntaxError: invalid syntax</pre><p>Which, in this case at least (and in most cases), is not the expected output.</p><p>What this error message is trying to tell us is that the interpreter encountered an error while running our code. In this particular case, it encountered a SyntaxError , which is an error caused when we write code that the interpreter cannot interpret either because we omitted something that was required in the statement or because we introduced something which was not required in the statement.</p><p>What would you say caused the error? I’ll allow you provide the answer to that by yourself. If you feel like sharing your thoughts, you can reach out to me on my twitter handle <a href="https://twitter.com/PNgumoha"><strong>@PNgumoha</strong></a></p><p>An important point to note about is that although the some like the error above are caused by the way we write our code and other factors under our direct control, not all errors are caused by factors directly under our control. Some errors can be caused by external factors over which we have little to no control like user input. Hence, the need to write code that deals with these kinds of errors.</p><blockquote>Errors whose occurrence are not dependent on the programmer but on external factors or on other things which are outside the direct control of the programmer are known as <strong>Exceptions</strong></blockquote><p>So, while all exceptions are errors, not all errors are exceptions.</p><p>A very important point to note is that <em>Errors</em> tend to be discovered prior to the actual execution of the code while <em>Exceptions</em> are usually discovered when the code is in the process of being executed. Although, this is not always the way it happens in some programs, especially when dealing with buggy code which contain lots of logic errors (a class of errors I would prefer to avoid talking about)</p><p>Alright, let’s talk about how to handle exceptions in our code.</p><h3>Handling Exceptions</h3><p>We’ll be using the Python programming language’s exception handling features in order to demonstrate exception handling.</p><p>Essentially, when it comes to handling exceptions in code, we need to be able to deal with the four stages/phases of an exception:</p><ul><li>The <em>Trying</em> stage: At this stage, the suspicious code is executed and potential exceptions are detected.</li><li>The <em>Catching</em> stage: At this stage, any exception detected in the <em>Trying</em> stage is handled here.</li><li>The <em>Not-caught</em> stage: This stage occurs if and only if no exception was detected in the <em>Trying</em> stage.</li><li>The <em>End</em> stage: This stage occurs after all exception handling has been done by the program.</li></ul><p>Not all programming languages provide tools for dealing with all four stages of exception handling. Many, like C, just provide for just two of the aforementioned stages.</p><p>Luckily, Python provides clauses for each of these stages. The clauses provided by Python (in the appropriate order) are:</p><ul><li>The <em>try</em> clause : This is used to encapsulate (contain) the code which we suspect to be error prone.</li><li>The <em>except</em> clause: This contains the code which is meant to handle the exception which may have occurred when the code in <em>try</em> clause was executed. In Python, we can have as many <em>except</em> clauses as we need in order to target all the exceptions whose occurrence we believe are possible. It is always a good idea to make as many except clauses as possible as this provides more granular (precise) exception handling. This clause is compulsory.</li><li>The <em>else</em> clause: This contains the code which should be executed if none of the specified exceptions occurred. It is not compulsory to provide this clause.</li><li>The <em>finally</em> clause: This contains the code which is run after all exception handling has been carried out. It is also not compulsory in Python to provide this clause.</li></ul><p>Alright, let’s take a simple example. Let’s we want to write a program which accepts two integers from the user, computes the result of dividing the first integer provided by the second and then prints the result to the screen.</p><p>Here is a version of the code which is error prone code:</p><p><a href="https://replit.com/@ChukwuemekaNgum/Error-prone-code#main.py">Error prone code</a></p><p>And here is a version of the code which handles all possible exceptions:</p><p><a href="https://replit.com/@ChukwuemekaNgum/Error-Handled-Code#main.py">Error Handled Code</a></p><p>So, feel free to run the two codebases above with various values for the first and second integers respectively. Also try to pass in values that are not integers while running the two of them and notice what each program prints to the screen.</p><p>You’ll notice that while the first program produces errors when faced with unexpected values, the second program handles the unexpected values appropriately.</p><p>Alright, you might have noticed that the program which handled exceptions appears to be considerably more verbose that the one which didn’t and you might be wondering whether you have to attach long exception handling code each time you write a program. So, let’s talk about that in the next and final section of this piece.</p><h3>When Do We Need Exception Handling In Our Code</h3><p>Due to the fact that adding the code to handle exceptions can make our programs bloated, it’s not always a good idea to add such to our code. Luckily for us, we do not always need it in our code. It is only useful to add it to our code when we are dealing with exceptions that are a bit subtle and hard to detect or control by the programmer. A few examples of such cases include:</p><ul><li>When our program depends on user input</li><li>When our program depends on access to an external resource such as a network socket or a file.</li><li>Among other such cases.</li></ul><p>Alright, thank you for reading through this already long article.</p><p>If you like my pattern of explaining these concepts, then please consider FOLLOWING me on <a href="https://medium.com/u/129511df49fc">Prince C. Ngumoha</a> at medium and on twitter <a href="https://twitter.com/PNgumoha"><strong>@PNgumoha</strong></a></p><p>Alright, good bye for now, till the next time</p><p><strong>Keep Learning</strong></p><p><strong>Keep Growing</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9a1ad0887cea" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Did You Know? Everything In Python Is An Object.]]></title>
            <link>https://medium.com/@chukwuemekangumoha/did-you-know-everything-in-python-is-an-object-494d37321150?source=rss-129511df49fc------2</link>
            <guid isPermaLink="false">https://medium.com/p/494d37321150</guid>
            <category><![CDATA[object-oriented]]></category>
            <category><![CDATA[concept]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[guides-and-tutorials]]></category>
            <dc:creator><![CDATA[Prince C. Ngumoha]]></dc:creator>
            <pubDate>Sun, 31 Jul 2022 03:05:11 GMT</pubDate>
            <atom:updated>2022-07-31T03:05:11.062Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/612/1*eCfXOkSuVdVp2ZaBDz5sWQ.jpeg" /></figure><h3>Let’s talk about a concept which has been a source of frustration for many developers over the years. Particularly, developers like myself, who started out by programming in the C programming language (or any other Compiled programming language for that matter).</h3><p>The focus of this piece will be the Python programming language. Particularly, the typing system in Python. So, in light of that, we’ll be talking about:</p><ul><li>Why I say that everything in python is an object.</li><li>Classes of objects</li><li>Examples of mutable objects</li><li>Examples of immutable objects</li></ul><p>and then we’ll look at some code to help you understand everything a bit better.</p><p><strong><em>NOTE</em></strong><em>: I’m going to be providing some </em><strong><em>C</em></strong><em> code as benchmark comparisons in order to drive home the points I aim to make in this article. So, please bear with me if you don’t understand </em><strong><em>C</em></strong><em>, I’ll do my best to carry you along.</em></p><p>Alright, let’s continue.</p><h4>The Object Structure Of Python</h4><p>There is no better way to illustrate the difference (and to some degree, Oddity) of the Python Object structure from what exists in other programming languages than to look at the way <em>variables</em> are created and used in Python as opposed to how they are created and used in other languages such as <strong>C</strong>.</p><p>So, before we go on, let’s go back to <strong>C</strong> for a little while. In order to create a variable in <strong>C</strong>, we would have to type the following code:</p><pre>#include &lt;stdio.h&gt;<br>#include &lt;stdlib.h&gt;</pre><pre>int main(void)<br>{</pre><pre>    int num = 10;</pre><pre>    return (EXIT_SUCCESS);<br>}</pre><p>Many programmers have gotten used to the idea that the variable created from this code can be considered analogous to a box containing something and hence when we are asked to represent it in memory, we end up drawing a diagram like the one below:</p><figure><img alt="How we picture C variables in memory" src="https://cdn-images-1.medium.com/max/397/1*Eusi890ojcSuqUnYjGBXFQ.png" /></figure><p>From the image above, you can see that the memory representation is shown as a box which contains the value (<em>10</em> in this case). The box has a name (<em>num</em>) and an address (<em>0x7fff5694dc58</em> in this case).</p><p>So, for developers who say that a <em>variable</em> is simply a “box used to store data in memory”, you clearly wouldn’t be wrong in this case. It’s a pretty accurate analogy. In <strong>C</strong>, the variable actually owns the memory location that contains the value and hence, it wouldn’t be wrong to refer to a <strong>C</strong> variable as a <em>box.</em></p><p>Now, let’s consider the following somewhat equivalent situation in Python:</p><pre>n = &quot;foo&quot;<br>m = 400</pre><p>How do you think that these two variables would be represented in memory? Could you represent <em>n</em> and <em>m</em> as boxes containing values at a certain address in memory?</p><p>If you answered “Yes” to the second part of that question, then <em>Congratulations, </em>you are one your way to writing buggy python code and getting frustrated. Good luck.</p><p>“So, what would be an accurate representation of a variable in Python?” You might be asking. Let’s explore an answer:</p><p>In Python, I could go as far as saying that we don’t really have variables. All we have in Python are <em>names</em> and <em>objects</em>. In essence, Python variables are not really variables in the traditional sense of the word, rather, they behave more like <em>Pointers</em> in <strong>C</strong> or , more accurately, <em>References</em> in <strong>C++11 </strong>(and above) and <strong>Java</strong>. All variables created in Python are simply <em>names</em> which point to an <em>object</em> created somewhere in memory. The names are not the actual memory locations but are simply pointing or referring to that memory location.</p><figure><img alt="Python variable in memory" src="https://cdn-images-1.medium.com/max/286/1*DXdHtqS_C0HHSM-iP4irUQ.png" /></figure><p>Due to this fact, the Python type system can sometimes be a very confusing thing to work with for developers who are used to the idea of typed variables and come from more <em>traditional</em> programming backgrounds.</p><p>This behavior does not end in variables, but everything in Python essentially behaves in this way. And by everything, I mean EVERYTHING. Lists, functions, e.t.c. Everything is an object in Python.</p><p>Alright, let’s talk about the major categories of objects we have in python.</p><h4>Classes (or Categories) Of Objects</h4><p>As with human beings, all objects are not <em>created</em> equal by the Python interpreter, they all come with their own unique <em>characters.</em> Despite this fact though, they can all be seperated into two camps, namely:</p><ul><li>Mutable Objects</li><li>Immutable Objects.</li></ul><p>So, what does it mean for an object to be “Mutable” or “Immutable”?</p><p>It all comes down to this one question: “After declaration, can I change the value in this object?” (Ask yourself, this question everytime you sleep)</p><p>If you can reply with a resounding “Yes” for any object in particular, then that object is <em>mutable</em>. Otherwise, the object is <em>immutable.</em></p><p>Examples of Mutable Objects include:</p><ul><li>Lists</li><li>Dictionaries</li></ul><p>While, examples of Immutable Objects include:</p><ul><li>All the primitive objects like <em>integers</em>, <em>floats</em>, <em>strings</em>, <em>booleans</em> e.t.c</li><li>tuples</li></ul><p>So, what do we really mean when we say that mutable objects <em>allow change</em> to their values while immutable objects <em>do not allow change</em> to their values?</p><p>Well, let’s take a look at some examples which can help understand this idea a little bit more:</p><p>Let’s say we had a list named <em>my_list</em> somewhere in our code which contains three elements:</p><pre>my_list = [1, 2, 3]</pre><p>If we want to change the first element’s value from <strong>1 </strong>to <strong>0</strong> , we could write a statement like this:</p><pre>my_list[0] = 0</pre><p>and the list’s contents would become:</p><pre>[0, 2, 3]</pre><p>So, from this, we can say that <em>my_list</em> refers to a <em>Mutable Object.</em></p><p>Alright, let’s look at another example. let’s say we had a tuple aptly named <em>tuple_1</em> somewhere in our code which we set to the following value:</p><pre>tuple_1 = (1, 2, 3, 4)</pre><p>and then, let’s say we wanted to change the value of the first element of the tuple as we did for our list, namely:</p><pre>tuple_1[0] = 0</pre><p>What do you think we would get from this?</p><p>If you said “An Error”, then you’re beginning to understand the difference between mutable and immutable objects. On executing that line of code, the interpreter would return the following complaint (Error):</p><pre>Traceback (innermost call last):<br>...<br>TypeError: &#39;tuple&#39; does not support element assignment.</pre><p>In this case, it would give an error message. There are some other more subtle things about mutable and immutable objects that I won’t be able to cover in this article, but if you’re interested to know more about them you can check out this article on <a href="https://stackoverflow.com/questions/8056130/immutable-vs-mutable-types">StackOverflow</a>.</p><h3>In Conclusion</h3><p>So, before you go, these are a few of the key points we touched on today:</p><ul><li>Python <em>variables</em> do not own locations in memory but are only names which are used to refer to an object in memory.</li><li>Python Objects can be divided into two classes namely; <em>Mutable</em> Objects and <em>Immutable</em> Objects.</li><li><em>Mutable</em> Objects are those objects which allow the code to make changes to their values after they have been declared.</li><li><em>Immutable</em> Objects are those objects which do not allow such changes after declaration</li></ul><p>Alright, thank you very much for reading this. I hope this article was helpful to you in some way.</p><p>If this article’s brief exploration of the concepts didn’t even begin to scratch your intellectual itch for knowledge, then please feel free to check out the following sources:</p><ul><li>s<a href="https://stackoverflow.com/questions/8056130/immutable-vs-mutable-types">tackoverflow</a>.com</li><li><a href="http://composingprograms.com/pages/24-mutable-data.html#sequence-objects">composingprograms.com</a></li><li><a href="http://www.openbookproject.net/thinkcs/python/english2e/ch09.html#objects-and-values">openbookproject.net</a></li></ul><p>Till the next time,</p><p><strong>Keep Learning</strong></p><p><strong>Keep Growing</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=494d37321150" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>