<?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: Tahsin Abrar</title>
    <description>The latest articles on Forem by Tahsin Abrar (@tahsin000).</description>
    <link>https://forem.com/tahsin000</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%2F1084553%2Fd57c59ef-8617-4868-a1e8-7fe07493b0be.png</url>
      <title>Forem: Tahsin Abrar</title>
      <link>https://forem.com/tahsin000</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/tahsin000"/>
    <language>en</language>
    <item>
      <title>Demystifying Linux: How GNU, Shells, and Terminals Actually Work Together</title>
      <dc:creator>Tahsin Abrar</dc:creator>
      <pubDate>Tue, 07 Apr 2026 10:09:39 +0000</pubDate>
      <link>https://forem.com/tahsin000/demystifying-linux-how-gnu-shells-and-terminals-actually-work-together-4975</link>
      <guid>https://forem.com/tahsin000/demystifying-linux-how-gnu-shells-and-terminals-actually-work-together-4975</guid>
      <description>&lt;p&gt;If you've been working with Linux for a while, you probably know that "Linux" technically just refers to the kernel. But a kernel alone is not enough to give you a working computer. To get a complete Operating System (what we call a Linux Distribution, like Ubuntu or Fedora), you need a lot of other moving parts.&lt;/p&gt;

&lt;p&gt;Today, we're going to peel back the layers of a Linux operating system. We'll look at where the tools we use every day actually come from, the difference between a terminal and a shell, and what happens behind the scenes when you type a simple command.&lt;/p&gt;

&lt;p&gt;Let's dive in!&lt;/p&gt;

&lt;h2&gt;
  
  
  The Origin Story: Enter Richard Stallman and GNU
&lt;/h2&gt;

&lt;p&gt;To understand how Linux works today, we have to travel back to 1983. Back then, an operating system called Unix was highly popular among universities and large companies. The problem? Unix was proprietary and expensive.&lt;/p&gt;

&lt;p&gt;A programmer named &lt;strong&gt;Richard Stallman&lt;/strong&gt; didn't like this. He believed software, especially operating systems, should be free and accessible to everyone. So, he started the &lt;strong&gt;Free Software Foundation (FSF)&lt;/strong&gt; and launched the &lt;strong&gt;GNU Project&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Fun fact: GNU is a recursive acronym that stands for "GNU's Not Unix!"&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Stallman's team began building free, open-source replacements for all the essential pieces of Unix. Their plan was to build everything needed for an OS, so that anyone students, devs, or companies could piece together a free operating system.&lt;/p&gt;

&lt;p&gt;If you use open-source tools today, you owe a huge "thank you" to Stallman and the FSF.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Essential GNU Toolkit
&lt;/h2&gt;

&lt;p&gt;So, what exactly did the GNU project build? They created a massive bundle of tools that bridge the gap between human developers and the kernel. Here are the heavy hitters:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. GCC (GNU Compiler Collection)
&lt;/h3&gt;

&lt;p&gt;If you've ever written a C program, you know you can't just run the raw text. You need to compile it into binary machine code that the computer understands. GCC is the legendary compiler that makes this happen. Without it, the open-source world as we know it wouldn't exist.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. glibc (GNU C Library)
&lt;/h3&gt;

&lt;p&gt;This one is fascinating. When you write a simple &lt;code&gt;printf("Hello World");&lt;/code&gt; in C, did you know that &lt;code&gt;printf&lt;/code&gt; isn't actually a native part of the C language?&lt;/p&gt;

&lt;p&gt;Native C handles things like &lt;code&gt;if/else' statements and&lt;/code&gt;for' loops. But interacting with hardware (like printing to a screen, allocating memory, or reading files) requires talking to the kernel. &lt;strong&gt;glibc&lt;/strong&gt; is the massive library that provides functions like &lt;code&gt;printf&lt;/code&gt;, &lt;code&gt;scanf&lt;/code&gt;, and &lt;code&gt;malloc&lt;/code&gt;. It acts as a translator, taking your code and making the complex "system calls" to the kernel on your behalf.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. GNU Coreutils
&lt;/h3&gt;

&lt;p&gt;This is the toolbox you use every single day. Have you ever typed &lt;code&gt;ls&lt;/code&gt;, &lt;code&gt;cd&lt;/code&gt;, &lt;code&gt;cat&lt;/code&gt;, &lt;code&gt;grep&lt;/code&gt;, &lt;code&gt;cp&lt;/code&gt;, or &lt;code&gt;rm&lt;/code&gt;?&lt;br&gt;
These aren't just random words; they are individual, standalone programs bundled together in what we call the &lt;strong&gt;GNU Core Utilities&lt;/strong&gt; (or Coreutils). They run in the "user space" and allow you to interact with your system.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Visual Layer: Desktop Environments (DE)
&lt;/h2&gt;

&lt;p&gt;Okay, so we have the kernel (the engine) and the GNU utilities (the steering wheel and pedals). But how do we actually see what we are doing?&lt;/p&gt;

&lt;p&gt;That's where &lt;strong&gt;Desktop Environments (DE)&lt;/strong&gt; come in. When you install an OS and see a taskbar, window frames, a file explorer, and icons, you are looking at the DE.&lt;/p&gt;

&lt;p&gt;Here are a few popular ones:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GNOME:&lt;/strong&gt; The default for Ubuntu, Fedora, and Debian. It's modern and beginner-friendly.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;KDE Plasma:&lt;/strong&gt; Popular on Arch and openSUSE. It's incredibly customizable.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Aqua:&lt;/strong&gt; The proprietary desktop environment used by Apple for macOS (which includes the Finder and the Dock).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The Desktop Environment is also responsible for giving you a &lt;strong&gt;Terminal&lt;/strong&gt;. On Ubuntu (GNOME), it's called GNOME Terminal. On KDE, it's called Konsole. The terminal is just a graphical window an interface that lets you type things. But it doesn't process the commands itself. For that, it needs a Shell.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Brains of the Operation: The Shell
&lt;/h2&gt;

&lt;p&gt;If the Terminal is just a blank window, the &lt;strong&gt;Shell&lt;/strong&gt; is the smart program running inside it.&lt;/p&gt;

&lt;p&gt;The Shell takes the text you type, interprets it, figures out what program you want to run (like an &lt;code&gt;ls&lt;/code&gt; command from the Coreutils), and hands that request over to the kernel. When the kernel is done, the Shell takes the output and prints it on your Terminal screen.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A Quick History of Shells:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;sh (Bourne Shell):&lt;/strong&gt; Created by Stephen Bourne at Bell Labs in 1977. The OG.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ksh (KornShell):&lt;/strong&gt; Created by David Korn in 1983, adding more features.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;bash (Bourne Again Shell):&lt;/strong&gt; The GNU project's free answer to the original Bourne shell. It became the default for almost all Linux distributions for decades.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;zsh (Z Shell):&lt;/strong&gt; A modern, highly customizable shell. If you use a modern Mac, &lt;code&gt;zsh&lt;/code&gt; is now the default&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>linux</category>
      <category>bash</category>
      <category>cli</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Stop Calling Docker a Tool: The Real Story Behind 'docker run hello-world'</title>
      <dc:creator>Tahsin Abrar</dc:creator>
      <pubDate>Mon, 06 Apr 2026 10:57:28 +0000</pubDate>
      <link>https://forem.com/tahsin000/docker-is-more-than-a-tool-understanding-the-docker-ecosystem-2ani</link>
      <guid>https://forem.com/tahsin000/docker-is-more-than-a-tool-understanding-the-docker-ecosystem-2ani</guid>
      <description>&lt;p&gt;Let’s get one thing straight right out of the gate: &lt;strong&gt;Docker is not just a tool.&lt;/strong&gt; It’s not just a simple application, and it’s certainly not just a piece of standalone software. &lt;/p&gt;

&lt;p&gt;If someone tells you Docker is just a software tool, you can confidently tell them they’ve been misled. &lt;/p&gt;

&lt;p&gt;So, what is it? &lt;strong&gt;Docker is a platform. It is an ecosystem.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To truly master Docker, you have to stop looking at it as a black box that magically runs your code, and start looking at it as a living, breathing ecosystem. Today, we are going to dive deep into how this ecosystem actually works.&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%2Fdm5elw8iopsn546ord13.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%2Fdm5elw8iopsn546ord13.png" alt=" " width="800" height="610"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Ecosystem Analogy
&lt;/h2&gt;

&lt;p&gt;Think about a biological ecosystem a food chain. An earthworm is eaten by a duck, the duck is caught by a snake, the snake is hunted by a mongoose, and the mongoose is swooped up by an eagle. &lt;/p&gt;

&lt;p&gt;For the ecosystem to function, every single piece of that chain has to exist and interact. Docker works exactly the same way. It is a chain of distinct technologies working together to create what we call the "Docker Platform."&lt;/p&gt;

&lt;p&gt;Before we look at the chain in action, let’s meet the main characters:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Docker Client (CLI):&lt;/strong&gt; The interface where you type your commands.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Docker Engine (dockerd):&lt;/strong&gt; The background daemon (the brain) that listens for API requests and manages Docker objects.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Docker Desktop:&lt;/strong&gt; The unsung hero for Mac and Windows users. It quietly creates a Linux Virtual Machine in the background so the Docker Engine has a Linux kernel to work with.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Docker Images:&lt;/strong&gt; Think of an image as a "screenshot" or a frozen snapshot of a container. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Docker Hub:&lt;/strong&gt; The massive, cloud-based database where all these images (like Ubuntu, Redis, Postgres, or Node) live.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Docker Compose:&lt;/strong&gt; (We’ll save this one for a future post, but just know it’s the orchestrator for multi-container setups!)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Deep Dive: What actually happens when you hit Enter?
&lt;/h2&gt;

&lt;p&gt;Most developers know how to type &lt;code&gt;docker run hello-world&lt;/code&gt;. But what happens in the milliseconds after you hit enter? Let’s connect the dots.&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%2F9ftk2isam7evu66e0yxr.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%2F9ftk2isam7evu66e0yxr.png" alt=" " width="800" height="591"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: The Request
&lt;/h3&gt;

&lt;p&gt;You type &lt;code&gt;docker run hello-world&lt;/code&gt; into your terminal. The &lt;strong&gt;Docker Client&lt;/strong&gt; catches this command and translates it into a REST API request. It sends this request to the &lt;strong&gt;Docker Engine&lt;/strong&gt; (specifically, the &lt;code&gt;dockerd&lt;/code&gt; daemon).&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Passing the Baton
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;dockerd&lt;/code&gt; is a busy manager. It receives your request and says, &lt;em&gt;"Hey, **containerd&lt;/em&gt;* (the high-level container runtime), handle this for me."*&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: The Cache Check
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;containerd&lt;/code&gt; acts like a smart librarian. First, it checks its local cache. It asks: &lt;em&gt;"Do we already have the &lt;code&gt;hello-world&lt;/code&gt; image downloaded on this computer?"&lt;/em&gt; If this is your first time running it, the answer is no. &lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4: The Download (Pulling)
&lt;/h3&gt;

&lt;p&gt;Because the image isn't stored locally, &lt;code&gt;containerd&lt;/code&gt; reaches out to &lt;strong&gt;Docker Hub&lt;/strong&gt;. It requests the &lt;code&gt;hello-world&lt;/code&gt; image, pulls it down, and caches it locally so it won't have to download it again next time. &lt;/p&gt;

&lt;h3&gt;
  
  
  Step 5: The Build
&lt;/h3&gt;

&lt;p&gt;Now that it has the image, &lt;code&gt;containerd&lt;/code&gt; hands it over to &lt;strong&gt;runc&lt;/strong&gt; (the low-level runtime) and says, &lt;em&gt;"Execute this."&lt;/em&gt; ### Step 6: The Kernel Magic&lt;br&gt;
Here is where the real magic happens. &lt;code&gt;runc&lt;/code&gt; talks directly to the &lt;strong&gt;Linux Kernel&lt;/strong&gt; (which, if you are on Mac/Windows, is provided by Docker Desktop). &lt;/p&gt;

&lt;p&gt;It asks the kernel for two very specific things:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Namespaces:&lt;/strong&gt; To create an isolated "alternate reality" for the container so it can't see what else is running on your machine.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Control Groups (cgroups):&lt;/strong&gt; To set strict limits on how much RAM, CPU, and Hard Drive space this specific container is allowed to use.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The kernel agrees, builds this isolated little world, and the container is born!&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 7: The Response
&lt;/h3&gt;

&lt;p&gt;A new process starts inside that container, executes the &lt;code&gt;hello-world&lt;/code&gt; script, and sends a success message all the way back up the chain from the daemon, to the CLI, and finally onto your screen.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What happens if you run it a second time?&lt;/strong&gt;&lt;br&gt;
Try running &lt;code&gt;docker run hello-world&lt;/code&gt; again. Notice how much faster it is? It completely skips Docker Hub. &lt;code&gt;containerd&lt;/code&gt; finds the image in the local cache, hands it straight to &lt;code&gt;runc&lt;/code&gt;, and the container spins up instantly. &lt;/p&gt;

&lt;h2&gt;
  
  
  The "Just Make it Work" Trap
&lt;/h2&gt;

&lt;p&gt;You might be wondering: &lt;em&gt;Why do I need to know all of this?&lt;/em&gt; Here is a hard truth: there are software engineers out there with 5 to 10 years of experience who couldn't explain what you just read. They never dive deep. They treat Docker as a magical black box because their only goal is to "just make it work." &lt;/p&gt;

&lt;p&gt;It’s easy to be lazy. It's easy to just copy-paste terminal commands. But taking the easy route puts a hard ceiling on your career.&lt;/p&gt;

&lt;p&gt;Think of your brain like a massive library. If you just throw random facts into it without organizing them, you'll never be able to find the information when a server crashes at 2 AM. But if you take the time to &lt;strong&gt;connect the dots&lt;/strong&gt; if you organize your knowledge logically, understanding &lt;em&gt;how&lt;/em&gt; &lt;code&gt;dockerd&lt;/code&gt; talks to &lt;code&gt;containerd&lt;/code&gt; you create a mental index. &lt;/p&gt;

&lt;p&gt;When you learn this way, you never forget. &lt;/p&gt;

</description>
      <category>docker</category>
      <category>containers</category>
      <category>devops</category>
      <category>beginners</category>
    </item>
    <item>
      <title>The 3-Second Trap: Why Your HTML to Laravel Blade Conversions Are Loading So Slowly</title>
      <dc:creator>Tahsin Abrar</dc:creator>
      <pubDate>Sat, 04 Apr 2026 07:48:18 +0000</pubDate>
      <link>https://forem.com/tahsin000/the-3-second-trap-why-your-html-to-laravel-blade-conversions-are-loading-so-slowly-56fm</link>
      <guid>https://forem.com/tahsin000/the-3-second-trap-why-your-html-to-laravel-blade-conversions-are-loading-so-slowly-56fm</guid>
      <description>&lt;p&gt;You’re working on a shiny new admin dashboard. You found a gorgeous, lightning-fast static HTML template online. You download it, open the &lt;code&gt;index.html&lt;/code&gt; file in your browser, and it loads instantly. Perfect. &lt;/p&gt;

&lt;p&gt;You copy that HTML into your Laravel project, paste it into a fresh Blade view, fire up your local server, and hit refresh. &lt;/p&gt;

&lt;p&gt;...One second. &lt;br&gt;
...Two seconds. &lt;br&gt;
...Three seconds. &lt;/p&gt;

&lt;p&gt;Suddenly, the layout snaps into place, and the icons finally pop onto the screen. &lt;/p&gt;

&lt;p&gt;What just happened? How did a blazing-fast HTML file turn into a sluggish mess the moment it touched Laravel? &lt;/p&gt;

&lt;p&gt;If you’ve ever spent hours debugging this frustrating delay, you are not alone. As a software architect who has spent years building and scaling Laravel applications, I've seen countless developers fall into this exact trap. Today, we’re going to look at why this "delay dilemma" happens and exactly how to fix it.&lt;/p&gt;


&lt;h2&gt;
  
  
  The Root Cause: The Asset Linking Trap
&lt;/h2&gt;

&lt;p&gt;When converting a static HTML template to a Laravel Blade file, the most common mistake is treating the Blade file exactly like a plain HTML file. &lt;/p&gt;

&lt;p&gt;Because Blade fully supports standard HTML syntax, it’s incredibly tempting to just drag and drop your CSS, JS, and image folders into your project and leave the &lt;code&gt;&amp;lt;link&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; tags exactly as they were. &lt;/p&gt;

&lt;p&gt;It usually looks something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"stylesheet"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"css/style.css"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"stylesheet"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"vendors/fontawesome/all.min.css"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"js/main.js"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In a standard HTML environment, the browser looks for those files relative to where the HTML file sits in the folder structure. But in Laravel, your application is routed through the &lt;code&gt;public&lt;/code&gt; directory, and your URLs are dynamic. &lt;/p&gt;

&lt;h3&gt;
  
  
  The Delay Dilemma Explained
&lt;/h3&gt;

&lt;p&gt;When you leave those relative links in your Blade file, the browser gets confused. It tries to load the CSS or the web fonts for your icons asynchronously. But because the file path doesn't align with Laravel's routing structure, the server can't easily find the assets.&lt;/p&gt;

&lt;p&gt;Behind the scenes, the browser is hanging. It is desperately searching for prerequisite files especially icon web fonts and core stylesheets. This creates a massive bottleneck. The browser essentially pauses the visual rendering for 2 to 3 seconds while it figures out what to do with the missing or misaligned assets. Finally, it gives up or falls back, and your page abruptly snaps into view. &lt;/p&gt;

&lt;p&gt;You might look at your code and think, &lt;em&gt;"My CSS is there, why is it slow?"&lt;/em&gt; The truth is, your CSS might be trying to load, but the broken asset links are holding the rest of the page hostage.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Fix: Do It the Laravel Way
&lt;/h2&gt;

&lt;p&gt;To solve this, we need to stop relying on generic HTML relative paths and start using Laravel's built-in helper functions. Specifically, the &lt;code&gt;asset()&lt;/code&gt; helper.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;asset()&lt;/code&gt; function generates a full, absolute URL for your application based on your current request scheme (HTTP or HTTPS). It tells the browser &lt;em&gt;exactly&lt;/em&gt; where to look inside the &lt;code&gt;public&lt;/code&gt; directory, completely eliminating the guesswork and the load delay.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Move your assets&lt;/strong&gt;&lt;br&gt;
First, ensure all your template's &lt;code&gt;css&lt;/code&gt;, &lt;code&gt;js&lt;/code&gt;, &lt;code&gt;images&lt;/code&gt;, and &lt;code&gt;fonts&lt;/code&gt; folders are placed directly inside your Laravel project's &lt;code&gt;public&lt;/code&gt; directory.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Wrap your links&lt;/strong&gt;&lt;br&gt;
Next, go through your Blade file and update every single static asset link using the &lt;code&gt;{{ asset() }}&lt;/code&gt; syntax.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"stylesheet"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"{{ asset('css/style.css') }}"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"stylesheet"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"{{ asset('vendors/fontawesome/all.min.css') }}"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;3. Don't forget your scripts and images!&lt;/strong&gt;&lt;br&gt;
This rule applies to everything. If it's a static file, it needs the &lt;code&gt;asset()&lt;/code&gt; helper.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"{{ asset('js/main.js') }}"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"{{ asset('images/logo.png') }}"&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;"Dashboard Logo"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  A Real-Life Game Changer
&lt;/h2&gt;

&lt;p&gt;I remember mentoring a junior developer a few years ago who was completely stuck on this. They were building a massive admin portal and had spent an entire afternoon profiling database queries, thinking their backend code was making the page slow. &lt;/p&gt;

&lt;p&gt;I took one look at their &lt;code&gt;app.blade.php&lt;/code&gt; layout file and saw dozens of hardcoded &lt;code&gt;&amp;lt;link href="assets/..."&amp;gt;&lt;/code&gt; tags. We spent five minutes wrapping them in the &lt;code&gt;asset()&lt;/code&gt; helper. When we hit refresh, that painful 3-second delay was completely gone. The icons loaded instantly, and the page felt native and snappy again. &lt;/p&gt;

&lt;p&gt;It was a total game-changer for them.&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>performance</category>
    </item>
    <item>
      <title>Fixing Git 'Repository Not Found' &amp; Multiple SSH Key Issues</title>
      <dc:creator>Tahsin Abrar</dc:creator>
      <pubDate>Sun, 22 Mar 2026 16:16:50 +0000</pubDate>
      <link>https://forem.com/tahsin000/fixing-git-repository-not-found-multiple-ssh-key-issues-14de</link>
      <guid>https://forem.com/tahsin000/fixing-git-repository-not-found-multiple-ssh-key-issues-14de</guid>
      <description>&lt;p&gt;If you’ve ever worked with multiple GitHub accounts and suddenly hit errors like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Repository not found&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Can’t clone or push to a private repo&lt;/li&gt;
&lt;li&gt;Git showing a weird name like &lt;strong&gt;"Pagol98"&lt;/strong&gt; in commits&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;…you’re not alone. This is one of those problems that looks confusing at first, but once you understand it, it becomes super easy to fix.&lt;/p&gt;

&lt;p&gt;In this post, I’ll walk you through the &lt;strong&gt;exact issues&lt;/strong&gt;, &lt;strong&gt;why they happen&lt;/strong&gt;, and a &lt;strong&gt;clean, real-world solution&lt;/strong&gt; you can reuse in any project.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Real Problem (What’s Going Wrong?)
&lt;/h2&gt;

&lt;p&gt;Let’s break it down into &lt;strong&gt;3 common issues&lt;/strong&gt; that often get mixed together:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Repository Not Found
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/username/tailadmin-blade-dashboard.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Error:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;remote: Repository not found.
fatal: repository not found
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;👉 This usually means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The repo name is wrong (typo)&lt;/li&gt;
&lt;li&gt;The repo is private and you don’t have access&lt;/li&gt;
&lt;li&gt;You’re using the wrong account&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  2. Multiple SSH Keys Confusion
&lt;/h3&gt;

&lt;p&gt;You created:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;id_ed25519&lt;/code&gt; (personal)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;id_work&lt;/code&gt; (work)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;👉 But Git doesn’t know &lt;strong&gt;which key to use for which repo&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;So sometimes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;One repo works ✅&lt;/li&gt;
&lt;li&gt;Another repo fails ❌&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  3. 😅 Random Commit Name (like “Pagol98”)
&lt;/h3&gt;

&lt;p&gt;Git uses:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;user.name&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;user.email&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If not set correctly → it uses old/default values.&lt;/p&gt;




&lt;h2&gt;
  
  
  Real-Life Scenario (Why This Happens)
&lt;/h2&gt;

&lt;p&gt;Let’s say:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You have &lt;strong&gt;2 GitHub accounts&lt;/strong&gt; → Personal + Work&lt;/li&gt;
&lt;li&gt;Both have &lt;strong&gt;different SSH keys&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;You clone using HTTPS or default SSH&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;👉 Git gets confused:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Which identity should I use?”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And that’s where things break.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step-by-Step Fix (Clean &amp;amp; Professional Setup)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Step 1: Create SSH Config File
&lt;/h3&gt;

&lt;p&gt;Path:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;C:\Users\Asus\.ssh\config
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If not exists → create it.&lt;/p&gt;

&lt;p&gt;Now add this:&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;# Personal GitHub&lt;/span&gt;
Host github-personal
    HostName github.com
    User git
    IdentityFile ~/.ssh/id_ed25519

&lt;span class="c"&gt;# Work GitHub&lt;/span&gt;
Host github-work
    HostName github.com
    User git
    IdentityFile ~/.ssh/id_work
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;👉 This is the &lt;strong&gt;magic step&lt;/strong&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  Step 2: Use SSH Instead of HTTPS
&lt;/h3&gt;

&lt;p&gt;❌ Don’t use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;https://github.com/username/repo.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;✅ Use SSH:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git@github.com:username/repo.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now modify it using your config:&lt;/p&gt;

&lt;h4&gt;
  
  
  👉 Personal repo:
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone git@github-personal:username/repo.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  👉 Work repo:
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone git@github-work:username/repo.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Step 3: Test SSH Connection
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ssh &lt;span class="nt"&gt;-T&lt;/span&gt; git@github-personal
ssh &lt;span class="nt"&gt;-T&lt;/span&gt; git@github-work
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;✅ Expected:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Hi username! You've successfully authenticated
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Step 4: Fix Git Commit Name
&lt;/h3&gt;

&lt;p&gt;Check current config:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git config &lt;span class="nt"&gt;--global&lt;/span&gt; user.name
git config &lt;span class="nt"&gt;--global&lt;/span&gt; user.email
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Set correct values:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git config &lt;span class="nt"&gt;--global&lt;/span&gt; user.name &lt;span class="s2"&gt;"Your Name"&lt;/span&gt;
git config &lt;span class="nt"&gt;--global&lt;/span&gt; user.email &lt;span class="s2"&gt;"your-email@gmail.com"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Per-Repository Config (Best Practice)
&lt;/h3&gt;

&lt;p&gt;If you use multiple accounts, don’t rely only on global config.&lt;/p&gt;

&lt;p&gt;Inside a specific repo:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git config user.name &lt;span class="s2"&gt;"Work Name"&lt;/span&gt;
git config user.email &lt;span class="s2"&gt;"work-email@gmail.com"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;👉 This avoids mixing identities.&lt;/p&gt;




&lt;h3&gt;
  
  
  Step 5: Verify Remote URL
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git remote &lt;span class="nt"&gt;-v&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Make sure it shows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git@github-work:username/repo.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;or&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git@github-personal:username/repo.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;This is one of those issues every developer faces at some point—especially when juggling &lt;strong&gt;personal and work GitHub accounts&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The key takeaway is simple:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Git doesn’t “understand accounts” — it only understands configuration.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Once you properly configure:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;SSH keys&lt;/li&gt;
&lt;li&gt;SSH config&lt;/li&gt;
&lt;li&gt;Git user info&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;👉 Everything becomes predictable and smooth.&lt;/p&gt;

</description>
      <category>github</category>
      <category>gittips</category>
      <category>developerlife</category>
      <category>versioncontrol</category>
    </item>
    <item>
      <title>How to Set Up Passwordless SSH Login with PuTTY.</title>
      <dc:creator>Tahsin Abrar</dc:creator>
      <pubDate>Sun, 22 Mar 2026 01:48:29 +0000</pubDate>
      <link>https://forem.com/tahsin000/how-to-set-up-passwordless-ssh-login-with-putty-16oj</link>
      <guid>https://forem.com/tahsin000/how-to-set-up-passwordless-ssh-login-with-putty-16oj</guid>
      <description>&lt;p&gt;If you’ve ever logged into your VPS again and again using a password, you already know how repetitive and risky it can be.&lt;/p&gt;

&lt;p&gt;There’s a better way.&lt;/p&gt;

&lt;p&gt;In professional server environments, developers almost always use &lt;strong&gt;SSH key-based authentication&lt;/strong&gt; instead of passwords. It’s faster, more secure, and honestly… once you set it up, you won’t want to go back.&lt;/p&gt;

&lt;p&gt;In this guide, I’ll walk you through how to set up &lt;strong&gt;passwordless SSH login using PuTTY&lt;/strong&gt; in a simple, practical way.&lt;/p&gt;




&lt;h2&gt;
  
  
  What Is Passwordless SSH Login?
&lt;/h2&gt;

&lt;p&gt;In simple terms:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Instead of typing a password every time&lt;/li&gt;
&lt;li&gt;You use a &lt;strong&gt;private key file&lt;/strong&gt; stored on your computer&lt;/li&gt;
&lt;li&gt;The server verifies it using a &lt;strong&gt;public key&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Think of it like this:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Your server has a lock (public key), and your computer has the only matching key (private key)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;No password needed. Just instant access.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 1: Generate SSH Key Pair Using PuTTYgen
&lt;/h2&gt;

&lt;p&gt;First, we need to create two keys:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Private Key (.ppk)&lt;/strong&gt; → stays on your PC&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Public Key&lt;/strong&gt; → goes to your server&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Steps:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Open &lt;strong&gt;PuTTYgen&lt;/strong&gt; (comes with PuTTY)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Under &lt;strong&gt;Parameters&lt;/strong&gt;, select:&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;Ed25519&lt;/code&gt; (modern, faster, more secure than RSA)&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Click &lt;strong&gt;Generate&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Move your mouse randomly (this generates randomness)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Once done:&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Click &lt;strong&gt;Save private key&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Save it somewhere &lt;strong&gt;safe&lt;/strong&gt; (very important ⚠️)&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Copy the public key from:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   Public key for pasting into OpenSSH authorized_keys file
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Step 2: Add Public Key to Your VPS
&lt;/h2&gt;

&lt;p&gt;Now we tell the server: “This key is allowed to access you.”&lt;/p&gt;

&lt;h3&gt;
  
  
  Login to your VPS (last time using password)
&lt;/h3&gt;

&lt;p&gt;Then run:&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="nb"&gt;mkdir&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; ~/.ssh
&lt;span class="nb"&gt;chmod &lt;/span&gt;700 ~/.ssh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Open authorized_keys file:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nano ~/.ssh/authorized_keys
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Paste your public key
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Right-click in PuTTY → it will paste automatically&lt;/li&gt;
&lt;li&gt;Then save:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Ctrl + O → Enter → Ctrl + X
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Secure the file:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;chmod &lt;/span&gt;600 ~/.ssh/authorized_keys
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Step 3: Configure PuTTY for One-Click Login
&lt;/h2&gt;

&lt;p&gt;Now comes the fun part no more typing anything 😄&lt;/p&gt;

&lt;h3&gt;
  
  
  Steps:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Open &lt;strong&gt;PuTTY&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Go to:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   Connection → Data
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Set:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; Auto-login username: your_username (e.g., root / ubuntu)
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Go to:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   Connection → SSH → Auth → Credentials
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Select your &lt;code&gt;.ppk&lt;/code&gt; file&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Go back to:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   Session
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Enter:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Host Name (IP)&lt;/li&gt;
&lt;li&gt;Saved Session name (e.g., &lt;code&gt;My Production VPS&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Click &lt;strong&gt;Save&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Result: One Click Login
&lt;/h2&gt;

&lt;p&gt;From now on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Open PuTTY&lt;/li&gt;
&lt;li&gt;Double-click your saved session&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You’re instantly logged in. No password. No hassle.&lt;/p&gt;




&lt;h2&gt;
  
  
  Real-Life Scenario
&lt;/h2&gt;

&lt;p&gt;Let’s say you’re deploying a Laravel project from GitHub to your VPS.&lt;/p&gt;

&lt;p&gt;Before:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Login with password every time&lt;/li&gt;
&lt;li&gt;Risk of brute-force attacks&lt;/li&gt;
&lt;li&gt;Slower CI/CD setup&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Instant login using SSH key&lt;/li&gt;
&lt;li&gt;Easy automation (GitHub Actions, scripts)&lt;/li&gt;
&lt;li&gt;Much more secure&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is exactly how most production servers are managed in real-world teams.&lt;/p&gt;




&lt;p&gt;Setting up SSH key-based login might feel a bit technical at first but it’s one of those upgrades that pays off immediately.&lt;/p&gt;

&lt;p&gt;You get:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Better security&lt;/li&gt;
&lt;li&gt;Faster access&lt;/li&gt;
&lt;li&gt;Easier automation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And honestly… once you start using it, typing passwords will feel outdated.&lt;/p&gt;

</description>
      <category>ssh</category>
      <category>devops</category>
      <category>security</category>
      <category>linux</category>
    </item>
    <item>
      <title>Why Port 8000 Suddenly Stopped Working on My Local Machine (and How I Fixed It)</title>
      <dc:creator>Tahsin Abrar</dc:creator>
      <pubDate>Sat, 10 Jan 2026 09:23:29 +0000</pubDate>
      <link>https://forem.com/tahsin000/why-port-8000-suddenly-stopped-working-on-my-local-machine-and-how-i-fixed-it-4a12</link>
      <guid>https://forem.com/tahsin000/why-port-8000-suddenly-stopped-working-on-my-local-machine-and-how-i-fixed-it-4a12</guid>
      <description>&lt;p&gt;A few days ago, I faced one of those &lt;strong&gt;annoying local development issues&lt;/strong&gt; that waste hours and make you question your sanity.&lt;/p&gt;

&lt;p&gt;I started my local server like I always do:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;http://127.0.0.1:8000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And suddenly… &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Failed to listen on 127.0.0.1:8000&lt;br&gt;
An attempt was made to access a socket in a way forbidden by its access permissions&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I tried ports &lt;strong&gt;8001, 8002, 8003… all the way to 8010&lt;/strong&gt;.&lt;br&gt;
Same error. Every. Single. Time.&lt;/p&gt;

&lt;p&gt;If this sounds familiar, this post is for you.&lt;/p&gt;


&lt;h2&gt;
  
  
  The Confusing Part
&lt;/h2&gt;

&lt;p&gt;The first thing any developer does is check if the port is already in use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;netstat &lt;span class="nt"&gt;-ano&lt;/span&gt; | findstr :8000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;👉 &lt;strong&gt;Nothing. Empty.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;So the port is free… right?&lt;/p&gt;

&lt;p&gt;Wrong.&lt;/p&gt;

&lt;p&gt;This is where Windows tricks you.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Real Problem (The Part No One Tells You)
&lt;/h2&gt;

&lt;p&gt;On &lt;strong&gt;Windows&lt;/strong&gt;, some ports are &lt;strong&gt;reserved by the OS itself&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This usually happens because of:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Hyper-V&lt;/li&gt;
&lt;li&gt;WSL2&lt;/li&gt;
&lt;li&gt;Docker Desktop&lt;/li&gt;
&lt;li&gt;Windows NAT (WinNAT)&lt;/li&gt;
&lt;li&gt;VPN software&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Even if &lt;strong&gt;no app is using the port&lt;/strong&gt;, Windows blocks it internally.&lt;/p&gt;

&lt;p&gt;That’s why:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;netstat&lt;/code&gt; shows nothing&lt;/li&gt;
&lt;li&gt;Your app still fails to start&lt;/li&gt;
&lt;li&gt;You lose time debugging the wrong thing&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  How I Found the Truth
&lt;/h2&gt;

&lt;p&gt;Run this command &lt;strong&gt;as Administrator&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight batchfile"&gt;&lt;code&gt;&lt;span class="nb"&gt;netsh&lt;/span&gt; &lt;span class="kd"&gt;int&lt;/span&gt; &lt;span class="kd"&gt;ipv4&lt;/span&gt; &lt;span class="kd"&gt;show&lt;/span&gt; &lt;span class="kd"&gt;excludedportrange&lt;/span&gt; &lt;span class="kd"&gt;protocol&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kd"&gt;tcp&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On my machine, I saw this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Start Port    End Port
7943          8042
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Boom.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Port &lt;strong&gt;8000 is inside that range&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;That means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Windows owns the port&lt;/li&gt;
&lt;li&gt;Your app is not allowed to bind to it&lt;/li&gt;
&lt;li&gt;No process will show up in &lt;code&gt;netstat&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Why This Error Is So Frustrating
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The error message is unclear&lt;/li&gt;
&lt;li&gt;Nothing shows in port checks&lt;/li&gt;
&lt;li&gt;Reinstalling frameworks won’t help&lt;/li&gt;
&lt;li&gt;Killing processes won’t help&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I wasted time restarting apps when the problem was &lt;strong&gt;the OS itself&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Fixes (Pick What Fits You)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Option 1: Use a Different Port (Fastest &amp;amp; Safest)
&lt;/h3&gt;

&lt;p&gt;If you just want to move on:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;8080
3000
5000
9000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example (Django):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python manage.py runserver 127.0.0.1:8080
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This works &lt;strong&gt;without admin access&lt;/strong&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  Option 2: Disable Hyper-V (Best for Dev Machines)
&lt;/h3&gt;

&lt;p&gt;If you don’t need Hyper-V:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight batchfile"&gt;&lt;code&gt;&lt;span class="nb"&gt;dism.exe&lt;/span&gt; &lt;span class="na"&gt;/Online /Disable-Feature&lt;/span&gt;&lt;span class="nl"&gt;:Microsoft&lt;/span&gt;&lt;span class="na"&gt;-Hyper-V
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Restart your PC&lt;/p&gt;

&lt;p&gt;This permanently frees ports like 8000.&lt;/p&gt;




&lt;h3&gt;
  
  
  Option 3: Shutdown WSL (Temporary)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight batchfile"&gt;&lt;code&gt;&lt;span class="kd"&gt;wsl&lt;/span&gt; &lt;span class="na"&gt;--shutdown
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Good if you only need a quick fix.&lt;/p&gt;




&lt;h3&gt;
  
  
  Option 4: Restart WinNAT
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight batchfile"&gt;&lt;code&gt;&lt;span class="nb"&gt;net&lt;/span&gt; &lt;span class="kd"&gt;stop&lt;/span&gt; &lt;span class="kd"&gt;winnat&lt;/span&gt;
&lt;span class="nb"&gt;net&lt;/span&gt; &lt;span class="nb"&gt;start&lt;/span&gt; &lt;span class="kd"&gt;winnat&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;⚠️ Requires Administrator access&lt;br&gt;
⚠️ May be temporary&lt;/p&gt;




&lt;h2&gt;
  
  
  What NOT to Do
&lt;/h2&gt;

&lt;p&gt;❌ Don’t reinstall Python / Node / Django&lt;br&gt;
❌ Don’t keep killing random processes&lt;br&gt;
❌ Don’t fight the firewall first&lt;br&gt;
❌ Don’t assume &lt;code&gt;netstat&lt;/code&gt; tells the full story&lt;/p&gt;

&lt;p&gt;This is &lt;strong&gt;not your app’s fault&lt;/strong&gt;.&lt;/p&gt;




&lt;p&gt;If this post saved you time, feel free to share it with another developer who’s stuck staring at port 8000 right now 😄&lt;br&gt;
Happy coding! 🚀&lt;/p&gt;

</description>
      <category>backend</category>
      <category>networking</category>
      <category>debugging</category>
      <category>windows</category>
    </item>
    <item>
      <title>A Small PHP Tip That Saves Time (and Lines of Code)</title>
      <dc:creator>Tahsin Abrar</dc:creator>
      <pubDate>Fri, 02 Jan 2026 20:09:59 +0000</pubDate>
      <link>https://forem.com/tahsin000/a-small-php-tip-that-saves-time-and-lines-of-code-10op</link>
      <guid>https://forem.com/tahsin000/a-small-php-tip-that-saves-time-and-lines-of-code-10op</guid>
      <description>&lt;p&gt;I was recently reviewing a PHP project. The code worked fine. Tests were passing. No bugs.&lt;/p&gt;

&lt;p&gt;But something caught my eye.&lt;/p&gt;

&lt;p&gt;The same pattern was repeated again and again in almost every class constructor. It’s not wrong, but since &lt;strong&gt;PHP 8.0&lt;/strong&gt;, we don’t need to write it this way anymore.&lt;/p&gt;

&lt;p&gt;This post is a &lt;strong&gt;quick, practical PHP tip&lt;/strong&gt; about classes and constructors that can make your code &lt;strong&gt;cleaner, shorter, and easier to read&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Old Habit We Still Write
&lt;/h2&gt;

&lt;p&gt;This is something I still see in many real projects:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;UserService&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="nv"&gt;$name&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="nv"&gt;$age&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;__construct&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="nv"&gt;$name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="nv"&gt;$age&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nv"&gt;$this&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;$name&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nv"&gt;$this&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;age&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;$age&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Nothing is technically wrong here.&lt;/p&gt;

&lt;p&gt;But when a project has:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;50+ classes&lt;/li&gt;
&lt;li&gt;Each class has 5–10 properties&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You end up writing the same lines again and again.&lt;/p&gt;

&lt;p&gt;It’s &lt;strong&gt;boring&lt;/strong&gt;, &lt;strong&gt;repetitive&lt;/strong&gt;, and easy to mess up when refactoring.&lt;/p&gt;




&lt;h2&gt;
  
  
  PHP 8.0 Changed This Forever
&lt;/h2&gt;

&lt;p&gt;Since &lt;strong&gt;PHP 8.0&lt;/strong&gt;, we have a feature called:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Constructor Property Promotion&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It lets you declare and assign class properties &lt;strong&gt;directly inside the constructor&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Let’s rewrite the same class.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Modern Way (Cleaner &amp;amp; Shorter)
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;UserService&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;__construct&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="nv"&gt;$name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="nv"&gt;$age&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That’s it.&lt;/p&gt;

&lt;h3&gt;
  
  
  What Just Happened?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;No separate property declaration&lt;/li&gt;
&lt;li&gt;No &lt;code&gt;$this-&amp;gt;name = $name;&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Same behavior&lt;/li&gt;
&lt;li&gt;Less code&lt;/li&gt;
&lt;li&gt;Easier to read&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Your brain now focuses on &lt;strong&gt;what the class needs&lt;/strong&gt;, not boilerplate code.&lt;/p&gt;




&lt;h2&gt;
  
  
  Public, Protected, or Private? Your Choice
&lt;/h2&gt;

&lt;p&gt;You’re not limited to &lt;code&gt;private&lt;/code&gt;. You can use any visibility.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Post&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;__construct&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="nv"&gt;$title&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="nv"&gt;$content&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="nv"&gt;$authorId&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This works exactly as expected.&lt;/p&gt;




&lt;h2&gt;
  
  
  A Real-Life Refactor Story
&lt;/h2&gt;

&lt;p&gt;While reviewing a Laravel project, I found a service class with &lt;strong&gt;12 properties&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The constructor alone was almost &lt;strong&gt;30 lines long&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;I did this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Selected the constructor&lt;/li&gt;
&lt;li&gt;Used &lt;strong&gt;VS Code Quick Edit / Multi-cursor&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Converted all properties to constructor promotion&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The result:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Constructor went from 30 lines to 6 lines&lt;/li&gt;
&lt;li&gt;No logic changed&lt;/li&gt;
&lt;li&gt;Code became easier to scan during reviews&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This refactor took &lt;strong&gt;less than 2 minutes&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  When You Should Use This
&lt;/h2&gt;

&lt;p&gt;Constructor property promotion is perfect when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Properties are only set in the constructor&lt;/li&gt;
&lt;li&gt;You don’t need extra logic during assignment&lt;/li&gt;
&lt;li&gt;You want clean, modern PHP code&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  When You Should NOT Use It
&lt;/h2&gt;

&lt;p&gt;Avoid it if:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You need validation before assignment&lt;/li&gt;
&lt;li&gt;You modify values before storing them&lt;/li&gt;
&lt;li&gt;You want to keep constructor logic very explicit&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example where the old way is still better:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;__construct&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="nv"&gt;$email&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nv"&gt;$this&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;email&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;strtolower&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$email&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>codequality</category>
      <category>tutorial</category>
      <category>productivity</category>
      <category>php</category>
    </item>
    <item>
      <title>Stop Hacking Your .htaccess: A Better Way to Switch Laravel Versions</title>
      <dc:creator>Tahsin Abrar</dc:creator>
      <pubDate>Fri, 02 Jan 2026 15:04:02 +0000</pubDate>
      <link>https://forem.com/tahsin000/stop-hacking-your-htaccess-a-better-way-to-switch-laravel-versions-57p2</link>
      <guid>https://forem.com/tahsin000/stop-hacking-your-htaccess-a-better-way-to-switch-laravel-versions-57p2</guid>
      <description>&lt;p&gt;We’ve all been there. It’s 10:00 PM, you just finished a major update for your Laravel site, and it’s time to go live.&lt;/p&gt;

&lt;p&gt;In the past, I used to do what many of us try first: &lt;strong&gt;The .htaccess Trick.&lt;/strong&gt; I would upload the new version to a subfolder and try to "point" the website to it using some clever Apache rules.&lt;/p&gt;

&lt;p&gt;It felt smart at the time. But then came the bugs. Broken CSS paths, session errors, and the scariest part accidentally making my &lt;code&gt;.env&lt;/code&gt; file public.&lt;/p&gt;

&lt;p&gt;Today, I want to show you a much better, "pro" way to do this. It’s called a &lt;strong&gt;Symbolic Link (Symlink)&lt;/strong&gt;. It sounds technical, but it’s actually as simple as creating a shortcut on your desktop.&lt;/p&gt;

&lt;h3&gt;
  
  
  The "Bakery" Analogy
&lt;/h3&gt;

&lt;p&gt;Imagine you run a bakery. You have a display case (your website) where you show your cakes.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The .htaccess way:&lt;/strong&gt; You try to move the entire display case every time you bake a new cake. It’s heavy, slow, and you might drop something.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Symlink way:&lt;/strong&gt; You keep the display case where it is. You just swap the tray inside. The customers always look at the same spot, but the cake is fresh.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Why the .htaccess method is risky
&lt;/h3&gt;

&lt;p&gt;Before we dive into the "how," here is why you should avoid switching versions via &lt;code&gt;.htaccess&lt;/code&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Security:&lt;/strong&gt; You risk exposing your sensitive files (like &lt;code&gt;.env&lt;/code&gt;) if the redirect isn't perfect.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Path Issues:&lt;/strong&gt; Laravel functions like &lt;code&gt;public_path()&lt;/code&gt; can get confused when the project is buried in subfolders.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Downtime:&lt;/strong&gt; If you make a typo in the &lt;code&gt;.htaccess&lt;/code&gt; file, your whole site goes down with a "500 Internal Server Error."&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  The Better Way: The "Current" Folder Strategy
&lt;/h3&gt;

&lt;p&gt;Instead of moving files around, we are going to create a structure like this on your server:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/my-project/
├── releases/
│   ├── v1_old/   (Your old code)
│   └── v2_new/   (Your new code)
└── current/      (The "Magic" Shortcut)

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your web server (Apache or Nginx) will always look at the &lt;code&gt;current/public&lt;/code&gt; folder. To switch versions, we just tell the &lt;code&gt;current&lt;/code&gt; shortcut to point to a different folder.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step-by-Step Guide
&lt;/h3&gt;

&lt;h4&gt;
  
  
  1. Prepare your folders
&lt;/h4&gt;

&lt;p&gt;Upload your new version into a folder inside &lt;code&gt;releases/&lt;/code&gt;. Let's call it &lt;code&gt;v2_new&lt;/code&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  2. The Magic Command
&lt;/h4&gt;

&lt;p&gt;Open your terminal (SSH). Instead of copying files, run this command:&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="nb"&gt;ln&lt;/span&gt; &lt;span class="nt"&gt;-sfn&lt;/span&gt; /home/username/releases/v2_new/public /home/username/public_html

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;What does this do?&lt;/strong&gt; It tells the server: &lt;em&gt;"Hey, whenever someone visits public_html, actually show them the files inside v2_new/public."&lt;/em&gt; It happens &lt;strong&gt;instantly&lt;/strong&gt;. No loading bars, no waiting.&lt;/p&gt;

&lt;h4&gt;
  
  
  3. The "Oops" Button (Rollback)
&lt;/h4&gt;

&lt;p&gt;This is my favorite part. If you realize &lt;code&gt;v2_new&lt;/code&gt; has a massive bug, you don't need to panic. You can switch back to the old version in one second:&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="nb"&gt;ln&lt;/span&gt; &lt;span class="nt"&gt;-sfn&lt;/span&gt; /home/username/releases/v1_old/public /home/username/public_html

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>webdev</category>
      <category>programming</category>
      <category>javascript</category>
    </item>
    <item>
      <title>The Empty Box Problem in Laravel Migrations (And why I stopped using default strings)</title>
      <dc:creator>Tahsin Abrar</dc:creator>
      <pubDate>Thu, 18 Dec 2025 19:38:09 +0000</pubDate>
      <link>https://forem.com/tahsin000/the-empty-box-problem-in-laravel-migrations-and-why-i-stopped-using-default-strings-4hc6</link>
      <guid>https://forem.com/tahsin000/the-empty-box-problem-in-laravel-migrations-and-why-i-stopped-using-default-strings-4hc6</guid>
      <description>&lt;p&gt;🛑 Stop me if you’ve faced this decision before.&lt;/p&gt;

&lt;p&gt;You are writing a Laravel migration.&lt;br&gt;
You need to add an optional column, like &lt;code&gt;unit_type&lt;/code&gt;.&lt;br&gt;
Not every product needs a unit.&lt;/p&gt;

&lt;p&gt;So, you have two choices:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;code&gt;$table-&amp;gt;string('unit_type')-&amp;gt;default('');&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;$table-&amp;gt;string('unit_type')-&amp;gt;nullable();&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I almost always chose Option 1.&lt;/p&gt;

&lt;p&gt;Why? &lt;strong&gt;Fear.&lt;/strong&gt;&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%2Fw2a1akfaxurs09bvhe8d.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%2Fw2a1akfaxurs09bvhe8d.png" alt=" " width="800" height="436"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I was afraid of the dreaded &lt;code&gt;Trying to access property on null&lt;/code&gt; error in my frontend.&lt;br&gt;
I just wanted to output the value without writing &lt;code&gt;if&lt;/code&gt; statements everywhere.&lt;br&gt;
Using &lt;code&gt;default('')&lt;/code&gt; felt "safe."&lt;/p&gt;

&lt;p&gt;But after 10 years of database design, I realized I was doing it wrong.&lt;/p&gt;

&lt;p&gt;Here is a simple way to look at it:&lt;/p&gt;

&lt;p&gt;Imagine a warehouse shelf. 📦&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Using `nullable()&lt;/strong&gt;` is like having &lt;strong&gt;no box&lt;/strong&gt; on the shelf.&lt;br&gt;
It means: "This item does not apply here." (e.g., A digital download has no weight).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Using `default('')&lt;/strong&gt;` is like putting an &lt;strong&gt;empty box&lt;/strong&gt; on the shelf.&lt;br&gt;
It means: "There is a box here, but we forgot to put something inside."&lt;/p&gt;

&lt;p&gt;When you use empty strings, you are technically "lying" to your database. You are saying there is a value (text of length 0), even when there isn’t.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why does this matter?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;❌ &lt;strong&gt;Queries get messy:&lt;/strong&gt; searching for &lt;code&gt;WHERE column IS NULL&lt;/code&gt; is standard. Searching for &lt;code&gt;WHERE column = ''&lt;/code&gt; feels amateur.&lt;br&gt;
❌ &lt;strong&gt;Foreign Keys:&lt;/strong&gt; You can’t make an empty string a foreign key later.&lt;br&gt;
❌ &lt;strong&gt;Analytics:&lt;/strong&gt; Reports get confused between "missing data" and "empty text."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Best Practice Solution?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Keep the database clean, and handle the "safety" in your Model.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;In your migration, use &lt;code&gt;nullable()&lt;/code&gt;. Let the database be accurate.&lt;/li&gt;
&lt;li&gt;In your Laravel Model, use an &lt;strong&gt;Accessor&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;getUnitTypeAttribute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nv"&gt;$value&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt; &lt;span class="s1"&gt;''&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This gives you the best of both worlds.&lt;br&gt;
Your database stores clean &lt;code&gt;NULL&lt;/code&gt; values.&lt;br&gt;
Your frontend gets a safe empty string.&lt;/p&gt;

&lt;p&gt;👇 &lt;strong&gt;What’s your preference? Do you strictly enforce NULLs, or do you sneak in defaults to save time? Let’s argue in the comments.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>database</category>
      <category>architecture</category>
      <category>laravel</category>
      <category>php</category>
    </item>
    <item>
      <title>MySQL Connection Error 1130: Host '192.168.7.7' Is Not Allowed to Connect</title>
      <dc:creator>Tahsin Abrar</dc:creator>
      <pubDate>Tue, 21 Oct 2025 20:30:44 +0000</pubDate>
      <link>https://forem.com/tahsin000/mysql-connection-error-1130-host-19216877-is-not-allowed-to-connect-23a2</link>
      <guid>https://forem.com/tahsin000/mysql-connection-error-1130-host-19216877-is-not-allowed-to-connect-23a2</guid>
      <description>&lt;p&gt;As a developer, you’ve probably encountered various MySQL errors while working with databases. One common issue that can be quite frustrating is the &lt;strong&gt;ERROR 1130 (HY000)&lt;/strong&gt;: &lt;strong&gt;Host '192.168.7.7' is not allowed to connect to this MySQL server&lt;/strong&gt;. This error typically occurs when trying to connect to a MySQL server from a remote machine using tools like &lt;strong&gt;TablePlus&lt;/strong&gt; or &lt;strong&gt;MySQL Workbench&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;In this post, I’ll walk you through the steps to troubleshoot and resolve this connection error, so you can get back to developing without any interruptions. Let’s dive in!&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Understanding the ERROR 1130&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The error &lt;strong&gt;ERROR 1130 (HY000): Host '192.168.7.7' is not allowed to connect to this MySQL server&lt;/strong&gt; occurs when your MySQL server rejects connections from a remote host (in this case, &lt;code&gt;192.168.7.7&lt;/code&gt;). This happens because the MySQL server's settings don't allow connections from that specific host or IP address.&lt;/p&gt;

&lt;p&gt;This issue usually stems from a combination of MySQL’s &lt;strong&gt;host-based access control&lt;/strong&gt; and &lt;strong&gt;network settings&lt;/strong&gt;. But don’t worry! Fixing it involves a few simple steps.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Step 1: Check the MySQL User Privileges&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The first thing we need to do is ensure that the MySQL user you're trying to connect with has the correct privileges for remote connections.&lt;/p&gt;

&lt;h4&gt;
  
  
  1.1 Log into MySQL Server
&lt;/h4&gt;

&lt;p&gt;On the machine where MySQL is running, log in as a root user or any other user with the necessary privileges:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;mysql &lt;span class="nt"&gt;-u&lt;/span&gt; root &lt;span class="nt"&gt;-p&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Enter your password when prompted.&lt;/p&gt;

&lt;h4&gt;
  
  
  1.2 Check Existing Privileges
&lt;/h4&gt;

&lt;p&gt;Once logged in, check the privileges for the user trying to connect remotely:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="k"&gt;user&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;host&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;mysql&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;user&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will show a list of all MySQL users and their associated hosts. If the user you're trying to use is restricted to &lt;code&gt;localhost&lt;/code&gt;, it will not be able to connect from a remote IP address.&lt;/p&gt;

&lt;h4&gt;
  
  
  1.3 Grant Remote Access
&lt;/h4&gt;

&lt;p&gt;If the user does not have permissions for remote access, you can grant the required privileges. For example, to allow the user &lt;code&gt;username&lt;/code&gt; to connect from any host, you would run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;GRANT&lt;/span&gt; &lt;span class="k"&gt;ALL&lt;/span&gt; &lt;span class="k"&gt;PRIVILEGES&lt;/span&gt; &lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="n"&gt;database_name&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;TO&lt;/span&gt; &lt;span class="s1"&gt;'username'&lt;/span&gt;&lt;span class="o"&gt;@&lt;/span&gt;&lt;span class="s1"&gt;'%'&lt;/span&gt; &lt;span class="n"&gt;IDENTIFIED&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="s1"&gt;'your_password'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will allow connections from any host (&lt;code&gt;%&lt;/code&gt; is a wildcard for any IP address).&lt;/p&gt;

&lt;p&gt;If you want to restrict it to a specific IP (e.g., &lt;code&gt;192.168.7.7&lt;/code&gt;), replace &lt;code&gt;%&lt;/code&gt; with that IP:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;GRANT&lt;/span&gt; &lt;span class="k"&gt;ALL&lt;/span&gt; &lt;span class="k"&gt;PRIVILEGES&lt;/span&gt; &lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="n"&gt;database_name&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;TO&lt;/span&gt; &lt;span class="s1"&gt;'username'&lt;/span&gt;&lt;span class="o"&gt;@&lt;/span&gt;&lt;span class="s1"&gt;'192.168.7.7'&lt;/span&gt; &lt;span class="n"&gt;IDENTIFIED&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="s1"&gt;'your_password'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  1.4 Flush Privileges
&lt;/h4&gt;

&lt;p&gt;After granting the privileges, don’t forget to reload the privileges to ensure they take effect:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="n"&gt;FLUSH&lt;/span&gt; &lt;span class="k"&gt;PRIVILEGES&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  &lt;strong&gt;Step 2: Configure MySQL to Listen on All IP Addresses&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;By default, MySQL may be configured to listen only on &lt;code&gt;localhost&lt;/code&gt; (127.0.0.1), which means it won't accept connections from remote machines.&lt;/p&gt;

&lt;h4&gt;
  
  
  2.1 Edit the MySQL Configuration File
&lt;/h4&gt;

&lt;p&gt;On the MySQL server, open the configuration file (&lt;code&gt;my.cnf&lt;/code&gt; or &lt;code&gt;my.ini&lt;/code&gt;, depending on your operating system). The location of the file varies, but it’s typically found at &lt;code&gt;/etc/mysql/my.cnf&lt;/code&gt; or &lt;code&gt;/etc/my.cnf&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Use your preferred text editor (like &lt;code&gt;nano&lt;/code&gt; or &lt;code&gt;vim&lt;/code&gt;):&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="nb"&gt;sudo &lt;/span&gt;nano /etc/mysql/my.cnf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  2.2 Modify the &lt;code&gt;bind-address&lt;/code&gt;
&lt;/h4&gt;

&lt;p&gt;Look for the &lt;code&gt;bind-address&lt;/code&gt; directive. If it is set to &lt;code&gt;127.0.0.1&lt;/code&gt;, change it to &lt;code&gt;0.0.0.0&lt;/code&gt; to allow MySQL to listen on all available IP addresses:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ini"&gt;&lt;code&gt;&lt;span class="py"&gt;bind-address&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;0.0.0.0&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Save and close the file.&lt;/p&gt;

&lt;h4&gt;
  
  
  2.3 Restart MySQL
&lt;/h4&gt;

&lt;p&gt;For the changes to take effect, restart MySQL:&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="nb"&gt;sudo &lt;/span&gt;systemctl restart mysql
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  &lt;strong&gt;Step 3: Check Firewall and Security Group Settings&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Even after granting the necessary privileges and configuring MySQL to listen on all IPs, your server’s firewall might still block the connection.&lt;/p&gt;

&lt;h4&gt;
  
  
  3.1 Open the MySQL Port (3306)
&lt;/h4&gt;

&lt;p&gt;MySQL uses port &lt;code&gt;3306&lt;/code&gt; for client connections. Ensure that this port is open on the server’s firewall. On Ubuntu, for example, you can allow traffic on port &lt;code&gt;3306&lt;/code&gt; with the following command:&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="nb"&gt;sudo &lt;/span&gt;ufw allow 3306
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you're using a cloud provider like AWS, make sure the &lt;strong&gt;Security Group&lt;/strong&gt; attached to your MySQL instance allows inbound traffic on port &lt;code&gt;3306&lt;/code&gt; from the remote host's IP address.&lt;/p&gt;

&lt;h4&gt;
  
  
  3.2 Verify the Connection
&lt;/h4&gt;

&lt;p&gt;Finally, test the connection from the client machine (in this case, TablePlus). Try connecting again, and you should no longer see the &lt;strong&gt;ERROR 1130 (HY000)&lt;/strong&gt; message.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Step 4: Double-Check TablePlus Settings&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Sometimes, the issue may not be on the MySQL server side, but rather with how TablePlus is configured.&lt;/p&gt;

&lt;h4&gt;
  
  
  4.1 Verify Host and Port
&lt;/h4&gt;

&lt;p&gt;Make sure you’re connecting to the correct IP address and port. Double-check the following in TablePlus:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Host&lt;/strong&gt;: Should be the IP address of your MySQL server (e.g., &lt;code&gt;192.168.7.7&lt;/code&gt; or the external IP if connecting remotely).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Port&lt;/strong&gt;: The default MySQL port is &lt;code&gt;3306&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;User&lt;/strong&gt;: The MySQL username.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Password&lt;/strong&gt;: The correct password for the MySQL user.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  4.2 Test Connection
&lt;/h4&gt;

&lt;p&gt;Click on the &lt;strong&gt;Test&lt;/strong&gt; button in TablePlus to verify the connection. If everything is set up correctly, you should be able to connect without issues.&lt;/p&gt;

</description>
      <category>mysql</category>
      <category>database</category>
      <category>laravel</category>
      <category>techtips</category>
    </item>
    <item>
      <title>Fixing CSS not updating in production (Laravel + Blade)</title>
      <dc:creator>Tahsin Abrar</dc:creator>
      <pubDate>Mon, 06 Oct 2025 20:59:35 +0000</pubDate>
      <link>https://forem.com/tahsin000/fixing-css-not-updating-in-production-laravel-blade-2ncp</link>
      <guid>https://forem.com/tahsin000/fixing-css-not-updating-in-production-laravel-blade-2ncp</guid>
      <description>&lt;p&gt;If you change a CSS file but users (often on mobile) still see the old styles, it’s almost always a caching problem. This post shows simple, practical fixes for Laravel/Blade projects from quick hacks to proper production setups with real examples you can copy.&lt;/p&gt;




&lt;h2&gt;
  
  
  The problem short story
&lt;/h2&gt;

&lt;p&gt;Last month I deployed a tiny CSS change: a button color and spacing. On my desktop it looked fine. But several users (mostly on mobile) complained the site still showed the old look. I ran &lt;code&gt;php artisan optimize:clear&lt;/code&gt;, redeployed, even asked one user to refresh nothing. The cause? Browser (or CDN) still serving the old static file from cache.&lt;/p&gt;

&lt;p&gt;Browsers, CDNs, and sometimes reverse proxies hold static files (CSS/JS) for speed. If the filename or URL does not change, they assume it’s the same file and keep using the cached copy.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why &lt;code&gt;php artisan optimize:clear&lt;/code&gt; didn’t fix it
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;php artisan optimize:clear&lt;/code&gt; clears Laravel’s &lt;em&gt;server-side&lt;/em&gt; caches (views, routes, configs). It &lt;strong&gt;does not&lt;/strong&gt; change the static asset file name or force browsers/CDNs to fetch a new &lt;code&gt;style.css&lt;/code&gt;. So browser cache still wins.&lt;/p&gt;




&lt;h2&gt;
  
  
  Practical fixes (from quick to best practice)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1) Best: Use versioned assets (Vite or Mix)
&lt;/h3&gt;

&lt;p&gt;If you use &lt;strong&gt;Vite&lt;/strong&gt; (Laravel 9+ default) or &lt;strong&gt;Laravel Mix&lt;/strong&gt;, they produce versioned/hashed builds so each build has new filenames.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Vite&lt;/strong&gt; (Blade):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@vite(['resources/css/app.css', 'resources/js/app.js'])
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Build for production:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm run build
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Laravel Mix&lt;/strong&gt; (webpack.mix.js):&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;mix&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;js&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;resources/js/app.js&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;public/js&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sass&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;resources/sass/app.scss&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;public/css&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;version&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// &amp;lt;-- generate hashed filenames&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then in Blade:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;link rel="stylesheet" href="{{ mix('css/app.css') }}"&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Build for production:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm run prod
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Why this works: the filenames include a hash (e.g. &lt;code&gt;app.abc123.css&lt;/code&gt;) so when content changes, filename changes, forcing browsers &amp;amp; CDNs to fetch the new file.&lt;/p&gt;




&lt;h3&gt;
  
  
  2) Good quick fix: Use file modification time (&lt;code&gt;filemtime&lt;/code&gt;) &lt;em&gt;better&lt;/em&gt; than &lt;code&gt;time()&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;If you don't use Mix/Vite yet, avoid &lt;code&gt;?v={{ time() }}&lt;/code&gt;. &lt;code&gt;time()&lt;/code&gt; changes every request and &lt;strong&gt;breaks caching&lt;/strong&gt; (bad for performance). Use the file’s last-modified timestamp so version only changes when file changes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;link rel="stylesheet" href="{{ asset('css/style.css') }}?v={{ filemtime(public_path('css/style.css')) }}"&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This way the query string changes only when the file actually changes.&lt;/p&gt;




&lt;h3&gt;
  
  
  3) Quick (but temporary) hack: &lt;code&gt;?v={{ time() }}&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;This forces a fresh download every time. It fixes the "old CSS" problem immediately but kills browser caching and hurts load time. Use only for debugging or one-time hotfix.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;link rel="stylesheet" href="{{ asset('css/style.css') }}?v={{ time() }}"&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  4) CDN / Cloudflare purge cache or configure properly
&lt;/h3&gt;

&lt;p&gt;If you use Cloudflare or any CDN, it may serve cached CSS even after you update files.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;For a quick fix: &lt;strong&gt;Purge Cache → Purge Everything&lt;/strong&gt; (Cloudflare) or purge specific URLs.&lt;/li&gt;
&lt;li&gt;Better: configure your CDN to respect file-hash/versioning. If you use hashed filenames, leave CDN cache long (1 year) safe because filename changes with content.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  5) Set proper headers (server-side)
&lt;/h3&gt;

&lt;p&gt;For static assets, set far-future &lt;code&gt;Cache-Control&lt;/code&gt; and use hashed filenames. Example &lt;strong&gt;nginx&lt;/strong&gt; snippet:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight nginx"&gt;&lt;code&gt;&lt;span class="k"&gt;location&lt;/span&gt; &lt;span class="p"&gt;~&lt;/span&gt;&lt;span class="sr"&gt;*&lt;/span&gt; &lt;span class="err"&gt;\&lt;/span&gt;&lt;span class="s"&gt;.(css|js|jpg|jpeg|png|gif|ico|svg)&lt;/span&gt;$ &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kn"&gt;expires&lt;/span&gt; &lt;span class="s"&gt;365d&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kn"&gt;add_header&lt;/span&gt; &lt;span class="s"&gt;Cache-Control&lt;/span&gt; &lt;span class="s"&gt;"public,&lt;/span&gt; &lt;span class="s"&gt;max-age=31536000,&lt;/span&gt; &lt;span class="s"&gt;immutable"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;immutable&lt;/code&gt; means the browser can trust the cached file until the URL changes.&lt;/p&gt;




&lt;h3&gt;
  
  
  6) Laravel cache commands (still useful)
&lt;/h3&gt;

&lt;p&gt;These clear Laravel caches (won’t force browser to fetch new CSS but good for general deploy):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;php artisan view:clear
php artisan route:clear
php artisan config:clear
php artisan cache:clear
php artisan optimize:clear
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  How I fixed my real issue (short walkthrough)
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;I had linked &lt;code&gt;public/css/style.css&lt;/code&gt; directly.&lt;/li&gt;
&lt;li&gt;I built assets with Mix and enabled &lt;code&gt;mix.version()&lt;/code&gt; in &lt;code&gt;webpack.mix.js&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Replaced &lt;code&gt;&amp;lt;link href="{{ asset('css/style.css') }}"&amp;gt;&lt;/code&gt; with &lt;code&gt;&amp;lt;link href="{{ mix('css/style.css') }}"&amp;gt;&lt;/code&gt; in Blade.&lt;/li&gt;
&lt;li&gt;Ran &lt;code&gt;npm run prod&lt;/code&gt;, deployed new &lt;code&gt;public/mix-manifest.json&lt;/code&gt; and hashed files.&lt;/li&gt;
&lt;li&gt;Purged Cloudflare cache for the CSS URL.&lt;/li&gt;
&lt;li&gt;Tested on mobile (incognito) new styles were visible immediately.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That flow solved the problem forever no more users complaining.&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>css</category>
      <category>webdev</category>
      <category>caching</category>
    </item>
    <item>
      <title>How an Email Travels Across the Network</title>
      <dc:creator>Tahsin Abrar</dc:creator>
      <pubDate>Sat, 13 Sep 2025 13:38:50 +0000</pubDate>
      <link>https://forem.com/tahsin000/how-an-email-travels-across-the-network-ggb</link>
      <guid>https://forem.com/tahsin000/how-an-email-travels-across-the-network-ggb</guid>
      <description>&lt;p&gt;You (the sender) want to email Sakib (the receiver). Think of your email as a parcel. The internet is the postal system. We’ll walk through the &lt;strong&gt;5-layer TCP/IP model&lt;/strong&gt; and watch this parcel travel.&lt;/p&gt;

&lt;p&gt;Layers:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Application&lt;/li&gt;
&lt;li&gt;Transport&lt;/li&gt;
&lt;li&gt;Network&lt;/li&gt;
&lt;li&gt;Data Link&lt;/li&gt;
&lt;li&gt;Physical&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  1) Application Layer “Write &amp;amp; Prepare the Parcel”
&lt;/h2&gt;

&lt;p&gt;What happens:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You type the email and attach files.&lt;/li&gt;
&lt;li&gt;The email client (MUA) prepares an &lt;strong&gt;SMTP&lt;/strong&gt; message.&lt;/li&gt;
&lt;li&gt;Attachments are wrapped using &lt;strong&gt;MIME&lt;/strong&gt; (and often compressed or base64-encoded).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;TLS&lt;/strong&gt; (encryption) is planned so nobody can read the email on the wire.&lt;/li&gt;
&lt;/ul&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%2F42wh5m62ldlsvvmjs7fc.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%2F42wh5m62ldlsvvmjs7fc.png" alt="Application Layer" width="800" height="1774"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Standard practices&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Keep attachments small; many providers limit to ~20–25 MB. Prefer cloud links for big files.&lt;/li&gt;
&lt;li&gt;Use &lt;strong&gt;UTF-8&lt;/strong&gt; for text.&lt;/li&gt;
&lt;li&gt;Turn on &lt;strong&gt;TLS&lt;/strong&gt; (STARTTLS or implicit TLS) so the path is encrypted.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Quick mental hook:&lt;/strong&gt; “Write it, wrap it, lock it (TLS).”&lt;/p&gt;




&lt;h2&gt;
  
  
  2) Transport Layer “Cut Into Chunks &amp;amp; Number Them”
&lt;/h2&gt;

&lt;p&gt;What happens:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The SMTP message may be bigger than what the network can send at once.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;TCP&lt;/strong&gt; splits it into &lt;strong&gt;segments&lt;/strong&gt; (chunks), numbers each, and ensures delivery with ACKs.&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;3-way handshake&lt;/strong&gt; (SYN, SYN-ACK, ACK) sets up the session.&lt;/li&gt;
&lt;li&gt;Client uses an &lt;strong&gt;ephemeral port&lt;/strong&gt;; server listens on a &lt;strong&gt;well-known port&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Ports (common)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Submission: &lt;strong&gt;587&lt;/strong&gt; (SMTP with STARTTLS)&lt;/li&gt;
&lt;li&gt;SMTP server to server: &lt;strong&gt;25&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;IMAP over TLS: &lt;strong&gt;993&lt;/strong&gt;, POP3 over TLS: &lt;strong&gt;995&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&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%2Fl4zo9bipel1ukj57bhs9.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%2Fl4zo9bipel1ukj57bhs9.png" alt="Transport Layer" width="800" height="1071"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Standard practices&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Submit mail on &lt;strong&gt;587&lt;/strong&gt; with authentication and STARTTLS.&lt;/li&gt;
&lt;li&gt;Don’t disable &lt;strong&gt;Nagle/algorithms&lt;/strong&gt; etc. without reason; defaults are usually fine.&lt;/li&gt;
&lt;li&gt;If sending very large data often, consider links instead of huge attachments.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Quick mental hook:&lt;/strong&gt; “Cut, number, handshake.”&lt;/p&gt;




&lt;h2&gt;
  
  
  3) Network Layer “Put IP Addresses On Every Chunk”
&lt;/h2&gt;

&lt;p&gt;What happens:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Each TCP segment is wrapped in an &lt;strong&gt;IP packet&lt;/strong&gt; with &lt;strong&gt;source IP&lt;/strong&gt; and &lt;strong&gt;destination IP&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Routers use the destination IP to forward packets hop by hop to Sakib’s mail server.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;TTL&lt;/strong&gt; (time to live) prevents endless looping.&lt;/li&gt;
&lt;/ul&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%2Fri9uoshi4bilechcwaub.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%2Fri9uoshi4bilechcwaub.png" alt="Network Layer" width="800" height="630"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Standard practices&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Make sure DNS and &lt;strong&gt;MX records&lt;/strong&gt; for your domain are correct (delivery depends on it).&lt;/li&gt;
&lt;li&gt;Your client is often behind &lt;strong&gt;NAT&lt;/strong&gt;; your router translates private IP → public IP.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Quick mental hook:&lt;/strong&gt; “Address every page with IP.”&lt;/p&gt;




&lt;h2&gt;
  
  
  4) Data Link Layer “Wrap For The Local Hop (MAC &amp;amp; Frame)”
&lt;/h2&gt;

&lt;p&gt;What happens:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;On each local link (your Wi-Fi/Ethernet, your ISP’s next hop), IP packets are wrapped into &lt;strong&gt;frames&lt;/strong&gt; with &lt;strong&gt;MAC addresses&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ARP&lt;/strong&gt; resolves “which MAC is next?” for local delivery.&lt;/li&gt;
&lt;li&gt;Each hop unwraps/re-wraps frames as the packet moves through.&lt;/li&gt;
&lt;/ul&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%2Fl63dfr70k4f5faiecy0z.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%2Fl63dfr70k4f5faiecy0z.png" alt="Data Link Layer" width="800" height="630"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Standard practices&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;On unstable Wi-Fi, expect retries. For important sends, prefer a stable link (Ethernet).&lt;/li&gt;
&lt;li&gt;Keep drivers/firmware updated for fewer link-level drops.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Quick mental hook:&lt;/strong&gt; “Local delivery uses MAC.”&lt;/p&gt;




&lt;h2&gt;
  
  
  5) Physical Layer “Turn Frames Into Signals”
&lt;/h2&gt;

&lt;p&gt;What happens:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Frames become electrical/optical/radio &lt;strong&gt;signals&lt;/strong&gt; (Ethernet, fiber, Wi-Fi).&lt;/li&gt;
&lt;li&gt;Bits travel over cables/air between devices.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Standard practices&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use good cables/APs. Poor cables and congested Wi-Fi = packet loss → TCP retransmissions → slow email sends.&lt;/li&gt;
&lt;li&gt;For offices, wire critical machines.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Quick mental hook:&lt;/strong&gt; “Bits ride wires or waves.”&lt;/p&gt;




&lt;h2&gt;
  
  
  On Sakib’s Side “Unwrap &amp;amp; Reassemble”
&lt;/h2&gt;

&lt;p&gt;Reverse happens:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Physical → Data Link → Network → Transport → Application.&lt;/li&gt;
&lt;li&gt;TCP reorders segments, fills gaps, and hands the complete message to SMTP on the server.&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;Mail Delivery Agent&lt;/strong&gt; stores it in Sakib’s mailbox.&lt;/li&gt;
&lt;li&gt;Sakib opens her client (IMAP/POP3) and reads it.&lt;/li&gt;
&lt;/ul&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%2Fae0j2e34h3l7hsely25b.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%2Fae0j2e34h3l7hsely25b.png" alt="Physical Layer" width="800" height="1018"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>networking</category>
      <category>email</category>
      <category>developers</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
