<?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 Tope Agboola on Medium]]></title>
        <description><![CDATA[Stories by Tope Agboola on Medium]]></description>
        <link>https://medium.com/@topeagboola?source=rss-f22fc5cc4ac0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*T4ICgWUdgE_zCzJp.</url>
            <title>Stories by Tope Agboola on Medium</title>
            <link>https://medium.com/@topeagboola?source=rss-f22fc5cc4ac0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 21:08:58 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@topeagboola/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[Post Mortem]]></title>
            <link>https://medium.com/@topeagboola/post-mortem-82db4b29e2f9?source=rss-f22fc5cc4ac0------2</link>
            <guid isPermaLink="false">https://medium.com/p/82db4b29e2f9</guid>
            <category><![CDATA[nginx]]></category>
            <dc:creator><![CDATA[Tope Agboola]]></dc:creator>
            <pubDate>Sun, 28 Jan 2018 00:58:27 GMT</pubDate>
            <atom:updated>2018-01-28T00:58:27.544Z</atom:updated>
            <content:encoded><![CDATA[<p>Between the hours of 13:12 PT and 13:48 PT an issue occurred where some clients may have experienced an outage on topeagboola.online. By, 13:34 PT we’d discovered there were incorrect redirects happening and rose to action to resolve the issue and prevent future occurrences. We found the issue to be that an HTTP redirect was loading a default nginx webpage. This issue had affected 100% of users. The main cause of this outage was a listener for HTTPS on our load balancer listening on the incorrect port.</p><p><strong>Timeline:</strong></p><p>13:12 — configuration push and nginx reloaded</p><p>13:24 — testing of the redirect conducted by SRE team</p><p>13:25 — discovered “Welcome to Nginx” webpage being served up</p><p>13:37 — confirmation of redirect syntax and verified with forwarded ports</p><p>13:40 — root issue discovered on load balancer listening for port 80 instead of port 443</p><p>13:45 — ports changed, and server restart begins</p><p>13:48 — service restored and <a href="https://topeagboola.online/">https://topeagboola.online</a> is back online</p><p><strong>Root Cause and Resolution:</strong></p><p>Before the corrections were pushed, nginx only listened on port 80 and the load balancer was redirecting port 443 to port 80. For the purpose of serving up secure content in HTTPS for topeagboola.online, nginx had to be configured but our SRE team didn’t ensure that the load balancers configurations weren’t affected. Users could still directly access <a href="https://topeagbboola.online/">https://topeagbboola.online</a> but the proper redirect wasn’t happening. It is still unknown why a default nginx welcome page was shown. Load balancer listeners were changed to take port 443 and point it to port 443 on nginx.</p><p><strong>Preventative measures:</strong></p><p>— add monitoring on the load balancer</p><p>— improve the recovery procedures to minimize time to recovery</p><p>— work on communication with users when outages occur what their options are, in this case, users could have alternatively used <a href="https://topeagboola.online/">https://topeagboola.online</a></p><p>— set expectations for future updates</p><p><strong>Conclusion:</strong></p><p>We realize the importance of access to our service and sincerely apologize for the inconvenience this outage caused. If you have any questions or concerns that were not addressed in this postmortem, please reach out to us via twitter.com/topea_ and we’ll do our best to provide you with the answers to your questions or concerns.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=82db4b29e2f9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Python: Everything is an object!]]></title>
            <link>https://medium.com/@topeagboola/python-everything-is-an-object-18bf5f9e604f?source=rss-f22fc5cc4ac0------2</link>
            <guid isPermaLink="false">https://medium.com/p/18bf5f9e604f</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[python3]]></category>
            <dc:creator><![CDATA[Tope Agboola]]></dc:creator>
            <pubDate>Wed, 06 Sep 2017 06:07:41 GMT</pubDate>
            <atom:updated>2017-09-18T00:40:08.183Z</atom:updated>
            <content:encoded><![CDATA[<p>My journey to becoming a full stack engineer has been a long and interesting one. Along my way, I have taken many Computer Science classes, where I have learned a number of different languages. <a href="http://codecademy.com/">Codecademy</a>, and Introductory CS course at <a href="http://blue1647.com/">Blue1647</a> are among a few. More recently I enrolled at <a href="http://holbertonschool.com/about">Holberton School</a>. A part of the 2 year curriculum at Holberton is learning one of the object oriented languages I’ve been interested in for some time, Python. To further my understanding on objects and how they are used in Python, I bring you this blog post!</p><h3><strong>ID and Type</strong></h3><p>When we want to visualize how memory works in the computer, built-in functions <strong>id()</strong> and<strong> type()</strong> come in handy. When objects are created they are automatically allocated space in memory at a specific address. We can find out the objects address or <em>identity</em> using <strong>id()</strong>.</p><pre>&gt;&gt;&gt; a = 628<br>&gt;&gt;&gt; id(a)<br>140200623226768<br>&gt;&gt;&gt; type(a)<br>&lt;class ‘int’&gt;</pre><p>The type of object that was created is also important, it determines what built-in functions the object can actually utilize, as well as if it can be altered. Objects that can be altered are commonly labeled mutable in Python, and ones that cannot be altered are referred to as immutable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/406/1*kj69LLEb9XKo6rI7JPscdg.png" /><figcaption>Some but not all Data Types in Python and their mutability</figcaption></figure><h3>Mutable Objects</h3><p>When an object can be changed it is considered mutable, but what happens to its identity? Well the identity is unchanged meaning it doesn&#39;t take up additional space in memory, the value at the ID is the only part changed.</p><h3>Immutable Objects</h3><p>An immutable object on the other hand is a bit more tricky when getting its identity. The identity of an immutable object never changes however changes to an immutable object can still happen. Python utilizes the value of the data at the ID and whatever changes to create an entirely new object, while keeping the original in tact. <strong>So ultimately, although you can not modify immutable objects, but you are allowed to create a new object based off of an existing objects.</strong></p><h3><strong>Why Does This Matter?</strong></h3><p>For any optimal program we want low memory usage and faster running time. When you need to ensure the object you made will stay the same you should use one of the immutable types. But when you want to freely change something mutable objects like lists or dicts are better.</p><p>Remember when I mentioned changes to an immutable object can still happen. A perfect example of this is in the usage of tuples.</p><pre>tup = (1, [1, 2, 3])<br>139714376848200<br>&gt;&gt;&gt; tup[1].append(4)<br>&gt;&gt;&gt; print(tup)<br>(1, [1, 2, 3, 4])<br>&gt;&gt;&gt; id(tup)<br>139714376848200</pre><p>The ID of the tuple(tup) did not change, which is expected from an immutable, but its value still changed. When the list changed, the tuple didn’t get notified of the change, the list doesn’t know whether it is referred to by a variable, a tuple, or another list. The tuple is only responsible of keeping reference to the ID of its content. The mutability of any object doesn&#39;t change just because it is nested. This is why knowing if an object is mutable or immutable is important.</p><h3>How Arguments are Passed to Functions</h3><p>Variables being passed to functions, still go full circle back to determining if its an immutable or mutable object. An assignment of a variable to a mutable object then passing it into a function behaves the same way as changing the object directly.</p><pre>&gt;&gt;&gt; a = [6, 2, 8, 0]<br>&gt;&gt;&gt; a.append(9)<br>&gt;&gt;&gt; print(a)<br>[6, 2, 8, 0, 9]<br>def append_func(list)<br>    list.append(1)<br>return(list)<br>&gt;&gt;&gt; append_func(a)<br>[6, 2, 8, 0, 9, 1]</pre><p>But keep in mind that if a mutable object is changed it is changed <strong>EVERYWHERE. </strong>So when using mutable objects with functions it is best to make a copy before changing it.</p><h3>Advanced Learning</h3><p>Let’s start this one off with an example that I attribute to my higher learning:</p><pre>&gt;&gt;&gt; a = 1<br>&gt;&gt;&gt; b = 1<br>&gt;&gt;&gt; id(a)<br>10055552<br>&gt;&gt;&gt; id(b)<br>10055552<br>&gt;&gt;&gt; a = 1024<br>&gt;&gt;&gt; b = 1024<br>&gt;&gt;&gt; id(a)<br>139714384435376<br>&gt;&gt;&gt; id(b)<br>139714385031056</pre><p>Two variables a and b are assigned and reassigned to the same integers, but we only see different ID’s when its assigned to the integer 1024. By this point we know how good Python is with saving space but when it comes to integers between -5 and 256, there is already a special ID built into memory, so it can save even <strong>more space! </strong>These are actually the effects of CPython optimization we are observing here. CPython implementation keeps an array of integer objects for all integers between -5 and 256. So when we create an integer in that range, they simply refer back to the existing object.</p><p>Thats all on this trek of the programming languages. Hopefully my explanation of objects in Python helped someone. Happy Coding!</p><blockquote>Based on knowledge of Python version 3.4.3</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=18bf5f9e604f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[C Dynamic Libraries]]></title>
            <link>https://medium.com/@topeagboola/c-dynamic-libraries-37c4cd5d595f?source=rss-f22fc5cc4ac0------2</link>
            <guid isPermaLink="false">https://medium.com/p/37c4cd5d595f</guid>
            <dc:creator><![CDATA[Tope Agboola]]></dc:creator>
            <pubDate>Thu, 10 Aug 2017 05:18:31 GMT</pubDate>
            <atom:updated>2017-08-15T05:25:39.599Z</atom:updated>
            <content:encoded><![CDATA[<p>Timing is everything and thats mainly the difference between dynamic libraries and static libraries. Static libraries link functions at compile time, whereas dynamic libraries link at run time. Although dynamic libraries are much smaller, when packaging code using either of these types of libraries is very useful to reduce size.</p><p>For more in depth reading about static libraries enjoy previous blog post:</p><p><a href="https://medium.com/@topeagboola/c-static-libraries-c7eef3e019e9">C Static Libraries</a></p><p>But this one here is all about dynamic libraries.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KSWgej26p-d8ju94RyoJqw.png" /></figure><p>To begin building a library archive you have to first have some function(s) you want to repeatedly use in an executable <strong>.c</strong> file as object code. You would then compile them the following way:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a59f09cfa07a3300c832995b6290e171/href">https://medium.com/media/a59f09cfa07a3300c832995b6290e171/href</a></iframe><p>At the time you load your dynamic library, if you have made changes to any function included in your dynamic library it will take into account those changes. Here our library is named libdynamic.so</p><p>Usage of our library begins with it being called at compilation by attaching the -L flag to make sure we search in the current directory for the library.</p><pre>gcc -L. main.c -ldynamic -o test</pre><p>If our library is not where we need it to be our entire program will crash. To prevent this we can <strong>ldconfig </strong>to<strong> </strong>maintain our shared libraries.<strong> </strong>We use this<strong> </strong>when a program is executed to find locations of shared libraries that need to be dynamically loaded and linked to the program.</p><p>You can also type:</p><blockquote><em>ldd /path/to/program</em></blockquote><p>to find out the shared libraries that a program uses.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=37c4cd5d595f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Shell Implementation: In A Nutshell]]></title>
            <link>https://medium.com/@topeagboola/shell-implementation-in-a-nutshell-5f581250ac1a?source=rss-f22fc5cc4ac0------2</link>
            <guid isPermaLink="false">https://medium.com/p/5f581250ac1a</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[terminal]]></category>
            <dc:creator><![CDATA[Tope Agboola]]></dc:creator>
            <pubDate>Thu, 20 Jul 2017 05:13:43 GMT</pubDate>
            <atom:updated>2017-07-20T06:29:40.999Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mr2Klr_pv8BYXhx_2_vqow.jpeg" /></figure><p>So lets begin, <em>shell</em> we? Shell is a command line interface like Bash which stands for Bourne Again Shell. The first shell, Unix shell, was written by Ken Thompson at Bell Laboratories and published in 1971. However there are other widely used shells for example CSH (C Shell) and SH (Bourne Shell). If you’ve stumbled upon this page I will assume that you know what a terminal is and how to access the shell through it. Whenever you open a terminal emulator a new process begins prompting you with a<strong> $</strong> to enter in commands. Shell takes input from the terminal so when you type ls -l and press enter shell is to process the command through several steps in milliseconds.</p><p>The shell first stores the input from the user into a buffer and then splits the command ls -l into tokens separated by spaces. It then takes the first token and evaluates if the user input an absolute <strong>PATH </strong>to where the command is located or just its shortcut name.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CztAKayhiyjb04chY8-YTg.png" /></figure><p><strong>PATH</strong> is a list of directories that comes along in the environment that the shell searches through. The <strong>/bin</strong> directory contains the executable program for the commands that aren’t built-ins to operate.</p><p>If the command is a built-in a.k.a. built into the shell it is executed immediately. Or if its an alias the user of the computer has set up it gets the command the alias stands for.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J5intRrxxDpEaDwkZfryeA.png" /></figure><p>If the search through <strong>/bin</strong> for the appropriate <strong>PATH</strong> is unsuccessful and it is not a built-in the process is stopped with an error that the command does not exist.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bMocYgqZ1iJ3tv7-pJ963w.png" /></figure><p>Going forward an existing command will then be executed in a copy of the exact same process. As a defense mechanism shell creates another (<em>child</em>) process in order to run a different program from what is running in the original (<em>parent</em>) process. About now is a good time to talk about system calls. The operating system is responsible for all types of things, file management, starting/stopping processes, memory management, etc. System calls are how a program enters the operating system to perform a task. When we want to create a new process shell uses the <strong>fork()</strong> system call.</p><p>At this point we still need to execute the program now that we have a new process to execute it in. Another system call will be used <strong>exec()</strong> which comes in many forms all which will run the ls executable found earlier in the <strong>/bin</strong> folder. Remember those tokens we split ls -l into earlier well now <strong>exec()</strong> also takes the -l in account as an argument for ls. It is now appended to <strong>/bin</strong> and <strong>exec() </strong>now sees it as <strong>/bin/ls -l</strong>, then <strong>exec()</strong> will replace the child process with its own then terminate on completion. There is also another system call <strong>wait() </strong>in place in the background that is waiting for the child process to be done executing so the child process can be closed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5_WtvdauAk_1HyGGkbrVGQ.png" /></figure><p>The results are then displayed in long format and all used memory is free’d. The shell is now prompting you for the next command to be taken through the same steps. <em>Nut</em>hing to it!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5f581250ac1a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[C Static Libraries]]></title>
            <link>https://medium.com/@topeagboola/c-static-libraries-c7eef3e019e9?source=rss-f22fc5cc4ac0------2</link>
            <guid isPermaLink="false">https://medium.com/p/c7eef3e019e9</guid>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Tope Agboola]]></dc:creator>
            <pubDate>Thu, 08 Jun 2017 02:34:33 GMT</pubDate>
            <atom:updated>2017-06-08T02:35:55.732Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-V7-7l9bNo-PCnzgBFiM1Q.jpeg" /></figure><p>Imagine walking into a library and getting to pick from your favorite books. You’ve read them all already but if you ever wanted to read them again you’re in the right place. Sort of like static libraries in C, its an easier way to get to the actual code for your favorite functions and attach them to any program you compile them with.</p><p>To begin building a static library archive you have to first have the function(s) you want to repeatedly use in an executable .c file as object code. To do this we compile with <strong>-c</strong> to stop compilation process right after the object code is made.</p><blockquote>gcc -c function1.c function2.c</blockquote><blockquote>Produces function1.o function2.o</blockquote><p>We need a lib&lt;library_name&gt;.a file to hold object code made from the executable. Lib in front of what we choose as the library_name will make it easier for the compiler to track the archive down. The last step to bundle all the object files is done by ar, and several options. Option <strong>r </strong>to keep the object code updated and replace older versions. Also option<strong> c </strong>so it can use the specific lib&lt;&gt;.a name we created.</p><blockquote>ar -rc libtest.a function1.o function2.o</blockquote><p>We can now compile other .c files with -l option to specify we want to use the library we created.</p><blockquote>gcc some_other_function.c -ltest</blockquote><p>Now go grab your favorite functions and become a C librarian overnight.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c7eef3e019e9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GCC (GNU Compiler Collection)]]></title>
            <link>https://medium.com/@topeagboola/gcc-gnu-compiler-collection-ddaee3a3d04c?source=rss-f22fc5cc4ac0------2</link>
            <guid isPermaLink="false">https://medium.com/p/ddaee3a3d04c</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[ios]]></category>
            <dc:creator><![CDATA[Tope Agboola]]></dc:creator>
            <pubDate>Thu, 11 May 2017 06:59:14 GMT</pubDate>
            <atom:updated>2017-05-11T06:59:14.459Z</atom:updated>
            <content:encoded><![CDATA[<p>GCC is a compiler system by the GNU Project supporting various different programming languages. A compiler is what converts the programming language that you are using, in this example C, to machine code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/802/1*TEXqylmQEO-vPjP_NS-EMw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6pjxwKOC-4q-GPv6HD4smQ.png" /><figcaption>Converts text from C(left) to Machine Code(right)</figcaption></figure><p>The GCC goes through 4 different stages before it outputs an executable file containing the machine code. Those stages are preprocessing(cpp), compilation(cc), assembly(as), and linking(ld).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/615/1*J5fqmdDTjrmZaZO7Ctd6sg.png" /></figure><p><strong>Step 1 : Preprocessing</strong></p><ol><li>Creates temporary file with an extension .i (main.c -&gt; main.i)</li><li>Removes comments</li><li>Expands on header files (stdio.h, stdlib.h)</li><li>Replaces macro name defining it within the code.</li></ol><p><strong>Step 2 : Compiling</strong></p><ol><li>Creates temporary file with an extension .s (main.i -&gt; main.s)</li><li>Translates code into assembly code.</li></ol><p><strong>Step 3 : Assembling</strong></p><ol><li>Creates temporary file with an extension .o (main.s -&gt; main.o)</li><li>Converts assembly code into object code. Object code is very closely related to machine code.</li></ol><p><strong>Step 4 : Linking</strong></p><ol><li>Creates our final executable file (main.o -&gt; a.out). By default our executable file is named a.out but with gcc option -o it can be renamed. Ex. gcc main.c -o hello &gt; Name of executable file is hello.</li><li>Process function calls like printf in this final stage to machine code.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ddaee3a3d04c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>