<?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: Ali Hamza</title>
    <description>The latest articles on DEV Community by Ali Hamza (@ali_hamza_589ec7b3eb6688d).</description>
    <link>https://dev.to/ali_hamza_589ec7b3eb6688d</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%2F3939488%2Fffc69754-c900-4599-b972-2a8d900525dd.png</url>
      <title>DEV Community: Ali Hamza</title>
      <link>https://dev.to/ali_hamza_589ec7b3eb6688d</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ali_hamza_589ec7b3eb6688d"/>
    <language>en</language>
    <item>
      <title>Day 83 of Learning MERN Stack</title>
      <dc:creator>Ali Hamza</dc:creator>
      <pubDate>Sat, 27 Jun 2026 13:22:36 +0000</pubDate>
      <link>https://dev.to/ali_hamza_589ec7b3eb6688d/day-83-of-learning-mern-stack-3njl</link>
      <guid>https://dev.to/ali_hamza_589ec7b3eb6688d/day-83-of-learning-mern-stack-3njl</guid>
      <description>&lt;p&gt;Hello Dev Community! 👋&lt;/p&gt;

&lt;p&gt;It is officially &lt;strong&gt;Day 83&lt;/strong&gt; of my 100-day full-stack and database engineering streak! Yesterday, I mastered DML mutations like UPDATE and DELETE to alter dataset rows. Today, I leveled up by stepping back into &lt;strong&gt;DDL (Data Definition Language)&lt;/strong&gt; to modify the actual structural blueprint of my tables using: &lt;strong&gt;ALTER TABLE and TRUNCATE TABLE!&lt;/strong&gt; 🛠️⚡&lt;/p&gt;

&lt;p&gt;In real-world production setups, business requirements change constantly. You might need to inject a new user status column, drop an obsolete configuration tracking row, or wipe staging test logs instantly. Today, I engineered those exact operations.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧠 Core Structural Mechanisms I Mastered on Day 83
&lt;/h2&gt;

&lt;p&gt;As written inside my query workflow configurations across &lt;strong&gt;"Screenshot (183).png"&lt;/strong&gt; and &lt;strong&gt;"Screenshot (184).png"&lt;/strong&gt;, I broken down the commands into explicit application blocks:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. The Multi-Tool of Database Schemas: &lt;code&gt;ALTER TABLE&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Instead of dropping a full table and losing existing production rows just to add or fix a property field, &lt;code&gt;ALTER&lt;/code&gt; allows real-time schema evolution:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;ADD COLUMN&lt;/code&gt;:&lt;/strong&gt; Injected brand new attribute constraints cleanly into live systems.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;DROP COLUMN&lt;/code&gt;:&lt;/strong&gt; Trimmed away unused memory fields to keep datasets optimized.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;MODIFY COLUMN&lt;/code&gt;:&lt;/strong&gt; Changed underlying data typings dynamically (e.g., shifting lengths of string column variables).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;RENAME COLUMN&lt;/code&gt;:&lt;/strong&gt; Rewrote structural column aliases for better domain design naming compliance.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. The High-Speed Reset Button: &lt;code&gt;TRUNCATE TABLE&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;One of the most important optimization concepts I learned today is the critical difference between &lt;code&gt;DELETE FROM&lt;/code&gt; and &lt;code&gt;TRUNCATE&lt;/code&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;DELETE FROM&lt;/code&gt; scans and deletes rows one-by-one sequentially, triggering heavy transactional database logs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;TRUNCATE&lt;/code&gt;&lt;/strong&gt; drops the underlying storage layout data and instantly re-creates a blank schema template. It wipes out all record collections in a fraction of a millisecond while preserving the original table columns intact!&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🛠️ Operational Look at the Day 83 Script Setup
&lt;/h2&gt;

&lt;p&gt;Here is a conceptual look at how I executed these dynamic schema evolutions inside my daily work session:&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
sql
-- Evolving table schemas fluidly without wiping structures
ALTER TABLE student_directory ADD COLUMN student_age INT NOT NULL DEFAULT 18;
ALTER TABLE student_directory MODIFY COLUMN student_name VARCHAR(50);
ALTER TABLE student_directory RENAME COLUMN marks TO exam_score;
ALTER TABLE student_directory DROP COLUMN legacy_address;

-- Instant operational garbage collection reset
TRUNCATE TABLE staging_logs;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>sql</category>
      <category>backend</category>
      <category>database</category>
      <category>softwareengineering</category>
    </item>
    <item>
      <title>Day 82 of Learning MERN Stack</title>
      <dc:creator>Ali Hamza</dc:creator>
      <pubDate>Sat, 27 Jun 2026 13:16:23 +0000</pubDate>
      <link>https://dev.to/ali_hamza_589ec7b3eb6688d/day-82-of-learning-mern-stack-1mc0</link>
      <guid>https://dev.to/ali_hamza_589ec7b3eb6688d/day-82-of-learning-mern-stack-1mc0</guid>
      <description>&lt;p&gt;Hello Dev Community! 👋&lt;/p&gt;

&lt;p&gt;It is officially &lt;strong&gt;Day 82&lt;/strong&gt; of my 100-day full-stack engineering run! Yesterday, I unpacked reporting pipelines using aggregation buckets. Today, I moved directly into the most critical data mutation phases of the relational database lifecycle: &lt;strong&gt;Mastering SQL UPDATE and DELETE Operations while understanding Safe Update Mode constraints!&lt;/strong&gt; 🔄💥&lt;/p&gt;

&lt;p&gt;When handling database mutations, writing reckless queries can result in catastrophic data loss. Today, I practiced how to precisely target row sets and manage internal database safeguard settings.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧠 Overcoming the Safe Mode Guardrail on Day 82
&lt;/h2&gt;

&lt;p&gt;As visible inside my daily workspace file in &lt;strong&gt;"Screenshot (182).png"&lt;/strong&gt;, line 5 tracks a unique configuration: &lt;code&gt;SET SQL_SAFE_UPDATES = 0;&lt;/code&gt;. &lt;/p&gt;

&lt;h3&gt;
  
  
  Why is this crucial?
&lt;/h3&gt;

&lt;p&gt;By default, many relational engines (like MySQL) activate a safety trigger called Safe Update Mode. This flag explicitly blocks any &lt;code&gt;UPDATE&lt;/code&gt; or &lt;code&gt;DELETE&lt;/code&gt; statements that do not specify a unique index key or a strict &lt;code&gt;WHERE&lt;/code&gt; filter. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;To unlock custom multi-row modifications, we temporarily toggle the variable state to &lt;code&gt;0&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Once unlocked, the database permits global mutations, which is why matching precise conditions becomes absolutely necessary!&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🛠️ Analyzing Today's Mutation Query Structures
&lt;/h2&gt;

&lt;p&gt;Looking closely at my script execution inside &lt;strong&gt;"Screenshot (182).png"&lt;/strong&gt;, I built precise logical constraints to alter existing datasets safely:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Conditional Value Switching
&lt;/h3&gt;

&lt;p&gt;I handled targeted character adjustments by shifting field states based on strict filtering attributes (visible in lines 7-9):&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
sql
UPDATE student 
SET grade = "O" 
WHERE grade = "A";
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>sql</category>
      <category>backend</category>
      <category>database</category>
      <category>programming</category>
    </item>
    <item>
      <title>Day 81 of Learning MERN Stack</title>
      <dc:creator>Ali Hamza</dc:creator>
      <pubDate>Sat, 27 Jun 2026 13:11:55 +0000</pubDate>
      <link>https://dev.to/ali_hamza_589ec7b3eb6688d/day-81-of-learning-mern-stack-3j6l</link>
      <guid>https://dev.to/ali_hamza_589ec7b3eb6688d/day-81-of-learning-mern-stack-3j6l</guid>
      <description>&lt;p&gt;Hello Dev Community! 👋&lt;/p&gt;

&lt;p&gt;It is officially &lt;strong&gt;Day 81&lt;/strong&gt; of my 100-day full-stack engineering run! Yesterday, I locked down linear logical operators to sweep across singular tabular records. Today, I stepped into the world of database analytics and reporting architectures by mastering: &lt;strong&gt;The GROUP BY Clause, the HAVING Clause, and Categorical Data Aggregations!&lt;/strong&gt; 📊📈&lt;/p&gt;

&lt;p&gt;When processing e-commerce telemetry (like counting orders per category) or handling payment services (like tracking successful transactions per payment channel), you cannot just inspect flat datasets. You must condense rows into meaningful summaries. Today, I built exactly that.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧠 Relational Insights: Organizing Sets on Day 81
&lt;/h2&gt;

&lt;p&gt;As visible in my workspace metrics inside &lt;strong&gt;"Screenshot (181).png"&lt;/strong&gt;, I configured a sample transaction model named &lt;code&gt;banking&lt;/code&gt; to parse multi-variable row groupings through a three-tier optimization layer:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Categorical Segments via &lt;code&gt;GROUP BY&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Instead of aggregating the entire column into a single output, &lt;code&gt;GROUP BY&lt;/code&gt; acts like a bucket system. Grouping by &lt;code&gt;mode&lt;/code&gt; or &lt;code&gt;city&lt;/code&gt; automatically splits matching row types and executes aggregate math natively inside independent categories (e.g., counting users per specific transaction channel).&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Multi-Tier Sorting Layer (&lt;code&gt;ORDER BY&lt;/code&gt; with Aggregates)
&lt;/h3&gt;

&lt;p&gt;I combined categorization with metric sequencing arrays (visible on line 24 of &lt;strong&gt;"Screenshot (181).png"&lt;/strong&gt;). By structuring &lt;code&gt;GROUP BY city ORDER BY count(customer) ASC;&lt;/code&gt;, the system segments target metrics first and seamlessly sorts the summarized locations from lowest traffic density to highest.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Aggregation Filter Constraints (&lt;code&gt;HAVING&lt;/code&gt; Clause)
&lt;/h3&gt;

&lt;p&gt;One of the most critical structural paradigms I learned today: &lt;strong&gt;The standard &lt;code&gt;WHERE&lt;/code&gt; clause cannot filter aggregate functions.&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;WHERE&lt;/code&gt; evaluates records &lt;em&gt;before&lt;/em&gt; groupings are formed.&lt;/li&gt;
&lt;li&gt;To filter summarized buckets (e.g., retrieving payment channels that processed 3 or more transactions), we utilize the &lt;strong&gt;&lt;code&gt;HAVING&lt;/code&gt;&lt;/strong&gt; clause:&lt;/li&gt;
&lt;/ul&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
sql
SELECT mode, count(customer) 
FROM banking 
GROUP BY mode 
HAVING count(customer) &amp;gt;= 3;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>sql</category>
      <category>groupby</category>
      <category>database</category>
      <category>programming</category>
    </item>
    <item>
      <title>Day 80 of Learning MERN Stack</title>
      <dc:creator>Ali Hamza</dc:creator>
      <pubDate>Sat, 27 Jun 2026 13:07:16 +0000</pubDate>
      <link>https://dev.to/ali_hamza_589ec7b3eb6688d/day-80-of-learning-mern-stack-17ie</link>
      <guid>https://dev.to/ali_hamza_589ec7b3eb6688d/day-80-of-learning-mern-stack-17ie</guid>
      <description>&lt;p&gt;Hello Dev Community! 👋&lt;/p&gt;

&lt;p&gt;It is officially &lt;strong&gt;Day 80&lt;/strong&gt; of my 100-day full-stack and database engineering streak! 🎯 I have officially crossed 80% of this intense learning run. Yesterday, I focused on structural table checks and aggregation functions. Today, I dove deep into the logical core of database filtering by mastering: &lt;strong&gt;SQL Logical Operators (&lt;code&gt;AND&lt;/code&gt;, &lt;code&gt;OR&lt;/code&gt;, &lt;code&gt;NOT&lt;/code&gt;, &lt;code&gt;IN&lt;/code&gt;, &lt;code&gt;BETWEEN&lt;/code&gt;, &lt;code&gt;LIKE&lt;/code&gt;)!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When users search or apply multiple filters on a frontend application—like sorting clothes on an e-commerce platform or picking movie genres on a media streaming service—the backend relies entirely on these operators to scan massive tabular datasets efficiently.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧠 Deep Dive: The Logic Gates of SQL
&lt;/h2&gt;

&lt;p&gt;Today, I built and verified complex query matrices to understand exactly how the SQL engine processes multi-conditional statements:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Intersecting &amp;amp; Alternating Conditions (&lt;code&gt;AND&lt;/code&gt;, &lt;code&gt;OR&lt;/code&gt;, &lt;code&gt;NOT&lt;/code&gt;)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;AND&lt;/code&gt;:&lt;/strong&gt; Strict matching. Evaluates to true only if &lt;strong&gt;all&lt;/strong&gt; wrapped conditions pass.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;OR&lt;/code&gt;:&lt;/strong&gt; Flexible matching. Returns records if &lt;strong&gt;any single&lt;/strong&gt; independent condition is met.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;NOT&lt;/code&gt;:&lt;/strong&gt; Negation guard. Reverses the logic state, pulling rows that explicitly do &lt;em&gt;not&lt;/em&gt; match the given parameter.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Set Matching &amp;amp; Range Boundaries (&lt;code&gt;IN&lt;/code&gt;, &lt;code&gt;BETWEEN&lt;/code&gt;)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;IN&lt;/code&gt;:&lt;/strong&gt; Replaces bulky, repetitive &lt;code&gt;OR&lt;/code&gt; chains. It lets me pass an array group (e.g., &lt;code&gt;WHERE city IN ('Lahore', 'Karachi')&lt;/code&gt;) to scan categorical subsets instantly.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;BETWEEN&lt;/code&gt;:&lt;/strong&gt; Streamlines numerical and date range boundaries. Instead of writing &lt;code&gt;&amp;gt;= 30 AND &amp;lt;= 50&lt;/code&gt;, using &lt;code&gt;BETWEEN 30 AND 50&lt;/code&gt; makes the query incredibly clean and readable.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Advanced Pattern Matching (&lt;code&gt;LIKE&lt;/code&gt; &amp;amp; Wildcards)
&lt;/h3&gt;

&lt;p&gt;The absolute game-changer for search functionalities! By pairing &lt;code&gt;LIKE&lt;/code&gt; with wildcards (&lt;code&gt;%&lt;/code&gt; and &lt;code&gt;_&lt;/code&gt;), I can run fuzzy text pattern matching:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;LIKE 'A%'&lt;/code&gt; — Grabs any string records starting with the letter "A".&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;LIKE '%m'&lt;/code&gt; — Targets strings ending with the letter "m".&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;LIKE '%ali%'&lt;/code&gt; — Scans for any strings containing the substring "ali" anywhere inside the column value.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🛠️ Operational Look at the Day 80 Script Architecture
&lt;/h2&gt;

&lt;p&gt;Here is how I synthesized these logical blocks into real-world relational operations:&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
sql
-- Combining Range parameters with Category sets
SELECT name, age, city 
FROM student 
WHERE (age BETWEEN 20 AND 35) AND city IN ('Karachi', 'Lahore', 'Islamabad');

-- Running negation and search wildcards simultaneously
SELECT * 
FROM student 
WHERE city NOT IN ('Faisalabad') AND name LIKE 'A%';
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>sql</category>
      <category>backend</category>
      <category>database</category>
      <category>programming</category>
    </item>
    <item>
      <title>Day 79 of Learning MERN Stack</title>
      <dc:creator>Ali Hamza</dc:creator>
      <pubDate>Sat, 27 Jun 2026 12:55:15 +0000</pubDate>
      <link>https://dev.to/ali_hamza_589ec7b3eb6688d/day-79-of-learning-mern-stack-1831</link>
      <guid>https://dev.to/ali_hamza_589ec7b3eb6688d/day-79-of-learning-mern-stack-1831</guid>
      <description>&lt;p&gt;Hello Dev Community! 👋&lt;/p&gt;

&lt;p&gt;It is officially &lt;strong&gt;Day 79&lt;/strong&gt; of my 100-day full-stack and database engineering streak! Yesterday, I locked down structural table relationships using primary and foreign keys. Today, I shifted focus to internal data integrity, custom conditional filtering, and database analytics by mastering: &lt;strong&gt;CHECK Constraints, the WHERE Clause, Comparison Operators, and Aggregation Functions!&lt;/strong&gt; 📊🔥&lt;/p&gt;

&lt;p&gt;To build truly resilient backend systems, you cannot just fetch raw data pools blindly; you must compute metrics and enforce business rules straight inside your storage engine. Today, I did exactly that!&lt;/p&gt;




&lt;h2&gt;
  
  
  🧠 The 4 Pillars I Coded on Day 79
&lt;/h2&gt;

&lt;p&gt;As showcased inside my query scripts across &lt;strong&gt;"Screenshot (178).png"&lt;/strong&gt; and &lt;strong&gt;"Screenshot (180).png"&lt;/strong&gt;, today's execution upgrades the database layer with major capabilities:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Defensive Data Guardrails (&lt;code&gt;CHECK&lt;/code&gt; Constraint)
&lt;/h3&gt;

&lt;p&gt;Instead of relying strictly on backend or frontend validation logic, I implemented structural rule enforcement directly into the schema. By adding &lt;code&gt;CHECK (age &amp;gt;= 18)&lt;/code&gt;, the database instantly drops any rogue insert queries attempting to write underage data points into the tables.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Granular Selection Logic (&lt;code&gt;WHERE&lt;/code&gt; &amp;amp; Comparison Operators)
&lt;/h3&gt;

&lt;p&gt;I explored the mechanics of data targeting using the &lt;code&gt;WHERE&lt;/code&gt; clause matched with structural operators (&lt;code&gt;&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;&lt;/code&gt;, &lt;code&gt;=&lt;/code&gt;, &lt;code&gt;!=&lt;/code&gt;, &lt;code&gt;AND&lt;/code&gt;, &lt;code&gt;OR&lt;/code&gt;). This allows me to segment and slice tabular rows based on multiple intersecting conditions (e.g., pulling profiles with specific salaries or localized age metrics).&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Native Data Summary Computations (Aggregation Functions)
&lt;/h3&gt;

&lt;p&gt;As written inside my testing logs in &lt;strong&gt;"Screenshot (180).png"&lt;/strong&gt;, I stopped pulling large data arrays to process arithmetic inside JavaScript arrays. Instead, I let the database optimize computations natively using SQL's core mathematical aggregators:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;COUNT()&lt;/code&gt; — Tracking the exact frequency volume of matching rows.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;SUM()&lt;/code&gt; / &lt;code&gt;AVG()&lt;/code&gt; — Calculating automated balance sheets and statistical medians.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;MIN()&lt;/code&gt; / &lt;code&gt;MAX()&lt;/code&gt; — Instantly auditing boundaries across financial or numerical columns.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🛠️ Operational Look at the Daily Query Architecture
&lt;/h2&gt;

&lt;p&gt;Here is a conceptual view of how these independent features work together inside a unified structural database context:&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
sql
-- Enforcing strict column rule validation
CREATE TABLE user_registry (
    id INT PRIMARY KEY,
    name VARCHAR(50),
    age INT,
    salary INT,
    CONSTRAINT chk_user_age CHECK (age &amp;gt;= 18)
);

-- Advanced conditional rows query extraction
SELECT name, salary 
FROM user_registry 
WHERE age &amp;gt; 21 AND salary &amp;gt;= 35000;

-- Running real-time internal analytics queries
SELECT 
    COUNT(*) AS total_staff,
    AVG(salary) AS median_payout,
    MAX(salary) AS peak_earnings
FROM user_registry;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>sql</category>
      <category>backend</category>
      <category>database</category>
      <category>dataanalytics</category>
    </item>
    <item>
      <title>Day 78 of Learning MERN Stack</title>
      <dc:creator>Ali Hamza</dc:creator>
      <pubDate>Sat, 27 Jun 2026 12:38:39 +0000</pubDate>
      <link>https://dev.to/ali_hamza_589ec7b3eb6688d/day-78-of-learning-mern-stack-pjf</link>
      <guid>https://dev.to/ali_hamza_589ec7b3eb6688d/day-78-of-learning-mern-stack-pjf</guid>
      <description>&lt;p&gt;Hello Dev Community! 👋&lt;/p&gt;

&lt;p&gt;It is officially &lt;strong&gt;Day 78&lt;/strong&gt; of my 100-day full-stack engineering run! Over the past two days, I explored isolation schemas in SQL. Today, I stepped into the absolute core of Relational Database Management Systems (RDBMS): &lt;strong&gt;Wiring related data models together using Primary Keys, Foreign Keys, and Advanced Cascading Rule Triggers!&lt;/strong&gt; 🔗📊&lt;/p&gt;

&lt;p&gt;If tables cannot safely talk to each other without corrupting references, a relational backend fails. Today, I engineered an automated constraint mechanism to solve exactly that.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧠 The Core Paradigms I Unpacked Today
&lt;/h2&gt;

&lt;p&gt;As illustrated in my structural script file inside &lt;strong&gt;"image_7db183.png"&lt;/strong&gt;, table links require two fundamental identifiers to maintain absolute validity:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Primary Key (PK):&lt;/strong&gt; A strictly unique constraint mapped within a table (e.g., &lt;code&gt;id INT PRIMARY KEY&lt;/code&gt; inside my department chart) that ensures no record rows are ever duplicated or recorded as &lt;code&gt;NULL&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Foreign Key (FK):&lt;/strong&gt; A relational pointer placed inside a secondary table (&lt;code&gt;teacher&lt;/code&gt;) that establishes an explicit link referencing the Primary Key column of the master data source (&lt;code&gt;dpt&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🛠️ Deep Dive: The Power of Cascading Triggers
&lt;/h2&gt;

&lt;p&gt;A common backend challenge arises when data mutations occur on primary models: &lt;em&gt;What happens to a teacher's profile if their department's ID gets updated or completely deleted from the database?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;By looking at my query code layout inside &lt;strong&gt;"image_7db183.png"&lt;/strong&gt;, I programmatically integrated a self-healing automation block:&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
sql
FOREIGN KEY (dpt_id) REFERENCES dpt(id)
ON UPDATE CASCADE
ON DELETE CASCADE
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>sql</category>
      <category>backend</category>
      <category>database</category>
      <category>architecture</category>
    </item>
    <item>
      <title>Day 77 of Learning MERN Stack</title>
      <dc:creator>Ali Hamza</dc:creator>
      <pubDate>Sat, 27 Jun 2026 12:30:26 +0000</pubDate>
      <link>https://dev.to/ali_hamza_589ec7b3eb6688d/day-77-of-learning-mern-stack-2g8</link>
      <guid>https://dev.to/ali_hamza_589ec7b3eb6688d/day-77-of-learning-mern-stack-2g8</guid>
      <description>&lt;p&gt;Hello Dev Community! 👋&lt;/p&gt;

&lt;p&gt;It is officially &lt;strong&gt;Day 77&lt;/strong&gt; of my 100-day full-stack engineering streak! Yesterday, I opened my doors to Relational Database Systems (SQL). Today, I focused heavily on understanding structural management, schema safety bounds, and how to safely run destructive operations without crashing a production environment. ⚠️💥&lt;/p&gt;

&lt;p&gt;When writing automated setup or teardown scripts, running blind drop commands is a massive anti-pattern. Today, I fixed exactly that.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧠 The Hazard of Blind Drops
&lt;/h2&gt;

&lt;p&gt;As visible in my workspace update inside &lt;strong&gt;"Screenshot (175).png"&lt;/strong&gt;, line 20 tracks a basic cleanup statement: &lt;code&gt;DROP database xyz_company;&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;While this query works perfectly fine if the targeted cluster is actively running on the engine, it poses an architectural risk:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If the database does not exist (or was already deleted by a parallel process), SQL triggers an explicit runtime exception.&lt;/li&gt;
&lt;li&gt;If this happens inside a production deployment migration runner or an integrated Node.js script, the whole execution loop crashes completely.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🛠️ The Solution: Bulletproof Dropping Layout
&lt;/h2&gt;

&lt;p&gt;To keep code blocks completely resilient and fault-tolerant, SQL provides a conditional evaluation guard parameter:&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
sql
DROP DATABASE IF EXISTS xyz_company;-- Safe Initialization Setup
CREATE DATABASE IF NOT EXISTS XYZ_Company;
USE XYZ_Company;

-- Structural Schema Mapping
CREATE TABLE employee_info (
    id INT PRIMARY KEY,
    name VARCHAR(30),
    SALARY INT
);

-- Transactional Record Ingestion
INSERT INTO employee_info (id, name, SALARY)
VALUES
(1, "Bob", 25000),
(2, "Bilal", 30000),
(3, "Ali", 40000);

-- Query Execution Read
SELECT * FROM employee_info;

-- Bulletproof Destructive Teardown Trigger
DROP DATABASE IF EXISTS xyz_company;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>sql</category>
      <category>backend</category>
      <category>database</category>
      <category>programming</category>
    </item>
    <item>
      <title>Day 76 of Learning MERN Stack</title>
      <dc:creator>Ali Hamza</dc:creator>
      <pubDate>Sat, 27 Jun 2026 12:23:52 +0000</pubDate>
      <link>https://dev.to/ali_hamza_589ec7b3eb6688d/day-76-of-learning-mern-stack-4efm</link>
      <guid>https://dev.to/ali_hamza_589ec7b3eb6688d/day-76-of-learning-mern-stack-4efm</guid>
      <description>&lt;p&gt;Hello Dev Community! 👋&lt;/p&gt;

&lt;p&gt;It is officially &lt;strong&gt;Day 76&lt;/strong&gt; of my 100-day full-stack engineering streak! For the past several weeks, I have been heavily immersed in NoSQL databases, using MongoDB documents to back my full-stack clones. Today, I decided to broaden my database engineering skill set by taking a deep dive into &lt;strong&gt;Relational Databases (SQL)&lt;/strong&gt;! 📊⚡&lt;/p&gt;

&lt;p&gt;Stepping out of flexible JSON-like structures and adjusting to rigid, highly optimized tables is an essential step for any well-rounded backend developer.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧠 What I Learned Today: SQL vs. NoSQL
&lt;/h2&gt;

&lt;p&gt;Before writing code, I mapped out the core architectural differences between the two paradigms:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;NoSQL (e.g., MongoDB)&lt;/th&gt;
&lt;th&gt;SQL (e.g., MySQL / PostgreSQL)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Data Model&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Flexible, schema-less collections &amp;amp; documents.&lt;/td&gt;
&lt;td&gt;Strict table-based structures with rows &amp;amp; columns.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Relationships&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Typically nested embedded sub-documents or references.&lt;/td&gt;
&lt;td&gt;Explicit Relational Mapping via Primary &amp;amp; Foreign Keys.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Scaling&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Horizontally scalable (distributed sharding across nodes).&lt;/td&gt;
&lt;td&gt;Vertically scalable (requires increasing horsepower on one machine).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Transactions&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Great for high-write, unstructured or dynamic data shapes.&lt;/td&gt;
&lt;td&gt;Strict ACID compliance, making it excellent for financial or tabular data.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  🛠️ Analyzing My First Query Block on Day 76
&lt;/h2&gt;

&lt;p&gt;As showcased in &lt;strong&gt;"Screenshot (174).png"&lt;/strong&gt;, I configured an entire relational lifecycle inside an independent database script:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Database Provisioning &amp;amp; Focus Selection
&lt;/h3&gt;

&lt;p&gt;I initialized the data cluster safely using standard syntax constraints to ensure execution safety and loaded the working context into the active engine:&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
sql
CREATE DATABASE IF NOT EXISTS XYZ_Company;
USE XYZ_Company;CREATE TABLE employee_info (
    id INT PRIMARY KEY,
    name VARCHAR(30),
    SALARY INT
);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>sql</category>
      <category>nosql</category>
      <category>database</category>
      <category>backend</category>
    </item>
    <item>
      <title>Day 75 of Learning MERN Stack</title>
      <dc:creator>Ali Hamza</dc:creator>
      <pubDate>Wed, 24 Jun 2026 10:00:13 +0000</pubDate>
      <link>https://dev.to/ali_hamza_589ec7b3eb6688d/day-75-of-learning-mern-stack-af1</link>
      <guid>https://dev.to/ali_hamza_589ec7b3eb6688d/day-75-of-learning-mern-stack-af1</guid>
      <description>&lt;p&gt;Hello Dev Community! 👋&lt;/p&gt;

&lt;p&gt;It is officially &lt;strong&gt;Day 75&lt;/strong&gt; of my 100-day full-stack engineering run! Following yesterday's successful user registration milestone, today I locked down the corresponding side of user identity access: &lt;strong&gt;Engineering a High-Fidelity Login Interface and Storing Session States Directly Inside MongoDB!&lt;/strong&gt; 🔒⚡&lt;/p&gt;

&lt;p&gt;By default, Express sessions store authentication cookies in local server memory. If the server scales or restarts, users get instantly booted out. Today, I implemented an enterprise-grade session persistence layer to fix exactly that!&lt;/p&gt;




&lt;h2&gt;
  
  
  🧠 Key Architecture Breakthroughs on Day 75
&lt;/h2&gt;

&lt;p&gt;As displayed on my interface dashboard in &lt;strong&gt;"Screenshot (172).png"&lt;/strong&gt;, the secure login framework integrates smooth client layouts with state persistence:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. High-Fidelity "Welcome Back" Authentication Card
&lt;/h3&gt;

&lt;p&gt;I kept MFLIX’s signature premium cinematic theme intact to build the minimalist authentication window visible in &lt;strong&gt;"Screenshot (172).png"&lt;/strong&gt;. It handles basic credential collections:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Structured Input Fields:&lt;/strong&gt; Inline email symbols and clean placeholder attributes with strict focus outlines.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Navigation Cross-Links:&lt;/strong&gt; Added dynamic reference anchors to transition fluidly between &lt;code&gt;/signup&lt;/code&gt; and &lt;code&gt;/login&lt;/code&gt; states.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Verified Inbound Authentication Routing (&lt;code&gt;/login&lt;/code&gt;)
&lt;/h3&gt;

&lt;p&gt;When the form dispatches credentials via a secure &lt;code&gt;POST&lt;/code&gt; mechanism:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The backend queries our MongoDB cluster using the unique &lt;code&gt;Email Address&lt;/code&gt; parameter.&lt;/li&gt;
&lt;li&gt;If a profile records alignment, it verifies password integrity. If the check passes, the authenticated instance triggers initialization.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Database-Backed Session Persistence
&lt;/h3&gt;

&lt;p&gt;Instead of letting tracking tokens drift in RAM, I connected a native MongoDB session driver:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Validated credentials automatically provision a tracking payload.&lt;/li&gt;
&lt;li&gt;This session document is serialized and written straight into a dedicated collection in MongoDB.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Major Benefit:&lt;/strong&gt; Our server can crash, restart, or update in production, and users will remain logged in completely uninterrupted!&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🛠️ Conceptualizing the MongoDB Session Store Architecture
&lt;/h2&gt;

&lt;p&gt;Here is the setup configuration I wired into the main server lifecycle to achieve persistent user states:&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
javascript
const express = require('express');
const session = require('express-session');
const MongoStore = require('connect-mongo'); // Session to DB connector
const app = express();

// Configuring persistent cookie sessions over MongoDB store
app.use(session({
    secret: 'mflix_cinematic_encryption_key_75',
    resave: false,
    saveUninitialized: false,
    store: MongoStore.create({
        mongoUrl: 'mongodb://localhost:27017/mflix_db',
        ttl: 14 * 24 * 60 * 60 // Sessions expire automatically after 14 days
    }),
    cookie: { maxAge: 1000 * 60 * 60 * 24 } // 24-hour client cookie life
}));
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>webdev</category>
      <category>node</category>
      <category>mongodb</category>
      <category>authentication</category>
    </item>
    <item>
      <title>Day 74 of Leaning MERN Stack</title>
      <dc:creator>Ali Hamza</dc:creator>
      <pubDate>Wed, 24 Jun 2026 09:55:16 +0000</pubDate>
      <link>https://dev.to/ali_hamza_589ec7b3eb6688d/day-74-of-leaning-mern-stack-2fg1</link>
      <guid>https://dev.to/ali_hamza_589ec7b3eb6688d/day-74-of-leaning-mern-stack-2fg1</guid>
      <description>&lt;p&gt;Hello Dev Community! 👋&lt;/p&gt;

&lt;p&gt;It is officially &lt;strong&gt;Day 74&lt;/strong&gt; of my 100-day full-stack engineering run! After establishing the semantic movie landing grid layouts yesterday, today I expanded project &lt;strong&gt;MFLIX&lt;/strong&gt; into deep user access management: &lt;strong&gt;Implementing a Production-Ready Sign-Up Endpoint and Wiring Inbound Data Collection straight to MongoDB!&lt;/strong&gt; 👤⚡&lt;/p&gt;

&lt;p&gt;Authentication is the gateway to tracking active subscriptions, bookmark list histories, and stream logs. Today, I engineered that baseline entry loop.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧠 Key Development Breakthroughs on Day 74
&lt;/h2&gt;

&lt;p&gt;As displayed on my interface instance in &lt;strong&gt;"Screenshot (173).png"&lt;/strong&gt;, the identity registration phase brings together secure parameters and data integrity:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. High-Fidelity Thematic Sign-Up Form
&lt;/h3&gt;

&lt;p&gt;I structured a unified layout card matching MFLIX’s signature cinematic dark background palette. The form cleanly isolates vital onboarding properties:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Input Scopes:&lt;/strong&gt; Capturing &lt;code&gt;Full Name&lt;/code&gt;, unique &lt;code&gt;Email Address&lt;/code&gt;, and explicit &lt;code&gt;Password&lt;/code&gt; matching configurations.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Micro-UI Styling:&lt;/strong&gt; Integrated descriptive system icon indicators inside each input container with explicit highlight rings to guarantee accessibility.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Form Payload Ingestion &amp;amp; Backend Controller (&lt;code&gt;/signup&lt;/code&gt;)
&lt;/h3&gt;

&lt;p&gt;When the user triggers the primary &lt;code&gt;CREATE ACCOUNT&lt;/code&gt; submit element:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The backend routing pipeline fires a &lt;code&gt;POST&lt;/code&gt; handler, parsing incoming text string variables securely via &lt;code&gt;req.body&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Validates field integrity (ensuring incoming records map clean email structures and that structural password pairings align perfectly).&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Native MongoDB Persistence Layer
&lt;/h3&gt;

&lt;p&gt;Once the data payload clears validation checks, the engine instantiates a new database user record. The object parameters map to our underlying database schema cluster, establishing a persistent profile entry ready for immediate active session management!&lt;/p&gt;




&lt;h2&gt;
  
  
  🛠️ Conceptualizing the Backend Sign-Up Router
&lt;/h2&gt;

&lt;p&gt;Here is the architectural layout of the transactional user enrollment pipeline using Express endpoints and database hooks:&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
javascript
const express = require('express');
const router = express.Router();
const User = require('../models/User'); // Database User Matrix Hook

// Handling Inbound User Creation Form Submissions
router.post('/signup', async (req, res) =&amp;gt; {
    const { name, email, password, confirmPassword } = req.body;

    try {
        // Enforcing core confirmation parameters before database mutation
        if (password !== confirmPassword) {
            return res.status(400).render('signup', { error: 'Passwords do not match!' });
        }

        // Provisioning the user object document onto MongoDB
        const newUser = new User({ name, email, password });
        await newUser.save();

        console.log(`[Database Log] New MFLIX User Provisioned: ${email}`);
        res.redirect('/login');
    } catch (err) {
        console.error("Registration error:", err);
        res.status(500).send("Internal Server Exception");
    }
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>webdev</category>
      <category>node</category>
      <category>mongodb</category>
      <category>authentication</category>
    </item>
    <item>
      <title>Day 73 of Learning MERN Stack</title>
      <dc:creator>Ali Hamza</dc:creator>
      <pubDate>Wed, 24 Jun 2026 09:45:06 +0000</pubDate>
      <link>https://dev.to/ali_hamza_589ec7b3eb6688d/day-73-of-learning-mern-stack-4n0e</link>
      <guid>https://dev.to/ali_hamza_589ec7b3eb6688d/day-73-of-learning-mern-stack-4n0e</guid>
      <description>&lt;p&gt;Hello Dev Community! 👋&lt;/p&gt;

&lt;p&gt;It is officially &lt;strong&gt;Day 73&lt;/strong&gt; of my 100-day full-stack engineering journey! After wrapping up an automated file-converter microservice yesterday, today I kicked off a brand new enterprise-grade application layout: &lt;strong&gt;MFLIX, a comprehensive Movie Streaming and Discovery Clone!&lt;/strong&gt; 🎬&lt;/p&gt;

&lt;p&gt;Today was all about setting up the project baseline, defining the styling configuration, and building out a highly immersive, production-ready landing interface.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧠 Key Development Milestones on Day 73
&lt;/h2&gt;

&lt;p&gt;As showcased in my interface output in &lt;strong&gt;"Screenshot (169).jpg"&lt;/strong&gt;, the homepage brings together custom server-side rendering and utility-first styling:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Unified Streaming Vibe via Tailwind CSS
&lt;/h3&gt;

&lt;p&gt;I configured a deep charcoal/dark background base coupled with vibrant accent elements (like the signature crimson-red search and interactive triggers) to mimic a premium theater experience. &lt;/p&gt;

&lt;h3&gt;
  
  
  2. Semantic Movie Card Grids &amp;amp; Micro-Interactions
&lt;/h3&gt;

&lt;p&gt;Using EJS data loops, the home page cleanly renders movie listing cards with essential metadata:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Floating Badges:&lt;/strong&gt; Implemented absolute positioning to lay down contextual star ratings (e.g., ⭐ 7.8) cleanly over the asset poster.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hover State Reveals:&lt;/strong&gt; Programmed smooth CSS transition states so that hovering over a movie tile reveals an interactive structural utility button labeled &lt;code&gt;View Details&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Year Stamp Tracking:&lt;/strong&gt; Embedded subtle metadata positioning inside the card footers to showcase historical context (e.g., 1932, 1936) elegantly.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Dynamic Relational Routing Foundation
&lt;/h3&gt;

&lt;p&gt;If you look closely at the active action paths in &lt;strong&gt;"Screenshot (169).jpg"&lt;/strong&gt;, every single tile points directly to its unique database mapping index (&lt;code&gt;/moviedetails/:id&lt;/code&gt;). The structural layout is fully ready to communicate with MongoDB data layers!&lt;/p&gt;




&lt;h2&gt;
  
  
  🛠️ A Conceptual View of the EJS Render Loop
&lt;/h2&gt;

&lt;p&gt;Here is how I structured the presentation layer inside the main home template using partial injection and Tailwind arrays:&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
html
&amp;lt;main class="grid grid-cols-1 md:grid-cols-3 gap-6 p-6 bg-slate-900 text-white"&amp;gt;
    &amp;lt;% movies.forEach(movie =&amp;gt; { %&amp;gt;
        &amp;lt;div class="relative group rounded-xl overflow-hidden bg-slate-800 shadow-lg"&amp;gt;
            &amp;lt;!-- Absolute Floating Rating --&amp;gt;
            &amp;lt;span class="absolute top-3 left-3 bg-black/60 px-2 py-1 text-yellow-400 rounded text-sm"&amp;gt;
                ★ &amp;lt;%= movie.rating %&amp;gt;
            &amp;lt;/span&amp;gt;

            &amp;lt;img src="&amp;lt;%= movie.poster %&amp;gt;" alt="Poster" class="w-full h-96 object-cover"&amp;gt;

            &amp;lt;!-- Hover View Details Overlay --&amp;gt;
            &amp;lt;div class="absolute inset-0 bg-black/80 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity"&amp;gt;
                &amp;lt;a href="/moviedetails/&amp;lt;%= movie._id %&amp;gt;" class="bg-red-600 text-white px-6 py-2 rounded-full font-semibold"&amp;gt;
                    View Details
                &amp;lt;/a&amp;gt;
            &amp;lt;/div&amp;gt;
        &amp;lt;/div&amp;gt;
    &amp;lt;% }) %&amp;gt;
&amp;lt;/main&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>webdev</category>
      <category>tailwindcss</category>
      <category>node</category>
      <category>ejs</category>
    </item>
    <item>
      <title>Day 72 of Learning MERN Stack</title>
      <dc:creator>Ali Hamza</dc:creator>
      <pubDate>Tue, 23 Jun 2026 07:21:58 +0000</pubDate>
      <link>https://dev.to/ali_hamza_589ec7b3eb6688d/day-72-of-learning-mern-stack-5a3f</link>
      <guid>https://dev.to/ali_hamza_589ec7b3eb6688d/day-72-of-learning-mern-stack-5a3f</guid>
      <description>&lt;p&gt;Hello Dev Community! 👋&lt;/p&gt;

&lt;p&gt;It is officially &lt;strong&gt;Day 72&lt;/strong&gt; of my 100-day full-stack engineering streak! Today, I took a small creative detour from my marketplace flows to build an incredibly practical standalone backend microservice utility: &lt;strong&gt;A High-Performance Image Format Converter integrated with Automated File Lifecycle Garbage Collection via Node-Cron!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When dealing with user-driven media manipulation tools, leaving converted files permanently on the local disk is a recipe for a crashed server. Today, I solved that infrastructure problem by implementing scheduled automation hooks.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧠 Key Architecture Breakthroughs on Day 72
&lt;/h2&gt;

&lt;p&gt;As shown in my UI dashboards across &lt;strong&gt;"Screenshot (166).jpg"&lt;/strong&gt; and &lt;strong&gt;"Screenshot (167).jpg"&lt;/strong&gt;, the tool provides an instant web-to-buffer conversion flow:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Multi-Format Interception Engine (&lt;code&gt;/convert&lt;/code&gt;)
&lt;/h3&gt;

&lt;p&gt;I designed a clean drag-and-drop frontend interface that allows users to upload any image format (PNG, JPG, WebP, SVG, AVIF) and specify their requested output target layout. The backend processes the incoming multipart stream, uses an image processing wrapper, and compiles the output into a downloadable file stream on the fly.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Automated Storage Recovery using &lt;code&gt;node-cron&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;The absolute highlight of today was configuring automated resource cleanup. To prevent our backend directory from accumulation bottlenecks, I setup a &lt;code&gt;node-cron&lt;/code&gt; task pattern:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Converted images are tracked with timestamps inside a temporary directory.&lt;/li&gt;
&lt;li&gt;A background cron scheduler executes periodically to audit the files.&lt;/li&gt;
&lt;li&gt;If a temporary asset has passed its expiry threshold, the engine automatically triggers &lt;code&gt;fs.unlink()&lt;/code&gt; to wipe the file from disk space safely.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🛠️ Conceptualizing the Cron-Based Storage Cleaner
&lt;/h2&gt;

&lt;p&gt;Here is a look at how I orchestrated the backend automated garbage collection routing loop to handle disk optimizations:&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
javascript
const cron = require('node-cron');
const fs = require('fs');
const path = require('path');

// Scheduling a routine cleanup job to run every hour to keep the server lightweight
cron.schedule('0 * * * *', () =&amp;gt; {
    const tempDir = path.join(__dirname, 'converted-uploads');

    fs.readdir(tempDir, (err, files) =&amp;gt; {
        if (err) return console.error("Cleanup path error:", err);

        files.forEach(file =&amp;gt; {
            const filePath = path.join(tempDir, file);
            // Dynamic check: Wiping files older than 15 minutes automatically
            fs.stat(filePath, (err, stats) =&amp;gt; {
                if (err) return;
                const now = Date.now();
                const fileAgeMins = (now - stats.mtimeMs) / 1000 / 60;

                if (fileAgeMins &amp;gt; 15) {
                    fs.unlink(filePath, (err) =&amp;gt; {
                        if (!err) console.log(`[Cron Log] Automatically Purged: ${file}`);
                    });
                }
            });
        });
    });
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>node</category>
      <category>express</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
