<?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"><channel><title><![CDATA[Leki's blog]]></title><description><![CDATA[Leki's blog]]></description><link>https://leki-hub.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Sun, 30 Aug 2026 16:55:12 GMT</lastBuildDate><atom:link href="https://leki-hub.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[HTTP Redirects]]></title><description><![CDATA[URL redirection also known as URL forwarding
is a technique to give more than one URL address to a page, a form, a whole website, or a web application. HTTP has a special kind of response, called a HTTP redirect, for this operation.
eg; What you see ...]]></description><link>https://leki-hub.hashnode.dev/http-redirects</link><guid isPermaLink="true">https://leki-hub.hashnode.dev/http-redirects</guid><category><![CDATA[http]]></category><dc:creator><![CDATA[**** Emmanuel]]></dc:creator><pubDate>Tue, 29 Apr 2025 21:13:25 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1745961139784/80b5f3b2-fb02-465f-ade8-83f9c64070ce.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><strong>URL redirection</strong> also known as <strong><em>URL forwarding</em></strong></p>
<p>is a technique to give more than one URL address to a page, a form, a whole website, or a web application. HTTP has a special kind of response, called a <strong><em>HTTP redirect</em></strong>, for this operation.</p>
<p>eg; What you see when <a target="_blank" href="http://twitter.com"><code>twitter.com</code></a> redirects to <a target="_blank" href="http://x.com"><code>x.com</code></a> is referred to in backend/software engineering as a <strong>URL redirection.</strong></p>
<p><strong>Redirects accomplish numerous goals:</strong></p>
<ul>
<li><p>Temporary redirects during site maintenance or downtime</p>
</li>
<li><p>Permanent redirects to preserve existing links/bookmarks after changing the site's URLs, progress pages when uploading a file, etc.</p>
<p>  In HTTP, redirection is triggered by a server sending a special redirect response to a request. Redirect responses have <a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status">status codes</a> <a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status">that start w</a>ith 3, and a <a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Location">Location</a> <a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Location">header h</a>olding the URL to redirect to.</p>
</li>
</ul>
<h2 id="heading-alternative-way-of-specifying-redirections"><strong>Alternative way of specifying redirections</strong></h2>
<p>HTTP redirects aren't the only way to define redirections. There are two others:</p>
<ol>
<li><p>HTML redirections with the <a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/meta"><code>&lt;meta&gt;</code></a> element</p>
</li>
<li><p>JavaScript redirections via the <a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model">DOM</a></p>
</li>
</ol>
<h3 id="heading-why-it-matters"><strong>Why It Matters;</strong></h3>
<ul>
<li><p>For <strong>SEO</strong>: A 301 tells search engines to transfer SEO rankings, eg from <a target="_blank" href="http://twitter.com"><code>twitter.com</code></a> to <a target="_blank" href="http://x.com"><code>x.com</code></a>.</p>
</li>
<li><p>For <strong>User Experience</strong>: Ensures users who type the old domain still reach the new site.</p>
</li>
<li><p>For <strong>Brand Migration</strong>: Reflects Twitter's rebranding to "X".</p>
</li>
</ul>
<p>Also check;<a target="_blank" href="https://www.clickssl.net/blog/redirect-http-to-https">https://www.clickssl.net/blog/redirect-http-to-https</a></p>
]]></content:encoded></item><item><title><![CDATA[LAN-Local Area Network]]></title><description><![CDATA[localhost does not always have to be 127.0.0.1. While 127.0.0.1 is the most commonly used IP address to refer to localhost, it is not the only one. Here are some additional details:

IPv4 Addresses: The entire 127.0.0.0/8 network range is reserved fo...]]></description><link>https://leki-hub.hashnode.dev/lan-local-area-network</link><guid isPermaLink="true">https://leki-hub.hashnode.dev/lan-local-area-network</guid><category><![CDATA[networking]]></category><category><![CDATA[General Programming]]></category><dc:creator><![CDATA[**** Emmanuel]]></dc:creator><pubDate>Sat, 06 Jul 2024 14:50:09 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1720277254675/4e33346b-8f72-4fe7-80cb-7004a0d78269.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><a target="_blank" href="http://localhost">localhost</a> does not always have to be 127.0.0.1. While 127.0.0.1 is the most commonly used IP address to refer to <a target="_blank" href="http://localhost">localhost</a>, it is not the only one. Here are some additional details:</p>
<ul>
<li><p><strong>IPv4 Addresses</strong>: The entire 127.0.0.0/8 network range is reserved for loopback purposes, so any address within this range (e.g., 127.0.0.2, 127.0.0.3, etc.) can also be used to refer to the local machine.</p>
</li>
<li><p><strong>IPv6 Address</strong>: The IPv6 address for <a target="_blank" href="http://localhost">localhost</a> is <code>::1</code>. This serves the same purpose as 127.0.0.1 in IPv4.</p>
</li>
<li><p><strong>Hostnames</strong>: The term "<a target="_blank" href="http://localhost">localhost</a>" itself is a hostname that typically resolves to 127.0.0.1 in IPv4 or ::1 in IPv6. However, this resolution is dependent on the entries in the system's hosts file (usually located at <code>/etc/hosts</code> on Unix-like systems and at <code>C:\Windows\System32\drivers\etc\hosts</code> on Windows).</p>
</li>
<li><p>The IP address <code>192.168.88.240</code> is not a <a target="_blank" href="http://localhost">localhost</a> address; instead, it belongs to a private IP address range typically used in local area networks (LANs). <a target="_blank" href="http://Localhost">Localhost</a> addresses are limited to the 127.0.0.0/8 range for IPv4 and ::1 for IPv6.</p>
<p>  Here's a breakdown of the different types of addresses:</p>
<h3 id="heading-localhosthttplocalhost-addresses"><a target="_blank" href="http://Localhost">Localhost</a> Addresses</h3>
<ul>
<li><p><strong>IPv4</strong>: 127.0.0.1 to 127.255.255.255</p>
</li>
<li><p><strong>IPv6</strong>: ::1</p>
</li>
</ul>
</li>
</ul>
<h3 id="heading-private-ip-addresses-used-in-local-networks">Private IP Addresses (Used in Local Networks)</h3>
<ul>
<li><p><strong>192.168.0.0 to 192.168.255.255</strong>: Commonly used in home and office networks.</p>
</li>
<li><p><strong>10.0.0.0 to 10.255.255.255</strong>: Often used in larger networks.</p>
</li>
<li><p><strong>172.16.0.0 to 172.31.255.255</strong>: Used in both small and large networks.</p>
</li>
</ul>
<h3 id="heading-explanation-of-the-given-address">Explanation of the Given Address</h3>
<ul>
<li><p><code>192.168.88.240</code>: This is a private IP address.</p>
</li>
<li><p><code>:8082</code>: This specifies the port number on which a service is running. In this case, port 8082 is commonly used for web servers, applications, and other services.</p>
<p>  The IP address <code>192.168.88.240</code> falls within the range of IP addresses reserved for private networks. These private IP ranges are defined by the Internet Assigned Numbers Authority (IANA) for use within private networks and are not routable on the public internet.</p>
</li>
</ul>
<p>    In contrast, public IP addresses are those that are routable on the internet and are assigned by internet service providers (ISPs). They do not fall within the private IP ranges and are unique across the global internet.</p>
<h3 id="heading-example-of-public-vs-private-ip-address">Example of Public vs. Private IP Address</h3>
<ul>
<li><p><strong>Private IP</strong>: <code>192.168.88.240</code></p>
</li>
<li><p><strong>Public IP</strong>: An example might be <code>203.0.113.1</code>, which is outside the private IP ranges and is routable on the public internet.</p>
</li>
</ul>
<h3 id="heading-use-cases-for-private-ip-addresses">Use Cases for Private IP Addresses</h3>
<ul>
<li><p><strong>Home Networks</strong>: Devices like computers, smartphones, and printers in a home network often use private IP addresses such as those in the <code>192.168.x.x</code> range.</p>
</li>
<li><p><strong>Office Networks</strong>: Companies use private IP addresses to create internal networks for employees and internal services.</p>
</li>
<li><p><strong>Development and Testing</strong>: Developers often use private IP addresses to run and test applications on local networks.</p>
<h3 id="heading-summary">Summary</h3>
<ul>
<li><p><a target="_blank" href="http://Localhost"><strong>Localhost</strong></a> <strong>(127.0.0.1 or ::1)</strong>: Refers to the local machine itself.</p>
</li>
<li><p><strong>Private IP Address (192.168.88.240)</strong>: Refers to a device on the local network.</p>
</li>
</ul>
</li>
</ul>
<p>        The address <a target="_blank" href="http://192.168.88.240:8082/"><code>http://192.168.88.240:8082/</code></a> indicates that a web service is running on port 8082 on the device with the IP address <code>192.168.88.240</code> within your local network. This is not the same as <a target="_blank" href="http://localhost">localhost</a>, but it is accessible within the same local network.</p>
]]></content:encoded></item><item><title><![CDATA[Port Vs Remote Port]]></title><description><![CDATA[What is PORT and REMOTE PORT, example in :'''''''''''''''''⚙'''''''''''''''''''''REMOTE_ADDR : ::1 .REMOTE_PORT : 64451 .SERVER_SOFTWARE : PHP/8.3.6 (Development Server) .---------- ⚙....................  
The terms "port" and "remote port" both refe...]]></description><link>https://leki-hub.hashnode.dev/port-vs-remote-port</link><guid isPermaLink="true">https://leki-hub.hashnode.dev/port-vs-remote-port</guid><category><![CDATA[General Programming]]></category><dc:creator><![CDATA[**** Emmanuel]]></dc:creator><pubDate>Fri, 26 Apr 2024 07:23:36 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1714116134512/02dc6268-1bec-494e-8a41-09bfb7522c63.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>What is PORT and REMOTE PORT, example in :<br />'''''''''''''''''⚙'''''''''''''''''''''<br />REMOTE_ADDR : ::1 .<br />REMOTE_PORT : 64451 .<br />SERVER_SOFTWARE : PHP/8.3.6 (Development Server) .<br />---------- ⚙....................  </p>
<p>The terms "port" and "remote port" both refer to communication endpoints in the context of network connections, but they are used in slightly different contexts:<br />1️⃣ PORT<br />〽 A port is a logical construct that identifies a specific process or service on a networked device (such as a computer or server).  </p>
<p>Ports are used to facilitate communication between different processes or services over a network. Each port is associated with a unique number, called the port number.  </p>
<p>Example: Commonly used ports include port 80 for HTTP (web) traffic, port 443 for HTTPS (secure web) traffic, port 22 for SSH (secure shell) connections, etc.<br />2️⃣ REMOTE PORT:<br />〽 The remote port specifically refers to the port number used by the client machine (the remote device) when establishing a connection with a server.  </p>
<p>〽 The remote port number is randomly assigned by the client's operating system when initiating a connection to a server. It helps to identify the specific connection between the client and the server.<br />〽 In a web server environment, when a user's browser connects to a web server, the remote port is the port number used by the browser to establish the connection with the server.</p>
]]></content:encoded></item><item><title><![CDATA[Nginx, Apache.]]></title><description><![CDATA[Nginx (pronounced "engine-x") ->- Web Server- Reverse Proxy- Load Balancer  
It is free & open-source.  
It's renowned for its efficiency, stability and ability to handle massive loads concurrently.  
𝐔𝐧𝐝𝐞𝐫 𝐭𝐡𝐞 𝐡𝐨𝐨𝐝  -Nginx utilizes a non...]]></description><link>https://leki-hub.hashnode.dev/nginx-apache</link><guid isPermaLink="true">https://leki-hub.hashnode.dev/nginx-apache</guid><category><![CDATA[General Programming]]></category><dc:creator><![CDATA[**** Emmanuel]]></dc:creator><pubDate>Mon, 22 Apr 2024 16:16:11 GMT</pubDate><content:encoded><![CDATA[<p>Nginx (pronounced "engine-x") -&gt;<br />- Web Server<br />- Reverse Proxy<br />- Load Balancer  </p>
<p>It is free &amp; open-source.  </p>
<p>It's renowned for its efficiency, stability and ability to handle massive loads concurrently.  </p>
<p>𝐔𝐧𝐝𝐞𝐫 𝐭𝐡𝐞 𝐡𝐨𝐨𝐝  -<br />Nginx utilizes a non-blocking I/O model, handling multiple client connections simultaneously without creating separate threads for each.  </p>
<p>This eliminates the overhead of thread creation and context switching, maximizing resource utilization.  </p>
<p>Nginx uses an event-driven approach.  </p>
<p>It efficiently waits for events (like incoming connections or data arrival) to occur and triggers specific handler functions to process them.  </p>
<p>This avoids wasting CPU cycles on waiting for I/O operations to complete.  </p>
<p>Where possible, Nginx uses non-blocking I/O.  </p>
<p>So, if it needs to fetch something from disk or a backend server, it initiates the request and then the thread can service other things while that slow operation is pending.  </p>
<p>𝐌𝐚𝐬𝐭𝐞𝐫 &amp; 𝐖𝐨𝐫𝐤𝐞𝐫 𝐏𝐫𝐨𝐜𝐞𝐬𝐬𝐞𝐬 -<br />The master process oversees the overall health of Nginx.  </p>
<p>It manages worker processes, gracefully restarts them when needed and handles configuration changes.  </p>
<p>On the other hand,  </p>
<p>Multiple worker processes handle actual client requests and interact with backend servers.  </p>
<p>This separation allows Nginx to handle numerous concurrent connections efficiently.  </p>
<p>Remember,  </p>
<p>Nginx strikes a balance between both approaches -  </p>
<p># Worker Processes (Multi-Process)  </p>
<p># Event-Driven Within Each Process (Not Multi-Threaded)<br />(Inside each worker process, the event-driven, non-blocking model comes into play.)  </p>
<p>𝐊𝐞𝐲 𝐅𝐮𝐧𝐜𝐭𝐢𝐨𝐧𝐚𝐥𝐢𝐭𝐢𝐞𝐬 -  </p>
<p># Web Serving<br />Nginx serves static content (HTML, CSS, images) efficiently.  </p>
<p># Reverse Proxy<br />Nginx forwards requests to backend servers while potentially adding security or caching functionalities.  </p>
<p>Can handle SSL/TLS termination (encryption/decryption).  </p>
<p># Load Balancer (Layer 4 &amp; 7)<br />Nginx can distribute traffic across multiple backend servers using various algorithms (round-robin, least connections, etc.)  </p>
<p>Improves scalability and high availability.</p>
]]></content:encoded></item><item><title><![CDATA[REPL  in nodejs]]></title><description><![CDATA[The Node.js REPL (Read-Eval-Print Loop) stands as a fundamental element for developers engaging with JavaScript. It serves as an interactive shell, facilitating the immediate execution and evaluation of JavaScript code:  
- Interactive JavaScript Env...]]></description><link>https://leki-hub.hashnode.dev/repl-in-nodejs</link><guid isPermaLink="true">https://leki-hub.hashnode.dev/repl-in-nodejs</guid><category><![CDATA[Node.js]]></category><dc:creator><![CDATA[**** Emmanuel]]></dc:creator><pubDate>Wed, 28 Feb 2024 19:22:36 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1709147914831/3bf889af-dbdb-487a-bae2-d1b8fbd87c02.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>The Node.js REPL (Read-Eval-Print Loop) stands as a fundamental element for developers engaging with JavaScript. It serves as an interactive shell, facilitating the immediate execution and evaluation of JavaScript code:  </p>
<p>- Interactive JavaScript Environment:<br />Node.js REPL allows developers to input JavaScript code, which is then processed in real-time. The system reads the code, evaluates its functionality, and prints the result, fostering an interactive environment for on-the-fly code experimentation.  </p>
<p>- Debugging and Prototyping Hub:<br />Beyond its interactive nature, the REPL proves invaluable for debugging and rapid prototyping. Developers can efficiently test functions, inspect object properties, and iterate on code snippets, enhancing the overall development and troubleshooting process.  </p>
<p>Understanding the complexity of the Node.js REPL empowers developers with a dynamic and efficient space for code exploration, debugging, and swift prototyping.</p>
]]></content:encoded></item><item><title><![CDATA[The OSI  model :]]></title><description><![CDATA[The OSI (Open Systems Interconnection) model is a conceptual framework that standardizes the functions of a telecommunication or computing system into seven abstraction layers. These layers serve to organize and define the tasks required for network ...]]></description><link>https://leki-hub.hashnode.dev/the-osi-model</link><guid isPermaLink="true">https://leki-hub.hashnode.dev/the-osi-model</guid><category><![CDATA[General Programming]]></category><category><![CDATA[GitHub]]></category><dc:creator><![CDATA[**** Emmanuel]]></dc:creator><pubDate>Sat, 20 Jan 2024 21:03:10 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1705784527705/10401336-904a-4fc5-8bf5-0c2e81aabafa.gif" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>The OSI (<strong>Open Systems Interconnection</strong>) model is a conceptual framework that standardizes the functions of a telecommunication or computing system into seven abstraction layers. These layers serve to organize and define the tasks required for network communication, making it easier to understand, design, and troubleshoot complex networking systems. Here are brief notes about each layer of the OSI model:</p>
<p>What are the 7 steps of the OSI model?</p>
<p><strong>From lowest-level to highest-level they are:</strong></p>
<p>What are the 7 steps of the OSI model?</p>
<p><strong>From lowest-level to highest-level they are:</strong></p>
<ol>
<li><p>#1. The Physical Layer.</p>
</li>
<li><p>#2. The Data Link Layer.</p>
</li>
<li><p>#3. The Network Layer.</p>
</li>
<li><p>#4. The Transport Layer.</p>
</li>
<li><p>#5. The Session Layer.</p>
</li>
<li><p>#6. The Presentation Layer.</p>
</li>
<li><p>#7. The Application Layer.</p>
</li>
</ol>
<ol>
<li><p><strong>Physical Layer (Layer 1):</strong></p>
<ul>
<li><p>Concerned with the physical connection between devices.</p>
</li>
<li><p>Deals with transmission and reception of raw binary data over a physical medium (e.g., cables, fiber optics).</p>
</li>
<li><p>Specifies characteristics such as voltage levels, cable types, and data rates.</p>
</li>
</ul>
</li>
<li><p><strong>Data Link Layer (Layer 2):</strong></p>
<ul>
<li><p>Responsible for creating a reliable link between two directly connected nodes.</p>
</li>
<li><p>Divided into two sub-layers: Logical Link Control (LLC) and Media Access Control (MAC).</p>
</li>
<li><p>Handles framing, addressing, and error detection.</p>
</li>
</ul>
</li>
<li><p><strong>Network Layer (Layer 3):</strong></p>
<ul>
<li><p>Manages the routing of data packets between devices on different networks.</p>
</li>
<li><p>Addresses and forwards packets based on logical addressing (IP addresses).</p>
</li>
<li><p>Key protocols include IP (Internet Protocol) and ICMP (Internet Control Message Protocol).</p>
</li>
</ul>
</li>
<li><p><strong>Transport Layer (Layer 4):</strong></p>
<ul>
<li><p>Ensures end-to-end communication, reliability, and error recovery.</p>
</li>
<li><p>Segments and reassembles data into manageable chunks.</p>
</li>
<li><p>Key protocols include TCP (Transmission Control Protocol) and UDP (User Datagram Protocol).</p>
</li>
</ul>
</li>
<li><p><strong>Session Layer (Layer 5):</strong></p>
<ul>
<li><p>Establishes, maintains, and terminates communication sessions between applications.</p>
</li>
<li><p>Manages dialog control and synchronization between devices.</p>
</li>
</ul>
</li>
<li><p><strong>Presentation Layer (Layer 6):</strong></p>
<ul>
<li><p>Translates data between the application layer and the lower layers.</p>
</li>
<li><p>Deals with data format translation, encryption, and compression.</p>
</li>
<li><p>Ensures that data is presented in a readable format for the application layer.</p>
</li>
</ul>
</li>
<li><p><strong>Application Layer (Layer 7):</strong></p>
<ul>
<li><p>Provides network services directly to end-users and applications.</p>
</li>
<li><p>Supports communication services for various applications.</p>
</li>
<li><p>Examples of protocols at this layer include HTTP (Hypertext Transfer Protocol) and SMTP (Simple Mail Transfer Protocol).</p>
</li>
</ul>
</li>
</ol>
<p>Remember the acronym <strong>"All People Seem To Need Data Processing"</strong> to recall the seven layers in order. The OSI model is a reference model, and actual network protocols may not perfectly align with its layers, but it serves as a useful framework for understanding network communication.</p>
]]></content:encoded></item><item><title><![CDATA[Lazy Loading]]></title><description><![CDATA[Definition 1: Lazy loading means waiting to render content on a webpage until the user or the browser needs it. Lazy loading can help speed up webpage load times. Performance for Developers.
Resources above the fold will show because they're supposed...]]></description><link>https://leki-hub.hashnode.dev/lazy-loading</link><guid isPermaLink="true">https://leki-hub.hashnode.dev/lazy-loading</guid><category><![CDATA[General Programming]]></category><category><![CDATA[React]]></category><dc:creator><![CDATA[**** Emmanuel]]></dc:creator><pubDate>Thu, 18 Jan 2024 22:09:41 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1705615594048/16316822-9355-4e31-b018-2b2d70695b31.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Definition 1: Lazy loading means <strong>waiting to render content on a webpage until the user or the browser needs it</strong>. Lazy loading can help speed up webpage load times. Performance for Developers.</p>
<p>Resources above the fold will show because they're supposed to, but images further down won't load until the user scrolls down to where they're located on the page.</p>
<p>Definition 2: {According to mdn} <strong>Lazy loading</strong> is a strategy to identify resources as non-blocking (non-critical) and load these only when needed. It's a way to shorten the length of the <strong>critical</strong> rendering path , which translates into reduced page load times.</p>
<p>Lazy loading can occur on different moments in the application, but it typically happens on some user interactions such as scrolling and navigation. The <em>loading</em> attribute on an &lt;<em>img</em>\&gt; element, or the <em>loading</em> attribute on an &lt;i<em>frame</em>\&gt; can be used to instruct the browser to defer loading of images/iframes that are off-screen until the user scrolls near them.</p>
<p>You can determine if a given image has finished loading by examining the value of its Boolean <em>complete</em> property.</p>
<h3 id="heading-testing-application-performance-with-network-browser-api"><strong>Testing application Performance with Network Browser API:</strong></h3>
<ol>
<li><p><strong>Use the DevTools Network Tab:</strong></p>
<ul>
<li><p>Open your browser's developer tools and navigate to the "Network" tab.</p>
</li>
<li><p>Perform typical user interactions in your application while monitoring the network requests.</p>
</li>
</ul>
</li>
<li><p><strong>Analyze Network Requests:</strong></p>
<ul>
<li><p>Examine the list of network requests to identify unnecessary or slow-loading resources.</p>
</li>
<li><p>Look for large images, unnecessary scripts, or external dependencies causing delays.</p>
</li>
</ul>
</li>
<li><p><strong>Check Load Times:</strong></p>
<ul>
<li><p>Observe the load times for each resource. Pay attention to the "Waterfall" chart, which visualizes the timing of each request.</p>
</li>
<li><p>Identify long-running tasks and delays between resource loading.</p>
</li>
</ul>
</li>
<li><p><strong>Inspect Size and Compression:</strong></p>
<ul>
<li><p>Check the size of resources, especially images, scripts, and stylesheets. Use compression techniques (e.g., gzip) to reduce file sizes.</p>
</li>
<li><p>Optimize images by compressing them and using modern image formats like WebP.</p>
</li>
</ul>
</li>
<li><p><strong>Minimize HTTP Requests:</strong></p>
<ul>
<li><p>Reduce the number of HTTP requests by combining CSS and JavaScript files.</p>
</li>
<li><p>Use CSS sprites for small images or consider using inline data URIs for small images.</p>
</li>
</ul>
</li>
<li><p><strong>Leverage Browser Caching:</strong></p>
<ul>
<li><p>Set appropriate cache headers to enable browser caching for static resources.</p>
</li>
<li><p>Ensure that resources are cached and served from the cache when appropriate.</p>
</li>
</ul>
</li>
<li><p><strong>Asynchronous Loading:</strong></p>
<ul>
<li><p>Load non-essential scripts asynchronously to prevent blocking the rendering of the page.</p>
</li>
<li><p>Use the <code>async</code> or <code>defer</code> attribute for script tags when possible.</p>
</li>
</ul>
</li>
</ol>
<p>Depending on programming language being used, several libraries in package managers support/are build for lazy loading.</p>
<p>Benefits of lazy loading:</p>
<ul>
<li><p>Faster website load times</p>
</li>
<li><p>Reduced bandwidth usage</p>
</li>
<li><p>Improved user experience</p>
</li>
<li><p>Better SEO performance</p>
</li>
</ul>
<aside id="5AgOJSegav2CkH9jmCVE31"><div class="layout"><div class="content content--8of16-large"><div class="inline_article_cta__internal flex backgroundBrandYellow"><div class="inline_article_cta__internal-main flex flex--middle align--center" data-context-text="Benefits of lazy loading:"><div><br />

</div></div></div></div></div></aside>]]></content:encoded></item><item><title><![CDATA[JWT . JavaScript Web Token.]]></title><description><![CDATA[🚀 Navigating the intricate landscape of Node.js authentication? It's vital to grasp the nuances between JWTs 🌐 and Sessions 🔄 for decisions that align seamlessly with your application's requirements. Let's dive into the details:  
**JWTs (JSON Web...]]></description><link>https://leki-hub.hashnode.dev/jwt-javascript-web-token</link><guid isPermaLink="true">https://leki-hub.hashnode.dev/jwt-javascript-web-token</guid><category><![CDATA[General Programming]]></category><category><![CDATA[authentication]]></category><category><![CDATA[authorization]]></category><dc:creator><![CDATA[**** Emmanuel]]></dc:creator><pubDate>Wed, 17 Jan 2024 12:12:32 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1705493452848/9a235ec3-b83d-45cb-84d2-494a67e96c90.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>🚀 Navigating the intricate landscape of Node.js authentication? It's vital to grasp the nuances between JWTs 🌐 and Sessions 🔄 for decisions that align seamlessly with your application's requirements. Let's dive into the details:  </p>
<p>**JWTs (JSON Web Tokens):**  </p>
<p>🔐 Stateless: All data is encapsulated within the token, eliminating the need for server-side session management.<br />🌐 Scalability: Perfect for highly distributed systems and load balancing, ensuring optimal performance.<br />🤝 Single Sign-On: Enables effortless integration across various services, providing a unified user experience.<br />💻 Client-side storage: Flexibility to store tokens in local storage or cookies, enhancing accessibility.<br />🛡️ Security considerations: Caution is needed in token handling and storage to mitigate potential risks.  </p>
<p>**Sessions:**  </p>
<p>📂 Server-side storage: Session data is securely managed on the server, offering control and centralization.<br />🎛️ Granular control: Fine-tune the session's lifecycle and data, tailoring it to specific application needs.<br />🔐 Revocation: Easily invalidate sessions when required, enhancing security measures.<br />🚨 Potential performance overhead: Keep in mind the impact on performance under heavy loads due to server-side session management.<br />🌐 Scalability considerations: In distributed environments, session replication or sticky sessions may be necessary.  </p>
<p>**Key factors to consider:**  </p>
<p>🚀 Scalability &amp; performance requirements: Tailor your choice based on the scalability needs of your application.<br />🛡️ Security concerns &amp; revocation needs: Evaluate the level of security required and the frequency of session revocation.<br />🤝 Single Sign-On integration: If seamless integration across multiple services is crucial, JWTs might be the go-to choice.<br />🌐 Stateless vs. stateful architecture preferences: Depending on your architectural preferences, choose between a stateless or stateful approach.  </p>
<p>**Recommendations for Node.js developers:**  </p>
<p>🔝 Prioritize JWTs for:<br />- Highly scalable applications demanding optimal performance.<br />- Single Sign-On scenarios requiring a unified user experience.<br />- Stateless architectures where server-side session management is minimal.  </p>
<p>💡 Opt for sessions when:<br />- Granular control over session data is paramount for your application.<br />- Frequent revocation of sessions is a necessity for enhanced security.<br />- Server-side session management aligns with your preferred security measures.  </p>
<p>Share your thoughts and experiences! Which approach best suits your unique development needs?</p>
]]></content:encoded></item><item><title><![CDATA[PORT number]]></title><description><![CDATA[What is a port number?
A port number is a way to identify a specific process to which an internet or other network message is to be forwarded when it arrives at a server. All network-connected devices come equipped with standardized ports that have a...]]></description><link>https://leki-hub.hashnode.dev/port-number</link><guid isPermaLink="true">https://leki-hub.hashnode.dev/port-number</guid><category><![CDATA[General Programming]]></category><dc:creator><![CDATA[**** Emmanuel]]></dc:creator><pubDate>Tue, 16 Jan 2024 16:40:43 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1705423148398/3bd48c2a-9b54-405e-8bce-ed0e006319cf.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-what-is-a-port-number"><strong>What is a port number?</strong></h2>
<p>A port number is a way to identify a specific process to which an internet or other network message is to be forwarded when it arrives at a server. All network-connected devices come equipped with standardized ports that have an assigned number. These numbers are reserved for certain protocols and their associated function. Hypertext Transfer Protocol HTTP messages, for example, always go to port 80-- one of the most commonly used ports.</p>
<p>Once known as <em>socket numbers,</em> the early incarnation of port numbers is similar to the Internet Protocol IP address class used today.</p>
<h2 id="heading-what-is-the-difference-between-an-ip-address-and-a-port-number"><strong>What is the difference between an IP address and a port number?</strong></h2>
<p>An IP address identifies a machine in an IP network and is used to determine the destination of a data packet. Port numbers identify a particular application or service on a system.</p>
<p>An IP address is a logical address used to identify a device on the network. Any device connected to the internet is assigned a unique IP address for identification. This identifying information enables devices to communicate over the internet. Port numbers are part of the addressing information that helps identify senders and receivers of information and a particular application on the devices. Port numbers consist of 16-bit numbers.</p>
<p>For example, a user request for a file transfer from a client , or local host, to a remote server on the internet uses File Transfer Protocol (FTP) for the transaction. Both devices must be configured to transfer files via FTP. To transfer the file, the Transmission Control Protocol TCP software layer in local host identifies the port number of 21, which, by convention, associates with an FTP request -- in the 16-bit port number integer that is appended to the request.</p>
<p>At the server, the TCP layer will read port number 21 and forward the request to the FTP program at the server.</p>
<p>Here are some commonly used ports and their associated networking protocols:</p>
<ul>
<li><p><strong>Ports 20 and 21.</strong> FTP is used to transfer files between a client and a server.</p>
</li>
<li><p><strong>Port 22.</strong> Secure Shell is one of several tunneling protocols used to build secure network connections.</p>
</li>
<li><p><strong>Port 25.</strong> Simple Mail Transfer Protocol (SMTP) is commonly used for email.</p>
</li>
<li><p><strong>Port 53.</strong> Domain name system (DNS) is a critical process that matches human-readable domain names to machine-readable IP addresses on the modern internet. It helps users load websites and applications without typing in a long list of IP addresses.</p>
</li>
<li><p><strong>Port 80.</strong> HTTP is the protocol that enables the World Wide Web.</p>
</li>
<li><p><strong>Port 123.</strong> Network Time Protocol helps computer clocks sync with each other. It's a vital process in encryption</p>
</li>
<li><p><strong>Port 179.</strong> Border Gateway Protocol (BGP) helps establish efficient routes between the large networks or autonomous systems that make up the internet. These large networks use BGP to broadcast which IP addresses they control.</p>
</li>
<li><p><strong>Port 443.</strong> HTTP Secure (HTTPS) is like HTTP but more secure. All HTTPS web traffic goes straight to port 443. Any network service that uses HTTPS for encryption, such as DNS over HTTPS, also connects directly to this port.</p>
</li>
<li><p><strong>Port 500.</strong> Internet Security Association and Key Management Protocol helps set up secure IP security.</p>
</li>
<li><p><strong>Port 3389.</strong> (RDP) Remote Desktop Protocol enables users to connect to their desktop computers from another device remotely.</p>
</li>
</ul>
<p>The Internet Assigned Numbers Authority allocates and maintains all the port numbers listed above.</p>
<h2 id="heading-what-are-common-questions-raised-about-port-numbers"><strong>What are common questions raised about port numbers?</strong></h2>
<h3 id="heading-what-is-the-port-number-for-localhost">What is the port number for Localhost?</h3>
<p>Localhost is the default name used to establish a connection with a computer. The IP address is usually 127.0.0.1. This is done by using a loopback address network. Port 80 is the common standard port for HTTP.</p>
<h3 id="heading-what-is-port-number-8080-used-for">What is port number 8080 used for?</h3>
<p>Port number 8080 is usually used for web servers. When a port number is added to the end of the domain name, it drives traffic to the web server. However, users can not reserve port 8080 for secondary web servers.</p>
<h3 id="heading-what-is-port-number-3360-used-for">What is port number 3360 used for?</h3>
<p>TCP/IP networks use port 3360. The connection-oriented protocol TCP demands handshaking to set up end-to-end communications. Upon establishing the connection, user data is transferred bidirectionally over the connection.</p>
<h3 id="heading-what-is-a-proxy-server-address-and-port-number">What is a proxy server address and port number?</h3>
<p>A proxy server is, essentially, a computer on the internet with its own IP address. It sits between the client device and the remote server and acts as an intermediary to handle communication requests over the internet.</p>
<p>When a local computer sends a web request, it automatically goes through the proxy server. The proxy server uses its own IP address for the web request and not the user's. Proxy servers offer privacy benefits -- for example, the ability to change the client IP address, masking the user's location.</p>
<p>The proxy server address includes an IP address with the port number attached to the end of the address. The port number 8080 is usually used for web servers, proxy and caching.</p>
]]></content:encoded></item><item><title><![CDATA[CPU vs GPU]]></title><description><![CDATA[To learn Software engineering, I found it important to first have great knowledge about the hardware architecture.  
I realized about that some years a go while I made a decision to a lifelong learning on SWE.  
Two important elements in hardware arc...]]></description><link>https://leki-hub.hashnode.dev/cpu-vs-gpu</link><guid isPermaLink="true">https://leki-hub.hashnode.dev/cpu-vs-gpu</guid><category><![CDATA[General Programming]]></category><dc:creator><![CDATA[**** Emmanuel]]></dc:creator><pubDate>Sun, 14 Jan 2024 13:32:01 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1705239016640/66aba9b8-333d-4422-b708-64a28388f321.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>To learn Software engineering, I found it important to first have great knowledge about the hardware architecture.  </p>
<p>I realized about that some years a go while I made a decision to a lifelong learning on SWE.  </p>
<p>Two important elements in hardware architecture are CPU and GPU.  </p>
<p>✅ CPU vs GPU usage in Computer Software. 🆙  </p>
<p>❇ Central Processing Units (CPUs) and Graphics Processing Units (GPUs) are both essential components in computing systems, but they serve distinct purposes and are optimized for different types of tasks.  </p>
<p>Understanding the differences between GPUs and CPUs is crucial in selecting the right hardware for specific applications.  </p>
<p>The CPU is the "brain" of a computer, responsible for executing general-purpose tasks and managing system resources.<br />CPUs architecture typically have a few powerful cores optimized for sequential processing and complex calculations. They excel at tasks that require high single-threaded performance.  </p>
<p>CPUs are suitable for tasks that involve decision-making, control flow, and sequential processing. Examples include running operating systems, office applications, web browsers, and other general-purpose software.  </p>
<p>✴ GPU (Graphics Processing Unit)<br />GPUs are designed for parallel processing and are primarily focused on rendering graphics and performing highly parallelizable tasks. Originally developed for graphics rendering, modern GPUs are now widely used for general-purpose parallel computing.  </p>
<p>GPUs architecture consist of numerous smaller cores optimized for parallelism. They can handle multiple tasks simultaneously, making them well-suited for data-parallel and computationally intensive workloads.  </p>
<p>GPUs shine in scenarios that involve parallel processing, such as rendering graphics, video editing, scientific simulations, machine learning, and other tasks that can be parallelized.  </p>
<p>Graphics cards- also known as GPU have dedicated video memory (VRAM) that stores textures, frame buffers, and other graphical data. This specialized memory is optimized for high-speed access, crucial for graphics rendering performance.  </p>
<p>✅ Understanding how to leverage the strengths of both CPU and GPU ✴ architectures becomes increasingly important for optimizing performance and efficiency in various applications.</p>
]]></content:encoded></item><item><title><![CDATA[Time and Space Complexity]]></title><description><![CDATA[How to Use Big O to Ace Your Technical Interviews:
Firstly, what is Big O Notation?
Big O describes an algorithm's runtime or memory consumption without the interference of contextual variables like RAM and CPU. It gives programmers a way to compare ...]]></description><link>https://leki-hub.hashnode.dev/time-and-space-complexity</link><guid isPermaLink="true">https://leki-hub.hashnode.dev/time-and-space-complexity</guid><category><![CDATA[General Programming]]></category><category><![CDATA[#big o notation]]></category><dc:creator><![CDATA[**** Emmanuel]]></dc:creator><pubDate>Sun, 14 Jan 2024 12:01:13 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1705233962754/b28132ec-31ce-4b14-a378-3e1075f3c73d.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>How to Use Big O to Ace Your Technical Interviews:</p>
<p>Firstly, what is Big O Notation?</p>
<p>Big O describes an algorithm's runtime or memory consumption without the interference of contextual variables like RAM and CPU. It gives programmers a way to compare algorithms and identify the most efficient solution.</p>
<p>𝗕𝗶𝗴 𝗢 𝗮𝗻𝘀𝘄𝗲𝗿𝘀 𝗼𝗻𝗲 𝘀𝘁𝗿𝗮𝗶𝗴𝗵𝘁𝗳𝗼𝗿𝘄𝗮𝗿𝗱 𝗾𝘂𝗲𝘀𝘁𝗶𝗼𝗻:</p>
<p>"How much does runtime or memory consumption grow as the size of the input increases, in the worst-case scenario?".</p>
<p>𝗧𝗼 𝘂𝘁𝗶𝗹𝗶𝘇𝗲 𝗕𝗶𝗴 𝗢, you'll need to know the possible values and how they compare with each other. Use the attached photo for a quick reference.</p>
<p>𝗦𝗼, 𝗵𝗼𝘄 𝗱𝗼 𝘆𝗼𝘂 𝗮𝗽𝗽𝗹𝘆 𝗕𝗶𝗴 𝗢 𝗶𝗻 𝘆𝗼𝘂𝗿 𝘁𝗲𝗰𝗵𝗻𝗶𝗰𝗮𝗹 𝗶𝗻𝘁𝗲𝗿𝘃𝗶𝗲𝘄𝘀?</p>
<p>Here are a few scenarios where Big O can be used:</p>
<p>🔸 Live coding challenges</p>
<p>🔸 Code walk-throughs</p>
<p>🔸 Discussions about projects/solutions you've built</p>
<p>🔸 Discussions about your approach to programming &amp; problem-solving</p>
<p>When any of these scenarios come up, be sure to mention the Big O of your solution and how it compares to alternative approaches. This is especially useful in live coding challenges where you have to compare solutions on the spot — remember to think out loud!</p>
<p>𝗧𝗶𝗽: 𝗪𝗵𝗲𝗻 𝗰𝗼𝗺𝗽𝗮𝗿𝗶𝗻𝗴 𝘀𝗼𝗹𝘂𝘁𝗶𝗼𝗻𝘀, 𝗽𝗮𝘆 𝗮𝘁𝘁𝗲𝗻𝘁𝗶𝗼𝗻 𝘁𝗼 𝘁𝗵𝗲 𝗽𝗿𝗼𝗯𝗹𝗲𝗺'𝘀 𝗿𝗲𝗾𝘂𝗶𝗿𝗲𝗺𝗲𝗻𝘁𝘀.</p>
<p>For example, linear time complexity may be completely fine when the input can never be too large. But if you’re dealing with big data, you’ll want to opt for something more efficient.</p>
<p>Of course, the goal is to get the correct Big O notation that applies to your solution. But don't worry about getting it wrong! Your interviewer will probably correct you when you do. The point is to show that you are thinking about the efficiency and performance of your solution.</p>
<p>𝗗𝗼 𝘁𝗵𝗶𝘀 𝗮𝗻𝗱 𝘆𝗼𝘂'𝗹𝗹 𝗯𝗲 𝗮𝗯𝗹𝗲 𝘁𝗼 𝘀𝗵𝗼𝘄𝗰𝗮𝘀𝗲 𝗮𝗻 𝗶𝗺𝗽𝗼𝗿𝘁𝗮𝗻𝘁 𝘁𝗿𝗮𝗶𝘁 𝘁𝗵𝗮𝘁 𝘁𝗲𝗰𝗵𝗻𝗶𝗰𝗮𝗹 𝗵𝗶𝗿𝗶𝗻𝗴 𝗺𝗮𝗻𝗮𝗴𝗲𝗿𝘀 𝗹𝗼𝗼𝗸 𝗳𝗼𝗿:</p>
<p>The ability to consider a solution's viability beyond whether it works or not. This shows maturity in your decision-making and approach to programming.</p>
]]></content:encoded></item><item><title><![CDATA[HTTP protocol]]></title><description><![CDATA[As a software developer, there is a 99% chance you will use the HTTP protocol.  
Here are 8 things you need to know about it: ↓  
1. What is HTTP  
HTTP is an application-level protocol based on a request-response paradigm.  
Its primary use is encod...]]></description><link>https://leki-hub.hashnode.dev/http-protocol</link><guid isPermaLink="true">https://leki-hub.hashnode.dev/http-protocol</guid><dc:creator><![CDATA[**** Emmanuel]]></dc:creator><pubDate>Sat, 13 Jan 2024 14:24:43 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1705155704709/4f6fe774-eeb3-4829-a20d-badef7fcadb2.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>As a software developer, there is a 99% chance you will use the HTTP protocol.  </p>
<p>Here are 8 things you need to know about it: ↓  </p>
<p>1. What is HTTP  </p>
<p>HTTP is an application-level protocol based on a request-response paradigm.  </p>
<p>Its primary use is encoding and transporting information between a client and a server.  </p>
<p>A typical HTTP transaction is made of 2 steps:  </p>
<p>• a client sends a request message to a server  </p>
<p>• the server replies with a response message  </p>
<p>2. HTTP messages  </p>
<p>A message is a block of text composed of multiple fields.  </p>
<p>The main fields of an HTTP message are:  </p>
<p>• the start line, indicating what a request is for or if the request was successful  </p>
<p>• the headers, composed of key-value pairs metadata describing the message  </p>
<p>• the (optional) body containing the data  </p>
<p>3. Requests  </p>
<p>An HTTP server hosts resources like documents, images, or collections of other resources.  </p>
<p>HTTP requests allow you to Create, Read, Update, or Delete these resources.  </p>
<p>Each request is stateless and contains all the necessary information to process it.  </p>
<p>4. Request methods  </p>
<p>The requested CRUD operation is specified in the start line of the message by a request method.  </p>
<p>The most commonly used methods are:  </p>
<p>• GET: retrieve a resource  </p>
<p>• PUT: update a resource  </p>
<p>•POST: create a resource returning its URL  </p>
<p>• DELETE: remove a resource  </p>
<p>5. Properties  </p>
<p>A request method can have 2 important properties:  </p>
<p>• Safety: the method has no side effects and can be cached. GET is safe, PUT, POST, DELETE, no  </p>
<p>• Idempotency: the method can execute multiple times with the same result. GET, PUT, DELETE are idempotent, POST no  </p>
<p>6.Responses  </p>
<p>HTTP responses contain a status code informing the clients if their requests succeed.  </p>
<p>There are different code ranges:  </p>
<p>• 200-299 indicate success  </p>
<p>• 300-399 communicate a redirection  </p>
<p>• 400-499 communicate client errors  </p>
<p>• 500-599 indicate server errors  </p>
<p>7. Transport layer  </p>
<p>HTTP needs a transport layer protocol to ensure a reliable and secure communication channel.  </p>
<p>Usually, this protocol was TCP, but the latest HTTP version uses its UDP-based transport protocol.  </p>
<p>When HTTP runs on top of TLS, it's referred to as HTTPS.  </p>
<p>8. Versions  </p>
<p>HTTP has multiple versions:  </p>
<p>• 1.1 a TCP connection can be used for multiple transactions, but those need to be serialized  </p>
<p>• 2.0 multiple transactions can be multiplexed on a TCP connection  </p>
<p>• 3.0 an UDP transport protocol further optimizes the communication</p>
]]></content:encoded></item></channel></rss>