<?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: Abhishek Pathak</title>
    <description>The latest articles on Forem by Abhishek Pathak (@scorcism).</description>
    <link>https://forem.com/scorcism</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%2F688692%2Fc51f9061-4684-4875-a32a-37c2820149bf.jpeg</url>
      <title>Forem: Abhishek Pathak</title>
      <link>https://forem.com/scorcism</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/scorcism"/>
    <language>en</language>
    <item>
      <title>whatis htop</title>
      <dc:creator>Abhishek Pathak</dc:creator>
      <pubDate>Tue, 09 Dec 2025 12:26:21 +0000</pubDate>
      <link>https://forem.com/scorcism/whatis-htop-4j8h</link>
      <guid>https://forem.com/scorcism/whatis-htop-4j8h</guid>
      <description>&lt;p&gt;This is one of the tools that I use on a daily basis, and though sometimes I have to Google what these columns mean…&lt;br&gt;
So I thought of creating some notes, but then I am here writing this blog with the help of ~AI, funny :), but it is what it is.&lt;br&gt;
I won’t be going into minor things, as you are smart enough for that…&lt;/p&gt;

&lt;h2&gt;
  
  
  Headers
&lt;/h2&gt;

&lt;h3&gt;
  
  
  PID
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;ID of the process, like a unique identifier.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  USER
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Which user started the process.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;root&lt;/strong&gt; – system-level&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;daemon, syslog, etc&lt;/strong&gt; – service users&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  PRI
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Priority.&lt;/li&gt;
&lt;li&gt;Lower number = higher priority.&lt;/li&gt;
&lt;li&gt;Kernel decides who gets CPU time first.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  NI
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Nice value.&lt;/li&gt;
&lt;li&gt;User-assigned priority tweak.&lt;/li&gt;
&lt;li&gt;Range: -20 (very important) to +19 (not so much).&lt;/li&gt;
&lt;li&gt;This exists to help us give priority to the process.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  VIRT
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Virtual Memory.&lt;/li&gt;
&lt;li&gt;Total memory the process can use.&lt;/li&gt;
&lt;li&gt;Includes swapped memory, shared libs, etc.&lt;/li&gt;
&lt;li&gt;In the image above, the numbers are in KB (kilobytes).&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  RES
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Resident Memory.&lt;/li&gt;
&lt;li&gt;Actual RAM being used &lt;strong&gt;right now&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;This is the important one.&lt;/li&gt;
&lt;li&gt;In the image above, the numbers are in KB (kilobytes).&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  SHR
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Shared Memory.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Memory shared with other processes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Shared libs&lt;/li&gt;
&lt;li&gt;Common system libs&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;&lt;p&gt;In the image above, the numbers are in KB (kilobytes).&lt;br&gt;&lt;br&gt;
So this means &lt;strong&gt;XX KB&lt;/strong&gt; of the process’s memory can be shared with others.&lt;/p&gt;&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  S
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;What the process is doing now:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;S&lt;/strong&gt; → Sleeping&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;R&lt;/strong&gt; → Running&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;D&lt;/strong&gt; → Uninterruptible sleep&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Z&lt;/strong&gt; → Zombie&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;&lt;p&gt;We mostly see &lt;strong&gt;S&lt;/strong&gt; because most processes wait for input.&lt;/p&gt;&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  CPU%
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;How much of the CPU the process is using right now.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  MEM%
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;How much RAM it uses relative to total system RAM.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  TIME+
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Total CPU time a process has consumed since it started.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Command
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;The actual program that launched the process.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why do we have different colors in the USER column?
&lt;/h2&gt;

&lt;p&gt;Each has a story...&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Green&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Normal user processes&lt;/li&gt;
&lt;li&gt;Custom Python scripts, CLI scripts, etc.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Blue&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Low-priority processes&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Red/Orange&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Kernel threads / High-priority tasks&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Cyan / Light Blue&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Threads inside a process (e.g., Python worker threads)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Purple&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;System daemons&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Bold Green&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Running processes&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Dark Gray / Dim&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Idle or sleeping processes taking almost 0 CPU&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>tooling</category>
      <category>monitoring</category>
      <category>cli</category>
      <category>linux</category>
    </item>
    <item>
      <title>Inside the Tech Stack of dblayer - Go, Next.js 15, Express &amp; Beyond</title>
      <dc:creator>Abhishek Pathak</dc:creator>
      <pubDate>Wed, 06 Aug 2025 02:49:23 +0000</pubDate>
      <link>https://forem.com/scorcism/inside-the-tech-stack-of-dblayer-go-nextjs-15-express-beyond-50j9</link>
      <guid>https://forem.com/scorcism/inside-the-tech-stack-of-dblayer-go-nextjs-15-express-beyond-50j9</guid>
      <description>&lt;p&gt;After several months of building dblayer — a platform that turns your PostgreSQL database into secure, ready-to-use APIs and Apps,&lt;br&gt;
I wanted to share the technical architecture behind it.&lt;/p&gt;

&lt;p&gt;dblayer is modular by design. It consists of multiple services — all optimized for performance, maintainability, and scalability.&lt;/p&gt;

&lt;p&gt;Let’s dive into the stack&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;API Server (.dblayer.dev)
This is the core Go-based API server that powers requests coming from the frontend or external clients.&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Language: Go 1.22&lt;/li&gt;
&lt;li&gt;Framework: Fiber v2&lt;/li&gt;
&lt;li&gt;Database: PostgreSQL via lib/pq and sqlx&lt;/li&gt;
&lt;li&gt;Logging: zap for high-performance structured logging&lt;/li&gt;
&lt;li&gt;UUID: google/uuid for consistent IDs&lt;/li&gt;
&lt;li&gt;Config: yaml.v3, godotenv&lt;/li&gt;
&lt;li&gt;Caching: go-cache, with optional Redis via go-redis&lt;/li&gt;
&lt;li&gt;Middleware &amp;amp; Compression: Brotli, gzip via valyala/fasthttp&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This service acts as the "runtime engine" for all DB-generated APIs.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Background Worker (.dblayer.dev)
Handles asynchronous tasks: email, file processing, S3 uploads, and more.&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Language: Go&lt;/li&gt;
&lt;li&gt;Mailing: go-mail&lt;/li&gt;
&lt;li&gt;Logging: zerolog + lumberjack for daily log rotation&lt;/li&gt;
&lt;li&gt;AWS SDK v2: For uploading to S3 and interacting with cloud services&lt;/li&gt;
&lt;li&gt;Environment Handling: godotenv for secrets&lt;/li&gt;
&lt;li&gt;This allows us to separate performance-sensitive user requests from slower, async operations.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Dashboard Backend (.dblayer.dev)
An Express.js backend for managing the dashboard, auth, projects, and billing.&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Language: TypeScript + Node.js&lt;/li&gt;
&lt;li&gt;Framework: Express&lt;/li&gt;
&lt;li&gt;ORM: Drizzle ORM — fully typed, SQL-first&lt;/li&gt;
&lt;li&gt;Auth: passport, jwt, passport-google-oauth20&lt;/li&gt;
&lt;li&gt;Redis: For rate-limiting + caching (rate-limit-redis, ioredis)&lt;/li&gt;
&lt;li&gt;Validation: zod + zod-validation-error&lt;/li&gt;
&lt;li&gt;Security: helmet, express-rate-limit, input sanitization&lt;/li&gt;
&lt;li&gt;Logging: winston, daily-rotate-file&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is the admin engine of dblayer — managing everything from auth to token issuance to flows.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;App Frontend (.dblayer.dev)
A React-based web app built with Next.js 15, acting as the user-facing playground.&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;State Management: zustand&lt;/li&gt;
&lt;li&gt;Editor: Monaco (via @monaco-editor/react) for live code editing&lt;/li&gt;
&lt;li&gt;UI Framework: Radix UI components + Tailwind CSS&lt;/li&gt;
&lt;li&gt;Utils: axios, dayjs, nanoid, clsx, js-cookie&lt;/li&gt;
&lt;li&gt;Animation: framer-motion&lt;/li&gt;
&lt;li&gt;Markdown &amp;amp; XLSX: react-markdown, xlsx, syntax-highlighter&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is where users build, test, and deploy their API endpoints.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Landing Page (dblayer.dev)
Built with Next.js and optimized for SEO, performance, and minimal load.&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Next.js 15 with Turbopack&lt;/li&gt;
&lt;li&gt;Dark mode support: next-themes&lt;/li&gt;
&lt;li&gt;Components: shadcn ui&lt;/li&gt;
&lt;li&gt;Animations: framer-motion, tailwindcss-animate&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Documentation (dblayer-documents)
Static documentation site with MDX support, diagrams, LaTeX, and smart content indexing.&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Framework: Next.js 15&lt;/li&gt;
&lt;li&gt;Markdown tooling: remark, rehype, unified, gray-matter&lt;/li&gt;
&lt;li&gt;Diagram Support: Mermaid.js&lt;/li&gt;
&lt;li&gt;Math Support: KaTeX&lt;/li&gt;
&lt;li&gt;Themes + Animations: Same shared system (Radix UI + Tailwind)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Content is auto-indexed using a custom content.ts script for search-ready JSON output.&lt;/p&gt;

&lt;p&gt;Dev Practices &amp;amp; Tooling&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;TypeScript everywhere — from backend to docs&lt;/li&gt;
&lt;li&gt;Strict linting &amp;amp; formatting: Prettier, ESLint, Husky&lt;/li&gt;
&lt;li&gt;Modern package managers: pnpm for consistent and fast builds&lt;/li&gt;
&lt;li&gt;Scripts: Unified across all repos (dev, build, lint, format, seed)&lt;/li&gt;
&lt;li&gt;Env Management: .env, dotenv, tsconfig-paths&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Architecture Philosophy&lt;br&gt;
I have optimized dblayer to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Be modular: APIs, workers, UI, docs — all loosely coupled&lt;/li&gt;
&lt;li&gt;Stay typed: No guesswork across services&lt;/li&gt;
&lt;li&gt;Minimize cold starts: Workers are long-lived; logs and metrics help debug fast&lt;/li&gt;
&lt;li&gt;Enable fast iteration: Fast builds, local-first tooling, cloud-native by default&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you're building a platform or tool and thinking about your stack,  hope this breakdown helps.&lt;/p&gt;

&lt;p&gt;You can try DBLayer at &lt;a href="https://dblayer.dev" rel="noopener noreferrer"&gt;https://dblayer.dev&lt;/a&gt;&lt;br&gt;
Happy to answer Feedback or questions?&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>go</category>
      <category>scor32k</category>
    </item>
    <item>
      <title>How to Monitor Network Traffic on Linux</title>
      <dc:creator>Abhishek Pathak</dc:creator>
      <pubDate>Mon, 09 Jun 2025 17:45:28 +0000</pubDate>
      <link>https://forem.com/scorcism/how-to-monitor-network-traffic-on-linux-39ff</link>
      <guid>https://forem.com/scorcism/how-to-monitor-network-traffic-on-linux-39ff</guid>
      <description>&lt;p&gt;Directly starting with the topic&lt;/p&gt;

&lt;h2&gt;
  
  
  1. &lt;code&gt;iftop&lt;/code&gt; — Real-time Bandwidth Monitoring Per Connection
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Use Case:&lt;/strong&gt; View which remote hosts are consuming bandwidth in real-time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Install:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;iftop
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Usage:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;iftop &lt;span class="nt"&gt;-i&lt;/span&gt; eth0         &lt;span class="c"&gt;# Replace eth0 with your network interface&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Key Features:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Shows top connections by bandwidth&lt;/li&gt;
&lt;li&gt;Inbound/outbound traffic&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Press &lt;code&gt;t&lt;/code&gt; to toggle display modes&lt;/li&gt;
&lt;li&gt;Press &lt;code&gt;p&lt;/code&gt; to pause&lt;/li&gt;
&lt;li&gt;Combine with &lt;code&gt;-B&lt;/code&gt; for display in bytes&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  2. &lt;code&gt;nload&lt;/code&gt; — Simple Interface Bandwidth
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Use Case:&lt;/strong&gt; Monitor incoming/outgoing traffic per interface.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Install:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;nload
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Usage:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;nload eth0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Key Features:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Graphical view of upload/download rate&lt;/li&gt;
&lt;li&gt;Totals and current stats&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  3. &lt;code&gt;bmon&lt;/code&gt; — Bandwidth Monitoring and Visualization
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Use Case:&lt;/strong&gt; Visual tool to monitor all interfaces and track traffic.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Install:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;bmon
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Usage:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;bmon
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Key Features:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Auto-detects interfaces&lt;/li&gt;
&lt;li&gt;Live graphs and rate history&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  4. &lt;code&gt;tcpdump&lt;/code&gt; — Deep Packet Inspection
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Use Case:&lt;/strong&gt; Capture and inspect packets on an interface.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Install:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;tcpdump
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Usage:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;tcpdump &lt;span class="nt"&gt;-i&lt;/span&gt; eth0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;tcpdump &lt;span class="nt"&gt;-i&lt;/span&gt; eth0 port 80  &lt;span class="c"&gt;# Capture only HTTP traffic&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;ul&gt;
&lt;li&gt;Use &lt;code&gt;-w&lt;/code&gt; to save packets to file&lt;/li&gt;
&lt;li&gt;Analyze with Wireshark: &lt;code&gt;tcpdump -w capture.pcap&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  5. &lt;code&gt;netstat&lt;/code&gt; / &lt;code&gt;ss&lt;/code&gt; — Network Connection Stats
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Use Case:&lt;/strong&gt; List active connections, ports, and listening services.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Usage:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ss &lt;span class="nt"&gt;-tulwn&lt;/span&gt;           &lt;span class="c"&gt;# Faster replacement for netstat&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Example Output:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;t&lt;/code&gt; – TCP&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;u&lt;/code&gt; – UDP&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;l&lt;/code&gt; – Listening&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;w&lt;/code&gt; – Raw sockets&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;n&lt;/code&gt; – Numeric output&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Bonus:&lt;/strong&gt; Use &lt;code&gt;ss -p&lt;/code&gt; to see which process owns a port.&lt;/p&gt;




&lt;h2&gt;
  
  
  6. &lt;code&gt;nethogs&lt;/code&gt; — Bandwidth by Process
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Use Case:&lt;/strong&gt; Identify processes using the most bandwidth.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Install:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;nethogs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Usage:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;nethogs eth0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;ul&gt;
&lt;li&gt;Lists per-process bandwidth usage&lt;/li&gt;
&lt;li&gt;Real-time updates&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  7. &lt;code&gt;vnstat&lt;/code&gt; — Long-term Network Usage Stats
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Use Case:&lt;/strong&gt; Track data usage over time (hourly/daily/monthly).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Install:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;vnstat
&lt;span class="nb"&gt;sudo &lt;/span&gt;vnstat &lt;span class="nt"&gt;-u&lt;/span&gt; &lt;span class="nt"&gt;-i&lt;/span&gt; eth0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Usage:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;vnstat                &lt;span class="c"&gt;# Summary of usage&lt;/span&gt;
vnstat &lt;span class="nt"&gt;-d&lt;/span&gt;             &lt;span class="c"&gt;# Daily usage&lt;/span&gt;
vnstat &lt;span class="nt"&gt;-m&lt;/span&gt;             &lt;span class="c"&gt;# Monthly usage&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Great For:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Auditing bandwidth&lt;/li&gt;
&lt;li&gt;Avoiding data cap overages&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Best Practices &amp;amp; Tips
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Run tools with &lt;code&gt;sudo&lt;/code&gt;&lt;/strong&gt; to ensure full interface access&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Know your interface name&lt;/strong&gt;: Use &lt;code&gt;ip a&lt;/code&gt; to list interfaces&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Combine tools&lt;/strong&gt;: Use &lt;code&gt;vnstat&lt;/code&gt; for history, &lt;code&gt;iftop&lt;/code&gt; for live monitoring&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;If the article helps you, leave a like, follow, or anything 🙂.&lt;/p&gt;

&lt;p&gt;You can follow me on &lt;a href="https://www.linkedin.com/in/abhishekpathak32/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;, &lt;a href="https://github.com/scorcism" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;, &lt;a href="https://dev.to/scorcism"&gt;Dev.to&lt;/a&gt; and &lt;a href="https://scorcism.hashnode.dev/" rel="noopener noreferrer"&gt;hashnode&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Bye&lt;/strong&gt;
&lt;/h2&gt;

</description>
      <category>programming</category>
      <category>scor32k</category>
      <category>linux</category>
      <category>ubuntu</category>
    </item>
    <item>
      <title>What is Caddy and How It Helped My Product DBLayer.dev</title>
      <dc:creator>Abhishek Pathak</dc:creator>
      <pubDate>Tue, 03 Jun 2025 16:58:57 +0000</pubDate>
      <link>https://forem.com/scorcism/what-is-caddy-and-how-it-helped-my-product-dblayerdev-2k41</link>
      <guid>https://forem.com/scorcism/what-is-caddy-and-how-it-helped-my-product-dblayerdev-2k41</guid>
      <description>&lt;p&gt;When building my first SaaS project, &lt;a href="https://www.dblayer.dev/" rel="noopener noreferrer"&gt;DBlayer.dev&lt;/a&gt;, I needed a reliable, secure, and !!hassle web server that could scale effortlessly. That’s when I discovered &lt;strong&gt;Caddy&lt;/strong&gt;—a powerful and modern web server that truly stands out.&lt;/p&gt;

&lt;p&gt;In this post, I’ll share what Caddy is, why I chose it, and how it solved my domain and subdomain management challenges.&lt;/p&gt;




&lt;h2&gt;
  
  
  What is &lt;a href="https://caddyserver.com/" rel="noopener noreferrer"&gt;Caddy&lt;/a&gt;?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Caddy&lt;/strong&gt; is an open-source web server known for its &lt;strong&gt;automatic HTTPS&lt;/strong&gt;, &lt;strong&gt;developer-friendly configuration&lt;/strong&gt;, and &lt;strong&gt;modern architecture&lt;/strong&gt;. Unlike traditional web servers like Nginx or Apache, Caddy is built with simplicity and security in mind—perfect for developers.&lt;/p&gt;

&lt;h3&gt;
  
  
  Key Features of Caddy
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;🔒 &lt;strong&gt;Automatic HTTPS&lt;/strong&gt; – Caddy automatically issues and renews SSL certificates using Let's Encrypt.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;⚡ &lt;strong&gt;Simple Configuration&lt;/strong&gt; – Define your routes using a clean &lt;code&gt;Caddyfile&lt;/code&gt; format—easy to read, easy to update.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;🧩 &lt;strong&gt;Extensible&lt;/strong&gt; – Add plugins for reverse proxying, static file serving, rate limiting, and more.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;📦 &lt;strong&gt;Single Binary&lt;/strong&gt; – No external dependencies. Just download and run. It works on almost any platform.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;(Feature list adapted from my experience and official documentation.)&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Why I Picked Caddy for DBLayer.dev
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. &lt;strong&gt;Zero SSL Headache&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;DBLayer.dev supports custom subdomains like &lt;code&gt;username.dblayer.dev&lt;/code&gt;. Managing HTTPS manually for each subdomain would’ve been a nightmare. With Caddy, it was a &lt;strong&gt;non-issue&lt;/strong&gt;—SSL was automatically provisioned and renewed without any manual steps.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. &lt;strong&gt;Effortless Reverse Proxy&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Caddy handles reverse proxying to my Go and Express.js backends with elegant simplicity. Here's how I route all subdomains to my app:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;*.dblayer.dev {
  reverse_proxy 127.0.0.1:3000
}

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

&lt;/div&gt;



&lt;p&gt;That’s it—no complicated config blocks, rewrites, or certificate handling.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. &lt;strong&gt;Hot Reloads with Zero Downtime&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Caddy supports seamless configuration reloads without downtime. Whether I update routing rules or change backend ports, Caddy applies changes instantly—perfect for continuous deployment workflows.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. &lt;strong&gt;Lightweight and Reliable&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Since DBLayer is a bootstrapped project, cost is a major concern. Caddy, being written in Go and packaged as a single binary, runs efficiently with minimal memory usage. I can deploy it on my server without any extra overhead.&lt;/p&gt;




&lt;h2&gt;
  
  
  My Domain Management Approach
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;DBLayer allows users to claim a custom subdomain (e.g., &lt;code&gt;johndoe.dblayer.dev&lt;/code&gt;) to give their endpoints a personal touch.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Initially, I looked into traditional setups like Nginx + Let's Encrypt, but managing dynamic subdomains and certificates was complex and expensive.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;As a solo founder of a bootstrapped project, I needed a smarter, cost-effective solution.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;That’s when I found Caddy. I explored it, tested it, and it turned out to be what I needed—auto SSL, reverse proxying, dynamic subdomain support, and more.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Looking ahead, I also plan to support dynamic host mappings, and Caddy is flexible enough for those use cases too.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  My Setup in Practice
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;I run a cron job that checks table for subdomains that haven’t yet been added.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If a new subdomain is found, the script checks if it exists in the &lt;code&gt;Caddyfile&lt;/code&gt;. If not, it appends the new block and reloads Caddy.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The best part? &lt;strong&gt;~No downtime.&lt;/strong&gt; Caddy handles updates fast and gracefully.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can check out my actual Caddy config here:&lt;br&gt;&lt;br&gt;
👉 &lt;a href="https://gist.github.com/scorcism/2699dda3c1eccd7e87b39be35d5553ad" rel="noopener noreferrer"&gt;Caddyfile Gist&lt;/a&gt;&lt;br&gt;&lt;br&gt;
(Some parts are for upcoming features—stay tuned!)&lt;/p&gt;




&lt;p&gt;Caddy has been a good product for DBLayer.dev. If you're building something similar with dynamic subdomains, SSL, and reverse proxying—&lt;strong&gt;Caddy is absolutely worth trying.&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;Checkout My Product: &lt;a href="https://dblayer.dev/" rel="noopener noreferrer"&gt;https://dblayer.dev/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thank you &lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>database</category>
      <category>api</category>
    </item>
    <item>
      <title>SQL Query Execution Order</title>
      <dc:creator>Abhishek Pathak</dc:creator>
      <pubDate>Wed, 29 Jan 2025 15:15:52 +0000</pubDate>
      <link>https://forem.com/scorcism/step-by-step-breakdown-of-sql-query-execution-5f38</link>
      <guid>https://forem.com/scorcism/step-by-step-breakdown-of-sql-query-execution-5f38</guid>
      <description>&lt;h1&gt;
  
  
  How SQL Queries Are Executed Behind the Scenes
&lt;/h1&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: The flow described below isn't how SQL engines &lt;em&gt;always&lt;/em&gt; execute queries internally, but rather how SQL execution is logically ordered.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;1. FROM and JOINs&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The engine starts by selecting the tables mentioned in the &lt;code&gt;FROM&lt;/code&gt; clause. If there are any &lt;code&gt;JOIN&lt;/code&gt;s, it combines the tables according to the specified conditions&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;2. WHERE&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;After the tables are joined, It will filter rows based on the conditions in the &lt;code&gt;WHERE&lt;/code&gt; clause. &lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;3. GROUP BY&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Next, grouping rows that have the same values in the specified columns (e.g., grouping by customer or product). This is useful when you want to apply aggregate functions like &lt;code&gt;COUNT&lt;/code&gt;, &lt;code&gt;SUM&lt;/code&gt;, or &lt;code&gt;AVG&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;4. HAVING&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Then &lt;code&gt;HAVING&lt;/code&gt; clause.&lt;br&gt;
It filters the results of the groups, just like &lt;code&gt;WHERE&lt;/code&gt; filters individual rows before grouping.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;5. SELECT&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;At this point, It selects the columns. If any aggregate calculations are involved, they are performed here.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;6. DISTINCT&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;If specified, removing of duplicate rows in the result will be performed.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;7. ORDER BY&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Then sorting will take place on the &lt;code&gt;ORDER BY&lt;/code&gt; clause, either in ascending or descending order.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;8. LIMIT / OFFSET&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Finally,  &lt;code&gt;LIMIT&lt;/code&gt; will be applied to restrict the number of rows returned and &lt;code&gt;OFFSET&lt;/code&gt; to skip a specified number of rows.&lt;/p&gt;

&lt;h3&gt;
  
  
  Example:
&lt;/h3&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;t1&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;t1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="k"&gt;COUNT&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;t2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;order_id&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;order_count&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt;
    &lt;span class="n"&gt;users&lt;/span&gt; &lt;span class="n"&gt;t1&lt;/span&gt;
&lt;span class="k"&gt;LEFT&lt;/span&gt; &lt;span class="k"&gt;JOIN&lt;/span&gt;
    &lt;span class="n"&gt;orders&lt;/span&gt; &lt;span class="n"&gt;t2&lt;/span&gt; &lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="n"&gt;t1&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;t2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;user_id&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt;
    &lt;span class="n"&gt;t1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;status&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'half-blood'&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;t1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;
&lt;span class="k"&gt;HAVING&lt;/span&gt;
    &lt;span class="k"&gt;COUNT&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;t2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;order_id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;
&lt;span class="k"&gt;ORDER&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt;
    &lt;span class="n"&gt;order_count&lt;/span&gt; &lt;span class="k"&gt;DESC&lt;/span&gt;
&lt;span class="k"&gt;LIMIT&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt; &lt;span class="k"&gt;OFFSET&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Order in which SQL processes it:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;FROM&lt;/strong&gt; and &lt;strong&gt;JOINs&lt;/strong&gt;: Combines &lt;code&gt;users&lt;/code&gt; and &lt;code&gt;orders&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;WHERE&lt;/strong&gt;: Filters users who are &lt;code&gt;active&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;GROUP BY&lt;/strong&gt;: Groups the data by &lt;code&gt;user id&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;HAVING&lt;/strong&gt;: Filters groups where the user has more than 5 orders.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;SELECT&lt;/strong&gt;: Selects the columns to display.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;ORDER BY&lt;/strong&gt;: Sorts the result by &lt;code&gt;order_count&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;LIMIT / OFFSET&lt;/strong&gt;: Returns the 10th to 20th row.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;any feedback about the article will make me more happy&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;If the article helps you, leave a like, follow, or anything 🙂.&lt;/p&gt;

&lt;p&gt;You can follow me on &lt;a href="https://www.linkedin.com/in/abhishekpathak32/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;, &lt;a href="https://github.com/scorcism" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;, &lt;a href="https://dev.to/scorcism"&gt;Dev.to&lt;/a&gt; and &lt;a href="https://scorcism.hashnode.dev/" rel="noopener noreferrer"&gt;hashnode&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bye&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>scor32k</category>
      <category>sql</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Schedule Wallpaper for mobile.</title>
      <dc:creator>Abhishek Pathak</dc:creator>
      <pubDate>Fri, 17 Jan 2025 11:20:29 +0000</pubDate>
      <link>https://forem.com/scorcism/schedule-wallpaper-for-mobile-56n4</link>
      <guid>https://forem.com/scorcism/schedule-wallpaper-for-mobile-56n4</guid>
      <description>&lt;p&gt;Hi Dev Community! 🌻&lt;/p&gt;

&lt;p&gt;I’m thrilled to share the launch of my very first mobile app, Bello, built using React Native! 🚀&lt;/p&gt;

&lt;p&gt;What is Bello?&lt;br&gt;
Bello is a handy app designed to simplify scheduling wallpaper changes on your device. With Bello, you can effortlessly update:&lt;br&gt;
📱 Your Home Screen&lt;br&gt;
🔒 Your Lock Screen&lt;br&gt;
✨ Both Screens&lt;/p&gt;

&lt;p&gt;Simply pick your favorite wallpapers, set a schedule, and Bello takes care of the rest!&lt;/p&gt;

&lt;p&gt;Try it out:&lt;br&gt;
🌐 Homepage: &lt;a href="https://bello.scor32k.com/" rel="noopener noreferrer"&gt;https://bello.scor32k.com/&lt;/a&gt;&lt;br&gt;
📥 Google Play Store: &lt;a href="https://play.google.com/store/apps/details?id=com.scor32k.bello" rel="noopener noreferrer"&gt;https://play.google.com/store/apps/details?id=com.scor32k.bello&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Notes &amp;amp; Collaboration&lt;/strong&gt;&lt;br&gt;
The app is still a Work in Progress—I’m actively working on fixing a few missing strings and polishing the experience. That said, it felt like the perfect moment to release it and hear what you think!&lt;/p&gt;

&lt;p&gt;If you have experience with React Native (especially React Native Background Fetch), I’d love to connect and collaborate. Feel free to reach out at &lt;code&gt;abhishek@scor32k.com&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;I’d genuinely appreciate your support, feedback, and thoughts. If you give it a try, let me know your experience! 😊&lt;/p&gt;

</description>
      <category>reactnative</category>
      <category>developer</category>
      <category>scor32k</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Top AWS Services for Developers</title>
      <dc:creator>Abhishek Pathak</dc:creator>
      <pubDate>Sun, 29 Dec 2024 14:37:07 +0000</pubDate>
      <link>https://forem.com/scorcism/-3mp7</link>
      <guid>https://forem.com/scorcism/-3mp7</guid>
      <description>&lt;div class="ltag__link"&gt;
  &lt;a href="/prathamesh_gawade_16" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&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%2Fuser%2Fprofile_image%2F1517951%2F98d4a2f7-4293-4bb3-ad0b-6dd3c998f858.jpg" alt="prathamesh_gawade_16"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="/prathamesh_gawade_16/top-3-aws-services-every-developer-should-know-4gnp" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Top 3 AWS Services Every Developer Should know&lt;/h2&gt;
      &lt;h3&gt;prathamesh gawade ・ Aug 20&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#aws&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#cloud&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#devops&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#webdev&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


</description>
      <category>aws</category>
      <category>cloud</category>
      <category>developers</category>
      <category>softwaredevelopment</category>
    </item>
    <item>
      <title>understanding chmod 777</title>
      <dc:creator>Abhishek Pathak</dc:creator>
      <pubDate>Mon, 16 Sep 2024 01:59:47 +0000</pubDate>
      <link>https://forem.com/scorcism/understanding-chmod-777-3pm4</link>
      <guid>https://forem.com/scorcism/understanding-chmod-777-3pm4</guid>
      <description>&lt;h3&gt;
  
  
  Understanding &lt;code&gt;chmod 777&lt;/code&gt; ❓
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;NOTE: The is a contains small portion of &lt;a href="https://dev.to/scorcism/file-permission-2d8"&gt;Linux file permission&lt;/a&gt; blog. Contents from the parent blog are pruned and customize for this article. Thank you for reading.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In Linux, &lt;strong&gt;permissions&lt;/strong&gt; define the access rights for three categories of users: 👤User, 👥Group, and Others.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;User&lt;/strong&gt; is the file or directory owner.&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;Group&lt;/strong&gt; consists of users belonging to the same group as the owner.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Others&lt;/strong&gt; refers to the general public.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each of these users can have three types of permissions: 📕Read, ✍️Write, and Execute🥬.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Read ( r )&lt;/strong&gt;: Allows viewing the content of the file. Represented by an octal value of &lt;code&gt;4&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Write ( w )&lt;/strong&gt;: Allows modifying or editing the file. Represented by an octal value of &lt;code&gt;2&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Execute ( x )&lt;/strong&gt;: Allows running the file (if it's a script) or traversing a directory. Represented by an octal value of &lt;code&gt;1&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These permissions are presented as a string of nine characters for each file or directory:&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

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

rw-r--r--


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

&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;rw-&lt;/code&gt; means the owner has &lt;strong&gt;read&lt;/strong&gt; and &lt;strong&gt;write&lt;/strong&gt; permissions.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;r--&lt;/code&gt; means the group has &lt;strong&gt;read-only&lt;/strong&gt; permissions.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;r--&lt;/code&gt; means others have &lt;strong&gt;read-only&lt;/strong&gt; permissions.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Octal Mode in &lt;code&gt;chmod&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;In advanced file permission manipulation, &lt;strong&gt;numeric values&lt;/strong&gt; are used to represent permissions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Read ( r )&lt;/strong&gt; = &lt;code&gt;4&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Write ( w )&lt;/strong&gt; = &lt;code&gt;2&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Execute ( x )&lt;/strong&gt; = &lt;code&gt;1&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To set permissions using octal values, you assign a three-digit number representing the permissions for &lt;strong&gt;User&lt;/strong&gt;, &lt;strong&gt;Group&lt;/strong&gt;, and &lt;strong&gt;Others&lt;/strong&gt;. For example, &lt;code&gt;777&lt;/code&gt; gives read, write, and execute permissions to everyone.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; The maximum permission &lt;code&gt;777&lt;/code&gt; means &lt;strong&gt;User&lt;/strong&gt;, &lt;strong&gt;Group&lt;/strong&gt;, and &lt;strong&gt;Others&lt;/strong&gt; all have full &lt;strong&gt;read&lt;/strong&gt;, &lt;strong&gt;write&lt;/strong&gt;, and &lt;strong&gt;execute&lt;/strong&gt; permissions. However, granting such permissions can pose a security risk.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h3&gt;
  
  
  Example: Modifying File Permissions with Octal Values
&lt;/h3&gt;

&lt;p&gt;Let’s say we want to set specific permissions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;User&lt;/strong&gt;: Read (&lt;code&gt;4&lt;/code&gt;) and Execute (&lt;code&gt;1&lt;/code&gt;) ⇒ &lt;code&gt;4 + 1 = 5&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Group&lt;/strong&gt;: Read-only (&lt;code&gt;4&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Others&lt;/strong&gt;: Read-only (&lt;code&gt;4&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The combined permission value is &lt;code&gt;544&lt;/code&gt;, meaning the user can read and execute, and both the group and others can only read.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="nb"&gt;chmod &lt;/span&gt;544 myfile.txt


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

&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media.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%2Fmitbhgilipl0u4k1i5hl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fmitbhgilipl0u4k1i5hl.png" alt="https://imgur.com/H2DPPRF.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This sets the permission to &lt;code&gt;r-xr--r--&lt;/code&gt;, which breaks down into three blocks:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;r-x&lt;/code&gt; for the &lt;strong&gt;User&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;r--&lt;/code&gt; for the &lt;strong&gt;Group&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;r--&lt;/code&gt; for &lt;strong&gt;Others&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; The &lt;code&gt;-&lt;/code&gt; before the permissions indicates the file type, where &lt;code&gt;-&lt;/code&gt; is for regular files and &lt;code&gt;d&lt;/code&gt; is for directories.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h3&gt;
  
  
  Example 2: Complex Permission Setup
&lt;/h3&gt;

&lt;p&gt;Let’s give the following permissions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;User&lt;/strong&gt;: Read (&lt;code&gt;4&lt;/code&gt;) and Write (&lt;code&gt;2&lt;/code&gt;) ⇒ &lt;code&gt;4 + 2 = 6&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Group&lt;/strong&gt;: Write (&lt;code&gt;2&lt;/code&gt;) and Execute (&lt;code&gt;1&lt;/code&gt;) ⇒ &lt;code&gt;2 + 1 = 3&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Others&lt;/strong&gt;: Read (&lt;code&gt;4&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The combined value is &lt;code&gt;634&lt;/code&gt;, meaning:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="nb"&gt;chmod &lt;/span&gt;634 myfile.txt


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

&lt;/div&gt;




&lt;h3&gt;
  
  
  Changing File Ownership
&lt;/h3&gt;

&lt;p&gt;To change the ownership of a file or directory, use the &lt;code&gt;chown&lt;/code&gt; command:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="nb"&gt;chown &lt;/span&gt;username myfile.txt


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

&lt;/div&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: You might require root privileges for this command.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h3&gt;
  
  
  Changing File Group Ownership
&lt;/h3&gt;

&lt;p&gt;To change the group ownership of a file, use the &lt;code&gt;chgrp&lt;/code&gt; command:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="nb"&gt;chgrp &lt;/span&gt;groupname myfile.txt


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

&lt;/div&gt;




&lt;h3&gt;
  
  
  Important Tips
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Avoid using &lt;code&gt;777&lt;/code&gt;&lt;/strong&gt;: It’s a significant security risk.&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;ls -l&lt;/code&gt; to display detailed file information, including permissions.&lt;/li&gt;
&lt;li&gt;Don’t forget about &lt;code&gt;umask&lt;/code&gt;&lt;a href="https://dev.to/scorcism/file-permission-2d8"&gt;_&lt;/a&gt;, which affects default file permissions.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;If this article helped you, feel free to like, follow, or connect!&lt;br&gt;&lt;br&gt;
You can follow me on &lt;a href="https://www.linkedin.com/in/abhishekpathak32/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;, &lt;a href="https://github.com/scorcism" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;, &lt;a href="https://dev.to/scorcism"&gt;Dev.to&lt;/a&gt;, and &lt;a href="https://scorcism.hashnode.dev/" rel="noopener noreferrer"&gt;Hashnode&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;🍕&lt;/p&gt;

</description>
      <category>scor32k</category>
      <category>linux</category>
      <category>ubuntu</category>
      <category>beginners</category>
    </item>
    <item>
      <title>JavaScript Objects | Complete Guide</title>
      <dc:creator>Abhishek Pathak</dc:creator>
      <pubDate>Mon, 13 May 2024 01:57:31 +0000</pubDate>
      <link>https://forem.com/scorcism/objects-in-js-complete-guide-3gl8</link>
      <guid>https://forem.com/scorcism/objects-in-js-complete-guide-3gl8</guid>
      <description>&lt;h2&gt;
  
  
  JavaScript Objects
&lt;/h2&gt;

&lt;p&gt;Similar to other programming languages javascript objects is a collection of key-value pairs, where each key is a string and each value can be of any data type. &lt;/p&gt;

&lt;h3&gt;
  
  
  Ways to create JavaScript Object
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Object liternal Notation&lt;/strong&gt;&lt;br&gt;
The simplests way that you will use 98% of time.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;scorcism&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;Abhishek&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;age&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;21&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;The key-value pairs are enclosed within curly braces &lt;code&gt;{}&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Using the &lt;code&gt;new&lt;/code&gt; Keyword&lt;/strong&gt;&lt;br&gt;
Creating objects with constructor functions and the &lt;code&gt;new&lt;/code&gt; keyword. You will use this only 1.8% of the time&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;About&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="nx"&gt;age&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;city&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;age&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;age&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;city&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;city&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;me&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;About&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Abhishek&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;21&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Mumbai&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;

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

&lt;p&gt;"new" creates an object containing an internal "this". If you omit "new", this is the global context, so your properties are created outside of your object. ~ Eckehard&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Using Object.create()&lt;/strong&gt;&lt;br&gt;
This method allows creating a new object with specified prototype object. &lt;br&gt;
You will use this only 0.2% of the time&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;aboutData&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;greet&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;
                &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s2"&gt;`Hello, my is &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="k"&gt;this&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="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// {this.name} is the key of this object&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;me&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Object&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;aboutData&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nx"&gt;me&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Abhishek&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
    &lt;span class="nx"&gt;me&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;age&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;21&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;Don't worry much about this :)&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Accessing Object Properties
&lt;/h3&gt;

&lt;p&gt;Properties of JS object can be accessed using dot notation and bracket notation.&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;me&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;Abhishek&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;age&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;21&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;me&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="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;me&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;age&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Try run the code snippet. &lt;/p&gt;

&lt;p&gt;(The &lt;code&gt;undefined&lt;/code&gt; after each console log is the return value fo the &lt;code&gt;console.log&lt;/code&gt; function itself. Relax, Nothing to worry🕺)&lt;/p&gt;

&lt;h3&gt;
  
  
  Object Prototypes and Inheritance
&lt;/h3&gt;

&lt;p&gt;At the core of JS, lies the concept of prototype. Every object in JS is associated with a prototype object, which acts as a &lt;strong&gt;blueprint&lt;/strong&gt; for that object. &lt;/p&gt;

&lt;p&gt;In short; object prototype serves as  a template for creating new objects.&lt;/p&gt;

&lt;p&gt;This prototype object contains properties and method that are accessible to all instances created from it.🍰&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Inheritance&lt;/strong&gt; is acheived by linking objects through their prototypes. &lt;br&gt;
Consider &lt;strong&gt;Object.create()&lt;/strong&gt;  that we used above. It is an method that creates a new object.&lt;/p&gt;
&lt;h3&gt;
  
  
  Static Method
&lt;/h3&gt;

&lt;p&gt;(Try😃)&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Object.keys()&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Returns an array of a given object's own enumerable property &lt;strong&gt;names&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;TL;DR Object.keys() method will return list of keys. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; Own enumerable refers to the properties of an object that are both owned by the object itself (Not inherited from its property chain)&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight javascript"&gt;&lt;code&gt;    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;aboutMe&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;Abhishek&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;age&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;21&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;aboutMeKeys&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Object&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;keys&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;aboutMe&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="c1"&gt;// Expected Output: [ 'name', 'age' ]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;




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

&lt;p&gt;&lt;strong&gt;Object.values()&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Return an array of a given object's own enumerable property &lt;strong&gt;values&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;TL;DR Object.values() method will return list of values.&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight javascript"&gt;&lt;code&gt;            &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;aboutMe&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;Abhishek&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="na"&gt;age&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;21&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;aboutMeKeys&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Object&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;values&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;aboutMe&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
            &lt;span class="c1"&gt;// Expected Output: [ 'Abhishek', 21 ]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;




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

&lt;p&gt;&lt;strong&gt;Object.assign()&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Copies the values of all enumerable own properties from one or more source objects to a target object.&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight javascript"&gt;&lt;code&gt;    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;target&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="na"&gt;age&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;21&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;source&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;Abhishek&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;merged&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Object&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;assign&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;source&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;merged&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="c1"&gt;// Expected Output: { age: 21, name: 'Abhishek' }&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;



&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; You can add any number of source args. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;target&lt;/strong&gt; will contain the modified object.&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight javascript"&gt;&lt;code&gt;    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;merged&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="c1"&gt;// Expected Output: true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;




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

&lt;p&gt;&lt;strong&gt;Object.create()&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Create new object, using an existing object as the prototype.&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight javascript"&gt;&lt;code&gt;    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;me&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;Abhishek&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="na"&gt;eatsAppleDaily&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="na"&gt;printAbout&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kd"&gt;function&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;`I am &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="k"&gt;this&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="s2"&gt;. and I &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;eatsAppleDaily&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;eat&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;don't eat&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; 
                            apple daily.`&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="c1"&gt;// Creating a myFriend Object inheriting from me. &lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;myFriend&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Object&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;me&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// He is my child now😃.  &lt;/span&gt;

    &lt;span class="nx"&gt;myFriend&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Ladoo&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nx"&gt;myFriend&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;eatsAppleDaily&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&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;me&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;printAbout&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
    &lt;span class="c1"&gt;// Expected Output: I am Abhishek. and I don't eat apple daily.&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;myFriend&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;printAbout&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
    &lt;span class="c1"&gt;// Expected Output: I am Ladoo. and I eat apple daily.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;




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

&lt;p&gt;&lt;strong&gt;Object.entries()&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Return array of he given object's own enumerable string-keyed property key-value pair😒.&lt;/p&gt;

&lt;p&gt;It returns an array where each element is a key-value pair of the object. Each key-value pair is represented as an array with two elements: the key as the first element and the corresponding value as the second element.&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight javascript"&gt;&lt;code&gt;    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;me&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;Abhishek&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;age&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;21&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="nb"&gt;Object&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;entries&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;me&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
    &lt;span class="c1"&gt;// Expected output: [ [ 'name', 'Abhishek' ], [ 'age', 21 ] ]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;




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

&lt;p&gt;&lt;strong&gt;Object.fromEntries()&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Object.fromEntries transforms a list of key-value pairs into an object.&lt;/p&gt;

&lt;p&gt;TL;DR Oppsite of Object.entries().&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight javascript"&gt;&lt;code&gt;    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;me&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="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;name&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Abhishek&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="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;age&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;21&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="nb"&gt;Object&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fromEntries&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;me&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
    &lt;span class="c1"&gt;// Expected output: { name: 'Abhishek', age: 21 }&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;




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

&lt;p&gt;&lt;strong&gt;Object.freeze()&lt;/strong&gt;&lt;/p&gt;

&lt;pre class="highlight plaintext"&gt;&lt;code&gt;The Object.freeze() is a method that "freezes" an object. 
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;When you freeze an object, you prevent new properties from being added to it, existing properties from being removed or changed, and also prevent the prototype from being changed.&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight javascript"&gt;&lt;code&gt;        &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;me&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;Abhishek&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;age&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;21&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="nb"&gt;Object&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;freeze&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;me&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Freezing the object&lt;/span&gt;
        &lt;span class="nx"&gt;me&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;scorcism&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nx"&gt;me&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;age&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;22&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;me&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; 
        &lt;span class="c1"&gt;// Expected output: { name: "Abhishek", age: 21 }&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;



&lt;p&gt;Changes are not affected to the object&lt;/p&gt;


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

&lt;p&gt;&lt;strong&gt;Object.isFrozen()&lt;/strong&gt;&lt;/p&gt;

&lt;pre class="highlight plaintext"&gt;&lt;code&gt; Determines if the object is frozen
&lt;/code&gt;&lt;/pre&gt;



&lt;pre class="highlight javascript"&gt;&lt;code&gt;    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;me&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;Abhishek&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;age&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;21&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="nb"&gt;Object&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;freeze&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;me&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="nb"&gt;Object&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;isFrozen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;me&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
    &lt;span class="c1"&gt;// Expected output: true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;




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

&lt;p&gt;&lt;strong&gt;Object.seal()&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Object.seal() is a method that "seals" an object.&lt;/p&gt;

&lt;p&gt;Sealing an object prevent new properties from being added to it and marks all existing properties an non-configurable (i.e prevent them from bein deleted or theri attributes from being changed).&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight javascript"&gt;&lt;code&gt;     &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;me&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;Abhishek&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;age&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;21&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
     &lt;span class="nb"&gt;Object&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;seal&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;me&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; 
    &lt;span class="nx"&gt;me&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;scorcism&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// This change will be affected &lt;/span&gt;
    &lt;span class="k"&gt;delete&lt;/span&gt; &lt;span class="nx"&gt;me&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;age&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// This deleting will not take effect&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;me&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="c1"&gt;// Expected Output: { name: 'scorcism', age: 21 }&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;



&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; &lt;code&gt;Object.freeze()&lt;/code&gt; prevents any changes to the object, while &lt;code&gt;Object.seal()&lt;/code&gt; allows changes to existing properties but prevents addition or removal of properties.&lt;/p&gt;


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

&lt;p&gt;&lt;strong&gt;Object.isSealed()&lt;/strong&gt; &lt;br&gt;
        Determines if an object is sealed.&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight javascript"&gt;&lt;code&gt;    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;me&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;Abhishek&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;age&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;21&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
     &lt;span class="nb"&gt;Object&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;seal&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;me&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="nb"&gt;Object&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;isSealed&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;me&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
     &lt;span class="c1"&gt;// Expected output: true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;




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

&lt;h3&gt;
  
  
  Inheritance static method
&lt;/h3&gt;

&lt;p&gt;Before moving to instance static methods, Lets get idea of &lt;code&gt;this&lt;/code&gt; keyword in object&lt;/p&gt;

&lt;p&gt;Suppose we have an Object&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;person&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="s1"&gt;Abhishek&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So If we add a function in the object; &lt;code&gt;this&lt;/code&gt; will refer to all the properties of the same object&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;person&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="s1"&gt;Abhishek&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;sayMyName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kd"&gt;function&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="s2"&gt;`My name is &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="k"&gt;this&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="s2"&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;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;person&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sayMyName&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
    &lt;span class="c1"&gt;// Expected Output: My name is Abhishek&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As you can observe here, &lt;code&gt;this.name&lt;/code&gt; is replaced with the key &lt;code&gt;name&lt;/code&gt; value.&lt;/p&gt;

&lt;p&gt;Now that you have idea of &lt;code&gt;this&lt;/code&gt; keyword usecase, lets continue further&lt;/p&gt;

&lt;p&gt;1.. &lt;strong&gt;prototype.bind()&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;bind()&lt;/code&gt; method creates a new function that, when called, has its &lt;code&gt;this&lt;/code&gt; keyword set to the provided value.&lt;br&gt;
This is usefull when we want to borrow a method from one object and use it in the context of other object,&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;sayMyName&lt;/span&gt; &lt;span class="p"&gt;(){&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s2"&gt;`My name is &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="k"&gt;this&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="s2"&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;person&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="s1"&gt;Abhishek&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;sayMyName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;sayMyName&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;person&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sayMyName&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
    &lt;span class="c1"&gt;// Expected Output: My name is Abhishek&lt;/span&gt;

    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;person2&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="s1"&gt;Walter&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;person2NameFunc&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;sayMyName&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;bind&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;person2&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;person2NameFunc&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
    &lt;span class="c1"&gt;// Expected Output: My name is Walter&lt;/span&gt;

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

&lt;/div&gt;



&lt;p&gt;for the person2NameFunc the person object &lt;code&gt;this.name&lt;/code&gt; is taken from the person2 object as we have bind the &lt;code&gt;sayMyName&lt;/code&gt; function with person2 object.&lt;/p&gt;

&lt;p&gt;2.. &lt;strong&gt;prototype.call()&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;call()&lt;/code&gt; method is used to call a function with given &lt;code&gt;this&lt;/code&gt; value and arguments provided individaully.&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;introduce&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;language&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;`I code in &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;language&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;. My name is &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="k"&gt;this&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="s2"&gt;.`&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;mySelf&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;Abhishek&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;

        &lt;span class="nx"&gt;introduce&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;call&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;mySelf&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Java&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="c1"&gt;// Expected output: I code in Java. My name is Abhishek.&lt;/span&gt;

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

&lt;/div&gt;



&lt;p&gt;Here, the &lt;em&gt;introduce&lt;/em&gt; function takes a language argument and logs information about the language and the person's name. &lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;call()&lt;/strong&gt; method is used to invoke this function with the mySelf object as the this value, allowing access to its properties.&lt;/p&gt;

&lt;p&gt;Unlike &lt;code&gt;bind()&lt;/code&gt;, which creates a new function with a specified &lt;code&gt;this&lt;/code&gt; value, &lt;code&gt;call()&lt;/code&gt; directly invokes the function with the specified &lt;code&gt;this&lt;/code&gt; value along with individual arguments.&lt;/p&gt;

&lt;p&gt;3.. &lt;strong&gt;prototype.apply()&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;apply()&lt;/code&gt; method is similar to &lt;code&gt;call()&lt;/code&gt;, but insted of accepting arguments individually, it accepts arguments as an array.&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;add&lt;/span&gt;&lt;span class="p"&gt;(...&lt;/span&gt;&lt;span class="nx"&gt;args&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;sum&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;reduce&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;acc&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;curr&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;acc&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;curr&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;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;sum&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;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;4&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="nx"&gt;add&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;apply&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;numbers&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="c1"&gt;// Expected output: 15&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  When to use call, bind and apply
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;call&lt;/strong&gt;:  Use &lt;code&gt;call&lt;/code&gt; when you want to execute a function immediately and specify what &lt;code&gt;this&lt;/code&gt; should refer to&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;bind&lt;/strong&gt;: Use &lt;code&gt;bind&lt;/code&gt; when you want to create a new function that, when executed later, has a predeterminf &lt;code&gt;this&lt;/code&gt; value&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;apply&lt;/strong&gt;" Use &lt;code&gt;apply&lt;/code&gt; when you have an array of arguments that you want to pass to a function.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;PS: The reason to use my name everywhere is that, while reading, whenever you see my name, you will tend to try it with your name too&lt;/p&gt;

&lt;p&gt;These are the most common one to use, You can explore more &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object"&gt;here&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;If the article helps you, leave a like, follow, or anything 🙂.&lt;br&gt;&lt;br&gt;
You can follow me on &lt;a href="https://www.linkedin.com/in/abhishekpathak32/"&gt;LinkedIn&lt;/a&gt;, &lt;a href="https://github.com/scorcism"&gt;GitHub&lt;/a&gt;, &lt;a href="https://dev.to/scorcism"&gt;Dev.to&lt;/a&gt; and &lt;a href="https://scorcism.hashnode.dev/"&gt;hashnode&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bye🍕&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>scor32k</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Linux File Permission</title>
      <dc:creator>Abhishek Pathak</dc:creator>
      <pubDate>Tue, 19 Sep 2023 11:32:31 +0000</pubDate>
      <link>https://forem.com/scorcism/file-permission-2d8</link>
      <guid>https://forem.com/scorcism/file-permission-2d8</guid>
      <description>&lt;h2&gt;
  
  
  What are file permissions
&lt;/h2&gt;

&lt;p&gt;File permissions play a crucial role in ensuring proper privacy and security.&lt;/p&gt;

&lt;p&gt;Don't worry, I'll guide you through it step by step .&lt;/p&gt;

&lt;h3&gt;
  
  
  How do they work ?
&lt;/h3&gt;

&lt;p&gt;Unlike Windows , Linux❤️‍🔥 files cannot be executed directly. This is because file permissions must allow the execution of a file for it to be executed.&lt;/p&gt;

&lt;p&gt;File permissions prevent unauthorized access to sensitive files or directories and also ensure data privacy.&lt;/p&gt;

&lt;p&gt;In short, without proper file permissions, file execution, access, and modification cannot occur.&lt;/p&gt;

&lt;p&gt;Now, before we move into file permissions description, let's understand the Linux roles .&lt;/p&gt;

&lt;h3&gt;
  
  
  User Role
&lt;/h3&gt;

&lt;p&gt;There are three roles or entities in the Linux system: user👤, group👥, and others.&lt;/p&gt;

&lt;p&gt;Here is the brief overview👀:&lt;/p&gt;

&lt;p&gt;👤&lt;strong&gt;User(u):&lt;/strong&gt; The Individual user who owns the file, directory. The user is often the person/guy who creatd the file or directory and becomes the owner of the file. The owner has the most extensive control over the it.&lt;/p&gt;

&lt;p&gt;👥&lt;strong&gt;Group(g):&lt;/strong&gt; Users in the same group as the file owner will have access to the file. To allow a specific set of users to access the file, you can add them to a group and grant access to that group. This way, only the users in that group will have access to the file. Group permisssions allow collaboration among users with the similar access.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Others(o):&lt;/strong&gt; Everyone else who has access to the system but isn't the owner or in the group associated with the file. Others include the general public.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;All three users/entities will have three types of permissions&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  💭Entities Permission
&lt;/h3&gt;

&lt;p&gt;📕&lt;strong&gt;Read(r):&lt;/strong&gt; Allows viewing the content of a file or listing the content of a directory. Read permission is represented by the "r" symbol. Read permission also has an octal value of 4. Octal value is another way↕️ of representing file permissions.&lt;/p&gt;

&lt;p&gt;We will explore this further.&lt;/p&gt;

&lt;p&gt;✍️&lt;strong&gt;Write(w):&lt;/strong&gt; Allows modification of the file’s content or creating, deleting and renaiming within the directory. Write permission is represented by “w” symbol, it has an octal value of &lt;strong&gt;2.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Execute(x):&lt;/strong&gt; This enables running the file as a program or traversing a directory. Execute has octal value of &lt;strong&gt;1.&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;To &lt;strong&gt;summarize&lt;/strong&gt;, there are three roles in a Linux system: 👤user, 👥group, and others.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  The user is the owner of the file or directory,&lt;/li&gt;
&lt;li&gt;  Group consists of users who belong to the same group as the file owner,&lt;/li&gt;
&lt;li&gt;  others refers to the general public.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each of these users has three individual permissions: 📕Read, ✍️Write, and Execute.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Read permission allows the user to only read the file, and it is represented by the octal value of 4.&lt;/li&gt;
&lt;li&gt;  Write permission allows the user to modify the file, and it is represented by the octal value of 2.&lt;/li&gt;
&lt;li&gt;  Execute permission allows the user to execute a file or traverse a directory, and it is represented by the octal value of 1.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;These permissions are organized in a string of nine characters for each file or diectory.&lt;/p&gt;

&lt;p&gt;eg:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;rw-r--r--&lt;/code&gt; ([rw-] represents read and write permission for the owner), ([r--]and read only permission to the group) and ([r--]and read only permission to the others).&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--nJAgTkTe--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://imgur.com/1z8JKC2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nJAgTkTe--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://imgur.com/1z8JKC2.png" alt="one" width="522" height="262"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  🌅Viewing file Permissions
&lt;/h3&gt;

&lt;p&gt;To view the permissions of files and directories, you can use the &lt;strong&gt;&lt;code&gt;ls&lt;/code&gt;&lt;/strong&gt; command with the &lt;strong&gt;&lt;code&gt;-l&lt;/code&gt;&lt;/strong&gt; option🛩️. Here's an example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;    &lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-l&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The output will display file information, including permissions, ownership, group, size, modification date, and filename.&lt;/p&gt;

&lt;p&gt;Here's a breakdown of what a typical &lt;strong&gt;&lt;code&gt;ls -l&lt;/code&gt;&lt;/strong&gt; output looks like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nt"&gt;-rw-r--r--&lt;/span&gt; 1 scor32k scor32k 43 Sep 19 01:00 myfile_scor32k.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;&lt;code&gt;rw-r--r--&lt;/code&gt;&lt;/strong&gt; represents the permissions.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;&lt;code&gt;1&lt;/code&gt;&lt;/strong&gt; indicates the number of hard links.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;&lt;code&gt;user&lt;/code&gt;&lt;/strong&gt; is the owner of the file.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;&lt;code&gt;group&lt;/code&gt;&lt;/strong&gt; is the group associated with the file.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;&lt;code&gt;43&lt;/code&gt;&lt;/strong&gt; is the file size.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;&lt;code&gt;Sep 19 01:00&lt;/code&gt;&lt;/strong&gt; is the modification date.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;&lt;code&gt;myfile_scor32k.txt&lt;/code&gt;&lt;/strong&gt; is the filename.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You may be thinking🤔 but how &lt;code&gt;-rw-r--r--&lt;/code&gt; permission got attached to the file when we created it,&lt;/p&gt;

&lt;p&gt;this is becase of &lt;strong&gt;UMASK&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  USMAK ?
&lt;/h3&gt;

&lt;p&gt;In simple terms, whenever we create a file or directory in a Linux system, the system assigns default permissions to the file or directory based on Linux itself.&lt;/p&gt;

&lt;p&gt;Interesting! more&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;umask&lt;/strong&gt; is generally set to &lt;code&gt;022&lt;/code&gt;. You can check that using &lt;code&gt;umask&lt;/code&gt; command.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Notes&lt;/strong&gt;: The default permission for a file is &lt;code&gt;666&lt;/code&gt;, and the default permission for a directory is &lt;code&gt;777&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The entire process is as follows:&lt;/p&gt;

&lt;p&gt;When a user creates a file, it will have a default permission of &lt;code&gt;666&lt;/code&gt;. The &lt;code&gt;022&lt;/code&gt; umask will then be subtracted from &lt;code&gt;666&lt;/code&gt;, resulting in a final permission of &lt;code&gt;644&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The user will have read and write permission(6=4+2), the group will have read permission(4), and others will also have read permission(4).&lt;/p&gt;

&lt;p&gt;🌱You can also try this with a directory: &lt;code&gt;777&lt;/code&gt; - &lt;code&gt;022&lt;/code&gt; = &lt;code&gt;755&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Modifying file permissions
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;chown&lt;/strong&gt; which stands for change file mode or change file permission command is used to modify the permissions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Add execute permission to file.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;chmod&lt;/span&gt; +x myfile.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This &lt;code&gt;+x&lt;/code&gt; adds execute permission to the file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nt"&gt;-rwxr-xr-x&lt;/span&gt; 1 scor32k scor32k 43 Sep 19 01:00 myfile.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;See the image below:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--eKcyvPaJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://imgur.com/idXVxna.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--eKcyvPaJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://imgur.com/idXVxna.png" alt="two" width="614" height="389"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;Remove Permission&lt;/strong&gt;
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;chmod&lt;/span&gt; &lt;span class="nt"&gt;-x&lt;/span&gt; myfile.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;  &lt;code&gt;+&lt;/code&gt; is used to add permission.&lt;/li&gt;
&lt;li&gt;  &lt;code&gt;-&lt;/code&gt; is used to remove permission.
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nt"&gt;-rw-r--r--&lt;/span&gt; 1 scor32k scor32k 43 Sep 19 01:00 myfile.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BEg7pGii--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://imgur.com/B70kTi9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BEg7pGii--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://imgur.com/B70kTi9.png" alt="https://imgur.com/B70kTi9.png" width="577" height="229"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;Give permission based on specifc role:&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;User/owner Permission&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Add Permission&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;chmod &lt;/span&gt;u+x myfile.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--SJwcdImc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://imgur.com/NTzgJhH.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SJwcdImc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://imgur.com/NTzgJhH.png" alt="https://imgur.com/NTzgJhH.png" width="580" height="235"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Remove Permission&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;chmod &lt;/span&gt;u-x myfile.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4WN8hJ1R--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://imgur.com/Z8r8D7f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4WN8hJ1R--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://imgur.com/Z8r8D7f.png" alt="https://imgur.com/Z8r8D7f.png" width="549" height="247"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Group Permisson&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;chmod &lt;/span&gt;g+x myfile.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fp91E8ms--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://imgur.com/HwjwJCO.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fp91E8ms--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://imgur.com/HwjwJCO.png" alt="https://imgur.com/HwjwJCO.png" width="538" height="151"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; The same goes for &lt;strong&gt;others(o)&lt;/strong&gt;. You can experiment with this.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Octal Mode in chmod
&lt;/h3&gt;

&lt;p&gt;This is the advanced version of file permission manipulation. Here, we use numeric values to represent each permission types (read, write, execute).&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Read[r] = 4&lt;/li&gt;
&lt;li&gt;  Write(w) = 2&lt;/li&gt;
&lt;li&gt;  Execute(x) = 1&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To set permissions using an octal value, we assign a three-digit number to each entity (user, group, others) based on the desired permission.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; The file or directory can max have 777 file permission, which means the user,group and others will have read, write, and execute permission resepectively.&lt;/p&gt;

&lt;h2&gt;
  
  
  Modifying file permissions, Octal edition.
&lt;/h2&gt;

&lt;p&gt;Before moving forward,&lt;/p&gt;

&lt;p&gt;we need to remember that the permissions are just a combination of (4, 2, 1), and as per our requirements, we can alter this.&lt;/p&gt;

&lt;p&gt;Suppose we want to add read and execute permission to only the user and read permission to groups and others.&lt;/p&gt;

&lt;p&gt;So,&lt;/p&gt;

&lt;p&gt;We use &lt;code&gt;1&lt;/code&gt; as the octal value for execute, and for read, we use &lt;code&gt;4&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The combined value will be &lt;code&gt;544&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Example 1:
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Add read and execute permission to the user, and read permission to the group and others.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;chmod &lt;/span&gt;544 myfile.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2t3aPvH---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://imgur.com/H2DPPRF.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2t3aPvH---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://imgur.com/H2DPPRF.png" alt="https://imgur.com/H2DPPRF.png" width="613" height="313"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To be precise devide the &lt;code&gt;r-xr—r—&lt;/code&gt; into 3 blocks &lt;code&gt;r-x r-- r--&lt;/code&gt;, this will clear your doubts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note: T&lt;/strong&gt;he &lt;code&gt;-&lt;/code&gt; before permission is for the file type. &lt;strong&gt;&lt;code&gt;-&lt;/code&gt;&lt;/strong&gt; for &lt;strong&gt;file&lt;/strong&gt; and &lt;strong&gt;&lt;code&gt;d&lt;/code&gt;&lt;/strong&gt; is for directory.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--cUa9YNda--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://imgur.com/pAW6nHh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cUa9YNda--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://imgur.com/pAW6nHh.png" alt="https://imgur.com/pAW6nHh.png" width="519" height="194"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Example 2:
&lt;/h3&gt;

&lt;p&gt;Suppose, we want to add read and write to user, write and execute to group and read to others.&lt;/p&gt;

&lt;p&gt;user: read = 4, write = 2 ⇒ 4+2 ⇒ 6&lt;/p&gt;

&lt;p&gt;group: write = 2, execute = 1 ⇒ 2+1 ⇒ 3&lt;/p&gt;

&lt;p&gt;others: read = 4 ⇒ 4&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;chmod &lt;/span&gt;634 myfile.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--f-YdK0hq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://imgur.com/WSSOFIM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--f-YdK0hq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://imgur.com/WSSOFIM.png" alt="https://imgur.com/WSSOFIM.png" width="568" height="207"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If i take examples there will not be any end, you can play around with this.&lt;/p&gt;

&lt;h3&gt;
  
  
  Changing file ownership
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;chown&lt;/strong&gt; which stands for change ownership command is used to chnage the ownership of file or directory.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;chown &lt;/span&gt;abhishek myfile.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;  you my require root privelage.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--47ZdIHex--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://imgur.com/WQNSSYn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--47ZdIHex--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://imgur.com/WQNSSYn.png" alt="https://imgur.com/WQNSSYn.png" width="503" height="304"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Changing file group Ownership
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;chgrp&lt;/strong&gt; command will be used to chnage the file group.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;chgrp &lt;/span&gt;geet myfile.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;  add myfile.txt to group geet&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--B9YoKP3U--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://imgur.com/DHHszRl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--B9YoKP3U--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://imgur.com/DHHszRl.png" alt="https://imgur.com/DHHszRl.png" width="543" height="313"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Some tips
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Never use 777 →&lt;/strong&gt; It’s a severe security risk and show be avoided.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;use ls -l&lt;/strong&gt; → This displays detailed information about files and directories, including their permissions.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;use chmod&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Limit the global access&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;umask matters a lot&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Review permissions regularly&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;If the article helps you, leave a like, follow, or anything 🙂.&lt;br&gt;&lt;br&gt;
You can follow me on &lt;a href="https://www.linkedin.com/in/abhishekpathak32/"&gt;LinkedIn&lt;/a&gt;, &lt;a href="https://github.com/scorcism"&gt;GitHub&lt;/a&gt;, &lt;a href="https://dev.to/scorcism"&gt;Dev.to&lt;/a&gt; and &lt;a href="https://scorcism.hashnode.dev/"&gt;hashnode&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bye&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>beginners</category>
      <category>scor32k</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Data Plane/Worker Node - k8s</title>
      <dc:creator>Abhishek Pathak</dc:creator>
      <pubDate>Fri, 15 Sep 2023 09:40:34 +0000</pubDate>
      <link>https://forem.com/scorcism/data-planeworker-node-k8s-1025</link>
      <guid>https://forem.com/scorcism/data-planeworker-node-k8s-1025</guid>
      <description>&lt;p&gt;When I started learning about the K8S architecture, the basic building blocks were the control plane, which is the master node, and the data plane, which is the worker node.&lt;/p&gt;

&lt;p&gt;I thought, Why not share what I have learned?&lt;/p&gt;

&lt;p&gt;This will be a three-part post: 1) Data Place 2) Control Place; and 3) The entire arch, which will be a combination of the data plane and the control plane.&lt;/p&gt;

&lt;p&gt;So here it is:&lt;/p&gt;

&lt;h2&gt;
  
  
  Data Plane/Worker Node Simplified
&lt;/h2&gt;

&lt;p&gt;In Kubernetes (K8s), the smallest unit of deployment is called a pod.&lt;/p&gt;

&lt;p&gt;Pod ?&lt;/p&gt;

&lt;p&gt;Pod is a "wrapper" over the containers, which has advanced capabilities. Think of it as a little package that can contain your application.&lt;/p&gt;

&lt;p&gt;When you run a pod, it's pretty much like starting a container.&lt;/p&gt;

&lt;p&gt;In Docker, you have a thing called the "Docker engine", which runs the container, while in K8s, we have a similar thing called the "container runtime." This runtime takes care of running the actual container inside the pod.&lt;/p&gt;

&lt;p&gt;Here's where it gets interesting. A pod can actually hold multiple containers. So, while Docker does containers, K8s does pods with containers inside them.&lt;/p&gt;

&lt;p&gt;In Docker, we have the trusty &lt;strong&gt;Dockershim&lt;/strong&gt; for running containers. But in K8s, we're more flexible. We can use &lt;strong&gt;Dockershim&lt;/strong&gt;, &lt;strong&gt;Container&lt;/strong&gt;, or &lt;strong&gt;Crio&lt;/strong&gt;; these are all like different flavours of the same ice cream, competing to be your runtime. K8s allow you to pick the one you like.&lt;/p&gt;

&lt;p&gt;Now, let's talk about the magic happening inside a pod on a K8s worker node. We have a little helper called Kubelet. This Kubelet is like a caretaker for your Kubernetes pod. It keeps an eye on whether your pod is running smoothly or not, and if not, it raises the alarm.&lt;/p&gt;

&lt;p&gt;In Docker, we've got &lt;strong&gt;docker0&lt;/strong&gt; and some network tricks to make sure containers talk to each other and to the host. In K8s, we've got something called &lt;strong&gt;kube-proxy&lt;/strong&gt; doing similar network magic. It helps pods communicate with each other, sort of like a networking wizard.&lt;/p&gt;

&lt;p&gt;So far, we've met three main characters in our K8s story:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;kube-proxy&lt;/strong&gt;: The networking guru. It handles IP addresses and load balancing, and it loves using something called "iptables" to work its magic on Linux machines.  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Kubelet&lt;/strong&gt;: The pod creator and babysitter It gets pods up and running, and if something goes wrong, it raises a flag to the control plane.  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Container runtime&lt;/strong&gt;: The workhorse It's the one that actually runs your container, making sure your application is alive and kicking.  &lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That's a glimpse into the world of worker nodes and pods in Kubernetes, where containers and pods work together in harmony.&lt;/p&gt;

&lt;p&gt;This is the architecture of the data plane. Simple&lt;br&gt;
Check the diagram, will help you understand more.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fres.cloudinary.com%2Fpracticaldev%2Fimage%2Ffetch%2Fs--57SV6tDD--%2Fc_limit%252Cf_auto%252Cfl_progressive%252Cq_auto%252Cw_800%2Fhttps%3A%2F%2Fimgur.com%2FMuYnXCA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fres.cloudinary.com%2Fpracticaldev%2Fimage%2Ffetch%2Fs--57SV6tDD--%2Fc_limit%252Cf_auto%252Cfl_progressive%252Cq_auto%252Cw_800%2Fhttps%3A%2F%2Fimgur.com%2FMuYnXCA.png" alt="diagram"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>scor32k</category>
      <category>kubernetes</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Pagination - Mongo DB, Express</title>
      <dc:creator>Abhishek Pathak</dc:creator>
      <pubDate>Thu, 14 Sep 2023 14:53:31 +0000</pubDate>
      <link>https://forem.com/scorcism/pagination-mongo-db-express-4pho</link>
      <guid>https://forem.com/scorcism/pagination-mongo-db-express-4pho</guid>
      <description>&lt;p&gt;In working with the dashbord system,&lt;/p&gt;

&lt;p&gt;There is always a question: What is the best way to do pagination?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pagination ?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Suppose we have 1000 rows of data, so it will take a lot of bandwidth to fetch data all the at one time, and it will cause a latency(delay). To overcome this, we use pagination.&lt;/p&gt;

&lt;p&gt;We set the number of rows per page to 10, 20, 30, and so on. based on the requirements.&lt;/p&gt;

&lt;p&gt;In my recent project , I had the same issue.&lt;/p&gt;

&lt;p&gt;What I did was use the concepts of skip and limit to achieve my goal.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimgur.com%2FYQV3iSl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimgur.com%2FYQV3iSl.png" alt="attachment"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see in the image attached:&lt;/p&gt;

&lt;p&gt;we have,&lt;/p&gt;

&lt;p&gt;id: As the system is dynamic, id will help to fetch specific user data. id is attached to req by a custom middleware fetchuser, which will check if the JWT token is valid, and if it is valid, it will get the id from the token and pass the require.&lt;/p&gt;

&lt;p&gt;ITEMS-PER-PAGE: It is a numeric value that is set to 10. This means we are requesting 10 rows or documents per request.&lt;/p&gt;

&lt;p&gt;page: This represents the current page. If not, it will be set to 1. I have used parameters to check what page we are on.&lt;/p&gt;

&lt;p&gt;skip: Based on the page number and ITEMS-PER-PAGE, it will skip x rows or documents. Supposing we are on page 2 and ITEMS-PER-PAGE is set to 10, skip = (page (2) - 1) *  ITEMS-PER-PAGE = 10 ,&lt;br&gt;
and the endpoint will return data from the 11th record.&lt;/p&gt;

&lt;p&gt;countPromise: This is to get the total document or row count. This will be helpful to get the maximum number of pages we have. Suppose there are 50 documents in the table, and ITEMS-PER-PAGE is 10, so we will have 5 pages.&lt;/p&gt;

&lt;p&gt;usersPromise: This is the list of users that the endpoint will send.&lt;/p&gt;

&lt;p&gt;pageCount: The count of pages.&lt;/p&gt;

&lt;p&gt;Code is very simple once you read it and do.  &lt;/p&gt;

&lt;p&gt;If any error, comments are alwyas welcome. I'm trying out this things.&lt;/p&gt;




&lt;p&gt;If the article helps you, leave a like, follow, or anything 🙂.&lt;br&gt;&lt;br&gt;
You can follow me on &lt;a href="https://www.linkedin.com/in/abhishekpathak32/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;, &lt;a href="https://github.com/scorcism" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;, &lt;a href="https://dev.to/scorcism"&gt;Dev.to&lt;/a&gt; and &lt;a href="https://scorcism.hashnode.dev/" rel="noopener noreferrer"&gt;hashnode&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bye&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>mongodb</category>
      <category>scor32k</category>
      <category>internet</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
