<?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>DEV Community: Ahmed Gulfam</title>
    <description>The latest articles on DEV Community by Ahmed Gulfam (@agsilver26).</description>
    <link>https://dev.to/agsilver26</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4169073%2Fe32d7a5e-5888-418a-8a6e-1012edee71fe.png</url>
      <title>DEV Community: Ahmed Gulfam</title>
      <link>https://dev.to/agsilver26</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/agsilver26"/>
    <language>en</language>
    <item>
      <title>Building NEWS50 AI: My CS50P Journey</title>
      <dc:creator>Ahmed Gulfam</dc:creator>
      <pubDate>Wed, 07 Oct 2026 14:23:37 +0000</pubDate>
      <link>https://dev.to/agsilver26/building-news50-ai-my-cs50p-journey-2gkp</link>
      <guid>https://dev.to/agsilver26/building-news50-ai-my-cs50p-journey-2gkp</guid>
      <description>&lt;h1&gt;
  
  
  Building NEWS50 AI: My CS50P Journey
&lt;/h1&gt;

&lt;p&gt;Back in July, I embarked on a completely unknown voyage: CS50’s Introduction to Programming with Python (CS50P). It took me, a complete newbie to the coding world, about two months to not only complete the required assignments but also create an AI-powered news chatbot for my final project.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Spark: Brainstorming a Real-World Idea
&lt;/h2&gt;

&lt;p&gt;For my final project, I wanted to do more than create a simple program—I wanted to tackle a real-life issue. &lt;/p&gt;

&lt;p&gt;Then a light flickered in my brain! Coming from a news-loving culture, I thought: &lt;em&gt;"Why not summarize the news for busy people?"&lt;/em&gt; &lt;/p&gt;

&lt;p&gt;And with that, my fingers sprang onto the keyboard.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Engineering Pivot: API Roadblocks &amp;amp; Solutions
&lt;/h2&gt;

&lt;p&gt;After researching extensively, I concluded that I needed two APIs: one for fetching the news and one for the AI to summarize it. &lt;/p&gt;

&lt;p&gt;Initially, I chose &lt;strong&gt;GNews&lt;/strong&gt; and &lt;strong&gt;Anthropic&lt;/strong&gt;. While building my program, I frequently executed it to test the output. Suddenly, out of nowhere, I was hit by an error message. &lt;/p&gt;

&lt;p&gt;Upon closer review, I learned that Anthropic APIs could only be used on a free trial; after that, cash speaks! I didn't want to spend money on an API for a learning project, so plans changed. I pivoted to &lt;strong&gt;Gemini&lt;/strong&gt;, which offers generous usage limits for developers. Great! We were back on track.&lt;/p&gt;




&lt;h2&gt;
  
  
  How NEWS50 AI Works
&lt;/h2&gt;

&lt;p&gt;After a couple of days of hitting the keyboard, the project was ready! &lt;/p&gt;

&lt;p&gt;The program welcomes the user with a splendid banner: &lt;strong&gt;"Welcome to NEWS50 AI"&lt;/strong&gt;. From there, the user is asked to select a category such as World, Business, or Sports. &lt;/p&gt;

&lt;h3&gt;
  
  
  Key Features:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Smart News Search:&lt;/strong&gt; If the user enters a specific topic (ranging from &lt;em&gt;"La Liga fixtures"&lt;/em&gt; to &lt;em&gt;"Who is the oldest man alive?"&lt;/em&gt;), the AI first browses through news articles for relevant keywords.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Graceful Fallback:&lt;/strong&gt; If it doesn't find news articles matching the query, it shifts to the wide world of the internet to search through it directly.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;User-Friendly Output:&lt;/strong&gt; It returns the collected information in clear, easy-to-read language.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Simple Exit:&lt;/strong&gt; Typing &lt;code&gt;leave&lt;/code&gt; safely terminates the program.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Try It Out
&lt;/h2&gt;

&lt;p&gt;You can find full details and personally test my program on GitHub:&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/agsilver26" rel="noopener noreferrer"&gt;
        agsilver26
      &lt;/a&gt; / &lt;a href="https://github.com/agsilver26/CS50P-Final-Project" rel="noopener noreferrer"&gt;
        CS50P-Final-Project
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;NEWS50 AI&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;Want to read the news but you are busy? Say hello to &lt;strong&gt;NEWS50 AI&lt;/strong&gt;; an interactive chatbot that delivers real-time news summaries and answers all of your questions. Instead of scrolling through endless news articles and websites, you can simply choose from a category, such as World, Business, Sports etc to get a clean, legible and AI-generated summary of whatever is happening around the world.&lt;/p&gt;
&lt;p&gt;The project revolves around 2 APIs: GNews and Google Gemini
GNews gives the real-time news data while Google Gemini summarizes it into a user-friendly way.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Video Link:&lt;/h2&gt;
&lt;/div&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Files:&lt;/h2&gt;

&lt;/div&gt;
&lt;div class="snippet-clipboard-content notranslate position-relative overflow-auto"&gt;&lt;pre class="notranslate"&gt;&lt;code&gt;.
├── project.py          # Main file that delivers the latest news
├── test_project.py     # Unit tests for key functions in project.py
├── requirements.txt    # List of required libraries
└── README.md           # This file
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;How It Works:&lt;/h2&gt;

&lt;/div&gt;
&lt;p&gt;The program welcomes you with a captivating ASCII banner, imported from pyfiglet, followed by a couple of introductory…&lt;/p&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/agsilver26/CS50P-Final-Project" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


</description>
      <category>showdev</category>
      <category>python</category>
      <category>cs50</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
