<?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: Sanu Khan</title>
    <description>The latest articles on Forem by Sanu Khan (@sanukhandev).</description>
    <link>https://forem.com/sanukhandev</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%2F452763%2F3b27590d-0ec0-4286-81fb-7123984ce22e.jpg</url>
      <title>Forem: Sanu Khan</title>
      <link>https://forem.com/sanukhandev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/sanukhandev"/>
    <language>en</language>
    <item>
      <title>How Claude Code Improved My LinkedIn Profile Visibility !!</title>
      <dc:creator>Sanu Khan</dc:creator>
      <pubDate>Mon, 11 May 2026 11:08:41 +0000</pubDate>
      <link>https://forem.com/sanukhandev/how-claude-code-improved-my-linkedin-profile-visibility--390b</link>
      <guid>https://forem.com/sanukhandev/how-claude-code-improved-my-linkedin-profile-visibility--390b</guid>
      <description>&lt;p&gt;&lt;em&gt;A practical 4-minute case study on using Claude Code to review, restructure, and optimise a LinkedIn profile for better visibility, recruiter discovery, and professional positioning.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;LinkedIn is no longer just an online resume.&lt;/p&gt;

&lt;p&gt;For developers, tech leads, architects, consultants, and product builders, LinkedIn has become a discovery engine. Recruiters search there. Hiring managers validate that. Clients check credibility there. Founders check whether you are serious before starting a conversation.&lt;/p&gt;

&lt;p&gt;I already had a LinkedIn profile with my experience, skills, and portfolio links, but I wanted to improve one specific thing:&lt;/p&gt;

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

&lt;p&gt;Not just “make it look better”, but make it easier for the right people to understand what I do, what I have built, and what kind of opportunities I am aligned with.&lt;/p&gt;

&lt;p&gt;So I used Claude Code as a profile optimisation assistant.&lt;/p&gt;

&lt;p&gt;My LinkedIn profile:&lt;br&gt;&lt;br&gt;
&lt;a href="https://www.linkedin.com/in/sanu-khan-dev/" rel="noopener noreferrer"&gt;https://www.linkedin.com/in/sanu-khan-dev/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;My portfolio website:&lt;br&gt;&lt;br&gt;
&lt;a href="https://www.sanukhan.dev/" rel="noopener noreferrer"&gt;https://www.sanukhan.dev/&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Why I Used Claude Code for LinkedIn Optimization
&lt;/h2&gt;

&lt;p&gt;Most people use AI tools only for writing captions or generating generic summaries.&lt;/p&gt;

&lt;p&gt;I wanted something more practical.&lt;/p&gt;

&lt;p&gt;I wanted Claude Code to review my profile like a product page.&lt;/p&gt;

&lt;p&gt;A LinkedIn profile has the same structure as a landing page:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The headline is the hero section.&lt;/li&gt;
&lt;li&gt;The About section is the product story.&lt;/li&gt;
&lt;li&gt;Skills are search keywords.&lt;/li&gt;
&lt;li&gt;Featured links are proof of work.&lt;/li&gt;
&lt;li&gt;Experience is the case study section.&lt;/li&gt;
&lt;li&gt;Recommendations build trust.&lt;/li&gt;
&lt;li&gt;The profile photo and banner create the first impression.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That mindset changed how I looked at my profile.&lt;/p&gt;

&lt;p&gt;Instead of asking, “Does my profile look good?”, I started asking:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can someone understand my value in 10 seconds?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That is where Claude Code helped.&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%2Fb1dtxtldoizdk0q5nzbv.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%2Fb1dtxtldoizdk0q5nzbv.png" alt=" " width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>claude</category>
      <category>ai</category>
      <category>linkedin</category>
      <category>branding</category>
    </item>
    <item>
      <title>Aruvix.com A Private, Offline-First Developer Toolkit for JSON, APIs, QA, and Frontend Utilities</title>
      <dc:creator>Sanu Khan</dc:creator>
      <pubDate>Fri, 08 May 2026 06:33:08 +0000</pubDate>
      <link>https://forem.com/sanukhandev/aruvixcom-a-private-offline-first-developer-toolkit-for-json-apis-qa-and-frontend-utilities-416d</link>
      <guid>https://forem.com/sanukhandev/aruvixcom-a-private-offline-first-developer-toolkit-for-json-apis-qa-and-frontend-utilities-416d</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;An independent review of Aruvix.com, a browser-local toolkit that combines JSON formatting, API testing, data conversion, QA scaffolding, and frontend utilities into one clean workspace.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Every developer has a version of the same problem.&lt;/p&gt;

&lt;p&gt;You are debugging an API response, so you open a JSON formatter. Then you need to decode a token, compare two payloads, generate a UUID, convert JSON to YAML, test a quick request, create fake data, inspect a HAR file, or convert some CSS into Tailwind classes.&lt;/p&gt;

&lt;p&gt;Before you realize it, your browser has become a graveyard of random utility tabs.&lt;/p&gt;

&lt;p&gt;That is the problem &lt;strong&gt;&lt;a href="https://aruvix.com" rel="noopener noreferrer"&gt;Aruvix.com&lt;/a&gt;&lt;/strong&gt; is trying to solve.&lt;/p&gt;

&lt;p&gt;Aruvix positions itself as a unified, browser-based engineering toolkit for developers, QA teams, and technical builders who regularly work with APIs, structured data, frontend utilities, and test scaffolding. After reviewing the platform and its available feature set, the most interesting part is not just the number of tools included. It is the philosophy behind them: &lt;strong&gt;keep deterministic developer workflows fast, local, private, and distraction-free&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%2Fyx0s4kjo3ey193bxivvn.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%2Fyx0s4kjo3ey193bxivvn.png" alt="Aruvix Landing" width="800" height="307"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  The Problem: Utility Tab Fatigue Is Real
&lt;/h2&gt;

&lt;p&gt;Most engineers do not open a JSON formatter because they enjoy using a JSON formatter.&lt;/p&gt;

&lt;p&gt;They open it because they are in the middle of something else.&lt;/p&gt;

&lt;p&gt;Maybe they are debugging a production API issue. Maybe they are checking why a webhook payload failed. Maybe they are comparing a staging response against production. Maybe they are trying to quickly understand what a deeply nested object contains before mapping it into a frontend component.&lt;/p&gt;

&lt;p&gt;The task itself is usually simple, but the workflow is fragmented.&lt;/p&gt;

&lt;p&gt;A typical debugging session might involve:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;One tab for JSON formatting&lt;/li&gt;
&lt;li&gt;One tab for JSON comparison&lt;/li&gt;
&lt;li&gt;One tab for JWT decoding&lt;/li&gt;
&lt;li&gt;One tab for UUID generation&lt;/li&gt;
&lt;li&gt;One tab for YAML conversion&lt;/li&gt;
&lt;li&gt;One tab for regex testing&lt;/li&gt;
&lt;li&gt;One tab for cURL testing&lt;/li&gt;
&lt;li&gt;One tab for fake data generation&lt;/li&gt;
&lt;li&gt;One tab for API documentation reference&lt;/li&gt;
&lt;li&gt;One tab for Jira or GitHub issue formatting&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That fragmentation creates a subtle but real cost. You lose focus. You move data between unknown websites. You repeatedly search for tools that should already be part of your workflow.&lt;/p&gt;

&lt;p&gt;Aruvix takes a different approach by bringing many of these small but frequent engineering tasks into a single workspace.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Core Idea: One Local Workspace for Everyday Engineering Tasks
&lt;/h2&gt;

&lt;p&gt;The strongest argument for Aruvix is not that it replaces every specialised tool. It does not need to.&lt;/p&gt;

&lt;p&gt;Instead, Aruvix focuses on the 80% of daily developer utility work that should be fast, safe, and immediately available.&lt;/p&gt;

&lt;p&gt;It includes tools for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;JSON formatting and repair&lt;/li&gt;
&lt;li&gt;JSON comparison&lt;/li&gt;
&lt;li&gt;JSON visualization&lt;/li&gt;
&lt;li&gt;JSONPath testing&lt;/li&gt;
&lt;li&gt;JSON Schema generation&lt;/li&gt;
&lt;li&gt;API request testing&lt;/li&gt;
&lt;li&gt;cURL import&lt;/li&gt;
&lt;li&gt;OpenAPI documentation generation&lt;/li&gt;
&lt;li&gt;JavaScript to TypeScript conversion&lt;/li&gt;
&lt;li&gt;JSON, XML, YAML, CSV, JSONL, Dart, and TOON conversions&lt;/li&gt;
&lt;li&gt;Test data generation&lt;/li&gt;
&lt;li&gt;Fake user data generation&lt;/li&gt;
&lt;li&gt;Bug report generation&lt;/li&gt;
&lt;li&gt;API assertion generation&lt;/li&gt;
&lt;li&gt;HAR inspection&lt;/li&gt;
&lt;li&gt;UUID generation&lt;/li&gt;
&lt;li&gt;Frontend utilities such as CSS-to-Tailwind conversion, color tools, and shadow generation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The value is not only breadth. The value is having these utilities close to each other, especially when the same payload moves through multiple stages of debugging, validation, conversion, and documentation.&lt;/p&gt;

&lt;h2&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%2F7xy4uj8c1yc8ha7hb6lp.png" alt=" " width="800" height="371"&gt;
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Privacy: The Most Important Feature Is What Aruvix Does Not Do
&lt;/h2&gt;

&lt;p&gt;One of the biggest concerns with online developer tools is data privacy.&lt;/p&gt;

&lt;p&gt;Developers often paste API responses, logs, tokens, customer records, payment-related payloads, internal IDs, staging data, or production debugging output into random web utilities. Even when the tool looks harmless, that habit can create serious security and compliance risks.&lt;/p&gt;

&lt;p&gt;Aruvix addresses this directly with an &lt;strong&gt;offline-first, browser-local execution model&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The platform is designed to run locally in the browser with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No server round-trips for processing&lt;/li&gt;
&lt;li&gt;No hidden uploads&lt;/li&gt;
&lt;li&gt;No external database tracking for pasted data&lt;/li&gt;
&lt;li&gt;No requirement to create an account before using the tools&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That matters.&lt;/p&gt;

&lt;p&gt;For teams working with proprietary API responses, PII, internal payloads, or customer-facing data, avoiding unnecessary server-side processing is not a minor convenience. It is a practical security improvement.&lt;/p&gt;

&lt;p&gt;This is especially relevant for JSON formatting, token decoding, schema generation, payload comparison, and test data workflows where developers often handle sensitive values.&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%2F4hjjvfok0yxaxv3nvyhs.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%2F4hjjvfok0yxaxv3nvyhs.png" alt=" " width="800" height="405"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  JSON Utilities: The Core Strength of Aruvix
&lt;/h2&gt;

&lt;p&gt;Aruvix appears to treat JSON as a first-class workflow, not just a formatting feature.&lt;/p&gt;

&lt;p&gt;That makes sense. JSON is the language of modern APIs, webhooks, frontend-backend contracts, mobile applications, SaaS integrations, and configuration-heavy systems.&lt;/p&gt;

&lt;h3&gt;
  
  
  JSON Formatter
&lt;/h3&gt;

&lt;p&gt;The JSON Formatter supports beautifying, minifying, validating, and repairing malformed JSON payloads. It also includes syntax-highlighted editing and multiple views, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Tree view&lt;/li&gt;
&lt;li&gt;Table view&lt;/li&gt;
&lt;li&gt;Type view&lt;/li&gt;
&lt;li&gt;Raw text view&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is useful because not every JSON task requires the same mental model. Sometimes you want the raw payload. Sometimes you want a collapsible hierarchy. Sometimes you want to inspect data types. Sometimes a table view is the fastest way to understand repeated object structures.&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%2Fh3pb2mtm2l71m8ioqjq6.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%2Fh3pb2mtm2l71m8ioqjq6.png" alt=" " width="800" height="409"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  JSON Compare
&lt;/h3&gt;

&lt;p&gt;The JSON Compare tool supports side-by-side structural comparison, path-level difference inspection, and deep nested object diffing.&lt;/p&gt;

&lt;p&gt;This is more useful than plain text diffing because JSON changes are often structural rather than textual. A field may move, a nested value may change, an array may include a new object, or a type may shift from &lt;code&gt;number&lt;/code&gt; to &lt;code&gt;string&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;A path-level diff helps developers answer the question that matters most:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;What exactly changed in the payload?&lt;/p&gt;
&lt;/blockquote&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%2Fwio77j5jb1yxud58u629.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%2Fwio77j5jb1yxud58u629.png" alt=" " width="800" height="410"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  JSON Visualizer
&lt;/h3&gt;

&lt;p&gt;The JSON Visualizer converts deeply nested JSON into interactive node graph views with zoom and pan navigation. It also supports JSONPath inspection for complex structures.&lt;/p&gt;

&lt;p&gt;This is valuable when a payload is too nested to understand linearly. For example, large product catalogs, commerce payloads, workflow definitions, CRM objects, permissions trees, analytics responses, and webhook payloads can become difficult to reason about in raw text.&lt;/p&gt;

&lt;p&gt;A visual node graph helps developers and QA teams understand the shape of the data before validating or transforming it.&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%2F19p1x8h51szsguzrazgl.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%2F19p1x8h51szsguzrazgl.png" alt=" " width="800" height="396"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  JSON Schema Generator
&lt;/h3&gt;

&lt;p&gt;The JSON Schema Generator can bootstrap starter schemas from sample data, validate JSON against schemas, and generate validation reports.&lt;/p&gt;

&lt;p&gt;This is useful for teams that need to formalize API contracts quickly. Instead of manually writing a schema from scratch, developers can start from a sample payload, generate a baseline schema, then refine constraints as needed.&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%2F0xv34ekwz9iun6wa74hd.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%2F0xv34ekwz9iun6wa74hd.png" alt=" " width="800" height="397"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  JSON Path Tester
&lt;/h3&gt;

&lt;p&gt;The JSON Path Tester allows users to run JSONPath queries, filter arrays, extract nested values, and highlight matched paths.&lt;/p&gt;

&lt;p&gt;This is especially useful when working with large API responses where only a few nested values matter. Instead of manually expanding objects and searching through the payload, JSONPath gives developers a precise query layer over the data.&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%2Fsxbjx3gpdtxpawlcu5uq.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%2Fsxbjx3gpdtxpawlcu5uq.png" alt=" " width="800" height="419"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  API Tools: A Lightweight Alternative for Quick Testing
&lt;/h2&gt;

&lt;p&gt;Aruvix includes a lightweight API client for sending HTTP requests and inspecting headers, statuses, and responses locally.&lt;/p&gt;

&lt;p&gt;This is not necessarily about replacing a full enterprise API platform. Tools like Postman, Insomnia, Bruno, and Hoppscotch all have their own strengths.&lt;/p&gt;

&lt;p&gt;The point of Aruvix is speed and proximity.&lt;/p&gt;

&lt;p&gt;When you are already formatting, comparing, validating, or converting payloads, being able to quickly send an HTTP request from the same workspace reduces context switching.&lt;/p&gt;

&lt;p&gt;The API tooling includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;HTTP request testing&lt;/li&gt;
&lt;li&gt;Header, status, and response inspection&lt;/li&gt;
&lt;li&gt;cURL import&lt;/li&gt;
&lt;li&gt;OpenAPI documentation generation from requests&lt;/li&gt;
&lt;li&gt;Pre-request and post-request scripting&lt;/li&gt;
&lt;li&gt;Environment variables&lt;/li&gt;
&lt;li&gt;Request collections&lt;/li&gt;
&lt;li&gt;Reusable variables&lt;/li&gt;
&lt;li&gt;Proxy support for internal API debugging&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%2Fa7qd9nqakkztq5mlsd7d.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%2Fa7qd9nqakkztq5mlsd7d.png" alt=" " width="800" height="387"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  cURL Import
&lt;/h3&gt;

&lt;p&gt;cURL import is one of those features that immediately improves real-world usability.&lt;/p&gt;

&lt;p&gt;Developers frequently copy cURL commands from browser DevTools, backend logs, API documentation, Slack messages, or issue comments. Being able to paste a cURL command and instantly test it reduces friction.&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%2Fzs30jvqii25gn08pkec1.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%2Fzs30jvqii25gn08pkec1.png" alt=" " width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Screenshot suggestion:&lt;/strong&gt; Show a cURL command being imported into the API client with method, URL, headers, and body populated automatically.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Environment Management and Scripting
&lt;/h3&gt;

&lt;p&gt;The inclusion of environment variables, request collections, reusable variables, and scripting makes the API client more than a one-off request sender.&lt;/p&gt;

&lt;p&gt;Pre-request and post-request scripts are particularly important for workflows that involve tokens, dynamic headers, chained requests, response extraction, or validation logic.&lt;/p&gt;

&lt;p&gt;For a browser-local toolkit, this gives Aruvix a more serious API testing foundation.&lt;/p&gt;




&lt;h2&gt;
  
  
  Code and Data Conversion: Useful for Migration and Integration Work
&lt;/h2&gt;

&lt;p&gt;Modern development often involves translating data between systems, languages, and formats.&lt;/p&gt;

&lt;p&gt;Aruvix includes several conversion tools that are useful for integration-heavy workflows.&lt;/p&gt;

&lt;h3&gt;
  
  
  JavaScript to TypeScript Converter
&lt;/h3&gt;

&lt;p&gt;The JS to TS Converter translates JavaScript into TypeScript with type inference and migration warnings.&lt;/p&gt;

&lt;p&gt;This is helpful during gradual TypeScript adoption, refactoring, or when converting utility scripts into more maintainable application code.&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%2Feoxu6o2lk18hwdjktto3.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%2Feoxu6o2lk18hwdjktto3.png" alt=" " width="800" height="407"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Multi-Format Conversion
&lt;/h3&gt;

&lt;p&gt;Aruvix supports bidirectional conversions between:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;JSON and XML&lt;/li&gt;
&lt;li&gt;JSON and YAML&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It also supports exports from JSON to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;CSV&lt;/li&gt;
&lt;li&gt;JSONL&lt;/li&gt;
&lt;li&gt;Dart&lt;/li&gt;
&lt;li&gt;TOON&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This combination is useful for developers moving data between APIs, configuration systems, analytics pipelines, AI workflows, mobile app models, and documentation formats.&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%2Fkbm3vdlltkrjcig3q38p.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%2Fkbm3vdlltkrjcig3q38p.png" alt=" " width="728" height="486"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  QA and Testing Scaffolding: A Practical Addition
&lt;/h2&gt;

&lt;p&gt;One of the more interesting parts of Aruvix is that it is not only aimed at developers writing code. It also includes tools that are useful for QA engineers and testers.&lt;/p&gt;

&lt;p&gt;The QA and testing utilities include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Test data generator&lt;/li&gt;
&lt;li&gt;Fake user/data generator&lt;/li&gt;
&lt;li&gt;Bug report generator&lt;/li&gt;
&lt;li&gt;API assertion generator&lt;/li&gt;
&lt;li&gt;HAR viewer&lt;/li&gt;
&lt;li&gt;UUID generator&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Test Data and Fake User Generation
&lt;/h3&gt;

&lt;p&gt;The test data generator and fake user/data generator help quickly create realistic dummy payloads.&lt;/p&gt;

&lt;p&gt;This is useful when testing forms, APIs, database imports, dashboards, pagination, search, filtering, validation, and edge cases.&lt;/p&gt;

&lt;p&gt;The ability to export generated data as CSV, SQL, or JSON makes it practical for multiple workflows.&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%2Fflspu2mia1ti4vru6x9z.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%2Fflspu2mia1ti4vru6x9z.png" alt=" " width="800" height="411"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Bug Report Generator
&lt;/h3&gt;

&lt;p&gt;The bug report generator formats structured regression reports into Jira or GitHub-friendly Markdown.&lt;/p&gt;

&lt;p&gt;This is a smart utility because QA work often suffers not from lack of findings, but from inconsistent reporting. A structured bug report improves reproducibility and reduces back-and-forth between QA and engineering.&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%2Fqzxjexic420ihhvrjn1j.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%2Fqzxjexic420ihhvrjn1j.png" alt=" " width="800" height="412"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  API Assertion Generator
&lt;/h3&gt;

&lt;p&gt;The API assertion generator helps create assertions for automated tests.&lt;/p&gt;

&lt;p&gt;This can be useful when moving from manual API inspection to repeatable API validation. For example, after inspecting a response manually, a QA engineer or developer can generate starter assertions for status codes, response fields, types, and expected values.&lt;/p&gt;

&lt;h3&gt;
  
  
  HAR Viewer
&lt;/h3&gt;

&lt;p&gt;The HAR Viewer helps inspect HTTP Archive files for network debugging.&lt;/p&gt;

&lt;p&gt;This is particularly useful for frontend developers, QA teams, and support engineers who need to analyze browser network activity, failed requests, redirects, headers, payload sizes, or performance bottlenecks.&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%2Fc6tsvuduv37y0hkg59si.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%2Fc6tsvuduv37y0hkg59si.png" alt=" " width="800" height="407"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Frontend and CSS Utilities: Bridging API Data and UI Work
&lt;/h2&gt;

&lt;p&gt;Aruvix also includes frontend-focused utilities such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;CSS-to-Tailwind conversion&lt;/li&gt;
&lt;li&gt;Color tools&lt;/li&gt;
&lt;li&gt;Shadow generators&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This might look unrelated to JSON and API tooling at first, but it makes sense in full-stack and frontend-heavy workflows.&lt;/p&gt;

&lt;p&gt;Frontend developers often move from API data inspection directly into UI implementation. They may need to inspect response structures, generate mock data, convert styles, test shadows, choose colors, and shape UI states around real payloads.&lt;/p&gt;

&lt;p&gt;Having frontend utilities next to data tools helps bridge the gap between backend response inspection and interface development.&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%2Fiuztcpdu1tmrjejfv6w4.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%2Fiuztcpdu1tmrjejfv6w4.png" alt=" " width="800" height="408"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Role-Specific Benefits
&lt;/h2&gt;

&lt;p&gt;Aruvix is broad enough to be useful across multiple engineering roles, but its value is slightly different for each group.&lt;/p&gt;

&lt;h3&gt;
  
  
  For Backend Developers
&lt;/h3&gt;

&lt;p&gt;Backend developers benefit from fast API debugging, secure local payload inspection, JSON validation, schema generation, token-related workflows, and response comparison.&lt;/p&gt;

&lt;p&gt;A typical backend workflow might look like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Send a request using the API client.&lt;/li&gt;
&lt;li&gt;Format the JSON response.&lt;/li&gt;
&lt;li&gt;Compare staging and production payloads.&lt;/li&gt;
&lt;li&gt;Generate a JSON Schema from the response.&lt;/li&gt;
&lt;li&gt;Validate edge-case payloads.&lt;/li&gt;
&lt;li&gt;Generate API assertions.&lt;/li&gt;
&lt;li&gt;Export examples for documentation or tests.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The key benefit is fewer interruptions during API development and debugging.&lt;/p&gt;

&lt;h3&gt;
  
  
  For Full-Stack Developers
&lt;/h3&gt;

&lt;p&gt;Full-stack developers often need to move between API contracts, frontend models, UI states, and test data.&lt;/p&gt;

&lt;p&gt;Aruvix supports that movement well because it combines API tools, JSON tools, conversion tools, TypeScript utilities, and frontend CSS utilities in one place.&lt;/p&gt;

&lt;p&gt;A full-stack developer can inspect an API response, generate a schema, convert sample JavaScript to TypeScript, create dummy data, and use frontend utilities without jumping across several unrelated websites.&lt;/p&gt;

&lt;h3&gt;
  
  
  For Frontend and UI Developers
&lt;/h3&gt;

&lt;p&gt;Frontend developers benefit from tools that help convert backend data into usable UI structures.&lt;/p&gt;

&lt;p&gt;JSON tree views, table views, visualizers, fake data generators, CSS utilities, and TypeScript conversion can all support frontend implementation work.&lt;/p&gt;

&lt;p&gt;This is especially useful when designing interfaces before the backend is fully stable or when creating UI states from sample payloads.&lt;/p&gt;

&lt;h3&gt;
  
  
  For QA Teams
&lt;/h3&gt;

&lt;p&gt;QA teams get value from visual payload inspection, fake data generation, bug report formatting, API assertion generation, HAR viewing, UUID generation, and local validation.&lt;/p&gt;

&lt;p&gt;The local-first approach is especially relevant for QA teams handling customer-like test data, internal staging responses, or regression evidence.&lt;/p&gt;

&lt;p&gt;Aruvix can help QA move faster without relying entirely on staging servers, engineering support, or separate formatting tools.&lt;/p&gt;

&lt;h3&gt;
  
  
  For DevOps and Integration Engineers
&lt;/h3&gt;

&lt;p&gt;DevOps and integration engineers often work with structured configuration, webhooks, logs, API responses, YAML, JSON, XML, and environment-specific data.&lt;/p&gt;

&lt;p&gt;Aruvix can help with format conversion, request testing, JSONPath extraction, schema validation, and local debugging of payloads that move across systems.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why Local Execution Matters for AI-Era Development
&lt;/h2&gt;

&lt;p&gt;Aruvix also makes an important point in the age of AI-assisted development.&lt;/p&gt;

&lt;p&gt;Not every task needs an LLM.&lt;/p&gt;

&lt;p&gt;Formatting JSON, generating a UUID, converting YAML, validating syntax, minifying payloads, comparing objects, or converting data structures are deterministic tasks. They should be instant, predictable, and cheap.&lt;/p&gt;

&lt;p&gt;Using AI for these workflows can waste tokens, introduce latency, and sometimes produce inconsistent results. A dedicated local utility is often the better tool.&lt;/p&gt;

&lt;p&gt;That does not mean AI is not useful. It means developers should avoid using AI for tasks that are better solved by deterministic local computation.&lt;/p&gt;

&lt;p&gt;Aruvix fits into that category: fast, rule-based, local, and purpose-built.&lt;/p&gt;




&lt;h2&gt;
  
  
  User Experience: Free, No Login, and Ad-Free
&lt;/h2&gt;

&lt;p&gt;Another practical advantage is frictionless access.&lt;/p&gt;

&lt;p&gt;Aruvix is free to use, does not require sign-up or login, and presents itself as an ad-free interface.&lt;/p&gt;

&lt;p&gt;That matters more than it sounds.&lt;/p&gt;

&lt;p&gt;Many utility websites interrupt the workflow with popups, account prompts, ads, cookie banners, or aggressive upsells. For tools developers use during debugging, every unnecessary step adds friction.&lt;/p&gt;

&lt;p&gt;Aruvix’s no-login approach makes it easier to use quickly and evaluate honestly.&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%2Fqjgcudh087pghnqwk3pu.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%2Fqjgcudh087pghnqwk3pu.png" alt=" " width="800" height="484"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Where Aruvix Stands Out
&lt;/h2&gt;

&lt;p&gt;After reviewing the feature set, Aruvix stands out in four areas.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. It Consolidates High-Frequency Developer Utilities
&lt;/h3&gt;

&lt;p&gt;The biggest strength is consolidation. Aruvix brings together many small tools that developers usually access through scattered websites.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. It Prioritizes Privacy by Keeping Work Local
&lt;/h3&gt;

&lt;p&gt;For production-like payloads, internal data, or sensitive API responses, local processing is a significant advantage.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. It Serves Multiple Roles Without Feeling Too Narrow
&lt;/h3&gt;

&lt;p&gt;Backend, frontend, QA, full-stack, and DevOps workflows are all represented.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. It Reduces Context Switching
&lt;/h3&gt;

&lt;p&gt;The platform helps developers stay in the same mental flow while moving between formatting, validation, comparison, conversion, testing, and reporting.&lt;/p&gt;




&lt;h2&gt;
  
  
  Areas to Watch as the Platform Grows
&lt;/h2&gt;

&lt;p&gt;No review is complete without considering where a tool may need to evolve.&lt;/p&gt;

&lt;p&gt;Because Aruvix is broad, discoverability will matter. As more tools are added, the platform needs excellent navigation, search, grouping, keyboard shortcuts, and saved workflows to avoid becoming overwhelming.&lt;/p&gt;

&lt;p&gt;For large enterprise workflows, teams may also eventually expect features such as shared collections, import/export profiles, workspace sync, team templates, or secure desktop storage. However, these features would need to be balanced carefully against the current privacy-first, no-login experience.&lt;/p&gt;

&lt;p&gt;The upcoming native desktop applications for macOS and Windows are also worth watching. If implemented well, they could help Aruvix bypass browser memory limits and support truly massive data tasks more comfortably.&lt;/p&gt;




</description>
      <category>webdev</category>
      <category>tooling</category>
      <category>productivity</category>
      <category>json</category>
    </item>
    <item>
      <title>API Gateway: The Bouncer Your Microservices Didn’t Know They Needed</title>
      <dc:creator>Sanu Khan</dc:creator>
      <pubDate>Wed, 24 Dec 2025 07:45:34 +0000</pubDate>
      <link>https://forem.com/sanukhandev/api-gateway-the-bouncer-your-microservices-didnt-know-they-needed-1j0e</link>
      <guid>https://forem.com/sanukhandev/api-gateway-the-bouncer-your-microservices-didnt-know-they-needed-1j0e</guid>
      <description>&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%2Fkplhckq5vy9094mv3iet.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%2Fkplhckq5vy9094mv3iet.png" alt="Why api Gateway" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  API Gateway: The Bouncer at the Club Called “Your Backend”
&lt;/h2&gt;

&lt;p&gt;If your system is a party, your microservices are the guests, and your clients are… well… clients.&lt;br&gt;&lt;br&gt;
An &lt;strong&gt;API Gateway&lt;/strong&gt; is the &lt;strong&gt;one person at the entrance&lt;/strong&gt; who checks IDs, controls the crowd, directs people to the right room, and occasionally stops someone from setting the place on fire.&lt;/p&gt;

&lt;p&gt;Without a gateway, clients talk to services directly. Which sounds “simple” until you realize you’ve just invited everyone to wander into your kitchen and argue with your fridge.&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%2Fydo6jmpc3dmbh1a7dxcl.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%2Fydo6jmpc3dmbh1a7dxcl.png" alt="Client -&amp;gt; API Gateway -&amp;gt; Services" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What an API Gateway actually does (besides looking important)
&lt;/h2&gt;

&lt;p&gt;An API Gateway is a &lt;strong&gt;single entry point&lt;/strong&gt; for external requests. It sits in front of your services and handles “common chores” so every service doesn’t have to reinvent them badly.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Greatest Hits (Gateway Edition)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Routing&lt;/strong&gt;: “/orders goes to Orders Service. Obviously.”&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AuthN/AuthZ&lt;/strong&gt;: “Show me your token. No token? No entry.”&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rate limiting&lt;/strong&gt;: “You’ve made 10,000 requests in 4 seconds. Please step away.”&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Load balancing&lt;/strong&gt;: “Service instance #3 looks tired. Go to #4.”&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Caching&lt;/strong&gt;: “We already answered this. Here, take the cached response.”&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Aggregation&lt;/strong&gt;: “Client wants one response, backend needs 5 calls. I’ll combine it.”&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Protocol translation&lt;/strong&gt;: “Client speaks REST, service speaks gRPC. I’m bilingual.”&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Without a Gateway vs With a Gateway (a short horror story)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Without API Gateway
&lt;/h3&gt;

&lt;p&gt;Clients call multiple services directly:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Client must know &lt;strong&gt;every service URL&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Every service needs &lt;strong&gt;its own auth + rate limit + logging&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Changing a service endpoint means &lt;strong&gt;client changes&lt;/strong&gt; (aka “fun”)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  With API Gateway
&lt;/h3&gt;

&lt;p&gt;Clients call one endpoint:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;One URL&lt;/strong&gt; to rule them all&lt;/li&gt;
&lt;li&gt;Centralized policies (security, throttling, observability)&lt;/li&gt;
&lt;li&gt;Backend can evolve without breaking clients (mostly)&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%2F1kez3ovoxswwm0q43rcp.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%2F1kez3ovoxswwm0q43rcp.png" alt="Chaos vs Calm" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why people love API Gateways (the advantages)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1) Centralized security
&lt;/h3&gt;

&lt;p&gt;You implement authentication/authorization once at the edge—less duplication, fewer inconsistencies, fewer “oops we forgot auth on that endpoint.”&lt;/p&gt;

&lt;h3&gt;
  
  
  2) Simpler clients
&lt;/h3&gt;

&lt;p&gt;Mobile apps, web apps, third-party clients—everyone hits &lt;strong&gt;one&lt;/strong&gt; gateway instead of juggling service endpoints like a circus act.&lt;/p&gt;

&lt;h3&gt;
  
  
  3) Better performance knobs
&lt;/h3&gt;

&lt;p&gt;Caching, compression, request shaping, response aggregation—gateways can reduce total calls and smooth backend load.&lt;/p&gt;

&lt;h3&gt;
  
  
  4) Observability and governance
&lt;/h3&gt;

&lt;p&gt;One place for metrics, logs, tracing correlation, and global policies.&lt;br&gt;&lt;br&gt;
Your monitoring gets less “Where is this failing?” and more “Oh, it’s failing right there.”&lt;/p&gt;

&lt;h3&gt;
  
  
  5) Versioning and compatibility
&lt;/h3&gt;

&lt;p&gt;You can support &lt;code&gt;/v1&lt;/code&gt; and &lt;code&gt;/v2&lt;/code&gt; without forcing every service to carry legacy baggage forever.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why API Gateways can still ruin your week (the disadvantages)
&lt;/h2&gt;

&lt;p&gt;Let’s be honest: adding a gateway is adding a &lt;em&gt;new&lt;/em&gt; thing to break.&lt;/p&gt;

&lt;h3&gt;
  
  
  1) It can be a single point of failure
&lt;/h3&gt;

&lt;p&gt;If the gateway goes down, congratulations—you’ve invented &lt;strong&gt;distributed downtime&lt;/strong&gt;.&lt;br&gt;
Solution: run it HA, multi-zone, scalable, and monitored like it’s your paycheck (because it is).&lt;/p&gt;

&lt;h3&gt;
  
  
  2) Extra latency
&lt;/h3&gt;

&lt;p&gt;It’s another hop. Usually worth it, but it exists.&lt;br&gt;&lt;br&gt;
The fix is good configuration, caching, and not doing “just one more plugin” until it becomes a Christmas tree.&lt;/p&gt;

&lt;h3&gt;
  
  
  3) Config complexity
&lt;/h3&gt;

&lt;p&gt;Route rules, auth policies, transformations, rate limits, plugins—at scale it becomes a discipline, not a weekend task.&lt;/p&gt;

&lt;h3&gt;
  
  
  4) Cost and lock-in
&lt;/h3&gt;

&lt;p&gt;Managed gateways cost money. Self-hosted gateways cost engineers (also money). Some solutions can strongly couple you to a cloud ecosystem.&lt;/p&gt;




&lt;h2&gt;
  
  
  API Gateway vs Load Balancer vs Service Mesh (stop mixing them up)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Load Balancer
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Operates at network level (L4/L7 depending)&lt;/li&gt;
&lt;li&gt;Distributes traffic, doesn’t usually handle API semantics like auth, quotas, transformations&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  API Gateway
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;North–south traffic (clients → services)&lt;/li&gt;
&lt;li&gt;API-focused features: auth, rate limiting, versioning, transformation, aggregation&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Service Mesh
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;East–west traffic (service → service)&lt;/li&gt;
&lt;li&gt;mTLS, retries, circuit breaking, traffic shaping &lt;strong&gt;inside&lt;/strong&gt; your cluster&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;They can coexist. In serious systems, they usually do.&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%2Fi7qpvrbsc1e2yy2svvt2.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%2Fi7qpvrbsc1e2yy2svvt2.png" alt="Gateway vs Mesh" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Real-world examples (so you can name-drop responsibly)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;AWS API Gateway&lt;/strong&gt;: Common in serverless setups (API Gateway → Lambda).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Kong&lt;/strong&gt;: Popular in Kubernetes and microservices, plugin-driven, highly extensible.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;NGINX&lt;/strong&gt;: Can be configured as a gateway/reverse proxy with a lot of control.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Traefik&lt;/strong&gt;: Cloud-native routing with auto-discovery vibes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Pick based on your environment, governance needs, and how much “platform engineering” you want to own.&lt;/p&gt;




&lt;h2&gt;
  
  
  When should you use an API Gateway?
&lt;/h2&gt;

&lt;p&gt;Use one when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You have multiple services and multiple clients&lt;/li&gt;
&lt;li&gt;You need centralized security, throttling, and monitoring&lt;/li&gt;
&lt;li&gt;You want a stable external API while internals evolve&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You might skip it when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You have a tiny system with one service (for now)&lt;/li&gt;
&lt;li&gt;You don’t need cross-cutting policies yet&lt;/li&gt;
&lt;li&gt;You’re allergic to operating infrastructure (fair)&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  A practical mental model (that won’t betray you in interviews)
&lt;/h2&gt;

&lt;p&gt;Think of the API Gateway as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Front door&lt;/strong&gt;: one entry point&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bouncer&lt;/strong&gt;: auth and quotas&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Traffic cop&lt;/strong&gt;: routing and balancing&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Translator&lt;/strong&gt;: protocol and payload shaping&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Receptionist&lt;/strong&gt;: aggregation and consistent error responses&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And yes, it also becomes the place everyone blames first. Enjoy.&lt;/p&gt;




&lt;h2&gt;
  
  
  Quick checklist (what you must design for)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;High availability (multi-instance, multi-zone)&lt;/li&gt;
&lt;li&gt;Observability (metrics, logs, tracing)&lt;/li&gt;
&lt;li&gt;Security controls (auth, mTLS/TLS, WAF integration if needed)&lt;/li&gt;
&lt;li&gt;Rate limits / quotas&lt;/li&gt;
&lt;li&gt;Deployment strategy (blue/green, canary for config changes)&lt;/li&gt;
&lt;li&gt;Clear ownership (someone must maintain it)&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Closing thoughts
&lt;/h2&gt;

&lt;p&gt;API Gateways are not magic. They are &lt;strong&gt;concentrated responsibility&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
Done well, they simplify everything. Done poorly, they become the world’s most expensive bottleneck.&lt;/p&gt;

&lt;p&gt;If you’re building microservices: you’re probably going to end up here anyway. Might as well do it on purpose.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Want a follow-up? I can write part 2 on “API Gateway vs API Management” or “Kubernetes: Ingress vs Gateway API vs Service Mesh” with real deployment patterns.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>apigateway</category>
      <category>webdev</category>
      <category>programming</category>
      <category>devops</category>
    </item>
    <item>
      <title>🦆 DuckDB: The SQLite of Analytics You Didn’t Know You Needed</title>
      <dc:creator>Sanu Khan</dc:creator>
      <pubDate>Wed, 20 Aug 2025 06:25:47 +0000</pubDate>
      <link>https://forem.com/sanukhandev/duckdb-the-sqlite-of-analytics-you-didnt-know-you-needed-579m</link>
      <guid>https://forem.com/sanukhandev/duckdb-the-sqlite-of-analytics-you-didnt-know-you-needed-579m</guid>
      <description>&lt;h2&gt;
  
  
  🦆 DuckDB: The SQLite of Analytics You Didn’t Know You Needed
&lt;/h2&gt;

&lt;h2&gt;
  
  
  🔥 Why This Matters
&lt;/h2&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%2Fef33ovh1bq9q4q4ngo8m.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%2Fef33ovh1bq9q4q4ngo8m.png" alt=" " width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Every developer has faced this:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A messy CSV file too big for Excel.
&lt;/li&gt;
&lt;li&gt;A Pandas dataframe that takes forever to group by.
&lt;/li&gt;
&lt;li&gt;A dataset that’s &lt;strong&gt;too small for BigQuery but too big for comfort&lt;/strong&gt;.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Enter &lt;strong&gt;DuckDB&lt;/strong&gt; — the &lt;em&gt;SQLite for analytics&lt;/em&gt;. It runs &lt;strong&gt;inside your app&lt;/strong&gt;, speaks &lt;strong&gt;SQL fluently&lt;/strong&gt;, and can chew through billions of rows without breaking a sweat.  &lt;/p&gt;

&lt;p&gt;And here’s the kicker: &lt;strong&gt;no server, no setup, no ops&lt;/strong&gt;.  &lt;/p&gt;




&lt;h2&gt;
  
  
  🛠 What Exactly Is DuckDB?
&lt;/h2&gt;

&lt;p&gt;DuckDB is an &lt;strong&gt;open-source, in-process OLAP database&lt;/strong&gt; designed for analytics.&lt;br&gt;&lt;br&gt;
Think of it like this:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;SQLite → OLTP&lt;/strong&gt; (fast transactions, mobile apps).
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;DuckDB → OLAP&lt;/strong&gt; (fast analytics, big aggregations).
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Key highlights:&lt;br&gt;&lt;br&gt;
✅ &lt;strong&gt;Columnar storage&lt;/strong&gt; → perfect for crunching numbers.&lt;br&gt;&lt;br&gt;
✅ &lt;strong&gt;Vectorized execution&lt;/strong&gt; → lightning-fast queries.&lt;br&gt;&lt;br&gt;
✅ &lt;strong&gt;Embeddable&lt;/strong&gt; → runs inside your app, notebook, or script.&lt;br&gt;&lt;br&gt;
✅ &lt;strong&gt;Zero config&lt;/strong&gt; → just &lt;code&gt;pip install duckdb&lt;/code&gt; and go.  &lt;/p&gt;


&lt;h2&gt;
  
  
  ⚡ Why Developers Love It
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Faster than Pandas&lt;/strong&gt; for many data wrangling tasks.
&lt;/li&gt;
&lt;li&gt;Reads CSV, Parquet, JSON, Arrow — &lt;em&gt;directly&lt;/em&gt;.
&lt;/li&gt;
&lt;li&gt;Works seamlessly with &lt;strong&gt;Python, R, or even C++&lt;/strong&gt;.
&lt;/li&gt;
&lt;li&gt;Portable, lightweight, and reproducible.
&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;
  
  
  🚀 Real-World Use Cases
&lt;/h2&gt;
&lt;h3&gt;
  
  
  1. &lt;strong&gt;Data Science Notebooks&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Query CSVs and Parquet files with pure SQL. No database servers, no ETL.&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="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;duckdb&lt;/span&gt;
&lt;span class="n"&gt;duckdb&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sql&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;SELECT category, AVG(price) FROM &lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;products.parquet&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt; GROUP BY category&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  2. &lt;strong&gt;ETL Pipelines&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Replace slow Pandas joins and filters with DuckDB SQL queries.  &lt;/p&gt;




&lt;h3&gt;
  
  
  3. &lt;strong&gt;IoT &amp;amp; Edge Devices&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Run analytics on a Raspberry Pi before sending summarized data upstream.  &lt;/p&gt;




&lt;h3&gt;
  
  
  4. &lt;strong&gt;App Embedding&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Bundle DuckDB into your desktop or mobile app for &lt;strong&gt;offline analytics&lt;/strong&gt;.  &lt;/p&gt;




&lt;h3&gt;
  
  
  5. &lt;strong&gt;Rapid BI &amp;amp; ML Prototyping&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Test KPIs or prepare ML features locally before pushing to cloud warehouses.  &lt;/p&gt;




&lt;h2&gt;
  
  
  🥊 DuckDB vs The Rest
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;SQLite&lt;/strong&gt; → Great for small apps &amp;amp; transactions. Not built for analytics.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pandas/Polars&lt;/strong&gt; → In-memory only. DuckDB can handle much bigger data.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;BigQuery/Snowflake&lt;/strong&gt; → Awesome for huge data. But overkill (and $$$) for small to mid datasets.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;👉 DuckDB fits the &lt;strong&gt;sweet spot&lt;/strong&gt;: big enough to be powerful, small enough to be simple.  &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%2Fbfp4zqpmkk6u7m30kdnr.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%2Fbfp4zqpmkk6u7m30kdnr.png" alt=" " width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  ✨ 10 Killer DuckDB Tricks Every Dev Should Know
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Query CSV/Parquet without loading&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&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="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="s1"&gt;'data.csv'&lt;/span&gt; &lt;span class="k"&gt;LIMIT&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Query Pandas DataFrames directly&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;   &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;pandas&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;pd&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;duckdb&lt;/span&gt;
   &lt;span class="n"&gt;df&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;pd&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;read_csv&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;sales.csv&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
   &lt;span class="n"&gt;duckdb&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sql&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;SELECT region, SUM(amount) FROM df GROUP BY region&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Output to Parquet&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;   &lt;span class="k"&gt;COPY&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="s1"&gt;'data.csv'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;TO&lt;/span&gt; &lt;span class="s1"&gt;'data_out.parquet'&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;FORMAT&lt;/span&gt; &lt;span class="n"&gt;PARQUET&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Time-series bucketing&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&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="n"&gt;time_bucket&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;INTERVAL&lt;/span&gt; &lt;span class="s1"&gt;'1 hour'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;timestamp&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;hour&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;AVG&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
   &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="s1"&gt;'iot_data.parquet'&lt;/span&gt;
   &lt;span class="k"&gt;GROUP&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;hour&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Join multiple file formats&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&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="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;details&lt;/span&gt;
   &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="s1"&gt;'customers.csv'&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt;
   &lt;span class="k"&gt;JOIN&lt;/span&gt; &lt;span class="s1"&gt;'orders.parquet'&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt; &lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;customer_id&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Work with Arrow/Polars seamlessly&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Direct conversion with zero copy.  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Parallel execution by default&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Queries scale with your CPU cores out-of-the-box.  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Run in-memory or persistent mode&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;   &lt;span class="n"&gt;PRAGMA&lt;/span&gt; &lt;span class="n"&gt;database_list&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Export query results back to Pandas&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;   &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;duckdb&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sql&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;SELECT COUNT(*) FROM df&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;to_df&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;SQL + Python mix&lt;/strong&gt;
Combine data wrangling in Pandas with analytics in DuckDB.
&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  ✍️ Author Insights
&lt;/h2&gt;

&lt;p&gt;Honestly, DuckDB feels like a &lt;strong&gt;cheat code for developers&lt;/strong&gt;:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I no longer upload every CSV to BigQuery just to run a few queries.
&lt;/li&gt;
&lt;li&gt;In Jupyter, I can answer 80% of business questions without leaving my notebook.
&lt;/li&gt;
&lt;li&gt;For teaching SQL to data science juniors, DuckDB is frictionless.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It’s the kind of tool that makes you go: &lt;em&gt;“Where has this been all my life?”&lt;/em&gt;  &lt;/p&gt;




&lt;h2&gt;
  
  
  🎯 Recommendations
&lt;/h2&gt;

&lt;p&gt;✅ &lt;strong&gt;Use DuckDB when&lt;/strong&gt;:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You need &lt;strong&gt;lightweight analytics&lt;/strong&gt; inside apps or notebooks.
&lt;/li&gt;
&lt;li&gt;Your datasets are &lt;strong&gt;MBs → 100s of GBs&lt;/strong&gt;, not petabytes.
&lt;/li&gt;
&lt;li&gt;You want &lt;strong&gt;reproducibility&lt;/strong&gt; without server dependencies.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;❌ &lt;strong&gt;Don’t use DuckDB when&lt;/strong&gt;:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You need &lt;strong&gt;concurrent transactions&lt;/strong&gt; (OLTP apps → use Postgres/SQLite).
&lt;/li&gt;
&lt;li&gt;You’re working with &lt;strong&gt;petabyte-scale warehouses&lt;/strong&gt; (→ BigQuery/Snowflake).
&lt;/li&gt;
&lt;li&gt;You require &lt;strong&gt;real-time streaming analytics&lt;/strong&gt; (→ ClickHouse, Druid).
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🎯 Conclusion
&lt;/h2&gt;

&lt;p&gt;DuckDB isn’t just another database — it’s a &lt;strong&gt;movement toward lightweight, embeddable, analytics-first tools&lt;/strong&gt;.  &lt;/p&gt;

&lt;p&gt;If you work with data (and who doesn’t?), you’ll quickly see why it’s called the &lt;strong&gt;“SQLite for Analytics.”&lt;/strong&gt;  &lt;/p&gt;

&lt;p&gt;Next time you’re stuck between Pandas and BigQuery, remember:&lt;br&gt;&lt;br&gt;
👉 Just Duck It. 🦆  &lt;/p&gt;




&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;DuckDB = Analytics engine that lives inside your app.&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zero setup, blazing fast, super portable.&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Best for:&lt;/strong&gt; Data science, prototyping, IoT, offline analytics.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Why viral?&lt;/strong&gt; → It makes data analysis &lt;em&gt;ridiculously simple&lt;/em&gt;.
&lt;/li&gt;
&lt;/ul&gt;




</description>
      <category>duckdb</category>
      <category>sql</category>
      <category>dataengineering</category>
      <category>datascience</category>
    </item>
    <item>
      <title>JavaScript Proxy Explained: Powerful Tips for Dynamic Object Handling</title>
      <dc:creator>Sanu Khan</dc:creator>
      <pubDate>Mon, 07 Jul 2025 12:42:29 +0000</pubDate>
      <link>https://forem.com/sanukhandev/unmasking-javascript-proxies-the-secret-agents-of-your-objects-4eac</link>
      <guid>https://forem.com/sanukhandev/unmasking-javascript-proxies-the-secret-agents-of-your-objects-4eac</guid>
      <description>&lt;p&gt;Learn how to use JavaScript's &lt;code&gt;Proxy&lt;/code&gt; object to intercept and control object behaviour. Includes real-world use cases like validation, logging, access control, and reactivity.&lt;/p&gt;

&lt;p&gt;JavaScript is full of surprises, and one of the most powerful yet underrated features is the &lt;code&gt;Proxy&lt;/code&gt; object. It allows you to intercept, customise, and secure operations on other objects without modifying them directly.&lt;/p&gt;

&lt;p&gt;Whether you're building a reactive UI, logging access, or applying security rules, &lt;code&gt;Proxy&lt;/code&gt; can be your best friend.&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%2Fs9hsy7uo9zyku0xl1k29.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%2Fs9hsy7uo9zyku0xl1k29.png" alt=" " width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🔍 What is a JavaScript Proxy?
&lt;/h2&gt;

&lt;p&gt;In simple terms, a &lt;strong&gt;Proxy&lt;/strong&gt; wraps an object and allows you to define custom behaviour for fundamental operations like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Reading (&lt;code&gt;get&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Writing (&lt;code&gt;set&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Deleting (&lt;code&gt;deleteProperty&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Function invocation (&lt;code&gt;apply&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Enumeration (&lt;code&gt;ownKeys&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;And more...&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  💡 Syntax
&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;proxy&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;Proxy&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;target&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;handler&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;strong&gt;target&lt;/strong&gt;: The object you want to proxy.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;handler&lt;/strong&gt;: An object that defines "traps" (functions that override default behaviour).&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  💼 Real-World Use Cases for Proxy in JavaScript
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. 📊 Logging Property Access
&lt;/h3&gt;

&lt;p&gt;Want to know when properties are accessed? A Proxy lets you track this easily.&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;user&lt;/span&gt; &lt;span class="o"&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="s2"&gt;Adnan&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Admin&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;loggedUser&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;Proxy&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;target&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;prop&lt;/span&gt;&lt;span class="p"&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="s2"&gt;`Property "&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;prop&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;" was accessed.`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;target&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;prop&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="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;loggedUser&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Logs: Property "name" was accessed.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&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%2F75rs3uf4zx552mn97nwb.png" alt=" " width="800" height="533"&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  2. 🛡️ Validating Property Values
&lt;/h3&gt;

&lt;p&gt;Enforce rules when users update object properties.&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;settings&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;volume&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;50&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;validatedSettings&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;Proxy&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;settings&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;target&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;prop&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&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;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;prop&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;volume&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Volume must be between 0 and 100&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="nx"&gt;target&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;prop&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;true&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="nx"&gt;validatedSettings&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;volume&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;80&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;  &lt;span class="c1"&gt;// ✅ OK&lt;/span&gt;
&lt;span class="nx"&gt;validatedSettings&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;volume&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;150&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// ❌ Error&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2Fudrug2loix1gzfubw68x.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%2Fudrug2loix1gzfubw68x.png" alt=" " width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  3. 🔐 Restricting Access to Sensitive Properties
&lt;/h3&gt;

&lt;p&gt;Block access to confidential data like &lt;code&gt;salary&lt;/code&gt; or &lt;code&gt;SSN&lt;/code&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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;employee&lt;/span&gt; &lt;span class="o"&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="s2"&gt;Jane&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;salary&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;7000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Manager&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;secureEmployee&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;Proxy&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;employee&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;target&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;prop&lt;/span&gt;&lt;span class="p"&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="nx"&gt;prop&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;salary&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;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Access denied to salary&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;return&lt;/span&gt; &lt;span class="nx"&gt;target&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;prop&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="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;secureEmployee&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;   &lt;span class="c1"&gt;// ✅ "Jane"&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;secureEmployee&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;salary&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// ❌ Error&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2Fzfyfelf57b129uofsgep.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%2Fzfyfelf57b129uofsgep.png" alt=" " width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  4. 🔄 Auto-Fallback for Missing Properties
&lt;/h3&gt;

&lt;p&gt;No more checking if a key exists—return defaults automatically.&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;defaultConfig&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;Proxy&lt;/span&gt;&lt;span class="p"&gt;({},&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;get&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;target&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;prop&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;prop&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nx"&gt;target&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="nx"&gt;target&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;prop&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="s2"&gt;Not set&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;defaultConfig&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;theme&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// "Not set"&lt;/span&gt;
&lt;span class="nx"&gt;defaultConfig&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;theme&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;dark&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;defaultConfig&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;theme&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// "dark"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2Fnrteqfg0vxuxu1uk9t5x.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%2Fnrteqfg0vxuxu1uk9t5x.png" alt=" " width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  5. 🚫 Making Objects Immutable
&lt;/h3&gt;

&lt;p&gt;Use Proxies to freeze an object’s properties dynamically.&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;constants&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;API_KEY&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;12345-SECRET&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;immutable&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;Proxy&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;constants&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Cannot modify constant values!&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;deleteProperty&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Cannot delete properties!&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="p"&gt;});&lt;/span&gt;

&lt;span class="nx"&gt;immutable&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;API_KEY&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;HACKED&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// ❌ Error&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2F2pgxgzwuugb3jv10c403.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%2F2pgxgzwuugb3jv10c403.png" alt=" " width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  ⚙️ Behind the Scenes: How Frameworks Use Proxy
&lt;/h2&gt;

&lt;h3&gt;
  
  
  🔄 Vue 3 Reactivity
&lt;/h3&gt;

&lt;p&gt;Vue.js 3 uses &lt;code&gt;Proxy&lt;/code&gt; for its &lt;strong&gt;reactivity system&lt;/strong&gt;, replacing the older &lt;code&gt;Object.defineProperty&lt;/code&gt; approach used in Vue 2.&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="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;reactive&lt;/span&gt; &lt;span class="p"&gt;}&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;vue&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;state&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;reactive&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;count&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;count&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// Vue tracks changes via Proxy&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2Frmbl6fu413rwwrqzg1n2.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%2Frmbl6fu413rwwrqzg1n2.png" alt=" " width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  ✅ Benefits of Using Proxy
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;🐞 &lt;strong&gt;Debugging&lt;/strong&gt;: Track object usage.&lt;/li&gt;
&lt;li&gt;🧼 &lt;strong&gt;Validation&lt;/strong&gt;: Ensure correct data.&lt;/li&gt;
&lt;li&gt;🛡 &lt;strong&gt;Security&lt;/strong&gt;: Hide sensitive info.&lt;/li&gt;
&lt;li&gt;🧠 &lt;strong&gt;Customization&lt;/strong&gt;: Dynamic behavior.&lt;/li&gt;
&lt;li&gt;💡 &lt;strong&gt;Fallbacks&lt;/strong&gt;: Return default values on the fly.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  ⚠️ Caution When Using Proxy
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Can make debugging harder if misused.&lt;/li&gt;
&lt;li&gt;Slight performance cost compared to plain objects.&lt;/li&gt;
&lt;li&gt;Doesn’t intercept internal slots of built-in types (e.g., Date).&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  📘 Further Reading
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy" rel="noopener noreferrer"&gt;MDN Web Docs: Proxy&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://vuejs.org/guide/essentials/reactivity-fundamentals.html" rel="noopener noreferrer"&gt;Vue 3 Reactivity System&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://blog.bitsrc.io/javascript-proxies-complete-guide-3c26f1243a68" rel="noopener noreferrer"&gt;Advanced Proxy Patterns&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




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

&lt;p&gt;JavaScript Proxies are like magical middlemen—they watch, intercept, and control object behaviour without messing with the original code. Whether you’re developing frameworks, building secure apps, or writing custom logging, &lt;strong&gt;Proxies give you superpowers&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Have you used &lt;code&gt;Proxy&lt;/code&gt; in production?&lt;br&gt;&lt;br&gt;
💬 Share your use cases in the comments!&lt;/p&gt;




&lt;h2&gt;
  
  
  🏷️ Tags
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;#javascript&lt;/code&gt; &lt;code&gt;#webdev&lt;/code&gt; &lt;code&gt;#frontend&lt;/code&gt; &lt;code&gt;#programming&lt;/code&gt; &lt;code&gt;#vuejs&lt;/code&gt; &lt;code&gt;#codingtips&lt;/code&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>frontend</category>
      <category>programming</category>
    </item>
    <item>
      <title>Creating a Merge Sort Array Prototype for Nested Objects, Strings, and Numbers in JavaScript</title>
      <dc:creator>Sanu Khan</dc:creator>
      <pubDate>Wed, 18 Jun 2025 07:01:41 +0000</pubDate>
      <link>https://forem.com/sanukhandev/creating-a-merge-sort-array-prototype-for-nested-objects-strings-and-numbers-in-javascript-4l3j</link>
      <guid>https://forem.com/sanukhandev/creating-a-merge-sort-array-prototype-for-nested-objects-strings-and-numbers-in-javascript-4l3j</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Learn how to extend JavaScript's Array prototype with a powerful and flexible merge sort function that supports nested objects, strings, and numbers.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  🧠 Creating a Merge Sort Array Prototype for Nested Objects, Strings, and Numbers
&lt;/h1&gt;

&lt;p&gt;Sorting arrays is easy — until you need to sort deeply nested objects, ensure stable results, or avoid mutating the original array.&lt;/p&gt;

&lt;p&gt;In this post, you’ll learn how to create a powerful, non-mutating &lt;code&gt;mergeSortBy()&lt;/code&gt; function on the &lt;code&gt;Array.prototype&lt;/code&gt; that supports:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✅ Numbers&lt;/li&gt;
&lt;li&gt;✅ Strings (case-insensitive)&lt;/li&gt;
&lt;li&gt;✅ Complex nested object keys (e.g., &lt;code&gt;"user.address.city"&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;✅ Custom comparator functions&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%2F9mzoxl2pc5edp1wgpban.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%2F9mzoxl2pc5edp1wgpban.png" alt=" " width="800" height="1200"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🔍 Why Not Just Use &lt;code&gt;.sort()&lt;/code&gt;?
&lt;/h2&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;&lt;code&gt;Array.sort()&lt;/code&gt;&lt;/th&gt;
&lt;th&gt;
&lt;code&gt;mergeSortBy()&lt;/code&gt; (Custom)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Mutates original array?&lt;/td&gt;
&lt;td&gt;✅ Yes&lt;/td&gt;
&lt;td&gt;❌ No&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Stable sort?&lt;/td&gt;
&lt;td&gt;❌ Not guaranteed before ES10&lt;/td&gt;
&lt;td&gt;✅ Always&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Deep key sorting?&lt;/td&gt;
&lt;td&gt;❌ No&lt;/td&gt;
&lt;td&gt;✅ Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Supports custom comparator?&lt;/td&gt;
&lt;td&gt;✅ Yes&lt;/td&gt;
&lt;td&gt;✅ Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  🔄 Step 1: Get Nested Values
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function getValue(obj, path) {
  return path.split('.').reduce((acc, key) =&amp;gt; acc?.[key], obj);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🧮 Step 2: Comparator Helper
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function defaultComparator(a, b) {
  if (a == null &amp;amp;&amp;amp; b != null) return -1;
  if (a != null &amp;amp;&amp;amp; b == null) return 1;
  if (typeof a === 'string' &amp;amp;&amp;amp; typeof b === 'string') {
    return a.localeCompare(b);
  }
  return a &amp;gt; b ? 1 : a &amp;lt; b ? -1 : 0;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🧩 Step 3: &lt;code&gt;mergeSortBy&lt;/code&gt; on Array.prototype
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if (!Array.prototype.mergeSortBy) {
  Array.prototype.mergeSortBy = function (keyOrFn) {
    const getComparator = () =&amp;gt; {
      if (typeof keyOrFn === 'function') return keyOrFn;
      if (typeof keyOrFn === 'string') {
        return (a, b) =&amp;gt;
          defaultComparator(getValue(a, keyOrFn), getValue(b, keyOrFn));
      }
      return defaultComparator;
    };

    const merge = (left, right, comparator) =&amp;gt; {
      const result = [];
      let i = 0, j = 0;
      while (i &amp;lt; left.length &amp;amp;&amp;amp; j &amp;lt; right.length) {
        result.push(
          comparator(left[i], right[j]) &amp;lt;= 0 ? left[i++] : right[j++]
        );
      }
      return result.concat(left.slice(i), right.slice(j));
    };

    const mergeSort = (arr, comparator) =&amp;gt; {
      if (arr.length &amp;lt;= 1) return arr;
      const mid = Math.floor(arr.length / 2);
      const left = mergeSort(arr.slice(0, mid), comparator);
      const right = mergeSort(arr.slice(mid), comparator);
      return merge(left, right, comparator);
    };

    return mergeSort(this.slice(), getComparator()); // non-mutating
  };
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🧪 Test Cases &amp;amp; Real Examples
&lt;/h2&gt;

&lt;h3&gt;
  
  
  ✅ 1. Sort numbers
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[9, 1, 4, 7].mergeSortBy(); // [1, 4, 7, 9]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  ✅ 2. Sort strings
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;["banana", "Apple", "cherry"].mergeSortBy();
// Output: ['Apple', 'banana', 'cherry']
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  ✅ 3. Sort objects with deep keys
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const users = [
  { id: 1, profile: { name: "John" } },
  { id: 2, profile: { name: "Alice" } },
  { id: 3, profile: { name: "Bob" } },
];

const sortedUsers = users.mergeSortBy("profile.name");
console.log(sortedUsers.map(u =&amp;gt; u.profile.name)); 
// ['Alice', 'Bob', 'John']
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  ✅ 4. Custom comparator
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const scores = [
  { name: "A", score: 90 },
  { name: "B", score: 100 },
  { name: "C", score: 95 },
];

const desc = scores.mergeSortBy((a, b) =&amp;gt; b.score - a.score);
console.log(desc.map(x =&amp;gt; x.score)); // [100, 95, 90]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  ⏱ Performance Comparison: &lt;code&gt;.sort()&lt;/code&gt; vs &lt;code&gt;mergeSortBy()&lt;/code&gt;
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const bigArray = Array.from({ length: 100000 }, () =&amp;gt; ({
  id: Math.random().toString(36).substring(7),
  value: Math.floor(Math.random() * 100)
}));

console.time("Native sort");
bigArray.slice().sort((a, b) =&amp;gt; a.value - b.value);
console.timeEnd("Native sort");

console.time("mergeSortBy");
bigArray.mergeSortBy("value");
console.timeEnd("mergeSortBy");
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  ✅ Stability Test
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const people = [
  { name: "Alice", age: 30 },
  { name: "Bob", age: 25 },
  { name: "Charlie", age: 30 },
];

const sorted = people.mergeSortBy("age");
console.log(sorted.map(p =&amp;gt; p.name)); 
// ['Bob', 'Alice', 'Charlie'] — Alice before Charlie (same age) ⇒ stable!
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🎯 Final Takeaways
&lt;/h2&gt;

&lt;p&gt;You just built a custom merge sort that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Handles primitives and nested objects&lt;/li&gt;
&lt;li&gt;Accepts string paths or comparator functions&lt;/li&gt;
&lt;li&gt;Is stable and predictable&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  ⚠️ Performance: Why Native &lt;code&gt;.sort()&lt;/code&gt; Is Faster Than &lt;code&gt;mergeSort()&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;After testing both &lt;code&gt;Array.prototype.sort()&lt;/code&gt; and our custom &lt;code&gt;mergeSort()&lt;/code&gt; on complex nested data, the results are clear:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Native Sort: ✅ Faster (~1.3ms)  
Merge Sort: ❌ Slower (~8.5ms)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  🚀 Why is Native &lt;code&gt;.sort()&lt;/code&gt; Faster?
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Reason&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Engine Optimized&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Native &lt;code&gt;.sort()&lt;/code&gt; is implemented in low-level languages like C++ inside JS engines (e.g., V8).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Hybrid Sorting&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Modern engines use &lt;strong&gt;Timsort&lt;/strong&gt; — a hybrid of Merge and Insertion sort — optimized for real-world data.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Better Memory Handling&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Avoids frequent array cloning operations like &lt;code&gt;slice()&lt;/code&gt; and &lt;code&gt;shift()&lt;/code&gt;, which are costly in JavaScript.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;In-place Sorting&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Operates directly on the original array without creating new intermediate arrays.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Small-Array Optimization&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;For short arrays, engines switch to &lt;strong&gt;insertion sort&lt;/strong&gt;, which is extremely fast.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h3&gt;
  
  
  📚 Then Why Bother With &lt;code&gt;mergeSort()&lt;/code&gt;?
&lt;/h3&gt;

&lt;p&gt;While native sort is faster, writing your own &lt;code&gt;mergeSort()&lt;/code&gt; still has value:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✅ &lt;strong&gt;Educational&lt;/strong&gt;: Great way to learn recursion and sorting logic.&lt;/li&gt;
&lt;li&gt;🔍 &lt;strong&gt;Transparent&lt;/strong&gt;: Full control over how elements are compared and sorted.&lt;/li&gt;
&lt;li&gt;🔄 &lt;strong&gt;Immutable Structures&lt;/strong&gt;: Useful in environments where mutation is discouraged.&lt;/li&gt;
&lt;li&gt;📊 &lt;strong&gt;Benchmarking&lt;/strong&gt;: Compare against other algorithms (QuickSort, HeapSort, etc.) for algorithm study.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  🧠 Takeaway
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Use &lt;code&gt;.sort()&lt;/code&gt; in production.&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Use &lt;code&gt;mergeSort()&lt;/code&gt; to understand how sorting works under the hood.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;







&lt;h2&gt;
  
  
  📬 What Next?
&lt;/h2&gt;

&lt;p&gt;Let me know:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Would you like a TypeScript version?&lt;/li&gt;
&lt;li&gt;Should this be a standalone NPM utility?&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;⭐ Found this helpful? Drop a like, comment, or bookmark!&lt;/p&gt;
&lt;/blockquote&gt;




</description>
      <category>webdev</category>
      <category>programming</category>
      <category>javascript</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Why Project Euler Might Be the Most Powerful DSA Trainer You're Not Using Yet</title>
      <dc:creator>Sanu Khan</dc:creator>
      <pubDate>Tue, 17 Jun 2025 07:41:04 +0000</pubDate>
      <link>https://forem.com/sanukhandev/why-project-euler-might-be-the-most-powerful-dsa-trainer-youre-not-using-yet-293c</link>
      <guid>https://forem.com/sanukhandev/why-project-euler-might-be-the-most-powerful-dsa-trainer-youre-not-using-yet-293c</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;“Most coders know LeetCode. Fewer know Project Euler. But those who do? They think deeper, optimise faster, and solve smarter.”&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&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%2Fjq4gksba2sqzeggjgvi5.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%2Fjq4gksba2sqzeggjgvi5.png" alt="Banner Image Euler's Equation" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  📚 A Tale of Two Coders
&lt;/h2&gt;

&lt;p&gt;Imagine two coders:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Alex&lt;/strong&gt; solves classic interview-style problems on LeetCode.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Riya&lt;/strong&gt; prefers tackling math-based programming puzzles on &lt;strong&gt;Project Euler&lt;/strong&gt;.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A few months in, Riya is noticeably better at optimisation, pattern spotting, and problem-solving.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What changed?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
👉 &lt;em&gt;She trained with Project Euler.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🧠 What &lt;em&gt;Exactly&lt;/em&gt; Is Project Euler?
&lt;/h2&gt;

&lt;p&gt;Project Euler is a collection of 800+ curated problems that blend math, logic, and programming.&lt;/p&gt;

&lt;p&gt;Each problem challenges you to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Spot patterns 🧩
&lt;/li&gt;
&lt;li&gt;Think algorithmically 🧠
&lt;/li&gt;
&lt;li&gt;Solve problems &lt;strong&gt;without hand-holding&lt;/strong&gt; 🎯
&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Unlike most platforms, it doesn’t give you test cases — it gives you a &lt;strong&gt;riddle&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  🪜 Your 4-Phase Project Euler + DSA Roadmap
&lt;/h2&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%2Fmzcb9zxtsdkra8ez71rx.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%2Fmzcb9zxtsdkra8ez71rx.png" alt="A video game level progression map with 4 stages labeled: Beginner, Intermediate, Advanced, Expert — each with code-related icons and glowing challenge gates — flat vector style" width="800" height="1200"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  🌱 Phase 1: Build Your Foundation (Problems 1–10)
&lt;/h3&gt;

&lt;p&gt;Start with core programming concepts: loops, conditions, and math patterns.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🧩 Example:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Problem 1 – Sum of Multiples of 3 and 5&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
How many numbers below 1000 are divisible by 3 or 5?&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;✅ Skills: loops, modulus, arithmetic optimisation&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h3&gt;
  
  
  🌿 Phase 2: Master Core DSA (Problems 11–40)
&lt;/h3&gt;

&lt;p&gt;Here, problems require &lt;strong&gt;recursion&lt;/strong&gt;, &lt;strong&gt;memoization&lt;/strong&gt;, and &lt;strong&gt;array logic&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🧩 Example:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Problem 14 – Longest Collatz Sequence&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Which number under 1 million produces the longest sequence?&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;✅ Skills: HashMaps, recursion, memoisation&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h3&gt;
  
  
  🌳 Phase 3: Think Algorithmically (Problems 41–80)
&lt;/h3&gt;

&lt;p&gt;Time to introduce &lt;strong&gt;sieves&lt;/strong&gt;, &lt;strong&gt;prefix sums&lt;/strong&gt;, and &lt;strong&gt;backtracking&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🧩 Example:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Problem 50 – Consecutive Prime Sum&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Find the prime below 1 million that can be written as the longest sum of consecutive primes.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;✅ Skills: Modular math, optimisation, big number handling&lt;/p&gt;
&lt;/blockquote&gt;




&lt;blockquote&gt;
&lt;p&gt;✅ Skills: Prime sieve, sliding window, prefix sum&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h3&gt;
  
  
  🌲 Phase 4: Engineer Like a Mathematician (81+)
&lt;/h3&gt;

&lt;p&gt;This level is serious: matrix DP, modular exponentiation, and combinatorics.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🧩 Example:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Problem 97 – Large Non-Mersenne Prime&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
What are the last 10 digits of a massive prime number expression?&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%2F0044gajyhepde7tmpis9.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%2F0044gajyhepde7tmpis9.png" alt="Abstract brain made of code and math equations, connected to a computer chip — futuristic glowing design in dark mode" width="800" height="1200"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  💻 Which Language Should You Use?
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Language&lt;/th&gt;
&lt;th&gt;Why It’s Good&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;-------------------------------------------------------------|&lt;br&gt;
| &lt;strong&gt;Python&lt;/strong&gt; | Easy syntax, built-in big integers, math libs |&lt;br&gt;
| C++        | Performance-heavy problems, manual control    |&lt;br&gt;
| Java       | Strong typing, BigInteger support             |&lt;br&gt;
| Haskell    | Elegant solutions, great for math-heavy logic |&lt;/p&gt;

&lt;p&gt;🏆 &lt;strong&gt;Best Choice:&lt;/strong&gt; Python — it’s perfect for Euler’s math + logic challenges.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔥 Why Most People Ignore Project Euler (And Why You Shouldn’t)
&lt;/h2&gt;

&lt;p&gt;Common reasons:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;“Too mathematical.”&lt;/li&gt;
&lt;li&gt;“Not practical for interviews.”&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;💡 Truth: Project Euler &lt;strong&gt;teaches you optimization, reasoning, and how to build your own test cases&lt;/strong&gt; — skills that ace interviews and improve real-world coding.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Euler makes you &lt;strong&gt;solve smarter&lt;/strong&gt;, not just faster.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  🎯 Getting Started (Today!)
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Go to &lt;a href="https://projecteuler.net/" rel="noopener noreferrer"&gt;projecteuler.net&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Create an account.&lt;/li&gt;
&lt;li&gt;Start with Problem 1.&lt;/li&gt;
&lt;li&gt;Write your code, refactor, and &lt;strong&gt;reflect&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;What DSA did you use?&lt;/li&gt;
&lt;li&gt;How did you optimize?&lt;/li&gt;
&lt;li&gt;What patterns did you discover?&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;✅ Bonus: Post your solutions weekly on GitHub or LinkedIn for habit + portfolio building.&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%2Frx1gyyp79p54scu5k8bf.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%2Frx1gyyp79p54scu5k8bf.png" alt="A focused developer surrounded by mathematical symbols, writing code on a glowing laptop in a dimly lit workspace — high contrast digital painting style." width="800" height="1200"&gt;&lt;/a&gt;&lt;/p&gt;




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

&lt;p&gt;If you want to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Crack interviews&lt;/li&gt;
&lt;li&gt;Think like an algorithm designer&lt;/li&gt;
&lt;li&gt;Train for the ICPC/Codeforces level&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;… then &lt;strong&gt;Project Euler is your secret weapon.&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Start with 1 problem per day. Let the puzzle teach you.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h3&gt;
  
  
  💬 Let's Talk
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;What’s the first Euler problem you’ll try?&lt;/li&gt;
&lt;li&gt;Want a public leaderboard challenge every weekend?&lt;/li&gt;
&lt;li&gt;Interested in a curated “Euler Weekly” newsletter?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Comment below or DM to join a challenge group. Let’s think deeper, together.&lt;/p&gt;

</description>
      <category>dsa</category>
      <category>python</category>
      <category>projecteuler</category>
      <category>programming</category>
    </item>
    <item>
      <title>How Warp Terminal Saved Me from a Git Disaster (With Just One Prompt)</title>
      <dc:creator>Sanu Khan</dc:creator>
      <pubDate>Thu, 08 May 2025 08:50:06 +0000</pubDate>
      <link>https://forem.com/sanukhandev/how-warp-terminal-saved-me-from-a-git-disaster-with-just-one-prompt-3fge</link>
      <guid>https://forem.com/sanukhandev/how-warp-terminal-saved-me-from-a-git-disaster-with-just-one-prompt-3fge</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;When Git rebasing goes wrong, Warp Terminal can be your smartest ally. Here's how it helped me reset my branch in seconds.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If you've ever found yourself tangled in a Git mess—conflicts mid-rebase, local changes everywhere, and that sinking feeling of “I’ve broken everything”—you’re not alone. That was me, staring at my screen, mid-panic, until &lt;strong&gt;Warp Terminal&lt;/strong&gt; stepped in like a superhero with a command cape.&lt;/p&gt;

&lt;p&gt;I was knee-deep in a rebase gone wrong. My local branch &lt;code&gt;dev/1.0.0-2025&lt;/code&gt; was full of merge conflicts, and the more I tried to fix it, the messier it got. I just wanted to &lt;strong&gt;reset everything to match the remote branch&lt;/strong&gt;. A clean slate.&lt;/p&gt;

&lt;p&gt;Normally, this means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Checking status&lt;/li&gt;
&lt;li&gt;Aborting rebase&lt;/li&gt;
&lt;li&gt;Fetching from origin&lt;/li&gt;
&lt;li&gt;Hard resetting&lt;/li&gt;
&lt;li&gt;Cleaning up&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;…and crossing your fingers that nothing breaks.&lt;/p&gt;

&lt;h2&gt;
  
  
  ⚡ Enter: Warp Terminal
&lt;/h2&gt;

&lt;p&gt;Before I show how Warp rescued me, let me introduce it briefly.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is Warp?
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://www.warp.dev" rel="noopener noreferrer"&gt;&lt;strong&gt;Warp&lt;/strong&gt;&lt;/a&gt; is a modern terminal built in Rust, designed for the way developers work &lt;strong&gt;today&lt;/strong&gt;. Some standout features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Blazing fast performance&lt;/li&gt;
&lt;li&gt;Blocks-based UI (great for copy/paste and command context)&lt;/li&gt;
&lt;li&gt;Autocomplete with inline docs&lt;/li&gt;
&lt;li&gt;AI Command Search for natural-language help&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It’s like pairing with a senior dev who lives in your terminal.&lt;/p&gt;

&lt;h2&gt;
  
  
  🧠 Solving Git with One Prompt
&lt;/h2&gt;

&lt;p&gt;Back to the mess I was in.&lt;/p&gt;

&lt;p&gt;Instead of fumbling through Git commands, I typed this prompt in Warp:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;reset to current remote
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And what I got was &lt;strong&gt;exactly what I needed&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. Ensure that there are no important local changes that need to be preserved.
2. Abort the ongoing rebase operation:
   • git rebase --abort
3. Switch to the branch:
   • git checkout dev/1.0.0-2025
4. Fetch all changes:
   • git fetch --all
5. Hard-reset the branch:
   • git reset --hard origin/dev/1.0.0-2025
6. Clean untracked files:
   • git clean -fd
7. Verify everything is synced.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Warp gave me &lt;em&gt;context-aware&lt;/em&gt;, clear, and safe steps—tailored to my repo.&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%2F99ayhpzwy8up2r79emu5.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%2F99ayhpzwy8up2r79emu5.png" alt="Wrap terminal AI powered terminal" width="800" height="1180"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  🎯 Why It Mattered
&lt;/h2&gt;

&lt;p&gt;In less than a minute, I went from rebase chaos to a clean, synced branch—all without ever leaving my terminal. No copy-pasting from Stack Overflow. No second-guessing syntax. Just one intelligent prompt.&lt;/p&gt;

&lt;h2&gt;
  
  
  ✅ Final Thoughts: Terminal, Reinvented
&lt;/h2&gt;

&lt;p&gt;If you're still using the default terminal your OS shipped with, it's time to level up. &lt;strong&gt;Warp Terminal&lt;/strong&gt; isn’t just for looks—it’s a productivity engine.&lt;/p&gt;

&lt;p&gt;It helped me:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Avoid disaster&lt;/li&gt;
&lt;li&gt;Save time&lt;/li&gt;
&lt;li&gt;Fix my branch painlessly&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Next time Git throws you a curveball, let Warp take the wheel.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;🔗 &lt;a href="https://www.warp.dev" rel="noopener noreferrer"&gt;Try Warp for free →&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;p&gt;✍️ &lt;em&gt;Have you tried Warp? Share your experience in the comments!&lt;/em&gt;&lt;/p&gt;

</description>
      <category>git</category>
      <category>terminal</category>
      <category>productivity</category>
      <category>devtools</category>
    </item>
    <item>
      <title>Building a Cost-Effective Full-Stack SaaS Platform: A Practical Guide for Small to Mid-Size IT Startups</title>
      <dc:creator>Sanu Khan</dc:creator>
      <pubDate>Tue, 22 Apr 2025 09:00:21 +0000</pubDate>
      <link>https://forem.com/sanukhandev/building-a-cost-effective-full-stack-saas-platform-a-practical-guide-for-small-to-mid-size-it-2d44</link>
      <guid>https://forem.com/sanukhandev/building-a-cost-effective-full-stack-saas-platform-a-practical-guide-for-small-to-mid-size-it-2d44</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;"It’s not the tools you have faith in – tools are just tools – they work, or they don’t. It’s the people you have faith in or not."&lt;br&gt;
— &lt;em&gt;&lt;strong&gt;Steve Jobs&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In today’s fast-evolving digital economy, building a SaaS platform isn’t just about writing code—it’s about making smart architectural choices that maximise efficiency, scalability, and cost-effectiveness. Whether you're an early-stage startup or a growing mid-sized business, setting up your SaaS infrastructure right from the start can save you thousands down the road.&lt;/p&gt;

&lt;p&gt;In this blog post, I’ll walk you through a pragmatic full-stack architecture for launching a multi-tenant SaaS platform using a blend of modern and battle-tested technologies. The key objective? Strike the perfect balance between performance, maintainability, and cost.&lt;/p&gt;

&lt;h2&gt;
  
  
  💡 The Tech Stack At a Glance
&lt;/h2&gt;

&lt;p&gt;This stack has been carefully chosen to balance developer productivity, cost-effectiveness, and scalability. Let’s dive deeper into the choices:&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%2Flkgwlx37pfc1dq9g3z27.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%2Flkgwlx37pfc1dq9g3z27.png" alt=" " width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🔧 Backend API: Laravel (PHP)&lt;/strong&gt;&lt;br&gt;
Laravel offers a powerful toolkit for API development and is well-suited for structured business logic. It’s a mature framework with a massive ecosystem.&lt;/p&gt;

&lt;p&gt;Key Benefits:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Built-in support for routing, middleware, validation, and authentication&lt;/li&gt;
&lt;li&gt;Excellent ecosystem (queues, scheduling, notifications, testing)&lt;/li&gt;
&lt;li&gt;Laravel Sanctum or Passport for secure API authentication&lt;/li&gt;
&lt;li&gt;Native support for multi-tenancy using community packages like tenancy/tenancy&lt;/li&gt;
&lt;li&gt;Easily deployable on shared hosting environments&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;🖼 Frontend: Next.js with Tailwind CSS&lt;/strong&gt;&lt;br&gt;
Next.js provides a powerful framework for server-rendered React applications and supports hybrid static &amp;amp; SSR pages.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why Next.js?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Built-in SSR (Server Side Rendering) for SEO and initial page performance&lt;/li&gt;
&lt;li&gt;API Routes for quick backend logic&lt;/li&gt;
&lt;li&gt;Easy routing system and middleware support&lt;/li&gt;
&lt;li&gt;Great support for subdomain routing and multitenancy frontends&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Why Tailwind CSS?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Utility-first approach = consistent and fast styling&lt;/li&gt;
&lt;li&gt;No need for complex CSS setups or naming conventions&lt;/li&gt;
&lt;li&gt;Responsive, mobile-first design out-of-the-box&lt;/li&gt;
&lt;li&gt;Perfect for prototyping and scaling UI design&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;🗃 Database: MySQL with Multi-Tenant Strategy&lt;/strong&gt;&lt;br&gt;
MySQL remains a solid, affordable, and easy-to-manage database engine.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Multi-Tenancy Strategy:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Shared schema: All tenants share the same tables, with a tenant_id column for data separation&lt;/li&gt;
&lt;li&gt;Efficient indexing and performance for up to hundreds of tenants&lt;/li&gt;
&lt;li&gt;Easily migrate to schema-based isolation when scaling further&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Why MySQL?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Supported by all major hosting providers, including cPanel&lt;/li&gt;
&lt;li&gt;Easy backup and replication support&lt;/li&gt;
&lt;li&gt;Low overhead and proven stability&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;📚 CMS: Headless WordPress&lt;/strong&gt;&lt;br&gt;
WordPress is the world's most popular CMS. Running it in headless mode delivers structured content with full control over the front end.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How it's used:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Manage landing pages, blogs, FAQs, help center&lt;/li&gt;
&lt;li&gt;Integrate via REST API or GraphQL (using plugins like WPGraphQL)&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Roles and workflows for content team collaboration&lt;br&gt;
&lt;strong&gt;Why Headless WordPress?&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Familiar with content teams&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Flexible and extendable with plugins&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Easily managed via traditional cPanel hosting&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;📦 Master Data Management: UnoPIM with AI Integration&lt;/strong&gt;&lt;br&gt;
UnoPIM is a lightweight, modern product information management system. It's a great choice for SaaS platforms dealing with large, structured datasets like inventory, product catalogues, or standardised datasets.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why UnoPIM?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;SaaS-ready, low configuration PIM&lt;/li&gt;
&lt;li&gt;Supports multi-language, multi-region, multi-brand datasets&lt;/li&gt;
&lt;li&gt;Offers API-first architecture&lt;/li&gt;
&lt;li&gt;AI integration allows:&lt;/li&gt;
&lt;li&gt;Auto-tagging&lt;/li&gt;
&lt;li&gt;Product image matching&lt;/li&gt;
&lt;li&gt;Content enrichment&lt;/li&gt;
&lt;li&gt;Smart data validation and suggestions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;🤝 CRM: Zoho CRM&lt;br&gt;
An affordable and scalable customer relationship management tool, Zoho CRM allows for deep integration with business logic.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why Zoho CRM?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Excellent value at startup cost&lt;/li&gt;
&lt;li&gt;APIs for leads, deals, tasks, and custom modules&lt;/li&gt;
&lt;li&gt;Workflow automation and AI insights (Zia AI)&lt;/li&gt;
&lt;li&gt;Can be integrated with Laravel and frontend to sync users, deals, and actions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;🚀 Deployment: Shared cPanel Hosting&lt;/strong&gt;&lt;br&gt;
Yes, you read that right. You don’t need AWS or DigitalOcean to get started.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why Shared cPanel?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Budget-friendly ($3 to $10/month)&lt;/li&gt;
&lt;li&gt;Simple deployment of Laravel via public_html/api&lt;/li&gt;
&lt;li&gt;MySQL, Cron Jobs, SSL, FTP, Email included&lt;/li&gt;
&lt;li&gt;Easy to run Headless WordPress alongside Laravel&lt;/li&gt;
&lt;li&gt;Next.js can be deployed via npm run build &amp;amp;&amp;amp; export and served via static hosting or proxies&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;You can always migrate later to VPS, containerized (Docker) infrastructure, or use PaaS options like Heroku or Render when you're ready to scale.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;🏗️ Multi-Tenant Architecture with MySQL&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%2Fup74jyl98ymo4y3nhsko.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%2Fup74jyl98ymo4y3nhsko.png" alt=" " width="800" height="462"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Multi-tenancy is the heart of any SaaS. In this approach, we use a shared database with tenant-level isolation using tenant IDs or schema separation. This helps us:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Minimize infrastructure costs (especially in the early stage)&lt;/li&gt;
&lt;li&gt;Easily onboard new clients with subdomain-specific logins (e.g., clientA.platform.com)&lt;/li&gt;
&lt;li&gt;Scale horizontally by abstracting tenant-specific data access&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;✅ Why MySQL?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It’s reliable, easy to maintain, and available on almost every hosting platform—perfect for lean SaaS startups not ready to pay for heavy cloud-managed DB services yet.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;🌐 Subdomain Strategy: Branding + Security&lt;/strong&gt;&lt;br&gt;
Each organization gets a unique subdomain (org1.yoursaas.com, org2.yoursaas.com) that maps to their tenant space. Benefits include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Better brand identity per client&lt;/li&gt;
&lt;li&gt;Seamless SSO and domain-based isolation&lt;/li&gt;
&lt;li&gt;Tenant-wise login, dashboard routing, and role-based permissions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;🧱 Laravel as Backend API Layer&lt;/strong&gt;&lt;br&gt;
Laravel offers a powerful, opinionated framework for API development. Here's why it edges out Node.js in our case:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;✅ Why Laravel over Node.js?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Built-in multi-tenancy packages like Tenancy for Laravel&lt;/li&gt;
&lt;li&gt;Rich ecosystem for auth, queues, emails, and scheduling&lt;/li&gt;
&lt;li&gt;Elegant syntax and faster MVP development&lt;/li&gt;
&lt;li&gt;Simpler to deploy on shared hosting environments like cPanel&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;⚡ Next.js (SSR) + Tailwind CSS for Frontend&lt;/strong&gt;&lt;br&gt;
The frontend stack uses Next.js for Server-Side Rendering (SSR), paired with Tailwind CSS for rapid styling.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Benefits:&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Better SEO and first load performance&lt;/li&gt;
&lt;li&gt;Dynamic routing for subdomains and tenant-based UI&lt;/li&gt;
&lt;li&gt;Tailwind ensures maintainable and scalable UI development with a utility-first approach&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;🚀 Deployment on Shared cPanel Hosting&lt;/strong&gt;&lt;br&gt;
Yes, even in 2025, shared hosting can still be viable, especially for startups with a tight budget.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Here’s how we make it work:&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Laravel backend + MySQL on cPanel (using public_html/api)&lt;/li&gt;
&lt;li&gt;WordPress headless install (same or different folder)&lt;/li&gt;
&lt;li&gt;Next.js app built and exported to static files (npm run export) and served via Apache or Nginx&lt;/li&gt;
&lt;li&gt;Crons/schedulers can run via cron jobs in cPanel&lt;/li&gt;
&lt;li&gt;SSL via Autossl / Let’s Encrypt&lt;/li&gt;
&lt;li&gt;Email support and file storage at no extra cost&lt;/li&gt;
&lt;li&gt;✅ Why this makes sense for early-stage SaaS:&lt;/li&gt;
&lt;li&gt;No DevOps overhead&lt;/li&gt;
&lt;li&gt;Cheap ($3–$5/month)&lt;/li&gt;
&lt;li&gt;Built-in tools for backups, DNS, FTP, and email&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;When you scale? Just lift-and-shift to VPS, DigitalOcean, or AWS.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You don’t need a million-dollar budget to launch a world-class SaaS product. With the right choices, even small teams can build scalable, secure, and maintainable systems. The above stack empowers your team to focus on what matters most: delivering value to customers.&lt;/p&gt;

&lt;p&gt;If you're planning to launch or scale a SaaS product and want an architecture tailored to your stage, reach out or drop your questions below.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>startup</category>
      <category>agile</category>
      <category>fullstack</category>
    </item>
    <item>
      <title>Unravelling P vs NP: How This Unsolved Problem Influences the Future of AI with Quantum Computing</title>
      <dc:creator>Sanu Khan</dc:creator>
      <pubDate>Thu, 20 Jun 2024 05:49:27 +0000</pubDate>
      <link>https://forem.com/sanukhandev/unravelling-p-vs-np-how-this-unsolved-problem-influences-the-future-of-ai-with-quantum-computing-37c3</link>
      <guid>https://forem.com/sanukhandev/unravelling-p-vs-np-how-this-unsolved-problem-influences-the-future-of-ai-with-quantum-computing-37c3</guid>
      <description>&lt;p&gt;In the world of artificial intelligence, the P vs NP problem looms large as one of the most profound and challenging puzzles. This fundamental question in computer science and mathematics could be the key to unlocking the next level of AI capabilities. Understanding and solving the P vs NP problem could transform AI, making it faster, smarter, and more powerful than ever before. Moreover, the advent of quantum computing introduces a new dimension to this problem, offering potential pathways to solutions that could revolutionize AI.&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding P vs NP
&lt;/h2&gt;

&lt;h3&gt;
  
  
  P (Polynomial Time)
&lt;/h3&gt;

&lt;p&gt;Problems classified under P can be solved quickly by a computer. The "quickly" here means that the time taken to solve these problems scales reasonably (polynomially) with the size of the input. Examples of P problems in AI include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Pathfinding algorithms for navigation.&lt;/li&gt;
&lt;li&gt;Sorting and searching large datasets.&lt;/li&gt;
&lt;li&gt;Real-time decision-making in robotics.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  NP (Nondeterministic Polynomial Time)
&lt;/h3&gt;

&lt;p&gt;NP problems are those for which a solution, once found, can be verified quickly, even if finding that solution might be prohibitively time-consuming. In the context of AI, NP problems include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Optimization tasks in machine learning.&lt;/li&gt;
&lt;li&gt;Complex pattern recognition.&lt;/li&gt;
&lt;li&gt;Certain types of scheduling and resource allocation problems.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The big question: &lt;strong&gt;If a problem's solution can be verified quickly (NP), can it also be solved quickly (P)?&lt;/strong&gt; This is the essence of the P vs NP problem.&lt;/p&gt;

&lt;h2&gt;
  
  
  Implications for AI
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Enhancing Machine Learning
&lt;/h3&gt;

&lt;p&gt;Machine learning, a cornerstone of modern AI, involves training algorithms on large datasets to recognize patterns and make decisions. Many machine learning tasks are essentially NP problems, where finding the optimal model parameters is computationally intensive. If P = NP, it would mean that we could find these optimal solutions quickly, dramatically improving the efficiency and effectiveness of AI systems.&lt;/p&gt;

&lt;h3&gt;
  
  
  Advanced Problem Solving
&lt;/h3&gt;

&lt;p&gt;AI excels at solving problems within well-defined boundaries. However, many real-world problems are NP-hard, meaning they are currently infeasible to solve exactly within a reasonable time frame. Examples include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Drug discovery:&lt;/strong&gt; Finding the best molecular compounds.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Logistics:&lt;/strong&gt; Optimizing delivery routes and supply chains.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Natural language processing:&lt;/strong&gt; Understanding and generating human language at a deep, nuanced level.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If P = NP, AI could solve these complex problems rapidly, leading to breakthroughs across various domains.&lt;/p&gt;

&lt;h3&gt;
  
  
  Revolutionizing Algorithms
&lt;/h3&gt;

&lt;p&gt;The algorithms that underpin AI systems would undergo a revolution. Currently, many AI algorithms rely on heuristics or approximations to tackle NP problems. Proving P = NP would mean that exact solutions could be found efficiently, eliminating the need for approximations and significantly increasing accuracy and reliability.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Impact on AI Research and Development
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Computational Complexity and AI
&lt;/h3&gt;

&lt;p&gt;Computational complexity, the study of resources needed to solve problems, is at the heart of AI research. Understanding the complexity of problems helps researchers develop more efficient algorithms. The P vs NP problem is a central question in this field. Its resolution would redefine what is computationally feasible, pushing the boundaries of AI research.&lt;/p&gt;

&lt;h3&gt;
  
  
  Circuit Complexity and AI
&lt;/h3&gt;

&lt;p&gt;Circuit complexity, which studies the minimum resources required to solve Boolean functions, intersects with AI in hardware design and optimization. AI systems rely on hardware to perform computations efficiently. Solving P vs NP could lead to new, more efficient hardware designs, further boosting AI performance.&lt;/p&gt;

&lt;h3&gt;
  
  
  Meta-Complexity in AI
&lt;/h3&gt;

&lt;p&gt;Meta-complexity explores the difficulty of determining the hardness of computational problems. This has implications for AI in terms of understanding the limits of what AI can achieve. Solving P vs NP would provide new insights into the theoretical capabilities of AI, guiding future research directions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Quantum Computing and P vs NP
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Quantum Computing: A New Paradigm
&lt;/h3&gt;

&lt;p&gt;Quantum computing leverages the principles of quantum mechanics to process information in fundamentally different ways than classical computers. Quantum bits (qubits) can represent both 0 and 1 simultaneously, enabling the parallel processing of vast amounts of data.&lt;/p&gt;

&lt;h3&gt;
  
  
  Hypothetical Solutions with Quantum Computing
&lt;/h3&gt;

&lt;p&gt;Quantum computing holds the potential to revolutionize the P vs NP problem by providing new approaches to problem-solving:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Quantum Algorithms:&lt;/strong&gt; Algorithms like Shor’s algorithm and Grover’s algorithm demonstrate that quantum computers can solve specific problems much faster than classical computers. If similar quantum algorithms are developed for NP problems, it could lead to breakthroughs in AI.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Parallel Processing Power:&lt;/strong&gt; Quantum computers can explore multiple solutions simultaneously, potentially finding solutions to NP problems more efficiently. This parallelism could drastically reduce the time required to solve complex AI problems.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Quantum Annealing:&lt;/strong&gt; Techniques like quantum annealing are already being used to tackle optimization problems, which are central to AI. These methods could be extended to address NP problems, providing faster and more accurate solutions.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  The Future of AI with Quantum Computing
&lt;/h3&gt;

&lt;p&gt;If quantum computing can provide a pathway to solving the P vs NP problem, the implications for AI are profound:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Unprecedented Computational Power:&lt;/strong&gt; AI systems would gain access to unprecedented computational power, enabling them to solve previously intractable problems quickly and accurately.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enhanced Machine Learning:&lt;/strong&gt; Quantum machine learning algorithms could learn from data more efficiently, leading to faster and more powerful AI models.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Breakthroughs in Various Fields:&lt;/strong&gt; Fields like cryptography, drug discovery, and logistics would experience transformative advancements, driven by AI’s enhanced problem-solving capabilities.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Security Considerations
&lt;/h2&gt;

&lt;p&gt;The potential power of AI in a world where P = NP or quantum computing solves NP problems comes with ethical and security challenges. The ability to solve complex problems quickly could be used for malicious purposes, such as cracking encryption codes. It is crucial to develop ethical guidelines and robust security measures to ensure that AI advancements are used for the benefit of society.&lt;/p&gt;

&lt;h2&gt;
  
  
  My Thoughts
&lt;/h2&gt;

&lt;p&gt;The P vs NP problem is more than an abstract mathematical question; it is a key to unlocking AI’s full potential. Solving this problem, especially with the aid of quantum computing, could lead to AI systems that are vastly more powerful and capable, revolutionizing industries and solving some of humanity’s most challenging problems. As researchers continue to explore this enigma, the future of AI looks both exciting and transformative. The journey to solve P vs NP promises to be one of the most impactful quests in the history of science and technology, with AI standing to gain immensely from its resolution.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>computerscience</category>
      <category>computing</category>
      <category>programming</category>
    </item>
    <item>
      <title>P vs NP Problem: The Ultimate Computer / Math Puzzle</title>
      <dc:creator>Sanu Khan</dc:creator>
      <pubDate>Wed, 19 Jun 2024 09:26:34 +0000</pubDate>
      <link>https://forem.com/sanukhandev/p-vs-np-problem-the-ultimate-computer-math-puzzle-5hj0</link>
      <guid>https://forem.com/sanukhandev/p-vs-np-problem-the-ultimate-computer-math-puzzle-5hj0</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for &lt;a href="https://dev.to/challenges/cs"&gt;DEV Computer Science Challenge v24.06.12: One Byte Explainer&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Explainer
&lt;/h2&gt;

&lt;p&gt;A fundamental question in computer science asking if every problem whose solution can be quickly verified (NP) can also be quickly solved (P). Solving this would revolutionize fields like cryptography, optimization, and more.&lt;/p&gt;

&lt;h2&gt;
  
  
  Additional Context
&lt;/h2&gt;

&lt;p&gt;The P vs NP Problem is one of the seven Millennium Prize Problems with a $1 million reward for a correct solution, highlighting its significance in theoretical computer science and practical applications.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>cschallenge</category>
      <category>computerscience</category>
      <category>beginners</category>
    </item>
    <item>
      <title>A Comprehensive Guide to Big O Notation and Efficient Coding Practices with Examples</title>
      <dc:creator>Sanu Khan</dc:creator>
      <pubDate>Wed, 19 Jun 2024 09:08:15 +0000</pubDate>
      <link>https://forem.com/sanukhandev/a-comprehensive-guide-to-big-o-notation-and-efficient-coding-practices-with-examples-44n2</link>
      <guid>https://forem.com/sanukhandev/a-comprehensive-guide-to-big-o-notation-and-efficient-coding-practices-with-examples-44n2</guid>
      <description>&lt;p&gt;In the world of software development, algorithms play a crucial role in solving complex problems efficiently. Whether you are preparing for a coding interview or working on real-world applications, a strong understanding of algorithms is essential. This article explores the basics of algorithms, their importance, and how to analyze their efficiency using the knapsack problem as a key example. We will also delve into the importance of time and space complexity in algorithm design, with detailed examples in JavaScript.&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding Algorithms
&lt;/h2&gt;

&lt;p&gt;An algorithm is essentially a sequence of steps designed to solve a specific problem. These steps need to be clear, unambiguous, and designed to handle the given input to produce the desired output. For developers, the ability to craft efficient algorithms is vital as it directly impacts the performance and scalability of the software they create.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example: Basic Algorithm for Finding Maximum Number&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Let's consider a simple algorithm to find the maximum number in an array of integers:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Initialize a variable &lt;code&gt;max&lt;/code&gt; with the first element of the array.&lt;/li&gt;
&lt;li&gt;Iterate through each element of the array.&lt;/li&gt;
&lt;li&gt;If the current element is greater than &lt;code&gt;max&lt;/code&gt;, update &lt;code&gt;max&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;After the loop ends, &lt;code&gt;max&lt;/code&gt; contains the maximum number.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Here's how this looks in JavaScript 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="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;findMax&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;maxNum&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;arr&lt;/span&gt;&lt;span class="p"&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;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;num&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nx"&gt;arr&lt;/span&gt;&lt;span class="p"&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="nx"&gt;num&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;maxNum&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nx"&gt;maxNum&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;num&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="nx"&gt;maxNum&lt;/span&gt;&lt;span class="p"&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;numbers&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;8&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="nf"&gt;findMax&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;numbers&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt; &lt;span class="c1"&gt;// Output: 8&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This algorithm has a time complexity of O(n) because it requires a single pass through the array.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Knapsack Problem
&lt;/h2&gt;

&lt;p&gt;One classic example often used in interviews is the knapsack problem. In this problem, you are given a list of items, each with a value and a weight, and a bag that can carry a maximum weight. The objective is to select the items that maximize the total value without exceeding the bag's weight capacity. This problem not only tests your problem-solving skills but also your ability to write efficient code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example: Solving the Knapsack Problem&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;There are different approaches to solve the knapsack problem, including:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Greedy Algorithm&lt;/strong&gt;: This approach works for the fractional knapsack problem but not for the 0/1 knapsack problem.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dynamic Programming&lt;/strong&gt;: This is the most efficient approach for the 0/1 knapsack problem.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Dynamic Programming Solution:&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="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;knapsack&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;weights&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;values&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;capacity&lt;/span&gt;&lt;span class="p"&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;n&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;weights&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&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;dp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Array&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;n&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;fill&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nc"&gt;Array&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;capacity&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;fill&lt;/span&gt;&lt;span class="p"&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;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&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="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="nx"&gt;n&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&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;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;w&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="nx"&gt;w&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="nx"&gt;capacity&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;w&lt;/span&gt;&lt;span class="o"&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;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&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="o"&gt;||&lt;/span&gt; &lt;span class="nx"&gt;w&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="p"&gt;{&lt;/span&gt;
                &lt;span class="nx"&gt;dp&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="nx"&gt;w&lt;/span&gt;&lt;span class="p"&gt;]&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="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;weights&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="nx"&gt;w&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="nx"&gt;dp&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="nx"&gt;w&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;max&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;values&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;dp&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="nx"&gt;w&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;weights&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]],&lt;/span&gt; &lt;span class="nx"&gt;dp&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="nx"&gt;w&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="nx"&gt;dp&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="nx"&gt;w&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;dp&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="nx"&gt;w&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;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;dp&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;n&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="nx"&gt;capacity&lt;/span&gt;&lt;span class="p"&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;weights&lt;/span&gt; &lt;span class="o"&gt;=&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="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;5&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;values&lt;/span&gt; &lt;span class="o"&gt;=&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="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;16&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;capacity&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;7&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="nf"&gt;knapsack&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;weights&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;values&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;capacity&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt; &lt;span class="c1"&gt;// Output: 22&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This algorithm has a time complexity of O(n * capacity), which is efficient for reasonable input sizes.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Time Complexity and Big O Notation ?
&lt;/h2&gt;

&lt;p&gt;To evaluate the efficiency of an algorithm, we use time complexity, which describes how the running time of an algorithm increases with the size of the input. Some common types of time complexities are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Linear Time (O(n))&lt;/strong&gt;: The running time increases linearly with the input size.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Constant Time (O(1))&lt;/strong&gt;: The running time is constant regardless of the input size.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Logarithmic Time (O(log n))&lt;/strong&gt;: The running time increases logarithmically with the input size.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Quadratic Time (O(n²))&lt;/strong&gt;: The running time increases quadratically with the input size.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Exponential Time (O(2^n))&lt;/strong&gt;: The running time doubles with each additional element in the input.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Big O notation is a mathematical representation used to describe the upper bound of an algorithm's running time, helping developers compare the efficiency of different algorithms.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Examples:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Constant Time (O(1))&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;getFirstElement&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;arr&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="nx"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;[&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;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This function always takes the same amount of time to execute, regardless of the array size.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Linear Time (O(n))&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;sumArray&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;total&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;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;num&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nx"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;total&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="nx"&gt;num&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="nx"&gt;total&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;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The time it takes to execute this function increases linearly with the size of the input array.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Logarithmic Time (O(log n))&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;binarySearch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;target&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;left&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="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;right&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&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="nx"&gt;left&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="nx"&gt;right&lt;/span&gt;&lt;span class="p"&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;mid&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;floor&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;left&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;right&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;2&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="nx"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;mid&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nx"&gt;target&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="nx"&gt;mid&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;mid&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nx"&gt;target&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nx"&gt;left&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;mid&lt;/span&gt; &lt;span class="o"&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="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nx"&gt;right&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;mid&lt;/span&gt; &lt;span class="o"&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="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="o"&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;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Binary search has a logarithmic time complexity because it divides the problem size in half with each iteration.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Quadratic Time (O(n²))&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;bubbleSort&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;n&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&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="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nx"&gt;n&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&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;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;j&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="nx"&gt;j&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nx"&gt;n&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;j&lt;/span&gt;&lt;span class="o"&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;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;j&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;arr&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;j&lt;/span&gt; &lt;span class="o"&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="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;temp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;j&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
                &lt;span class="nx"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;j&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;j&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
                &lt;span class="nx"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;j&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;temp&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;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;arr&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;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The time it takes to execute bubble sort increases quadratically with the size of the input array.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Space Complexity ?
&lt;/h2&gt;

&lt;p&gt;Space complexity refers to the amount of memory an algorithm uses relative to the input size. Like time complexity, space complexity is also expressed using Big O notation. Understanding space complexity is crucial for designing algorithms that are not only fast but also memory efficient.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Examples:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Constant Space (O(1))&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;swap&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;temp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nx"&gt;b&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;temp&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;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This function uses a fixed amount of space regardless of the input size.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Linear Space (O(n))&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;duplicateArray&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;newArr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[];&lt;/span&gt;
    &lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&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="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nx"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;newArr&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;i&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="nx"&gt;newArr&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;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This function uses additional space proportional to the size of the input array.&lt;/p&gt;

&lt;h2&gt;
  
  
  Importance of Using An Efficient Algorithm
&lt;/h2&gt;

&lt;p&gt;Efficient algorithms are critical for handling large inputs and ensuring that applications perform well under various conditions. As a developer, you need to be able to write optimized code and understand the trade-offs between different algorithmic approaches. This skill is particularly important in coding interviews, where demonstrating your ability to solve problems efficiently can set you apart from other candidates.&lt;/p&gt;

&lt;h2&gt;
  
  
  My Thoughts on Algorithm Design
&lt;/h2&gt;

&lt;p&gt;Algorithms are the backbone of effective problem-solving in software development. Understanding how to design, analyze, and optimize algorithms is a fundamental skill for any developer. By mastering these concepts, you can improve your coding skills, perform better in interviews, and build more efficient and scalable software solutions.&lt;/p&gt;

&lt;p&gt;By delving deeper into these examples and practicing regularly, you can develop a solid foundation in algorithms, enabling you to tackle complex coding challenges with confidence.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
