<?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>DEV Community: Yash Fadadu</title>
    <description>The latest articles on DEV Community by Yash Fadadu (@yashforsure).</description>
    <link>https://dev.to/yashforsure</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1499242%2Fc468b08d-c03f-451e-b6d4-447926e18e1a.png</url>
      <title>DEV Community: Yash Fadadu</title>
      <link>https://dev.to/yashforsure</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yashforsure"/>
    <language>en</language>
    <item>
      <title>🚀 What Really Happens When You Call .add() Twice? Classic BLoC vs BlocSignal</title>
      <dc:creator>Yash Fadadu</dc:creator>
      <pubDate>Thu, 06 Aug 2026 17:57:52 +0000</pubDate>
      <link>https://dev.to/yashforsure/what-really-happens-when-you-call-add-twice-classic-bloc-vs-blocsignal-5969</link>
      <guid>https://dev.to/yashforsure/what-really-happens-when-you-call-add-twice-classic-bloc-vs-blocsignal-5969</guid>
      <description>&lt;p&gt;We've all been there.&lt;/p&gt;

&lt;p&gt;You're building a Flutter app with BLoC, and somewhere in your business logic you write:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="n"&gt;myBloc&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;LoadUserData&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
&lt;span class="n"&gt;myBloc&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;FetchUserPreferences&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Immediately, a thought pops into your head...&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;🤔 &lt;strong&gt;"Wait... did I just overwrite the first event before the UI even had a chance to rebuild?"&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Or maybe:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Will &lt;code&gt;EventB&lt;/code&gt; execute before &lt;code&gt;EventA&lt;/code&gt; finishes?&lt;/li&gt;
&lt;li&gt;Will the UI skip &lt;code&gt;StateA&lt;/code&gt;?&lt;/li&gt;
&lt;li&gt;If I read &lt;code&gt;bloc.state&lt;/code&gt; immediately after &lt;code&gt;.add()&lt;/code&gt;, what state do I get?&lt;/li&gt;
&lt;li&gt;What happens if I call &lt;code&gt;.add()&lt;/code&gt; &lt;strong&gt;10,000 times&lt;/strong&gt;?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let's lift the hood and compare &lt;strong&gt;Classic BLoC&lt;/strong&gt; and &lt;strong&gt;BlocSignal&lt;/strong&gt;.&lt;/p&gt;




&lt;h1&gt;
  
  
  🤯 The Common Misconception
&lt;/h1&gt;

&lt;p&gt;Many developers imagine something like this:&lt;br&gt;
&lt;/p&gt;

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

EventB
   ↓
StateB

↓

UI only sees StateB 😱
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The fear is that rapid-fire &lt;code&gt;.add()&lt;/code&gt; calls somehow overwrite each other before Flutter can render.&lt;/p&gt;

&lt;p&gt;Fortunately...&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;That's not how either implementation works.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The difference lies in &lt;strong&gt;how state propagates&lt;/strong&gt;, not whether events get lost.&lt;/p&gt;




&lt;h1&gt;
  
  
  🐢 Classic BLoC (Streams)
&lt;/h1&gt;

&lt;p&gt;Traditional &lt;code&gt;flutter_bloc&lt;/code&gt; is built on top of &lt;strong&gt;Dart Streams&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;A simplified flow looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.add(Event)

        ↓

 StreamController

        ↓

 Event Handler

        ↓

 emit(State)

        ↓

 State Stream

        ↓

 BlocBuilder Listener

        ↓

 markNeedsBuild()

        ↓

 Flutter Frame
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Notice something important:&lt;/p&gt;

&lt;p&gt;Flutter &lt;strong&gt;does not rebuild immediately&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;It simply marks the widget as &lt;strong&gt;dirty&lt;/strong&gt; and rebuilds during the next rendering frame.&lt;/p&gt;




&lt;h2&gt;
  
  
  So what happens?
&lt;/h2&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="n"&gt;bloc&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;EventA&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
&lt;span class="n"&gt;bloc&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;EventB&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Internally it behaves more like:&lt;br&gt;
&lt;/p&gt;

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

↓

Handler runs

↓

emit(StateA)

↓

Widget marked dirty

↓

EventB

↓

Handler runs

↓

emit(StateB)

↓

Widget marked dirty again

↓

Flutter renders

↓

Latest state displayed
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No event is lost.&lt;/p&gt;

&lt;p&gt;Both handlers execute.&lt;/p&gt;

&lt;p&gt;The UI simply paints the &lt;strong&gt;latest settled state&lt;/strong&gt; when Flutter decides to render the next frame.&lt;/p&gt;




&lt;h1&gt;
  
  
  ⚡ BlocSignal (Signals)
&lt;/h1&gt;

&lt;p&gt;BlocSignal keeps the familiar BLoC programming model...&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="n"&gt;bloc&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(...)&lt;/span&gt;
&lt;span class="n"&gt;emit&lt;/span&gt;&lt;span class="p"&gt;(...)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;...but replaces &lt;strong&gt;Streams&lt;/strong&gt; with &lt;strong&gt;Signals&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Its propagation path is much shorter.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.add(Event)

      ↓

Handler

      ↓

emit(State)

      ↓

Signal

      ↓

BlocSignalBuilder

      ↓

markNeedsBuild()

      ↓

Flutter Frame
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The biggest difference is:&lt;/p&gt;

&lt;p&gt;The handler executes &lt;strong&gt;synchronously&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Meaning this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="n"&gt;bloc&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;EventA&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;

&lt;span class="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;bloc&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;state&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;already prints&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;because the state has already been updated before &lt;code&gt;.add()&lt;/code&gt; returns.&lt;/p&gt;

&lt;p&gt;Then...&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="n"&gt;bloc&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;EventB&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;starts.&lt;/p&gt;

&lt;p&gt;So EventB always sees the latest state.&lt;/p&gt;




&lt;h1&gt;
  
  
  🤔 Doesn't that rebuild the UI every time?
&lt;/h1&gt;

&lt;p&gt;This is probably the most interesting question.&lt;/p&gt;

&lt;p&gt;Suppose you do something completely unreasonable 😂&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;10000&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;bloc&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;IncrementEvent&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Many people imagine:&lt;br&gt;
&lt;/p&gt;

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

↓

Build

↓

markNeedsBuild()

↓

Build

↓

markNeedsBuild()

↓

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

&lt;/div&gt;



&lt;p&gt;10,000 times.&lt;/p&gt;

&lt;p&gt;Fortunately...&lt;/p&gt;

&lt;p&gt;Flutter is much smarter than that.&lt;/p&gt;




&lt;h1&gt;
  
  
  🎨 What &lt;code&gt;markNeedsBuild()&lt;/code&gt; Actually Does
&lt;/h1&gt;

&lt;p&gt;Calling&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="n"&gt;markNeedsBuild&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;does &lt;strong&gt;not&lt;/strong&gt; immediately rebuild the widget.&lt;/p&gt;

&lt;p&gt;It simply tells Flutter:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"This widget is dirty."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Internally it's roughly equivalent to:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;If it's already dirty...&lt;/p&gt;

&lt;p&gt;Setting&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;again changes nothing.&lt;/p&gt;

&lt;p&gt;So&lt;br&gt;
&lt;/p&gt;

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

markNeedsBuild()

markNeedsBuild()

markNeedsBuild()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;still results in&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;Once Flutter reaches the next frame...&lt;/p&gt;

&lt;p&gt;it performs &lt;strong&gt;one build&lt;/strong&gt; using the latest state.&lt;/p&gt;




&lt;h1&gt;
  
  
  📊 Classic BLoC vs BlocSignal
&lt;/h1&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Classic BLoC 🐢&lt;/th&gt;
&lt;th&gt;BlocSignal ⚡&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;State Propagation&lt;/td&gt;
&lt;td&gt;Stream-based&lt;/td&gt;
&lt;td&gt;Signal-based&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Handler Execution&lt;/td&gt;
&lt;td&gt;Stream/event pipeline&lt;/td&gt;
&lt;td&gt;Direct synchronous execution&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;bloc.state&lt;/code&gt; immediately after &lt;code&gt;.add()&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Depends on propagation timing&lt;/td&gt;
&lt;td&gt;Updated immediately&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Internal Dispatch&lt;/td&gt;
&lt;td&gt;Stream subscriptions&lt;/td&gt;
&lt;td&gt;Signal dependency graph&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;UI Rendering&lt;/td&gt;
&lt;td&gt;Flutter frame pipeline&lt;/td&gt;
&lt;td&gt;Flutter frame pipeline&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Widget Rebuild&lt;/td&gt;
&lt;td&gt;Deferred to Flutter&lt;/td&gt;
&lt;td&gt;Deferred to Flutter&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Developer Experience&lt;/td&gt;
&lt;td&gt;Mature &amp;amp; battle-tested&lt;/td&gt;
&lt;td&gt;Familiar API with Signals underneath&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h1&gt;
  
  
  🎯 So... what does BlocSignal actually optimize?
&lt;/h1&gt;

&lt;p&gt;The optimization isn't that Flutter suddenly rebuilds faster.&lt;/p&gt;

&lt;p&gt;Flutter's rendering pipeline is exactly the same.&lt;/p&gt;

&lt;p&gt;Instead, BlocSignal removes much of the reactive plumbing:&lt;/p&gt;

&lt;p&gt;❌ StreamController&lt;/p&gt;

&lt;p&gt;❌ Stream subscriptions&lt;/p&gt;

&lt;p&gt;❌ Stream dispatch&lt;/p&gt;

&lt;p&gt;❌ Async propagation through streams&lt;/p&gt;

&lt;p&gt;Replacing it with:&lt;/p&gt;

&lt;p&gt;✅ Direct synchronous state updates&lt;/p&gt;

&lt;p&gt;✅ Signal dependency propagation&lt;/p&gt;

&lt;p&gt;✅ Immediate state availability&lt;/p&gt;

&lt;p&gt;This makes the execution path shorter and more predictable.&lt;/p&gt;




&lt;h1&gt;
  
  
  💙 Final Thoughts
&lt;/h1&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="n"&gt;bloc&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;EventA&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
&lt;span class="n"&gt;bloc&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;EventB&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;is perfectly safe.&lt;/p&gt;

&lt;p&gt;Neither Classic BLoC nor BlocSignal loses events.&lt;/p&gt;

&lt;p&gt;The key difference is &lt;strong&gt;how the new state travels from your business logic to the UI&lt;/strong&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🐢 &lt;strong&gt;Classic BLoC&lt;/strong&gt; uses a Stream-based propagation pipeline.&lt;/li&gt;
&lt;li&gt;⚡ &lt;strong&gt;BlocSignal&lt;/strong&gt; replaces that pipeline with synchronous Signal propagation.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Both still rely on Flutter's rendering engine, which intelligently batches widget rebuilds into the next frame.&lt;/p&gt;

&lt;p&gt;So no matter how many times you call &lt;code&gt;.add()&lt;/code&gt;, Flutter only paints what actually matters—the latest settled state.&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>dart</category>
      <category>blocsignal</category>
    </item>
    <item>
      <title>🔥 Solved 1000 LeetCode Questions — Here's What I Learned (and Didn't)</title>
      <dc:creator>Yash Fadadu</dc:creator>
      <pubDate>Fri, 30 May 2025 06:25:58 +0000</pubDate>
      <link>https://dev.to/yashforsure/solved-1000-leetcode-questions-heres-what-i-learned-and-didnt-1ab1</link>
      <guid>https://dev.to/yashforsure/solved-1000-leetcode-questions-heres-what-i-learned-and-didnt-1ab1</guid>
      <description>&lt;h2&gt;
  
  
  ✅ 1000 LeetCode Questions — Done!
&lt;/h2&gt;

&lt;p&gt;Just hit a &lt;strong&gt;huge milestone&lt;/strong&gt;:&lt;br&gt;&lt;br&gt;
Hello I'm &lt;strong&gt;Yash Fadadu&lt;/strong&gt;, I’ve completed &lt;strong&gt;1000 questions&lt;/strong&gt; on &lt;a href="https://leetcode.com/" rel="noopener noreferrer"&gt;LeetCode&lt;/a&gt; ✌️&lt;br&gt;&lt;br&gt;
And no — I’m not at Google. Not yet at Microsoft either.&lt;/p&gt;

&lt;p&gt;But that’s not what this post is about.&lt;/p&gt;




&lt;h2&gt;
  
  
  ✨ Was it worth it?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; Yes. But &lt;em&gt;not for the reasons you might think.&lt;/em&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;❓ &lt;em&gt;Did I become a DSA expert?&lt;/em&gt; – Not yet&lt;br&gt;&lt;br&gt;
💼 &lt;em&gt;Got an offer from FAANG?&lt;/em&gt; – No&lt;br&gt;&lt;br&gt;
🧠 &lt;em&gt;Learned something deeper?&lt;/em&gt; – 100%&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  💡 What I Actually Learned
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Solving LeetCode isn’t about flexing IQ.&lt;br&gt;&lt;br&gt;
It’s about &lt;strong&gt;consistency&lt;/strong&gt;, &lt;strong&gt;discipline&lt;/strong&gt;, and learning to &lt;strong&gt;think like a developer&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;You can study all the patterns and still get stuck. That’s &lt;em&gt;normal.&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;You won’t love every part of it — but that’s the point.&lt;/li&gt;
&lt;li&gt;It teaches you to show up even when it’s tough.&lt;/li&gt;
&lt;li&gt;It’s about building &lt;strong&gt;mental endurance&lt;/strong&gt; as much as technical skill.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I often felt like ditching LeetCode to focus on building real-world things — AI tools, beautiful UIs, full-stack apps.&lt;br&gt;&lt;br&gt;
But this journey reminded me:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;🔁 &lt;em&gt;“You grow most when you don’t feel like it.”&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  📝 Tips If You're Just Starting
&lt;/h2&gt;

&lt;p&gt;Here’s what helped me — and might help you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;📚 &lt;strong&gt;Master the basics&lt;/strong&gt;: Arrays, Strings, Linked Lists, Trees
&lt;/li&gt;
&lt;li&gt;🎯 Learn core patterns: Two Pointers, Sliding Window, Binary Search, Recursion&lt;/li&gt;
&lt;li&gt;🤏 Start with &lt;strong&gt;easy problems&lt;/strong&gt; — they build confidence&lt;/li&gt;
&lt;li&gt;⏱️ Stuck for more than an hour? &lt;strong&gt;Read the solution&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;🧠 Study a topic &lt;strong&gt;before&lt;/strong&gt; attempting questions on it&lt;/li&gt;
&lt;li&gt;🔁 Make it a &lt;strong&gt;daily habit&lt;/strong&gt;, not a sprint&lt;/li&gt;
&lt;li&gt;🔍 Get good at &lt;strong&gt;time &amp;amp; space complexity&lt;/strong&gt; — it’ll make your intuition stronger&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  ✅ Real Benefits I’ve Seen
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;🧩 Understanding DSA helped me in &lt;strong&gt;blockchain&lt;/strong&gt;, &lt;strong&gt;AI/ML&lt;/strong&gt;, &lt;strong&gt;game dev&lt;/strong&gt;, and &lt;strong&gt;full-stack&lt;/strong&gt; work.&lt;/li&gt;
&lt;li&gt;💡 I write cleaner, more optimized code.&lt;/li&gt;
&lt;li&gt;🔐 Most of all, it &lt;strong&gt;changed my mindset&lt;/strong&gt;: I now look at problems with more clarity and confidence.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🛠️ Let's Connect
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/u/_mYash1994/" rel="noopener noreferrer"&gt;My LeetCode&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/yashh1994" rel="noopener noreferrer"&gt;My GitHub&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🚀 What’s Next?
&lt;/h2&gt;

&lt;p&gt;1000 done.&lt;br&gt;&lt;br&gt;
Now chasing &lt;strong&gt;2000&lt;/strong&gt; 🧠⚡&lt;br&gt;&lt;br&gt;
Because the goal is never just a number — it’s to become better than yesterday.&lt;/p&gt;

&lt;p&gt;If you're on the same journey, let’s connect.&lt;br&gt;&lt;br&gt;
Drop your milestones, tips, or struggles in the comments! 🙌&lt;/p&gt;




</description>
      <category>leetcode</category>
      <category>1000questions</category>
      <category>dsa</category>
      <category>algorithms</category>
    </item>
    <item>
      <title>🧠 The S-400 and Smart Defense: How AI Algorithms Could Revolutionize Automated Air Defense</title>
      <dc:creator>Yash Fadadu</dc:creator>
      <pubDate>Fri, 23 May 2025 10:06:25 +0000</pubDate>
      <link>https://dev.to/yashforsure/the-s-400-and-smart-defense-how-ai-algorithms-could-revolutionize-automated-air-defense-1d0a</link>
      <guid>https://dev.to/yashforsure/the-s-400-and-smart-defense-how-ai-algorithms-could-revolutionize-automated-air-defense-1d0a</guid>
      <description>&lt;p&gt;The S-400 Triumf air defense system is a marvel of military engineering. With the ability to track and destroy aircraft, drones, and missiles over 400 km away, it’s one of the most feared SAM systems in the world.&lt;/p&gt;

&lt;p&gt;But here’s the reality: while the S-400 uses advanced automation, it doesn't yet use true AI—as in learning algorithms that improve over time.&lt;/p&gt;

&lt;p&gt;So, what if we applied real machine learning? Let’s explore the algorithms that could bring the next level of intelligence to air defense systems like the S-400.&lt;/p&gt;

&lt;p&gt;**🔄 Current Automation in the S-400&lt;br&gt;
The S-400 currently uses:&lt;/p&gt;

&lt;p&gt;Rule-based threat prioritization: if X is moving fast at Y altitude, treat it as a missile.&lt;/p&gt;

&lt;p&gt;Predefined radar tracking filters: such as Kalman filters to estimate object trajectories.&lt;/p&gt;

&lt;p&gt;Hard-coded decision trees for assigning missiles to targets.&lt;/p&gt;

&lt;p&gt;These systems are fast and reliable, but they’re not adaptive. They can’t learn from new types of threats or behavior.&lt;/p&gt;

&lt;p&gt;🤖 What AI Can Add: The Algorithms That Matter&lt;br&gt;
Let’s go over specific AI/ML algorithms that could supercharge an air defense system:&lt;/p&gt;

&lt;h2&gt;
  
  
  1. 🧮 Convolutional Neural Networks (CNNs) for Visual Target Identification
&lt;/h2&gt;

&lt;p&gt;If integrated with optical or infrared sensors:&lt;/p&gt;

&lt;p&gt;Purpose: Classify aircraft, drones, or decoys visually.&lt;/p&gt;

&lt;p&gt;How it works: CNNs learn patterns in images (like turbine shapes, wing profiles) and can outperform traditional object detection in noisy environments.&lt;/p&gt;

&lt;p&gt;Example use: Detect if a low-flying object is a real UAV or a decoy balloon.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. 📈 Reinforcement Learning (RL) for Engagement Decision-Making
&lt;/h2&gt;

&lt;p&gt;Purpose: Learn optimal defense strategies through simulation and feedback.&lt;/p&gt;

&lt;p&gt;How it works: RL agents (like Deep Q-Networks or PPO) try different missile-target strategies in a simulated battlefield. Over time, they learn what decisions lead to success.&lt;/p&gt;

&lt;p&gt;Example use: Learn the best firing sequence when faced with a saturation drone swarm attack.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. 🧠 LSTM (Long Short-Term Memory) Networks for Trajectory Prediction
&lt;/h2&gt;

&lt;p&gt;Purpose: Predict where a target will go based on past movement.&lt;/p&gt;

&lt;p&gt;How it works: LSTMs are a type of Recurrent Neural Network (RNN) that can learn temporal patterns—perfect for motion prediction in noisy environments.&lt;/p&gt;

&lt;p&gt;Example use: Predict where a hypersonic missile will be 3 seconds from now, even if it suddenly changes direction.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. 🔍 Anomaly Detection with Autoencoders
&lt;/h2&gt;

&lt;p&gt;Purpose: Spot spoofed or jammed radar signals.&lt;/p&gt;

&lt;p&gt;How it works: An autoencoder learns the "normal" signal patterns. When it sees a signal that doesn’t fit, it flags it as a potential threat or decoy.&lt;/p&gt;

&lt;p&gt;Example use: Detect radar jamming or stealth aircraft signature anomalies.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. 🧾 Decision Trees + XGBoost for Threat Classification
&lt;/h2&gt;

&lt;p&gt;Purpose: Classify threats based on structured data (speed, altitude, radar cross-section).&lt;/p&gt;

&lt;p&gt;How it works: These models excel at classifying tabular input—like sensor values—into risk levels.&lt;/p&gt;

&lt;p&gt;Example use: Score each target in real-time with a “threat score” from 0 to 100.&lt;/p&gt;

&lt;h2&gt;
  
  
  🔐 Why This Matters
&lt;/h2&gt;

&lt;p&gt;The future battlefield will be filled with:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Swarm drones&lt;/li&gt;
&lt;li&gt;Hypersonic missiles&lt;/li&gt;
&lt;li&gt;AI-driven stealth aircraft&lt;/li&gt;
&lt;li&gt;ECM (Electronic Counter Measures)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;To survive, air defense systems need to be just as smart as they are fast.&lt;/p&gt;

&lt;h2&gt;
  
  
  🧑‍💻 Developers: Your Skills Matter
&lt;/h2&gt;

&lt;p&gt;If you're a developer working in:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AI/ML&lt;/li&gt;
&lt;li&gt;Embedded systems&lt;/li&gt;
&lt;li&gt;Edge computing&lt;/li&gt;
&lt;li&gt;Signal processing&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;...you can help build the brains behind these next-gen defense systems. It's not just about writing software—it's about writing code that makes life-and-death decisions smarter, safer, and more accountable.&lt;/p&gt;

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

&lt;p&gt;The S-400’s automation is solid—but static. By integrating real AI algorithms, we could enable defense systems to learn from experience, adapt to new threats, and respond faster than any human could.&lt;/p&gt;

&lt;p&gt;💬 What’s your take on using machine learning in defense systems? Exciting? Risky? Both? Drop your thoughts below.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Ghibli Art Generation AI — The Fusion of Machine Learning and Animated Aesthetics</title>
      <dc:creator>Yash Fadadu</dc:creator>
      <pubDate>Wed, 14 May 2025 14:10:08 +0000</pubDate>
      <link>https://dev.to/yashforsure/ghibli-art-generation-ai-the-fusion-of-machine-learning-and-animated-aesthetics-ico</link>
      <guid>https://dev.to/yashforsure/ghibli-art-generation-ai-the-fusion-of-machine-learning-and-animated-aesthetics-ico</guid>
      <description>&lt;h2&gt;
  
  
  🧠 Overview
&lt;/h2&gt;

&lt;p&gt;Ghibli-style art generation through AI represents a fascinating application of generative deep learning models, particularly those based on diffusion architectures. These systems are capable of producing high-quality, stylized illustrations that resemble the iconic aesthetics of Studio Ghibli’s animation—characterized by soft color palettes, emotional atmospheres, and richly detailed environments.&lt;/p&gt;

&lt;h2&gt;
  
  
  🔍 How It Works
&lt;/h2&gt;

&lt;p&gt;Ghibli art generation is typically powered by text-to-image and image-to-image models, such as Stable Diffusion, DreamBooth, or LoRA-tuned variants. These models are trained or fine-tuned on large datasets of artwork that resemble or replicate the Ghibli aesthetic.&lt;/p&gt;

&lt;p&gt;Key components include:&lt;/p&gt;

&lt;p&gt;Diffusion Models: Probabilistic generative models that iteratively denoise random noise into meaningful images. When trained on Ghibli-style datasets, these models learn to reproduce similar artistic features.&lt;/p&gt;

&lt;p&gt;DreamBooth / LoRA Fine-Tuning: Techniques used to customize a base model to learn specific art styles. DreamBooth helps the model internalize unique visual characteristics by overfitting on a small curated dataset (e.g., 100–500 images of Ghibli-style frames or fan art).&lt;/p&gt;

&lt;p&gt;Text Prompt Engineering: Users describe scenes in natural language (e.g., “a magical forest with floating lanterns”), and the model interprets this to generate corresponding imagery, integrating the learned Ghibli-like features.&lt;/p&gt;

&lt;p&gt;Image-to-Image Translation: Users can input photos or sketches, and the model reinterprets them in Ghibli style, preserving structure while applying the aesthetic transformation.&lt;/p&gt;

&lt;h2&gt;
  
  
  📊 Dataset Considerations
&lt;/h2&gt;

&lt;p&gt;Due to copyright constraints, training typically avoids using original Studio Ghibli frames directly. Instead, fine-tuning datasets often consist of:&lt;/p&gt;

&lt;p&gt;High-quality fan art&lt;/p&gt;

&lt;p&gt;Open-source anime-style illustrations&lt;/p&gt;

&lt;p&gt;Stylized concept art that reflects similar themes and color schemes&lt;/p&gt;

&lt;p&gt;Data augmentation (color jittering, cropping, flipping) is used to improve generalization while preserving artistic coherence.&lt;/p&gt;

&lt;h2&gt;
  
  
  🧠 Technical Stack
&lt;/h2&gt;

&lt;p&gt;While implementations vary, a standard Ghibli-style art generation stack might include:&lt;/p&gt;

&lt;p&gt;Model Backbone: Stable Diffusion 1.5 or SDXL&lt;/p&gt;

&lt;p&gt;Fine-Tuning Framework: DreamBooth, LoRA, or Textual Inversion&lt;/p&gt;

&lt;p&gt;Inference Backend: Python + PyTorch with Hugging Face Transformers &amp;amp; diffusers&lt;/p&gt;

&lt;p&gt;Frontend Interface: Web apps built with React or Gradio for demo interactions&lt;/p&gt;

&lt;p&gt;Deployment: GPU-accelerated platforms like Hugging Face Spaces, Replicate, or custom servers using NVIDIA GPUs&lt;/p&gt;

&lt;h2&gt;
  
  
  ✨ Applications
&lt;/h2&gt;

&lt;p&gt;Creative Art Generation: Allowing users to visualize fantasy scenes or original characters in a beloved animated style.&lt;/p&gt;

&lt;p&gt;Concept Design: Useful for illustrators and indie animators needing quick prototyping in an established aesthetic.&lt;/p&gt;

&lt;p&gt;Education: Demonstrating how AI can learn and replicate complex visual styles from limited data.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
