<?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: Kamal Joshi</title>
    <description>The latest articles on Forem by Kamal Joshi (@kamalkishor1991).</description>
    <link>https://forem.com/kamalkishor1991</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%2F364206%2F2f8b0f65-29e0-40c5-9e8f-8c1e1f97255f.jpg</url>
      <title>Forem: Kamal Joshi</title>
      <link>https://forem.com/kamalkishor1991</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/kamalkishor1991"/>
    <language>en</language>
    <item>
      <title>Why mermaid diagrams will be the next big thing in creating diagrams?</title>
      <dc:creator>Kamal Joshi</dc:creator>
      <pubDate>Sat, 27 Jan 2024 18:28:03 +0000</pubDate>
      <link>https://forem.com/kamalkishor1991/why-mermaid-diagrams-will-be-the-next-big-thing-in-creating-diagrams-35k0</link>
      <guid>https://forem.com/kamalkishor1991/why-mermaid-diagrams-will-be-the-next-big-thing-in-creating-diagrams-35k0</guid>
      <description>&lt;p&gt;We've all been there – grappling with traditional diagramming tools like draw.io and Lucidchart, feeling the burden of a steep learning curve and the anxiety of making edits post-export. The struggle is real, and it's a sentiment shared by many in the programming community. However, there's a rising star on the horizon – mermaid diagrams. In this blog post, we'll explore why mermaid diagrams are going to be the next big thing in creating diagrams, addressing the shortcomings of traditional tools and embracing the power of Language Model-based assistance.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problems with Traditional Tools:
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Divergent Interfaces:
&lt;/h3&gt;

&lt;p&gt;The inherent diversity in the interfaces of tools like draw.io and Lucidchart often results in a high learning curve, making it a daunting task for users to navigate and utilize them effectively.&lt;/p&gt;

&lt;h3&gt;
  
  
  Non-Incremental Nature:
&lt;/h3&gt;

&lt;p&gt;Traditional tools don't align with the programmer's mindset, lacking the ability to incrementally improve diagrams. The fear of committing to a final version before export can hinder the creative process.&lt;/p&gt;

&lt;h3&gt;
  
  
  Overwhelming Features:
&lt;/h3&gt;

&lt;p&gt;These tools come loaded with features, many of which are often unnecessary for expressing fundamental concepts in diagrams. From intricate shapes to complex color palettes, the abundance of options adds unnecessary complexity.&lt;/p&gt;

&lt;h3&gt;
  
  
  Version Control Woes:
&lt;/h3&gt;

&lt;p&gt;The absence of version control mechanisms leaves users scrambling to track changes, making collaboration on diagrams a challenge.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Mermaid Solution:
&lt;/h2&gt;

&lt;p&gt;Enter mermaid – a game-changer in the world of diagramming. It addresses the pain points of traditional tools by conceptualizing diagrams through text, providing a simple and intuitive solution.&lt;/p&gt;

&lt;h3&gt;
  
  
  Uniform Syntax:
&lt;/h3&gt;

&lt;p&gt;While learning the syntax for mermaid diagrams is a requirement, it offers a consistent and straightforward approach, reducing the initial learning curve.&lt;/p&gt;

&lt;h3&gt;
  
  
  Dynamic Evolution:
&lt;/h3&gt;

&lt;p&gt;Mermaid embraces the programmer's desire for incremental development. Editing and refining diagrams become a breeze, aligning perfectly with the iterative nature of coding.&lt;/p&gt;

&lt;h3&gt;
  
  
  Simplicity in Complexity:
&lt;/h3&gt;

&lt;p&gt;Mermaid strips away unnecessary complexity. It focuses on what's essential, eliminating the need for extensive grouping, ungrouping, and other superfluous features.&lt;/p&gt;

&lt;h3&gt;
  
  
  Version Control:
&lt;/h3&gt;

&lt;p&gt;Unlike traditional tools, mermaid brings version control to the table, facilitating collaboration and allowing users to track changes seamlessly.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Challenge of Visualizing:
&lt;/h2&gt;

&lt;p&gt;Creating diagrams using mermaid still requires you to learn the syntax and lookup the examples and sytax when you are creating your diagram.&lt;br&gt;
One other problem with creating diagrams in general is that you have to visualize the whole diagram in your head before you can define it. That part is not easy for a complex document or concept. You know how something works and all the dots are connected in your head but putting it in a neat diagram is still hard.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Rise of Language Models:
&lt;/h2&gt;

&lt;p&gt;Mermaid was already a breath of fresh air, but the emergence of Large Language Models (LLMs) has taken its capabilities to new heights.&lt;/p&gt;

&lt;h3&gt;
  
  
  Overcoming Visualization Challenges:
&lt;/h3&gt;

&lt;p&gt;Creating diagrams often requires visualizing the entire structure beforehand, a daunting task for complex concepts. With LLMs like GPT-4, this hurdle becomes surmountable. Dump your knowledge in text format, and let the model generate the diagrams for you. This also makes iterating lot easiler.&lt;/p&gt;

&lt;p&gt;This can be done with GPT-4 also but it has few issues&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;You have to copy paste the generated code into mermaid live editor after every new generation&lt;/li&gt;
&lt;li&gt;GPT-4 also makes mistakes sometime like syntax errors, not escaping text correctly so you have to prompt it correctly.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Automation with HueHive:
&lt;/h2&gt;

&lt;p&gt;Addressing challenges head-on, HueHive introduces a diagram generator that seamlessly integrates with mermaid. No more hassles of syntax errors or manual code pasting – just feed it text, and a perfect diagram is at your disposal. You can try it out &lt;a href="https://huehive.co/tools/diagrams"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion:
&lt;/h2&gt;

&lt;p&gt;I am solving these problems by creating diagram generator in HueHive. The detailed explaination of how it works in in &lt;a href="https://dev.to/kamalkishor1991/huehive-diagram-generator-mermaid-diagrams-using-chatgpt-3o12"&gt;this&lt;/a&gt; blog but basically in most cases you can just give it text and follow up request to generate a perfact diagram without looking up mermaid syntax even once.&lt;/p&gt;

&lt;p&gt;This is the percise reason why I think mermaid diagrams will be the next big thing. It was great before the rise of LLMs but with LLMs help it has become even more easy to create mermaid diagrams and this will continue to improve in future. I will continue to improve the results and experience in future but like any good tool the journey towards simplicity a collective effort!. Please share your throughts, ideas and issues in comments.&lt;/p&gt;

</description>
      <category>diagrams</category>
      <category>programming</category>
      <category>documentation</category>
      <category>mermaid</category>
    </item>
    <item>
      <title>HueHive diagram generator -Mermaid diagrams using ChatGPT</title>
      <dc:creator>Kamal Joshi</dc:creator>
      <pubDate>Sun, 21 Jan 2024 18:44:40 +0000</pubDate>
      <link>https://forem.com/kamalkishor1991/huehive-diagram-generator-mermaid-diagrams-using-chatgpt-3o12</link>
      <guid>https://forem.com/kamalkishor1991/huehive-diagram-generator-mermaid-diagrams-using-chatgpt-3o12</guid>
      <description>&lt;p&gt;With ChatGPT's assistance, we can effortlessly generate and edit diagrams directly within the chat interface. However, visualizing these diagrams requires copying and pasting the code into the Mermaid editor. Introducing the &lt;a href="https://huehive.co/tools/diagrams"&gt;HueHive diagram generator&lt;/a&gt;, your solution to seamless diagram creation and visualization in the chat interface.&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating Diagrams Using ChatGPT
&lt;/h2&gt;

&lt;p&gt;ChatGPT has proven to be more than just a conversational agent. you can now leverage it to generate Mermaid diagrams on the fly. Whether you're sketching out a software architecture, outlining a business process, or visualizing data flow, LLMs can assist you in turning your ideas into clear and concise diagrams. I tried it for multiple usecases and noticed that it works by just explaining the process, architecture to chatGPT.&lt;/p&gt;

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

&lt;h2&gt;
  
  
  Visualizing Diagrams in the Chat Screen
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;One of the problem with ChatGPT is that you can't see the visualization if you are generating diagrams and it becomes hard to iterate without visualization
&lt;/li&gt;
&lt;li&gt;Second problem is to come up with the prompt to make sure diagram is generated properly. I have seen that without enough context the syntax is incorrect.&lt;/li&gt;
&lt;/ol&gt;

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

&lt;p&gt;One of the unique features of using Huehive for Mermaid diagrams is the ability to instantly visualize the generated diagrams within the chat screen. Gone are the days of switching between tools or platforms—now, you can seamlessly see your ideas come to life as ChatGPT interprets and renders your Mermaid diagrams in real-time, right there in the conversation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Editing Diagrams
&lt;/h2&gt;

&lt;p&gt;You can edit the diagrams for smaller changes. Once you have the high level diagram with correct syntax, it becomes lot easy to change diagram to your preference. For more complex changes you follow up with Chat Assistant itself.&lt;/p&gt;

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

&lt;h2&gt;
  
  
  Opening Diagrams in Mermaid Editor
&lt;/h2&gt;

&lt;p&gt;For users who prefer a more comprehensive editing experience, HueHive facilitates a seamless transition by allowing you to open generated diagrams in the Mermaid editor. This offers a rich editing environment where you can fine-tune every aspect of your diagram with precision, bringing together the best of both AI assistance and traditional diagram editing. You can download also in different formats.&lt;/p&gt;

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

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;As we explore the capabilities of ChatGPT in diagram creation, visualization, and editing, it becomes evident that the synergy between artificial intelligence and visual representation is opening up new avenues for creativity and efficiency. The power to effortlessly craft Mermaid diagrams within a chat interface not only streamlines the workflow but also encourages a more dynamic and interactive approach to visual thinking. So, dive into the world of AI-assisted diagram creation with ChatGPT and witness your ideas materialize in the form of beautifully crafted Mermaid diagrams.&lt;/p&gt;

&lt;p&gt;This is the first version of the Diagram generator, I will continue to enhance and refine the tool. Your feedback and suggestions are invaluable as we strive to create a more seamless and intuitive diagram creation experience with ChatGPT. Please try it out &lt;a href="https://huehive.co/tools/diagrams"&gt;here&lt;/a&gt;. Please Share your creations with us and let us know how you use this tool! We welcome all feedback and suggestions.&lt;/p&gt;

</description>
      <category>mermaid</category>
      <category>diagramming</category>
      <category>chatgpt</category>
      <category>diagram</category>
    </item>
    <item>
      <title>Croma — My first react native app after 7 years of backend development</title>
      <dc:creator>Kamal Joshi</dc:creator>
      <pubDate>Wed, 15 Apr 2020 19:51:27 +0000</pubDate>
      <link>https://forem.com/kamalkishor1991/croma-my-first-react-native-app-after-7-years-of-backend-development-2dg6</link>
      <guid>https://forem.com/kamalkishor1991/croma-my-first-react-native-app-after-7-years-of-backend-development-2dg6</guid>
      <description>&lt;p&gt;Well, I had done some javascript development(node.js) in the past but javascript has changed a lot after ES-6. TIll now my main focus has been backend development in java and ruby(RoR mainly). I am going to share my experience on writing &lt;a href="https://play.google.com/store/apps/details?id=app.croma"&gt;my first react native app&lt;/a&gt;.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5Pnjyz8a--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://miro.medium.com/max/251/1%2AuUyQpJj5ynQ6Fw-tdY1wwQ.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5Pnjyz8a--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://miro.medium.com/max/251/1%2AuUyQpJj5ynQ6Fw-tdY1wwQ.gif" alt="" width="251" height="520"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I decided to learn react native and build something useful as well so decided to rewrite one of the popular app Croma that me and my friend Satyajit Sahoo developed back in 2014. Croma is an app to organize, generate and save color palettes focusing on simple clutter-free design. We could not get time to maintain it and it was written with a web view and native android. Since Satyajit Sahoo suggested to rewrite it in react native so I thought this is a good opportunity to learn react native. Let’s see how I build the initial version&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7sJHSPMF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://miro.medium.com/max/538/1%2AJr73IVaWbzGDrZV4C_9Y5g.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7sJHSPMF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://miro.medium.com/max/538/1%2AJr73IVaWbzGDrZV4C_9Y5g.gif" alt="" width="538" height="302"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Get your hands dirty
&lt;/h3&gt;

&lt;p&gt;The best way to learn a new framework or a language is to start building something and explore and learn along the way. So I started with a boilerplate react native app using expo as documentation said it’s easier to start with expo.&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;expo init&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;I started hello word example app which has some basic functionality already present so this way I can start experimenting right away.&lt;br&gt;
Expo is really easy to start as you can set up a working example app in 5 mins and see the real-time changes in the expo app.&lt;/p&gt;

&lt;h3&gt;
  
  
  80–20 % rule
&lt;/h3&gt;

&lt;p&gt;I was able to build most of the functionality in few days but completing the whole project became tricky as I got caught up in issues and final styling, making it work with the web turned out to be more difficult than it seemed. I mainly struggled with web.&lt;br&gt;
On mobile browser, the scrollview did not work &lt;br&gt;
Making it look good and understanding styling took some time for me.&lt;br&gt;
Storage, icons etc. also required some debugging&lt;br&gt;
Finishing something 100 % is way harder than it seems and the last 20 % of the work takes 80 % of the time.&lt;/p&gt;

&lt;h3&gt;
  
  
  Have fun
&lt;/h3&gt;

&lt;p&gt;Learning a new language or framework can be frustrating at the starting so it’s critical to not overthink and have fun while doing it. Don’t worry too much about getting all the details right. I am having fun building Croma and I have made it open source so feel free to jump in a fix some code that I have screwed up. Looking forward to learning from the community&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Kc9_sntV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://miro.medium.com/max/600/1%2AilIipBmmDARPw5Q-0074nQ.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Kc9_sntV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://miro.medium.com/max/600/1%2AilIipBmmDARPw5Q-0074nQ.gif" alt="" width="600" height="573"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/croma-app/croma-color-picker"&gt;a react native library I build while building croma&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  The first impression of react native and learnings
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;With expo it’s very easy to get started&lt;/li&gt;
&lt;li&gt;The concept of the component makes sense so easy to write reusable code
With ES6 features like async wait and JSX writing javascript has really become more fun&lt;/li&gt;
&lt;li&gt;Not everything can be done using react native as I tried to implement a &lt;a href="https://github.com/croma-app/croma-react/pull/6"&gt;real-time color picker using Camera&lt;/a&gt; but the performance turned out to be really a bottleneck. So eventually I will have to move out of expo to implement this feature in the native.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The state of the react-native web is not good and I lot of the things just don’t work on the web. I still managed to fix most of the issues but you have to put extra effort to make things work on the web.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Github actions are awesome to automate the build and release process. I was able to automate web release using Github pages and android release using expo publish. See these &lt;a href="https://github.com/croma-app/croma-react/tree/master/.github/workflows"&gt;workflows&lt;/a&gt; if you are also trying to do the same.&lt;/li&gt;
&lt;li&gt;I am learning so much about colors and design by building this app that I had very little chance to work on while doing backend development.&lt;/li&gt;
&lt;li&gt;You can also implement machine learning algorithms in javascript. I implemented a clustering algorithm to find out top prominent colors from an image and it’s working well. Try it out &lt;a href="https://croma.app"&gt;here&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Looking forward to seeing how people use the app. Please try it out &lt;a href="https://croma.app"&gt;here&lt;/a&gt; or download it from the &lt;a href="https://play.google.com/store/apps/details?id=app.croma"&gt;playstore&lt;/a&gt; and feel free to &lt;a href="https://github.com/croma-app/croma-react/issues"&gt;send a PR and raise an issue&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;Really excited about my react journey and looking forward to learning from the community. Thanks to &lt;a href="https://twitter.com/satya164"&gt;Satyajit Sahoo&lt;/a&gt; and Bhuwan Joshi and for all the help.&lt;br&gt;
Cheers!&lt;/p&gt;

</description>
      <category>reactnative</category>
      <category>javascript</category>
      <category>sideprojects</category>
      <category>design</category>
    </item>
  </channel>
</rss>
