<?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 Sayed</title>
    <description>The latest articles on DEV Community by Ahmed Sayed (@ahmed_sayed_01c0dad16b6a5).</description>
    <link>https://dev.to/ahmed_sayed_01c0dad16b6a5</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%2F3558265%2F2aafde08-e793-40d4-987e-025811de058c.jpg</url>
      <title>DEV Community: Ahmed Sayed</title>
      <link>https://dev.to/ahmed_sayed_01c0dad16b6a5</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ahmed_sayed_01c0dad16b6a5"/>
    <language>en</language>
    <item>
      <title>From Issue to Merge: Propagating HTTP Status Through OpenSeadragon</title>
      <dc:creator>Ahmed Sayed</dc:creator>
      <pubDate>Fri, 25 Sep 2026 12:26:33 +0000</pubDate>
      <link>https://dev.to/ahmed_sayed_01c0dad16b6a5/from-issue-to-merge-propagating-http-status-through-openseadragon-bpl</link>
      <guid>https://dev.to/ahmed_sayed_01c0dad16b6a5/from-issue-to-merge-propagating-http-status-through-openseadragon-bpl</guid>
      <description>&lt;p&gt;Working on a personal project is one thing.&lt;/p&gt;

&lt;p&gt;Contributing to an established open-source codebase is different. You have to understand existing behavior, preserve established contracts, write tests that fit the project, and respond to review from people who maintain the codebase.&lt;/p&gt;

&lt;p&gt;Recently, I contributed to &lt;strong&gt;OpenSeadragon&lt;/strong&gt;, an open-source JavaScript viewer for high-resolution and zoomable images.&lt;/p&gt;

&lt;p&gt;The contribution started with a relatively small problem:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When a TileSource failed to open, the HTTP status code was not available to consumers of the &lt;code&gt;open-failed&lt;/code&gt; event.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That information can be useful when an application needs to distinguish between different kinds of failures, such as authentication or authorization errors.&lt;/p&gt;

&lt;h2&gt;
  
  
  🔎 Tracing the Problem
&lt;/h2&gt;

&lt;p&gt;The first step was not changing code.&lt;/p&gt;

&lt;p&gt;I needed to understand where the information was being lost.&lt;/p&gt;

&lt;p&gt;The failure originated from an XHR request where the HTTP status was already available through &lt;code&gt;xhr.status&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;However, the &lt;code&gt;TileSource&lt;/code&gt; failure event did not expose that status, and when the failure propagated to the &lt;code&gt;Viewer&lt;/code&gt;, the information was still missing.&lt;/p&gt;

&lt;p&gt;So the change needed to follow the existing event flow rather than introduce a separate error mechanism:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;XHR failure
   ↓
TileSource "open-failed"
   ↓
Viewer "open-failed"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The goal was simple:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;xhr.status
   ↓
event.status
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  🛠️ Making the Smallest Useful Change
&lt;/h2&gt;

&lt;p&gt;The implementation added an optional &lt;code&gt;status&lt;/code&gt; field to the &lt;code&gt;TileSource&lt;/code&gt; &lt;code&gt;open-failed&lt;/code&gt; event and propagated it through the &lt;code&gt;Viewer&lt;/code&gt; event.&lt;/p&gt;

&lt;p&gt;The TypeScript definitions were updated as well, so the public API and its type declarations remained aligned.&lt;/p&gt;

&lt;p&gt;The change also covered specialized TileSources such as IIP and Iris, where failures needed to propagate the same information.&lt;/p&gt;

&lt;p&gt;This was deliberately kept focused. Instead of redesigning OpenSeadragon's networking layer, the contribution extended the existing failure path with the information the caller needed.&lt;/p&gt;

&lt;h2&gt;
  
  
  🧪 Testing the Behavior
&lt;/h2&gt;

&lt;p&gt;A regression test was added for a failed resource returning HTTP &lt;code&gt;404&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The test verifies that:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;status&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="mi"&gt;404&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It also keeps the existing failure behavior intact by checking that the failure message is still displayed and logged.&lt;/p&gt;

&lt;p&gt;After the implementation and review changes, the basic module tests passed, followed by the full test suite with &lt;strong&gt;390 tests passing&lt;/strong&gt;. TypeScript definition checks also passed.&lt;/p&gt;

&lt;h2&gt;
  
  
  👀 Working Through Code Review
&lt;/h2&gt;

&lt;p&gt;The interesting part of an open-source contribution does not end when the code works.&lt;/p&gt;

&lt;p&gt;The maintainer review raised an important implementation detail around accessing &lt;code&gt;xhr.status&lt;/code&gt; inside the existing error handling path.&lt;/p&gt;

&lt;p&gt;There was also a broader discussion about error propagation across different TileSource implementations and whether the project should eventually move away from passing around the old XHR object.&lt;/p&gt;

&lt;p&gt;That larger architectural discussion was intentionally kept outside the scope of this PR.&lt;/p&gt;

&lt;p&gt;I addressed the requested changes, propagated the status through the additional TileSource implementations, updated the API documentation, and reran the tests.&lt;/p&gt;

&lt;p&gt;The changes were approved, and &lt;strong&gt;PR #2972 was merged into OpenSeadragon's &lt;code&gt;master&lt;/code&gt; branch on September 14, 2026.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  📌 What I Took Away
&lt;/h2&gt;

&lt;p&gt;This contribution reinforced something I had already started learning from browser engineering:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Good open-source work is often less about writing a lot of code and more about understanding the code that is already there.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The valuable part of this contribution was not adding a large feature.&lt;/p&gt;

&lt;p&gt;It was:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;tracing an existing execution path,&lt;/li&gt;
&lt;li&gt;identifying where useful information was being dropped,&lt;/li&gt;
&lt;li&gt;making a small API-level change,&lt;/li&gt;
&lt;li&gt;keeping related implementations consistent,&lt;/li&gt;
&lt;li&gt;adding a regression test,&lt;/li&gt;
&lt;li&gt;responding to maintainer feedback,&lt;/li&gt;
&lt;li&gt;and validating the result before merge.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That process is what I wanted to experience by contributing to a real-world codebase.&lt;/p&gt;

&lt;p&gt;🔗 &lt;strong&gt;Issue:&lt;/strong&gt; &lt;a href="https://github.com/openseadragon/openseadragon/issues/2541" rel="noopener noreferrer"&gt;OpenSeadragon #2541&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🔗 &lt;strong&gt;Pull Request:&lt;/strong&gt; &lt;a href="https://github.com/openseadragon/openseadragon/pull/2972" rel="noopener noreferrer"&gt;OpenSeadragon #2972&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  OpenSource #JavaScript #SoftwareEngineering #WebDevelopment #GitHub #OpenSeadragon #FrontendEngineering
&lt;/h1&gt;

</description>
      <category>javascript</category>
      <category>opensource</category>
      <category>softwareengineering</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Beyond a Country Explorer: Accessibility &amp; Architecture in React</title>
      <dc:creator>Ahmed Sayed</dc:creator>
      <pubDate>Fri, 25 Sep 2026 12:20:18 +0000</pubDate>
      <link>https://dev.to/ahmed_sayed_01c0dad16b6a5/beyond-a-country-explorer-accessibility-architecture-in-react-4hmk</link>
      <guid>https://dev.to/ahmed_sayed_01c0dad16b6a5/beyond-a-country-explorer-accessibility-architecture-in-react-4hmk</guid>
      <description>&lt;p&gt;A country explorer can look like a simple React project: fetch some data, render a list of countries, and add a search field.&lt;/p&gt;

&lt;p&gt;But building a frontend that remains &lt;strong&gt;accessible, predictable, and maintainable&lt;/strong&gt; requires thinking beyond the visual interface.&lt;/p&gt;

&lt;p&gt;Here is how I structured my Rest Countries application with a focus on component boundaries, user interaction, and accessibility.&lt;/p&gt;

&lt;p&gt;⚡ &lt;strong&gt;The Architecture Highlights:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Feature-Oriented Structure:&lt;/strong&gt; Country-related functionality is organized around the feature itself, separating the data layer, application logic, and UI components instead of grouping everything by file type.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Custom State Logic:&lt;/strong&gt; Country filtering and selection are handled through a dedicated &lt;code&gt;useCountries&lt;/code&gt; hook, keeping stateful behavior separate from presentation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Keyboard-Accessible Region Selection:&lt;/strong&gt; The custom region selector supports keyboard interaction including &lt;code&gt;ArrowUp&lt;/code&gt;, &lt;code&gt;ArrowDown&lt;/code&gt;, &lt;code&gt;Home&lt;/code&gt;, &lt;code&gt;End&lt;/code&gt;, and &lt;code&gt;Escape&lt;/code&gt;, providing an interaction model closer to a native control.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Focus Management:&lt;/strong&gt; Focus is deliberately managed when navigating between the country list and country details. When returning from a country detail view, focus can be restored to the element that originally triggered the navigation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Semantic Interaction:&lt;/strong&gt; Interactive elements use appropriate HTML semantics and accessible labels rather than relying only on visual styling to communicate their purpose.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Controlled UI Boundaries:&lt;/strong&gt; The country grid, controls, and country detail view have separate responsibilities, making the interface easier to reason about and modify.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Intentional Interaction Design:&lt;/strong&gt; Country information remains selectable and usable as text, while the country flag acts as the primary interactive target for opening details. This avoids turning an entire information card into an unnecessarily large interactive control.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;📊 &lt;strong&gt;The Result:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A React country explorer designed not only to display data, but to provide a more predictable experience for keyboard users while maintaining clear boundaries between state, UI, and interaction logic.&lt;/p&gt;

&lt;p&gt;The project is built with accessibility as part of the architecture rather than as a final visual polish step.&lt;/p&gt;

&lt;p&gt;🔗 &lt;strong&gt;Live Demo:&lt;/strong&gt; &lt;a href="https://ahmed-rest-countries.vercel.app/" rel="noopener noreferrer"&gt;https://ahmed-rest-countries.vercel.app/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;💻 &lt;strong&gt;GitHub Repo:&lt;/strong&gt; &lt;a href="https://github.com/a-sayed123/Rest_Countries_API" rel="noopener noreferrer"&gt;https://github.com/a-sayed123/Rest_Countries_API&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  React #Accessibility #FrontendArchitecture #WebDevelopment #CleanCode #A11y
&lt;/h1&gt;

</description>
      <category>webdev</category>
      <category>react</category>
      <category>a11y</category>
      <category>frontend</category>
    </item>
    <item>
      <title>Beyond a Basic Weather App: Architecture &amp; Resilience in Vanilla JavaScript</title>
      <dc:creator>Ahmed Sayed</dc:creator>
      <pubDate>Mon, 14 Sep 2026 20:37:24 +0000</pubDate>
      <link>https://dev.to/ahmed_sayed_01c0dad16b6a5/beyond-a-basic-weather-app-architecture-resilience-in-react-4dk</link>
      <guid>https://dev.to/ahmed_sayed_01c0dad16b6a5/beyond-a-basic-weather-app-architecture-resilience-in-react-4dk</guid>
      <description>&lt;p&gt;A weather app is often seen as a simple tutorial project, but turning it into a &lt;strong&gt;resilient, maintainable frontend application&lt;/strong&gt; requires solving real-world challenges beyond simply displaying weather data.&lt;/p&gt;

&lt;p&gt;Here is how I architected my Weather Application with a focus on reliability, separation of concerns, and controlled data flow.&lt;/p&gt;

&lt;p&gt;⚡ &lt;strong&gt;The Architecture Highlights:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Modular Application Structure:&lt;/strong&gt; The application is divided into focused modules for application control, UI management, API communication, validation, and weather-related logic instead of placing everything inside a single script.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Decoupled API Layer:&lt;/strong&gt; External API communication is isolated from the UI and application logic, making the data layer easier to reason about and maintain.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Debounced City Search:&lt;/strong&gt; Search input is debounced to avoid unnecessary geocoding requests while the user is typing.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;In-Memory Data Handling:&lt;/strong&gt; Frequently used location data can be reused without repeatedly requesting the same information, helping reduce unnecessary network traffic.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Explicit UI States:&lt;/strong&gt; Loading, successful responses, validation failures, and API errors are handled as explicit application states rather than being left to accidental UI behavior.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Large Dataset Optimization:&lt;/strong&gt; Instead of shipping an unnecessarily large city dataset, I filtered the original dataset of roughly 50,000 cities down to 11,399 cities with a population above 50,000, resulting in a dataset of about 766 KB.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Separation of Responsibilities:&lt;/strong&gt; Application control, UI rendering, API communication, and domain logic are kept separate so that changes in one part of the application do not unnecessarily affect the others.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;📊 &lt;strong&gt;The Result:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A modular Vanilla JavaScript weather application with clearer boundaries between responsibilities, controlled network usage, predictable UI behavior, and an architecture that can evolve without turning the application into a single tightly coupled codebase.&lt;/p&gt;

&lt;p&gt;🔗 &lt;strong&gt;Live Demo:&lt;/strong&gt; &lt;a href="https://weather-app-v2nd.vercel.app/" rel="noopener noreferrer"&gt;https://weather-app-v2nd.vercel.app/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;💻 &lt;strong&gt;GitHub Repo:&lt;/strong&gt; &lt;a href="https://github.com/a-sayed123/weather-app" rel="noopener noreferrer"&gt;https://github.com/a-sayed123/weather-app&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  JavaScript #FrontendArchitecture #CleanCode #WebDevelopment #SoftwareEngineering
&lt;/h1&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>architecture</category>
      <category>frontend</category>
    </item>
  </channel>
</rss>
