<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: John Eric</title>
    <description>The latest articles on Forem by John Eric (@vulcanric).</description>
    <link>https://forem.com/vulcanric</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1098627%2Faba6dff0-a207-4bd7-90c8-f0b4c5d800bc.jpeg</url>
      <title>Forem: John Eric</title>
      <link>https://forem.com/vulcanric</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/vulcanric"/>
    <language>en</language>
    <item>
      <title>✨ Submission: Trend-Aware Content Generator</title>
      <dc:creator>John Eric</dc:creator>
      <pubDate>Mon, 26 May 2025 04:28:20 +0000</pubDate>
      <link>https://forem.com/vulcanric/submission-trend-aware-content-generator-12l8</link>
      <guid>https://forem.com/vulcanric/submission-trend-aware-content-generator-12l8</guid>
      <description>&lt;h1&gt;
  
  
  ⚡Trend-Aware Content Generator
&lt;/h1&gt;

&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/brightdata-2025-05-07"&gt;Bright Data AI Web Access Hackathon&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;A &lt;strong&gt;trend-aware content generator&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  🧠 What It Does
&lt;/h2&gt;

&lt;p&gt;This AI system autonomously discovers what's trending online and instantly generates high-quality, context-rich content tailored to specific audiences and platforms.&lt;/p&gt;

&lt;p&gt;It combines real-time web data and powerful AI generation to help marketers, content creators, and teams quickly respond to trends with impactful, timely content.&lt;/p&gt;

&lt;h2&gt;
  
  
  🔍 Problem It Solves
&lt;/h2&gt;

&lt;p&gt;Content creators often struggle to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Stay on top of fast-changing trends&lt;/li&gt;
&lt;li&gt;Understand what’s currently relevant&lt;/li&gt;
&lt;li&gt;Create platform-specific content quickly&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This tool solves all three problems by acting as a fully autonomous assistant that:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Discovers what’s trending right now&lt;/li&gt;
&lt;li&gt;Searches the web for real-time insights on that topic&lt;/li&gt;
&lt;li&gt;Generates full content in seconds for blogs, social media, newsletters, and more&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  ⚙️ How It Works
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Real-Time Trend Discovery&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Fetches trending topics from sources (Reddit, YouTube) using Bright Data's Web Unlocker API&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Live Web Search for Context&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Uses Bright Data’s SERP Scraper API to pull fresh search results related to the trend&lt;/li&gt;
&lt;li&gt;Extracts key snippets and metadata&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Intelligent Generation&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Sends all gathered info to an LLM (via Together.ai) to generate full, well-informed content&lt;/li&gt;
&lt;li&gt;User can choose format (blog, LinkedIn post, etc.), tone, and audience&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Content Display&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Clean, modern interface shows final content&lt;/li&gt;
&lt;li&gt;All content is generated with minimal user input&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  🎥 Demo
&lt;/h2&gt;

&lt;p&gt;🔗 GitHub Repo: &lt;a href="https://github.com/Vulcanric/trend-aware-content-agent" rel="noopener noreferrer"&gt;github.com/vulcanric/trend-aware-generator&lt;/a&gt;&lt;br&gt;
🌐 Live Demo: &lt;a href="https://trendy-ai.up.railway.app" rel="noopener noreferrer"&gt;https://trendy-ai.up.railway.app&lt;/a&gt;&lt;br&gt;
📹 Watch the 6-min video walkthrough:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs6t8abpep469h29zn30l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs6t8abpep469h29zn30l.png" alt="Client side showcasing the use of Trendy.ai" width="800" height="361"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  🔌 How I Used Bright Data's Infrastructure
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F18jskkdodo2rpah3kfni.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F18jskkdodo2rpah3kfni.png" alt="System design showing the use of Bright Data's infrastructure" width="800" height="594"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Discover&lt;/strong&gt;: Scans top Reddit posts and YouTube videos for trending keywords using Bright Data's powerful proxies and web unlocker.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Access&lt;/strong&gt;: Navigates dynamic, JavaScript-heavy pages using Bright Data's MCP.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Extract&lt;/strong&gt;: Pulls structured titles and summaries from posts and videos.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Interact&lt;/strong&gt;: Interact with pages like a human (clicks, scrolls, loads comments). Feeds trends to a LLM to generate content.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The system integrates Bright Data’s &lt;strong&gt;SERP Scraper API&lt;/strong&gt; to retrieve the most current and localized web search results for each topic. When a user selects or inputs a topic, the backend agent queries the web through Bright Data, enriching the AI prompt with up-to-date insights.&lt;/p&gt;

&lt;p&gt;This ensures the generated content reflects not just what's trending, but also how it's currently being discussed online.&lt;/p&gt;

&lt;h2&gt;
  
  
  📈 Performance Improvements
&lt;/h2&gt;

&lt;p&gt;By combining AI with real-time web access, the content generated is more relevant, timely, and engaging. Compared to using a static dataset or a finetuned model alone, this hybrid approach greatly enhances the topical accuracy and freshness of the output.&lt;br&gt;
The addition of web search context allows the system to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Reflect evolving narratives (e.g., news coverage, social reactions)&lt;/li&gt;
&lt;li&gt;Adjust tone based on live sentiment&lt;/li&gt;
&lt;li&gt;Avoid outdated or irrelevant info in generated content&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🛠️ Tech Stack
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Frontend:&lt;/strong&gt; Next.js&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Backend:&lt;/strong&gt; FastAPI&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LLM:&lt;/strong&gt; LLaMA3.3 via &lt;a href="https://www.together.ai" rel="noopener noreferrer"&gt;Together.ai&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Real-Time Data:&lt;/strong&gt; Bright Data Proxies + SERP Scraper API&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Please show their repo some love: &lt;a href="https://github.com/luminati-io/brightdata-mcp" rel="noopener noreferrer"&gt;https://github.com/luminati-io/brightdata-mcp&lt;/a&gt; 🌟&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>brightdatachallenge</category>
      <category>ai</category>
      <category>webdata</category>
    </item>
    <item>
      <title>How I created a web server for my portfolio</title>
      <dc:creator>John Eric</dc:creator>
      <pubDate>Thu, 13 Jun 2024 04:11:28 +0000</pubDate>
      <link>https://forem.com/vulcanric/how-i-created-a-web-server-for-my-portfolio-3j7e</link>
      <guid>https://forem.com/vulcanric/how-i-created-a-web-server-for-my-portfolio-3j7e</guid>
      <description>&lt;h3&gt;
  
  
  Hi 👋
&lt;/h3&gt;

&lt;p&gt;My name is Eric, and I am a full-stack software engineer at ALX. I have extensive experience in DevOps, Front-end development, and Socket/Network programming while specializing in Back-end development.&lt;br&gt;
My favorite programming language is C ✨ (I really enjoy coding in C). Perhaps it's because C was the first language I learned as a programmer, though I also code in other languages like Python and JavaScript.&lt;/p&gt;
&lt;h3&gt;
  
  
  The main thing
&lt;/h3&gt;

&lt;p&gt;At ALX, where I study, we reached a point where we needed to create impressive projects to enhance our resumes as aspiring software developers.&lt;/p&gt;

&lt;p&gt;The main challenge was deciding on a project idea; otherwise, I would have to work on the default project (a 2D Maze game built in C).&lt;/p&gt;

&lt;p&gt;After days of contemplation, I decided to build an HTTP web server in C, leveraging its power and efficiency. Recognizing that this would be a challenging project, requiring extensive technical expertise and a logical workflow, I embraced the challenge. I thrive on tackling projects that push my boundaries.&lt;/p&gt;

&lt;p&gt;Here are the workings of my web server:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp1zpbo2q1zk6hhbuwn94.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp1zpbo2q1zk6hhbuwn94.jpg" alt="web server workings" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With the goal of building a minimalist web server that I could enhance with additional features over time, I began with the basics. I created a TCP socket, bound it to my server's address, and set it to listen for incoming connections on a specific port. Initially, I used a buffer filled with static HTML content to respond to any requests from web clients (whether from a browser or curl), regardless of the request specifics. This approach allowed me to test the server's functionality.&lt;/p&gt;

&lt;p&gt;Here was the first time my web server worked:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9ww2x2wu60ae1zhuim82.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9ww2x2wu60ae1zhuim82.jpg" alt="The first time my web server worked!" width="800" height="433"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Seeing this, I was filled with excitement and proceeded to implement a configuration settings feature. This allowed me to configure which port the server listens on, what folder it serves web content from, and more. The challenge was creating a format for the configuration file. To keep it simple, easy to understand, and straightforward to write, I developed a very simple format similar to that of nginx.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;server &amp;lt;SERVER_NAME&amp;gt;:
    listen &amp;lt;PORT&amp;gt;

    root &amp;lt;ROOT_FOLDER&amp;gt;
    index index.html

    location / :
        check &amp;lt;URI&amp;gt; FOUND?200:404
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;During this project, I encountered a challenging bug: an invalid pointer! While developing the configuration engine—a tool that parses and processes the configuration file—I kept seeing a &lt;code&gt;free(): invalid pointer&lt;/code&gt; error. I searched my code thoroughly to ensure all allocated memory was properly freed, but couldn't identify the issue.&lt;/p&gt;

&lt;p&gt;After an hour of frustration, I decided to use &lt;code&gt;printf()&lt;/code&gt; with the address-of-format specifier for debugging. By placing &lt;code&gt;printf("Address of buff: %p\n", &amp;amp;MALLOCD_BUFF)&lt;/code&gt; at various points, I tracked the addresses of buffers at different stages. This helped me discover that the buffer's address in memory was slightly higher when freed than when declared. The issue arose because, within the configuration processor, the pointer was incremented by one to skip initial tab characters in each line of the file.&lt;/p&gt;

&lt;p&gt;Here's a diagram to better illustrate the problem:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# This is the configuration file&lt;/span&gt;
&lt;span class="c"&gt;# The escape sequence &amp;lt;\t&amp;gt; signifies a tab&lt;/span&gt;

server example.com:
&amp;lt;&lt;span class="se"&gt;\t&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;listen 80

&amp;lt;&lt;span class="se"&gt;\t&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;root /var/www/html
&amp;lt;&lt;span class="se"&gt;\t&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;index index.html index.eric.html

&amp;lt;&lt;span class="se"&gt;\t&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&amp;lt;&lt;span class="se"&gt;\t&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;location / :
&amp;lt;&lt;span class="se"&gt;\t&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&amp;lt;&lt;span class="se"&gt;\t&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&amp;lt;&lt;span class="se"&gt;\t&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;check &lt;span class="nv"&gt;$uri&lt;/span&gt; &lt;span class="nv"&gt;$uri&lt;/span&gt;/ FOUND?200:404
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="cm"&gt;/* Inside the configuration file processor */&lt;/span&gt;
   &lt;span class="kt"&gt;char&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;line&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;NULL&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
   &lt;span class="kt"&gt;size_t&lt;/span&gt; &lt;span class="n"&gt;linesize&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

   &lt;span class="n"&gt;getline&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;linesize&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;config_file&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;  &lt;span class="cm"&gt;/* address of the first char pointed to by @line is #7ADF5431 */&lt;/span&gt;

   &lt;span class="cm"&gt;/* Skip as many tabs found beginning the line */&lt;/span&gt;
   &lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;line&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sc"&gt;'\t'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;   &lt;span class="cm"&gt;/* This statement moves the address #7ADF5431 to + 1 (next char) */&lt;/span&gt;

   &lt;span class="n"&gt;free&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;  &lt;span class="cm"&gt;/* When freeing the line buffer, the wrong address is being freed */&lt;/span&gt;
   &lt;span class="cm"&gt;/* It's freeing address #7ADF5431 + 1 + ... instead of address #7ADF5431 */&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To solve this problem, I used a variable to count the number of addresses in memory moved forward by the statement &lt;code&gt;line++&lt;/code&gt;. and decrements them as required before freeing them, and that was it! I no longer get the error &lt;code&gt;Invalid pointer&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="cm"&gt;/* Inside the configuration file processor */&lt;/span&gt;
&lt;span class="kt"&gt;char&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;line&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;NULL&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kt"&gt;size_t&lt;/span&gt; &lt;span class="n"&gt;linesize&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;memcount&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="cm"&gt;/* Memory address counter */&lt;/span&gt;

&lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;getline&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;linesize&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;config_file&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="cm"&gt;/* Read each line in the file */&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="cm"&gt;/* Cuts off all the starting tab characters */&lt;/span&gt;
    &lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;line&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sc"&gt;'\t'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="cm"&gt;/* Move to the next character in memory */&lt;/span&gt;
        &lt;span class="n"&gt;memcount&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="cm"&gt;/* Count the number of characters moved to */&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;


    &lt;span class="cm"&gt;/* Skip commented lines */&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;line&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sc"&gt;'#'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;memcount&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;  &lt;span class="cm"&gt;/* Go back to the first address allocated in memory */&lt;/span&gt;
            &lt;span class="n"&gt;memcount&lt;/span&gt;&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="n"&gt;free&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;  &lt;span class="cm"&gt;/* Now free the right address */&lt;/span&gt;
        &lt;span class="k"&gt;continue&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;  &lt;span class="cm"&gt;/* Go to the next line in file. There is nothing to do here */&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

   &lt;span class="cm"&gt;/* Process line */&lt;/span&gt;
        &lt;span class="p"&gt;...&lt;/span&gt;

   &lt;span class="cm"&gt;/* Free line */&lt;/span&gt;
   &lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;memcount&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
   &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;  &lt;span class="cm"&gt;/* Go back to the first address allocated in memory */&lt;/span&gt;
        &lt;span class="n"&gt;memcount&lt;/span&gt;&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
   &lt;span class="p"&gt;}&lt;/span&gt;
   &lt;span class="n"&gt;free&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;  &lt;span class="cm"&gt;/* Now free the right address */&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, I faced the trickiest part of the project—the workflow!&lt;/p&gt;

&lt;p&gt;If you’re a socket programmer or a Linux enthusiast, you know that multi-tasking is crucial for web servers and any socket-related software/hardware. Through my research, I learned about &lt;a href="https://www.javatpoint.com/race-condition-in-operating-system"&gt;race conditions&lt;/a&gt;, where multiple processes compete for a resource in a multiprocessing/multithreaded environment. One process might alter a resource, affecting the outcome for others.&lt;/p&gt;

&lt;p&gt;To ensure a functional server, high levels of isolation and independence are essential. How did I achieve this? I avoided having any single function do too much, as overburdened functions become dependent on many things, causing conflicts between processes calling them. Instead, I created numerous functions and handlers, each responsible for a specific task. This approach maximized independence and ensured the overall functionality of the server.&lt;/p&gt;

&lt;p&gt;With these strategies and more, I successfully built a fully functional web server in C.&lt;/p&gt;

&lt;p&gt;&lt;iframe src="https://player.vimeo.com/video/956574620" width="710" height="399"&gt;
&lt;/iframe&gt;
&lt;/p&gt;




&lt;h3&gt;
  
  
  Hello Dev Community,
&lt;/h3&gt;

&lt;p&gt;I'm thrilled to be part of this amazing group. Does anyone know where I can find funding for my project to help expand it? If so, please reach out to me.&lt;/p&gt;

&lt;h3&gt;
  
  
  Connect with me:
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://www.linkedin.com/in/johneric1"&gt;Linkedin&lt;/a&gt;&lt;br&gt;
&lt;a href="https://x.com/JohnEri89510617"&gt;X&lt;/a&gt;&lt;br&gt;
&lt;a href="mailto:jneric49@gmail.com"&gt;jneric49@gmail.com&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Check out the source code:
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/Vulcanric/ERIC-HTTP-SERVER"&gt;GitHub&lt;/a&gt; - Don't forget to leave a star if you like it!&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
