<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Suraj M Durgad on Medium]]></title>
        <description><![CDATA[Stories by Suraj M Durgad on Medium]]></description>
        <link>https://medium.com/@surajmdurgad?source=rss-d5f0c1ac8ad9------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*nBgsWDxqkLh37n_oEP4HDw@2x.jpeg</url>
            <title>Stories by Suraj M Durgad on Medium</title>
            <link>https://medium.com/@surajmdurgad?source=rss-d5f0c1ac8ad9------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 06:41:01 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@surajmdurgad/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Repo Work Timer — Tracking the time I spend on my projects]]></title>
            <link>https://surajmdurgad.medium.com/repo-work-timer-tracking-the-time-i-spend-on-my-projects-6338351d81d1?source=rss-d5f0c1ac8ad9------2</link>
            <guid isPermaLink="false">https://medium.com/p/6338351d81d1</guid>
            <dc:creator><![CDATA[Suraj M Durgad]]></dc:creator>
            <pubDate>Sat, 05 Sep 2026 06:43:33 GMT</pubDate>
            <atom:updated>2026-09-07T02:37:46.286Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yc0Hlaa0lxvOohJdmQOO4w.png" /></figure><p>Hey folks, I’m back again 👋</p><p>Today I’m sharing a small VS Code extension I built to help me keep track of the time I’m spending on individual projects.</p><p>Sometimes we start working on something thinking it will take a few hours. Then there’s another change, something needs debugging, and a few more things get added along the way. We keep coming back to it over days and weeks.</p><p>Eventually, it becomes hard to tell how much time that project has actually taken.</p><p>This was something I wanted to get more organized about. When I’m working on different projects, I want to understand where my time is going and how that adds up over time.</p><p>That’s the whole reason behind <strong>Repo Work Timer</strong>.</p><p>The idea was fairly simple. Open a project in VS Code and have its tracked time visible in the editor, without having to maintain a separate record manually.</p><p>It sits on the right side of the status bar and looks something like this:</p><pre>◷ my-project · 2026-09 · 12h 35m</pre><p>You get the repository name, the month, and the total tracked runtime for that month.</p><p>Each repository has its own total, so time tracked for one project doesn’t get mixed with another. When a new month starts, the monthly total starts fresh, but the previous history stays available.</p><p>That history is what I was interested in. I wanted to be able to look back and see how much time a particular project has been taking, instead of just feeling like “I’ve been working on this for quite a while.”</p><p>There is one detail about how it works that is worth explaining.</p><p>The current version tracks <strong>Claude Code, Codex, and terminal command runtime</strong> inside the repository. So when an agent is working on a task, a build is running, or tests are executing, the timer counts that time.</p><p>An idle terminal or an agent waiting for the next prompt doesn’t count.</p><p>This also means I don’t need to keep the VS Code window in focus. If a command is still running in the background, it continues to count as long as VS Code and its extension host remain running.</p><p>But it doesn’t capture every part of working on a project. If I’m only reading code, thinking through a solution, or editing without any agent or command running, that time won’t be recorded.</p><p>Also, if you leave a development server running, that time will count. You can stop the server or pause tracking from the timer’s menu.</p><p>So keep that in mind when looking at the number. It’s a record of tool runtime associated with the project, which helps with my larger goal of understanding where my project time goes.</p><p>Another thing I wanted to get right was overlapping activity.</p><p>For example, let’s say Codex is working for 20 minutes, and during those same 20 minutes I also have tests running in a terminal.</p><p>Adding both separately would show 40 minutes, even though only 20 minutes have passed.</p><p>The extension counts that as <strong>20 minutes</strong>. Overlapping activity is merged, including across multiple VS Code windows working on the same repository.</p><p>There are a few other things available when you click the timer:</p><ul><li>Pause or resume tracking.</li><li>View previous monthly totals.</li><li>Export daily totals as CSV.</li><li>Preview and import earlier agent activity from available local history.</li></ul><p>The import is useful if you already have Claude Code or Codex history for the project. Importing the same history again won’t keep increasing the total. It also won’t recover missing logs or guess how long old terminal commands ran.</p><p>I built this using <strong>GPT Astra 6</strong>, and it was also a testing project to try the model on a practical task.</p><p>Having an actual problem to solve gave the experiment a clear direction. There were details to work through, like deciding what counts as activity, handling overlapping sessions, and preserving history when the month changes.</p><p>The extension keeps its tracking data local. There’s no account to create or telemetry. It reads local agent logs to identify activity, but doesn’t copy your prompts, responses, or source code into its tracking records.</p><p>If you want to try it, you can install it here:</p><p><a href="https://marketplace.visualstudio.com/items?itemName=SurajMDurgad.repo-work-timer"><strong>Repo Work Timer on the VS Code Marketplace</strong></a></p><p>Once installed, open a trusted Git repository in VS Code and run an agent task or terminal command. The timer updates roughly every ten seconds.</p><p>I built this because I wanted a clearer picture of how much time my projects were taking. If you also find yourself moving between projects and losing track of the time going into each one, give it a try.</p><p>Do let me know if it helps, or if there’s something you’d like to see added.</p><p>Hope this helps fellow developers!</p><p>Cheers! 🍻<br>Until next time!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6338351d81d1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[React Native — Fixing the “App must support 16 KB memory page size” warning on Google Play]]></title>
            <link>https://surajmdurgad.medium.com/react-native-fixing-the-app-must-support-16-kb-memory-page-size-warning-on-google-play-e21f24a594c1?source=rss-d5f0c1ac8ad9------2</link>
            <guid isPermaLink="false">https://medium.com/p/e21f24a594c1</guid>
            <category><![CDATA[16-kb-page-size]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[android]]></category>
            <dc:creator><![CDATA[Suraj M Durgad]]></dc:creator>
            <pubDate>Sun, 07 Dec 2025 06:12:59 GMT</pubDate>
            <atom:updated>2025-12-12T13:39:42.248Z</atom:updated>
            <content:encoded><![CDATA[<h3>React Native — Fixing the “App must support 16 KB memory page size” warning on Google Play</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0MPvyd8PQD3Yyi9IpFbxsg.png" /></figure><p>Hey folks, I’m back again 👋</p><p>You might have recently seen this warning on Play console:</p><blockquote>“App must support 16 KB memory page size”</blockquote><p>Google initially set a deadline of <strong>Nov 1</strong> for this, and later added an option to extend it to <strong>2026</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iSas84d7gXTtyT5dcxlhYA.png" /></figure><p><strong>Why is google enforcing 16KB page alignment?</strong></p><p><em>Google is implementing 16 KB memory page size support because newer Android devices are moving to hardware that uses larger memory pages by default. Larger pages make the system faster, more secure, and more efficient by reducing memory overhead and improving performance. Without this change, apps with native libraries aligned only for 4 KB pages could fail to load or crash on future devices. So Google is enforcing this now to ensure apps stay compatible, reliable, and ready for upcoming Android hardware.</em></p><p>That extension buys us some time, but let’s address the elephant in the room: <strong>how do we actually solve this?</strong></p><p>Below is a practical, script-based way to figure out <strong>which libraries are causing the issue</strong> and how to fix them in a React Native app.</p><blockquote>Step 1 — Add the ELF alignment check script</blockquote><p>Create a file named <em>check_elf_alignment.sh</em> and paste this script into it:</p><pre>#!/bin/bash<br><br>RED=&#39;\033[0;31m&#39;<br>GREEN=&#39;\033[0;32m&#39;<br>YELLOW=&#39;\033[1;33m&#39;<br>CYAN=&#39;\033[0;36m&#39;<br>NC=&#39;\033[0m&#39; # No Color<br><br>progname=&quot;${0##*/}&quot;<br>progname=&quot;${progname%.sh}&quot;<br>tmp_dir=&quot;&quot;<br><br>cleanup() {<br>  if [[ -n &quot;$tmp_dir&quot; &amp;&amp; -d &quot;$tmp_dir&quot; ]]; then<br>    rm -rf &quot;$tmp_dir&quot;<br>  fi<br>}<br><br>usage() {<br>  echo &quot;Checks ELF alignment of shared libraries in an APK or directory.&quot;<br>  echo -e &quot;Usage: ${progname} [path_to_apk | directory]&quot;<br>}<br><br>setup_apk() {<br>  local apk_path=&quot;$1&quot;<br>  echo -e &quot;${CYAN}Analyzing APK:${NC} $apk_path&quot; &gt;&amp;2<br>  tmp_dir=$(mktemp -d -t &quot;${progname}_out_XXXXX&quot;)<br>  unzip -q &quot;$apk_path&quot; &quot;lib/**&quot; -d &quot;$tmp_dir&quot;<br>  echo &quot;$tmp_dir/lib&quot;<br>}<br><br>check_alignment() {<br>  local so_file=&quot;$1&quot;<br>  [[ &quot;$(file -b &quot;$so_file&quot;)&quot; != *&quot;ELF&quot;* ]] &amp;&amp; return 2<br><br>  local alignment_val<br>  alignment_val=$(objdump -p &quot;$so_file&quot; | grep LOAD | awk &#39;{ print $NF }&#39; | head -1)<br><br>  if [[ &quot;$alignment_val&quot; =~ 2\*\*(1[4-9]|[2-9][0-9]) ]]; then<br>    return 0<br>  else<br>    return 1<br>  fi<br>}<br><br><br>if [[ $# -ne 1 || &quot;$1&quot; == &quot;--help&quot; || &quot;$1&quot; == &quot;-h&quot; ]]; then<br>  usage<br>  exit 0<br>fi<br><br>input_path=&quot;$1&quot;<br>if [[ ! -f &quot;$input_path&quot; &amp;&amp; ! -d &quot;$input_path&quot; ]]; then<br>  echo -e &quot;${RED}Error: File or directory not found: $input_path${NC}&quot; &gt;&amp;2<br>  exit 1<br>fi<br><br>lib_dir=&quot;$input_path&quot;<br>if [[ &quot;$input_path&quot; == *.apk ]]; then<br>  trap cleanup EXIT<br>  lib_dir=$(setup_apk &quot;$input_path&quot;)<br>fi<br><br>so_files=$(find &quot;$lib_dir&quot; -name &quot;*.so&quot; 2&gt;/dev/null)<br>if [ -z &quot;$so_files&quot; ]; then<br>  echo -e &quot;${YELLOW}No libraries (.so) found for analysis.${NC}&quot;<br>  exit 0<br>fi<br><br>unaligned_critical_count=0<br>results_string=&quot;&quot;<br><br>for file in $so_files; do<br>  arch=$(basename &quot;$(dirname &quot;$file&quot;)&quot;)<br>  check_alignment &quot;$file&quot;<br>  status_code=$?<br><br>  if [[ $status_code -ne 2 ]]; then<br>    status=&quot;ALIGNED&quot;<br>    if [ $status_code -eq 1 ]; then<br>      status=&quot;UNALIGNED&quot;<br>    fi<br>    <br>    results_string+=&quot;${arch};${status};$(basename &quot;$file&quot;)&quot;$&#39;\n&#39;<br><br>    if [[ &quot;$arch&quot; =~ ^(arm64-v8a|x86_64)$ &amp;&amp; &quot;$status&quot; == &quot;UNALIGNED&quot; ]]; then<br>      ((unaligned_critical_count++))<br>    fi<br>  fi<br>done<br><br><br>echo &quot;&quot;<br>echo &quot;--- ELF Alignment Summary ---&quot;<br><br>if [[ $unaligned_critical_count -gt 0 ]]; then<br>  echo -e &quot;${RED}STATUS: FAILURE! Found $unaligned_critical_count critical (64-bit) libraries unaligned.${NC}&quot;<br>else<br>  echo -e &quot;${GREEN}STATUS: SUCCESS! All critical (64-bit) libraries are aligned.${NC}&quot;<br>fi<br><br>echo &quot;&quot;<br><br>echo &quot;$results_string&quot; | cut -d&#39;;&#39; -f1 | sort -u | while read -r arch; do<br>  is_critical=false<br>  [[ &quot;$arch&quot; =~ ^(arm64-v8a|x86_64)$ ]] &amp;&amp; is_critical=true<br><br>  unaligned_libs=$(echo &quot;$results_string&quot; | grep &quot;^${arch};UNALIGNED;&quot; | cut -d&#39;;&#39; -f3)<br><br>  printf &quot;${CYAN}%-12s${NC}&quot; &quot;$arch&quot;<br><br>  if [ -n &quot;$unaligned_libs&quot; ]; then<br>    if $is_critical; then<br>      echo -e &quot;[${RED}FAILURE - CRITICAL${NC}]&quot;<br>    else<br>      echo -e &quot;[${YELLOW}WARNING${NC}]&quot;<br>    fi<br>    echo &quot;$unaligned_libs&quot; | while IFS= read -r lib; do<br>        [ -n &quot;$lib&quot; ] &amp;&amp; echo -e &quot;  - ${RED}$lib (Unaligned)${NC}&quot;<br>    done<br>  else<br>    echo -e &quot;[${GREEN}OK${NC}]&quot;<br>  fi<br>done<br><br>echo &quot;---------------------------------&quot;</pre><p>Make sure to run following command for the above file</p><pre>chmod +x check_elf_alignment.sh</pre><blockquote>Step 2 —Build your APK</blockquote><p>From your React Native project, generate a debug APK:</p><pre>cd android<br>./gradlew assembleDebug</pre><p>This will output something like:</p><pre>android/app/build/outputs/apk/debug/app-debug.apk</pre><p>(You can also use a release APK; the script works with both.)</p><blockquote>Step 3 — Run the alignment check</blockquote><p>From your project root (or wherever the script is), run:</p><pre>./check_elf_alignment.sh ./android/app/build/outputs/apk/debug/app-debug.apk</pre><p>You’ll see output similar to:</p><pre>--- ELF Alignment Summary ---<br>STATUS: FAILURE! Found 2 critical (64-bit) libraries unaligned.<br><br>            [OK]<br>arm64-v8a   [FAILURE - CRITICAL]<br>  - librnskia.so (Unaligned)<br>armeabi-v7a [WARNING]<br>  - libreact_codegen_safeareacontext.so (Unaligned)<br>  - libjsi.so (Unaligned)<br>  - libreact_codegen_rnscreens.so (Unaligned)<br>  - libfbjni.so (Unaligned)<br>  - libworklets.so (Unaligned)<br>  - librnscreens.so (Unaligned)<br>  - libhermestooling.so (Unaligned)<br>  - libreact_codegen_reactnativekeyboardcontroller.so (Unaligned)<br>  - librnskia.so (Unaligned)<br>  - libappmodules.so (Unaligned)<br>  - libgesturehandler.so (Unaligned)<br>  - libhermes.so (Unaligned)<br>  - libc++_shared.so (Unaligned)<br>  - libanimation-decoder-gif.so (Unaligned)<br>  - libreanimated.so (Unaligned)<br>  - libexpo-modules-core.so (Unaligned)<br>  - libreactnative.so (Unaligned)<br>  - libreact_codegen_rnsvg.so (Unaligned)<br>  - libavif_android.so (Unaligned)<br>x86         [WARNING]<br>  - libreact_codegen_safeareacontext.so (Unaligned)<br>  - libjsi.so (Unaligned)<br>  - libreact_codegen_rnscreens.so (Unaligned)<br>  - libfbjni.so (Unaligned)<br>  - libworklets.so (Unaligned)<br>  - librnscreens.so (Unaligned)<br>  - libhermestooling.so (Unaligned)<br>  - libreact_codegen_reactnativekeyboardcontroller.so (Unaligned)<br>  - librnskia.so (Unaligned)<br>  - libappmodules.so (Unaligned)<br>  - libgesturehandler.so (Unaligned)<br>  - libhermes.so (Unaligned)<br>  - libc++_shared.so (Unaligned)<br>  - libanimation-decoder-gif.so (Unaligned)<br>  - libreanimated.so (Unaligned)<br>  - libexpo-modules-core.so (Unaligned)<br>  - libreactnative.so (Unaligned)<br>  - libreact_codegen_rnsvg.so (Unaligned)<br>  - libavif_android.so (Unaligned)<br>x86_64      [FAILURE - CRITICAL]<br>  - librnskia.so (Unaligned)<br>---------------------------------   </pre><blockquote>Step 4 — Understand what’s actually broken</blockquote><p><strong>Let’s decode that summary:</strong></p><p>Overall STATUS: FAILURE because there were 2 unaligned 64-bit libraries.</p><p>For arm64-v8a, the script reported:<br>librnskia.so → UNALIGNED (CRITICAL)<br>For x86_64, again:<br>librnskia.so → UNALIGNED (CRITICAL)</p><p><strong><em>For 32-bit ABIs (armeabi-v7a and x86), almost every major React Native / Hermes / Expo / Skia library was UNALIGNED, but they are marked as [WARNING] because the 16 KB requirement is enforced on 64-bit.</em></strong></p><p><strong>Why is this a problem?</strong></p><p><strong><em>On devices with a 16 KB minimum page size, these unaligned 64-bit libraries may fail to load because the loader expects ELF segments aligned to at least 16 KB. Alignment like 2**12 (4 KB) is fine on traditional 4 KB page devices but not on newer 16 KB ones.</em></strong></p><blockquote>Step 5 — Fix the offending library</blockquote><p>This is the beautiful part of the React Native ecosystem — the community.</p><p>Someone had already raised this with the react-native-skia maintainers, and the fix was merged here:<br><a href="https://github.com/Shopify/react-native-skia/pull/3177">https://github.com/Shopify/react-native-skia/pull/3177</a></p><p>All I had to do was <strong>upgrade </strong>react-native-skia to 2.0.6.</p><blockquote>Step 6— Re-run the script</blockquote><pre>--- ELF Alignment Summary ---<br>STATUS: SUCCESS! All critical (64-bit) libraries are aligned.<br><br>            [OK]<br>arm64-v8a   [OK]<br>armeabi-v7a [WARNING]<br>  - libreact_codegen_safeareacontext.so (Unaligned)<br>  - libjsi.so (Unaligned)<br>  - libreact_codegen_rnscreens.so (Unaligned)<br>  - libfbjni.so (Unaligned)<br>  - libworklets.so (Unaligned)<br>  - librnscreens.so (Unaligned)<br>  - libhermestooling.so (Unaligned)<br>  - libreact_codegen_reactnativekeyboardcontroller.so (Unaligned)<br>  - libappmodules.so (Unaligned)<br>  - libgesturehandler.so (Unaligned)<br>  - libhermes.so (Unaligned)<br>  - libc++_shared.so (Unaligned)<br>  - libanimation-decoder-gif.so (Unaligned)<br>  - libreanimated.so (Unaligned)<br>  - libexpo-modules-core.so (Unaligned)<br>  - libreactnative.so (Unaligned)<br>  - libreact_codegen_rnsvg.so (Unaligned)<br>  - libavif_android.so (Unaligned)<br>x86         [WARNING]<br>  - libreact_codegen_safeareacontext.so (Unaligned)<br>  - libjsi.so (Unaligned)<br>  - libreact_codegen_rnscreens.so (Unaligned)<br>  - libfbjni.so (Unaligned)<br>  - libworklets.so (Unaligned)<br>  - librnscreens.so (Unaligned)<br>  - libhermestooling.so (Unaligned)<br>  - libreact_codegen_reactnativekeyboardcontroller.so (Unaligned)<br>  - libappmodules.so (Unaligned)<br>  - libgesturehandler.so (Unaligned)<br>  - libhermes.so (Unaligned)<br>  - libc++_shared.so (Unaligned)<br>  - libanimation-decoder-gif.so (Unaligned)<br>  - libreanimated.so (Unaligned)<br>  - libexpo-modules-core.so (Unaligned)<br>  - libreactnative.so (Unaligned)<br>  - libreact_codegen_rnsvg.so (Unaligned)<br>  - libavif_android.so (Unaligned)<br>x86_64      [OK]<br>---------------------------------    </pre><p><strong>What this means?</strong></p><p>✅ arm64-v8a (the primary ABI for modern Android devices) is fully aligned — this is what matters for 16 KB support.<br>✅ x86_64 is also aligned.<br>⚠️ armeabi-v7a and x86 still show many unaligned libraries, but these do not affect 16 KB page size requirements because:</p><p><strong>Google Play enforces the 16 KB requirement for 64-bit libraries; 32-bit ABIs are not checked.</strong></p><h3><strong>Voilà!</strong></h3><p>Just like that you can solve the 16KB issue, if you upload the build after these changes you should not see 16KB warning.</p><blockquote>Note:<br>1. I had only one problematic library, you might have a few you just have to repeat the above steps to resolve for others.<br>2. I would recommend to update to react-native 0.77 or higher as it explicitly include support for 16 KB page sizes.</blockquote><p>Sources — <br><a href="https://developer.android.com/guide/practices/page-sizes#build">https://developer.android.com/guide/practices/page-sizes#build</a></p><p>Hope this helps fellow developers!<br>Cheers! 🍻<br>Until next time!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e21f24a594c1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Quantum AI fraud — India]]></title>
            <link>https://surajmdurgad.medium.com/quantum-ai-fraud-india-4ba852428983?source=rss-d5f0c1ac8ad9------2</link>
            <guid isPermaLink="false">https://medium.com/p/4ba852428983</guid>
            <category><![CDATA[fraud]]></category>
            <category><![CDATA[online-frauds-india]]></category>
            <category><![CDATA[online-fraud]]></category>
            <dc:creator><![CDATA[Suraj M Durgad]]></dc:creator>
            <pubDate>Wed, 06 Nov 2024 04:17:18 GMT</pubDate>
            <atom:updated>2025-03-30T05:40:21.170Z</atom:updated>
            <content:encoded><![CDATA[<h3>Quantum AI fraud — India</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TGAXO4IUqZDpadn5iiHc1w.png" /></figure><p>Hey folks I’m back again.</p><p>Today I’m again going to talk about an online fraud that is being circulated on most of the social media platforms.</p><p>Today morning my mom reached out to me and shared a link, stating “<strong>can you check this out looks like a good investment, Sudha Murthy has spoken about it looks like good investment?</strong>”</p><p>Just for context Narayan Murthy is the founder of Infosys and Sudha Murthy is wife of Narayan Murthy also Founder-Chairperson of the non-profit charitable organization Infosys Foundation and a philanthropist.</p><p>This is the link which she shared with me, which she found in Facebook — <a href="https://castlehotelsultanindia.com/?media_type=video&amp;pix=1010351493753553&amp;placement=Facebook_Mobile_Feed&amp;ad_id=120213775189860355&amp;utm_source=VV58-6615784965188813-sud1-1-IN-ctlg&amp;utm_id=120213775189800355&amp;ad_name=sud1&amp;fbclid=IwZXh0bgNhZW0BMABhZGlkAasVyqirhaMBHTJk5cmxHiweCh5L6cQQY_tT5qkvVv6vAgmLviCAM50RYf8kFy68QSTRRg_aem_uYKkOifNOD_gT0n900d-3w&amp;utm_medium=paid&amp;utm_content=120213775189860355&amp;utm_term=120213775189800355&amp;utm_campaign=120213775189790355&amp;sfnsn=wiwspwa">link</a></p><p>When I opened the link, any normal person would believe it is Times Of India website where you usually read the news from, about people like Narayan Murthy and Sudha Murthy</p><p><strong>Fraudulent website mimicking Times of India website</strong></p><figure><img alt="Fraudulent website" src="https://cdn-images-1.medium.com/max/1024/1*kqoyovlbYfFJT9BKVxmzSA.png" /></figure><p>It contains a video of Narayan murthy suggesting that this is a great opportunity and everyone should invest.<br>My mom told that she saw Sudha Murthy, so I assume they have 2–3 videos which they alternate between.</p><p>The moment I saw the website link, I knew it was fraud. I told the same to my mom her first question was “<strong>but Sudha Murthy is talking about it?</strong>”</p><p><strong>How do they do it?<br></strong>There are so many AI video tools available online in which you create videos which are Deepfake which look realistic. You have to have keen eyes to find the issues with the videos. Fraudsters use these to create such videos and use that as a bait.<br>Narayan Murthy himself has spoken about such issues — <a href="https://www.business-standard.com/india-news/narayana-murthy-cautions-the-public-not-to-fall-prey-to-deep-fake-videos-123121500244_1.html">link</a></p><p><strong>How to identify?</strong></p><ul><li>A simple thumb rule, any thing too good to be true is not true, as simple as that. If you feel the investment is a good investment with less risk then probably that’s a trap.</li><li>Always look at the link shown in the url, if it has something weird that the title mentioned at the top of the page, then probably that’s a fake website</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q-AJ1VF1Ltc4ooTNJ6W8NA.png" /><figcaption>URL</figcaption></figure><p>In the above case the url should have been <a href="https://timesofindia.indiatimes.com/">https://timesofindia.indiatimes.com/</a> instead it was <a href="https://castlehotelsultanindia.com/">https://castlehotelsultanindia.com/</a></p><ul><li>Most of the other links in the website do nothing.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8L_LDzM8AcLzbb0Y1jWAQw.png" /></figure><p>The other tabs in the website for example clicking on Pakistan, South Asia, UK or any other link for that matter does nothing.</p><p>These are few telltale signs of fraudulent links.</p><p>When you scroll to the bottom of the screen they are collecting Name, email, phone number. When you submit it they take you to some shaddy trading website <a href="https://www.pentoventures.co/welcome">https://www.pentoventures.co/welcome</a>. <br>I’m assuming this is also a fake fradualent website.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DG4a_cY-iNxNrKhYssiXhQ.png" /></figure><p>When you click on Deposit fund it says — “In order to deposit funds to your trading account, your account manager will contact you via the phone in the following minutes, please be available to take the call.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dbNvAoIKStcsS1Ck0fMhnw.png" /></figure><p>Looks like from here they will target you over the phone.</p><p>And this is how most of India has become an easy target to these fraudsters.<br>Please make sure you never share your name, email and especially phone number at random places online.</p><p>Online scams have become increasingly widespread, their targets are the elders at home. Please be careful about such links. Especially elders at your home are naive to even figure such things. Please share it with as many people as possible before someone falls trap for such scams.</p><p>Hope this helps someone!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4ba852428983" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Thumb rule while picking a third-party react native library for your project]]></title>
            <link>https://surajmdurgad.medium.com/thumb-rule-while-picking-a-third-party-react-native-library-for-your-project-943671cb10c?source=rss-d5f0c1ac8ad9------2</link>
            <guid isPermaLink="false">https://medium.com/p/943671cb10c</guid>
            <dc:creator><![CDATA[Suraj M Durgad]]></dc:creator>
            <pubDate>Sun, 17 Sep 2023 10:20:41 GMT</pubDate>
            <atom:updated>2025-08-01T09:49:26.355Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l77T1EPmAALzbFGhTUJetQ.png" /></figure><p>Hello there!<br>I’m back again!<br>Thank you for your positive response to my earlier story.<br>If you haven’t seen it yet, it’s about some fascinating offbeat react-native libraries that you should look into.<br>Link: <a href="https://medium.com/@surajmdurgad/off-beat-libraries-for-react-native-e44a405466">https://medium.com/@surajmdurgad/off-beat-libraries-for-react-native-e44a405466</a></p><p>Today, I’ll try to point out things to keep in mind while we are trying to pick a react-native library. These rules applies to any third-party libraries, for that matter.</p><p>Let’s take the example of <a href="https://github.com/software-mansion/react-native-reanimated">react-native-reanimated</a>.</p><h3><strong>Stars on the library, Used by and Contributors</strong></h3><p>The very first thing I look at when I stumble upon a library is the number of stars it has received, Used by and Contributors. It essentially represents the number of users who are following, utilizing, and contributing to the library. The higher these three are, the better.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FyfVYB6EXK3fajrKtp_U1g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/778/1*fkqYooUAtsAk7-KZaOfX6A.png" /></figure><h3><strong>The latest release date</strong></h3><p>This indicates whether or not a library is being maintained. You don’t want to rely on a library that is not maintained.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/1*r3D-gRwBETCGEXc0sGhEXw.png" /></figure><h3><strong>Minimum supported iOS and Android versions</strong></h3><p>Clone the repo.</p><p>Android: For this, you need to navigate to build.gradle file in android folder and look for minSdkVersion and verify it with you apps minSdkVersion; it should be either less than or equal to your app’s minSdkVersion</p><p>iOS: Open the project in Xcode.<br>Project &gt; General &gt; Deployment Info to get the minimum supported iOS version.</p><p>If you were lucky, the library’s author would have stated it in the readme on GitHub. Check that it supports the minimum supported versions of your app.</p><h3><strong>Number of open issues on the library</strong></h3><p>This indicates whether or not the library has an active community that is looking into issues with open source projects. Lesser the better.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uoHehn7JJTksf5ELJyYzWw.png" /></figure><p>If all of the above indicators are positive, we can consider proceeding with that library.</p><p>Let me know if there are any other indicators you use while picking a library.</p><p>I hope this helps other developers!</p><p>Follow me on any platform at <a href="http://twitter.com/surajmdurgad">@surajmdurgad</a>.</p><p>Please let me know if it was helpful.</p><p>Until the next time! 👋🏻</p><p>Cheers! 🍻</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=943671cb10c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Off-beat libraries for React Native]]></title>
            <link>https://surajmdurgad.medium.com/off-beat-libraries-for-react-native-e44a405466?source=rss-d5f0c1ac8ad9------2</link>
            <guid isPermaLink="false">https://medium.com/p/e44a405466</guid>
            <category><![CDATA[libraries]]></category>
            <category><![CDATA[react-native-development]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[react-native-library]]></category>
            <category><![CDATA[react-native-developers]]></category>
            <dc:creator><![CDATA[Suraj M Durgad]]></dc:creator>
            <pubDate>Sat, 25 Mar 2023 17:11:33 GMT</pubDate>
            <atom:updated>2023-03-25T18:15:09.597Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KhIs1g-1u_VgAVNbuDGFag.jpeg" /><figcaption>react-native libraries</figcaption></figure><p>Hey there!</p><p>I’m back again.</p><p>This time, I’m attempting to highlight a list of libraries that have saved me a tonne of time and made my life easier as a react-native developer.</p><p>These are a few libraries I’ve accumulated over the last five years, and I wouldn’t hesitate to use them again if the opportunity presented.</p><p>Let’s get this started!</p><h4><a href="https://github.com/react-native-clipboard/clipboard">@react-native-clipboard/clipboard</a></h4><p>If you ever wanted to add the ability to copy and paste text into your app, I can’t think of another library that works as well as this one.</p><p>This library allows you to copy and paste text with a single line of code -</p><pre>// Copy<br>Clipboard.setString(&#39;hello world&#39;);<br><br>// Paste<br>Clipboard.getString();</pre><p>Just like that, you can copy/paste any code from the clipboard.</p><h4><a href="https://github.com/mkuczera/react-native-haptic-feedback">react-native-haptic-feedback</a></h4><p>If you know any iOS fanboy, you’ve probably heard them brag about their phones’ best-in-class vibration feedback. This, is made possible by Apple’s proprietary Taptic engine, which debuted in the iPhone 7. As, with any Apple product, once they’ve gotten used to it, there’s no turning back. You can tap into this taptic engine using react-native-haptic-feedback.</p><pre>ReactNativeHapticFeedback.trigger(&quot;impactLight&quot;, options);</pre><p>Similarly, when a user clicks on a call to action, you can provide sensory feedback with a single line of code.</p><p>I know, that was a very basic example; I’ll leave it to you to get creative. It allows for various levels of customization, such as how strong the vibration should be, how long the vibration should last, and so on. Even Android users would receive vibrations; however, the feedback would be inferior to that of the Taptic engine.</p><h4><a href="https://github.com/corbt/react-native-keep-awake">react-native-keep-awake</a></h4><p>Have you ever had a user complain that their screen turns off while they are using the app, and it’s not your fault because they have set their screen timeout to something like 15 seconds, and if no touch response is received, the system turns off the device’s backlight? If you answered yes, this library is the one for you.</p><pre>// Keep the screen awake<br>KeepAwake.activate();<br><br>// Turn the screen off based on the screen timeout of the device<br>KeepAwake.deactivate();</pre><p>Simply enable the library on componentDidMount and disable it on componentWillUnmount</p><p>Now, if the user is on that specific component, the device’s screen timeout has no effect. Always remember to deactivate the library or you may face repercussions.</p><h4><a href="https://github.com/maxs15/react-native-spinkit">react-native-spinkit</a></h4><p>This is one of those libraries that hasn’t been updated in a long time but still works. Have you ever wanted to animate a loader quickly? If you’re familiar with react-native animations, you know that animations are never quick. This library may be able to save you some time.</p><pre>&lt;Spinner type=&quot;ThreeBounce&quot;/&gt;</pre><p>And in the same way, you can add a three-dot bouncing animation with a single line. You can change the colour, size, and other aspects to make it look presentable in your app, but I hope you get the idea. You can choose from a variety of animations, and the majority of them work on both iOS and Android.</p><h4><a href="https://github.com/react-native-sensors/react-native-sensors">react-native-sensors</a></h4><p>This is one of the most recent libraries I picked. We were attempting to detect the orientation of the users’ devices when they had locked the device’s orientation. If you are having a similar problem, you should look into this library. <br>It exposes all of the sensors available on the device, such as the accelerometer, gyroscope, magnetometer, and barometer, allowing us to add listeners to sensors without relying on system-level settings.</p><pre>// Subscribe<br>const subscription = accelerometer.subscribe(({ x, y, z, timestamp }) =&gt;<br>  console.log({ x, y, z, timestamp })<br>);<br><br>// Unsubscribe<br>subscription.unsubscribe();</pre><p>Similarly, you will be able to tap into the accelerometer of the user’s device and detect the device’s orientation. <br>As you handle any other listeners, always make sure to unsubscribe from the listener when you no longer need it, or else you know where I’m going, repercussions. 😉</p><h4>Bonus</h4><p>Okay, so this isn’t a library, but rather a useful tool that I recently discovered.</p><p>Whenever you try to start a simulator, you have to open Xcode, select a device, and hit run, and if you’re a lazy bum like me, you’d have a shortcut to your Apple simulator in your dock, but the shortcut method doesn’t work for Android Studio, you have to open Android Studio and open the AVD manager, which takes a while.</p><p>I can imagine how aggravating this moment would be if someone were standing right behind you, inspecting your screen for the minor changes you made the day before. Yup, you are not alone. I feel you. This could save your life in such awkward situations.</p><h4><a href="https://github.com/okwasniewski/MiniSim">MiniSim</a></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/896/1*H3IF0vhe1c4ziTUD7dBiiA.png" /><figcaption>MiniSim</figcaption></figure><p>If you install the above menu bar utility, you will be able to access all of your simulators with a single click, and it will work flawlessly. Try it out and you’ll thank me later.</p><p>And that’s all for today!</p><p>Hope you folks like these libraries, feel free to drop the libraries which I should checkout in the comments below, I wouldn’t mind some claps. #shamelessplug</p><p>Follow me on any platform at <a href="http://twitter.com/surajmdurgad">@surajmdurgad</a>.</p><p>Please let me know if it was helpful.</p><p>Until the next time! 👋🏻</p><p>Cheers! 🍻</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e44a405466" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Shake gesture on Android Emulator — react-native]]></title>
            <link>https://surajmdurgad.medium.com/shake-gesture-on-android-emulator-react-native-5a423a9573ec?source=rss-d5f0c1ac8ad9------2</link>
            <guid isPermaLink="false">https://medium.com/p/5a423a9573ec</guid>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[android-studio]]></category>
            <category><![CDATA[react-native-developers]]></category>
            <category><![CDATA[react-native-tutorial]]></category>
            <category><![CDATA[react-native-development]]></category>
            <dc:creator><![CDATA[Suraj M Durgad]]></dc:creator>
            <pubDate>Sat, 17 Sep 2022 06:29:25 GMT</pubDate>
            <atom:updated>2022-09-17T06:38:16.429Z</atom:updated>
            <content:encoded><![CDATA[<h3>Shake gesture on Android Emulator — react-native</h3><p>Hey everyone, I’m back again with a small tutorial to make your life easier as a react-native developer.</p><p>I’m pretty sure you might have faced this screen whenever you tried to run your app on Android Emulator.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cceF0mOWhUIuMnIvg-m3zg.png" /></figure><p>This looks great but the only problem is, your shortcut to shake the screen to open up react native debug tools or the shortcut to rotate your Emulator to landscape or any other shortcuts for that matter wouldn’t work, which is just a deal breaker.</p><p>When you google about it you see all complex suggestion like <br>1. A<a href="https://stackoverflow.com/a/60321066">dding a key-event to your package.json</a><br>2. <a href="https://stackoverflow.com/a/60321066">Setting virtual keyboard</a><br>and many more… and none of those work for their respective reasons.</p><p>So I’ll try to provide you a simple solution to resolve this issue.</p><p>First let’s try to understand the problem, when ever you run the emulator it creates the emulator within the instance of the Android Studio and all the keyboard inputs you enter are received by Android Studio IDE and not the Emulator. That’s the reason the the shortcuts don’t do what they are expected to do. So in order to address this issue the Emulator should be run as a separate instance from IDE to receive those key-events/shortcuts.</p><p>Now how would you do that?</p><p>Step 1—</p><p>Open Preferences/Settings on Android Studio and navigate to Emulator.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1013/1*voqh84S0qtk-OosH4O0Bow.png" /></figure><p>Now deselect the <strong>Launch in a tool window </strong>option which would be enabled by default. If you further read the description of this option you’ll notice it basically starts the emulator as a separate instance / standalone application.</p><p>Step 2 —</p><p>Close all the Emulators if you are running any and restart your IDE.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/405/1*lxULnFOKpuCiRkCo0vFn6Q.png" /></figure><p>Voilà!</p><p>If you have followed the above steps correctly. The next time when you run the Emulator after restarting the IDE by hitting the play button,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/504/1*56SDhQgAQpCc3rlBEW8jSA.png" /></figure><p>it would start a separate instance for the Emulator which would be able to receive all your key board shortcuts which were received by the IDE instead of the Emulator.</p><p>For example —</p><ol><li>In Linux when you hit Cmd + m it opens up debug menu options for react native.</li><li>Cmd + → will rotate your simulator to landscape.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6r1Y9HBfyViW_nVNmTvTmg.png" /></figure><p>Hope this makes your life a tad bit easier, if yes, I wouldn’t mind some claps. #shamelessplug</p><p>Follow me @surajmdurgad on any platform.</p><p>Do let me know if it helped you.</p><p>Until next time! 👋🏻</p><p>Cheers! 🍻</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5a423a9573ec" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Searching for gif in iPhone — WhatsApp]]></title>
            <link>https://surajmdurgad.medium.com/searching-gif-in-iphone-in-whatsapp-405dd0984f87?source=rss-d5f0c1ac8ad9------2</link>
            <guid isPermaLink="false">https://medium.com/p/405dd0984f87</guid>
            <category><![CDATA[iphone]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[whatsapp]]></category>
            <category><![CDATA[gif]]></category>
            <category><![CDATA[giphy]]></category>
            <dc:creator><![CDATA[Suraj M Durgad]]></dc:creator>
            <pubDate>Sat, 14 May 2022 12:23:49 GMT</pubDate>
            <atom:updated>2022-05-14T13:21:49.941Z</atom:updated>
            <content:encoded><![CDATA[<p>I know this might sound trivial, but being an iPhone user for past 2–3 years, I was not able to figure this out until yesterday.</p><p>Also it was interesting that when ever I searched for <strong>“Searching for gif in iPhone in WhatsApp” </strong>on Google, there were no articles and all of them talked about using gifs in <strong>iMessage </strong>even though WhatsApp has a huge user base on iPhone at least in asian countries.</p><p>So here I am, trying to make a small tutorial and you don’t need to install any app for that, it’s in built in WhatsApp, so let’s get started.</p><p><strong>Step 1 — <br></strong>Open your default keyboard and click on the icon highlighted in the below image</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*N_n5242xH-IInN0rmFX-Eg.png" /></figure><p><strong>Step 2 — <br></strong>Click on the search icon on the bottom left corner of the screen as highlighted in the below screenshot</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*-GpdX7lU5Am8M2-XJ2XWaw.png" /></figure><p><strong>Step 3 —<br></strong>Now you can enter what ever gif you want to search in the search bar, it’s just that simple, I now how dumb it is, but don’t worry you are not alone. 😉</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*KwWQU0dKLKdiYwyYO8VHRA.png" /></figure><p>Also this is powered by giphy so probably that would be the best place for you to search for the most accurate gif you are looking for.</p><p>Hope this helps someone like me. <br>Cheers! 🍻</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=405dd0984f87" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Functional components vs Class components in react native]]></title>
            <link>https://surajmdurgad.medium.com/function-components-vs-class-components-in-react-native-8f44f9d0d9ed?source=rss-d5f0c1ac8ad9------2</link>
            <guid isPermaLink="false">https://medium.com/p/8f44f9d0d9ed</guid>
            <category><![CDATA[class-component]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[react-native-development]]></category>
            <category><![CDATA[react-native-developers]]></category>
            <category><![CDATA[functional-component]]></category>
            <dc:creator><![CDATA[Suraj M Durgad]]></dc:creator>
            <pubDate>Sat, 23 Apr 2022 09:31:25 GMT</pubDate>
            <atom:updated>2022-04-24T05:32:53.556Z</atom:updated>
            <content:encoded><![CDATA[<p>Lately, I’ve been hearing a lot about functional components, some even asked me, <strong>“why are you still using class components?”</strong><br>This made me curious whether am I missing something, so as usual I started getting my hands dirty, went through a couple of blogs, tested out couple of cases, tried it out myself and here I am.</p><p>Before we move forward just to set context, the easiest way you could increase the performance of a react-native app is to reduce the number of re-renders. <strong>The performance of a react-native app is inversely proportional to number of re-renders.</strong></p><p>I built a basic UI to test out the features -</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/846/1*GT323W0Qf2OjShT-Eu_o5A.png" /></figure><p>Class Component —</p><pre>import React from &#39;react&#39;;<br>import {View, Text, Button} from &#39;react-native&#39;;<br>import PropTypes from &#39;prop-types&#39;;</pre><pre>import Styles from &#39;./styles&#39;;</pre><pre>export default class ClassComponent extends React.PureComponent {<br>static propTypes = {};</pre><pre>constructor(props) {<br>  super(props);<br>  console.log(&#39;constructor&#39;);<br>  this.renderCount = 0;</pre><pre>  this.state = {<br>    num1: 0,<br>    num2: 0,<br>  };</pre><pre>  this.updateState = this._updateState.bind(this);<br>}</pre><pre>_updateState() {<br>   this.setState(prevState =&gt; {<br>    return {<br>      num1: prevState.num1 + 1,<br>      num2: prevState.num2 + 1,<br>    };<br>   });<br>}</pre><pre>render() {<br>  this.renderCount += 1;</pre><pre>  console.log(&#39;this.renderCount&#39;,this.renderCount, this.state.num1,   this.state.num2 );</pre><pre>  return (<br>     &lt;View style={[Styles.componentContainer,  {backgroundColor:&#39;skyblue&#39;}]}&gt;<br>      &lt;Text&gt;Class Component&lt;/Text&gt;<br>      &lt;Button title={&#39;updateState&#39;} onPress={this.updateState} /&gt;<br>     &lt;/View&gt;<br>  );<br>}</pre><pre>}</pre><p>Functional Component —</p><pre>import React, {useState} from &#39;react&#39;;<br>import {View, Text, Button} from &#39;react-native&#39;;<br>import PropTypes from &#39;prop-types&#39;;<br>import Styles from &#39;./styles&#39;;</pre><pre>let renderCount = 0;</pre><pre>const FunctionalComponent = () =&gt; {</pre><pre>const [num1, setnum1] = useState(0);<br>const [num2, setnum2] = useState(0);</pre><pre>function updateState() {<br>  setnum1(num1 + 1);<br>  setnum2(num2 + 1);<br>}</pre><pre>renderCount += 1;</pre><pre>console.log(&#39;renderCount functional component&#39;, renderCount, num1, num2);</pre><pre>return (<br>  &lt;View style={Styles.componentContainer}&gt;<br>    &lt;Text&gt;Functional Component&lt;/Text&gt;<br>    &lt;Button title={&#39;updateState&#39;} onPress={updateState} /&gt;<br>  &lt;/View&gt;<br>);<br>};</pre><pre>export default FunctionalComponent;</pre><p>So when I clicked on the button updateState, it basically logs that how many times the component renders.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/790/1*4WSOMTWfywlL8kmmrEwtEQ.png" /></figure><p>This looks amazing, it basically renders simultaneously just like class components, but wait, when do we ever update the state without a network call?</p><p>So, I updated the updateState function as follows in functional component</p><pre>async function updateState() {<br>  Promise.resolve().then(() =&gt; {<br>    setnum1(num1 + 1);<br>    setnum2(num2 + 1);<br>  });<br>}</pre><p>and as follows in class component to simulate a network request.</p><pre>Promise.resolve().then(() =&gt; {<br>  this.setState(prevState =&gt; {<br>    return {<br>     num1: prevState.num1 + 1,<br>     num2: prevState.num2 + 1,<br>    };<br>  });<br>});</pre><p>This is the result obtained -</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/788/1*_oiWo4cEEJoSh2oDrCSZjw.png" /></figure><p>If you notice the functional component is rendering twice for each useState</p><p>Let me just not bore you with all the other diggings I did and just get to the point, here are the advantages and disadvantages of using Functional components—</p><p><strong>Advantages -</strong></p><ol><li>Writing less code, example in place of 26 lines you would be writing 16 because you would be avoiding defining the life cycle methods like componentDidMount componentDidUpdate etc.</li><li>Freshers tend to feel it’s easier to understand but once the project starts getting complex I don’t feel this would be a valid point.</li></ol><p><strong>Disadvantages -</strong></p><ol><li>useState re-renders components for each state when you are trying to update it in a async request, you’ll have to handle it in a hacky way again with useReducer</li><li>There is no concept of constructor and constructor is powerful function which most of the developers don’t realise, you can write resource intensive calculation once in this function and reuse the same logic without wasting time in recalculating it every time the component mounts.</li></ol><p>Here are the advantages and disadvantages of using Class components —</p><p><strong>Advantages -</strong></p><ol><li>You have complete control over the re-renders</li><li>In setState you can change multiple states with a single re-render</li></ol><p><strong>Disadvantages -</strong></p><ol><li>There is a learning curve for understanding lifecycle methods</li><li>Lines of code would increase marginally.</li></ol><p><strong>This made me wonder why this ambiguity was introduced in the first place? Why are there two ways to define a component?</strong> <br>so I started digging the history of React to figure out when and why functional components were introduced.</p><p><strong>Here’s what I understood —</strong></p><ol><li>Functional components were developed to be stateless components.</li><li>Hooks are like <strong>hacks</strong> to make a functional component stateful and that’s the reason why they were introduced later.</li><li>Hooks is basically trying to replicate class component and on the contrary class components were built to be stateful hence it supports the lifecycle methods.</li></ol><p><strong>Conclusion —</strong></p><p>I feel it’s just a choice of writing more lines of code with better control or to write less lines of code with less control.</p><p>I would rather concentrate on providing a quality product with more lines of code than thinking about making my life easier at the cost of control over the product I’m trying to build.</p><p><strong>“So Yes, I would choose Class components over Functional components until there is a valid reason to use it.”</strong></p><p><strong>Now you might also ask me why functional components are pushed by React, and why are most of the tutorials using hooks?</strong></p><p>The only logical answer which I could come up for that is,</p><ol><li>It feels easier to explain hooks in a tutorial to a new developer when compared to lifecycle methods of a class component. It feels easy to understand as well for someone new to the platform which would encourage the new developers to start using it.</li><li>As new developers start using it, React’s user base increases which is like the main agenda for any platform.</li></ol><p>Hope this helps you decide what to choose depending on your requirement. Do share it with your fellow developers.</p><p>Feel free to let me know if I’m missing anything.</p><p>I would love to learn.</p><p>Cheers! 🍻</p><p><strong>Resources that helped me to come to the above conclusion —</strong></p><ul><li><a href="https://dev.to/bytebodger/constructors-in-functional-components-with-hooks-280m">Constructors in Functional Components With Hooks</a></li><li><a href="https://stackoverflow.com/questions/53048495/does-react-batch-state-update-functions-when-using-hooks">Does React batch state update functions when using hooks?</a></li><li><a href="https://www.geeksforgeeks.org/differences-between-functional-components-and-class-components-in-react/">Differences between Functional Components and Class Components in React - GeeksforGeeks</a></li><li><a href="https://flatlogic.com/blog/functional-components-vs-class-components-in-react-js/">Functional Components vs. Class Components in React.js - Flatlogic Blog</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8f44f9d0d9ed" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mining cryptos from your laptop]]></title>
            <link>https://medium.com/cryptostars/mining-cryptos-from-your-laptop-926cb1767573?source=rss-d5f0c1ac8ad9------2</link>
            <guid isPermaLink="false">https://medium.com/p/926cb1767573</guid>
            <category><![CDATA[crypto]]></category>
            <category><![CDATA[mining]]></category>
            <category><![CDATA[cryptominig]]></category>
            <category><![CDATA[laptop]]></category>
            <category><![CDATA[side-hustle]]></category>
            <dc:creator><![CDATA[Suraj M Durgad]]></dc:creator>
            <pubDate>Sun, 27 Feb 2022 08:34:08 GMT</pubDate>
            <atom:updated>2022-04-16T06:54:20.804Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a1-XlFla8r-JswnodOW-rQ.png" /></figure><p>Yes, you just read that right, you can mine from your personal laptop. How much can you earn, is it worth it?</p><p>I tried mining on 3 different devices for about 24 hours —</p><ol><li><a href="https://support.apple.com/kb/SP754?locale=en_IN">MacBook Pro 2017</a></li><li><a href="https://www.apple.com/in/macbook-pro-14-and-16/specs/">MacBook Pro M1 Pro Base Model 2020</a></li><li><a href="https://www.msi.com/Laptop/GE62VR-6RF-Apache-Pro/Specification">MSI GE62VR 6RF Apache Pro</a></li></ol><p>How much did I make? Well let’s say nothing significant, you’ll have to read till the end to know the exact numbers.</p><p>By going to <a href="https://unmineable.com/coins">unmineable.com</a>, you can connect your laptop/PC to mining pools with very minimal setup, you don’t have to dedicate an entire device solely for mining which is basically called as solo mining.<br>I’ll let you do your research regarding pool and solo mining, but for the sake of time let’s consider pool mining is where you and your friend work as a single entity to solve a problem.</p><p>You have close to 60–70 coins that can be mined from unmineable’s pools. I tried to mine Ethereum. You can choose which ever coin you want that’s available on unmineable.</p><p>In unmineable’s pools you can mine cryptos in 2 different ways -</p><ol><li><strong>Using CPU </strong>— Devices which don’t have heavy GPU like <br>MacBook Pro 2017 / MacBook Pro M1 Pro<strong>( RandomX )</strong></li><li><strong>Using GPU — </strong>( Which can have better returns than CPU )</li></ol><ul><li>Using GPU with 3GB VRAM —<strong> ( Kawpow, Etchash )</strong></li><li>Using GPU with 6GB VRAM like MSI GE62VR 6RF Apache Pro <strong>( Ethash )</strong></li></ul><p>You can use this <a href="https://unmineable.com/coins/ETH">link</a> to set up your laptop to mine ETH.</p><p>They have detailed explanation on the steps how to setup and the softwares you need to download. It took 20 mins to set up my first endpoint. It’s fairly straight forward.</p><p>Before you continue to setup you need to have a respective crypto wallet which you intend to mine.</p><p>Now, once you have started mining you can see your workers running in workers section by going through this <a href="https://unmineable.com/coins/ETH/address">link</a> and entering the wallet address you used while setting up the endpoint.</p><p>You’ll notice h value for RandomX and mh for Ethash, Etchash and KowPow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/362/1*qQ7aGdQuXb35hedRGq90uA.png" /></figure><p>You can enter those values in the following calculator available in this <a href="https://unmineable.com/coins/ETH">link</a>.</p><p>So here are the numbers for my 3 devices I tried to mine on —</p><ol><li>MacBook Pro 2017 was <strong>775h = </strong>0.00000662ETH per day.</li><li>MacBook Pro M1 Pro was <strong>2047h = </strong>0.00001751ETH per day.</li><li>MSI GE62VR was <strong>15Mh = </strong>0.0001736ETH per day.</li></ol><p>So the moment all you guys were waiting for, how much can these number end up to be in real money?</p><ol><li>MacBook Pro 2017 = 1.35 INR per day = 40.5 INR per month</li><li>MacBook Pro M1 Pro = 3.61 INR per day = 108.3 INR per month</li><li>MSI GE62VR = 35.77 INR per day = 1073.1 INR per month</li></ol><p><strong>Please note —</strong></p><ul><li>Once you start mining it shows a higher hash values but it would reduce over time. For instance my 2017 MacBook was showing <strong>1087h</strong> when I started it initially.</li><li>The numbers you see above are from running a device for 24 hours straight, without any break in between.</li></ul><h3><strong>Conclusion</strong></h3><p>The best part of running an end point for a pool is you don’t have to loose the basic functionality of your existing device, for example I used my MacBook Pro 2017 for daily browsing, watching youtube which wasn’t effected, mining was running in the background.</p><p>The worst part is the amount of heat and fan noise you need to bare is a bit to intense in my opinion, the room in which my MSI was setup felt like a hotbox thanks to GPU mining, even though I had a fan running under the laptop and having proper ventilation for the room. CPU mining is also no different.</p><p>This made me realise the amount of energy required to mine these cryptos and maintaining them. If you ask me personally until we have breakthrough technology to mine them way more efficiently I don’t think it makes sense to mine them at least in India where we already have an ambient temperature of around 25–30°C and devices get super hot easily which in turn reflects on the mining efficiency of your device.</p><p>So to conclude, I think this is not the right time to get into mining from your daily drivers unless you are ready to invest some money or you have a useless device which is just lying around and you have the patience to bare the heat and noise.</p><p>When ever you are mining your CPU’s would be used at their 100%, you might see a lag or a buffer here and there.</p><p>Even though you have options to control the cores to be involved in mining, the returns you would be receiving would be lesser than the above numbers since those were obtained by assigning 100% of the CPU / GPU.</p><p>One more point to note, unmineable has a threshold amount after which it would be transferred to your wallet, for ETH it’s around 0.05ETH and they have a mining fees of 1%.</p><p>The only monetary value I see in the above approach is you mine the cryptos today and expect the value of the crypto you mined to increase over time.</p><p>The amount of money I made in 24hrs?<br>0.00023284 ETH = 47.98 INR</p><p>It’s just hilarious to see the amount of electricity, heat and noise to have to bare for the returns.</p><p>On that note, let me know if you liked the numbers you saw? Are you planning to give it a try? What could have been done better?</p><p>Feel free to drop a clap if you found this informative #shamelessplug and share it with someone who’s thinking to get into mining.</p><p>Cheers! 🍻</p><figure><a href="https://www.buymeacoffee.com/surajmdurgad"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lviQAsrtgJB0dMiercB9ig.png" /></a></figure><figure><a href="https://ko-fi.com/surajmdurgad"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DfdvnW1k2cMM9Z3wcomTfg.png" /></a></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=926cb1767573" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cryptostars/mining-cryptos-from-your-laptop-926cb1767573">Mining cryptos from your laptop</a> was originally published in <a href="https://medium.com/cryptostars">CryptoStars</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[VS Code extensions for react-native]]></title>
            <link>https://surajmdurgad.medium.com/vs-code-extensions-for-react-native-3cd2e672b0b2?source=rss-d5f0c1ac8ad9------2</link>
            <guid isPermaLink="false">https://medium.com/p/3cd2e672b0b2</guid>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[vscode]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[react-native-development]]></category>
            <category><![CDATA[vscode-extension]]></category>
            <dc:creator><![CDATA[Suraj M Durgad]]></dc:creator>
            <pubDate>Sun, 13 Feb 2022 06:23:21 GMT</pubDate>
            <atom:updated>2022-04-16T06:22:31.505Z</atom:updated>
            <content:encoded><![CDATA[<h3>VSCode extensions for react-native</h3><p>I’ve been working on react-native for past 4 years, here are a list of VSCode extensions I found over time without which my life would have been a tad more complicated. I’ll try to avoid the most common one’s since probably you might have already been using it like <a href="https://marketplace.visualstudio.com/items?itemName=msjsdiag.vscode-react-native">React Native Tools</a>, <a href="https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint">ESLint</a>, <a href="https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode">Prettier</a>. <br>Let’s get started!</p><ol><li>GitLens —</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/789/1*-Rti_2-HKfmkOP2Pnm2bUA.png" /><figcaption><a href="https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens">https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens</a></figcaption></figure><p>When you are working in a team, this is a must have extension.<br>The reason I love this extension is that when you highlight a line it shows the the commit which changed the line and the time when it was changed. Which is just so important when you are trying to debug an issue.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Dbdpounk1H9KnDxtBJAb2A.png" /><figcaption>Just like this</figcaption></figure><p>There are so many other features available in this extension, I’ll let you explore the rest.</p><p>2. Bracket Pair Colorizer —</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/677/1*k6cGJSG_viVR_Rkv28lxCQ.png" /><figcaption><a href="https://marketplace.visualstudio.com/items?itemName=CoenraadS.bracket-pair-colorizer">https://marketplace.visualstudio.com/items?itemName=CoenraadS.bracket-pair-colorizer</a></figcaption></figure><p>This extension highlights the starting and ending brackets with same color, which makes it so easy to debug huge file or a huge json response.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nhERPOC38sMYtoA4a7FOHg.png" /></figure><p>3. Color Highlight —</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/680/1*qv3HugR9lDXVZyTs9vgB3A.png" /></figure><p>It is one of those extension which would be super helpful when you are working with the designers, imagine you are sharing your screen and trying to show the color which you have used in your VSCode, it highlights the hexcode or rgba code with its actual color. Something like</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/461/1*o1GXzZzH_KWgLj9srLh66g.png" /><figcaption>this</figcaption></figure><p>4. Code Spell Checker —</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/785/1*j5qfyudkcqBkUudFs1_86A.png" /><figcaption><a href="https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker">https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker</a></figcaption></figure><p>If you are like me, one of those guys when concentrating on the logic his/her word sense goes to toss, this extension is for you. In the spree of finishing up your logic block you end up making typos like below which gets highlighted in blue as soon as you type it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/519/1*_WFqYjb2y-QcctX7c2ePDg.png" /></figure><p>This extension has helped me not look down upon my past self. If you know what I mean. 🤷‍♂</p><p>5. Code snapshot —</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/604/1*Imv2oYarifcJGybeUC-Giw.png" /><figcaption><a href="https://marketplace.visualstudio.com/items?itemName=robertz.code-snapshot">https://marketplace.visualstudio.com/items?itemName=robertz.code-snapshot</a></figcaption></figure><p>You might have seen some code samples online from other developers which look fancy of social media and might have wondered like me — “This must have been created in Photoshop, damn these guys are putting so much effort on just a post.”<br>Nope, that’s not how it’s done. It’s done using the above library. You can just highlight the lines of code and take a snap of your code which would look something like this —</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-N458AsjJsX1CH7Cojcxkw.png" /></figure><p>There is an option to change the background color as well. It’s a cool extension to have if you are into posting your code in social media.</p><p>6. VSCode React Refactor —</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/665/1*WeiDkoejaf8rRu-r3EH6tQ.png" /><figcaption><a href="https://marketplace.visualstudio.com/items?itemName=planbcoding.vscode-react-refactor">https://marketplace.visualstudio.com/items?itemName=planbcoding.vscode-react-refactor</a></figcaption></figure><p>Last but not least this one of the best and functional extension which saved a lot of time for me. Using it you can convert a block of code to a component or move it to a function which cleans up the code. The best part is it helps you convert the code into both a functional component or class component.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/610/1*WkA9S5woK_h_CiDlkn8mRQ.png" /></figure><p>When you highlight the code you want to convert it into a function or class, just highlight the text and click on the bulb next to the text, you’ll see the above options using which it creates a function or component for you instead of you moving the code manually.</p><p>Hope you liked the above extensions, if yes do share the link with your fellow developers and I wouldn’t mind some claps. #shamelessplug</p><p>Do let me know if I’m missing any extensions which I should take a look at.</p><p>Cheers! 🍻</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lviQAsrtgJB0dMiercB9ig.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3cd2e672b0b2" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>