<?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: Saaransh Gupta</title>
    <description>The latest articles on Forem by Saaransh Gupta (@saaransh_gupta_1903).</description>
    <link>https://forem.com/saaransh_gupta_1903</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%2F1942818%2Fab706110-a751-4a5a-b8d4-03fccc539731.jpg</url>
      <title>Forem: Saaransh Gupta</title>
      <link>https://forem.com/saaransh_gupta_1903</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/saaransh_gupta_1903"/>
    <language>en</language>
    <item>
      <title>First Mile With Meesho</title>
      <dc:creator>Saaransh Gupta</dc:creator>
      <pubDate>Tue, 06 Jan 2026 19:31:47 +0000</pubDate>
      <link>https://forem.com/saaransh_gupta_1903/first-mile-with-meesho-3mi9</link>
      <guid>https://forem.com/saaransh_gupta_1903/first-mile-with-meesho-3mi9</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;I’m Saaransh Gupta, an undergraduate at Thapar University and currently an SDE Intern at Meesho. For a bit of context, Thapar is a Tier 2 institute located in Patiala, Punjab, offering a diverse range of courses across engineering, sciences, mathematics, and liberal arts. I am part of the Class of 2026, pursuing my Bachelor’s in Computer Engineering.&lt;/p&gt;

&lt;p&gt;The recruitment process for our six-month internship began in August 2025. Meesho was among the first companies to arrive on campus, scouting for SDE-1, Data Science, and Business Analyst roles.&lt;/p&gt;

&lt;p&gt;My journey with Meesho has been as smooth as it could be so far. The company focuses heavily on creating people-centric policies and workflows, ensuring everyone feels truly valued within the company culture.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Pre-Onboarding
&lt;/h2&gt;

&lt;p&gt;My interview process wrapped up in the first week of August, followed by regular communication from the Campus Onboarding team via email. They truly prioritize the candidate experience, you can expect greetings for every festival and consistent relationship-building through emails from the moment you receive your hiring confirmation.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Perks
&lt;/h3&gt;

&lt;p&gt;The perks start rolling in from the point of hiring. Meesho covered my flights via Air India Express and my first 14 days of accommodation at the Fairfield by Marriott in Bangalore, which is a fantastic stay located right near the office. They also provide relocation assistance, which you can reclaim once you formally join the company.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Onboarding
&lt;/h2&gt;

&lt;p&gt;On your first day, you are introduced to the top management, who dive into the quirky and unique ways Meesho operates. They set clear expectations and provide your first real insights into how a major corporate organization functions.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Perks
&lt;/h3&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%2Fjkx3130654udwcpz63vz.jpeg" 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%2Fjkx3130654udwcpz63vz.jpeg" alt="Onboarding Kit" width="800" height="751"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Credits: &lt;a href="https://www.linkedin.com/posts/bhanu-singh-405581249_meesho-lifeatmeesho-sdeintern-ugcPost-7414018661268615168-3EHL?utm_medium=ios_app&amp;amp;rcm=ACoAACaYrdcB8X2hx3zTX9B2Z8lgtOaJ38W1TMg&amp;amp;utm_source=social_share_send&amp;amp;utm_campaign=whatsapp" rel="noopener noreferrer"&gt;LinkedIn Post&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Naturally, you get an onboarding kit to kickstart your first day. You can check out the LinkedIn post above to see the full contents. Everyone receives a laptop tailored to their specific profile; I was set up with a Mac M4 Pro on day one.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Fun
&lt;/h3&gt;

&lt;p&gt;The campus onboarding team ensures you settle in perfectly, making sure you’re fully immersed in the "Meesho Experience." They plan sessions with the CEOs, Directors, and Vice Presidents to introduce the company’s way of working and what makes it great. If time permits, they even keep things lively with interactive fun sessions.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Office
&lt;/h3&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%2Ff30mv5tqwlh9b4bn1qum.jpeg" 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%2Ff30mv5tqwlh9b4bn1qum.jpeg" alt="Office Inside" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fctadg9jd4xxgt06a2krv.jpeg" 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%2Fctadg9jd4xxgt06a2krv.jpeg" alt="Tower Building" width="800" height="1422"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;By far the best part is the office itself. It is equipped with top-tier tech, of course, but there are also gaming stations, pool tables, TT corners, and even a golf turf. The tech park where Meesho is located is beautifully designed and aesthetically perfect for some night photography.&lt;/p&gt;

&lt;p&gt;I am currently in the middle of the onboarding sessions and busy exploring everything the campus has to offer. I’ll be writing more about my time at Meesho as I grow with the company.&lt;/p&gt;

</description>
      <category>meesho</category>
      <category>bangalore</category>
      <category>induction</category>
      <category>hiring</category>
    </item>
    <item>
      <title>Music by Machines: Can AI Be a Better Musician Than Me?</title>
      <dc:creator>Saaransh Gupta</dc:creator>
      <pubDate>Sun, 29 Jun 2025 22:21:23 +0000</pubDate>
      <link>https://forem.com/saaransh_gupta_1903/music-by-machines-can-ai-be-a-better-musician-than-me-1925</link>
      <guid>https://forem.com/saaransh_gupta_1903/music-by-machines-can-ai-be-a-better-musician-than-me-1925</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;I’ve dreamt of being a musician since I was a kid. Picked up a guitar in school, fell in love with the fretboard, and actually got pretty decent. But there was always one missing note — I couldn’t sing. So whenever I wanted to jam or write something original, I was dependent on others. In college, that just didn’t click no musical partners in crime, no impromptu jam nights, just me and a dusty guitar that knew too many solos but no chorus.&lt;/p&gt;

&lt;p&gt;But I’ve always been fascinated not just by music, but the technology behind music, the tools, the plugins, the digital alchemy. I’d open up Fruity Loops (FL Studio), mess with synths I didn’t understand, build weird beats at 2 AM, and feel like a broke Daft Punk in a dorm room but then came AI!&lt;/p&gt;

&lt;p&gt;A couple of years back, I tried some early AI music tools, hoping they could fill in what I couldn’t sing, but the output? Robotic, flat, more comedy than composition. So I shelved the dream again but time went by and AI got better and better. Here's how I composed and produced a full track using just AI&lt;/p&gt;

&lt;h2&gt;
  
  
  The Setup
&lt;/h2&gt;

&lt;p&gt;So, for a song I needed lyrics, a tune to sing to, the background music and some fun beats. I decided to go with a heartfelt and sad kind of vibe the lyrics were generated by ChatGPT using the prompt.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Suppose you are heartbroken, and your recent partner has left you for someone else, you sit beside a glass window and look at the buildup of dark clouds above you. It's not soon that its start raining and the raindrops splash on the glass in front of you. personify the raindrops as tears and correlate the darkness with the sadness in your heart. Write me a song with a verse, chorus and a bridge&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The result was pretty good fora starter&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[Verse]
The rain taps like a quiet friend
But it don’t heal or make amends
I stare at clouds that cry for me
They know the pain they see
They see

[Bridge]
The glass is cold like my own skin
It keeps the storm from rushing in
But I’m alone
No hand to hold
Just faded warmth that’s growing cold

[Chorus]
Raindrops fall
They trace her name
Each one a whisper
Each one the same
She’s gone
She’s gone
No coming back
Her love’s a shadow
My heart’s cracked
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  The Beats
&lt;/h2&gt;

&lt;p&gt;Next came the beats. For that, I turned to Suno AI V3.5, a tool that feels less like software and more like a collaborator with infinite patience. Sure, I could have whipped up a full track with a single prompt but where’s the soul in that? Music isn’t a vending machine. I didn’t want an instant pop song, I wanted fingerprints on every bar.&lt;/p&gt;

&lt;p&gt;So I went modular. Built the song in pieces: a synth line, a drumbeat. Some parts thumped, some shimmered, some clashed like drunk jazz musicians at a techno rave. Turns out, not everything plays nice out of the box, keys didn’t match, tempos were all around the place. But that’s part of the charm. Ten minutes (and a few facepalms) later, everything locked in. The patchwork started to sound like a pulse, and it was time to stich everything together.&lt;/p&gt;

&lt;h2&gt;
  
  
  Stitching the Soundscape
&lt;/h2&gt;

&lt;p&gt;Opening FL Studio after all this time felt like stepping into an airplane cockpit, dials, knobs, waveforms blinking like runway lights. Overwhelming, but oddly familiar. Maybe it was muscle memory, maybe just stubborn passion, but within minutes I was slicing, looping, layering.&lt;/p&gt;

&lt;p&gt;The loop came together like an old friend showing up at your doorstep, unexpected, but just right. A rhythm started breathing, a groove took shape.&lt;/p&gt;

&lt;p&gt;Give it a listen — this is where the track started to breathe.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://suno.com/song/4f758105-f228-42a7-89fd-c96362a58136" rel="noopener noreferrer"&gt;Raindrops by Saaransh Gupta&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  So, How Close Is AI to Making &lt;em&gt;Real&lt;/em&gt; Music?
&lt;/h2&gt;

&lt;p&gt;AI in music is like a brilliant intern — fast, surprisingly talented, but not quite ready to headline a tour. It can craft beats in seconds, mimic genres with eerie precision, and even hum a tune that fits your lyrics like a glove. In some styles, like ambient, synthpop, or trap, it's more than decent. It's impressive.&lt;/p&gt;

&lt;p&gt;But then, something’s missing.&lt;/p&gt;

&lt;p&gt;The persona.&lt;/p&gt;

&lt;p&gt;The chorus doesn’t rise. It doesn't mean more than the verse. The beats feel like background music at a trendy café, fine, functional, but flat. There's no drama, no tension and release, no moment where the track takes a breath before punching you in the chest.&lt;/p&gt;

&lt;p&gt;Sure, it's a great tool for writers. If you want to hear how your lyrics might sound on a melody, it’ll show you the shape. But for the passionates, the obsessive knob-tweakers it might feel like a step back. The wrinkles are still there. AI doesn’t really understand keys or tempo yet. It fakes it well, but you'll often find yourself fixing mismatched notes like a music mechanic.&lt;/p&gt;

&lt;p&gt;Still, it’s getting better. Faster than most of us can keep up.&lt;/p&gt;

&lt;p&gt;So maybe one day, it’ll compose with conviction. But for now, AI makes music like a clever ghost present, echoing, but not quite alive.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>music</category>
      <category>gpt3</category>
      <category>productivity</category>
    </item>
    <item>
      <title>The Illusion of Thinking</title>
      <dc:creator>Saaransh Gupta</dc:creator>
      <pubDate>Fri, 27 Jun 2025 20:10:09 +0000</pubDate>
      <link>https://forem.com/saaransh_gupta_1903/the-illusion-of-thinking-5a69</link>
      <guid>https://forem.com/saaransh_gupta_1903/the-illusion-of-thinking-5a69</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;The large language models of 2025 feel like an entirely different species compared to their early incarnations in late 2022. What once seemed like clever toys have evolved into essential companions in daily life, helping with everything from crafting poems to debugging code, often outperforming beginners and even seasoned professionals in certain tasks.&lt;/p&gt;

&lt;p&gt;Interacting with them now feels like having a personal oracle at your side; a silent advisor that appears to know more about the world than any one person possibly could. These systems have become near-perfect echoes of human knowledge. They conjure the ancient myth of Galatea—a statue so exquisitely sculpted, it seemed to come alive.&lt;/p&gt;

&lt;p&gt;And that is where the unsettling question emerges: Are we witnessing the birth of a real mind, beginning to think for itself? Or are we simply staring into an extraordinary mirror—one that has learned human patterns so precisely that it simulates &lt;strong&gt;thought&lt;/strong&gt; with uncanny realism?&lt;/p&gt;

&lt;p&gt;Either answer is profound. Whether we're creating a new form of intelligence or merely the perfect illusion of one, we are forced to confront a deeper truth. This article will explore the powerful and persuasive &lt;strong&gt;'illusion of thinking'&lt;/strong&gt; created by Large Language Models. We'll argue that these systems are not nascent minds but masters of linguistic form—incredibly sophisticated mimics that have learned the patterns of human expression without understanding its meaning. And we'll explain why knowing the difference is crucial.&lt;/p&gt;

&lt;h2&gt;
  
  
  How LLMs Really work?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnuq7d3e5wq386n05cc6c.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%2Fnuq7d3e5wq386n05cc6c.png" alt="LLM Model working"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At their core, large language models (LLMs) function much like an advanced form of autocomplete. They're designed to predict the next word in a sequence based on the context of the words that came before. But unlike traditional autocomplete, LLMs are context-aware and powered by self-attention mechanisms. They don’t just guess blindly they sift through and synthesize patterns learned from billions of human-written and human-generated examples we have generated since our existence.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;When you ask a language model a question, you're not tapping into a mind—you're activating a mirror trained on the world's words.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In simple terms, generative AI doesn’t "think" in the way humans do. Instead, it excels at pattern matching, spotting statistical relationships in the data it’s been trained on. This becomes evident when you push an AI into less-charted territory. Ask it to generate something uncommon like a detailed image of a left-handed person and the cracks begin to appear. These edge cases reveal that it’s not a mind thinking independently, but a mirror reshaping familiar patterns into plausible illusions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Ideas That Pull Back the Curtain
&lt;/h2&gt;

&lt;h3&gt;
  
  
  The Chinese Room Experiment
&lt;/h3&gt;

&lt;p&gt;This classic philosophical thought experiment by John Searle drives a wedge between simulating understanding and actually understanding.&lt;/p&gt;

&lt;p&gt;Imagine a person locked in a room with nothing but a handbook written in his native language and a set of Chinese symbols. The handbook outlines how he can manipulate Chinese symbols and create new ones. now imagine a Chinese person outside the room and looking at just the input and output, the sense of understanding to some extent appears in the outputs and LLMs just do it in a perfectly statistical way!&lt;/p&gt;

&lt;h3&gt;
  
  
  The Missing Word Model
&lt;/h3&gt;

&lt;p&gt;LLMs have no &lt;strong&gt;internal sense of reality&lt;/strong&gt;. As humans we are trained to process concepts like gravity, emotions and time since our birth, and this goes for hundreds of languages humans talk in the entire world. LLMs know &lt;em&gt;a glass shatters when dropped&lt;/em&gt; because in the billions of training examples they have seen the words &lt;strong&gt;glass&lt;/strong&gt;, &lt;strong&gt;drop&lt;/strong&gt; and &lt;strong&gt;shatter&lt;/strong&gt; appear together. As humans we process this sentence with a sense of gravity, we know why a glass falls and what shattering really means but for an LLM this is just a triad of words.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why is it important if it works?
&lt;/h2&gt;

&lt;p&gt;Many ask: if large language models work so well as fluent assistants for writing, coding, and ideation—why should we care how they work? The answer lies not in their capabilities today, but in the risks they pose tomorrow. These models don’t understand the world; they remix language based on patterns in massive datasets. They don’t know truth only what sounds statistically likely.&lt;/p&gt;

&lt;p&gt;That becomes dangerous when they're trained on flawed or biased data. Even a small oversight a dataset filled with misinformation can lead to confident, well-phrased lies. And because humans are often swayed by tone, not accuracy, a polished but incorrect AI response can easily shape opinions, beliefs, even behavior. We trust what sounds right—even when it isn’t.&lt;/p&gt;

&lt;p&gt;So the real concern isn’t just whether these tools can be misused it’s who decides what they’re allowed to learn. Those building them understand the risks, but will they act responsibly? Because once a flawed idea is spoken by a machine millions trust, it spreads like truth—and it may be too late to correct the echo.&lt;/p&gt;

&lt;h2&gt;
  
  
  Must Read
&lt;/h2&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
      &lt;div class="c-embed__body flex items-center justify-between"&gt;
        &lt;a href="https://arxiv.org/pdf/2506.06941" rel="noopener noreferrer" class="c-link fw-bold flex items-center"&gt;
          &lt;span class="mr-2"&gt;arxiv.org&lt;/span&gt;
          

        &lt;/a&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
      &lt;div class="c-embed__body flex items-center justify-between"&gt;
        &lt;a href="https://proceedings.neurips.cc/paper_files/paper/2017/file/3f5ee243547dee91fbd053c1c4a845aa-Paper.pdf" rel="noopener noreferrer" class="c-link fw-bold flex items-center"&gt;
          &lt;span class="mr-2"&gt;proceedings.neurips.cc&lt;/span&gt;
          

        &lt;/a&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


</description>
      <category>ai</category>
      <category>llm</category>
      <category>machinelearning</category>
      <category>programming</category>
    </item>
    <item>
      <title>Handling JWT Authentications Securely: Pitfalls and Best Practices</title>
      <dc:creator>Saaransh Gupta</dc:creator>
      <pubDate>Sun, 29 Sep 2024 04:55:10 +0000</pubDate>
      <link>https://forem.com/saaransh_gupta_1903/handling-jwt-authentications-securely-pitfalls-and-best-practices-j94</link>
      <guid>https://forem.com/saaransh_gupta_1903/handling-jwt-authentications-securely-pitfalls-and-best-practices-j94</guid>
      <description>&lt;p&gt;When developing modern web applications, one of the most common authentication methods is using JSON Web Tokens (JWT). JWTs are powerful, but if not implemented securely, they can expose your application to various risks. In this blog, I’ll break down the common pitfalls developers face (PS: I faced them too..) with JWT and the best practices to ensure security across your application.&lt;/p&gt;

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

&lt;p&gt;JWT is an open standard (RFC 7519) that defines a way to securely transmit information between two parties as a JSON object. It's most commonly used for authentication in stateless systems.&lt;/p&gt;

&lt;p&gt;A JWT consists of three parts:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Header: Contains the type of token (JWT) and the signing algorithm.&lt;/li&gt;
&lt;li&gt;Payload: Contains the claims, such as user information, roles, and token expiration.&lt;/li&gt;
&lt;li&gt;Signature: Used to verify the integrity of the token.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Go ahead and check out &lt;a href="https://www.jwt.io" rel="noopener noreferrer"&gt;www.jwt.io&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Common JWT Pitfalls
&lt;/h2&gt;

&lt;p&gt;Despite its simplicity and power, improper JWT implementations can lead to significant security vulnerabilities, here are some common pitfalls I fall into &amp;amp; ways to improve.&lt;/p&gt;

&lt;h3&gt;
  
  
  Storing JWT in Local Storage
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Pitfall:&lt;/strong&gt; Many developers store JWTs in local storage due to its simplicity, but this approach is vulnerable to XSS (Cross-Site Scripting) attacks i.e. Hackers could easily steal that token through your browser and could pose as an authentic user.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution:&lt;/strong&gt; Instead of local storage, store JWTs in HTTP-only cookies. These cookies are inaccessible to JavaScript, making lives of hackers a little bit more difficult.&lt;/p&gt;

&lt;h3&gt;
  
  
  No Token Expiry
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Pitfall:&lt;/strong&gt; If JWTs are created without an expiration time, they can be used indefinitely, even after the user logs out or if a token is compromised.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution:&lt;/strong&gt; Always set an expiration (exp) claim in the payload. A reasonable expiry time forces users to refresh tokens regularly, reducing the window for potential token misuse.&lt;/p&gt;

&lt;h3&gt;
  
  
  Example
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var token = jwt.sign({email_id:'123@gmail.com'}, "Stack", {
   expiresIn: '3d' // expires in 3 days
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Exposing Sensitive Information in the Payload
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Pitfall:&lt;/strong&gt; This is a very common mistake I still tend to forget about, JWT payloads are base64-encoded but &lt;strong&gt;not encrypted&lt;/strong&gt;, sensitive information (like passwords or secret keys) stored in the payload can be easily read by anyone without even a key!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution:&lt;/strong&gt; Allways only store non-sensitive, non-critical information in the JWT payload, such as user roles or IDs. If you need to send sensitive data, encrypt the entire token payload.&lt;/p&gt;

&lt;h3&gt;
  
  
  Improper Token Revocation
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Pitfall:&lt;/strong&gt; JWTs are stateless by nature, so revoking tokens (e.g. after logout) can be tricky. Since there is no default way to handle this, we would need a custom solution for it. Without proper revocation, a JWT remains valid until it expires, allowing multiple JWTs per user active at a single time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution:&lt;/strong&gt; Implement a token blacklist or use refresh tokens. Store the token in a blacklist upon logout, and ensure the server checks the blacklist for each request. Alternatively, use short-lived access tokens combined with refresh tokens to force re-authentication more frequently.&lt;/p&gt;

&lt;h2&gt;
  
  
  Learnings
&lt;/h2&gt;

&lt;p&gt;JWTs are an excellent tool for stateless authentication, but they need to be handled carefully to avoid introducing security risks. By avoiding common pitfalls and following best coding practices, I have learnt to create secure authentication systems and faced all these problems as a beginner.&lt;/p&gt;

&lt;p&gt;Taking these steps will not only improve the security of your applications but also demonstrate your deep understanding of secure token management—a highly sought-after skill in the development world.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>security</category>
      <category>node</category>
    </item>
    <item>
      <title>ResNet Vs EfficientNet vs VGG Vs NN</title>
      <dc:creator>Saaransh Gupta</dc:creator>
      <pubDate>Sun, 25 Aug 2024 20:54:15 +0000</pubDate>
      <link>https://forem.com/saaransh_gupta_1903/resnet-vs-efficientnet-vs-vgg-vs-nn-2hf5</link>
      <guid>https://forem.com/saaransh_gupta_1903/resnet-vs-efficientnet-vs-vgg-vs-nn-2hf5</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;As a student, I've witnessed firsthand the frustration caused by our university's inefficient lost and found system. The current process, reliant on individual emails for each found item, often leads to delays and missed connections between lost belongings and their owners.&lt;/p&gt;

&lt;p&gt;Driven by a desire to improve this experience for myself and my fellow students, I've embarked on a project to explore the potential of deep learning in revolutionizing our lost and found system.  In this blog post, I'll share my journey of evaluating pretrained models - ResNet, EfficientNet, VGG, and NasNet - to automate the identification and categorization of lost items.&lt;/p&gt;

&lt;p&gt;Through a comparative analysis, I aim to pinpoint the most suitable model for integrating into our system, ultimately creating a faster, more accurate, and user-friendly lost and found experience for everyone on campus.&lt;/p&gt;

&lt;h2&gt;
  
  
  ResNet
&lt;/h2&gt;

&lt;p&gt;Inception-ResNet V2 is a powerful convolutional neural network architecture available in Keras, combining the Inception architecture's strengths with residual connections from ResNet. This hybrid model aims to achieve high accuracy in image classification tasks while maintaining computational efficiency.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Training Dataset: ImageNet&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Image Format: 299 x 299&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Preprocessing function
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def readyForResNet(fileName):
    pic = load_img(fileName, target_size=(299, 299))
    pic_array = img_to_array(pic)
    expanded = np.expand_dims(pic_array, axis=0)
    return preprocess_input_resnet(expanded)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Predicting
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;data1 = readyForResNet(test_file)
prediction = inception_model_resnet.predict(data1)
res1 = decode_predictions_resnet(prediction, top=2)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  VGG (Visual Geometry Group)
&lt;/h2&gt;

&lt;p&gt;VGG (Visual Geometry Group) is a family of deep convolutional neural network architectures known for their simplicity and effectiveness in image classification tasks. These models, particularly VGG16 and VGG19, gained popularity due to their strong performance in the ImageNet Large Scale Visual Recognition Challenge (ILSVRC) in 2014.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Training Dataset: ImageNet&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Image Format: 224 x 224&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Preprocessing function
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def readyForVGG(fileName):
    pic = load_img(fileName, target_size=(224, 224))
    pic_array = img_to_array(pic)
    expanded = np.expand_dims(pic_array, axis=0)
    return preprocess_input_vgg19(expanded)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Predicting
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;data2 = readyForVGG(test_file)
prediction = inception_model_vgg19.predict(data2)
res2 = decode_predictions_vgg19(prediction, top=2)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  EfficientNet
&lt;/h2&gt;

&lt;p&gt;EfficientNet is a family of convolutional neural network architectures that achieve state-of-the-art accuracy on image classification tasks while being significantly smaller and faster than previous models. This efficiency is achieved through a novel compound scaling method that balances network depth, width, and resolution.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Training Dataset: ImageNet&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Image Format: 480 x 480&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Preprocessing function
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def readyForEF(fileName):
    pic = load_img(fileName, target_size=(480, 480))
    pic_array = img_to_array(pic)
    expanded = np.expand_dims(pic_array, axis=0)
    return preprocess_input_EF(expanded)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Predicting
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;data3 = readyForEF(test_file)
prediction = inception_model_EF.predict(data3)
res3 = decode_predictions_EF(prediction, top=2)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  NasNet
&lt;/h2&gt;

&lt;p&gt;NasNet (Neural Architecture Search Network) represents a groundbreaking approach in deep learning where the architecture of the neural network itself is discovered through an automated search process. This search process aims to find the optimal combination of layers and connections to achieve high performance on a given task.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Training Dataset: ImageNet&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Image Format: 224 x 224&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Preprocessing function
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def readyForNN(fileName):
    pic = load_img(fileName, target_size=(224, 224))
    pic_array = img_to_array(pic)
    expanded = np.expand_dims(pic_array, axis=0)
    return preprocess_input_NN(expanded)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Predicting
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;data4 = readyForNN(test_file)
prediction = inception_model_NN.predict(data4)
res4 = decode_predictions_NN(prediction, top=2)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Showdown
&lt;/h2&gt;

&lt;h4&gt;
  
  
  Accuracy
&lt;/h4&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%2Fc5ccqb2ld4gzsffw8asv.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%2Fc5ccqb2ld4gzsffw8asv.png" alt="Clamed Accuracies" width="800" height="565"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The table summarizes the claimed accuracy scores of the models above. EfficientNet B7 leads with the highest accuracy, followed closely by NasNet-Large and Inception-ResNet V2. VGG models exhibit lower accuracies. For my application I want to choose a model which has a balance between processing time and accuracy.&lt;/p&gt;

&lt;h4&gt;
  
  
  Time
&lt;/h4&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%2Fnit1o8ppmpwu4btt5n65.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%2Fnit1o8ppmpwu4btt5n65.png" alt="Reletive Times" width="800" height="250"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As we can see, EfficientNetB0 provides us the fastest results, but InceptionResNetV2 is a better package when taken accuracy in account&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;For my smart lost and found system, I decided to go with InceptionResNetV2. While EfficientNet B7 looked tempting with its top-notch accuracy, I was concerned about its computational demands. In a university setting, where resources might be limited and real-time performance is often desirable, I felt it was important to strike a balance between accuracy and efficiency. InceptionResNetV2 seemed like the perfect fit - it offers strong performance without being overly computationally intensive.&lt;/p&gt;

&lt;p&gt;Plus, the fact that it's pretrained on ImageNet gives me confidence that it can handle the diverse range of objects people might lose. And let's not forget how easy it is to work with in Keras! That definitely made my decision easier.&lt;/p&gt;

&lt;p&gt;Overall, I believe InceptionResNetV2 provides the right mix of accuracy, efficiency, and practicality for my project. I'm excited to see how it performs in helping reunite lost items with their owners!&lt;/p&gt;

</description>
      <category>machinelearning</category>
      <category>keras</category>
      <category>python</category>
      <category>deeplearning</category>
    </item>
    <item>
      <title>React Essentials: Features You Might Be Missing</title>
      <dc:creator>Saaransh Gupta</dc:creator>
      <pubDate>Sun, 18 Aug 2024 19:29:23 +0000</pubDate>
      <link>https://forem.com/saaransh_gupta_1903/react-essentials-features-you-might-be-missing-50ba</link>
      <guid>https://forem.com/saaransh_gupta_1903/react-essentials-features-you-might-be-missing-50ba</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;React has solidified its place as a go-to library for building dynamic and responsive user interfaces. With its declarative approach and component-based architecture, React simplifies the complex process of developing modern applications. However, like any powerful tool, there are features and best practices that often fly under the radar, even for experienced developers.&lt;/p&gt;

&lt;p&gt;In this blog, we’ll delve into some of these overlooked aspects of React—features that can enhance your development workflow, optimize performance, and help you write cleaner, more efficient code.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Layout Hooks &lt;code&gt;(useLayoutEffect)&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;Everyone has heard about &lt;code&gt;useEffect&lt;/code&gt; hook which lets you effectful code whenever a dependency changes. &lt;code&gt;useLayoutEffect&lt;/code&gt; is a version of &lt;code&gt;useEffect&lt;/code&gt; hook which fires whenever the browser repaints the screen it can be useful in many scenarios.&lt;/p&gt;

&lt;h3&gt;
  
  
  Tooltips
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { useState, useRef, useLayoutEffect } from 'react';

function Tooltip() {
  const ref = useRef(null);
  const [tooltipHeight, setTooltipHeight] = useState(0);

useLayoutEffect(() =&amp;gt; {
    const { height } = ref.current.getBoundingClientRect();
    setTooltipHeight(height);
}, []);
// ...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This code here checks before the screen is rendered weather the tooltip would be able to fit the screen or not and therefore rearranges itself.&lt;/p&gt;

&lt;p&gt;For detailed explanation visit, &lt;a href="https://react.dev/reference/react/useLayoutEffect" rel="noopener noreferrer"&gt;https://react.dev/reference/react/useLayoutEffect&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Outlet (React Router)
&lt;/h2&gt;

&lt;p&gt;Though not a part of react natively, react router is a very famous and useful library when it comes to managing routing in react. With its popularity there are many features mentioned in its documentation which go unnoticed.&lt;/p&gt;

&lt;h3&gt;
  
  
  How to use outlet
&lt;/h3&gt;

&lt;p&gt;Ever designed a dashboard for your project? where the topbar and sidebar elements are always constant and only a portion of page is changing between different routes? That's exactly where the concept of nested routing and outlet comes into play&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function Dashboard() {
  return (
    &amp;lt;div&amp;gt;
      &amp;lt;h1&amp;gt;Dashboard&amp;lt;/h1&amp;gt;
      &amp;lt;Outlet /&amp;gt;
    &amp;lt;/div&amp;gt;
  );
}

function App() {
  return (
    &amp;lt;Routes&amp;gt;
      &amp;lt;Route path="/" element={&amp;lt;Dashboard /&amp;gt;}&amp;gt;
        &amp;lt;Route path="messages" element={&amp;lt;DashboardMessages /&amp;gt;} /&amp;gt;
        &amp;lt;Route path="tasks" element={&amp;lt;DashboardTasks /&amp;gt;} /&amp;gt;
      &amp;lt;/Route&amp;gt;
    &amp;lt;/Routes&amp;gt;
  );
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The parent route &lt;code&gt;path="/"&lt;/code&gt; signifies the placeholder or the layout of the page where you would want to load the dynamic components, &lt;code&gt;Dashboard()&lt;/code&gt; in the above example would have only a heading and the following content on page would depend on the route we are on &lt;code&gt;/messages&lt;/code&gt; or &lt;code&gt;/tasks&lt;/code&gt;. We can also create a context for all the subpages using &lt;code&gt;outletContext&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Read more on: &lt;a href="https://reactrouter.com/en/main/components/outlet" rel="noopener noreferrer"&gt;https://reactrouter.com/en/main/components/outlet&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Loading optimization (&lt;code&gt;React.Suspense&lt;/code&gt; + &lt;code&gt;Await&lt;/code&gt;)
&lt;/h2&gt;

&lt;p&gt;React with the help of React Router supports loaders and fallbacks without using any other library, here is a simple example on how to use them.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function Book() {
  const { book, reviews } = useLoaderData();
  return (
    &amp;lt;div&amp;gt;
      &amp;lt;h1&amp;gt;{book.title}&amp;lt;/h1&amp;gt;
      &amp;lt;p&amp;gt;{book.description}&amp;lt;/p&amp;gt;
      &amp;lt;React.Suspense fallback={&amp;lt;ReviewsSkeleton /&amp;gt;}&amp;gt;
        &amp;lt;Await
          resolve={reviews}
          errorElement={
            &amp;lt;div&amp;gt;Could not load reviews 😬&amp;lt;/div&amp;gt;
          }
          children={(resolvedReviews) =&amp;gt; (
            &amp;lt;Reviews items={resolvedReviews} /&amp;gt;
          )}
        /&amp;gt;
      &amp;lt;/React.Suspense&amp;gt;
    &amp;lt;/div&amp;gt;
  );
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Note: &lt;code&gt;Await&lt;/code&gt; expects to be rendered inside of a &lt;code&gt;&amp;lt;React.Suspense&amp;gt;&lt;/code&gt; or &lt;code&gt;&amp;lt;React.SuspenseList&amp;gt;&lt;/code&gt; parent to enable the fallback UI.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;We explored some often overlooked yet powerful features of React that can significantly enhance your development process. We started with nested routing and the use of the &lt;code&gt;Outlet&lt;/code&gt; component, which simplifies the handling of child routes within your applications. Next, we delved into layout hooks, particularly &lt;code&gt;useLayoutEffect&lt;/code&gt;, which is crucial for executing updates before the browser repaints, ensuring smoother UI interactions. We also discussed the use of React's &lt;code&gt;Await&lt;/code&gt; and &lt;code&gt;Suspense&lt;/code&gt; tags, which help manage asynchronous operations more effectively, allowing you to build faster and more responsive user interfaces. By understanding and utilizing these features, you can write cleaner, more efficient React code that’s optimized for both performance and scalability.&lt;/p&gt;

</description>
      <category>react</category>
      <category>beginners</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>JavaScript &amp; TypeScript</title>
      <dc:creator>Saaransh Gupta</dc:creator>
      <pubDate>Sat, 17 Aug 2024 19:32:30 +0000</pubDate>
      <link>https://forem.com/saaransh_gupta_1903/javascript-typescript-3019</link>
      <guid>https://forem.com/saaransh_gupta_1903/javascript-typescript-3019</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;You’re starting a new project, and the question arises: Which language will set you up for success—JavaScript or TypeScript? Both have their merits, yet they cater to different styles of development. JavaScript, with its dynamic nature, has been the backbone of interactive web experiences for years. It’s versatile and forgiving, a language that lets you build quickly without getting bogged down in details.&lt;/p&gt;

&lt;p&gt;TypeScript enters the scene with a different premise: structure and safety. It extends JavaScript by adding static typing, catching errors at compile time rather than in the middle of execution. For developers who crave clarity and predictability in their code, TypeScript is a compelling choice.&lt;/p&gt;

&lt;p&gt;We will compare 2 highly used Technologies where you can build applications both in JavaScript and TypeScript which are React &amp;amp; NodeJS but first let's dive into the advantages of TypeScript.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why TypeScript?
&lt;/h2&gt;

&lt;p&gt;As stated, JavaScript is versatile and forgiving, but that comes with a cost of predictability in your code. For example, defining what your function parameters are with types or what a function would return exactly. JavaScript is handicapped when it comes to defining types of arguments or variables. TypeScript is aimed at solving the same problem and has an ability to define types statically. There are a lot more benefits of TypeScript which we would dive in later.&lt;/p&gt;

&lt;h3&gt;
  
  
  Core Differences
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Typing System:&lt;/strong&gt; JavaScript is dynamically typed, it infers type automatically, while TypeScript is statically typed, variable types are defined by developer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Compile-Time vs. Run-Time:&lt;/strong&gt; TypeScript catches errors at compile time i.e. while you are writing the code; JavaScript only catches errors at runtime i.e. when you run your code.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tooling:&lt;/strong&gt; TypeScript offers better tooling and IDE support, with features like autocompletion and type inference.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Advantages of JavaScript
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Flexibility:&lt;/strong&gt; No need to define types explicitly, leading to faster prototyping.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Widespread Adoption:&lt;/strong&gt; Extensive community support and a vast number of libraries and frameworks are written in JavaScript.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Learning Curve:&lt;/strong&gt; Easier for beginners due to its simplicity and less rigid structure.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Advantages of TypeScript
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Error Reduction:&lt;/strong&gt; Static typing helps in identifying errors early in the development process as you are writing the code.
Better Code Maintenance: Types and interfaces improve code readability and maintainability.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scalability:&lt;/strong&gt; Ideal for large-scale applications where consistency and bug prevention are crucial.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ecosystem Integration:&lt;/strong&gt; Seamless integration with JavaScript libraries and frameworks.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What to choose?
&lt;/h2&gt;

&lt;p&gt;As a developer you would have to clearly identify the requirements and scalability you want your project to have before choosing the right framework or language. Projects you are building for your personal use, or you want faster development, JavaScript is the way you shall go. Projects which involve multiple devs working on different parts of a system might want more control over how data is passed and processed, if that is the case then TypeScript would be a better option.&lt;/p&gt;

&lt;h3&gt;
  
  
  Scenario 1
&lt;/h3&gt;

&lt;p&gt;You developed an application which would not be maintained by you forever, in that case you would want to leave some documentation for the developers down the line. The documentation might include the structure of data a backend service (API) would expect or return, a JavaScript application would force a developer to depend on the documentation, but a TypeScript application can eliminate the dependency with help of interfaces and static type definitions.&lt;/p&gt;

&lt;h3&gt;
  
  
  Scenario 2
&lt;/h3&gt;

&lt;p&gt;You are developing a project for personal use, and you know that you are only going to write a frontend and backend for this project, in that case the documentation does not really matter, and we can leverage the flexibility of JavaScript to write code faster.&lt;/p&gt;

&lt;h2&gt;
  
  
  Syntax
&lt;/h2&gt;

&lt;h3&gt;
  
  
  TypeScript
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;interface LabeledValue {
  label: string;
}

function printLabel(labeledObj: LabeledValue) {
  console.log(labeledObj.label);
}

let myObj = { size: 10, label: "Size 10 Object" };
printLabel(myObj);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  JavaScript
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function printLabel(labeledObj) {
  console.log(labeledObj.label);
}
let myObj = { size: 10, label: "Size 10 Object" };
printLabel(myObj);

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

&lt;/div&gt;



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