<?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 Wilfred Obruche on Medium]]></title>
        <description><![CDATA[Stories by Wilfred Obruche on Medium]]></description>
        <link>https://medium.com/@wilfredcloudspace?source=rss-aaf564465d57------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*OelNqYXIXJXHdpKD</url>
            <title>Stories by Wilfred Obruche on Medium</title>
            <link>https://medium.com/@wilfredcloudspace?source=rss-aaf564465d57------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 22:40:05 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@wilfredcloudspace/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[ALX — 0x15. API — Learning Points]]></title>
            <link>https://medium.com/@wilfredcloudspace/alx-0x15-api-learning-points-68350ffc5834?source=rss-aaf564465d57------2</link>
            <guid isPermaLink="false">https://medium.com/p/68350ffc5834</guid>
            <dc:creator><![CDATA[Wilfred Obruche]]></dc:creator>
            <pubDate>Wed, 26 Jul 2023 20:34:03 GMT</pubDate>
            <atom:updated>2023-07-27T13:52:55.043Z</atom:updated>
            <content:encoded><![CDATA[<h3>ALX — 0x15. API — Learning Points</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6Z5OPRaoflXDX1GZaLbStA.png" /></figure><h3>Introduction</h3><p>In this blog post, I am excited to share my learning points derived from ALX’s resources and my dedicated personal research while preparing for <strong>0x15. API</strong> projects. I addressed all the questions stated in the learning objectives of the projects. Lets delve into it.</p><h3>What Bash scripting should not be used for</h3><pre>#!/bin/bash</pre><pre>echo &quot;Printing even numbers from 1 to 10:&quot;<br>echo &quot;----------------------------------&quot;</pre><pre>for (( num=1; num&lt;=10; num++ ))<br>do<br>    if (( num % 2 == 0 ))<br>    then<br>        echo &quot;$num&quot;<br>    fi<br>done</pre><p>Bash scripting is a powerful tool for writing simple scripts and automating tasks in Unix-like operating systems. However, there are certain scenarios where using Bash scripting is not the most appropriate choice:</p><ul><li><strong>Performance-critical applications:</strong> For performance-critical applications, it’s better to use a more efficient language. Bash scripting is interpreted, which can make it slower compared to compiled languages like C/C++ or even other scripting languages like Python.</li><li><strong>Complex applications:</strong> Which Bash is great for simple and straightforward tasks, it becomes hard to maintain for large and more complex projects.</li><li><strong>GUI applications:</strong> Bash is primary a command line scripting language and doesn’t provide native support for graphic user interfaces (GUI).</li><li><strong>Platform-independent applications:</strong> Bash is not available on all platforms (e.g Windows). If you need your script to be cross-platform, then consider using a language that is supported on multiple operating system.</li><li>Resource-intensive tasks: If your scripts need to handle large amounts of data or require significant computational resources, using a language with better memory management and performance optimizations might be a better choice.</li></ul><h3>What is an API</h3><p>API is an acronym for <strong>Application Programming Interface</strong>. It defines a set of rules and methods with which different software applications will use to communicate with each other. It is a bridge between systems enabling them to work together and share resources without needing to understand each other’s internal workings.</p><p>The most common types of APIs include:</p><ul><li><strong>Web APIs</strong>: These APIs allow interactions with web-based services and applications.</li><li><strong>Operating System APIs</strong>: They allow applications to interact with hardware, files, processes, and other system resources.</li><li><strong>Library APIs</strong>: They define the functions and methods available for developers to use.</li><li><strong>Database APIs</strong>: They enable applications to read, write, and manage data stored in a database system.</li></ul><h3>What is a REST API</h3><p>A REST API <strong>(Representational State Transfer Application Programming Interface)</strong> is a type of web API that follows the principles and constraints of the REST architectural style. REST is an architectural style used for designing networked applications, particularly web services.</p><p>Key principles and characteristics of REST APIs:</p><ul><li><strong>Statelessness:</strong> The server does not store any information about the client state. Therefore each request from the client must contain all the information needed to understand and process it.</li><li><strong>Resource-Based:</strong> REST APIs views the system as a collection of resources, each identified by a unique URL.</li><li><strong>Representation:</strong> Resources in a REST API can have multiple representations, such as JSON, XML, HTML, or others. The client can specify the desired representation through the use of HTTP headers.</li><li><strong>Client-Server Architecture</strong>: REST separates the client and server components of a system, allowing them to evolve independently.</li></ul><h3>What are microservices</h3><p>Microservices are an architectural style and approach to designing and building software applications as a collection of small, independent and loosely coupled services. Each services in a microservice architecture represents a specific business functionality and operates as a separate process, communicating with other services are over well-defined APIs.</p><p>Key characteristics of microservices:</p><ul><li><strong>Modularity</strong>: Microservices break down a large monolithic application into smaller, manageable services, each responsible for a specific task or feature.</li><li><strong>Independent Deployment</strong>: Each microservice can be deployed independently of other services.</li><li><strong>Loose Coupling</strong>: Changes in one service do not necessarily impact other services, making it easier to evolve and scale individual components.</li><li><strong>Scalability</strong>: Services can be scaled independently based on their individual demands, allowing better resource utilization and performance optimization.</li><li><strong>Resilience</strong>: The failure of one service does not necessarily lead to the failure of the entire application</li></ul><h3>What is the CSV format</h3><p>CSV stands for <strong>Comma-Separated Values</strong>. It is a plain text file format commonly used for storing tabular data. In CSV format, each line represents a single row of the table, and the values in each row are separated by commas (or other specified delimiters).</p><p>For example, consider a simple CSV file representing information about employees:</p><pre>Name, Age, Department, Salary<br>John, 30, Engineering, 60000<br>Jane, 28, Marketing, 55000<br>Michael, 35, Sales, 62000</pre><h3>What is the JSON format</h3><p>JSON (<strong>JavaScript Object Notation</strong>) is a lightweight data interchange format that is easy for humans to read and write and easy for machines to parse and generate. It is widely used for transmitting data between a server and a web application, as well as for configuration files and data storage. JSON is language-independent and is supported by most programming languages.</p><p>JSON is based on two primary data structures:</p><ol><li><strong>Objects</strong>: An object is an unordered collection of key-value pairs. It is enclosed in curly braces {}. Each key is a string, followed by a colon :, and then the value associated with that key. The key-value pairs are separated by commas.</li><li><strong>Arrays</strong>: An array is an ordered collection of values. It is enclosed in square brackets []. The values in an array can be of different data types and are separated by commas.</li></ol><p>JSON supports the following data types:</p><ul><li><strong>Strings</strong>: A sequence of characters surrounded by double quotes (&quot;).</li><li><strong>Numbers</strong>: An integer or a floating-point number.</li><li><strong>Boolean</strong>: Represents true or false.</li><li><strong>Null</strong>: Represents an empty value.</li></ul><p>Here’s an example of a simple JSON object representing information about a person:</p><pre>{<br>  &quot;name&quot;: &quot;John Doe&quot;,<br>  &quot;age&quot;: 30,<br>  &quot;email&quot;: &quot;john@example.com&quot;,<br>  &quot;isEmployed&quot;: true,<br>  &quot;hobbies&quot;: [&quot;reading&quot;, &quot;traveling&quot;, &quot;cooking&quot;],<br>  &quot;address&quot;: {<br>    &quot;city&quot;: &quot;New York&quot;,<br>    &quot;zipcode&quot;: &quot;10001&quot;<br>  }<br>}</pre><h3>Pythonic Package and module name style</h3><p>In Python, there are conventions and guidelines for naming packages, modules, and other identifiers to ensure code readability and consistency. These guidelines are described in PEP 8, the official style guide for Python code. Here are the key points related to package and module naming:</p><ol><li><strong>Packages</strong>: Packages are directories that contain a special file called __init__.py. The package name should be in all lowercase letters, and it should be a simple, short, and descriptive name. Avoid using special characters or spaces in package names. If the name consists of multiple words, use underscores to separate them. Example: my_package</li><li><strong>Modules</strong>: Modules are Python files that contain Python code. Module names should also be all lowercase and follow the same rules as package names. Avoid using special characters or spaces in module names. Use underscores to separate multiple words. Example: my_module.py</li><li><strong>Classes</strong>: Class names should follow the CamelCase convention, starting with an uppercase letter and using capital letters for each new word. Example: MyClass</li><li><strong>Functions and Variables</strong>: Function and variable names should be in all lowercase letters, and if they consist of multiple words, use underscores to separate them. This convention is known as snake_case. Example: my_function, my_variable</li><li><strong>Constants</strong>: Constants should be named using uppercase letters, with words separated by underscores. Although Python does not have true constants, this convention is used to indicate that the variable’s value should not be changed. Example: MY_CONSTANT</li><li><strong>Private Members</strong>: For variables and functions intended for internal use within a module or class, start the name with a single underscore. This is not enforced by the language itself but serves as a convention to indicate that these members are not part of the public API. Example: _private_variable, _private_function()</li></ol><p>Following these naming conventions will improve code readability and consistency, making it easier for developers to understand and collaborate on Python projects.</p><h3>Significance of CapWords or CamelCase in Python</h3><p>The significance of using CapWords or CamelCase in Python lies in its widespread adoption as the naming convention for class names in Python, as recommended by PEP 8, the official style guide for Python code.</p><h3>Conclusion:</h3><p>In conclusion, my journey through <strong>0x15. API</strong> projects was an enriching experience filled with growth and learning and I am glad to share them with you. I hope you were able to grab some value from it. Thanks for reading</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=68350ffc5834" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What Happens When You Type “https://www.google.com" in Your Browser]]></title>
            <link>https://medium.com/@wilfredcloudspace/what-happens-when-you-type-https-www-google-com-in-your-browser-cc218b1e3c20?source=rss-aaf564465d57------2</link>
            <guid isPermaLink="false">https://medium.com/p/cc218b1e3c20</guid>
            <dc:creator><![CDATA[Wilfred Obruche]]></dc:creator>
            <pubDate>Sun, 23 Jul 2023 20:23:13 GMT</pubDate>
            <atom:updated>2023-07-23T20:23:13.598Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>As an internet user, you’ve likely entered [&lt;https://www.google.com&gt;](&lt;https://www.google.com/&gt;) or other URLs in your browser. But have you ever wondered what happens behind the scenes before a web page appears? The journey involves a series of intricate processes and systems that ensure secure and efficient access to your desired website. In this blog post, we&#39;ll explore these behind-the-scenes workings that make the internet consistently deliver the right web pages. Let&#39;s demystify the magic!</p><h3>The Summary of what happens</h3><p>Before diving deep into details, here is a brief overview of the behind-the-scenes.</p><p>On entering a URL, https://www.google.com in this case on your browser, first the browsers sends a DNS request to find the IP address corresponding to www.google.com. On receiving the IP address, the browser initiates a TCP connection to Google&#39;s web server. And before the connection is established, The Google&#39;s firewalls inspect and allow or deny the connection based on its predefined rules. If the connection is allowed, It is then secured by HTTPS (Hypertext Transfer Protocol Secure) which will encrypt data exchange between the browser and google web server. Google.com has several web servers worldwide being a high-traffic website, it uses a load balancer to effectively distribute traffic across them. When a web server receives the encrypted request, decrypts it and process it. To process a dynamic content the the web server engages the application servers who interacts with the database to generates the content and sent it back to the web server. The web server generates the response - a webpage which is made up of HTML, CSS, JavaScript, and assets, and send to the browser. Upon receiving the response, the browser renders the webpage.</p><h3>1. DNS Request:</h3><p>Th journey begins with the The Domain Name System(DNS) which is responsible for translating human-readable domain names, like google.com, into machine-readable IP addresses, such as <strong>8.8.8.8</strong></p><p>When you enter a URL into your web browser, the browser initiates a DNS request to resolve the domain name to the corresponding IP address. Here are the steps involved in this process:</p><ol><li>The web browser checks its local DNS cache to see if it already has a recent copy of the DNS record for the requested domain.</li><li>If the domain name is not found in the browser cache, the operating system (OS) checks its own DNS cache to see if it has a valid DNS record.</li><li>If the domain name is not found in the browser or OS cache, the OS sends a recursive DNS query to the configured DNS resolver. This resolver is usually provided by the ISP or configured in the network settings.</li><li>The DNS resolver initiates the lookup process by querying one of the root DNS servers. These root servers maintain information about the top-level domain (TLD) servers responsible for specific TLDs, such as .com or .org</li><li>The root DNS server responds with the IP addresses of the TLD DNS servers that are responsible for the requested domain.</li><li>The DNS resolver then queries the TLD DNS server to obtain the IP addresses of the authoritative DNS servers responsible for the specific domain (e.g., google.com authoritative DNS server).</li><li>The authoritative DNS server for google.com responds with the corresponding DNS records, including the IP address associated with the requested domain name.</li><li>The IP address for the requested domain is returned to the OS, which, in turn, passes it to the web browser.</li></ol><h3>2. TCP/IP:</h3><p>Upon receiving receiving the IP address, the browser initiates a Transmission Control Protocol (TCP) connection with the Google web server. TCP is a reliable, connection-oriented protocol that ensures data packets are sent and received accurately and in order. Internet Protocol (IP) comes into play to route the data packets across the internet to reach the destination server.</p><h3>3. Firewall:</h3><p>Before the TCP connection is established, the request passes through the google’s firewalls. A firewall is a network security device or software that monitor and control incoming and outgoing network traffic based on predefined security rules. If the connections satisfy the rules, the firewall allows the connection to be established.</p><h3>3. HTTPS/SSL:</h3><p>The connection between your browser and the web server is then secured using Hypertext Transfer Protocol Secure (HTTPS). This is an extension of the standard HTTP protocol but adds an extra layer of security by encrypting the data exchanged between your browser and the server. The SSL/TLS (Secure Sockets Layer/Transport Layer Security) certificates are utilized to establish this secure connection. Your browser checks the server’s SSL certificate to ensure it’s valid and issued by a trusted Certificate Authority (CA). If the certificate is valid, a secure encrypted session is established.</p><h3>4. Load Balancer:</h3><p>A load balancer is a device or software that distributes incoming network traffic across multiple servers or resources. The primary purpose of a load balancer is to ensure that each server receives a balanced and manageable share of the incoming requests, avoiding overloading any single server and improving overall system performance.</p><p><a href="http://google.com/">Google.com</a> is a high-traffic website, with multiple web servers worldwide and it uses a load balancer to efficiently distribute incoming traffic across these servers. This decision is based on various factors, such as the current server’s load, response times, server health, or predefined routing rules.</p><h3>5. Web Server:</h3><p>After passing through the load balancer, the request reaches one of Google’s many web servers. The web server receives the encrypted request, decrypts it using its private key, and processes the request. After which it generates the response, that is the webpage and send back to the browser to display the result.</p><h3>6. Application Server:</h3><p>Some web pages are dynamic and require additional processing before being served. In such cases, the web server may pass the request to an application server. The application server processes the request, interacts with databases, generates the content and send back to web server.</p><h3>7. Database:</h3><p>The databases contain indexed and organized data that enable quick retrieval and delivery of search results. The application server engages with the database to generate dynamic content.</p><h3>8. Rendering the Page:</h3><p>Upon receiving the response, your browser starts rendering the webpage. It parses the HTML to understand the structure of the page, fetches external resources like images and style sheets, and renders the content accordingly. JavaScript code, if present, is executed to add interactivity to the page.</p><h3>Conclusion:</h3><p>As you have seen in this post, though it may take a split second for a web page to display on your browser, behind-the-scene it took a lot of processes and technologies working in harmony. DNS resolves the domain name, TCP/IP ensures reliable data transmission, firewalls provide security, HTTPS/SSL encrypts the data, load balancers distribute traffic, web servers process requests, application servers handle dynamic content, and databases store and retrieve vast amounts of information. The seamless orchestration of these components allows you to access websites like Google securely and quickly, making the internet a fascinating and interconnected realm.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cc218b1e3c20" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>