<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: A.S Nasseri</title>
    <description>The latest articles on DEV Community by A.S Nasseri (@nassiry).</description>
    <link>https://dev.to/nassiry</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%2F2639737%2Fc1e260b2-7263-4003-88bb-c69304562cbc.jpeg</url>
      <title>DEV Community: A.S Nasseri</title>
      <link>https://dev.to/nassiry</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nassiry"/>
    <language>en</language>
    <item>
      <title>Handle Browser Storage Like a Pro with Kando (2KB Magic!)</title>
      <dc:creator>A.S Nasseri</dc:creator>
      <pubDate>Mon, 28 Apr 2025 05:42:57 +0000</pubDate>
      <link>https://dev.to/nassiry/handle-browser-storage-like-a-pro-with-kando-2kb-magic-4ajl</link>
      <guid>https://dev.to/nassiry/handle-browser-storage-like-a-pro-with-kando-2kb-magic-4ajl</guid>
      <description>&lt;p&gt;Managing &lt;code&gt;localStorage&lt;/code&gt; and &lt;code&gt;sessionStorage&lt;/code&gt; should be simple, lightweight, and powerful not bloated or painful.&lt;br&gt;
That's why I built &lt;a href="https://github.com/nassiry/kando-storage" rel="noopener noreferrer"&gt;Kando&lt;/a&gt;, a tiny (just ~2KB gzipped!) JavaScript library that gives you &lt;strong&gt;next-level control&lt;/strong&gt; over browser storage &lt;strong&gt;with support for expiration times, deep nested objects, arrays, and TypeScript types.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;No more writing repetitive boilerplate or worrying about browser quirks &lt;a href="https://github.com/nassiry/kando-storage" rel="noopener noreferrer"&gt;Kando&lt;/a&gt; handles it for you!&lt;/p&gt;

&lt;h2&gt;
  
  
  Why &lt;a href="https://github.com/nassiry/kando-storage" rel="noopener noreferrer"&gt;Kando&lt;/a&gt;?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Ultra lightweight:&lt;/strong&gt; ~2KB gzipped&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deep object and array support:&lt;/strong&gt; access nested keys easily&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Session expiration:&lt;/strong&gt; automatic expiry for sessionStorage items&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fallback ready:&lt;/strong&gt; works even if storage is unavailable&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;TypeScript support:&lt;/strong&gt; fully typed out of the box&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zero dependencies:&lt;/strong&gt; pure and clean JavaScript&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Open source and easy to extend&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Installation
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Node.js:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install &lt;/span&gt;kando-storage
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Browser:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&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;"path/to/kando.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;h2&gt;
  
  
  Quick Examples
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Node.js
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;kando&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;kando-storage&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Set a nested value&lt;/span&gt;
&lt;span class="nf"&gt;kando&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;local.user.name&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;John Doe&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Get a nested value&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;userName&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;kando&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;local.user.name&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;userName&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// John Doe&lt;/span&gt;

&lt;span class="c1"&gt;// Remove a value&lt;/span&gt;
&lt;span class="nf"&gt;kando&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;local.user.name&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Session storage with expiration (in seconds)&lt;/span&gt;
&lt;span class="nf"&gt;kando&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;session.auth.token&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;abcd1234&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3600&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Expires in 1 hour&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Advanced Examples
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Store a namespaced object with arrays&lt;/span&gt;
&lt;span class="nf"&gt;kando&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;local.appConfig&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="na"&gt;theme&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;dark&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;languages&lt;/span&gt;&lt;span class="p"&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;en&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;es&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;fr&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="na"&gt;settings&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;notifications&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;autoSave&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// Access nested array item&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;languages&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;kando&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;local.appConfig.languages&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// ['en', 'es', 'fr']&lt;/span&gt;

&lt;span class="c1"&gt;// Update a setting within the nested object&lt;/span&gt;
&lt;span class="nf"&gt;kando&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;local.appConfig.settings.notifications&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Add a new language to the languages array&lt;/span&gt;
&lt;span class="nf"&gt;kando&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;local.appConfig.languages[3]&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;de&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// ['en', 'es', 'fr', 'de']&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Features You’ll Love
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Deep Access:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nf"&gt;kando&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;local.cart.items[0].name&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;Laptop&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Safe Expiration Handling:&lt;/strong&gt; If a &lt;code&gt;sessionStorage&lt;/code&gt; item expires, &lt;a href="https://github.com/nassiry/kando-storage" rel="noopener noreferrer"&gt;Kando&lt;/a&gt; automatically cleans it up for you.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Simple Deletion:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nf"&gt;kando&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;local.settings.theme&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Deletes the theme&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;TypeScript Friendly:&lt;/strong&gt; With provided &lt;code&gt;.d.ts&lt;/code&gt;, you get full intellisense and stricter types while coding!&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why I Built Kando
&lt;/h2&gt;

&lt;p&gt;Most storage utilities are either &lt;strong&gt;too heavy&lt;/strong&gt;, &lt;strong&gt;too opinionated&lt;/strong&gt;, or &lt;strong&gt;lack expiration support&lt;/strong&gt;.&lt;br&gt;
I wanted something &lt;strong&gt;minimal&lt;/strong&gt; but &lt;strong&gt;smart enough&lt;/strong&gt; for real-world applications, with &lt;strong&gt;deep nested paths&lt;/strong&gt; and &lt;strong&gt;auto-cleanups&lt;/strong&gt; built-in.&lt;/p&gt;

&lt;p&gt;Thus, &lt;a href="https://github.com/nassiry/kando-storage" rel="noopener noreferrer"&gt;Kando&lt;/a&gt; was born: a "small but mighty" helper to make storage &lt;strong&gt;elegant again&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Get Involved
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;GitHub Repository: &lt;a href="https://github.com/nassiry/kando-storage" rel="noopener noreferrer"&gt;Kando&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Star&lt;/strong&gt; it if you like it contributions and feedback are super welcome!&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;If you're tired of bloated libraries for simple storage needs give &lt;a href="https://github.com/nassiry/kando-storage" rel="noopener noreferrer"&gt;Kando&lt;/a&gt; a try.&lt;br&gt;
It’s tiny, powerful, and built with developer happiness in mind.&lt;/p&gt;

&lt;p&gt;Let’s make browser storage &lt;strong&gt;simple again!&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>programming</category>
      <category>typescript</category>
    </item>
    <item>
      <title>Fanos: The Ultimate Beacon API Wrapper for Reliable Data Transmission</title>
      <dc:creator>A.S Nasseri</dc:creator>
      <pubDate>Tue, 25 Feb 2025 06:16:05 +0000</pubDate>
      <link>https://dev.to/nassiry/fanos-the-ultimate-beacon-api-wrapper-for-reliable-data-transmission-kj8</link>
      <guid>https://dev.to/nassiry/fanos-the-ultimate-beacon-api-wrapper-for-reliable-data-transmission-kj8</guid>
      <description>&lt;p&gt;Sending data asynchronously in web applications can be tricky, especially when you need reliability without blocking the main thread. Meet &lt;a href="https://github.com/nassiry/fanosjs" rel="noopener noreferrer"&gt;Fanos&lt;/a&gt;, a lightweight JavaScript library that simplifies sending asynchronous requests using the &lt;strong&gt;Beacon API&lt;/strong&gt; with a fallback to Fetch for maximum reliability.&lt;/p&gt;

&lt;p&gt;Whether you're building analytics, logging systems, or tracking user interactions, &lt;a href="https://github.com/nassiry/fanosjs" rel="noopener noreferrer"&gt;Fanos&lt;/a&gt; ensures your data is transmitted efficiently and reliably, even in challenging network conditions.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Non-blocking requests&lt;/strong&gt;: Uses the &lt;code&gt;Beacon&lt;/code&gt; API for asynchronous data transmission.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automatic retries&lt;/strong&gt;: Stores failed requests and retries them automatically.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fetch fallback&lt;/strong&gt;: Falls back to the &lt;code&gt;Fetch&lt;/code&gt; API if &lt;code&gt;Beacon&lt;/code&gt; isn’t supported.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multiple payload formats&lt;/strong&gt;: Supports &lt;code&gt;JSON&lt;/code&gt;, &lt;code&gt;FormData&lt;/code&gt;, &lt;code&gt;Blobs&lt;/code&gt;, and more.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Debug mode&lt;/strong&gt;: Logs internal operations for easy troubleshooting.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Install
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Install &lt;a href="https://github.com/nassiry/fanosjs" rel="noopener noreferrer"&gt;Fanos&lt;/a&gt; via npm:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install &lt;/span&gt;fanos
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or include it directly in your HTML:&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;"https://cdn.jsdelivr.net/npm/fanos@latest/dist/fanos.umd.min.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;h2&gt;
  
  
  Basic Usage
&lt;/h2&gt;

&lt;p&gt;Here’s how to get started in just a few lines of code:&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="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;Fanos&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;fanos&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// Configure the global instance&lt;/span&gt;
&lt;span class="nx"&gt;Fanos&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;configure&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;https://example.com/api/log&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// Your endpoint&lt;/span&gt;
    &lt;span class="na"&gt;debug&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// Enable debug logging&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// Send a simple payload&lt;/span&gt;
&lt;span class="nx"&gt;Fanos&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;send&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;event&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;click&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;timestamp&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;now&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="nf"&gt;then&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Data sent successfully!&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="k"&gt;catch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Failed to send data:&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Browser Support
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/nassiry/fanosjs" rel="noopener noreferrer"&gt;Fanos&lt;/a&gt; works in all modern browsers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Chrome&lt;/li&gt;
&lt;li&gt;Firefox&lt;/li&gt;
&lt;li&gt;Safari&lt;/li&gt;
&lt;li&gt;Edge&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For older browsers, enable the Fetch fallback:&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;Fanos&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;configure&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;fallbackToFetch&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Get Started Today!
&lt;/h2&gt;

&lt;p&gt;Ready to simplify your data transmission? Check out the &lt;a href="https://github.com/nassiry/fanosjs" rel="noopener noreferrer"&gt;Fanos GitHub repository&lt;/a&gt; for more details, examples, and documentation.&lt;strong&gt;Give it a START or contribute if you like it.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>productivity</category>
      <category>html</category>
    </item>
    <item>
      <title>Encode and Decode in JavaScript Using Base64Plus</title>
      <dc:creator>A.S Nasseri</dc:creator>
      <pubDate>Tue, 04 Feb 2025 04:31:41 +0000</pubDate>
      <link>https://dev.to/nassiry/encode-and-decode-in-javascript-using-base64plus-432h</link>
      <guid>https://dev.to/nassiry/encode-and-decode-in-javascript-using-base64plus-432h</guid>
      <description>&lt;p&gt;If you've ever worked with &lt;strong&gt;Base64&lt;/strong&gt; encoding and decoding in JavaScript, you know how essential it is for handling data like images, files, or API responses. However, the native JavaScript functions &lt;code&gt;(btoa and atob)&lt;/code&gt; can sometimes feel limiting, especially when dealing with special characters or non-ASCII strings. Enter &lt;a href="https://github.com/nassiry/base64plus" rel="noopener noreferrer"&gt;Base64Plus&lt;/a&gt; a lightweight and efficient npm package that simplifies Base64 encoding and decoding while addressing common pain points.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Choose Base64Plus?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Unicode Support&lt;/strong&gt;: Handles multi-byte characters seamlessly, ensuring accurate encoding and decoding of Unicode strings.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cross-Platform Compatibility&lt;/strong&gt;: Works effortlessly in both Node.js and browser environments.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;TypeScript Ready&lt;/strong&gt;: Fully typed, making it ideal for modern JavaScript and TypeScript projects.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No Dependencies&lt;/strong&gt;: Lightweight with zero external dependencies.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  You can install Base64Plus using npm:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install &lt;/span&gt;base64plus
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Alternatively, include it directly in your HTML via a CDN:&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;"base64Plus.umd.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;script&amp;gt;&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;Base64Plus&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;encode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Hello, World!&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  In Node.js (CommonJS):
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;Base64Plus&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;base64plus&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;originalText&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Hello, World!&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;encodedText&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;Base64Plus&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;encode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;originalText&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;encodedText&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Outputs: Base64 string&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;decodedText&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;Base64Plus&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;decode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;encodedText&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;decodedText&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Outputs: "Hello, World!"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  In ES Modules:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;Base64Plus&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;base64plus&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;originalText&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;こんにちは&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;encodedText&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;Base64Plus&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;encode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;originalText&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;encodedText&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Outputs: Base64 string&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;decodedText&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;Base64Plus&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;decode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;encodedText&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;decodedText&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Outputs: "こんにちは"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/nassiry/base64plus" rel="noopener noreferrer"&gt;Base64Plus&lt;/a&gt; simplifies the process of encoding and decoding Base64, especially when dealing with Unicode characters. Its versatility across different environments and support for modern development practices make it a valuable tool for developers. For more information and to access the source code, visit the &lt;a href="https://github.com/nassiry/base64plus" rel="noopener noreferrer"&gt;Base64Plus GitHub repository.&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>productivity</category>
      <category>typescript</category>
    </item>
    <item>
      <title>Animate Adding Items to Your Cart with cartflow, A Lightweight JavaScript Library</title>
      <dc:creator>A.S Nasseri</dc:creator>
      <pubDate>Wed, 29 Jan 2025 07:55:52 +0000</pubDate>
      <link>https://dev.to/nassiry/animate-adding-items-to-your-cart-with-cartflow-a-lightweight-javascript-library-3921</link>
      <guid>https://dev.to/nassiry/animate-adding-items-to-your-cart-with-cartflow-a-lightweight-javascript-library-3921</guid>
      <description>&lt;p&gt;The user experience on e-commerce sites is often enhanced by small visual effects. One such effect is animating the transition of an item to the shopping cart, which adds a dynamic touch to the process. &lt;a href="https://github.com/nassiry/cartflow" rel="noopener noreferrer"&gt;cartflow&lt;/a&gt; is a lightweight JavaScript library that does just that animating the smooth movement of items to the cart.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is cartflow?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/nassiry/cartflow" rel="noopener noreferrer"&gt;cartflow&lt;/a&gt; is a modern and minimalistic JavaScript library designed to animate items being added to a shopping cart. It provides a smooth "fly-to-cart" effect, helping to visualize the process for users as items move seamlessly to the cart.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Smooth animations for "Add to Cart" interactions.&lt;/li&gt;
&lt;li&gt;Customizable configuration for various options (duration, easing, shake effect).&lt;/li&gt;
&lt;li&gt;Optional sound effect to enhance the animation.&lt;/li&gt;
&lt;li&gt;Cart shake effect for added visual feedback after adding an item.&lt;/li&gt;
&lt;li&gt;Fallback mechanism for GSAP (for animation).&lt;/li&gt;
&lt;li&gt;Works in modern browsers and Node.js.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Installation and Usage:
&lt;/h2&gt;

&lt;p&gt;You can install &lt;a href="https://github.com/nassiry/cartflow" rel="noopener noreferrer"&gt;cartflow&lt;/a&gt; via npm or include it directly in your HTML. Here’s how:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Using npm:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install &lt;/span&gt;cartflow
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Using a&lt;/strong&gt; &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; &lt;strong&gt;tag (for browsers):&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&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;"CartFlow.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;h2&gt;
  
  
  See CartFlow in action here: &lt;a href="https://nassiry.github.io/cartflow/" rel="noopener noreferrer"&gt;Live Demo&lt;/a&gt;
&lt;/h2&gt;




&lt;p&gt;&lt;strong&gt;Once installed, here’s a quick example of how to use it:&lt;/strong&gt;&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="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;CartFlow&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;cartflow&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;animation&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;CartFlow&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;cartSelector&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;.shopping-cart&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;        &lt;span class="c1"&gt;// Selector for the cart element&lt;/span&gt;
    &lt;span class="na"&gt;buttonSelector&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;.add-to-cart&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;        &lt;span class="c1"&gt;// Selector for the add-to-cart buttons&lt;/span&gt;
    &lt;span class="na"&gt;soundEffect&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;click-sound.mp3&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;        &lt;span class="c1"&gt;// Optional sound effect&lt;/span&gt;
    &lt;span class="na"&gt;onComplete&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Item successfully added to cart!&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="na"&gt;onCartShake&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;cart&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Cart shake effect completed!&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;cart&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;h2&gt;
  
  
  Customizable Configuration Options:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;cartSelector&lt;/strong&gt;: CSS selector for the cart element.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;buttonSelector&lt;/strong&gt;: CSS selector for the add-to-cart buttons.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;animationDuration&lt;/strong&gt;: Duration of the animation (in milliseconds).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;easing&lt;/strong&gt;: Easing function for the animation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;shakeEffect&lt;/strong&gt;: Enable or disable the shake effect after adding an item.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;soundEffect&lt;/strong&gt;: URL or Audio object for an optional sound effect.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why Use cartflow?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Easy Integration&lt;/strong&gt;: With minimal setup and simple configuration, cartflow is a breeze to implement in your project.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Lightweight&lt;/strong&gt;: It’s a small and efficient library, ensuring it won’t slow down your site.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Enhanced User Experience&lt;/strong&gt;: The smooth animation and optional effects (like sound and shake) provide users with immediate feedback, making the shopping experience feel more dynamic.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Customizable&lt;/strong&gt;: Tailor the animation speed, easing, and sound effects to fit your site’s design and user experience.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion:
&lt;/h2&gt;

&lt;p&gt;For developers looking to add a smooth and visually appealing "add to cart" animation to their e-commerce site, &lt;a href="https://github.com/nassiry/cartflow" rel="noopener noreferrer"&gt;cartflow&lt;/a&gt; is an excellent choice. It's simple, customizable, and helps improve user engagement without complex setup.&lt;/p&gt;

&lt;p&gt;Check out the &lt;a href="https://github.com/nassiry/cartflow" rel="noopener noreferrer"&gt;GitHub repository&lt;/a&gt; to get started and add a little magic to your shopping cart!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>html</category>
      <category>typescript</category>
    </item>
    <item>
      <title>10 Hilarious Coding Memes That Only Developers Will Get</title>
      <dc:creator>A.S Nasseri</dc:creator>
      <pubDate>Sun, 19 Jan 2025 04:58:24 +0000</pubDate>
      <link>https://dev.to/nassiry/10-hilarious-coding-memes-that-only-developers-will-get-35mg</link>
      <guid>https://dev.to/nassiry/10-hilarious-coding-memes-that-only-developers-will-get-35mg</guid>
      <description>&lt;p&gt;If you’ve ever spent late nights debugging code, accidentally pushed to production, or wondered why your code isn’t working only to realize you missed a semicolon, you’ll love these memes. Here are 10 hilarious coding memes that perfectly capture the highs, lows, and laughs of being a developer. Humor plays a crucial role in the developer community by helping us cope with challenges and celebrate our shared experiences.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. &lt;strong&gt;The Classic Debugging Process&lt;/strong&gt;
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Why doesn’t this work?" → "Why does this work?"&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;We’ve all been there—you fix one bug, only to discover the code works in ways you can’t explain. Debugging is 10% fixing errors and 90% trying to understand what you’ve done. Like that time you spent hours on a bug, only to realize you forgot to save the file before running it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# debugging moment
&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;
&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;add_one&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;num&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;num&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;add_one&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="c1"&gt;# Did I save the file before running?
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. &lt;strong&gt;When the Code Finally Works&lt;/strong&gt;
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"It’s not a bug, it’s a feature!"&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That sweet moment when you stop fixing the bug and convince the client it was meant to be like this all along.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. &lt;strong&gt;Git: The Source of Truth and Anxiety&lt;/strong&gt;
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"When you accidentally &lt;code&gt;git push&lt;/code&gt; to production."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The calm before the storm: 0.01 seconds after hitting enter, you realize you’ve made a huge mistake.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. &lt;strong&gt;The Joys of Naming Variables&lt;/strong&gt;
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Me: Names variable &lt;code&gt;x&lt;/code&gt;... Future me: What does &lt;code&gt;x&lt;/code&gt; even mean?"&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Naming things is one of the two hardest problems in computer science. The other? Cache invalidation.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. &lt;strong&gt;Hello, World!&lt;/strong&gt;
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"First day of coding: Prints &lt;code&gt;Hello, World!&lt;/code&gt;. Feels like a genius."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Every programmer’s first victory. It doesn’t matter how small, you’ll never forget that first &lt;code&gt;console.log&lt;/code&gt; success.&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;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Hello, World!&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  6. &lt;strong&gt;Stack Overflow to the Rescue&lt;/strong&gt;
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"When you copy-paste from Stack Overflow and it works on the first try."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Every developer’s secret weapon: Stack Overflow. Who needs to memorize syntax when you have this lifesaver?&lt;/p&gt;

&lt;h3&gt;
  
  
  7. &lt;strong&gt;The "Works on My Machine" Excuse&lt;/strong&gt;
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"It works on my machine. Not my problem."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Deploying your code only to find out it breaks everything for everyone else. Classic.&lt;/p&gt;

&lt;h3&gt;
  
  
  8. &lt;strong&gt;Tabs vs Spaces War&lt;/strong&gt;
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Tabs are better! No, spaces are better!"&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The debate that has torn the programming world apart for years. Developers argue about tabs vs. spaces because it reflects personal coding style, team preferences, and even IDE configurations. Where do you stand?&lt;/p&gt;

&lt;h3&gt;
  
  
  9. &lt;strong&gt;Deadline Panic&lt;/strong&gt;
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Two days before the deadline: Let’s rewrite everything."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Because nothing says "productive" like a last-minute rewrite that you’ll probably regret.&lt;/p&gt;

&lt;h3&gt;
  
  
  10. &lt;strong&gt;Infinite Loops&lt;/strong&gt;
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"When you write an infinite loop and wonder why your program is stuck."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;We’ve all done it. Sometimes, the bug is just you forgetting a &lt;code&gt;break&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="cp"&gt;#include&lt;/span&gt; &lt;span class="cpf"&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;
&lt;/span&gt;
&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;printf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Loop iteration: %d&lt;/span&gt;&lt;span class="err"&gt;
&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="k"&gt;break&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="k"&gt;return&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Laughter is the Best Debugger
&lt;/h3&gt;

&lt;p&gt;Coding can be stressful, but a good laugh can remind you why you love programming. Humor helps break the monotony of debugging for hours, softens the blow of unexpected errors, and brings teams together during tight deadlines. Which of these memes made you laugh the most? Let me know in the comments or share your favorite coding meme below!&lt;/p&gt;

&lt;p&gt;Happy coding!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>softwaredevelopment</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>Top 5 Mistakes Junior Developers Make</title>
      <dc:creator>A.S Nasseri</dc:creator>
      <pubDate>Thu, 16 Jan 2025 19:28:30 +0000</pubDate>
      <link>https://dev.to/nassiry/top-5-mistakes-junior-developers-make-5eep</link>
      <guid>https://dev.to/nassiry/top-5-mistakes-junior-developers-make-5eep</guid>
      <description>&lt;p&gt;Starting your journey as a developer is exciting, but let’s be real—it can feel overwhelming at times. Mistakes are part of the process (we’ve all been there!). However, some mistakes can slow you down more than others. In this post, I’ll share the top 5 mistakes junior developers make and how you can dodge them like a pro. 🚀&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Not Asking for Help
&lt;/h3&gt;

&lt;p&gt;Picture this: you’re stuck on a problem, and instead of asking for help, you spend hours trying to solve it. Sound familiar? While being resourceful is great, spending too much time stuck can leave you frustrated and behind schedule.&lt;/p&gt;

&lt;h4&gt;
  
  
  🛠 How to Avoid It:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Spend some time (30 minutes) researching or debugging, then ask for help if needed.&lt;/li&gt;
&lt;li&gt;Start by asking teammates or mentors—they’ve likely faced similar issues.&lt;/li&gt;
&lt;li&gt;Remember: It’s better to ask and learn than to stay stuck.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Skipping Code Comments and Documentation
&lt;/h3&gt;

&lt;p&gt;Ever revisit your code after a week and think, “What does this do again?” Trust me, future you (and your teammates) will thank you for good comments and documentation.&lt;/p&gt;

&lt;h4&gt;
  
  
  🛠 How to Avoid It:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Add short, meaningful comments where needed (not for every single line).&lt;/li&gt;
&lt;li&gt;Use tools like JSDoc or Swagger to create consistent documentation.&lt;/li&gt;
&lt;li&gt;Think about writing code like telling a story—would someone new understand it?&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Focusing Too Much on Fancy Tools
&lt;/h3&gt;

&lt;p&gt;Frameworks and libraries are cool, but diving into them without a solid understanding of the basics is a recipe for confusion. Imagine building a house without knowing how to use a hammer.&lt;/p&gt;

&lt;h4&gt;
  
  
  🛠 How to Avoid It:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Nail down the core language first (learn JavaScript before React).&lt;/li&gt;
&lt;li&gt;Ask yourself: Do I understand how this works under the hood?&lt;/li&gt;
&lt;li&gt;Learn one tool at a time—don’t try to master everything at once.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. Being Afraid of Making Mistakes
&lt;/h3&gt;

&lt;p&gt;It’s natural to feel nervous about breaking something, but avoiding mistakes altogether will stop you from growing. Fun fact: Even senior developers mess up (and that’s why Git exists).&lt;/p&gt;

&lt;h4&gt;
  
  
  🛠 How to Avoid It:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Use Git for version control so mistakes are reversible.&lt;/li&gt;
&lt;li&gt;Test your code often and early—it’s better to find bugs locally than in production!&lt;/li&gt;
&lt;li&gt;Remember, every mistake you make is a lesson learned.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  5. Neglecting Communication Skills
&lt;/h3&gt;

&lt;p&gt;Coding isn’t a one-person job—you’ll often need to explain your work to others. Poor communication can lead to misunderstandings, slower progress, or even conflicts.&lt;/p&gt;

&lt;h4&gt;
  
  
  🛠 How to Avoid It:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Practice explaining your code to someone without technical knowledge.&lt;/li&gt;
&lt;li&gt;Keep your team updated about progress, blockers, and ideas.&lt;/li&gt;
&lt;li&gt;Be open to feedback—it’s how you’ll grow.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Final Thoughts
&lt;/h3&gt;

&lt;p&gt;Mistakes are normal (and even helpful), but avoiding these common ones will save you a lot of headaches as a junior developer. Focus on improving a little every day, and don’t forget to enjoy the process!&lt;/p&gt;

&lt;p&gt;What’s a mistake you made early in your career? Let’s share and learn together in the comments! &lt;/p&gt;

</description>
      <category>beginners</category>
      <category>webdev</category>
      <category>softwaredevelopment</category>
      <category>programming</category>
    </item>
    <item>
      <title>10 Things I Wish I Knew Before Starting Web Development</title>
      <dc:creator>A.S Nasseri</dc:creator>
      <pubDate>Thu, 16 Jan 2025 19:11:33 +0000</pubDate>
      <link>https://dev.to/nassiry/10-things-i-wish-i-knew-before-starting-web-development-4a7e</link>
      <guid>https://dev.to/nassiry/10-things-i-wish-i-knew-before-starting-web-development-4a7e</guid>
      <description>&lt;p&gt;Starting your journey as a web developer can be both exciting and overwhelming. Like many beginners, I dove in headfirst, learning through trial and error. In hindsight, there are several things I wish I had known before I started. Hopefully, these insights can make your journey a little smoother.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. &lt;strong&gt;HTML and CSS Are Deeper Than They Seem&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;HTML and CSS may look simple at first glance, but mastering them takes time. Semantic HTML, accessibility (a11y), and responsive design are essential skills often overlooked in beginner tutorials. Don’t rush through them—they form the foundation of everything you build.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. &lt;strong&gt;JavaScript Is Everywhere&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Learning JavaScript is non-negotiable for modern web development. It’s not just for adding interactive elements; it powers frameworks like React, backend environments like Node.js, and even mobile apps with tools like React Native. Get comfortable with vanilla JavaScript before diving into frameworks.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. &lt;strong&gt;Frameworks and Libraries Aren’t Magic&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Frameworks like React, Angular, and Vue can make development faster, but they come with a learning curve. More importantly, they aren’t a substitute for understanding core web development principles. Learn the basics before you rely on a framework.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. &lt;strong&gt;Version Control Is a Lifesaver&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;I wish I had started using Git and GitHub sooner. Version control allows you to track changes, collaborate with others, and roll back to previous versions when things go wrong. Don’t wait until your first job to learn it—it’s an invaluable skill for personal projects too.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. &lt;strong&gt;The Browser Is Your Best Friend&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Modern browsers like Chrome and Firefox come with powerful developer tools. Inspect elements, debug JavaScript, and monitor network activity right in your browser. Learning to use these tools effectively can save you countless hours.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. &lt;strong&gt;Responsive Design Is a Must&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;With the variety of devices people use to access the web, making your websites mobile-friendly is essential. Learn about media queries, flexible layouts, and tools like CSS Grid and Flexbox. Testing on different screen sizes should become a habit.&lt;/p&gt;

&lt;h3&gt;
  
  
  7. &lt;strong&gt;You Don’t Need to Learn Everything at Once&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Web development is a vast field, and it’s easy to feel overwhelmed. Focus on one thing at a time. Start with HTML, CSS, and JavaScript. Once you’re comfortable, branch out into backend development, frameworks, or other specialized areas.&lt;/p&gt;

&lt;h3&gt;
  
  
  8. &lt;strong&gt;Accessibility Matters&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Accessibility isn’t just a nice-to-have; it’s crucial. Learn about ARIA roles, semantic HTML, and testing tools like Lighthouse or WAVE. Building accessible websites not only widens your audience but also makes you a more responsible developer.&lt;/p&gt;

&lt;h3&gt;
  
  
  9. &lt;strong&gt;Soft Skills Are Just as Important&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Coding is only part of the job. Communication, problem-solving, and teamwork are equally important, especially when working on collaborative projects. Don’t underestimate the value of clear documentation and the ability to explain your code to others.&lt;/p&gt;

&lt;h3&gt;
  
  
  10. &lt;strong&gt;You’ll Never Stop Learning&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Web development evolves quickly. There will always be new languages, frameworks, and tools to learn. Instead of trying to keep up with everything, focus on building a strong foundation and staying curious. The ability to adapt is more valuable than knowing every trend.&lt;/p&gt;

&lt;h3&gt;
  
  
  Final Thoughts
&lt;/h3&gt;

&lt;p&gt;Web development is a rewarding journey, but it’s also full of challenges. By focusing on the fundamentals, embracing lifelong learning, and staying patient with yourself, you can avoid some of the pitfalls I encountered. Remember, every expert was once a beginner. Enjoy the process, and happy coding!&lt;/p&gt;

&lt;p&gt;What lessons have you learned in your web development journey? Share them in the comments below!&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>webdev</category>
      <category>softwaredevelopment</category>
      <category>html</category>
    </item>
    <item>
      <title>What I Learned After Coding for 24 Hours Straight</title>
      <dc:creator>A.S Nasseri</dc:creator>
      <pubDate>Sun, 12 Jan 2025 16:55:36 +0000</pubDate>
      <link>https://dev.to/nassiry/what-i-learned-after-coding-for-24-hours-straight-3nhp</link>
      <guid>https://dev.to/nassiry/what-i-learned-after-coding-for-24-hours-straight-3nhp</guid>
      <description>&lt;p&gt;Let me start by saying: coding for 24 hours straight is not for the faint of heart. Whether you’re pulling an all-nighter to meet a deadline, participating in a hackathon, or just testing your limits, it’s an intense experience that pushes you mentally and physically. I recently embarked on this journey, and it taught me a lot about myself, my coding habits, and the importance of balance. Here are the biggest lessons I took away from my 24-hour coding marathon.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Preparation is Key
&lt;/h3&gt;

&lt;p&gt;Before I started, I made sure to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Outline a clear plan: I broke down the tasks into manageable chunks.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Gather supplies: snacks, water, and caffeine were essential.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Set up a comfortable workspace: having a proper desk, chair, and lighting made a huge difference.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Takeaway:&lt;/strong&gt; Preparation can save you time and energy. Spend a bit of time upfront planning so you don’t waste hours later.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Your Brain Has Limits
&lt;/h3&gt;

&lt;p&gt;Around the 8-hour mark, I started noticing diminishing returns. Tasks that should have been simple took twice as long, and debugging became a frustrating process.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Takeaway:&lt;/strong&gt; Cognitive fatigue is real. Even if you’re passionate about your work, your brain needs rest to perform at its best.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Breaks Are Non-Negotiable
&lt;/h3&gt;

&lt;p&gt;I initially thought I’d power through with minimal breaks, but by hour 10, I realized that stepping away from the screen was essential. A quick 10-minute walk or stretching session every couple of hours worked wonders.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Takeaway:&lt;/strong&gt; Breaks boost productivity. They help reset your mind and prevent burnout.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Sleep Deprivation Impacts Your Code
&lt;/h3&gt;

&lt;p&gt;By the 16th hour, I introduced several bugs into my project—simple mistakes I wouldn’t normally make. Lack of sleep clouded my judgment, and I spent more time fixing errors than making progress.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Takeaway:&lt;/strong&gt; Sleep is critical. If you’re sleep-deprived, your efficiency and code quality suffer.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Caffeine Isn’t a Solution
&lt;/h3&gt;

&lt;p&gt;While coffee kept me awake, it didn’t keep me focused. After my third cup, I felt jittery and anxious, which made concentrating even harder.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Takeaway:&lt;/strong&gt; Use caffeine sparingly. Don’t rely on it to push through exhaustion.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. Collaboration Makes a Difference
&lt;/h3&gt;

&lt;p&gt;During my marathon, I reached out to a friend for help with a tricky problem. Their fresh perspective saved me hours of frustration.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Takeaway:&lt;/strong&gt; Don’t hesitate to ask for help. A second pair of eyes can spot things you’ve missed.&lt;/p&gt;

&lt;h3&gt;
  
  
  7. Tools Matter
&lt;/h3&gt;

&lt;p&gt;Having the right tools and shortcuts made coding much easier. For example, using a linter and auto-formatting tools helped me maintain clean code even when I was tired.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Takeaway:&lt;/strong&gt; Invest time in setting up your tools. They’ll save you time and effort in the long run.&lt;/p&gt;

&lt;h3&gt;
  
  
  8. The Importance of Balance
&lt;/h3&gt;

&lt;p&gt;By the end of the 24 hours, I was proud of what I’d accomplished, but I also recognized that this isn’t sustainable. Pushing yourself occasionally can be rewarding, but it’s not a healthy long-term habit.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Takeaway:&lt;/strong&gt; Balance is essential. Know when to push your limits and when to rest.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Coding for 24 hours straight taught me valuable lessons about productivity, focus, and self-care. While it’s an experience I’ll never forget, it also reminded me of the importance of rest and balance. If you’re considering a similar challenge, plan carefully, take breaks, and don’t forget to prioritize your health.&lt;/p&gt;

&lt;p&gt;Have you ever coded for an extended period? What lessons did you learn? Share your experiences in the comments!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>softwaredevelopment</category>
      <category>programming</category>
      <category>softwareengineering</category>
    </item>
    <item>
      <title>The Hidden Bug That Crashed a Satellite: Lessons for Every Developer 🚀</title>
      <dc:creator>A.S Nasseri</dc:creator>
      <pubDate>Fri, 10 Jan 2025 17:51:30 +0000</pubDate>
      <link>https://dev.to/nassiry/the-hidden-bug-that-crashed-a-satellite-lessons-for-every-developer-g32</link>
      <guid>https://dev.to/nassiry/the-hidden-bug-that-crashed-a-satellite-lessons-for-every-developer-g32</guid>
      <description>&lt;p&gt;In 1996, the European Space Agency’s Ariane 5 Flight 501 met a fiery end just 40 seconds after launch—all because of a &lt;strong&gt;tiny numeric conversion bug&lt;/strong&gt;. This catastrophic failure, caused by a 64-bit floating-point number overflowing when converted to a 16-bit integer, destroyed a $500 million mission.&lt;/p&gt;

&lt;p&gt;What can developers learn from this? Let’s explore practical lessons, with examples from my own open-source PHP repositories.&lt;/p&gt;

&lt;h2&gt;
  
  
  Lessons from Ariane 5 (and How They Apply to Your Code)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Reusing Code? Validate the Context
&lt;/h3&gt;

&lt;p&gt;The Ariane 5 reused code from Ariane 4 without considering the new rocket’s higher speeds. This assumption caused the fatal bug.&lt;/p&gt;

&lt;p&gt;💡 In your projects, when reusing code, always validate it against new use cases. For example, in my &lt;a href="https://github.com/nassiry/laravel-encoder" rel="noopener noreferrer"&gt;Laravel Encoder&lt;/a&gt;, which encodes and decodes IDs and strings, I included &lt;strong&gt;standalone support&lt;/strong&gt; to ensure it works in different contexts—not just Laravel-based projects.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Test for Edge Cases
&lt;/h3&gt;

&lt;p&gt;The bug wasn’t detected because it only occurred at high velocities. Edge-case testing could have saved the mission.&lt;/p&gt;

&lt;p&gt;💡 When handling unexpected scenarios, tools like my &lt;a href="https://github.com/nassiry/flash-messages" rel="noopener noreferrer"&gt;PHP Flash Message&lt;/a&gt; ensure smooth feedback in any framework. Testing its integration across frameworks uncovered edge cases I hadn’t initially considered.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Handle Numbers with Precision
&lt;/h3&gt;

&lt;p&gt;The Ariane 5 bug involved converting a large number that exceeded its type's limits. This shows why type safety and precision are crucial in programming.&lt;/p&gt;

&lt;p&gt;💡 In apps that process large datasets or files, my &lt;a href="https://github.com/nassiry/filesize-handler" rel="noopener noreferrer"&gt;Filesize Handler&lt;/a&gt; avoids such pitfalls by safely formatting file sizes from local, remote, or cloud sources. It demonstrates how to handle diverse environments without breaking.&lt;/p&gt;

&lt;h3&gt;
  
  
  Final Thoughts
&lt;/h3&gt;

&lt;p&gt;The Ariane 5 disaster reminds us that &lt;strong&gt;small bugs can have massive consequences&lt;/strong&gt;. Whether you're building rockets or PHP libraries, the principles remain the same:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Reuse with caution.&lt;/li&gt;
&lt;li&gt;Test thoroughly.&lt;/li&gt;
&lt;li&gt;Prioritize precision and resilience.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Want to dive deeper into the Ariane 5 story? Check out these resources:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.esa.int/Newsroom/Press_Releases/Ariane_501_-_Presentation_of_Inquiry_Board_report" rel="noopener noreferrer"&gt;ESA’s Report on the Ariane 5 Failure&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.semanticscholar.org/paper/ARIANE-5-Flight-501-Failure%3A-Report-by-the-Enquiry-Lions/41f70685a8647f2367e409a0ed6d541d335670d5" rel="noopener noreferrer"&gt;Detailed Analysis by John L. Lions&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let’s learn from the past and write better code. &lt;strong&gt;What’s the trickiest bug you’ve tackled?&lt;/strong&gt; Share in the comments—and feel free to explore my &lt;strong&gt;open-source&lt;/strong&gt; repositories for ideas, contribute and give it STAR if you like it!&lt;/p&gt;

</description>
      <category>php</category>
      <category>softwaredevelopment</category>
      <category>beginners</category>
      <category>webdev</category>
    </item>
    <item>
      <title>🚀 Supercharge Your PHP Projects with FileSizeHandler: A Flexible and Extensible File Size Utility</title>
      <dc:creator>A.S Nasseri</dc:creator>
      <pubDate>Thu, 09 Jan 2025 16:40:19 +0000</pubDate>
      <link>https://dev.to/nassiry/supercharge-your-php-projects-with-filesizehandler-a-flexible-and-extensible-file-size-utility-3nn9</link>
      <guid>https://dev.to/nassiry/supercharge-your-php-projects-with-filesizehandler-a-flexible-and-extensible-file-size-utility-3nn9</guid>
      <description>&lt;p&gt;Are you constantly dealing with files in your PHP projects and struggling with size calculations, storage inconsistencies, or integration with cloud platforms? Say goodbye to the hassle! Introducing &lt;a href="https://github.com/nassiry/filesize-handler" rel="noopener noreferrer"&gt;FileSizeHandler&lt;/a&gt;, a lightweight, flexible, and extensible PHP utility that handles file sizes like a pro. Whether you're working with local files, remote URLs, or cloud storage, this library has got you covered.&lt;/p&gt;

&lt;p&gt;In this post, we’ll explore what makes &lt;a href="https://github.com/nassiry/filesize-handler" rel="noopener noreferrer"&gt;FileSizeHandler&lt;/a&gt; a must-have library for your PHP projects and how to leverage its powerful features.&lt;/p&gt;

&lt;h3&gt;
  
  
  🔑 Why You Need FileSizeHandler
&lt;/h3&gt;

&lt;p&gt;Handling file sizes is more than just reading bytes. Different systems measure file sizes differently:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Binary vs. Decimal Units&lt;/strong&gt;: OS file systems use binary units (MiB, GiB), while storage manufacturers use decimal (MB, GB). Confusing, right?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cross-Platform Challenges&lt;/strong&gt;: File size interpretations vary across operating systems and storage platforms.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cloud and Remote Files&lt;/strong&gt;: Measuring file sizes from FTP, S3, or Google Cloud often requires additional work or APIs.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://github.com/nassiry/filesize-handler" rel="noopener noreferrer"&gt;FileSizeHandler&lt;/a&gt; simplifies all of this by providing a unified, fluent API for file size calculations, formatting, and integrations.&lt;/p&gt;

&lt;h3&gt;
  
  
  ✨ Features That Make It Shine
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Local, Remote, FTP, and Cloud Support&lt;/strong&gt;
Fetch file sizes seamlessly from:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Local file systems&lt;/li&gt;
&lt;li&gt;Remote HTTP/HTTPS URLs&lt;/li&gt;
&lt;li&gt;FTP servers&lt;/li&gt;
&lt;li&gt;Amazon S3, Google Cloud Storage, and more!&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Binary and Decimal Unit Support&lt;/strong&gt;&lt;br&gt;
Switch between binary (1024-based) and decimal (1000-based) units &lt;br&gt;
with a single method.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Fluent Interface&lt;/strong&gt;&lt;br&gt;
Chain methods to create clean and readable code.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Localization&lt;/strong&gt;&lt;br&gt;
Format file sizes with localized unit names (e.g., Mio, Kio) for a &lt;br&gt;
better user experience.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Extensibility&lt;/strong&gt;&lt;br&gt;
Easily extend the library with custom sources for specialized file &lt;br&gt;
size calculations.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  🛠️ Installation
&lt;/h3&gt;

&lt;p&gt;Install the library using Composer:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;composer require nassiry/filesize-handler  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  🚀 Getting Started
&lt;/h3&gt;

&lt;p&gt;Local File Example&lt;br&gt;
Let’s start with the basics. Fetch the size of a local file in binary units (default):&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="kn"&gt;use&lt;/span&gt; &lt;span class="nc"&gt;Nassiry\FileSizeUtility\FileSizeHandler&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;  

&lt;span class="nv"&gt;$handler&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;FileSizeHandler&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;  
    &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;local&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'/path/to/your/file.txt'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  
    &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;baseBinary&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;  

&lt;span class="k"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$handler&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;formattedSize&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// Output: "1.23 MiB"  &lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Switch to &lt;strong&gt;decimal&lt;/strong&gt; units with just one method:&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;echo&lt;/span&gt; &lt;span class="nv"&gt;$handler&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;baseDecimal&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;formattedSize&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// Output: "1.30 MB"  &lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  💡 Why Developers Love FileSizeHandler
&lt;/h3&gt;

&lt;p&gt;🔧 Simplifies File Size Handling&lt;br&gt;
No more juggling different APIs and libraries for local, remote, or cloud file sizes.&lt;/p&gt;

&lt;h3&gt;
  
  
  🌍 Extensible and Future-Proof
&lt;/h3&gt;

&lt;p&gt;Adding new storage platforms is as simple as creating an extension or implementing an interface.&lt;/p&gt;

&lt;h3&gt;
  
  
  ⚡ Lightweight and Performant
&lt;/h3&gt;

&lt;p&gt;Built for speed and simplicity, with zero unnecessary bloat.&lt;/p&gt;

&lt;h3&gt;
  
  
  📚 Learn More
&lt;/h3&gt;

&lt;p&gt;Check out the &lt;a href="https://github.com/nassiry/filesize-handler" rel="noopener noreferrer"&gt;GitHub Repository&lt;/a&gt; for more details, documentation, and examples. &lt;strong&gt;and give a STAR if you like it.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Introducing Extensions
&lt;/h3&gt;

&lt;p&gt;The power of &lt;a href="https://github.com/nassiry/filesize-handler" rel="noopener noreferrer"&gt;FileSizeHandler&lt;/a&gt; doesn’t end with the core library. Take your file size handling to the next level with official extensions:&lt;br&gt;
Want to see official extensions in action? Explore them below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/nassiry/filesize-handler-ftp-extension" rel="noopener noreferrer"&gt;FTP Extension&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/nassiry/filesize-handler-s3-extension" rel="noopener noreferrer"&gt;S3 Extension&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/nassiry/filesize-handler-google-cloud-extension" rel="noopener noreferrer"&gt;Google Cloud Extension&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/nassiry/filesize-handler-remote-extension" rel="noopener noreferrer"&gt;Remote URL Extension&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  🎉 Get Started Today
&lt;/h3&gt;

&lt;p&gt;With &lt;a href="https://github.com/nassiry/filesize-handler" rel="noopener noreferrer"&gt;FileSizeHandler&lt;/a&gt;, handling file sizes in PHP has never been easier. Install it, extend it, and make your projects smarter and more efficient.&lt;/p&gt;

&lt;p&gt;Happy coding! 🚀&lt;/p&gt;

</description>
      <category>php</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>softwaredevelopment</category>
    </item>
    <item>
      <title>XAMPP vs. Laragon vs. Laravel Herd: Which One Should You Use for PHP and Laravel Projects?</title>
      <dc:creator>A.S Nasseri</dc:creator>
      <pubDate>Tue, 07 Jan 2025 05:27:40 +0000</pubDate>
      <link>https://dev.to/nassiry/xampp-vs-laragon-vs-laravel-herd-which-one-should-you-use-for-php-and-laravel-projects-4j8k</link>
      <guid>https://dev.to/nassiry/xampp-vs-laragon-vs-laravel-herd-which-one-should-you-use-for-php-and-laravel-projects-4j8k</guid>
      <description>&lt;p&gt;When starting a PHP or Laravel project, choosing the right local development environment is crucial. Tools like &lt;strong&gt;XAMPP&lt;/strong&gt;, &lt;strong&gt;Laravel Herd&lt;/strong&gt;, and &lt;strong&gt;Laragon&lt;/strong&gt; offer different features and workflows tailored for developers. Each of these tools has its strengths and use cases, but which one is better for your next project?&lt;/p&gt;

&lt;p&gt;In this post, we'll explore:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;What XAMPP, Laragon, and Laravel Herd are&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Key features and comparisons&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Which one is better suited for Laravel, PHP, and other programming languages&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  1. What are XAMPP, Laragon, and Laravel Herd?
&lt;/h3&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://www.apachefriends.org/" rel="noopener noreferrer"&gt;XAMPP&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;XAMPP is one of the oldest and most popular local server environments. It includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Apache&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;MySQL (MariaDB)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;PHP&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Perl&lt;/strong&gt;
It’s simple to install, widely supported, and works well for generic PHP development.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Pros:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Easy setup and cross-platform (Windows, macOS, Linux).&lt;/li&gt;
&lt;li&gt;Good for beginners learning PHP.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Cons:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Performance can be slow for large projects.&lt;/li&gt;
&lt;li&gt;Limited modern tooling (e.g., no native SSL, Docker-like portability, etc.).&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://laragon.org/" rel="noopener noreferrer"&gt;Laragon&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;Laragon is a modern local development environment specifically designed for Windows users. It’s lightweight, fast, and works not just with PHP but also with Node.js, Python, Ruby, and more.&lt;/p&gt;

&lt;h5&gt;
  
  
  Key features:
&lt;/h5&gt;

&lt;ul&gt;
&lt;li&gt;Portable and self-contained.&lt;/li&gt;
&lt;li&gt;Supports SSL, Composer, and database management out-of-the-box.&lt;/li&gt;
&lt;li&gt;Extremely fast startup times and customizable stacks.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Pros:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Best for Laravel and modern PHP projects.&lt;/li&gt;
&lt;li&gt;Easy to switch PHP versions and create isolated environments.&lt;/li&gt;
&lt;li&gt;Great performance compared to XAMPP.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Cons:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Windows-only (though WSL2 can be a workaround for Linux/macOS).&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://herd.laravel.com/" rel="noopener noreferrer"&gt;Laravel Herd&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;Laravel Herd is a Laravel-specific development environment created by the Laravel team for macOS users.&lt;/p&gt;

&lt;h5&gt;
  
  
  Key features:
&lt;/h5&gt;

&lt;ul&gt;
&lt;li&gt;Designed specifically for Laravel.&lt;/li&gt;
&lt;li&gt;Includes Nginx, MySQL, and PHP.&lt;/li&gt;
&lt;li&gt;Comes pre-configured with the Laravel ecosystem (like Sail, Valet).&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Pros:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Best for Laravel projects.&lt;/li&gt;
&lt;li&gt;Minimal setup for macOS users.&lt;/li&gt;
&lt;li&gt;High performance with native macOS integration.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Cons:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Mac-only.&lt;/li&gt;
&lt;li&gt;Limited flexibility for non-Laravel projects.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Comparison of Features
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Xampp&lt;/th&gt;
&lt;th&gt;Laragon&lt;/th&gt;
&lt;th&gt;Laravel Herd&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Platform&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Cross-platform&lt;/td&gt;
&lt;td&gt;Windows-only&lt;/td&gt;
&lt;td&gt;Mac-only&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Ease of Use&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Beginner-friendly&lt;/td&gt;
&lt;td&gt;Developer-friendly&lt;/td&gt;
&lt;td&gt;Highly optimized&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Laravel Focus&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;PHP Version Control&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Manual setup&lt;/td&gt;
&lt;td&gt;One-click switch&lt;/td&gt;
&lt;td&gt;Pre-configured&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;SSL Support&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Limited&lt;/td&gt;
&lt;td&gt;Built-in&lt;/td&gt;
&lt;td&gt;Built-in&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Flexibility&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Moderate&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;td&gt;Laravel-specific&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Performance&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Moderate&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  3. Which One Should You Use?
&lt;/h3&gt;

&lt;h4&gt;
  
  
  For Laravel Projects
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;If you’re a &lt;strong&gt;macOS user&lt;/strong&gt;, &lt;strong&gt;Laravel Herd&lt;/strong&gt; is the easiest and most optimized choice for Laravel.&lt;/li&gt;
&lt;li&gt;For &lt;strong&gt;Windows users, Laragon&lt;/strong&gt; is perfect as it offers a Laravel-friendly stack with additional tools like SSL and Composer.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  For General PHP Development
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;XAMPP&lt;/strong&gt; is still a solid choice for beginners or those working on smaller PHP projects. However, for better performance and flexibility, consider &lt;strong&gt;Laragon&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  For Other Programming Languages
&lt;/h3&gt;

&lt;p&gt;If you work with Node.js, Python, Ruby, or other languages alongside PHP, &lt;strong&gt;Laragon&lt;/strong&gt; is the most versatile option.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. My Recommendation
&lt;/h3&gt;

&lt;p&gt;For most developers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Choose Laragon&lt;/strong&gt; if you’re on Windows, as it’s versatile and designed for modern workflows.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Choose Laravel Herd&lt;/strong&gt; if your primary focus is Laravel and you’re on macOS.&lt;/li&gt;
&lt;li&gt;Stick to &lt;strong&gt;XAMPP&lt;/strong&gt; only if you’re just starting out or need something very simple.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Choosing the right local development tool can make or break your productivity. While XAMPP has been a trusted solution for years, Laragon and Laravel Herd provide modern alternatives tailored for Laravel and other PHP projects. Ultimately, the choice depends on your operating system, your workflow, and whether you need flexibility or Laravel-specific features.&lt;/p&gt;

&lt;p&gt;Which tool do you prefer for your projects? Let me know in the comments!&lt;/p&gt;

</description>
      <category>php</category>
      <category>beginners</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
    <item>
      <title>Discover Kando The Lightweight Storage Utility You Didn’t Know You Needed</title>
      <dc:creator>A.S Nasseri</dc:creator>
      <pubDate>Sun, 05 Jan 2025 04:37:32 +0000</pubDate>
      <link>https://dev.to/nassiry/discover-kando-the-lightweight-storage-utility-you-didnt-know-you-needed-pe4</link>
      <guid>https://dev.to/nassiry/discover-kando-the-lightweight-storage-utility-you-didnt-know-you-needed-pe4</guid>
      <description>&lt;p&gt;Managing data storage in web and Node.js applications can sometimes feel cumbersome, especially when dealing with &lt;code&gt;localStorage&lt;/code&gt; or &lt;code&gt;sessionStorage&lt;/code&gt;. Meet &lt;strong&gt;Kando&lt;/strong&gt;—a versatile 2KB gzip storage utility that streamlines your storage tasks with its intuitive API.&lt;/p&gt;

&lt;p&gt;Whether you're working on a small web app or a complex Node.js project, Kando's flexibility and developer-friendly design can make your life easier. Let's dive into why it's worth a try!&lt;/p&gt;

&lt;h3&gt;
  
  
  Why Use Kando?
&lt;/h3&gt;

&lt;p&gt;Kando offers powerful features in a lightweight package:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Cross-Environment Support&lt;/strong&gt;: Works in both browsers and Node.js, with a fallback to an &lt;code&gt;in-memory&lt;/code&gt; Map if &lt;code&gt;localStorage&lt;/code&gt; or &lt;code&gt;sessionStorage&lt;/code&gt; is unavailable.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Namespace Management&lt;/strong&gt;: Organize and group related data for easier retrieval and cleanup.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Nested Path Access&lt;/strong&gt;: Use dot notation to access or update deeply nested properties.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data Expiration&lt;/strong&gt;: Automatically expire session data after a defined duration.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Flexible Data Handling&lt;/strong&gt;: Easily work with single &lt;code&gt;values&lt;/code&gt;, &lt;code&gt;arrays&lt;/code&gt;, and &lt;code&gt;objects&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Installation
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Node.js
&lt;/h4&gt;

&lt;p&gt;Install Kando with npm:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install &lt;/span&gt;kando-storage
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Browser
&lt;/h3&gt;

&lt;p&gt;Add Kando to your project using a script tag:&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;"path/to/kando.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;h3&gt;
  
  
  Quick Examples
&lt;/h3&gt;

&lt;p&gt;Here are a few examples to get you started. More advanced usage is available in the &lt;a href="https://github.com/nassiry/kando-storage" rel="noopener noreferrer"&gt;GitHub repository&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Setting and Retrieving Data&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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;kando&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;kando-storage&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Store a single value&lt;/span&gt;
&lt;span class="nf"&gt;kando&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;local.app.theme&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;dark&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Retrieve the value&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;kando&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;local.app.theme&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt; &lt;span class="c1"&gt;// Output: 'dark'&lt;/span&gt;

&lt;span class="c1"&gt;// Store an object&lt;/span&gt;
&lt;span class="nf"&gt;kando&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;local.user.profile&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="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Alice&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;age&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;30&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// Retrieve the object&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;kando&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;local.user.profile&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt; &lt;span class="c1"&gt;// Output: { name: 'Alice', age: 30 }&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Clearing Data
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Remove a specific property&lt;/span&gt;
&lt;span class="nf"&gt;kando&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;local.user.profile.name&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Clear an entire namespace&lt;/span&gt;
&lt;span class="nf"&gt;kando&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;local.user&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Session Storage with Expiration
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Store session data with a 60-second expiration&lt;/span&gt;
&lt;span class="nf"&gt;kando&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;session.tempData&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;Temporary&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;60&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Access it before it expires&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;kando&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;session.tempData&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt; &lt;span class="c1"&gt;// Output: 'Temporary'&lt;/span&gt;

&lt;span class="c1"&gt;// After 60 seconds, it will automatically expire&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Dive Deeper into Kando
&lt;/h3&gt;

&lt;p&gt;These examples only scratch the surface of what &lt;a href="https://github.com/nassiry/kando-storage" rel="noopener noreferrer"&gt;Kando&lt;/a&gt; can do. Check out the full &lt;a href="https://github.com/nassiry/kando-storage" rel="noopener noreferrer"&gt;README&lt;/a&gt; on GitHub for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Advanced examples like handling nested paths, arrays, and namespaces.&lt;/li&gt;
&lt;li&gt;Full API reference with parameter descriptions.&lt;/li&gt;
&lt;li&gt;Guidance on using Kando’s fallback mechanism in Node.js environments.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/nassiry/kando-storage" rel="noopener noreferrer"&gt;Kando&lt;/a&gt; is a simple yet powerful tool to manage storage seamlessly across browsers and Node.js. Its small size, feature-rich API, and ease of use make it a must-try for developers.&lt;/p&gt;

&lt;p&gt;Ready to simplify your storage? &lt;a href="https://github.com/nassiry/kando-storage" rel="noopener noreferrer"&gt;Get started on GitHub today&lt;/a&gt;! 🚀&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>node</category>
      <category>web</category>
      <category>frontend</category>
    </item>
  </channel>
</rss>
