<?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: Subham Kumar</title>
    <description>The latest articles on Forem by Subham Kumar (@digital_subham).</description>
    <link>https://forem.com/digital_subham</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%2F1233525%2F463bf8d0-7a4b-40ba-8394-988c5ca37564.jpg</url>
      <title>Forem: Subham Kumar</title>
      <link>https://forem.com/digital_subham</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/digital_subham"/>
    <language>en</language>
    <item>
      <title>26. Remove Duplicates from Sorted Array</title>
      <dc:creator>Subham Kumar</dc:creator>
      <pubDate>Thu, 27 Nov 2025 17:03:07 +0000</pubDate>
      <link>https://forem.com/digital_subham/26-remove-duplicates-from-sorted-array-33ah</link>
      <guid>https://forem.com/digital_subham/26-remove-duplicates-from-sorted-array-33ah</guid>
      <description>&lt;p&gt;Given an integer array nums &lt;strong&gt;sorted in non-decreasing order&lt;/strong&gt;, remove the duplicates &lt;strong&gt;in-place&lt;/strong&gt; such that each unique element appears only once. The &lt;strong&gt;relative order&lt;/strong&gt; of the elements should be kept the same.&lt;/p&gt;

&lt;p&gt;Consider the number of unique elements in nums to be k​​​​​​​​​​​​​​. After removing duplicates, return the &lt;strong&gt;number of unique elements&lt;/strong&gt; k.&lt;/p&gt;

&lt;p&gt;The first k elements of nums should contain the &lt;strong&gt;unique numbers in sorted order&lt;/strong&gt;. The remaining elements beyond index k - 1 can be ignored.&lt;/p&gt;

&lt;p&gt;Input: nums = [1,1,2]&lt;br&gt;
Output: 2, nums = [1,2,_]&lt;br&gt;
Explanation: Your function should return k = 2, with the first two elements of nums being 1 and 2 respectively.&lt;br&gt;
It does not matter what you leave beyond the returned k (hence they are underscores).&lt;/p&gt;
&lt;h2&gt;
  
  
  Solution
&lt;/h2&gt;

&lt;p&gt;So the array is sorted, means numbers are in increasing order but duplicates can be there like [0,0,1,1,2,2].&lt;/p&gt;

&lt;p&gt;The question says remove duplicates in place, which basically means we don’t create new array.&lt;br&gt;
We just take the same array and push all unique values to the front.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;My way to think is very simple:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Take two variables&lt;/li&gt;
&lt;li&gt;x stays at the place where the last unique element is&lt;/li&gt;
&lt;li&gt;i runs the whole array&lt;/li&gt;
&lt;li&gt;whenever I find a value bigger than nums[x], that means it’s a new unique value&lt;/li&gt;
&lt;li&gt;so I increase x and put that value at nums[x]&lt;/li&gt;
&lt;/ul&gt;

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

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var removeDuplicates = function(nums) {
    let x = 0
    for(let i = 0 ; i &amp;lt; nums.length; i++){
        if(nums[x] &amp;lt; nums[i]){
            x = x + 1
            nums[x] = nums[i]
        }
    }
    return x + 1
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now why x + 1?&lt;/p&gt;

&lt;p&gt;Because x is index.&lt;br&gt;
Index starts from 0.&lt;br&gt;
But the answer they want is count of unique values.&lt;br&gt;
So if last unique element is at index 2, then total unique are 3 → that’s why x + 1.&lt;/p&gt;

&lt;p&gt;This is literally the whole logic. Simple two-pointer trick. If you want I can also explain the dry-run in the same simple tone.&lt;/p&gt;

&lt;p&gt;Similar to this question there is one more question can solve to get better at it.&lt;/p&gt;

&lt;h2&gt;
  
  
  leetCode Question no 27.
&lt;/h2&gt;

&lt;p&gt;Given an integer array nums and an integer val, remove all occurrences of val in nums in-place. The order of the elements may be changed. Then return the number of elements in nums which are not equal to val.&lt;/p&gt;

&lt;p&gt;Consider the number of elements in nums which are not equal to val be k, to get accepted, you need to do the following things:&lt;/p&gt;

&lt;p&gt;Change the array nums such that the first k elements of nums contain the elements which are not equal to val. The remaining elements of nums are not important as well as the size of nums.&lt;br&gt;
Return k.&lt;/p&gt;

&lt;p&gt;Input: nums = [3,2,2,3], val = 3&lt;br&gt;
Output: 2, nums = [2,2,&lt;em&gt;,&lt;/em&gt;]&lt;br&gt;
Explanation: Your function should return k = 2, with the first two elements of nums being 2.&lt;br&gt;
It does not matter what you leave beyond the returned k (hence they are underscores).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftjr45m9qsbeb8s4yc05g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftjr45m9qsbeb8s4yc05g.png" alt=" " width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>algorithms</category>
      <category>coding</category>
      <category>interview</category>
      <category>leetcode</category>
    </item>
    <item>
      <title>How to Update a React Native App Without Play Store (Using Google Drive + JSON)</title>
      <dc:creator>Subham Kumar</dc:creator>
      <pubDate>Fri, 21 Nov 2025 03:12:38 +0000</pubDate>
      <link>https://forem.com/digital_subham/how-to-update-a-react-native-app-without-play-store-using-google-drive-json-2id6</link>
      <guid>https://forem.com/digital_subham/how-to-update-a-react-native-app-without-play-store-using-google-drive-json-2id6</guid>
      <description>&lt;p&gt;Publishing an Android app on the Play Store takes time.&lt;br&gt;
But what if you want to share your app immediately with your users and still push updates easily?&lt;/p&gt;

&lt;p&gt;Good news:&lt;br&gt;
You can build your own mini update system without any server — just using:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Google Drive&lt;/li&gt;
&lt;li&gt;One JSON file&lt;/li&gt;
&lt;li&gt;One APK file&lt;/li&gt;
&lt;li&gt;A few lines of React Native code&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In this article i will explains the whole process step-by-step in a clean, simple way.&lt;/p&gt;
&lt;h2&gt;
  
  
  Why Do We Need This?
&lt;/h2&gt;

&lt;p&gt;When you distribute your app as an APK (e.g., via Google Drive, WhatsApp, Telegram), users will install it once.&lt;/p&gt;

&lt;p&gt;But what happens when you release a new version?&lt;/p&gt;

&lt;p&gt;They don’t automatically know.&lt;/p&gt;

&lt;p&gt;So we create a small, smart system where:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;You upload a new APK to Google Drive&lt;/li&gt;
&lt;li&gt;You update a JSON file on Google Drive&lt;/li&gt;
&lt;li&gt;Your app checks the JSON every time it opens&lt;/li&gt;
&lt;li&gt;If a new version is available → show update popup&lt;/li&gt;
&lt;li&gt;User downloads &amp;amp; installs the latest APK&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This feels like a real update system — but without servers or Play Store.&lt;/p&gt;
&lt;h2&gt;
  
  
  How the System Works
&lt;/h2&gt;

&lt;p&gt;Think of your app as a student.&lt;br&gt;
Think of your JSON file as the teacher.&lt;/p&gt;

&lt;p&gt;Every time the app opens, it asks:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Teacher, what’s the latest version?&lt;br&gt;
The JSON replies:&lt;br&gt;
&lt;/p&gt;


&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "latestVersion": "1.0.5",
  "downloadUrl": "YOUR_APK_LINK"
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your app compares:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Installed version (e.g., 1.0.0)&lt;/li&gt;
&lt;li&gt;Latest version from JSON (e.g., 1.0.5)&lt;/li&gt;
&lt;li&gt;If JSON version is higher → app shows an Update alert.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;h2&gt;
  
  
  Step 1 — Create a JSON File on Google Drive
&lt;/h2&gt;

&lt;p&gt;Make a file: update.json&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "latestVersion": "1.0.5",
  "changelog": "• Faster performance\n• Bug fixes\n• Small UI changes",
  "downloadUrl": "https://drive.google.com/uc?export=download&amp;amp;id=APK_FILE_ID",
  "forceUpdate": false
}

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

&lt;/div&gt;



&lt;p&gt;Upload to Google Drive → Right-click → Share →&lt;br&gt;
Anyone with link → Viewer&lt;/p&gt;

&lt;p&gt;Now convert the Drive URL:&lt;br&gt;
Example Drive link:&lt;br&gt;
&lt;code&gt;https://drive.google.com/file/d/1abcXYZ/view?usp=sharing&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
Direct JSON link:&lt;br&gt;
&lt;code&gt;https://drive.google.com/uc?export=download&amp;amp;id=1abcXYZ&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Save this — your app will fetch this URL.&lt;/p&gt;
&lt;h2&gt;
  
  
  Step 2 — Update Version in Your React Native App
&lt;/h2&gt;

&lt;p&gt;Go to:&lt;br&gt;
&lt;code&gt;android/app/build.gradle&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
Update:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;versionCode 2
versionName "1.0.1"

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

&lt;/div&gt;



&lt;p&gt;Always increase versionCode before building a new APK.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3 — React Native Code to Check for Updates
&lt;/h2&gt;

&lt;p&gt;Use this code in App.js or your root screen:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { Alert, Linking } from "react-native";
import DeviceInfo from "react-native-device-info";
import { useEffect } from "react";

const CHECK_URL = "https://drive.google.com/uc?export=download&amp;amp;id=YOUR_JSON_ID";

export default function App() {

  useEffect(() =&amp;gt; {
    checkForUpdate();
  }, []);

  async function checkForUpdate() {
    try {
      const response = await fetch(CHECK_URL);
      const data = await response.json();

      const current = DeviceInfo.getVersion();
      const latest = data.latestVersion;

      if (isUpdateNeeded(current, latest)) {
        Alert.alert(
          "Update Available",
          data.changelog,
          [
            { text: "Update", onPress: () =&amp;gt; Linking.openURL(data.downloadUrl) },
            { text: "Later", style: "cancel" }
          ]
        );
      }
    } catch (err) {
      console.log("Failed to check update:", err);
    }
  }

  function isUpdateNeeded(current, latest) {
    const c = current.split('.').map(Number);
    const l = latest.split('.').map(Number);

    for (let i = 0; i &amp;lt; 3; i++) {
      if ((l[i] || 0) &amp;gt; (c[i] || 0)) return true;
      if ((l[i] || 0) &amp;lt; (c[i] || 0)) return false;
    }
    return false;
  }

  return (
    // Your app UI
  );
}

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 4 — What Happens When New APK Is Released?
&lt;/h2&gt;

&lt;p&gt;Whenever you upload a new APK:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Upload new APK to Google Drive&lt;/li&gt;
&lt;li&gt;Get direct APK link:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;code&gt;https://drive.google.com/uc?export=download&amp;amp;id=APK_ID&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
**&lt;br&gt;
Update JSON:&lt;br&gt;
**&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "latestVersion": "1.0.6",
  "downloadUrl": "NEW_APK_LINK",
  "changelog": "New features added"
}

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

&lt;/div&gt;



&lt;p&gt;Once JSON is updated → All users get update popup next time they open the app.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Update JSON on Google Drive (Correct Method)
&lt;/h2&gt;

&lt;p&gt;There are two correct ways, and you should pick only ONE:&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;METHOD 1: Replace the JSON File (BEST &amp;amp; EASIEST)&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
If you replace the file using Google Drive’s “Manage versions”, then:&lt;/p&gt;

&lt;p&gt;The public link stays the same&lt;/p&gt;

&lt;p&gt;Your app will always get the newest JSON file&lt;/p&gt;

&lt;p&gt;You don’t need to recreate the link ever again&lt;/p&gt;

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

&lt;ol&gt;
&lt;li&gt;Go to Google Drive&lt;/li&gt;
&lt;li&gt;Right-click your JSON file&lt;/li&gt;
&lt;li&gt;Manage versions&lt;/li&gt;
&lt;li&gt;Click Upload New Version&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Upload the updated JSON file&lt;/p&gt;

&lt;p&gt;Done (The link remains same → app fetches updated JSON automatically)&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;METHOD 2: Upload New JSON &amp;amp; Update the FILE_ID&lt;br&gt;
*&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;If you upload a brand-new JSON file instead of replacing:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Google Drive creates a new File ID (ID changes)&lt;/li&gt;
&lt;li&gt;Your app will continue reading the OLD JSON&lt;/li&gt;
&lt;li&gt;You must update FILE_ID in the app&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;BTW I never used 2nd method.&lt;/p&gt;

</description>
      <category>mobile</category>
      <category>android</category>
      <category>tutorial</category>
      <category>reactnative</category>
    </item>
    <item>
      <title>Complete Guide: Setting up React Native CLI for Android on macOS (2026 Edition)</title>
      <dc:creator>Subham Kumar</dc:creator>
      <pubDate>Thu, 30 Oct 2025 03:38:06 +0000</pubDate>
      <link>https://forem.com/digital_subham/complete-guide-setting-up-react-native-cli-for-android-on-macos-2025-edition-58h3</link>
      <guid>https://forem.com/digital_subham/complete-guide-setting-up-react-native-cli-for-android-on-macos-2025-edition-58h3</guid>
      <description>&lt;p&gt;If you’re on macOS and want to develop React Native apps using the CLI (not Expo), this guide walks you through everything — from installing Java to running your first Android emulator and building an APK.&lt;/p&gt;

&lt;p&gt;`🧩 Prerequisites&lt;/p&gt;

&lt;p&gt;You’ll need:&lt;/p&gt;

&lt;p&gt;macOS (Intel or Apple Silicon)&lt;/p&gt;

&lt;p&gt;Node.js &amp;amp; npm installed&lt;/p&gt;

&lt;p&gt;Terminal (zsh or bash)`&lt;/p&gt;

&lt;p&gt;⚙️ Step 1 — Install Watchman&lt;/p&gt;

&lt;p&gt;Watchman is a file watcher used by React Native to track code changes.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew install watchman
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Verify installation:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;Step 2 — Install OpenJDK 17 (via Zulu)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew install --cask zulu@17
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;React Native requires Java for Android builds.&lt;br&gt;
The Zulu distribution is stable and widely recommended.&lt;/p&gt;

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

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

&lt;/div&gt;



&lt;p&gt;You should see:&lt;br&gt;
&lt;code&gt;openjdk version "17.0.17" 2025-10-21 LTS&lt;br&gt;
OpenJDK Runtime Environment Zulu17.62+17-CA&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Step 3 — Install React Native CLI&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install -g react-native-cli
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;react-native --version&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Step 4 — Install Android Studio (Recommended)&lt;/p&gt;

&lt;p&gt;Although you can install SDKs manually, using Android Studio is the easiest and most reliable way.&lt;/p&gt;

&lt;p&gt;Option 1 (Recommended UI method)&lt;br&gt;
Download from&lt;br&gt;
👉 &lt;a href="https://developer.android.com/studio" rel="noopener noreferrer"&gt;https://developer.android.com/studio&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Choose the macOS (Apple Silicon or Intel) version.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Open .dmg → drag Android Studio to Applications.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Launch it → follow the Standard installation wizard.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;It will install:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Android SDK&lt;/li&gt;
&lt;li&gt;Platform Tools (adb)&lt;/li&gt;
&lt;li&gt;Emulator&lt;/li&gt;
&lt;li&gt;Build Tools&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Accept all SDK licenses when prompted.&lt;/p&gt;

&lt;p&gt;Option 2: Install Android Studio via Homebrew Cask (semi-automated)&lt;/p&gt;

&lt;p&gt;You can install the Android Studio app itself using Homebrew, but you’ll still need to open it once to complete SDK &amp;amp; emulator setup.&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew install --cask android-studio

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

&lt;/div&gt;



&lt;p&gt;Then open it once:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;open -a "Android Studio"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Inside the Android Studio UI:&lt;/p&gt;

&lt;p&gt;Choose Standard Installation&lt;/p&gt;

&lt;p&gt;Accept all SDK licenses&lt;/p&gt;

&lt;p&gt;Wait for SDK, Platform Tools, and Emulator to install&lt;/p&gt;

&lt;p&gt;After that, you can manage SDKs &amp;amp; virtual devices (AVDs) from command line later&lt;/p&gt;

&lt;p&gt;Step 5 — Confirm SDK Location&lt;/p&gt;

&lt;p&gt;Open Android Studio →&lt;br&gt;
Preferences → Appearance &amp;amp; Behavior → System Settings → Android SDK&lt;/p&gt;

&lt;p&gt;You’ll see something like:&lt;br&gt;
&lt;code&gt;/Users/&amp;lt;your-username&amp;gt;/Library/Android/sdk&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
That’s your $ANDROID_HOME.&lt;/p&gt;

&lt;p&gt;🌿 Step 6 — Add Environment Variables&lt;/p&gt;

&lt;p&gt;Open Terminal and run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;echo 'export ANDROID_HOME=$HOME/Library/Android/sdk' &amp;gt;&amp;gt; ~/.zshrc
echo 'export PATH=$PATH:$ANDROID_HOME/emulator' &amp;gt;&amp;gt; ~/.zshrc
echo 'export PATH=$PATH:$ANDROID_HOME/platform-tools' &amp;gt;&amp;gt; ~/.zshrc
echo 'export PATH=$PATH:$ANDROID_HOME/cmdline-tools/latest/bin' &amp;gt;&amp;gt; ~/.zshrc
source ~/.zshrc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;echo $ANDROID_HOME
adb --version
sdkmanager --list | head
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Step 7 — Create an Android Emulator&lt;/p&gt;

&lt;p&gt;Open Android Studio → Tools → Device Manager → Create Device&lt;br&gt;
Then:&lt;/p&gt;

&lt;p&gt;Select a Pixel device (e.g. Pixel 7)&lt;/p&gt;

&lt;p&gt;Choose a system image (Android 13 or 14 recommended)&lt;/p&gt;

&lt;p&gt;Download → Next → Finish&lt;/p&gt;

&lt;p&gt;Click ▶️ (Play) to launch the emulator&lt;/p&gt;

&lt;p&gt;Once it boots up, verify via terminal:&lt;br&gt;
&lt;code&gt;adb devices&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
✅ You should see:&lt;br&gt;
&lt;code&gt;emulator-5554   device&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
Step 8 — Run Your React Native App&lt;br&gt;
Inside your project folder:&lt;/p&gt;

&lt;p&gt;cd your-project&lt;br&gt;
npx react-native run-android&lt;/p&gt;

&lt;p&gt;This will:&lt;/p&gt;

&lt;p&gt;Build the app using Gradle&lt;/p&gt;

&lt;p&gt;Install it on your running emulator&lt;/p&gt;

&lt;p&gt;Launch it automatically 🎉&lt;/p&gt;

&lt;p&gt;To generate an APK file:&lt;br&gt;
&lt;code&gt;cd android&lt;br&gt;
./gradlew assembleDebug&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;You’ll find your APK here:&lt;br&gt;
&lt;code&gt;android/app/build/outputs/apk/debug/app-debug.apk&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;You can install it on any Android phone:&lt;br&gt;
&lt;code&gt;adb install app-debug.apk&lt;/code&gt;&lt;/p&gt;

</description>
      <category>reactnative</category>
      <category>cli</category>
      <category>android</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>A Curated Guide to Frontend System Design: Essential Concepts and Topics</title>
      <dc:creator>Subham Kumar</dc:creator>
      <pubDate>Sun, 07 Jul 2024 10:50:56 +0000</pubDate>
      <link>https://forem.com/digital_subham/a-curated-guide-to-frontend-system-design-essential-concepts-and-topics-n2i</link>
      <guid>https://forem.com/digital_subham/a-curated-guide-to-frontend-system-design-essential-concepts-and-topics-n2i</guid>
      <description>&lt;p&gt;In today's tech landscape, mastering system design is crucial for cracking coding interviews and advancing your career. This guide covers key areas and concepts essential for frontend system design.&lt;/p&gt;

&lt;p&gt;But thinking of what to study in system design is very confusing there are lots of thing that comes inside it.&lt;/p&gt;

&lt;p&gt;so i google it and created a list.&lt;/p&gt;

&lt;h2&gt;
  
  
  Mastering Frontend System Design: A Comprehensive Guide
&lt;/h2&gt;

&lt;p&gt;In today's tech landscape, mastering system design is crucial for cracking coding interviews and advancing your career. This guide covers key areas and concepts essential for frontend system design.&lt;/p&gt;

&lt;h3&gt;
  
  
  Key Areas in System Design
&lt;/h3&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;How the Web Works&lt;/strong&gt;: Understand the fundamentals of how data travels across the web.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Communication Protocols&lt;/strong&gt;: Learn about HTTP, HTTPS, and other protocols that enable web communication.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;REST APIs&lt;/strong&gt;: Explore REST principles for building scalable web services.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GraphQL&lt;/strong&gt;: Discover how GraphQL allows for more efficient and flexible data queries.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;gRPC&lt;/strong&gt;: Investigate gRPC for high-performance remote procedure calls.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Communication&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Short Polling&lt;/strong&gt;: Poll the server at regular intervals for updates.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Long Polling&lt;/strong&gt;: Maintain a connection until the server has new information.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Web Sockets&lt;/strong&gt;: Enable real-time, bidirectional communication between client and server.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Server-Side Events&lt;/strong&gt;: Push updates from the server to the client over a single connection.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Web Hooks&lt;/strong&gt;: Set up HTTP callbacks to notify external systems of events.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Security&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;XSS (Cross-Site Scripting)&lt;/strong&gt;: Protect against malicious scripts injected into web pages.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;iFrame Protection&lt;/strong&gt;: Prevent clickjacking and other iFrame-based attacks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Security Headers&lt;/strong&gt;: Use HTTP headers to enhance security measures.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Client-Side Security&lt;/strong&gt;: Safeguard data and interactions on the client side.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Secure Communication (HTTPS)&lt;/strong&gt;: Encrypt data in transit to protect against interception.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dependency Security&lt;/strong&gt;: Manage and secure third-party dependencies.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Compliance and Regulations&lt;/strong&gt;: Adhere to legal and industry standards.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Input Validation and Sanitization&lt;/strong&gt;: Ensure input data is clean and safe.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SSRF (Server-Side Request Forgery)&lt;/strong&gt;: Mitigate attacks where the server makes unintended requests.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Feature Policy&lt;/strong&gt;: Control which web features can be used in your application.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Server-Side JavaScript Injection&lt;/strong&gt;: Prevent unauthorized code execution on the server.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SRI (Subresource Integrity)&lt;/strong&gt;: Verify the integrity of resources loaded externally.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CORS (Cross-Origin Resource Sharing)&lt;/strong&gt;: Manage cross-origin requests securely.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CSRF (Cross-Site Request Forgery)&lt;/strong&gt;: Protect against unauthorized actions on behalf of a user.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Testing&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Unit and Integration Testing&lt;/strong&gt;: Test individual units and their integration.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;E2E and Automation Testing&lt;/strong&gt;: Perform end-to-end tests to simulate real user interactions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A/B Testing&lt;/strong&gt;: Compare two versions of a webpage to determine which performs better.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Performance Testing&lt;/strong&gt;: Measure the responsiveness and stability of your application.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test-Driven Development&lt;/strong&gt;: Write tests before coding to ensure functionality.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Security Testing&lt;/strong&gt;: Assess the security of your application against vulnerabilities.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Performance&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Performance Overview&lt;/strong&gt;: Understand the key aspects of web performance.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Performance Importance&lt;/strong&gt;: Learn why performance matters for user experience.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Performance Monitoring&lt;/strong&gt;: Continuously track performance metrics.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Performance Tools&lt;/strong&gt;: Use tools to diagnose and fix performance issues.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rendering Patterns&lt;/strong&gt;: Optimize how content is rendered on the screen.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Database &amp;amp; Caching&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Local Storage&lt;/strong&gt;: Store data locally within the user's browser.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Session Storage&lt;/strong&gt;: Keep data available for the duration of the page session.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cookie Storage&lt;/strong&gt;: Use cookies to store small amounts of data persistently.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;IndexedDB&lt;/strong&gt;: Utilize a low-level API for large-scale storage in the browser.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Normalization&lt;/strong&gt;: Structure your database to reduce redundancy.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;HTTP Caching&lt;/strong&gt;: Cache HTTP responses to improve load times.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Service Worker Caching&lt;/strong&gt;: Use service workers for offline capabilities.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;API Caching&lt;/strong&gt;: Cache API responses to reduce load on servers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;State Management&lt;/strong&gt;: Manage the state of your application efficiently.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Logging and Monitoring&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Telemetry&lt;/strong&gt;: Collect and analyze data about application usage and performance.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Alerting&lt;/strong&gt;: Set up alerts for critical issues and performance degradation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fixing Issues&lt;/strong&gt;: Identify and resolve issues based on logs and monitoring data.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Accessibility&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Keyboard Accessibility&lt;/strong&gt;: Ensure all functionality is accessible via keyboard.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Screen Reader&lt;/strong&gt;: Support screen readers for visually impaired users.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Focus Management&lt;/strong&gt;: Manage focus order for a seamless user experience.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Color Contrast&lt;/strong&gt;: Maintain sufficient contrast for readability.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Accessibility Tools&lt;/strong&gt;: Use tools to identify and fix accessibility issues.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fixing Accessibility Issues&lt;/strong&gt;: Implement fixes to improve accessibility compliance.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Detailed Design Concepts
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Low-Level Design (LLD)
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Component Design&lt;/strong&gt;: Design reusable and modular UI components.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Config-Driven UI&lt;/strong&gt;: Create UIs driven by configuration data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Shimmer UI&lt;/strong&gt;: Implement loading animations to enhance user experience.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Routing &amp;amp; Protected Routes&lt;/strong&gt;: Manage navigation and protect routes in your app.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;State Management + Libraries&lt;/strong&gt;: Handle application state using libraries like Redux.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multi-Language Support&lt;/strong&gt;: Support multiple languages in your application.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Infinite Scroll&lt;/strong&gt;: Load content dynamically as the user scrolls.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Accordion&lt;/strong&gt;: Implement collapsible sections for content organization.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Nested Comments&lt;/strong&gt;: Design a system for threaded comments.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Image Slider&lt;/strong&gt;: Create interactive image sliders for media content.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pagination&lt;/strong&gt;: Divide content into pages for better navigation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Real-Time Updates&lt;/strong&gt;: Push updates to the UI in real time.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Live Chat&lt;/strong&gt;: Implement a live chat feature.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Search&lt;/strong&gt;: Build an efficient search functionality.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  High-Level Design (HLD)
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Photo Sharing App (Instagram)&lt;/strong&gt;: Design a scalable photo-sharing platform.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ecommerce App (Amazon, Flipkart)&lt;/strong&gt;: Architect an online shopping system.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;News Media Feed (X)&lt;/strong&gt;: Create a news feed system.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Video Streaming (Netflix)&lt;/strong&gt;: Design a video streaming service.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Music Streaming (Spotify)&lt;/strong&gt;: Architect a music streaming platform.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Live Commentary (CricBuzz)&lt;/strong&gt;: Build a system for live sports commentary.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Email Client (Gmail)&lt;/strong&gt;: Design an email client with advanced features.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Google Docs&lt;/strong&gt;: Create a collaborative document editing tool.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Google Sheets&lt;/strong&gt;: Architect a collaborative spreadsheet application.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Diagram Tools (Excalidraw)&lt;/strong&gt;: Design an interactive diagramming tool.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cab Services (Uber, Ola, Rapido)&lt;/strong&gt;: Build a ride-hailing service.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Analytics Dashboard (Google Analytics)&lt;/strong&gt;: Create an analytics dashboard.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Edtech Platform (Bloom Tuition)&lt;/strong&gt;: Design an online education platform.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;System design is a vast field, but breaking it down into these categories can make it more manageable. Dive into each area, understand the core concepts, and practice designing systems. Happy learning!&lt;/p&gt;

&lt;p&gt;In upcoming articles, I will delve deeper into each topic and provide detailed explanations.&lt;/p&gt;

&lt;p&gt;If there are any topics I haven't listed, please let me know in the comments, and I will update the article accordingly.&lt;/p&gt;

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