<?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: Harshvardhan Joshi</title>
    <description>The latest articles on DEV Community by Harshvardhan Joshi (@harsh-joshi).</description>
    <link>https://dev.to/harsh-joshi</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%2F1746870%2Fc9a82636-d514-48c4-8e6d-825a456ace32.png</url>
      <title>DEV Community: Harshvardhan Joshi</title>
      <link>https://dev.to/harsh-joshi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/harsh-joshi"/>
    <language>en</language>
    <item>
      <title>"Docs" in cursor - A life saver</title>
      <dc:creator>Harshvardhan Joshi</dc:creator>
      <pubDate>Tue, 25 Mar 2025 04:41:22 +0000</pubDate>
      <link>https://dev.to/harsh-joshi/docs-in-cursor-a-life-saver-1fi4</link>
      <guid>https://dev.to/harsh-joshi/docs-in-cursor-a-life-saver-1fi4</guid>
      <description>&lt;p&gt;We all have seen more than a million articles(hypothetically😅)  and posts about how we can use specific rules to guide cursor's AI modules to behave in specific ways with specific frameworks, projects or files.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;But how much the AI knows the standards and tools of the framework?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As we already know, AI running behind the scenes is very intelligent but has knowledge cut-off dates, making its knowledge about specific technologies very limited.&lt;/p&gt;

&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;How do we solve the issue that allows hosting independent knowledge base for specific tech? &lt;/li&gt;
&lt;li&gt;How do we make sure that it can be referred during the AI response generation without depending on the AI?&lt;/li&gt;
&lt;li&gt;How do we make sure that any new updates on the framework can be handled easily without manually updating a related .cursorrules file?&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;What's the Solution???&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Docs&lt;/code&gt; option in cursor's AI Chat window.&lt;/p&gt;

&lt;p&gt;Here's the location of this feature:&lt;br&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%2Fs11bn86fs853dzolwsxl.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%2Fs11bn86fs853dzolwsxl.png" alt="Screenshot of the Option menu in sight" width="532" height="542"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once you click on the option it shows what documentations are already available. &lt;/p&gt;

&lt;p&gt;A lot of docs already available to use directly.&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%2F1pfhjdjcdrk8nztmu2o1.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%2F1pfhjdjcdrk8nztmu2o1.png" alt="Screenshot of the Docs menu" width="614" height="264"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Search the name of the tech and it will be there. But if you can't find it you can add your own. Just click on &lt;code&gt;Add new Doc&lt;/code&gt; button.&lt;/p&gt;

&lt;p&gt;This small text box will come up.&lt;br&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%2Fb91dzyipl3q5cluetmot.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%2Fb91dzyipl3q5cluetmot.png" alt="Screenshot of the input box for doc URL" width="800" height="114"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Enter the official documentation or API doc URL, the same box will turn into a modal asking for the name of the doc.&lt;br&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%2Fivekyht0gh2zo7nymmtv.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%2Fivekyht0gh2zo7nymmtv.png" alt="Screenshot of the docs details confirmation" width="800" height="367"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once you confirm, cursor will start indexing the new documents from the URL.&lt;br&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%2Fgfs5v7u7mg811844usyz.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%2Fgfs5v7u7mg811844usyz.png" alt="Screenshot of the Indexing the doc" width="800" height="106"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once the indexation is done, you can see the new doc entry in the &lt;code&gt;Docs&lt;/code&gt; option menu.&lt;br&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%2F0e2xx7dol75zblc3mhz8.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%2F0e2xx7dol75zblc3mhz8.png" alt="Screenshot of the Option menu with new doc option visible" width="504" height="474"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now you can select the new doc next time you are seeking the AI's help. When cursor is collecting data for context, it will include the relevant documentation section related to your query when it is generating a response.&lt;br&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%2Fsod0ab1ndebcz213g3bo.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%2Fsod0ab1ndebcz213g3bo.png" alt="Screenshot of the New Docs being used in response" width="638" height="880"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Imagine building a new tool/framework or something else using a technology not popular enough to be included in the AI model's knowledge.&lt;/p&gt;

&lt;p&gt;Having a standard API doc can save a lot of time for you. It can provide standard approaches, and information about the framework or tools it may have, to form a better response.&lt;/p&gt;

&lt;h2&gt;
  
  
  My take on this
&lt;/h2&gt;

&lt;p&gt;While this is a definite improvement on top of existing utility provided by cursor, it should be used with a grain of salt.&lt;/p&gt;

&lt;p&gt;Quality of the final response does depend on the quality of the API docs and the quality of the output from the AI models referencing it. &lt;/p&gt;

&lt;p&gt;As I believe true to my heart, &lt;br&gt;
&lt;code&gt;Giving AI access to modify your work is a recipe for disaster, that's just waiting to happen.&lt;/code&gt; &lt;/p&gt;

&lt;p&gt;But more on that later.&lt;/p&gt;

&lt;p&gt;Enjoyed this article? Follow me on &lt;a href="https://x.com/decent_geek" rel="noopener noreferrer"&gt;X/Twitter&lt;/a&gt; or &lt;a href="https://www.linkedin.com/in/harshvardhan-joshi/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt; for more of my projects, works, thoughts and general updates!&lt;/p&gt;

&lt;p&gt;Have a good day!!!&lt;/p&gt;

</description>
      <category>cursor</category>
      <category>ai</category>
      <category>tooling</category>
    </item>
    <item>
      <title>A better way to listen to multiple change notifiers in Flutter</title>
      <dc:creator>Harshvardhan Joshi</dc:creator>
      <pubDate>Tue, 31 Dec 2024 09:03:05 +0000</pubDate>
      <link>https://dev.to/harsh-joshi/a-better-way-to-listen-to-multiple-change-notifiers-in-flutter-3na0</link>
      <guid>https://dev.to/harsh-joshi/a-better-way-to-listen-to-multiple-change-notifiers-in-flutter-3na0</guid>
      <description>&lt;p&gt;Ever done this to listen to changes from multiple (listenables/notifiers) and update your widget?&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%2Fmtbmu8t8g2pt2lpjewcw.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%2Fmtbmu8t8g2pt2lpjewcw.png" alt="Image description" width="800" height="695"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Feels cluttered and repetative for a small widget right? Imagine 3 different notifiers, or 4 or more than 5... &lt;/p&gt;

&lt;p&gt;&lt;em&gt;I know it is not an ideal situation but imagine the amount of clutter it will be for a widget to update on change of any one of the notifiers.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;So, while researching about &lt;code&gt;Listenable.merge()&lt;/code&gt;, I found a better way to do this.&lt;/p&gt;

&lt;p&gt;Here comes &lt;code&gt;AnimatedBuilder&lt;/code&gt;, A built-in widget in the flutter framework.&lt;/p&gt;

&lt;p&gt;As per the flutter documentation, &lt;a href="https://api.flutter.dev/flutter/widgets/AnimatedBuilder-class.html" rel="noopener noreferrer"&gt;AnimatedBuilder&lt;/a&gt; is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;A general-purpose widget for building animations.

AnimatedBuilder is useful for more complex widgets that wish to include an animation as part of a larger build function. To use AnimatedBuilder, construct the widget and pass it a builder function.

For simple cases without additional state, consider using AnimatedWidget.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Surprisingly, &lt;code&gt;AnimatedBuilder&lt;/code&gt; does not require anything related to Animation. &lt;/p&gt;




&lt;h3&gt;
  
  
  Solution
&lt;/h3&gt;

&lt;p&gt;All it takes is a listenable to trigger the build with latest value from any of the notifiers.&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%2Fs84vegausxn4s9gvl5jv.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%2Fs84vegausxn4s9gvl5jv.png" alt="Image description" width="800" height="735"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So now regardless of the number of notifiers involved in the widget, Just the use of &lt;code&gt;AnimatedBuilder&lt;/code&gt; with &lt;code&gt;Listenable.merge()&lt;/code&gt; has got you covered.&lt;/p&gt;

&lt;p&gt;Adding a new notifier in the mix is now just a matter of a fewer lines modified not an entire widget level update like before.&lt;/p&gt;




&lt;h3&gt;
  
  
  Why This Matters
&lt;/h3&gt;

&lt;p&gt;Using &lt;code&gt;Listenable.merge()&lt;/code&gt; + &lt;code&gt;AnimatedBuilder&lt;/code&gt; makes your code:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cleaner&lt;/strong&gt;: You avoid the manual hassle of listening to multiple Listenable objects separately.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;More Maintainable&lt;/strong&gt;: It’s easier to read and understand, reducing the chances of bugs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Versatile&lt;/strong&gt;: AnimatedBuilder works seamlessly with any Listenable, not just animations.&lt;/p&gt;

&lt;p&gt;Give this a try next time, It’s a small change that can make a big difference in your Flutter projects!&lt;/p&gt;




&lt;p&gt;Found this tip helpful? Share it with your Flutter community! Happy coding! 🚀&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>10x</category>
      <category>programming</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
