<?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 Nathan Chiche on Medium]]></title>
        <description><![CDATA[Stories by Nathan Chiche on Medium]]></description>
        <link>https://medium.com/@CHICHEEE?source=rss-8fdcb0bf4541------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*YKQgxa4BizrbaklLNT_zYg@2x.jpeg</url>
            <title>Stories by Nathan Chiche on Medium</title>
            <link>https://medium.com/@CHICHEEE?source=rss-8fdcb0bf4541------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 06:52:03 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@CHICHEEE/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[Top 5 Best Early Careers Sites in Tech (2025 Edition): Get Ahead Now!]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@CHICHEEE/top-5-best-websites-for-early-careers-in-tech-2025-edition-get-ahead-now-9aef9904ac40?source=rss-8fdcb0bf4541------2"><img src="https://cdn-images-1.medium.com/max/1456/1*9Q9pTVfXKZs44UYfaIBVcA.png" width="1456"></a></p><p class="medium-feed-snippet">Starting your career in tech can be daunting, but the right resources will make all the difference. Here&#x2019;s a roundup of the top platforms&#xA0;!</p><p class="medium-feed-link"><a href="https://medium.com/@CHICHEEE/top-5-best-websites-for-early-careers-in-tech-2025-edition-get-ahead-now-9aef9904ac40?source=rss-8fdcb0bf4541------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@CHICHEEE/top-5-best-websites-for-early-careers-in-tech-2025-edition-get-ahead-now-9aef9904ac40?source=rss-8fdcb0bf4541------2</link>
            <guid isPermaLink="false">https://medium.com/p/9aef9904ac40</guid>
            <category><![CDATA[students]]></category>
            <category><![CDATA[careers]]></category>
            <category><![CDATA[jobs]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[job-search]]></category>
            <dc:creator><![CDATA[Nathan Chiche]]></dc:creator>
            <pubDate>Sat, 16 Nov 2024 07:27:57 GMT</pubDate>
            <atom:updated>2024-11-16T07:44:34.728Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Data Visualization — The Ultimate Guide !]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@CHICHEEE/data-visualization-how-to-pick-the-right-chart-type-2025-b3cd522874ed?source=rss-8fdcb0bf4541------2"><img src="https://cdn-images-1.medium.com/max/2272/1*VSjp0Rq45IbRCKOyXz2mRg.png" width="2272"></a></p><p class="medium-feed-snippet">Data Visualization Best Practices and uncovering hidden magic&#x200A;&#x2014;&#x200A;Ultimate Data visualization Guide!</p><p class="medium-feed-link"><a href="https://medium.com/@CHICHEEE/data-visualization-how-to-pick-the-right-chart-type-2025-b3cd522874ed?source=rss-8fdcb0bf4541------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@CHICHEEE/data-visualization-how-to-pick-the-right-chart-type-2025-b3cd522874ed?source=rss-8fdcb0bf4541------2</link>
            <guid isPermaLink="false">https://medium.com/p/b3cd522874ed</guid>
            <category><![CDATA[analytics]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[big-data]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[data-visualization]]></category>
            <dc:creator><![CDATA[Nathan Chiche]]></dc:creator>
            <pubDate>Sat, 16 Nov 2024 00:47:17 GMT</pubDate>
            <atom:updated>2024-11-16T06:16:54.340Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Understanding Stacks and Queues in JAVA: A Guide for Coding Interviews (EASY)]]></title>
            <link>https://medium.com/@CHICHEEE/understanding-stacks-and-queues-in-java-a-guide-for-coding-interviews-easy-f5cfb5799e03?source=rss-8fdcb0bf4541------2</link>
            <guid isPermaLink="false">https://medium.com/p/f5cfb5799e03</guid>
            <category><![CDATA[data-structures]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[interview]]></category>
            <dc:creator><![CDATA[Nathan Chiche]]></dc:creator>
            <pubDate>Sat, 09 Nov 2024 09:49:10 GMT</pubDate>
            <atom:updated>2024-11-09T09:50:37.398Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*1CUNBDW9U8Njq3WE_SZsZw.png" /></figure><h3>Understanding Stacks and Queues in Java: A Guide for Coding Interviews</h3><p>Stacks and queues are foundational data structures that come up often in coding interviews. While they may seem simple, they’re key to solving many common interview problems, especially around efficient data organization and retrieval. In this guide, we’ll break down these data structures, cover Java implementations, and walk through some essential use cases and methods.</p><h3>Stacks: Last-In-First-Out (LIFO)</h3><p>A <strong>Stack</strong> follows the Last-In-First-Out (LIFO) principle, where the last element added is the first one removed. This behavior is especially useful in scenarios like tracking function calls, managing undo operations, and parsing expressions.</p><p><strong>Common Methods in Java’s Stack Class</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/854/1*DQOrPDViPzp2gUjRtWlZjw.png" /></figure><blockquote><em>Tip: The Java Stack class is synchronized, which makes it slower than other options if you’re only working in a single-threaded environment. For performance-focused applications, consider using ArrayDeque as a stack.</em></blockquote><h3>Solving the Valid Parentheses Problem with a Stack</h3><p>One common stack problem is validating if a string contains correctly matched parentheses. Here’s how to solve it using a stack:</p><pre>class Solution {<br>    public boolean isValid(String s) {<br>        Stack&lt;Character&gt; stack = new Stack&lt;&gt;();<br><br>        for (char c : s.toCharArray()) {<br>            if (c == &#39;(&#39;) {<br>                stack.push(&#39;)&#39;);<br>            } else if (c == &#39;[&#39;) {<br>                stack.push(&#39;]&#39;);<br>            } else if (c == &#39;{&#39;) {<br>                stack.push(&#39;}&#39;);<br>            } else if (stack.isEmpty() || stack.pop() != c) {<br>                return false; // Mismatch found or closing parenthesis without match<br>            }<br>        }<br>        return stack.isEmpty(); // True if all parentheses matched<br>    }<br>}</pre><p><strong>Explanation</strong>:</p><ul><li>Each opening parenthesis pushes its corresponding closing one onto the stack.</li><li>When encountering a closing parenthesis, it’s compared with the top of the stack.</li><li>If the stack is empty at the end, all parentheses were correctly matched.</li></ul><h3>Queues: First-In-First-Out (FIFO)</h3><p>A <strong>Queue</strong> follows the First-In-First-Out (FIFO) principle, where the first element added is the first one removed. Queues are useful in situations like task scheduling, handling requests in a server, and breadth-first search (BFS) algorithms.</p><p><strong>Common Methods in Java’s Queue Interface</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1010/1*noG51DI4SiIIRXylSuA7fg.png" /></figure><blockquote><em>Tip: Java’s Queue interface doesn’t directly support checking if a queue is full. Capacity constraints must be manually enforced if required.</em></blockquote><h3>Types of Queues in Java</h3><p><strong>1.Simple Queue</strong>: A straightforward FIFO structure where elements are added at the rear and removed from the front.</p><ul><li><strong>Usage</strong>: Basic scheduling and task processing.</li></ul><p><strong>2.Circular Queue</strong>: Enhances memory efficiency by wrapping around when reaching the end of the queue, reusing available space.</p><ul><li><strong>Usage</strong>: Memory-limited systems, such as buffer management in hardware or operating systems.</li></ul><p><strong>3.Priority Queue</strong>: Elements are ordered based on priority rather than arrival order, with the highest priority elements dequeued first.</p><ul><li><strong>Usage</strong>: Task scheduling systems, like CPU scheduling or handling urgent tasks in real-time applications.</li></ul><p><strong>4.Double-Ended Queue (Deque)</strong>: Supports adding and removing elements from both ends, providing flexibility for stack or queue operations.</p><ul><li><strong>Usage</strong>: Sliding window algorithms, job scheduling, and caching.</li></ul><h3>Why Use ArrayDeque Instead of Stack?</h3><p>Java’s ArrayDeque is a more efficient alternative to Stack and LinkedList for stack and queue operations. It’s a resizable array-based implementation of the Deque interface, allowing LIFO and FIFO operations.</p><p><strong>Common Methods in ArrayDeque</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_BxA3Wgq9SWMP0FO2MGQqA.png" /></figure><p><strong>Advantages of ArrayDeque</strong>:</p><ul><li><strong>Speed</strong>: Faster for LIFO/FIFO operations than Stack or LinkedList.</li><li><strong>Memory Efficient</strong>: No synchronization overhead, making it ideal for single-threaded applications.</li></ul><h3>Summary and Interview Tips</h3><p>Understanding when to use stacks and queues, and which implementation fits best, can make a significant difference in coding interviews. Here’s a quick recap:</p><ul><li><strong>Stack (LIFO)</strong>: Ideal for problems involving nested structures, like matching parentheses or tracking history.</li><li><strong>Queue (FIFO)</strong>: Perfect for sequential tasks, such as processing requests or BFS traversal.</li><li><strong>ArrayDeque</strong>: A versatile and efficient choice for both stack and queue operations, especially in single-threaded applications.</li></ul><p>In interviews, try to identify whether a problem requires sequential access (queue) or reverse processing (stack). Knowing these distinctions, along with how to implement them in Java, can give you an edge in solving common data structure problems efficiently.</p><p>As you dive into coding challenges, remember that practice is key. Keep experimenting with different data structures, and don’t hesitate to revisit these concepts as they pop up in real-world problems. Good luck, and happy coding on your Java journey!</p><p>I really recommend <a href="https://www.youtube.com/@nikoo28"><strong>Nikhil Lohia</strong></a><strong> </strong>on youtube when it comes to step by step and a visual explanation whenever you get stuck!</p><p>Also Check out my other story below:</p><p><a href="https://medium.com/@CHICHEEE/java-data-structures-algorithms-resources-and-quick-guide-for-interview-15897f12984a">Java : Data Structures &amp; Algorithms (Resources and Quick Guide for interview)</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f5cfb5799e03" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Is Computer Science Oversaturated? Employment as a New Graduate/Hire]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@CHICHEEE/is-computer-science-oversaturated-employment-as-a-new-graduate-hire-6540eebb0119?source=rss-8fdcb0bf4541------2"><img src="https://cdn-images-1.medium.com/max/698/1*2-dpKHHcXO5BHSAIuFx5mA.jpeg" width="698"></a></p><p class="medium-feed-snippet">So, you&#x2019;re a new computer science graduate staring at a job market that&#x2019;s supposedly booming&#x200A;&#x2014;&#x200A;682,800 new jobs projected in the next few&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@CHICHEEE/is-computer-science-oversaturated-employment-as-a-new-graduate-hire-6540eebb0119?source=rss-8fdcb0bf4541------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@CHICHEEE/is-computer-science-oversaturated-employment-as-a-new-graduate-hire-6540eebb0119?source=rss-8fdcb0bf4541------2</link>
            <guid isPermaLink="false">https://medium.com/p/6540eebb0119</guid>
            <category><![CDATA[trends]]></category>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[interview-preparation]]></category>
            <category><![CDATA[job-hunting]]></category>
            <category><![CDATA[tech]]></category>
            <dc:creator><![CDATA[Nathan Chiche]]></dc:creator>
            <pubDate>Tue, 22 Oct 2024 20:34:27 GMT</pubDate>
            <atom:updated>2024-10-22T20:34:27.528Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[THE JAVA DSA INTERVIEW PREP]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@CHICHEEE/the-java-dsa-interview-prep-cbe6ce1114b5?source=rss-8fdcb0bf4541------2"><img src="https://cdn-images-1.medium.com/max/2600/1*MqSy-e4Am9W18YbVqTlmbg.jpeg" width="5834"></a></p><p class="medium-feed-snippet">Resources to take or use for your own In-depth Preparations.</p><p class="medium-feed-link"><a href="https://medium.com/@CHICHEEE/the-java-dsa-interview-prep-cbe6ce1114b5?source=rss-8fdcb0bf4541------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@CHICHEEE/the-java-dsa-interview-prep-cbe6ce1114b5?source=rss-8fdcb0bf4541------2</link>
            <guid isPermaLink="false">https://medium.com/p/cbe6ce1114b5</guid>
            <category><![CDATA[java]]></category>
            <category><![CDATA[interview]]></category>
            <category><![CDATA[interview-preparation]]></category>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[data-structures]]></category>
            <dc:creator><![CDATA[Nathan Chiche]]></dc:creator>
            <pubDate>Tue, 15 Oct 2024 09:39:25 GMT</pubDate>
            <atom:updated>2024-10-22T18:02:34.873Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Java : Data Structures & Algorithms (Resources and Quick Guide for interview)]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@CHICHEEE/java-data-structures-algorithms-resources-and-quick-guide-for-interview-15897f12984a?source=rss-8fdcb0bf4541------2"><img src="https://cdn-images-1.medium.com/max/626/1*2zVfGj8kxlJW6nflVensPA.png" width="626"></a></p><p class="medium-feed-snippet">STUDY GUIDES AND RESOURCES</p><p class="medium-feed-link"><a href="https://medium.com/@CHICHEEE/java-data-structures-algorithms-resources-and-quick-guide-for-interview-15897f12984a?source=rss-8fdcb0bf4541------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@CHICHEEE/java-data-structures-algorithms-resources-and-quick-guide-for-interview-15897f12984a?source=rss-8fdcb0bf4541------2</link>
            <guid isPermaLink="false">https://medium.com/p/15897f12984a</guid>
            <category><![CDATA[roadmaps]]></category>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[data-structures]]></category>
            <category><![CDATA[resources]]></category>
            <dc:creator><![CDATA[Nathan Chiche]]></dc:creator>
            <pubDate>Tue, 15 Oct 2024 09:02:36 GMT</pubDate>
            <atom:updated>2024-11-16T00:53:17.536Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Build a Simple File Transfer System Using Python(Network Programming Project)]]></title>
            <link>https://medium.com/@CHICHEEE/build-a-simple-file-transfer-system-using-python-network-programming-project-c9962cf238c0?source=rss-8fdcb0bf4541------2</link>
            <guid isPermaLink="false">https://medium.com/p/c9962cf238c0</guid>
            <category><![CDATA[network-programming]]></category>
            <category><![CDATA[projects]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[modern-application]]></category>
            <category><![CDATA[beginners-guide]]></category>
            <dc:creator><![CDATA[Nathan Chiche]]></dc:creator>
            <pubDate>Thu, 10 Oct 2024 10:58:49 GMT</pubDate>
            <atom:updated>2024-10-10T20:33:52.780Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T5bPRtIGFog_MNgFy6erfg.png" /></figure><h3>Build a Simple File Transfer System Using Python (Network Programming Project)</h3><p>Network programming is at the core of many modern applications, from file-sharing services to real-time data streaming and communication tools. While low-level socket operations might seem intimidating at first, breaking the process into manageable steps makes it much easier to understand. This article will guide you through the basics of building a Python-based File Transfer System, providing you with the fundamentals of client-server architecture using TCP connections. By the end of this project, you’ll have a solid understanding of how to create reliable, efficient communication between systems, and you’ll be well-equipped to build your own file transfer solutions.</p><h3>Project Overview</h3><p>This project offers a step-by-step guide to creating a basic file transfer system using Python’s BSD sockets. Divided into three progressive parts, it aims to solidify your understanding of network communications and socket programming. Whether you’re a beginner or someone looking to brush up on your networking skills, this project provides a structured approach to mastering these essential concepts.</p><h3>What You’ll Be Building</h3><p>This project is divided into three parts:</p><ul><li><strong>Part 1</strong> focuses on building a client application that initiates communication with the server.</li><li><strong>Part 2</strong> involves developing a simplified server to handle client requests.</li><li><strong>Part 3</strong> enhances the server to handle multiple clients and improves its reliability and efficiency.</li><li>Explanation on how To Test Your File Transfer System</li></ul><p>Each part builds on the previous one, gradually increasing in complexity to provide a deeper understanding of socket programming and concurrency.”</p><p><strong>Part 1: Client Application</strong></p><p>Develop a Python client that can connect to a server and request a file.</p><ul><li><strong>Establish a Connection:</strong> Use Python’s socket library to create a TCP connection to the server.</li><li><strong>Request a File:</strong> Implement functionality for the client to specify and request a particular file.</li><li><strong>Receive Data:</strong> Handle incoming data from the server and save it locally.</li></ul><p><strong>Part 2: Simplified Server</strong></p><p>Create a basic server that listens for incoming client connections and sends requested files.</p><ul><li><strong>Set Up the Server:</strong> Initialize a server socket that listens on a specific port for incoming connections.</li><li><strong>Handle Requests:</strong> Accept client connections and process file requests.</li><li><strong>Send Files:</strong> Read the requested file in binary mode and transmit it to the client.</li></ul><p><strong>Part 3: Enhanced Server</strong></p><p>Enhance the server to handle multiple clients simultaneously and ensure reliable file transfers.</p><ul><li><strong>Concurrency:</strong> Implement multi-threading or multi-processing to allow the server to manage multiple client connections at once.</li><li><strong>Error Handling:</strong> Add robust error handling to manage issues like missing files or connection drops gracefully.</li><li><strong>Optimization:</strong> Ensure efficient data transfer without overloading the CPU, avoiding common pitfalls like infinite loops.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/769/1*_Oh7z7Ir165n02VKIkPUFg.png" /></figure><h3>Key Components and Technologies</h3><ul><li><strong>Python 3 :</strong> Python’s built-in socket library provides low-level access to networking interfaces, enabling you to create the TCP connection needed for file transfers.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/211/1*kW09SsLMnzsUc4rR2deoSg.png" /></figure><ul><li><strong>BSD Sockets:</strong> Use Python’s socket library to interact with low-level network interfaces, handling TCP connections manually without high-level abstractions.</li><li><strong>Multi-threading / Concurrency (for Enhanced Server):</strong> concurrency is essential to handle multiple client requests simultaneously without blocking other operations.</li><li><strong>Virtualization Tools (Optional):</strong> Tools such as ****VirtualBox and Vagrant an create a consistent development environment, ensuring that your code runs the same way on different machines and configurations.</li></ul><h3>Getting Started: Step-by-Step Guide</h3><p><strong>Develop the Client Application (Part 1)</strong></p><p>Develop a Python client(<a href="http://client.py/">client.py</a>) that can connect to a server and request a file.</p><ul><li><strong>Establish a Connection:</strong> Use Python’s socket library to create a TCP connection to the server. Initiate communication with the server to request files. The client should be able to connect to the server’s IP address and port number.</li></ul><pre>import socket<br><br># Example of setting up a socket connection to the server<br>client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)<br># Replace &#39;localhost&#39; and &#39;12345&#39; with your server&#39;s address and port<br>client_socket.connect((&#39;localhost&#39;, 12345))  </pre><ul><li><strong>Request a File:</strong> Implement functionality that allows the client to request a specific file from the server.</li></ul><pre>file_request = &quot;example.txt&quot;<br>client_socket.send(file_request.encode())</pre><ul><li><strong>Receive Data:</strong> Handle incoming data from the server and save it locally.</li></ul><pre>with open(&#39;downloaded_file.txt&#39;, &#39;wb&#39;) as file:<br>    while True:<br>        data = client_socket.recv(1024)<br>        if not data:<br>            break<br>        file.write(data)<br>print(&quot;File received successfully.&quot;)</pre><p><strong>Build a Simplified Server (Part 2)</strong></p><p>Develop a Simplified Server script(server.py) that can connect to a server and request a file. The server should remain active, waiting for new connections.</p><ul><li><strong>Listening for connections: </strong>Initialize a socket that listens on a designated port for incoming connections.</li></ul><pre>import socket<br><br># Create a socket object using the TCP/IP protocol<br>server_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)<br><br># Bind the socket to all available network interfaces at port 12345<br>server_socket.bind((&#39;0.0.0.0&#39;, 12345))<br><br># Start listening for incoming connections with a queue of up to 5 clients<br>server_socket.listen(5)<br>print(&quot;Server listening on port 12345...&quot;)</pre><ul><li><strong>Process Requests: </strong>When a client connects, read the file request and send the requested file in binary mode.</li></ul><pre>while True:<br>    client_conn, client_addr = server_socket.accept()<br>    print(f&quot;Connected to {client_addr}&quot;)<br>    file_request = client_conn.recv(1024).decode()<br>    <br>    try:<br>        with open(file_request, &#39;rb&#39;) as file:<br>            for data_chunk in file:<br>                client_conn.sendall(data_chunk)<br>    except FileNotFoundError:<br>        client_conn.send(b&quot;File not found.&quot;)</pre><p><strong>Enhanced Server (Part 3)</strong></p><p>Enhancing the server to handle multiple clients and improve performance is crucial to making it robust and production-ready.</p><ul><li><strong>Implement Concurrency: </strong>Use threading or multiprocessing to manage multiple connections without blocking which allows the server to handle several file requests simultaneously.</li></ul><pre>import threading<br><br>def handle_client(client_conn, client_addr):<br>    # Logic for handling each client connection<br>    pass<br><br>while True:<br>    client_conn, client_addr = server_socket.accept()<br>    thread = threading.Thread(target=handle_client, args=(client_conn, client_addr))<br>    thread.start()</pre><ul><li><strong>Add Robust Error Handling: </strong>Handle scenarios where requested files do not exist or connections drop unexpectedly.</li><li><strong>Optimize Performance: </strong>Focus on minimizing CPU and memory usage when processing multiple file transfers. Use efficient data handling techniques, like sending data in fixed-size chunks, to avoid resource bottlenecks.</li></ul><pre># Define a reasonable buffer size for file chunks<br>buffer_size = 4096</pre><h3>Testing Your File Transfer System</h3><p>Once you’ve built the client and server components, it’s crucial to test them to ensure they work as expected. This section provides step-by-step instructions to help you validate your implementation and troubleshoot any issues.</p><p><strong>Server: Start the server</strong></p><ol><li>Run your server script (e.g., <a href="http://server.py/">server.py</a>) to start listening for incoming connections.</li><li>Ensure that the server is listening on the correct port by checking the console output and the message should confirm that the server is ready to accept connections.</li></ol><p><strong>Client: Run the client application</strong></p><ol><li>Open a new terminal window and run your client script with the server’s IP address and the file you want to request.</li><li>Check for Connection Confirmation: Ensure that the client successfully connects to the server. The server’s terminal should display a message indicating that a client has connected.</li><li>Check if the requested file (example.txt) is successfully transferred and saved on the client’s machine.</li><li>If the file transfer is successful, you should see a message like File received successfully. in the client’s terminal.</li></ol><p><strong>Test Concurrency (Enhanced Server)</strong></p><ol><li><strong>Run Multiple Clients Simultaneously:</strong> Open multiple terminal windows and run the client script in each, requesting different files from the server at the same time.</li><li><strong>Check the Server’s Response: </strong>Ensure that the server handles all incoming requests without blocking or crashing. Also verify that each client receives the correct file data without delay or error.</li></ol><p><strong>Further Exploration</strong></p><p>Once completing this project, you have built a strong foundation in network programming and developed a practical file transfer system using Python. You’ve gained essential skills in client-server architecture, socket programming, and concurrency — fundamentals that are crucial for building scalable, real-world networked applications.</p><p><strong><em>If you have any questions or would like to discuss the project in more detail, feel free to reach out to me directly. Due to academic guidelines, the full implementation details are stored in a private repository, but I am more than happy to connect with fellow learners and share insights.</em></strong></p><p><strong>Related Resources</strong></p><p>For those interested in similar topics , here are some useful resources to deepen your understanding:</p><p>• <a href="https://en.wikipedia.org/wiki/Berkeley_sockets#Socket_API_functions">Socket API Functions</a></p><p>• <a href="https://docs.python.org/3/library/socket.html">Python Socket Documentation</a></p><p>• <a href="https://realpython.com/python-sockets/">Python Socket Programming</a></p><p>• <a href="https://realpython.com/intro-to-python-threading/">Introduction to Multi-threading in Python</a></p><p>• <a href="https://www.youtube.com/watch?v=Lbfe3-v7yE0">Building Client-Server Applications in Python</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c9962cf238c0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unleash Your Potential: Discover the Top 5 Tools For Students!]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@CHICHEEE/unleash-your-potential-discover-the-top-5-tools-for-students-ee65c4d4b861?source=rss-8fdcb0bf4541------2"><img src="https://cdn-images-1.medium.com/max/1920/1*z_k_-WdS--6afxXgGkx_bQ.png" width="1920"></a></p><p class="medium-feed-snippet">Learn About the 5 Must-Have Tools for Success</p><p class="medium-feed-link"><a href="https://medium.com/@CHICHEEE/unleash-your-potential-discover-the-top-5-tools-for-students-ee65c4d4b861?source=rss-8fdcb0bf4541------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@CHICHEEE/unleash-your-potential-discover-the-top-5-tools-for-students-ee65c4d4b861?source=rss-8fdcb0bf4541------2</link>
            <guid isPermaLink="false">https://medium.com/p/ee65c4d4b861</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[students]]></category>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Nathan Chiche]]></dc:creator>
            <pubDate>Fri, 10 Feb 2023 10:08:32 GMT</pubDate>
            <atom:updated>2023-02-10T22:17:42.360Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[5 Mind-Blowing & Absolutely Free Creator Tools   (2025)]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@CHICHEEE/5-best-free-creator-tools-2023-b21ca947c889?source=rss-8fdcb0bf4541------2"><img src="https://cdn-images-1.medium.com/max/1077/1*6mtoItFHpzxdD2xFgbJKOg.png" width="1077"></a></p><p class="medium-feed-snippet">5 Most Used Creator Tools That Are Free! &#x1F92B;</p><p class="medium-feed-link"><a href="https://medium.com/@CHICHEEE/5-best-free-creator-tools-2023-b21ca947c889?source=rss-8fdcb0bf4541------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@CHICHEEE/5-best-free-creator-tools-2023-b21ca947c889?source=rss-8fdcb0bf4541------2</link>
            <guid isPermaLink="false">https://medium.com/p/b21ca947c889</guid>
            <category><![CDATA[creators]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[design]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Nathan Chiche]]></dc:creator>
            <pubDate>Fri, 03 Feb 2023 04:42:26 GMT</pubDate>
            <atom:updated>2024-11-16T06:18:53.222Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Flask: Fast and Easy QuickStart]]></title>
            <link>https://medium.com/@CHICHEEE/flask-fast-and-easy-quickstart-e4877431c0b5?source=rss-8fdcb0bf4541------2</link>
            <guid isPermaLink="false">https://medium.com/p/e4877431c0b5</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[flask]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Nathan Chiche]]></dc:creator>
            <pubDate>Tue, 27 Dec 2022 13:01:32 GMT</pubDate>
            <atom:updated>2022-12-27T13:01:32.732Z</atom:updated>
            <content:encoded><![CDATA[<h3>Python Web development: Creating a Webapp using flask</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oT4Ajmxwhe5uxSHwJmoI3A.png" /></figure><p>Hi ! Today we will go over quickly starting a flask application on a <strong>mac</strong>. We will go over 4 simple steps soon after you have all the required installations</p><h3>Requirements:</h3><p><a href="https://brew.sh/">Homebrew</a> — A way to help in installations</p><p><a href="https://www.python.org/">Python 3</a> — A Programming language</p><p><a href="https://virtualenv.pypa.io/en/stable/">Virtualenv</a> — A tool to create isolated <strong>Python</strong> environments. The problem being addressed is <strong>dependencies</strong> and <strong>versions</strong> of those <strong>dependencies</strong>.</p><h3>Requirement installation:</h3><p>Homebrew</p><pre>$ /bin/bash -c &quot;$(curl -fsSL [&lt;https://raw.githubusercontent.com/Homebrew/install/master/install.sh&gt;](&lt;https://raw.githubusercontent.com/Homebrew/install/master/install.sh&gt;))&quot;</pre><p>Python 3</p><pre>$ brew install python3</pre><p><strong>Virtualenv</strong></p><pre>pip install virtualenv</pre><h3>Building the Web App</h3><p>To start building the web app make sure you have completed everything above including activating a new virtual environment for your project file.</p><p>Lets go ahead and create a folder in terminal and activate our virtual environment</p><pre>$ mkdir flask_hello_world<br>$ cd flask_hello_world<br>$ virtualenv flask_hello_world<br>$ source ~/flask_hello_world/env/bin/activate</pre><h4>1. Install <strong>Flask</strong></h4><pre>&gt; (flask_hello_world) $ pip install flask</pre><h4>2. Create a new <strong>package</strong> called <strong>app </strong>and <strong>file init.py</strong></h4><pre>&gt; (flask_hello_world) $ mkdir app<br>&gt; (flask_hello_world) $ touch app/__init__.py</pre><ul><li>Add the following code to the <a href="http://init.py/"><strong>init.py</strong></a> in the app package</li></ul><pre>from flask import Flask<br><br>app = Flask(__name__)<br><br>from app import routes<br><br>if __name__ == &quot;__main__&quot;:<br> app.run(debug=True)</pre><p>The <strong>script</strong> above simply creates the <strong>application object</strong> as an <strong>instance of class Flask</strong> imported from the <strong>Flask</strong> package.</p><h4>3. Create a routes <strong>module</strong></h4><pre>$ (flask_hello_world) $ touch app/routes.py</pre><p>• Add the following <strong>view function</strong> to the new <a href="http://routes.py/"><strong>routes.py</strong></a> file.</p><pre>from app import app<br><br>@app.route(&#39;/&#39;)<br>@app.route(&#39;/index&#39;)<br>def index():<br>    return &quot;Hello, World!&quot;</pre><ul><li>To complete this simple application, create a <strong>Python</strong> script to define the <strong>Flask</strong> application instance.</li></ul><h4>4. Create a run.py file</h4><pre>$ (flask_hello_world) $ touch run.py</pre><ul><li>Add the following to the file to define the <strong>application instance</strong> and import it.</li></ul><pre># run.py<br>    from app import app</pre><p>Here is what the directory structure should look like at this point.</p><pre>├── flask_hello_world<br>           ├── app<br>           │   ├── __init__.py<br>           │   └── routes.py<br>           └── run.py</pre><p>Our simple application is now complete , but before running it we need to tell <strong>Flask</strong> how to <strong>import</strong> it by setting a FLASK_APP environment variable.</p><p>Also we’ll enable debugging to automatically restart the server to reload any changes we make.</p><pre>(flask_hello_world) $ export FLASK_APP=run.py<br>(flask_hello_world) $ export FLASK_DEBUG=1</pre><h3>Run the application</h3><pre>(flask_hello_world) $ flask run<br>* Serving Flask app</pre><ul><li>Stop the server by pressing Ctrl-C</li><li>Save your dependencies to a <strong>requirements.tx</strong>t file</li></ul><pre>$ (flask_hello_world) $ pip freeze &gt; requirements.txt</pre><p>This automatically creates the file for you and it is best practice to allow other to collaborate on your project. <strong>Flask</strong> installs a few other <strong>dependencies</strong> so don’t worry if you see them in your file.</p><p>Here is our final project structure.</p><pre>├── flask_hello_world<br>           ├── app<br>           │   ├── __init__.py<br>           │   └── routes.py<br>           ├── requirements.txt<br>           └── run.py</pre><h3>🎉<strong>Congratulations on building your first Flask app!!!</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*3E_tQnM4zfWqU5Xx" /><figcaption>Photo by <a href="https://unsplash.com/@srz?utm_source=medium&amp;utm_medium=referral">sydney Rae</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e4877431c0b5" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>